]> code.delx.au - gnu-emacs/blob - man/gnus.texi
(mouse-avoidance-point-position): Use posn-at-point instead of compute-motion.
[gnu-emacs] / man / gnus.texi
1 \input texinfo
2
3 @setfilename ../info/gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8
9 @copying
10 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
11 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
12
13 @quotation
14 Permission is granted to copy, distribute and/or modify this document
15 under the terms of the GNU Free Documentation License, Version 1.2 or
16 any later version published by the Free Software Foundation; with no
17 Invariant Sections, with the Front-Cover texts being ``A GNU
18 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
19 license is included in the section entitled ``GNU Free Documentation
20 License'' in the Emacs manual.
21
22 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
23 this GNU Manual, like GNU software. Copies published by the Free
24 Software Foundation raise funds for GNU development.''
25
26 This document is part of a collection distributed under the GNU Free
27 Documentation License. If you want to distribute this document
28 separately from the collection, you can do so by adding a copy of the
29 license to the document, as described in section 6 of the license.
30 @end quotation
31 @end copying
32
33 @iftex
34 @iflatex
35 \documentclass[twoside,a4paper,openright,11pt]{book}
36 \usepackage[latin1]{inputenc}
37 \usepackage{pagestyle}
38 \usepackage{epsfig}
39 \usepackage{pixidx}
40 \input{gnusconfig.tex}
41
42 \ifx\pdfoutput\undefined
43 \else
44 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
45 \usepackage{thumbpdf}
46 \pdfcompresslevel=9
47 \fi
48
49 \makeindex
50 \begin{document}
51
52 % Adjust ../Makefile.in if you change the following line:
53 \newcommand{\gnusversionname}{Gnus v5.11}
54 \newcommand{\gnuschaptername}{}
55 \newcommand{\gnussectionname}{}
56
57 \newcommand{\gnusbackslash}{/}
58
59 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
60 \ifx\pdfoutput\undefined
61 \newcommand{\gnusuref}[1]{\gnustt{#1}}
62 \else
63 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
64 \fi
65 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
66 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
67
68 \newcommand{\gnuskindex}[1]{\index{#1}}
69 \newcommand{\gnusindex}[1]{\index{#1}}
70
71 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
72 \newcommand{\gnuscode}[1]{\gnustt{#1}}
73 \newcommand{\gnusasis}[1]{\gnustt{#1}}
74 \newcommand{\gnusurl}[1]{\gnustt{#1}}
75 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
76 \newcommand{\gnusenv}[1]{\gnustt{#1}}
77 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
78 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
79 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
80 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
81 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
82 \newcommand{\gnusdfn}[1]{\textit{#1}}
83 \newcommand{\gnusi}[1]{\textit{#1}}
84 \newcommand{\gnusr}[1]{\textrm{#1}}
85 \newcommand{\gnusstrong}[1]{\textbf{#1}}
86 \newcommand{\gnusemph}[1]{\textit{#1}}
87 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
88 \newcommand{\gnussc}[1]{\textsc{#1}}
89 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
90 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
91 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
92 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
93 \newcommand{\gnusacronym}[1]{\textsc{#1}}
94 \newcommand{\gnusemail}[1]{\textit{#1}}
95
96 \newcommand{\gnusbullet}{{${\bullet}$}}
97 \newcommand{\gnusdollar}{\$}
98 \newcommand{\gnusampersand}{\&}
99 \newcommand{\gnuspercent}{\%}
100 \newcommand{\gnushash}{\#}
101 \newcommand{\gnushat}{\symbol{"5E}}
102 \newcommand{\gnusunderline}{\symbol{"5F}}
103 \newcommand{\gnusnot}{$\neg$}
104 \newcommand{\gnustilde}{\symbol{"7E}}
105 \newcommand{\gnusless}{{$<$}}
106 \newcommand{\gnusgreater}{{$>$}}
107 \newcommand{\gnusbraceleft}{{$>$}}
108 \newcommand{\gnusbraceright}{{$>$}}
109
110 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
111 \newcommand{\gnusinteresting}{
112 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
113 }
114
115 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
116
117 \newcommand{\gnuspagechapter}[1]{
118 {\mbox{}}
119 }
120
121 \newdimen{\gnusdimen}
122 \gnusdimen 0pt
123
124 \newcommand{\gnuschapter}[2]{
125 \gnuscleardoublepage
126 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
127 \chapter{#2}
128 \renewcommand{\gnussectionname}{}
129 \renewcommand{\gnuschaptername}{#2}
130 \thispagestyle{empty}
131 \hspace*{-2cm}
132 \begin{picture}(500,500)(0,0)
133 \put(480,350){\makebox(0,0)[tr]{#1}}
134 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
135 \end{picture}
136 \clearpage
137 }
138
139 \newcommand{\gnusfigure}[3]{
140 \begin{figure}
141 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
142 #3
143 \end{picture}
144 \caption{#1}
145 \end{figure}
146 }
147
148 \newcommand{\gnusicon}[1]{
149 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
150 }
151
152 \newcommand{\gnuspicon}[1]{
153 \margindex{\epsfig{figure=#1,width=2cm}}
154 }
155
156 \newcommand{\gnusxface}[2]{
157 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
158 }
159
160 \newcommand{\gnussmiley}[2]{
161 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
162 }
163
164 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
165
166 \newcommand{\gnussection}[1]{
167 \renewcommand{\gnussectionname}{#1}
168 \section{#1}
169 }
170
171 \newenvironment{codelist}%
172 {\begin{list}{}{
173 }
174 }{\end{list}}
175
176 \newenvironment{asislist}%
177 {\begin{list}{}{
178 }
179 }{\end{list}}
180
181 \newenvironment{kbdlist}%
182 {\begin{list}{}{
183 \labelwidth=0cm
184 }
185 }{\end{list}}
186
187 \newenvironment{dfnlist}%
188 {\begin{list}{}{
189 }
190 }{\end{list}}
191
192 \newenvironment{stronglist}%
193 {\begin{list}{}{
194 }
195 }{\end{list}}
196
197 \newenvironment{samplist}%
198 {\begin{list}{}{
199 }
200 }{\end{list}}
201
202 \newenvironment{varlist}%
203 {\begin{list}{}{
204 }
205 }{\end{list}}
206
207 \newenvironment{emphlist}%
208 {\begin{list}{}{
209 }
210 }{\end{list}}
211
212 \newlength\gnusheadtextwidth
213 \setlength{\gnusheadtextwidth}{\headtextwidth}
214 \addtolength{\gnusheadtextwidth}{1cm}
215
216 \newpagestyle{gnuspreamble}%
217 {
218 {
219 \ifodd\count0
220 {
221 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
222 }
223 \else
224 {
225 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
226 }
227 }
228 \fi
229 }
230 }
231 {
232 \ifodd\count0
233 \mbox{} \hfill
234 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
235 \else
236 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
237 \hfill \mbox{}
238 \fi
239 }
240
241 \newpagestyle{gnusindex}%
242 {
243 {
244 \ifodd\count0
245 {
246 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
247 }
248 \else
249 {
250 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
251 }
252 \fi
253 }
254 }
255 {
256 \ifodd\count0
257 \mbox{} \hfill
258 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
259 \else
260 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
261 \hfill \mbox{}
262 \fi
263 }
264
265 \newpagestyle{gnus}%
266 {
267 {
268 \ifodd\count0
269 {
270 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
271 }
272 \else
273 {
274 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
275 }
276 \fi
277 }
278 }
279 {
280 \ifodd\count0
281 \mbox{} \hfill
282 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
283 \else
284 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
285 \hfill \mbox{}
286 \fi
287 }
288
289 \pagenumbering{roman}
290 \pagestyle{gnuspreamble}
291
292 @end iflatex
293 @end iftex
294
295 @iftex
296 @iflatex
297
298 \begin{titlepage}
299 {
300
301 %\addtolength{\oddsidemargin}{-5cm}
302 %\addtolength{\evensidemargin}{-5cm}
303 \parindent=0cm
304 \addtolength{\textheight}{2cm}
305
306 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
307 \rule{15cm}{1mm}\\
308 \vfill
309 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
310 \vfill
311 \rule{15cm}{1mm}\\
312 \gnusauthor{by Lars Magne Ingebrigtsen}
313 \newpage
314 }
315
316 \mbox{}
317 \vfill
318
319 \thispagestyle{empty}
320
321 @c @insertcopying
322 \newpage
323 \end{titlepage}
324 @end iflatex
325 @end iftex
326
327 @ifnottex
328 @insertcopying
329 @end ifnottex
330
331 @dircategory Emacs
332 @direntry
333 * Gnus: (gnus). The newsreader Gnus.
334 @end direntry
335 @iftex
336 @finalout
337 @end iftex
338 @setchapternewpage odd
339
340
341
342 @titlepage
343 @title Gnus Manual
344
345 @author by Lars Magne Ingebrigtsen
346 @page
347 @vskip 0pt plus 1filll
348 @insertcopying
349 @end titlepage
350
351
352 @node Top
353 @top The Gnus Newsreader
354
355 @ifinfo
356
357 You can read news (and mail) from within Emacs by using Gnus. The news
358 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
359 spool or your mbox file. All at the same time, if you want to push your
360 luck.
361
362 @c Adjust ../Makefile.in if you change the following line:
363 This manual corresponds to Gnus v5.11.
364
365 @end ifinfo
366
367 @iftex
368
369 @iflatex
370 \tableofcontents
371 \gnuscleardoublepage
372 @end iflatex
373
374 Gnus is the advanced, self-documenting, customizable, extensible
375 unreal-time newsreader for GNU Emacs.
376
377 Oops. That sounds oddly familiar, so let's start over again to avoid
378 being accused of plagiarism:
379
380 Gnus is a message-reading laboratory. It will let you look at just
381 about anything as if it were a newsgroup. You can read mail with it,
382 you can browse directories with it, you can @code{ftp} with it---you
383 can even read news with it!
384
385 Gnus tries to empower people who read news the same way Emacs empowers
386 people who edit text. Gnus sets no limits to what the user should be
387 allowed to do. Users are encouraged to extend Gnus to make it behave
388 like they want it to behave. A program should not control people;
389 people should be empowered to do what they want by using (or abusing)
390 the program.
391
392 @end iftex
393
394 @menu
395 * Starting Up:: Finding news can be a pain.
396 * Group Buffer:: Selecting, subscribing and killing groups.
397 * Summary Buffer:: Reading, saving and posting articles.
398 * Article Buffer:: Displaying and handling articles.
399 * Composing Messages:: Information on sending mail and news.
400 * Select Methods:: Gnus reads all messages from various select methods.
401 * Scoring:: Assigning values to articles.
402 * Various:: General purpose settings.
403 * The End:: Farewell and goodbye.
404 * Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
405 * Index:: Variable, function and concept index.
406 * Key Index:: Key Index.
407
408 Other related manuals
409
410 * Message:(message). Composing messages.
411 * Emacs-MIME:(emacs-mime). Composing messages; @acronym{MIME}-specific parts.
412 * Sieve:(sieve). Managing Sieve scripts in Emacs.
413 * PGG:(pgg). @acronym{PGP/MIME} with Gnus.
414
415 @detailmenu
416 --- The Detailed Node Listing ---
417
418 Starting Gnus
419
420 * Finding the News:: Choosing a method for getting news.
421 * The First Time:: What does Gnus do the first time you start it?
422 * The Server is Down:: How can I read my mail then?
423 * Slave Gnusae:: You can have more than one Gnus active at a time.
424 * Fetching a Group:: Starting Gnus just to read a group.
425 * New Groups:: What is Gnus supposed to do with new groups?
426 * Changing Servers:: You may want to move from one server to another.
427 * Startup Files:: Those pesky startup files---@file{.newsrc}.
428 * Auto Save:: Recovering from a crash.
429 * The Active File:: Reading the active file over a slow line Takes Time.
430 * Startup Variables:: Other variables you might change.
431
432 New Groups
433
434 * Checking New Groups:: Determining what groups are new.
435 * Subscription Methods:: What Gnus should do with new groups.
436 * Filtering New Groups:: Making Gnus ignore certain new groups.
437
438 Group Buffer
439
440 * Group Buffer Format:: Information listed and how you can change it.
441 * Group Maneuvering:: Commands for moving in the group buffer.
442 * Selecting a Group:: Actually reading news.
443 * Subscription Commands:: Unsubscribing, killing, subscribing.
444 * Group Data:: Changing the info for a group.
445 * Group Levels:: Levels? What are those, then?
446 * Group Score:: A mechanism for finding out what groups you like.
447 * Marking Groups:: You can mark groups for later processing.
448 * Foreign Groups:: Creating and editing groups.
449 * Group Parameters:: Each group may have different parameters set.
450 * Listing Groups:: Gnus can list various subsets of the groups.
451 * Sorting Groups:: Re-arrange the group order.
452 * Group Maintenance:: Maintaining a tidy @file{.newsrc} file.
453 * Browse Foreign Server:: You can browse a server. See what it has to offer.
454 * Exiting Gnus:: Stop reading news and get some work done.
455 * Group Topics:: A folding group mode divided into topics.
456 * Misc Group Stuff:: Other stuff that you can to do.
457
458 Group Buffer Format
459
460 * Group Line Specification:: Deciding how the group buffer is to look.
461 * Group Mode Line Specification:: The group buffer mode line.
462 * Group Highlighting:: Having nice colors in the group buffer.
463
464 Group Topics
465
466 * Topic Commands:: Interactive E-Z commands.
467 * Topic Variables:: How to customize the topics the Lisp Way.
468 * Topic Sorting:: Sorting each topic individually.
469 * Topic Topology:: A map of the world.
470 * Topic Parameters:: Parameters that apply to all groups in a topic.
471
472 Misc Group Stuff
473
474 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
475 * Group Information:: Information and help on groups and Gnus.
476 * Group Timestamp:: Making Gnus keep track of when you last read a group.
477 * File Commands:: Reading and writing the Gnus files.
478 * Sieve Commands:: Managing Sieve scripts.
479
480 Summary Buffer
481
482 * Summary Buffer Format:: Deciding how the summary buffer is to look.
483 * Summary Maneuvering:: Moving around the summary buffer.
484 * Choosing Articles:: Reading articles.
485 * Paging the Article:: Scrolling the current article.
486 * Reply Followup and Post:: Posting articles.
487 * Delayed Articles:: Send articles at a later time.
488 * Marking Articles:: Marking articles as read, expirable, etc.
489 * Limiting:: You can limit the summary buffer.
490 * Threading:: How threads are made.
491 * Sorting the Summary Buffer:: How articles and threads are sorted.
492 * Asynchronous Fetching:: Gnus might be able to pre-fetch articles.
493 * Article Caching:: You may store articles in a cache.
494 * Persistent Articles:: Making articles expiry-resistant.
495 * Article Backlog:: Having already read articles hang around.
496 * Saving Articles:: Ways of customizing article saving.
497 * Decoding Articles:: Gnus can treat series of (uu)encoded articles.
498 * Article Treatment:: The article buffer can be mangled at will.
499 * MIME Commands:: Doing MIMEy things with the articles.
500 * Charsets:: Character set issues.
501 * Article Commands:: Doing various things with the article buffer.
502 * Summary Sorting:: Sorting the summary buffer in various ways.
503 * Finding the Parent:: No child support? Get the parent.
504 * Alternative Approaches:: Reading using non-default summaries.
505 * Tree Display:: A more visual display of threads.
506 * Mail Group Commands:: Some commands can only be used in mail groups.
507 * Various Summary Stuff:: What didn't fit anywhere else.
508 * Exiting the Summary Buffer:: Returning to the Group buffer,
509 or reselecting the current group.
510 * Crosspost Handling:: How crossposted articles are dealt with.
511 * Duplicate Suppression:: An alternative when crosspost handling fails.
512 * Security:: Decrypt and Verify.
513 * Mailing List:: Mailing list minor mode.
514
515 Summary Buffer Format
516
517 * Summary Buffer Lines:: You can specify how summary lines should look.
518 * To From Newsgroups:: How to not display your own name.
519 * Summary Buffer Mode Line:: You can say how the mode line should look.
520 * Summary Highlighting:: Making the summary buffer all pretty and nice.
521
522 Choosing Articles
523
524 * Choosing Commands:: Commands for choosing articles.
525 * Choosing Variables:: Variables that influence these commands.
526
527 Reply, Followup and Post
528
529 * Summary Mail Commands:: Sending mail.
530 * Summary Post Commands:: Sending news.
531 * Summary Message Commands:: Other Message-related commands.
532 * Canceling and Superseding::
533
534 Marking Articles
535
536 * Unread Articles:: Marks for unread articles.
537 * Read Articles:: Marks for read articles.
538 * Other Marks:: Marks that do not affect readedness.
539 * Setting Marks:: How to set and remove marks.
540 * Generic Marking Commands:: How to customize the marking.
541 * Setting Process Marks:: How to mark articles for later processing.
542
543 Threading
544
545 * Customizing Threading:: Variables you can change to affect the threading.
546 * Thread Commands:: Thread based commands in the summary buffer.
547
548 Customizing Threading
549
550 * Loose Threads:: How Gnus gathers loose threads into bigger threads.
551 * Filling In Threads:: Making the threads displayed look fuller.
552 * More Threading:: Even more variables for fiddling with threads.
553 * Low-Level Threading:: You thought it was over@dots{} but you were wrong!
554
555 Decoding Articles
556
557 * Uuencoded Articles:: Uudecode articles.
558 * Shell Archives:: Unshar articles.
559 * PostScript Files:: Split PostScript.
560 * Other Files:: Plain save and binhex.
561 * Decoding Variables:: Variables for a happy decoding.
562 * Viewing Files:: You want to look at the result of the decoding?
563
564 Decoding Variables
565
566 * Rule Variables:: Variables that say how a file is to be viewed.
567 * Other Decode Variables:: Other decode variables.
568 * Uuencoding and Posting:: Variables for customizing uuencoding.
569
570 Article Treatment
571
572 * Article Highlighting:: You want to make the article look like fruit salad.
573 * Article Fontisizing:: Making emphasized text look nice.
574 * Article Hiding:: You also want to make certain info go away.
575 * Article Washing:: Lots of way-neat functions to make life better.
576 * Article Header:: Doing various header transformations.
577 * Article Buttons:: Click on URLs, Message-IDs, addresses and the like.
578 * Article Button Levels:: Controlling appearance of buttons.
579 * Article Date:: Grumble, UT!
580 * Article Display:: Display various stuff---X-Face, Picons, Smileys
581 * Article Signature:: What is a signature?
582 * Article Miscellanea:: Various other stuff.
583
584 Alternative Approaches
585
586 * Pick and Read:: First mark articles and then read them.
587 * Binary Groups:: Auto-decode all articles.
588
589 Various Summary Stuff
590
591 * Summary Group Information:: Information oriented commands.
592 * Searching for Articles:: Multiple article commands.
593 * Summary Generation Commands::
594 * Really Various Summary Commands:: Those pesky non-conformant commands.
595
596 Article Buffer
597
598 * Hiding Headers:: Deciding what headers should be displayed.
599 * Using MIME:: Pushing articles through @acronym{MIME} before reading them.
600 * Customizing Articles:: Tailoring the look of the articles.
601 * Article Keymap:: Keystrokes available in the article buffer.
602 * Misc Article:: Other stuff.
603
604 Composing Messages
605
606 * Mail:: Mailing and replying.
607 * Posting Server:: What server should you post and mail via?
608 * POP before SMTP:: You cannot send a mail unless you read a mail.
609 * Mail and Post:: Mailing and posting at the same time.
610 * Archived Messages:: Where Gnus stores the messages you've sent.
611 * Posting Styles:: An easier way to specify who you are.
612 * Drafts:: Postponing messages and rejected messages.
613 * Rejected Articles:: What happens if the server doesn't like your article?
614 * Signing and encrypting:: How to compose secure messages.
615
616 Select Methods
617
618 * Server Buffer:: Making and editing virtual servers.
619 * Getting News:: Reading USENET news with Gnus.
620 * Getting Mail:: Reading your personal mail with Gnus.
621 * Browsing the Web:: Getting messages from a plethora of Web sources.
622 * IMAP:: Using Gnus as a @acronym{IMAP} client.
623 * Other Sources:: Reading directories, files, SOUP packets.
624 * Combined Groups:: Combining groups into one group.
625 * Gnus Unplugged:: Reading news and mail offline.
626
627 Server Buffer
628
629 * Server Buffer Format:: You can customize the look of this buffer.
630 * Server Commands:: Commands to manipulate servers.
631 * Example Methods:: Examples server specifications.
632 * Creating a Virtual Server:: An example session.
633 * Server Variables:: Which variables to set.
634 * Servers and Methods:: You can use server names as select methods.
635 * Unavailable Servers:: Some servers you try to contact may be down.
636
637 Getting News
638
639 * NNTP:: Reading news from an @acronym{NNTP} server.
640 * News Spool:: Reading news from the local spool.
641
642 @acronym{NNTP}
643
644 * Direct Functions:: Connecting directly to the server.
645 * Indirect Functions:: Connecting indirectly to the server.
646 * Common Variables:: Understood by several connection functions.
647
648 Getting Mail
649
650 * Mail in a Newsreader:: Important introductory notes.
651 * Getting Started Reading Mail:: A simple cookbook example.
652 * Splitting Mail:: How to create mail groups.
653 * Mail Sources:: How to tell Gnus where to get mail from.
654 * Mail Back End Variables:: Variables for customizing mail handling.
655 * Fancy Mail Splitting:: Gnus can do hairy splitting of incoming mail.
656 * Group Mail Splitting:: Use group customize to drive mail splitting.
657 * Incorporating Old Mail:: What about the old mail you have?
658 * Expiring Mail:: Getting rid of unwanted mail.
659 * Washing Mail:: Removing cruft from the mail you get.
660 * Duplicates:: Dealing with duplicated mail.
661 * Not Reading Mail:: Using mail back ends for reading other files.
662 * Choosing a Mail Back End:: Gnus can read a variety of mail formats.
663
664 Mail Sources
665
666 * Mail Source Specifiers:: How to specify what a mail source is.
667 * Mail Source Customization:: Some variables that influence things.
668 * Fetching Mail:: Using the mail source specifiers.
669
670 Choosing a Mail Back End
671
672 * Unix Mail Box:: Using the (quite) standard Un*x mbox.
673 * Rmail Babyl:: Emacs programs use the Rmail Babyl format.
674 * Mail Spool:: Store your mail in a private spool?
675 * MH Spool:: An mhspool-like back end.
676 * Maildir:: Another one-file-per-message format.
677 * Mail Folders:: Having one file for each group.
678 * Comparing Mail Back Ends:: An in-depth looks at pros and cons.
679
680 Browsing the Web
681
682 * Archiving Mail::
683 * Web Searches:: Creating groups from articles that match a string.
684 * Slashdot:: Reading the Slashdot comments.
685 * Ultimate:: The Ultimate Bulletin Board systems.
686 * Web Archive:: Reading mailing list archived on web.
687 * RSS:: Reading RDF site summary.
688 * Customizing W3:: Doing stuff to Emacs/W3 from Gnus.
689
690 @acronym{IMAP}
691
692 * Splitting in IMAP:: Splitting mail with nnimap.
693 * Expiring in IMAP:: Expiring mail with nnimap.
694 * Editing IMAP ACLs:: Limiting/enabling other users access to a mailbox.
695 * Expunging mailboxes:: Equivalent of a ``compress mailbox'' button.
696 * A note on namespaces:: How to (not) use @acronym{IMAP} namespace in Gnus.
697 * Debugging IMAP:: What to do when things don't work.
698
699 Other Sources
700
701 * Directory Groups:: You can read a directory as if it was a newsgroup.
702 * Anything Groups:: Dired? Who needs dired?
703 * Document Groups:: Single files can be the basis of a group.
704 * SOUP:: Reading @sc{soup} packets ``offline''.
705 * Mail-To-News Gateways:: Posting articles via mail-to-news gateways.
706
707 Document Groups
708
709 * Document Server Internals:: How to add your own document types.
710
711 SOUP
712
713 * SOUP Commands:: Commands for creating and sending @sc{soup} packets
714 * SOUP Groups:: A back end for reading @sc{soup} packets.
715 * SOUP Replies:: How to enable @code{nnsoup} to take over mail and news.
716
717 Combined Groups
718
719 * Virtual Groups:: Combining articles from many groups.
720 * Kibozed Groups:: Looking through parts of the newsfeed for articles.
721
722 Gnus Unplugged
723
724 * Agent Basics:: How it all is supposed to work.
725 * Agent Categories:: How to tell the Gnus Agent what to download.
726 * Agent Commands:: New commands for all the buffers.
727 * Agent Visuals:: Ways that the agent may effect your summary buffer.
728 * Agent as Cache:: The Agent is a big cache too.
729 * Agent Expiry:: How to make old articles go away.
730 * Agent Regeneration:: How to recover from lost connections and other accidents.
731 * Agent and IMAP:: How to use the Agent with @acronym{IMAP}.
732 * Outgoing Messages:: What happens when you post/mail something?
733 * Agent Variables:: Customizing is fun.
734 * Example Setup:: An example @file{~/.gnus.el} file for offline people.
735 * Batching Agents:: How to fetch news from a @code{cron} job.
736 * Agent Caveats:: What you think it'll do and what it does.
737
738 Agent Categories
739
740 * Category Syntax:: What a category looks like.
741 * Category Buffer:: A buffer for maintaining categories.
742 * Category Variables:: Customize'r'Us.
743
744 Agent Commands
745
746 * Group Agent Commands:: Configure groups and fetch their contents.
747 * Summary Agent Commands:: Manually select then fetch specific articles.
748 * Server Agent Commands:: Select the servers that are supported by the agent.
749
750 Scoring
751
752 * Summary Score Commands:: Adding score entries for the current group.
753 * Group Score Commands:: General score commands.
754 * Score Variables:: Customize your scoring. (My, what terminology).
755 * Score File Format:: What a score file may contain.
756 * Score File Editing:: You can edit score files by hand as well.
757 * Adaptive Scoring:: Big Sister Gnus knows what you read.
758 * Home Score File:: How to say where new score entries are to go.
759 * Followups To Yourself:: Having Gnus notice when people answer you.
760 * Scoring On Other Headers:: Scoring on non-standard headers.
761 * Scoring Tips:: How to score effectively.
762 * Reverse Scoring:: That problem child of old is not problem.
763 * Global Score Files:: Earth-spanning, ear-splitting score files.
764 * Kill Files:: They are still here, but they can be ignored.
765 * Converting Kill Files:: Translating kill files to score files.
766 * GroupLens:: Getting predictions on what you like to read.
767 * Advanced Scoring:: Using logical expressions to build score rules.
768 * Score Decays:: It can be useful to let scores wither away.
769
770 GroupLens
771
772 * Using GroupLens:: How to make Gnus use GroupLens.
773 * Rating Articles:: Letting GroupLens know how you rate articles.
774 * Displaying Predictions:: Displaying predictions given by GroupLens.
775 * GroupLens Variables:: Customizing GroupLens.
776
777 Advanced Scoring
778
779 * Advanced Scoring Syntax:: A definition.
780 * Advanced Scoring Examples:: What they look like.
781 * Advanced Scoring Tips:: Getting the most out of it.
782
783 Various
784
785 * Process/Prefix:: A convention used by many treatment commands.
786 * Interactive:: Making Gnus ask you many questions.
787 * Symbolic Prefixes:: How to supply some Gnus functions with options.
788 * Formatting Variables:: You can specify what buffers should look like.
789 * Window Layout:: Configuring the Gnus buffer windows.
790 * Faces and Fonts:: How to change how faces look.
791 * Compilation:: How to speed Gnus up.
792 * Mode Lines:: Displaying information in the mode lines.
793 * Highlighting and Menus:: Making buffers look all nice and cozy.
794 * Buttons:: Get tendinitis in ten easy steps!
795 * Daemons:: Gnus can do things behind your back.
796 * NoCeM:: How to avoid spam and other fatty foods.
797 * Undo:: Some actions can be undone.
798 * Predicate Specifiers:: Specifying predicates.
799 * Moderation:: What to do if you're a moderator.
800 * Image Enhancements:: Modern versions of Emacs/XEmacs can display images.
801 * Fuzzy Matching:: What's the big fuzz?
802 * Thwarting Email Spam:: Simple ways to avoid unsolicited commercial email.
803 * Spam Package:: A package for filtering and processing spam.
804 * Other modes:: Interaction with other modes.
805 * Various Various:: Things that are really various.
806
807 Formatting Variables
808
809 * Formatting Basics:: A formatting variable is basically a format string.
810 * Mode Line Formatting:: Some rules about mode line formatting variables.
811 * Advanced Formatting:: Modifying output in various ways.
812 * User-Defined Specs:: Having Gnus call your own functions.
813 * Formatting Fonts:: Making the formatting look colorful and nice.
814 * Positioning Point:: Moving point to a position after an operation.
815 * Tabulation:: Tabulating your output.
816 * Wide Characters:: Dealing with wide characters.
817
818 Image Enhancements
819
820 * X-Face:: Display a funky, teensy black-and-white image.
821 * Face:: Display a funkier, teensier colored image.
822 * Smileys:: Show all those happy faces the way they were
823 meant to be shown.
824 * Picons:: How to display pictures of what you're reading.
825 * XVarious:: Other XEmacsy Gnusey variables.
826
827 Thwarting Email Spam
828
829 * The problem of spam:: Some background, and some solutions
830 * Anti-Spam Basics:: Simple steps to reduce the amount of spam.
831 * SpamAssassin:: How to use external anti-spam tools.
832 * Hashcash:: Reduce spam by burning CPU time.
833
834 Spam Package
835
836 * Spam Package Introduction::
837 * Filtering Incoming Mail::
838 * Detecting Spam in Groups::
839 * Spam and Ham Processors::
840 * Spam Package Configuration Examples::
841 * Spam Back Ends::
842 * Extending the Spam package::
843 * Spam Statistics Package::
844
845 Spam Statistics Package
846
847 * Creating a spam-stat dictionary::
848 * Splitting mail using spam-stat::
849 * Low-level interface to the spam-stat dictionary::
850
851 Appendices
852
853 * XEmacs:: Requirements for installing under XEmacs.
854 * History:: How Gnus got where it is today.
855 * On Writing Manuals:: Why this is not a beginner's guide.
856 * Terminology:: We use really difficult, like, words here.
857 * Customization:: Tailoring Gnus to your needs.
858 * Troubleshooting:: What you might try if things do not work.
859 * Gnus Reference Guide:: Rilly, rilly technical stuff.
860 * Emacs for Heathens:: A short introduction to Emacsian terms.
861 * Frequently Asked Questions:: The Gnus FAQ
862
863 History
864
865 * Gnus Versions:: What Gnus versions have been released.
866 * Other Gnus Versions:: Other Gnus versions that also have been released.
867 * Why?:: What's the point of Gnus?
868 * Compatibility:: Just how compatible is Gnus with @sc{gnus}?
869 * Conformity:: Gnus tries to conform to all standards.
870 * Emacsen:: Gnus can be run on a few modern Emacsen.
871 * Gnus Development:: How Gnus is developed.
872 * Contributors:: Oodles of people.
873 * New Features:: Pointers to some of the new stuff in Gnus.
874
875 New Features
876
877 * ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus.
878 * September Gnus:: The Thing Formally Known As Gnus 5.2/5.3.
879 * Red Gnus:: Third time best---Gnus 5.4/5.5.
880 * Quassia Gnus:: Two times two is four, or Gnus 5.6/5.7.
881 * Pterodactyl Gnus:: Pentad also starts with P, AKA Gnus 5.8/5.9.
882 * Oort Gnus:: It's big. It's far out. Gnus 5.10/5.11.
883
884 Customization
885
886 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
887 * Slow Terminal Connection:: You run a remote Emacs.
888 * Little Disk Space:: You feel that having large setup files is icky.
889 * Slow Machine:: You feel like buying a faster machine.
890
891 Gnus Reference Guide
892
893 * Gnus Utility Functions:: Common functions and variable to use.
894 * Back End Interface:: How Gnus communicates with the servers.
895 * Score File Syntax:: A BNF definition of the score file standard.
896 * Headers:: How Gnus stores headers internally.
897 * Ranges:: A handy format for storing mucho numbers.
898 * Group Info:: The group info format.
899 * Extended Interactive:: Symbolic prefixes and stuff.
900 * Emacs/XEmacs Code:: Gnus can be run under all modern Emacsen.
901 * Various File Formats:: Formats of files that Gnus use.
902
903 Back End Interface
904
905 * Required Back End Functions:: Functions that must be implemented.
906 * Optional Back End Functions:: Functions that need not be implemented.
907 * Error Messaging:: How to get messages and report errors.
908 * Writing New Back Ends:: Extending old back ends.
909 * Hooking New Back Ends Into Gnus:: What has to be done on the Gnus end.
910 * Mail-like Back Ends:: Some tips on mail back ends.
911
912 Various File Formats
913
914 * Active File Format:: Information on articles and groups available.
915 * Newsgroups File Format:: Group descriptions.
916
917 Emacs for Heathens
918
919 * Keystrokes:: Entering text and executing commands.
920 * Emacs Lisp:: The built-in Emacs programming language.
921
922 @end detailmenu
923 @end menu
924
925 @node Starting Up
926 @chapter Starting Gnus
927 @cindex starting up
928
929 @kindex M-x gnus
930 @findex gnus
931 If your system administrator has set things up properly, starting Gnus
932 and reading news is extremely easy---you just type @kbd{M-x gnus} in
933 your Emacs.
934
935 @findex gnus-other-frame
936 @kindex M-x gnus-other-frame
937 If you want to start Gnus in a different frame, you can use the command
938 @kbd{M-x gnus-other-frame} instead.
939
940 If things do not go smoothly at startup, you have to twiddle some
941 variables in your @file{~/.gnus.el} file. This file is similar to
942 @file{~/.emacs}, but is read when Gnus starts.
943
944 If you puzzle at any terms used in this manual, please refer to the
945 terminology section (@pxref{Terminology}).
946
947 @menu
948 * Finding the News:: Choosing a method for getting news.
949 * The First Time:: What does Gnus do the first time you start it?
950 * The Server is Down:: How can I read my mail then?
951 * Slave Gnusae:: You can have more than one Gnus active at a time.
952 * New Groups:: What is Gnus supposed to do with new groups?
953 * Changing Servers:: You may want to move from one server to another.
954 * Startup Files:: Those pesky startup files---@file{.newsrc}.
955 * Auto Save:: Recovering from a crash.
956 * The Active File:: Reading the active file over a slow line Takes Time.
957 * Startup Variables:: Other variables you might change.
958 @end menu
959
960
961 @node Finding the News
962 @section Finding the News
963 @cindex finding news
964
965 @vindex gnus-select-method
966 @c @head
967 The @code{gnus-select-method} variable says where Gnus should look for
968 news. This variable should be a list where the first element says
969 @dfn{how} and the second element says @dfn{where}. This method is your
970 native method. All groups not fetched with this method are
971 foreign groups.
972
973 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
974 you want to get your daily dosage of news from, you'd say:
975
976 @lisp
977 (setq gnus-select-method '(nntp "news.somewhere.edu"))
978 @end lisp
979
980 If you want to read directly from the local spool, say:
981
982 @lisp
983 (setq gnus-select-method '(nnspool ""))
984 @end lisp
985
986 If you can use a local spool, you probably should, as it will almost
987 certainly be much faster. But do not use the local spool if your
988 server is running Leafnode (which is a simple, standalone private news
989 server); in this case, use @code{(nntp "localhost")}.
990
991 @vindex gnus-nntpserver-file
992 @cindex NNTPSERVER
993 @cindex @acronym{NNTP} server
994 If this variable is not set, Gnus will take a look at the
995 @env{NNTPSERVER} environment variable. If that variable isn't set,
996 Gnus will see whether @code{gnus-nntpserver-file}
997 (@file{/etc/nntpserver} by default) has any opinions on the matter.
998 If that fails as well, Gnus will try to use the machine running Emacs
999 as an @acronym{NNTP} server. That's a long shot, though.
1000
1001 @vindex gnus-nntp-server
1002 If @code{gnus-nntp-server} is set, this variable will override
1003 @code{gnus-select-method}. You should therefore set
1004 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1005
1006 @vindex gnus-secondary-servers
1007 @vindex gnus-nntp-server
1008 You can also make Gnus prompt you interactively for the name of an
1009 @acronym{NNTP} server. If you give a non-numerical prefix to @code{gnus}
1010 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1011 in the @code{gnus-secondary-servers} list (if any). You can also just
1012 type in the name of any server you feel like visiting. (Note that this
1013 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1014 gnus} later in the same Emacs session, Gnus will contact the same
1015 server.)
1016
1017 @findex gnus-group-browse-foreign-server
1018 @kindex B (Group)
1019 However, if you use one @acronym{NNTP} server regularly and are just
1020 interested in a couple of groups from a different server, you would be
1021 better served by using the @kbd{B} command in the group buffer. It will
1022 let you have a look at what groups are available, and you can subscribe
1023 to any of the groups you want to. This also makes @file{.newsrc}
1024 maintenance much tidier. @xref{Foreign Groups}.
1025
1026 @vindex gnus-secondary-select-methods
1027 @c @head
1028 A slightly different approach to foreign groups is to set the
1029 @code{gnus-secondary-select-methods} variable. The select methods
1030 listed in this variable are in many ways just as native as the
1031 @code{gnus-select-method} server. They will also be queried for active
1032 files during startup (if that's required), and new newsgroups that
1033 appear on these servers will be subscribed (or not) just as native
1034 groups are.
1035
1036 For instance, if you use the @code{nnmbox} back end to read your mail,
1037 you would typically set this variable to
1038
1039 @lisp
1040 (setq gnus-secondary-select-methods '((nnmbox "")))
1041 @end lisp
1042
1043
1044 @node The First Time
1045 @section The First Time
1046 @cindex first time usage
1047
1048 If no startup files exist (@pxref{Startup Files}), Gnus will try to
1049 determine what groups should be subscribed by default.
1050
1051 @vindex gnus-default-subscribed-newsgroups
1052 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1053 will subscribe you to just those groups in that list, leaving the rest
1054 killed. Your system administrator should have set this variable to
1055 something useful.
1056
1057 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1058 picked groups (i.e., @samp{*.newusers}). (@dfn{Arbitrary} is defined
1059 here as @dfn{whatever Lars thinks you should read}.)
1060
1061 You'll also be subscribed to the Gnus documentation group, which should
1062 help you with most common problems.
1063
1064 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1065 use the normal functions for handling new groups, and not do anything
1066 special.
1067
1068
1069 @node The Server is Down
1070 @section The Server is Down
1071 @cindex server errors
1072
1073 If the default server is down, Gnus will understandably have some
1074 problems starting. However, if you have some mail groups in addition to
1075 the news groups, you may want to start Gnus anyway.
1076
1077 Gnus, being the trusting sort of program, will ask whether to proceed
1078 without a native select method if that server can't be contacted. This
1079 will happen whether the server doesn't actually exist (i.e., you have
1080 given the wrong address) or the server has just momentarily taken ill
1081 for some reason or other. If you decide to continue and have no foreign
1082 groups, you'll find it difficult to actually do anything in the group
1083 buffer. But, hey, that's your problem. Blllrph!
1084
1085 @findex gnus-no-server
1086 @kindex M-x gnus-no-server
1087 @c @head
1088 If you know that the server is definitely down, or you just want to read
1089 your mail without bothering with the server at all, you can use the
1090 @code{gnus-no-server} command to start Gnus. That might come in handy
1091 if you're in a hurry as well. This command will not attempt to contact
1092 your primary server---instead, it will just activate all groups on level
1093 1 and 2. (You should preferably keep no native groups on those two
1094 levels.) Also @pxref{Group Levels}.
1095
1096
1097 @node Slave Gnusae
1098 @section Slave Gnusae
1099 @cindex slave
1100
1101 You might want to run more than one Emacs with more than one Gnus at the
1102 same time. If you are using different @file{.newsrc} files (e.g., if you
1103 are using the two different Gnusae to read from two different servers),
1104 that is no problem whatsoever. You just do it.
1105
1106 The problem appears when you want to run two Gnusae that use the same
1107 @file{.newsrc} file.
1108
1109 To work around that problem some, we here at the Think-Tank at the Gnus
1110 Towers have come up with a new concept: @dfn{Masters} and
1111 @dfn{slaves}. (We have applied for a patent on this concept, and have
1112 taken out a copyright on those words. If you wish to use those words in
1113 conjunction with each other, you have to send $1 per usage instance to
1114 me. Usage of the patent (@dfn{Master/Slave Relationships In Computer
1115 Applications}) will be much more expensive, of course.)
1116
1117 @findex gnus-slave
1118 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1119 however you do it). Each subsequent slave Gnusae should be started with
1120 @kbd{M-x gnus-slave}. These slaves won't save normal @file{.newsrc}
1121 files, but instead save @dfn{slave files} that contain information only
1122 on what groups have been read in the slave session. When a master Gnus
1123 starts, it will read (and delete) these slave files, incorporating all
1124 information from them. (The slave files will be read in the sequence
1125 they were created, so the latest changes will have precedence.)
1126
1127 Information from the slave files has, of course, precedence over the
1128 information in the normal (i.e., master) @file{.newsrc} file.
1129
1130 If the @file{.newsrc*} files have not been saved in the master when the
1131 slave starts, you may be prompted as to whether to read an auto-save
1132 file. If you answer ``yes'', the unsaved changes to the master will be
1133 incorporated into the slave. If you answer ``no'', the slave may see some
1134 messages as unread that have been read in the master.
1135
1136
1137
1138 @node New Groups
1139 @section New Groups
1140 @cindex new groups
1141 @cindex subscription
1142
1143 @vindex gnus-check-new-newsgroups
1144 If you are satisfied that you really never want to see any new groups,
1145 you can set @code{gnus-check-new-newsgroups} to @code{nil}. This will
1146 also save you some time at startup. Even if this variable is
1147 @code{nil}, you can always subscribe to the new groups just by pressing
1148 @kbd{U} in the group buffer (@pxref{Group Maintenance}). This variable
1149 is @code{ask-server} by default. If you set this variable to
1150 @code{always}, then Gnus will query the back ends for new groups even
1151 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1152
1153 @menu
1154 * Checking New Groups:: Determining what groups are new.
1155 * Subscription Methods:: What Gnus should do with new groups.
1156 * Filtering New Groups:: Making Gnus ignore certain new groups.
1157 @end menu
1158
1159
1160 @node Checking New Groups
1161 @subsection Checking New Groups
1162
1163 Gnus normally determines whether a group is new or not by comparing the
1164 list of groups from the active file(s) with the lists of subscribed and
1165 dead groups. This isn't a particularly fast method. If
1166 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1167 server for new groups since the last time. This is both faster and
1168 cheaper. This also means that you can get rid of the list of killed
1169 groups altogether, so you may set @code{gnus-save-killed-list} to
1170 @code{nil}, which will save time both at startup, at exit, and all over.
1171 Saves disk space, too. Why isn't this the default, then?
1172 Unfortunately, not all servers support this command.
1173
1174 I bet I know what you're thinking now: How do I find out whether my
1175 server supports @code{ask-server}? No? Good, because I don't have a
1176 fail-safe answer. I would suggest just setting this variable to
1177 @code{ask-server} and see whether any new groups appear within the next
1178 few days. If any do, then it works. If none do, then it doesn't
1179 work. I could write a function to make Gnus guess whether the server
1180 supports @code{ask-server}, but it would just be a guess. So I won't.
1181 You could @code{telnet} to the server and say @code{HELP} and see
1182 whether it lists @samp{NEWGROUPS} among the commands it understands. If
1183 it does, then it might work. (But there are servers that lists
1184 @samp{NEWGROUPS} without supporting the function properly.)
1185
1186 This variable can also be a list of select methods. If so, Gnus will
1187 issue an @code{ask-server} command to each of the select methods, and
1188 subscribe them (or not) using the normal methods. This might be handy
1189 if you are monitoring a few servers for new groups. A side effect is
1190 that startup will take much longer, so you can meditate while waiting.
1191 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1192
1193
1194 @node Subscription Methods
1195 @subsection Subscription Methods
1196
1197 @vindex gnus-subscribe-newsgroup-method
1198 What Gnus does when it encounters a new group is determined by the
1199 @code{gnus-subscribe-newsgroup-method} variable.
1200
1201 This variable should contain a function. This function will be called
1202 with the name of the new group as the only parameter.
1203
1204 Some handy pre-fab functions are:
1205
1206 @table @code
1207
1208 @item gnus-subscribe-zombies
1209 @vindex gnus-subscribe-zombies
1210 Make all new groups zombies. This is the default. You can browse the
1211 zombies later (with @kbd{A z}) and either kill them all off properly
1212 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1213
1214 @item gnus-subscribe-randomly
1215 @vindex gnus-subscribe-randomly
1216 Subscribe all new groups in arbitrary order. This really means that all
1217 new groups will be added at ``the top'' of the group buffer.
1218
1219 @item gnus-subscribe-alphabetically
1220 @vindex gnus-subscribe-alphabetically
1221 Subscribe all new groups in alphabetical order.
1222
1223 @item gnus-subscribe-hierarchically
1224 @vindex gnus-subscribe-hierarchically
1225 Subscribe all new groups hierarchically. The difference between this
1226 function and @code{gnus-subscribe-alphabetically} is slight.
1227 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1228 alphabetical fashion, while this function will enter groups into its
1229 hierarchy. So if you want to have the @samp{rec} hierarchy before the
1230 @samp{comp} hierarchy, this function will not mess that configuration
1231 up. Or something like that.
1232
1233 @item gnus-subscribe-interactively
1234 @vindex gnus-subscribe-interactively
1235 Subscribe new groups interactively. This means that Gnus will ask
1236 you about @strong{all} new groups. The groups you choose to subscribe
1237 to will be subscribed hierarchically.
1238
1239 @item gnus-subscribe-killed
1240 @vindex gnus-subscribe-killed
1241 Kill all new groups.
1242
1243 @item gnus-subscribe-topics
1244 @vindex gnus-subscribe-topics
1245 Put the groups into the topic that has a matching @code{subscribe} topic
1246 parameter (@pxref{Topic Parameters}). For instance, a @code{subscribe}
1247 topic parameter that looks like
1248
1249 @example
1250 "nnslashdot"
1251 @end example
1252
1253 will mean that all groups that match that regex will be subscribed under
1254 that topic.
1255
1256 If no topics match the groups, the groups will be subscribed in the
1257 top-level topic.
1258
1259 @end table
1260
1261 @vindex gnus-subscribe-hierarchical-interactive
1262 A closely related variable is
1263 @code{gnus-subscribe-hierarchical-interactive}. (That's quite a
1264 mouthful.) If this variable is non-@code{nil}, Gnus will ask you in a
1265 hierarchical fashion whether to subscribe to new groups or not. Gnus
1266 will ask you for each sub-hierarchy whether you want to descend the
1267 hierarchy or not.
1268
1269 One common mistake is to set the variable a few paragraphs above
1270 (@code{gnus-subscribe-newsgroup-method}) to
1271 @code{gnus-subscribe-hierarchical-interactive}. This is an error. This
1272 will not work. This is ga-ga. So don't do it.
1273
1274
1275 @node Filtering New Groups
1276 @subsection Filtering New Groups
1277
1278 A nice and portable way to control which new newsgroups should be
1279 subscribed (or ignored) is to put an @dfn{options} line at the start of
1280 the @file{.newsrc} file. Here's an example:
1281
1282 @example
1283 options -n !alt.all !rec.all sci.all
1284 @end example
1285
1286 @vindex gnus-subscribe-options-newsgroup-method
1287 This line obviously belongs to a serious-minded intellectual scientific
1288 person (or she may just be plain old boring), because it says that all
1289 groups that have names beginning with @samp{alt} and @samp{rec} should
1290 be ignored, and all groups with names beginning with @samp{sci} should
1291 be subscribed. Gnus will not use the normal subscription method for
1292 subscribing these groups.
1293 @code{gnus-subscribe-options-newsgroup-method} is used instead. This
1294 variable defaults to @code{gnus-subscribe-alphabetically}.
1295
1296 @vindex gnus-options-not-subscribe
1297 @vindex gnus-options-subscribe
1298 If you don't want to mess with your @file{.newsrc} file, you can just
1299 set the two variables @code{gnus-options-subscribe} and
1300 @code{gnus-options-not-subscribe}. These two variables do exactly the
1301 same as the @file{.newsrc} @samp{options -n} trick. Both are regexps,
1302 and if the new group matches the former, it will be unconditionally
1303 subscribed, and if it matches the latter, it will be ignored.
1304
1305 @vindex gnus-auto-subscribed-groups
1306 Yet another variable that meddles here is
1307 @code{gnus-auto-subscribed-groups}. It works exactly like
1308 @code{gnus-options-subscribe}, and is therefore really superfluous,
1309 but I thought it would be nice to have two of these. This variable is
1310 more meant for setting some ground rules, while the other variable is
1311 used more for user fiddling. By default this variable makes all new
1312 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1313 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1314 subscribed. If you don't like that, just set this variable to
1315 @code{nil}.
1316
1317 New groups that match this regexp are subscribed using
1318 @code{gnus-subscribe-options-newsgroup-method}.
1319
1320
1321 @node Changing Servers
1322 @section Changing Servers
1323 @cindex changing servers
1324
1325 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1326 This happens very rarely, but perhaps you change jobs, or one server is
1327 very flaky and you want to use another.
1328
1329 Changing the server is pretty easy, right? You just change
1330 @code{gnus-select-method} to point to the new server?
1331
1332 @emph{Wrong!}
1333
1334 Article numbers are not (in any way) kept synchronized between different
1335 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1336 you have read is by keeping track of article numbers. So when you
1337 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1338 worthless.
1339
1340 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1341 file from one server to another. They all have one thing in
1342 common---they take a looong time to run. You don't want to use these
1343 functions more than absolutely necessary.
1344
1345 @kindex M-x gnus-change-server
1346 @findex gnus-change-server
1347 If you have access to both servers, Gnus can request the headers for all
1348 the articles you have read and compare @code{Message-ID}s and map the
1349 article numbers of the read articles and article marks. The @kbd{M-x
1350 gnus-change-server} command will do this for all your native groups. It
1351 will prompt for the method you want to move to.
1352
1353 @kindex M-x gnus-group-move-group-to-server
1354 @findex gnus-group-move-group-to-server
1355 You can also move individual groups with the @kbd{M-x
1356 gnus-group-move-group-to-server} command. This is useful if you want to
1357 move a (foreign) group from one server to another.
1358
1359 @kindex M-x gnus-group-clear-data-on-native-groups
1360 @findex gnus-group-clear-data-on-native-groups
1361 If you don't have access to both the old and new server, all your marks
1362 and read ranges have become worthless. You can use the @kbd{M-x
1363 gnus-group-clear-data-on-native-groups} command to clear out all data
1364 that you have on your native groups. Use with caution.
1365
1366 @kindex M-x gnus-group-clear-data
1367 @findex gnus-group-clear-data
1368 Clear the data from the current group only---nix out marks and the
1369 list of read articles (@code{gnus-group-clear-data}).
1370
1371 After changing servers, you @strong{must} move the cache hierarchy away,
1372 since the cached articles will have wrong article numbers, which will
1373 affect which articles Gnus thinks are read.
1374 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1375 to have it done automatically; for @code{gnus-group-clear-data}, you
1376 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1377 cache for all groups).
1378
1379
1380 @node Startup Files
1381 @section Startup Files
1382 @cindex startup files
1383 @cindex .newsrc
1384 @cindex .newsrc.el
1385 @cindex .newsrc.eld
1386
1387 Most common Unix news readers use a shared startup file called
1388 @file{.newsrc}. This file contains all the information about what
1389 groups are subscribed, and which articles in these groups have been
1390 read.
1391
1392 Things got a bit more complicated with @sc{gnus}. In addition to
1393 keeping the @file{.newsrc} file updated, it also used a file called
1394 @file{.newsrc.el} for storing all the information that didn't fit into
1395 the @file{.newsrc} file. (Actually, it also duplicated everything in
1396 the @file{.newsrc} file.) @sc{gnus} would read whichever one of these
1397 files was the most recently saved, which enabled people to swap between
1398 @sc{gnus} and other newsreaders.
1399
1400 That was kinda silly, so Gnus went one better: In addition to the
1401 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1402 @file{.newsrc.eld}. It will read whichever of these files that are most
1403 recent, but it will never write a @file{.newsrc.el} file. You should
1404 never delete the @file{.newsrc.eld} file---it contains much information
1405 not stored in the @file{.newsrc} file.
1406
1407 @vindex gnus-save-newsrc-file
1408 @vindex gnus-read-newsrc-file
1409 You can turn off writing the @file{.newsrc} file by setting
1410 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1411 the file and save some space, as well as exiting from Gnus faster.
1412 However, this will make it impossible to use other newsreaders than
1413 Gnus. But hey, who would want to, right? Similarly, setting
1414 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1415 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1416 convenient if you use a different news reader occasionally, and you
1417 want to read a different subset of the available groups with that
1418 news reader.
1419
1420 @vindex gnus-save-killed-list
1421 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1422 will not save the list of killed groups to the startup file. This will
1423 save both time (when starting and quitting) and space (on disk). It
1424 will also mean that Gnus has no record of what groups are new or old,
1425 so the automatic new groups subscription methods become meaningless.
1426 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1427 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1428 Groups}). This variable can also be a regular expression. If that's
1429 the case, remove all groups that do not match this regexp before
1430 saving. This can be useful in certain obscure situations that involve
1431 several servers where not all servers support @code{ask-server}.
1432
1433 @vindex gnus-startup-file
1434 @vindex gnus-backup-startup-file
1435 @vindex version-control
1436 The @code{gnus-startup-file} variable says where the startup files are.
1437 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1438 file being whatever that one is, with a @samp{.eld} appended.
1439 If you want version control for this file, set
1440 @code{gnus-backup-startup-file}. It respects the same values as the
1441 @code{version-control} variable.
1442
1443 @vindex gnus-save-newsrc-hook
1444 @vindex gnus-save-quick-newsrc-hook
1445 @vindex gnus-save-standard-newsrc-hook
1446 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1447 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1448 saving the @file{.newsrc.eld} file, and
1449 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1450 @file{.newsrc} file. The latter two are commonly used to turn version
1451 control on or off. Version control is on by default when saving the
1452 startup files. If you want to turn backup creation off, say something like:
1453
1454 @lisp
1455 (defun turn-off-backup ()
1456 (set (make-local-variable 'backup-inhibited) t))
1457
1458 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1459 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1460 @end lisp
1461
1462 @vindex gnus-init-file
1463 @vindex gnus-site-init-file
1464 When Gnus starts, it will read the @code{gnus-site-init-file}
1465 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1466 (@file{~/.gnus} by default) files. These are normal Emacs Lisp files
1467 and can be used to avoid cluttering your @file{~/.emacs} and
1468 @file{site-init} files with Gnus stuff. Gnus will also check for files
1469 with the same names as these, but with @file{.elc} and @file{.el}
1470 suffixes. In other words, if you have set @code{gnus-init-file} to
1471 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1472 and finally @file{~/.gnus} (in this order). If Emacs was invoked with
1473 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1474 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1475 @code{gnus-init-file}.
1476
1477
1478 @node Auto Save
1479 @section Auto Save
1480 @cindex dribble file
1481 @cindex auto-save
1482
1483 Whenever you do something that changes the Gnus data (reading articles,
1484 catching up, killing/subscribing groups), the change is added to a
1485 special @dfn{dribble buffer}. This buffer is auto-saved the normal
1486 Emacs way. If your Emacs should crash before you have saved the
1487 @file{.newsrc} files, all changes you have made can be recovered from
1488 this file.
1489
1490 If Gnus detects this file at startup, it will ask the user whether to
1491 read it. The auto save file is deleted whenever the real startup file is
1492 saved.
1493
1494 @vindex gnus-use-dribble-file
1495 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1496 maintain a dribble buffer. The default is @code{t}.
1497
1498 @vindex gnus-dribble-directory
1499 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}. If
1500 this variable is @code{nil}, which it is by default, Gnus will dribble
1501 into the directory where the @file{.newsrc} file is located. (This is
1502 normally the user's home directory.) The dribble file will get the same
1503 file permissions as the @file{.newsrc} file.
1504
1505 @vindex gnus-always-read-dribble-file
1506 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1507 read the dribble file on startup without querying the user.
1508
1509
1510 @node The Active File
1511 @section The Active File
1512 @cindex active file
1513 @cindex ignored groups
1514
1515 When Gnus starts, or indeed whenever it tries to determine whether new
1516 articles have arrived, it reads the active file. This is a very large
1517 file that lists all the active groups and articles on the server.
1518
1519 @vindex gnus-ignored-newsgroups
1520 Before examining the active file, Gnus deletes all lines that match the
1521 regexp @code{gnus-ignored-newsgroups}. This is done primarily to reject
1522 any groups with bogus names, but you can use this variable to make Gnus
1523 ignore hierarchies you aren't ever interested in. However, this is not
1524 recommended. In fact, it's highly discouraged. Instead, @pxref{New
1525 Groups} for an overview of other variables that can be used instead.
1526
1527 @c This variable is
1528 @c @code{nil} by default, and will slow down active file handling somewhat
1529 @c if you set it to anything else.
1530
1531 @vindex gnus-read-active-file
1532 @c @head
1533 The active file can be rather Huge, so if you have a slow network, you
1534 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1535 reading the active file. This variable is @code{some} by default.
1536
1537 Gnus will try to make do by getting information just on the groups that
1538 you actually subscribe to.
1539
1540 Note that if you subscribe to lots and lots of groups, setting this
1541 variable to @code{nil} will probably make Gnus slower, not faster. At
1542 present, having this variable @code{nil} will slow Gnus down
1543 considerably, unless you read news over a 2400 baud modem.
1544
1545 This variable can also have the value @code{some}. Gnus will then
1546 attempt to read active info only on the subscribed groups. On some
1547 servers this is quite fast (on sparkling, brand new INN servers that
1548 support the @code{LIST ACTIVE group} command), on others this isn't fast
1549 at all. In any case, @code{some} should be faster than @code{nil}, and
1550 is certainly faster than @code{t} over slow lines.
1551
1552 Some news servers (old versions of Leafnode and old versions of INN, for
1553 instance) do not support the @code{LIST ACTIVE group}. For these
1554 servers, @code{nil} is probably the most efficient value for this
1555 variable.
1556
1557 If this variable is @code{nil}, Gnus will ask for group info in total
1558 lock-step, which isn't very fast. If it is @code{some} and you use an
1559 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1560 read all the replies in one swoop. This will normally result in better
1561 performance, but if the server does not support the aforementioned
1562 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1563
1564 If you think that starting up Gnus takes too long, try all the three
1565 different values for this variable and see what works best for you.
1566
1567 In any case, if you use @code{some} or @code{nil}, you should definitely
1568 kill all groups that you aren't interested in to speed things up.
1569
1570 Note that this variable also affects active file retrieval from
1571 secondary select methods.
1572
1573
1574 @node Startup Variables
1575 @section Startup Variables
1576
1577 @table @code
1578
1579 @item gnus-load-hook
1580 @vindex gnus-load-hook
1581 A hook run while Gnus is being loaded. Note that this hook will
1582 normally be run just once in each Emacs session, no matter how many
1583 times you start Gnus.
1584
1585 @item gnus-before-startup-hook
1586 @vindex gnus-before-startup-hook
1587 A hook run after starting up Gnus successfully.
1588
1589 @item gnus-startup-hook
1590 @vindex gnus-startup-hook
1591 A hook run as the very last thing after starting up Gnus
1592
1593 @item gnus-started-hook
1594 @vindex gnus-started-hook
1595 A hook that is run as the very last thing after starting up Gnus
1596 successfully.
1597
1598 @item gnus-setup-news-hook
1599 @vindex gnus-setup-news-hook
1600 A hook that is run after reading the @file{.newsrc} file(s), but before
1601 generating the group buffer.
1602
1603 @item gnus-check-bogus-newsgroups
1604 @vindex gnus-check-bogus-newsgroups
1605 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1606 startup. A @dfn{bogus group} is a group that you have in your
1607 @file{.newsrc} file, but doesn't exist on the news server. Checking for
1608 bogus groups can take quite a while, so to save time and resources it's
1609 best to leave this option off, and do the checking for bogus groups once
1610 in a while from the group buffer instead (@pxref{Group Maintenance}).
1611
1612 @item gnus-inhibit-startup-message
1613 @vindex gnus-inhibit-startup-message
1614 If non-@code{nil}, the startup message won't be displayed. That way,
1615 your boss might not notice as easily that you are reading news instead
1616 of doing your job. Note that this variable is used before
1617 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1618
1619 @item gnus-no-groups-message
1620 @vindex gnus-no-groups-message
1621 Message displayed by Gnus when no groups are available.
1622
1623 @item gnus-play-startup-jingle
1624 @vindex gnus-play-startup-jingle
1625 If non-@code{nil}, play the Gnus jingle at startup.
1626
1627 @item gnus-startup-jingle
1628 @vindex gnus-startup-jingle
1629 Jingle to be played if the above variable is non-@code{nil}. The
1630 default is @samp{Tuxedomoon.Jingle4.au}.
1631
1632 @end table
1633
1634
1635 @node Group Buffer
1636 @chapter Group Buffer
1637 @cindex group buffer
1638
1639 @c Alex Schroeder suggests to rearrange this as follows:
1640 @c
1641 @c <kensanata> ok, just save it for reference. I'll go to bed in a minute.
1642 @c 1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1643 @c 4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1644 @c 7. Group Score, 8. Group Buffer Format
1645 @c <kensanata> Group Levels should have more information on levels 5 to 9. I
1646 @c suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1647 @c <kensanata> First, "Gnus considers groups... (default 9)."
1648 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1649 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1650 @c <kensanata> Then expand the next paragraph or add some more to it.
1651 @c This short one sentence explains levels 1 and 2, therefore I understand
1652 @c that I should keep important news at 3 and boring news at 4.
1653 @c Say so! Then go on to explain why I should bother with levels 6 to 9.
1654 @c Maybe keep those that you don't want to read temporarily at 6,
1655 @c those that you never want to read at 8, those that offend your
1656 @c human rights at 9...
1657
1658
1659 The @dfn{group buffer} lists all (or parts) of the available groups. It
1660 is the first buffer shown when Gnus starts, and will never be killed as
1661 long as Gnus is active.
1662
1663 @iftex
1664 @iflatex
1665 \gnusfigure{The Group Buffer}{320}{
1666 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1667 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1668 \put(120,38){\vector(1,2){10}}
1669 \put(40,60){\makebox(0,0)[r]{Mode line}}
1670 \put(40,58){\vector(1,0){30}}
1671 \put(200,28){\makebox(0,0)[t]{Native select method}}
1672 \put(200,26){\vector(-1,2){15}}
1673 }
1674 @end iflatex
1675 @end iftex
1676
1677 @menu
1678 * Group Buffer Format:: Information listed and how you can change it.
1679 * Group Maneuvering:: Commands for moving in the group buffer.
1680 * Selecting a Group:: Actually reading news.
1681 * Subscription Commands:: Unsubscribing, killing, subscribing.
1682 * Group Data:: Changing the info for a group.
1683 * Group Levels:: Levels? What are those, then?
1684 * Group Score:: A mechanism for finding out what groups you like.
1685 * Marking Groups:: You can mark groups for later processing.
1686 * Foreign Groups:: Creating and editing groups.
1687 * Group Parameters:: Each group may have different parameters set.
1688 * Listing Groups:: Gnus can list various subsets of the groups.
1689 * Sorting Groups:: Re-arrange the group order.
1690 * Group Maintenance:: Maintaining a tidy @file{.newsrc} file.
1691 * Browse Foreign Server:: You can browse a server. See what it has to offer.
1692 * Exiting Gnus:: Stop reading news and get some work done.
1693 * Group Topics:: A folding group mode divided into topics.
1694 * Misc Group Stuff:: Other stuff that you can to do.
1695 @end menu
1696
1697
1698 @node Group Buffer Format
1699 @section Group Buffer Format
1700
1701 @menu
1702 * Group Line Specification:: Deciding how the group buffer is to look.
1703 * Group Mode Line Specification:: The group buffer mode line.
1704 * Group Highlighting:: Having nice colors in the group buffer.
1705 @end menu
1706
1707
1708 @node Group Line Specification
1709 @subsection Group Line Specification
1710 @cindex group buffer format
1711
1712 The default format of the group buffer is nice and dull, but you can
1713 make it as exciting and ugly as you feel like.
1714
1715 Here's a couple of example group lines:
1716
1717 @example
1718 25: news.announce.newusers
1719 * 0: alt.fan.andrea-dworkin
1720 @end example
1721
1722 Quite simple, huh?
1723
1724 You can see that there are 25 unread articles in
1725 @samp{news.announce.newusers}. There are no unread articles, but some
1726 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1727 asterisk at the beginning of the line?).
1728
1729 @vindex gnus-group-line-format
1730 You can change that format to whatever you want by fiddling with the
1731 @code{gnus-group-line-format} variable. This variable works along the
1732 lines of a @code{format} specification, which is pretty much the same as
1733 a @code{printf} specifications, for those of you who use (feh!) C.
1734 @xref{Formatting Variables}.
1735
1736 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1737
1738 There should always be a colon on the line; the cursor always moves to
1739 the colon after performing an operation. @xref{Positioning
1740 Point}. Nothing else is required---not even the group name. All
1741 displayed text is just window dressing, and is never examined by Gnus.
1742 Gnus stores all real information it needs using text properties.
1743
1744 (Note that if you make a really strange, wonderful, spreadsheet-like
1745 layout, everybody will believe you are hard at work with the accounting
1746 instead of wasting time reading news.)
1747
1748 Here's a list of all available format characters:
1749
1750 @table @samp
1751
1752 @item M
1753 An asterisk if the group only has marked articles.
1754
1755 @item S
1756 Whether the group is subscribed.
1757
1758 @item L
1759 Level of subscribedness.
1760
1761 @item N
1762 Number of unread articles.
1763
1764 @item I
1765 Number of dormant articles.
1766
1767 @item T
1768 Number of ticked articles.
1769
1770 @item R
1771 Number of read articles.
1772
1773 @item U
1774 Number of unseen articles.
1775
1776 @item t
1777 Estimated total number of articles. (This is really @var{max-number}
1778 minus @var{min-number} plus 1.)
1779
1780 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1781 efficient access to @var{max-number} and @var{min-number} but getting
1782 the true unread message count is not possible efficiently. For
1783 hysterical raisins, even the mail back ends, where the true number of
1784 unread messages might be available efficiently, use the same limited
1785 interface. To remove this restriction from Gnus means that the back
1786 end interface has to be changed, which is not an easy job. If you
1787 want to work on this, please contact the Gnus mailing list.
1788
1789 @item y
1790 Number of unread, unticked, non-dormant articles.
1791
1792 @item i
1793 Number of ticked and dormant articles.
1794
1795 @item g
1796 Full group name.
1797
1798 @item G
1799 Group name.
1800
1801 @item C
1802 Group comment (@pxref{Group Parameters}) or group name if there is no
1803 comment element in the group parameters.
1804
1805 @item D
1806 Newsgroup description. You need to read the group descriptions
1807 before these will appear, and to do that, you either have to set
1808 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1809 command.
1810
1811 @item o
1812 @samp{m} if moderated.
1813
1814 @item O
1815 @samp{(m)} if moderated.
1816
1817 @item s
1818 Select method.
1819
1820 @item B
1821 If the summary buffer for the group is open or not.
1822
1823 @item n
1824 Select from where.
1825
1826 @item z
1827 A string that looks like @samp{<%s:%n>} if a foreign select method is
1828 used.
1829
1830 @item P
1831 Indentation based on the level of the topic (@pxref{Group Topics}).
1832
1833 @item c
1834 @vindex gnus-group-uncollapsed-levels
1835 Short (collapsed) group name. The @code{gnus-group-uncollapsed-levels}
1836 variable says how many levels to leave at the end of the group name.
1837 The default is 1---this will mean that group names like
1838 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1839
1840 @item m
1841 @vindex gnus-new-mail-mark
1842 @cindex %
1843 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1844 the group lately.
1845
1846 @item p
1847 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1848
1849 @item d
1850 A string that says when you last read the group (@pxref{Group
1851 Timestamp}).
1852
1853 @item u
1854 User defined specifier. The next character in the format string should
1855 be a letter. Gnus will call the function
1856 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1857 following @samp{%u}. The function will be passed a single dummy
1858 parameter as argument. The function should return a string, which will
1859 be inserted into the buffer just like information from any other
1860 specifier.
1861 @end table
1862
1863 @cindex *
1864 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1865 if no info is available---for instance, if it is a non-activated foreign
1866 group, or a bogus native group.
1867
1868
1869 @node Group Mode Line Specification
1870 @subsection Group Mode Line Specification
1871 @cindex group mode line
1872
1873 @vindex gnus-group-mode-line-format
1874 The mode line can be changed by setting
1875 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}). It
1876 doesn't understand that many format specifiers:
1877
1878 @table @samp
1879 @item S
1880 The native news server.
1881 @item M
1882 The native select method.
1883 @end table
1884
1885
1886 @node Group Highlighting
1887 @subsection Group Highlighting
1888 @cindex highlighting
1889 @cindex group highlighting
1890
1891 @vindex gnus-group-highlight
1892 Highlighting in the group buffer is controlled by the
1893 @code{gnus-group-highlight} variable. This is an alist with elements
1894 that look like @code{(@var{form} . @var{face})}. If @var{form} evaluates to
1895 something non-@code{nil}, the @var{face} will be used on the line.
1896
1897 Here's an example value for this variable that might look nice if the
1898 background is dark:
1899
1900 @lisp
1901 (cond (window-system
1902 (setq custom-background-mode 'light)
1903 (defface my-group-face-1
1904 '((t (:foreground "Red" :bold t))) "First group face")
1905 (defface my-group-face-2
1906 '((t (:foreground "DarkSeaGreen4" :bold t)))
1907 "Second group face")
1908 (defface my-group-face-3
1909 '((t (:foreground "Green4" :bold t))) "Third group face")
1910 (defface my-group-face-4
1911 '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1912 (defface my-group-face-5
1913 '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1914
1915 (setq gnus-group-highlight
1916 '(((> unread 200) . my-group-face-1)
1917 ((and (< level 3) (zerop unread)) . my-group-face-2)
1918 ((< level 3) . my-group-face-3)
1919 ((zerop unread) . my-group-face-4)
1920 (t . my-group-face-5)))
1921 @end lisp
1922
1923 Also @pxref{Faces and Fonts}.
1924
1925 Variables that are dynamically bound when the forms are evaluated
1926 include:
1927
1928 @table @code
1929 @item group
1930 The group name.
1931 @item unread
1932 The number of unread articles in the group.
1933 @item method
1934 The select method.
1935 @item mailp
1936 Whether the group is a mail group.
1937 @item level
1938 The level of the group.
1939 @item score
1940 The score of the group.
1941 @item ticked
1942 The number of ticked articles in the group.
1943 @item total
1944 The total number of articles in the group. Or rather,
1945 @var{max-number} minus @var{min-number} plus one.
1946 @item topic
1947 When using the topic minor mode, this variable is bound to the current
1948 topic being inserted.
1949 @end table
1950
1951 When the forms are @code{eval}ed, point is at the beginning of the line
1952 of the group in question, so you can use many of the normal Gnus
1953 functions for snarfing info on the group.
1954
1955 @vindex gnus-group-update-hook
1956 @findex gnus-group-highlight-line
1957 @code{gnus-group-update-hook} is called when a group line is changed.
1958 It will not be called when @code{gnus-visual} is @code{nil}. This hook
1959 calls @code{gnus-group-highlight-line} by default.
1960
1961
1962 @node Group Maneuvering
1963 @section Group Maneuvering
1964 @cindex group movement
1965
1966 All movement commands understand the numeric prefix and will behave as
1967 expected, hopefully.
1968
1969 @table @kbd
1970
1971 @item n
1972 @kindex n (Group)
1973 @findex gnus-group-next-unread-group
1974 Go to the next group that has unread articles
1975 (@code{gnus-group-next-unread-group}).
1976
1977 @item p
1978 @itemx DEL
1979 @kindex DEL (Group)
1980 @kindex p (Group)
1981 @findex gnus-group-prev-unread-group
1982 Go to the previous group that has unread articles
1983 (@code{gnus-group-prev-unread-group}).
1984
1985 @item N
1986 @kindex N (Group)
1987 @findex gnus-group-next-group
1988 Go to the next group (@code{gnus-group-next-group}).
1989
1990 @item P
1991 @kindex P (Group)
1992 @findex gnus-group-prev-group
1993 Go to the previous group (@code{gnus-group-prev-group}).
1994
1995 @item M-n
1996 @kindex M-n (Group)
1997 @findex gnus-group-next-unread-group-same-level
1998 Go to the next unread group on the same (or lower) level
1999 (@code{gnus-group-next-unread-group-same-level}).
2000
2001 @item M-p
2002 @kindex M-p (Group)
2003 @findex gnus-group-prev-unread-group-same-level
2004 Go to the previous unread group on the same (or lower) level
2005 (@code{gnus-group-prev-unread-group-same-level}).
2006 @end table
2007
2008 Three commands for jumping to groups:
2009
2010 @table @kbd
2011
2012 @item j
2013 @kindex j (Group)
2014 @findex gnus-group-jump-to-group
2015 Jump to a group (and make it visible if it isn't already)
2016 (@code{gnus-group-jump-to-group}). Killed groups can be jumped to, just
2017 like living groups.
2018
2019 @item ,
2020 @kindex , (Group)
2021 @findex gnus-group-best-unread-group
2022 Jump to the unread group with the lowest level
2023 (@code{gnus-group-best-unread-group}).
2024
2025 @item .
2026 @kindex . (Group)
2027 @findex gnus-group-first-unread-group
2028 Jump to the first group with unread articles
2029 (@code{gnus-group-first-unread-group}).
2030 @end table
2031
2032 @vindex gnus-group-goto-unread
2033 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2034 commands will move to the next group, not the next unread group. Even
2035 the commands that say they move to the next unread group. The default
2036 is @code{t}.
2037
2038
2039 @node Selecting a Group
2040 @section Selecting a Group
2041 @cindex group selection
2042
2043 @table @kbd
2044
2045 @item SPACE
2046 @kindex SPACE (Group)
2047 @findex gnus-group-read-group
2048 Select the current group, switch to the summary buffer and display the
2049 first unread article (@code{gnus-group-read-group}). If there are no
2050 unread articles in the group, or if you give a non-numerical prefix to
2051 this command, Gnus will offer to fetch all the old articles in this
2052 group from the server. If you give a numerical prefix @var{n}, @var{n}
2053 determines the number of articles Gnus will fetch. If @var{n} is
2054 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2055 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2056
2057 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2058 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2059 - 4 2 SPC} fetches the 42 oldest ones.
2060
2061 When you are in the group (in the Summary buffer), you can type
2062 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2063 ones.
2064
2065 @item RET
2066 @kindex RET (Group)
2067 @findex gnus-group-select-group
2068 Select the current group and switch to the summary buffer
2069 (@code{gnus-group-select-group}). Takes the same arguments as
2070 @code{gnus-group-read-group}---the only difference is that this command
2071 does not display the first unread article automatically upon group
2072 entry.
2073
2074 @item M-RET
2075 @kindex M-RET (Group)
2076 @findex gnus-group-quick-select-group
2077 This does the same as the command above, but tries to do it with the
2078 minimum amount of fuzz (@code{gnus-group-quick-select-group}). No
2079 scoring/killing will be performed, there will be no highlights and no
2080 expunging. This might be useful if you're in a real hurry and have to
2081 enter some humongous group. If you give a 0 prefix to this command
2082 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2083 which is useful if you want to toggle threading before generating the
2084 summary buffer (@pxref{Summary Generation Commands}).
2085
2086 @item M-SPACE
2087 @kindex M-SPACE (Group)
2088 @findex gnus-group-visible-select-group
2089 This is yet one more command that does the same as the @kbd{RET}
2090 command, but this one does it without expunging and hiding dormants
2091 (@code{gnus-group-visible-select-group}).
2092
2093 @item C-M-RET
2094 @kindex C-M-RET (Group)
2095 @findex gnus-group-select-group-ephemerally
2096 Finally, this command selects the current group ephemerally without
2097 doing any processing of its contents
2098 (@code{gnus-group-select-group-ephemerally}). Even threading has been
2099 turned off. Everything you do in the group after selecting it in this
2100 manner will have no permanent effects.
2101
2102 @end table
2103
2104 @vindex gnus-large-newsgroup
2105 The @code{gnus-large-newsgroup} variable says what Gnus should
2106 consider to be a big group. If it is @code{nil}, no groups are
2107 considered big. The default value is 200. If the group has more
2108 (unread and/or ticked) articles than this, Gnus will query the user
2109 before entering the group. The user can then specify how many
2110 articles should be fetched from the server. If the user specifies a
2111 negative number (@var{-n}), the @var{n} oldest articles will be
2112 fetched. If it is positive, the @var{n} articles that have arrived
2113 most recently will be fetched.
2114
2115 @vindex gnus-large-ephemeral-newsgroup
2116 @code{gnus-large-ephemeral-newsgroup} is the same as
2117 @code{gnus-large-newsgroup}, but is only used for ephemeral
2118 newsgroups.
2119
2120 @vindex gnus-select-group-hook
2121 @vindex gnus-auto-select-first
2122 @vindex gnus-auto-select-subject
2123 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2124 automatically when entering a group with the @kbd{SPACE} command.
2125 Which article this is is controlled by the
2126 @code{gnus-auto-select-subject} variable. Valid values for this
2127 variable is:
2128
2129 @table @code
2130
2131 @item unread
2132 Place point on the subject line of the first unread article.
2133
2134 @item first
2135 Place point on the subject line of the first article.
2136
2137 @item unseen
2138 Place point on the subject line of the first unseen article.
2139
2140 @item unseen-or-unread
2141 Place point on the subject line of the first unseen article, and if
2142 there is no such article, place point on the subject line of the first
2143 unread article.
2144
2145 @item best
2146 Place point on the subject line of the highest-scored unread article.
2147
2148 @end table
2149
2150 This variable can also be a function. In that case, that function
2151 will be called to place point on a subject line.
2152
2153 If you want to prevent automatic selection in some group (say, in a
2154 binary group with Huge articles) you can set the
2155 @code{gnus-auto-select-first} variable to @code{nil} in
2156 @code{gnus-select-group-hook}, which is called when a group is
2157 selected.
2158
2159
2160 @node Subscription Commands
2161 @section Subscription Commands
2162 @cindex subscription
2163
2164 @table @kbd
2165
2166 @item S t
2167 @itemx u
2168 @kindex S t (Group)
2169 @kindex u (Group)
2170 @findex gnus-group-unsubscribe-current-group
2171 @c @icon{gnus-group-unsubscribe}
2172 Toggle subscription to the current group
2173 (@code{gnus-group-unsubscribe-current-group}).
2174
2175 @item S s
2176 @itemx U
2177 @kindex S s (Group)
2178 @kindex U (Group)
2179 @findex gnus-group-unsubscribe-group
2180 Prompt for a group to subscribe, and then subscribe it. If it was
2181 subscribed already, unsubscribe it instead
2182 (@code{gnus-group-unsubscribe-group}).
2183
2184 @item S k
2185 @itemx C-k
2186 @kindex S k (Group)
2187 @kindex C-k (Group)
2188 @findex gnus-group-kill-group
2189 @c @icon{gnus-group-kill-group}
2190 Kill the current group (@code{gnus-group-kill-group}).
2191
2192 @item S y
2193 @itemx C-y
2194 @kindex S y (Group)
2195 @kindex C-y (Group)
2196 @findex gnus-group-yank-group
2197 Yank the last killed group (@code{gnus-group-yank-group}).
2198
2199 @item C-x C-t
2200 @kindex C-x C-t (Group)
2201 @findex gnus-group-transpose-groups
2202 Transpose two groups (@code{gnus-group-transpose-groups}). This isn't
2203 really a subscription command, but you can use it instead of a
2204 kill-and-yank sequence sometimes.
2205
2206 @item S w
2207 @itemx C-w
2208 @kindex S w (Group)
2209 @kindex C-w (Group)
2210 @findex gnus-group-kill-region
2211 Kill all groups in the region (@code{gnus-group-kill-region}).
2212
2213 @item S z
2214 @kindex S z (Group)
2215 @findex gnus-group-kill-all-zombies
2216 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2217
2218 @item S C-k
2219 @kindex S C-k (Group)
2220 @findex gnus-group-kill-level
2221 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2222 These groups can't be yanked back after killing, so this command should
2223 be used with some caution. The only time where this command comes in
2224 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2225 groups that you want to get rid off. @kbd{S C-k} on level 7 will
2226 kill off all unsubscribed groups that do not have message numbers in the
2227 @file{.newsrc} file.
2228
2229 @end table
2230
2231 Also @pxref{Group Levels}.
2232
2233
2234 @node Group Data
2235 @section Group Data
2236
2237 @table @kbd
2238
2239 @item c
2240 @kindex c (Group)
2241 @findex gnus-group-catchup-current
2242 @vindex gnus-group-catchup-group-hook
2243 @c @icon{gnus-group-catchup-current}
2244 Mark all unticked articles in this group as read
2245 (@code{gnus-group-catchup-current}).
2246 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2247 the group buffer.
2248
2249 @item C
2250 @kindex C (Group)
2251 @findex gnus-group-catchup-current-all
2252 Mark all articles in this group, even the ticked ones, as read
2253 (@code{gnus-group-catchup-current-all}).
2254
2255 @item M-c
2256 @kindex M-c (Group)
2257 @findex gnus-group-clear-data
2258 Clear the data from the current group---nix out marks and the list of
2259 read articles (@code{gnus-group-clear-data}).
2260
2261 @item M-x gnus-group-clear-data-on-native-groups
2262 @kindex M-x gnus-group-clear-data-on-native-groups
2263 @findex gnus-group-clear-data-on-native-groups
2264 If you have switched from one @acronym{NNTP} server to another, all your marks
2265 and read ranges have become worthless. You can use this command to
2266 clear out all data that you have on your native groups. Use with
2267 caution.
2268
2269 @end table
2270
2271
2272 @node Group Levels
2273 @section Group Levels
2274 @cindex group level
2275 @cindex level
2276
2277 All groups have a level of @dfn{subscribedness}. For instance, if a
2278 group is on level 2, it is more subscribed than a group on level 5. You
2279 can ask Gnus to just list groups on a given level or lower
2280 (@pxref{Listing Groups}), or to just check for new articles in groups on
2281 a given level or lower (@pxref{Scanning New Messages}).
2282
2283 Remember: The higher the level of the group, the less important it is.
2284
2285 @table @kbd
2286
2287 @item S l
2288 @kindex S l (Group)
2289 @findex gnus-group-set-current-level
2290 Set the level of the current group. If a numeric prefix is given, the
2291 next @var{n} groups will have their levels set. The user will be
2292 prompted for a level.
2293 @end table
2294
2295 @vindex gnus-level-killed
2296 @vindex gnus-level-zombie
2297 @vindex gnus-level-unsubscribed
2298 @vindex gnus-level-subscribed
2299 Gnus considers groups from levels 1 to
2300 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2301 @code{gnus-level-subscribed} (exclusive) and
2302 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2303 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2304 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2305 (default 9). Gnus treats subscribed and unsubscribed groups exactly the
2306 same, but zombie and killed groups have no information on what articles
2307 you have read, etc, stored. This distinction between dead and living
2308 groups isn't done because it is nice or clever, it is done purely for
2309 reasons of efficiency.
2310
2311 It is recommended that you keep all your mail groups (if any) on quite
2312 low levels (e.g. 1 or 2).
2313
2314 Maybe the following description of the default behavior of Gnus helps to
2315 understand what these levels are all about. By default, Gnus shows you
2316 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2317 empty subscribed groups and unsubscribed groups, too. Type @kbd{l} to
2318 go back to showing nonempty subscribed groups again. Thus, unsubscribed
2319 groups are hidden, in a way.
2320
2321 Zombie and killed groups are similar to unsubscribed groups in that they
2322 are hidden by default. But they are different from subscribed and
2323 unsubscribed groups in that Gnus doesn't ask the news server for
2324 information (number of messages, number of unread messages) on zombie
2325 and killed groups. Normally, you use @kbd{C-k} to kill the groups you
2326 aren't interested in. If most groups are killed, Gnus is faster.
2327
2328 Why does Gnus distinguish between zombie and killed groups? Well, when
2329 a new group arrives on the server, Gnus by default makes it a zombie
2330 group. This means that you are normally not bothered with new groups,
2331 but you can type @kbd{A z} to get a list of all new groups. Subscribe
2332 the ones you like and kill the ones you don't want. (@kbd{A k} shows a
2333 list of killed groups.)
2334
2335 If you want to play with the level variables, you should show some care.
2336 Set them once, and don't touch them ever again. Better yet, don't touch
2337 them at all unless you know exactly what you're doing.
2338
2339 @vindex gnus-level-default-unsubscribed
2340 @vindex gnus-level-default-subscribed
2341 Two closely related variables are @code{gnus-level-default-subscribed}
2342 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2343 which are the levels that new groups will be put on if they are
2344 (un)subscribed. These two variables should, of course, be inside the
2345 relevant valid ranges.
2346
2347 @vindex gnus-keep-same-level
2348 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2349 will only move to groups of the same level (or lower). In
2350 particular, going from the last article in one group to the next group
2351 will go to the next group of the same level (or lower). This might be
2352 handy if you want to read the most important groups before you read the
2353 rest.
2354
2355 If this variable is @code{best}, Gnus will make the next newsgroup the
2356 one with the best level.
2357
2358 @vindex gnus-group-default-list-level
2359 All groups with a level less than or equal to
2360 @code{gnus-group-default-list-level} will be listed in the group buffer
2361 by default.
2362
2363 @vindex gnus-group-list-inactive-groups
2364 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2365 groups will be listed along with the unread groups. This variable is
2366 @code{t} by default. If it is @code{nil}, inactive groups won't be
2367 listed.
2368
2369 @vindex gnus-group-use-permanent-levels
2370 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2371 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2372 use this level as the ``work'' level.
2373
2374 @vindex gnus-activate-level
2375 Gnus will normally just activate (i. e., query the server about) groups
2376 on level @code{gnus-activate-level} or less. If you don't want to
2377 activate unsubscribed groups, for instance, you might set this variable
2378 to 5. The default is 6.
2379
2380
2381 @node Group Score
2382 @section Group Score
2383 @cindex group score
2384 @cindex group rank
2385 @cindex rank
2386
2387 You would normally keep important groups on high levels, but that scheme
2388 is somewhat restrictive. Don't you wish you could have Gnus sort the
2389 group buffer according to how often you read groups, perhaps? Within
2390 reason?
2391
2392 This is what @dfn{group score} is for. You can have Gnus assign a score
2393 to each group through the mechanism described below. You can then sort
2394 the group buffer based on this score. Alternatively, you can sort on
2395 score and then level. (Taken together, the level and the score is
2396 called the @dfn{rank} of the group. A group that is on level 4 and has
2397 a score of 1 has a higher rank than a group on level 5 that has a score
2398 of 300. (The level is the most significant part and the score is the
2399 least significant part.))
2400
2401 @findex gnus-summary-bubble-group
2402 If you want groups you read often to get higher scores than groups you
2403 read seldom you can add the @code{gnus-summary-bubble-group} function to
2404 the @code{gnus-summary-exit-hook} hook. This will result (after
2405 sorting) in a bubbling sort of action. If you want to see that in
2406 action after each summary exit, you can add
2407 @code{gnus-group-sort-groups-by-rank} or
2408 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2409 slow things down somewhat.
2410
2411
2412 @node Marking Groups
2413 @section Marking Groups
2414 @cindex marking groups
2415
2416 If you want to perform some command on several groups, and they appear
2417 subsequently in the group buffer, you would normally just give a
2418 numerical prefix to the command. Most group commands will then do your
2419 bidding on those groups.
2420
2421 However, if the groups are not in sequential order, you can still
2422 perform a command on several groups. You simply mark the groups first
2423 with the process mark and then execute the command.
2424
2425 @table @kbd
2426
2427 @item #
2428 @kindex # (Group)
2429 @itemx M m
2430 @kindex M m (Group)
2431 @findex gnus-group-mark-group
2432 Set the mark on the current group (@code{gnus-group-mark-group}).
2433
2434 @item M-#
2435 @kindex M-# (Group)
2436 @itemx M u
2437 @kindex M u (Group)
2438 @findex gnus-group-unmark-group
2439 Remove the mark from the current group
2440 (@code{gnus-group-unmark-group}).
2441
2442 @item M U
2443 @kindex M U (Group)
2444 @findex gnus-group-unmark-all-groups
2445 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2446
2447 @item M w
2448 @kindex M w (Group)
2449 @findex gnus-group-mark-region
2450 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2451
2452 @item M b
2453 @kindex M b (Group)
2454 @findex gnus-group-mark-buffer
2455 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2456
2457 @item M r
2458 @kindex M r (Group)
2459 @findex gnus-group-mark-regexp
2460 Mark all groups that match some regular expression
2461 (@code{gnus-group-mark-regexp}).
2462 @end table
2463
2464 Also @pxref{Process/Prefix}.
2465
2466 @findex gnus-group-universal-argument
2467 If you want to execute some command on all groups that have been marked
2468 with the process mark, you can use the @kbd{M-&}
2469 (@code{gnus-group-universal-argument}) command. It will prompt you for
2470 the command to be executed.
2471
2472
2473 @node Foreign Groups
2474 @section Foreign Groups
2475 @cindex foreign groups
2476
2477 Below are some group mode commands for making and editing general foreign
2478 groups, as well as commands to ease the creation of a few
2479 special-purpose groups. All these commands insert the newly created
2480 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2481 consulted.
2482
2483 @table @kbd
2484
2485 @item G m
2486 @kindex G m (Group)
2487 @findex gnus-group-make-group
2488 @cindex making groups
2489 Make a new group (@code{gnus-group-make-group}). Gnus will prompt you
2490 for a name, a method and possibly an @dfn{address}. For an easier way
2491 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2492
2493 @item G M
2494 @kindex G M (Group)
2495 @findex gnus-group-read-ephemeral-group
2496 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}). Gnus
2497 will prompt you for a name, a method and an @dfn{address}.
2498
2499 @item G r
2500 @kindex G r (Group)
2501 @findex gnus-group-rename-group
2502 @cindex renaming groups
2503 Rename the current group to something else
2504 (@code{gnus-group-rename-group}). This is valid only on some
2505 groups---mail groups mostly. This command might very well be quite slow
2506 on some back ends.
2507
2508 @item G c
2509 @kindex G c (Group)
2510 @cindex customizing
2511 @findex gnus-group-customize
2512 Customize the group parameters (@code{gnus-group-customize}).
2513
2514 @item G e
2515 @kindex G e (Group)
2516 @findex gnus-group-edit-group-method
2517 @cindex renaming groups
2518 Enter a buffer where you can edit the select method of the current
2519 group (@code{gnus-group-edit-group-method}).
2520
2521 @item G p
2522 @kindex G p (Group)
2523 @findex gnus-group-edit-group-parameters
2524 Enter a buffer where you can edit the group parameters
2525 (@code{gnus-group-edit-group-parameters}).
2526
2527 @item G E
2528 @kindex G E (Group)
2529 @findex gnus-group-edit-group
2530 Enter a buffer where you can edit the group info
2531 (@code{gnus-group-edit-group}).
2532
2533 @item G d
2534 @kindex G d (Group)
2535 @findex gnus-group-make-directory-group
2536 @cindex nndir
2537 Make a directory group (@pxref{Directory Groups}). You will be prompted
2538 for a directory name (@code{gnus-group-make-directory-group}).
2539
2540 @item G h
2541 @kindex G h (Group)
2542 @cindex help group
2543 @findex gnus-group-make-help-group
2544 Make the Gnus help group (@code{gnus-group-make-help-group}).
2545
2546 @item G a
2547 @kindex G a (Group)
2548 @cindex (ding) archive
2549 @cindex archive group
2550 @findex gnus-group-make-archive-group
2551 @vindex gnus-group-archive-directory
2552 @vindex gnus-group-recent-archive-directory
2553 Make a Gnus archive group (@code{gnus-group-make-archive-group}). By
2554 default a group pointing to the most recent articles will be created
2555 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2556 group will be created from @code{gnus-group-archive-directory}.
2557
2558 @item G k
2559 @kindex G k (Group)
2560 @findex gnus-group-make-kiboze-group
2561 @cindex nnkiboze
2562 Make a kiboze group. You will be prompted for a name, for a regexp to
2563 match groups to be ``included'' in the kiboze group, and a series of
2564 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2565 @xref{Kibozed Groups}.
2566
2567 @item G D
2568 @kindex G D (Group)
2569 @findex gnus-group-enter-directory
2570 @cindex nneething
2571 Read an arbitrary directory as if it were a newsgroup with the
2572 @code{nneething} back end (@code{gnus-group-enter-directory}).
2573 @xref{Anything Groups}.
2574
2575 @item G f
2576 @kindex G f (Group)
2577 @findex gnus-group-make-doc-group
2578 @cindex ClariNet Briefs
2579 @cindex nndoc
2580 Make a group based on some file or other
2581 (@code{gnus-group-make-doc-group}). If you give a prefix to this
2582 command, you will be prompted for a file name and a file type.
2583 Currently supported types are @code{mbox}, @code{babyl},
2584 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2585 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2586 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2587 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}. If
2588 you run this command without a prefix, Gnus will guess at the file
2589 type. @xref{Document Groups}.
2590
2591 @item G u
2592 @kindex G u (Group)
2593 @vindex gnus-useful-groups
2594 @findex gnus-group-make-useful-group
2595 Create one of the groups mentioned in @code{gnus-useful-groups}
2596 (@code{gnus-group-make-useful-group}).
2597
2598 @item G w
2599 @kindex G w (Group)
2600 @findex gnus-group-make-web-group
2601 @cindex Google
2602 @cindex nnweb
2603 @cindex gmane
2604 Make an ephemeral group based on a web search
2605 (@code{gnus-group-make-web-group}). If you give a prefix to this
2606 command, make a solid group instead. You will be prompted for the
2607 search engine type and the search string. Valid search engine types
2608 include @code{google}, @code{dejanews}, and @code{gmane}.
2609 @xref{Web Searches}.
2610
2611 If you use the @code{google} search engine, you can limit the search
2612 to a particular group by using a match string like
2613 @samp{shaving group:alt.sysadmin.recovery}.
2614
2615 @item G R
2616 @kindex G R (Group)
2617 @findex gnus-group-make-rss-group
2618 Make a group based on an @acronym{RSS} feed
2619 (@code{gnus-group-make-rss-group}). You will be prompted for an URL.
2620 @xref{RSS}.
2621
2622 @item G DEL
2623 @kindex G DEL (Group)
2624 @findex gnus-group-delete-group
2625 This function will delete the current group
2626 (@code{gnus-group-delete-group}). If given a prefix, this function will
2627 actually delete all the articles in the group, and forcibly remove the
2628 group itself from the face of the Earth. Use a prefix only if you are
2629 absolutely sure of what you are doing. This command can't be used on
2630 read-only groups (like @code{nntp} groups), though.
2631
2632 @item G V
2633 @kindex G V (Group)
2634 @findex gnus-group-make-empty-virtual
2635 Make a new, fresh, empty @code{nnvirtual} group
2636 (@code{gnus-group-make-empty-virtual}). @xref{Virtual Groups}.
2637
2638 @item G v
2639 @kindex G v (Group)
2640 @findex gnus-group-add-to-virtual
2641 Add the current group to an @code{nnvirtual} group
2642 (@code{gnus-group-add-to-virtual}). Uses the process/prefix convention.
2643 @end table
2644
2645 @xref{Select Methods}, for more information on the various select
2646 methods.
2647
2648 @vindex gnus-activate-foreign-newsgroups
2649 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2650 Gnus will check all foreign groups with this level or lower at startup.
2651 This might take quite a while, especially if you subscribe to lots of
2652 groups from different @acronym{NNTP} servers. Also @pxref{Group Levels};
2653 @code{gnus-activate-level} also affects activation of foreign
2654 newsgroups.
2655
2656
2657 @node Group Parameters
2658 @section Group Parameters
2659 @cindex group parameters
2660
2661 The group parameters store information local to a particular group.
2662 Here's an example group parameter list:
2663
2664 @example
2665 ((to-address . "ding@@gnus.org")
2666 (auto-expire . t))
2667 @end example
2668
2669 We see that each element consists of a ``dotted pair''---the thing before
2670 the dot is the key, while the thing after the dot is the value. All the
2671 parameters have this form @emph{except} local variable specs, which are
2672 not dotted pairs, but proper lists.
2673
2674 Some parameters have correspondent customizable variables, each of which
2675 is an alist of regexps and values.
2676
2677 The following group parameters can be used:
2678
2679 @table @code
2680 @item to-address
2681 @cindex to-address
2682 Address used by when doing followups and new posts.
2683
2684 @example
2685 (to-address . "some@@where.com")
2686 @end example
2687
2688 This is primarily useful in mail groups that represent closed mailing
2689 lists---mailing lists where it's expected that everybody that writes to
2690 the mailing list is subscribed to it. Since using this parameter
2691 ensures that the mail only goes to the mailing list itself, it means
2692 that members won't receive two copies of your followups.
2693
2694 Using @code{to-address} will actually work whether the group is foreign
2695 or not. Let's say there's a group on the server that is called
2696 @samp{fa.4ad-l}. This is a real newsgroup, but the server has gotten
2697 the articles from a mail-to-news gateway. Posting directly to this
2698 group is therefore impossible---you have to send mail to the mailing
2699 list address instead.
2700
2701 See also @code{gnus-parameter-to-address-alist}.
2702
2703 @item to-list
2704 @cindex to-list
2705 Address used when doing @kbd{a} in that group.
2706
2707 @example
2708 (to-list . "some@@where.com")
2709 @end example
2710
2711 It is totally ignored
2712 when doing a followup---except that if it is present in a news group,
2713 you'll get mail group semantics when doing @kbd{f}.
2714
2715 If you do an @kbd{a} command in a mail group and you have neither a
2716 @code{to-list} group parameter nor a @code{to-address} group parameter,
2717 then a @code{to-list} group parameter will be added automatically upon
2718 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2719 @vindex gnus-add-to-list
2720
2721 @findex gnus-mailing-list-mode
2722 @cindex mail list groups
2723 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2724 entering summary buffer.
2725
2726 See also @code{gnus-parameter-to-list-alist}.
2727
2728 @anchor{subscribed}
2729 @item subscribed
2730 @cindex subscribed
2731 @cindex Mail-Followup-To
2732 @findex gnus-find-subscribed-addresses
2733 If this parameter is set to @code{t}, Gnus will consider the
2734 to-address and to-list parameters for this group as addresses of
2735 mailing lists you are subscribed to. Giving Gnus this information is
2736 (only) a first step in getting it to generate correct Mail-Followup-To
2737 headers for your posts to these lists. The second step is to put the
2738 following in your @file{.gnus.el}
2739
2740 @lisp
2741 (setq message-subscribed-address-functions
2742 '(gnus-find-subscribed-addresses))
2743 @end lisp
2744
2745 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2746 a complete treatment of available MFT support.
2747
2748 @item visible
2749 @cindex visible
2750 If the group parameter list has the element @code{(visible . t)},
2751 that group will always be visible in the Group buffer, regardless
2752 of whether it has any unread articles.
2753
2754 This parameter cannot be set via @code{gnus-parameters}. See
2755 @code{gnus-permanently-visible-groups} as an alternative.
2756
2757 @item broken-reply-to
2758 @cindex broken-reply-to
2759 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2760 headers in this group are to be ignored, and for the header to be hidden
2761 if @code{reply-to} is part of @code{gnus-boring-article-headers}. This
2762 can be useful if you're reading a mailing list group where the listserv
2763 has inserted @code{Reply-To} headers that point back to the listserv
2764 itself. That is broken behavior. So there!
2765
2766 @item to-group
2767 @cindex to-group
2768 Elements like @code{(to-group . "some.group.name")} means that all
2769 posts in that group will be sent to @code{some.group.name}.
2770
2771 @item newsgroup
2772 @cindex newsgroup
2773 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2774 will treat all responses as if they were responses to news articles.
2775 This can be useful if you have a mail group that's really a mirror of a
2776 news group.
2777
2778 @item gcc-self
2779 @cindex gcc-self
2780 If @code{(gcc-self . t)} is present in the group parameter list, newly
2781 composed messages will be @code{Gcc}'d to the current group. If
2782 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2783 generated, if @code{(gcc-self . "string")} is present, this string will
2784 be inserted literally as a @code{gcc} header. This parameter takes
2785 precedence over any default @code{Gcc} rules as described later
2786 (@pxref{Archived Messages}).
2787
2788 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2789 @code{nntp} groups (or the like) isn't valid. An @code{nntp} server
2790 doesn't accept articles.
2791
2792 @item auto-expire
2793 @cindex auto-expire
2794 If the group parameter has an element that looks like @code{(auto-expire
2795 . t)}, all articles read will be marked as expirable. For an
2796 alternative approach, @pxref{Expiring Mail}.
2797
2798 See also @code{gnus-auto-expirable-newsgroups}.
2799
2800 @item total-expire
2801 @cindex total-expire
2802 If the group parameter has an element that looks like
2803 @code{(total-expire . t)}, all read articles will be put through the
2804 expiry process, even if they are not marked as expirable. Use with
2805 caution. Unread, ticked and dormant articles are not eligible for
2806 expiry.
2807
2808 See also @code{gnus-total-expirable-newsgroups}.
2809
2810 @item expiry-wait
2811 @cindex expiry-wait
2812 @vindex nnmail-expiry-wait-function
2813 If the group parameter has an element that looks like
2814 @code{(expiry-wait . 10)}, this value will override any
2815 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2816 (@pxref{Expiring Mail}) when expiring expirable messages. The value
2817 can either be a number of days (not necessarily an integer) or the
2818 symbols @code{never} or @code{immediate}.
2819
2820 @item expiry-target
2821 @cindex expiry-target
2822 Where expired messages end up. This parameter overrides
2823 @code{nnmail-expiry-target}.
2824
2825 @item score-file
2826 @cindex score file group parameter
2827 Elements that look like @code{(score-file . "file")} will make
2828 @file{file} into the current score file for the group in question. All
2829 interactive score entries will be put into this file.
2830
2831 @item adapt-file
2832 @cindex adapt file group parameter
2833 Elements that look like @code{(adapt-file . "file")} will make
2834 @file{file} into the current adaptive file for the group in question.
2835 All adaptive score entries will be put into this file.
2836
2837 @item admin-address
2838 @cindex admin-address
2839 When unsubscribing from a mailing list you should never send the
2840 unsubscription notice to the mailing list itself. Instead, you'd send
2841 messages to the administrative address. This parameter allows you to
2842 put the admin address somewhere convenient.
2843
2844 @item display
2845 @cindex display
2846 Elements that look like @code{(display . MODE)} say which articles to
2847 display on entering the group. Valid values are:
2848
2849 @table @code
2850 @item all
2851 Display all articles, both read and unread.
2852
2853 @item an integer
2854 Display the last @var{integer} articles in the group. This is the same as
2855 entering the group with @kbd{C-u @var{integer}}.
2856
2857 @item default
2858 Display the default visible articles, which normally includes unread and
2859 ticked articles.
2860
2861 @item an array
2862 Display articles that satisfy a predicate.
2863
2864 Here are some examples:
2865
2866 @table @code
2867 @item [unread]
2868 Display only unread articles.
2869
2870 @item [not expire]
2871 Display everything except expirable articles.
2872
2873 @item [and (not reply) (not expire)]
2874 Display everything except expirable and articles you've already
2875 responded to.
2876 @end table
2877
2878 The available operators are @code{not}, @code{and} and @code{or}.
2879 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2880 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2881 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2882 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2883
2884 @end table
2885
2886 The @code{display} parameter works by limiting the summary buffer to
2887 the subset specified. You can pop the limit by using the @kbd{/ w}
2888 command (@pxref{Limiting}).
2889
2890 @item comment
2891 @cindex comment
2892 Elements that look like @code{(comment . "This is a comment")} are
2893 arbitrary comments on the group. You can display comments in the
2894 group line (@pxref{Group Line Specification}).
2895
2896 @item charset
2897 @cindex charset
2898 Elements that look like @code{(charset . iso-8859-1)} will make
2899 @code{iso-8859-1} the default charset; that is, the charset that will be
2900 used for all articles that do not specify a charset.
2901
2902 See also @code{gnus-group-charset-alist}.
2903
2904 @item ignored-charsets
2905 @cindex ignored-charset
2906 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2907 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2908 default charset will be used for decoding articles.
2909
2910 See also @code{gnus-group-ignored-charsets-alist}.
2911
2912 @item posting-style
2913 @cindex posting-style
2914 You can store additional posting style information for this group
2915 here (@pxref{Posting Styles}). The format is that of an entry in the
2916 @code{gnus-posting-styles} alist, except that there's no regexp matching
2917 the group name (of course). Style elements in this group parameter will
2918 take precedence over the ones found in @code{gnus-posting-styles}.
2919
2920 For instance, if you want a funky name and signature in this group only,
2921 instead of hacking @code{gnus-posting-styles}, you could put something
2922 like this in the group parameters:
2923
2924 @example
2925 (posting-style
2926 (name "Funky Name")
2927 ("X-My-Header" "Funky Value")
2928 (signature "Funky Signature"))
2929 @end example
2930
2931 @item post-method
2932 @cindex post-method
2933 If it is set, the value is used as the method for posting message
2934 instead of @code{gnus-post-method}.
2935
2936 @item banner
2937 @cindex banner
2938 An item like @code{(banner . @var{regexp})} causes any part of an article
2939 that matches the regular expression @var{regexp} to be stripped. Instead of
2940 @var{regexp}, you can also use the symbol @code{signature} which strips the
2941 last signature or any of the elements of the alist
2942 @code{gnus-article-banner-alist}.
2943
2944 @item sieve
2945 @cindex sieve
2946 This parameter contains a Sieve test that should match incoming mail
2947 that should be placed in this group. From this group parameter, a
2948 Sieve @samp{IF} control structure is generated, having the test as the
2949 condition and @samp{fileinto "group.name";} as the body.
2950
2951 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
2952 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2953 translating the group parameter into a Sieve script (@pxref{Sieve
2954 Commands}) the following Sieve code is generated:
2955
2956 @example
2957 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2958 fileinto \"INBOX.list.sieve\";
2959 @}
2960 @end example
2961
2962 The Sieve language is described in RFC 3028. @xref{Top, Emacs Sieve,
2963 Top, sieve, Emacs Sieve}.
2964
2965 @item (agent parameters)
2966 If the agent has been enabled, you can set any of the its parameters
2967 to control the behavior of the agent in individual groups. See Agent
2968 Parameters in @ref{Category Syntax}. Most users will choose to set
2969 agent parameters in either an agent category or group topic to
2970 minimize the configuration effort.
2971
2972 @item (@var{variable} @var{form})
2973 You can use the group parameters to set variables local to the group you
2974 are entering. If you want to turn threading off in @samp{news.answers},
2975 you could put @code{(gnus-show-threads nil)} in the group parameters of
2976 that group. @code{gnus-show-threads} will be made into a local variable
2977 in the summary buffer you enter, and the form @code{nil} will be
2978 @code{eval}ed there.
2979
2980 Note that this feature sets the variable locally to the summary buffer.
2981 But some variables are evaluated in the article buffer, or in the
2982 message buffer (of a reply or followup or otherwise newly created
2983 message). As a workaround, it might help to add the variable in
2984 question to @code{gnus-newsgroup-variables}. @xref{Various Summary
2985 Stuff}. So if you want to set @code{message-from-style} via the group
2986 parameters, then you may need the following statement elsewhere in your
2987 @file{~/.gnus} file:
2988
2989 @lisp
2990 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2991 @end lisp
2992
2993 @vindex gnus-list-identifiers
2994 A use for this feature is to remove a mailing list identifier tag in
2995 the subject fields of articles. E.g. if the news group
2996
2997 @example
2998 nntp+news.gnus.org:gmane.text.docbook.apps
2999 @end example
3000
3001 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3002 tag can be removed from the article subjects in the summary buffer for
3003 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3004 into the group parameters for the group.
3005
3006 This can also be used as a group-specific hook function. If you want to
3007 hear a beep when you enter a group, you could put something like
3008 @code{(dummy-variable (ding))} in the parameters of that group.
3009 @code{dummy-variable} will be set to the (meaningless) result of the
3010 @code{(ding)} form.
3011
3012 Alternatively, since the VARIABLE becomes local to the group, this
3013 pattern can be used to temporarily change a hook. For example, if the
3014 following is added to a group parameter
3015
3016 @lisp
3017 (gnus-summary-prepared-hook
3018 '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3019 @end lisp
3020
3021 when the group is entered, the 'd' key will not mark the article as
3022 expired.
3023
3024 @end table
3025
3026 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3027 group. (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3028 presents you with a Customize-like interface. The latter helps avoid
3029 silly Lisp errors.) You might also be interested in reading about topic
3030 parameters (@pxref{Topic Parameters}).
3031
3032 @vindex gnus-parameters
3033 Group parameters can be set via the @code{gnus-parameters} variable too.
3034 But some variables, such as @code{visible}, have no effect (For this
3035 case see @code{gnus-permanently-visible-groups} as an alternative.).
3036 For example:
3037
3038 @lisp
3039 (setq gnus-parameters
3040 '(("mail\\..*"
3041 (gnus-show-threads nil)
3042 (gnus-use-scoring nil)
3043 (gnus-summary-line-format
3044 "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3045 (gcc-self . t)
3046 (display . all))
3047
3048 ("^nnimap:\\(foo.bar\\)$"
3049 (to-group . "\\1"))
3050
3051 ("mail\\.me"
3052 (gnus-use-scoring t))
3053
3054 ("list\\..*"
3055 (total-expire . t)
3056 (broken-reply-to . t))))
3057 @end lisp
3058
3059 String value of parameters will be subjected to regexp substitution, as
3060 the @code{to-group} example shows.
3061
3062 @vindex gnus-parameters-case-fold-search
3063 By default, whether comparing the group name and one of those regexps
3064 specified in @code{gnus-parameters} is done in a case-sensitive manner
3065 or a case-insensitive manner depends on the value of
3066 @code{case-fold-search} at the time when the comparison is done. The
3067 value of @code{case-fold-search} is typically @code{t}; it means, for
3068 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3069 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3070 group. If you want to make those regexps always case-sensitive, set the
3071 value of the @code{gnus-parameters-case-fold-search} variable to
3072 @code{nil}. Otherwise, set it to @code{t} if you want to compare them
3073 always in a case-insensitive manner.
3074
3075
3076 @node Listing Groups
3077 @section Listing Groups
3078 @cindex group listing
3079
3080 These commands all list various slices of the groups available.
3081
3082 @table @kbd
3083
3084 @item l
3085 @itemx A s
3086 @kindex A s (Group)
3087 @kindex l (Group)
3088 @findex gnus-group-list-groups
3089 List all groups that have unread articles
3090 (@code{gnus-group-list-groups}). If the numeric prefix is used, this
3091 command will list only groups of level ARG and lower. By default, it
3092 only lists groups of level five (i.e.,
3093 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3094 groups).
3095
3096 @item L
3097 @itemx A u
3098 @kindex A u (Group)
3099 @kindex L (Group)
3100 @findex gnus-group-list-all-groups
3101 List all groups, whether they have unread articles or not
3102 (@code{gnus-group-list-all-groups}). If the numeric prefix is used,
3103 this command will list only groups of level ARG and lower. By default,
3104 it lists groups of level seven or lower (i.e., just subscribed and
3105 unsubscribed groups).
3106
3107 @item A l
3108 @kindex A l (Group)
3109 @findex gnus-group-list-level
3110 List all unread groups on a specific level
3111 (@code{gnus-group-list-level}). If given a prefix, also list the groups
3112 with no unread articles.
3113
3114 @item A k
3115 @kindex A k (Group)
3116 @findex gnus-group-list-killed
3117 List all killed groups (@code{gnus-group-list-killed}). If given a
3118 prefix argument, really list all groups that are available, but aren't
3119 currently (un)subscribed. This could entail reading the active file
3120 from the server.
3121
3122 @item A z
3123 @kindex A z (Group)
3124 @findex gnus-group-list-zombies
3125 List all zombie groups (@code{gnus-group-list-zombies}).
3126
3127 @item A m
3128 @kindex A m (Group)
3129 @findex gnus-group-list-matching
3130 List all unread, subscribed groups with names that match a regexp
3131 (@code{gnus-group-list-matching}).
3132
3133 @item A M
3134 @kindex A M (Group)
3135 @findex gnus-group-list-all-matching
3136 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3137
3138 @item A A
3139 @kindex A A (Group)
3140 @findex gnus-group-list-active
3141 List absolutely all groups in the active file(s) of the
3142 server(s) you are connected to (@code{gnus-group-list-active}). This
3143 might very well take quite a while. It might actually be a better idea
3144 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3145 thing to match on. Also note that this command may list groups that
3146 don't exist (yet)---these will be listed as if they were killed groups.
3147 Take the output with some grains of salt.
3148
3149 @item A a
3150 @kindex A a (Group)
3151 @findex gnus-group-apropos
3152 List all groups that have names that match a regexp
3153 (@code{gnus-group-apropos}).
3154
3155 @item A d
3156 @kindex A d (Group)
3157 @findex gnus-group-description-apropos
3158 List all groups that have names or descriptions that match a regexp
3159 (@code{gnus-group-description-apropos}).
3160
3161 @item A c
3162 @kindex A c (Group)
3163 @findex gnus-group-list-cached
3164 List all groups with cached articles (@code{gnus-group-list-cached}).
3165
3166 @item A ?
3167 @kindex A ? (Group)
3168 @findex gnus-group-list-dormant
3169 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3170
3171 @item A /
3172 @kindex A / (Group)
3173 @findex gnus-group-list-limit
3174 List groups limited within the current selection
3175 (@code{gnus-group-list-limit}).
3176
3177 @item A f
3178 @kindex A f (Group)
3179 @findex gnus-group-list-flush
3180 Flush groups from the current selection (@code{gnus-group-list-flush}).
3181
3182 @item A p
3183 @kindex A p (Group)
3184 @findex gnus-group-list-plus
3185 List groups plus the current selection (@code{gnus-group-list-plus}).
3186
3187 @end table
3188
3189 @vindex gnus-permanently-visible-groups
3190 @cindex visible group parameter
3191 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3192 always be shown, whether they have unread articles or not. You can also
3193 add the @code{visible} element to the group parameters in question to
3194 get the same effect.
3195
3196 @vindex gnus-list-groups-with-ticked-articles
3197 Groups that have just ticked articles in it are normally listed in the
3198 group buffer. If @code{gnus-list-groups-with-ticked-articles} is
3199 @code{nil}, these groups will be treated just like totally empty
3200 groups. It is @code{t} by default.
3201
3202
3203 @node Sorting Groups
3204 @section Sorting Groups
3205 @cindex sorting groups
3206
3207 @kindex C-c C-s (Group)
3208 @findex gnus-group-sort-groups
3209 @vindex gnus-group-sort-function
3210 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3211 group buffer according to the function(s) given by the
3212 @code{gnus-group-sort-function} variable. Available sorting functions
3213 include:
3214
3215 @table @code
3216
3217 @item gnus-group-sort-by-alphabet
3218 @findex gnus-group-sort-by-alphabet
3219 Sort the group names alphabetically. This is the default.
3220
3221 @item gnus-group-sort-by-real-name
3222 @findex gnus-group-sort-by-real-name
3223 Sort the group alphabetically on the real (unprefixed) group names.
3224
3225 @item gnus-group-sort-by-level
3226 @findex gnus-group-sort-by-level
3227 Sort by group level.
3228
3229 @item gnus-group-sort-by-score
3230 @findex gnus-group-sort-by-score
3231 Sort by group score. @xref{Group Score}.
3232
3233 @item gnus-group-sort-by-rank
3234 @findex gnus-group-sort-by-rank
3235 Sort by group score and then the group level. The level and the score
3236 are, when taken together, the group's @dfn{rank}. @xref{Group Score}.
3237
3238 @item gnus-group-sort-by-unread
3239 @findex gnus-group-sort-by-unread
3240 Sort by number of unread articles.
3241
3242 @item gnus-group-sort-by-method
3243 @findex gnus-group-sort-by-method
3244 Sort alphabetically on the select method.
3245
3246 @item gnus-group-sort-by-server
3247 @findex gnus-group-sort-by-server
3248 Sort alphabetically on the Gnus server name.
3249
3250
3251 @end table
3252
3253 @code{gnus-group-sort-function} can also be a list of sorting
3254 functions. In that case, the most significant sort key function must be
3255 the last one.
3256
3257
3258 There are also a number of commands for sorting directly according to
3259 some sorting criteria:
3260
3261 @table @kbd
3262 @item G S a
3263 @kindex G S a (Group)
3264 @findex gnus-group-sort-groups-by-alphabet
3265 Sort the group buffer alphabetically by group name
3266 (@code{gnus-group-sort-groups-by-alphabet}).
3267
3268 @item G S u
3269 @kindex G S u (Group)
3270 @findex gnus-group-sort-groups-by-unread
3271 Sort the group buffer by the number of unread articles
3272 (@code{gnus-group-sort-groups-by-unread}).
3273
3274 @item G S l
3275 @kindex G S l (Group)
3276 @findex gnus-group-sort-groups-by-level
3277 Sort the group buffer by group level
3278 (@code{gnus-group-sort-groups-by-level}).
3279
3280 @item G S v
3281 @kindex G S v (Group)
3282 @findex gnus-group-sort-groups-by-score
3283 Sort the group buffer by group score
3284 (@code{gnus-group-sort-groups-by-score}). @xref{Group Score}.
3285
3286 @item G S r
3287 @kindex G S r (Group)
3288 @findex gnus-group-sort-groups-by-rank
3289 Sort the group buffer by group rank
3290 (@code{gnus-group-sort-groups-by-rank}). @xref{Group Score}.
3291
3292 @item G S m
3293 @kindex G S m (Group)
3294 @findex gnus-group-sort-groups-by-method
3295 Sort the group buffer alphabetically by back end name@*
3296 (@code{gnus-group-sort-groups-by-method}).
3297
3298 @item G S n
3299 @kindex G S n (Group)
3300 @findex gnus-group-sort-groups-by-real-name
3301 Sort the group buffer alphabetically by real (unprefixed) group name
3302 (@code{gnus-group-sort-groups-by-real-name}).
3303
3304 @end table
3305
3306 All the commands below obey the process/prefix convention
3307 (@pxref{Process/Prefix}).
3308
3309 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3310 commands will sort in reverse order.
3311
3312 You can also sort a subset of the groups:
3313
3314 @table @kbd
3315 @item G P a
3316 @kindex G P a (Group)
3317 @findex gnus-group-sort-selected-groups-by-alphabet
3318 Sort the groups alphabetically by group name
3319 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3320
3321 @item G P u
3322 @kindex G P u (Group)
3323 @findex gnus-group-sort-selected-groups-by-unread
3324 Sort the groups by the number of unread articles
3325 (@code{gnus-group-sort-selected-groups-by-unread}).
3326
3327 @item G P l
3328 @kindex G P l (Group)
3329 @findex gnus-group-sort-selected-groups-by-level
3330 Sort the groups by group level
3331 (@code{gnus-group-sort-selected-groups-by-level}).
3332
3333 @item G P v
3334 @kindex G P v (Group)
3335 @findex gnus-group-sort-selected-groups-by-score
3336 Sort the groups by group score
3337 (@code{gnus-group-sort-selected-groups-by-score}). @xref{Group Score}.
3338
3339 @item G P r
3340 @kindex G P r (Group)
3341 @findex gnus-group-sort-selected-groups-by-rank
3342 Sort the groups by group rank
3343 (@code{gnus-group-sort-selected-groups-by-rank}). @xref{Group Score}.
3344
3345 @item G P m
3346 @kindex G P m (Group)
3347 @findex gnus-group-sort-selected-groups-by-method
3348 Sort the groups alphabetically by back end name@*
3349 (@code{gnus-group-sort-selected-groups-by-method}).
3350
3351 @item G P n
3352 @kindex G P n (Group)
3353 @findex gnus-group-sort-selected-groups-by-real-name
3354 Sort the groups alphabetically by real (unprefixed) group name
3355 (@code{gnus-group-sort-selected-groups-by-real-name}).
3356
3357 @item G P s
3358 @kindex G P s (Group)
3359 @findex gnus-group-sort-selected-groups
3360 Sort the groups according to @code{gnus-group-sort-function}.
3361
3362 @end table
3363
3364 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3365 move groups around.
3366
3367
3368 @node Group Maintenance
3369 @section Group Maintenance
3370 @cindex bogus groups
3371
3372 @table @kbd
3373 @item b
3374 @kindex b (Group)
3375 @findex gnus-group-check-bogus-groups
3376 Find bogus groups and delete them
3377 (@code{gnus-group-check-bogus-groups}).
3378
3379 @item F
3380 @kindex F (Group)
3381 @findex gnus-group-find-new-groups
3382 Find new groups and process them (@code{gnus-group-find-new-groups}).
3383 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3384 for new groups. With 2 @kbd{C-u}'s, use most complete method possible
3385 to query the server for new groups, and subscribe the new groups as
3386 zombies.
3387
3388 @item C-c C-x
3389 @kindex C-c C-x (Group)
3390 @findex gnus-group-expire-articles
3391 Run all expirable articles in the current group through the expiry
3392 process (if any) (@code{gnus-group-expire-articles}). That is, delete
3393 all expirable articles in the group that have been around for a while.
3394 (@pxref{Expiring Mail}).
3395
3396 @item C-c C-M-x
3397 @kindex C-c C-M-x (Group)
3398 @findex gnus-group-expire-all-groups
3399 Run all expirable articles in all groups through the expiry process
3400 (@code{gnus-group-expire-all-groups}).
3401
3402 @end table
3403
3404
3405 @node Browse Foreign Server
3406 @section Browse Foreign Server
3407 @cindex foreign servers
3408 @cindex browsing servers
3409
3410 @table @kbd
3411 @item B
3412 @kindex B (Group)
3413 @findex gnus-group-browse-foreign-server
3414 You will be queried for a select method and a server name. Gnus will
3415 then attempt to contact this server and let you browse the groups there
3416 (@code{gnus-group-browse-foreign-server}).
3417 @end table
3418
3419 @findex gnus-browse-mode
3420 A new buffer with a list of available groups will appear. This buffer
3421 will use the @code{gnus-browse-mode}. This buffer looks a bit (well,
3422 a lot) like a normal group buffer.
3423
3424 Here's a list of keystrokes available in the browse mode:
3425
3426 @table @kbd
3427 @item n
3428 @kindex n (Browse)
3429 @findex gnus-group-next-group
3430 Go to the next group (@code{gnus-group-next-group}).
3431
3432 @item p
3433 @kindex p (Browse)
3434 @findex gnus-group-prev-group
3435 Go to the previous group (@code{gnus-group-prev-group}).
3436
3437 @item SPACE
3438 @kindex SPACE (Browse)
3439 @findex gnus-browse-read-group
3440 Enter the current group and display the first article
3441 (@code{gnus-browse-read-group}).
3442
3443 @item RET
3444 @kindex RET (Browse)
3445 @findex gnus-browse-select-group
3446 Enter the current group (@code{gnus-browse-select-group}).
3447
3448 @item u
3449 @kindex u (Browse)
3450 @findex gnus-browse-unsubscribe-current-group
3451 Unsubscribe to the current group, or, as will be the case here,
3452 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3453
3454 @item l
3455 @itemx q
3456 @kindex q (Browse)
3457 @kindex l (Browse)
3458 @findex gnus-browse-exit
3459 Exit browse mode (@code{gnus-browse-exit}).
3460
3461 @item d
3462 @kindex d (Browse)
3463 @findex gnus-browse-describe-group
3464 Describe the current group (@code{gnus-browse-describe-group}).
3465
3466 @item ?
3467 @kindex ? (Browse)
3468 @findex gnus-browse-describe-briefly
3469 Describe browse mode briefly (well, there's not much to describe, is
3470 there) (@code{gnus-browse-describe-briefly}).
3471 @end table
3472
3473
3474 @node Exiting Gnus
3475 @section Exiting Gnus
3476 @cindex exiting Gnus
3477
3478 Yes, Gnus is ex(c)iting.
3479
3480 @table @kbd
3481 @item z
3482 @kindex z (Group)
3483 @findex gnus-group-suspend
3484 Suspend Gnus (@code{gnus-group-suspend}). This doesn't really exit Gnus,
3485 but it kills all buffers except the Group buffer. I'm not sure why this
3486 is a gain, but then who am I to judge?
3487
3488 @item q
3489 @kindex q (Group)
3490 @findex gnus-group-exit
3491 @c @icon{gnus-group-exit}
3492 Quit Gnus (@code{gnus-group-exit}).
3493
3494 @item Q
3495 @kindex Q (Group)
3496 @findex gnus-group-quit
3497 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3498 The dribble file will be saved, though (@pxref{Auto Save}).
3499 @end table
3500
3501 @vindex gnus-exit-gnus-hook
3502 @vindex gnus-suspend-gnus-hook
3503 @vindex gnus-after-exiting-gnus-hook
3504 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3505 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3506 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3507 exiting Gnus.
3508
3509 Note:
3510
3511 @quotation
3512 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3513 numbly heavy and herself fall into a hazy trance as the boy sitting
3514 behind her drew repeated lines with his pencil across the back of her
3515 plastic chair.
3516 @end quotation
3517
3518
3519 @node Group Topics
3520 @section Group Topics
3521 @cindex topics
3522
3523 If you read lots and lots of groups, it might be convenient to group
3524 them hierarchically according to topics. You put your Emacs groups over
3525 here, your sex groups over there, and the rest (what, two groups or so?)
3526 you put in some misc section that you never bother with anyway. You can
3527 even group the Emacs sex groups as a sub-topic to either the Emacs
3528 groups or the sex groups---or both! Go wild!
3529
3530 @iftex
3531 @iflatex
3532 \gnusfigure{Group Topics}{400}{
3533 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3534 }
3535 @end iflatex
3536 @end iftex
3537
3538 Here's an example:
3539
3540 @example
3541 Gnus
3542 Emacs -- I wuw it!
3543 3: comp.emacs
3544 2: alt.religion.emacs
3545 Naughty Emacs
3546 452: alt.sex.emacs
3547 0: comp.talk.emacs.recovery
3548 Misc
3549 8: comp.binaries.fractals
3550 13: comp.sources.unix
3551 @end example
3552
3553 @findex gnus-topic-mode
3554 @kindex t (Group)
3555 To get this @emph{fab} functionality you simply turn on (ooh!) the
3556 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer. (This
3557 is a toggling command.)
3558
3559 Go ahead, just try it. I'll still be here when you get back. La de
3560 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3561 Yes, and now press @kbd{l}. There. All your groups are now listed
3562 under @samp{misc}. Doesn't that make you feel all warm and fuzzy?
3563 Hot and bothered?
3564
3565 If you want this permanently enabled, you should add that minor mode to
3566 the hook for the group mode. Put the following line in your
3567 @file{~/.gnus.el} file:
3568
3569 @lisp
3570 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3571 @end lisp
3572
3573 @menu
3574 * Topic Commands:: Interactive E-Z commands.
3575 * Topic Variables:: How to customize the topics the Lisp Way.
3576 * Topic Sorting:: Sorting each topic individually.
3577 * Topic Topology:: A map of the world.
3578 * Topic Parameters:: Parameters that apply to all groups in a topic.
3579 @end menu
3580
3581
3582 @node Topic Commands
3583 @subsection Topic Commands
3584 @cindex topic commands
3585
3586 When the topic minor mode is turned on, a new @kbd{T} submap will be
3587 available. In addition, a few of the standard keys change their
3588 definitions slightly.
3589
3590 In general, the following kinds of operations are possible on topics.
3591 First of all, you want to create topics. Secondly, you want to put
3592 groups in topics and to move them around until you have an order you
3593 like. The third kind of operation is to show/hide parts of the whole
3594 shebang. You might want to hide a topic including its subtopics and
3595 groups, to get a better overview of the other groups.
3596
3597 Here is a list of the basic keys that you might need to set up topics
3598 the way you like.
3599
3600 @table @kbd
3601
3602 @item T n
3603 @kindex T n (Topic)
3604 @findex gnus-topic-create-topic
3605 Prompt for a new topic name and create it
3606 (@code{gnus-topic-create-topic}).
3607
3608 @item T TAB
3609 @itemx TAB
3610 @kindex T TAB (Topic)
3611 @kindex TAB (Topic)
3612 @findex gnus-topic-indent
3613 ``Indent'' the current topic so that it becomes a sub-topic of the
3614 previous topic (@code{gnus-topic-indent}). If given a prefix,
3615 ``un-indent'' the topic instead.
3616
3617 @item M-TAB
3618 @kindex M-TAB (Topic)
3619 @findex gnus-topic-unindent
3620 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3621 parent of its current parent (@code{gnus-topic-unindent}).
3622
3623 @end table
3624
3625 The following two keys can be used to move groups and topics around.
3626 They work like the well-known cut and paste. @kbd{C-k} is like cut and
3627 @kbd{C-y} is like paste. Of course, this being Emacs, we use the terms
3628 kill and yank rather than cut and paste.
3629
3630 @table @kbd
3631
3632 @item C-k
3633 @kindex C-k (Topic)
3634 @findex gnus-topic-kill-group
3635 Kill a group or topic (@code{gnus-topic-kill-group}). All groups in the
3636 topic will be removed along with the topic.
3637
3638 @item C-y
3639 @kindex C-y (Topic)
3640 @findex gnus-topic-yank-group
3641 Yank the previously killed group or topic
3642 (@code{gnus-topic-yank-group}). Note that all topics will be yanked
3643 before all groups.
3644
3645 So, to move a topic to the beginning of the list of topics, just hit
3646 @kbd{C-k} on it. This is like the ``cut'' part of cut and paste. Then,
3647 move the cursor to the beginning of the buffer (just below the ``Gnus''
3648 topic) and hit @kbd{C-y}. This is like the ``paste'' part of cut and
3649 paste. Like I said -- E-Z.
3650
3651 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics. So
3652 you can move topics around as well as groups.
3653
3654 @end table
3655
3656 After setting up the topics the way you like them, you might wish to
3657 hide a topic, or to show it again. That's why we have the following
3658 key.
3659
3660 @table @kbd
3661
3662 @item RET
3663 @kindex RET (Topic)
3664 @findex gnus-topic-select-group
3665 @itemx SPACE
3666 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3667 When you perform this command on a group, you'll enter the group, as
3668 usual. When done on a topic line, the topic will be folded (if it was
3669 visible) or unfolded (if it was folded already). So it's basically a
3670 toggling command on topics. In addition, if you give a numerical
3671 prefix, group on that level (and lower) will be displayed.
3672
3673 @end table
3674
3675 Now for a list of other commands, in no particular order.
3676
3677 @table @kbd
3678
3679 @item T m
3680 @kindex T m (Topic)
3681 @findex gnus-topic-move-group
3682 Move the current group to some other topic
3683 (@code{gnus-topic-move-group}). This command uses the process/prefix
3684 convention (@pxref{Process/Prefix}).
3685
3686 @item T j
3687 @kindex T j (Topic)
3688 @findex gnus-topic-jump-to-topic
3689 Go to a topic (@code{gnus-topic-jump-to-topic}).
3690
3691 @item T c
3692 @kindex T c (Topic)
3693 @findex gnus-topic-copy-group
3694 Copy the current group to some other topic
3695 (@code{gnus-topic-copy-group}). This command uses the process/prefix
3696 convention (@pxref{Process/Prefix}).
3697
3698 @item T h
3699 @kindex T h (Topic)
3700 @findex gnus-topic-hide-topic
3701 Hide the current topic (@code{gnus-topic-hide-topic}). If given
3702 a prefix, hide the topic permanently.
3703
3704 @item T s
3705 @kindex T s (Topic)
3706 @findex gnus-topic-show-topic
3707 Show the current topic (@code{gnus-topic-show-topic}). If given
3708 a prefix, show the topic permanently.
3709
3710 @item T D
3711 @kindex T D (Topic)
3712 @findex gnus-topic-remove-group
3713 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3714 This command is mainly useful if you have the same group in several
3715 topics and wish to remove it from one of the topics. You may also
3716 remove a group from all topics, but in that case, Gnus will add it to
3717 the root topic the next time you start Gnus. In fact, all new groups
3718 (which, naturally, don't belong to any topic) will show up in the root
3719 topic.
3720
3721 This command uses the process/prefix convention
3722 (@pxref{Process/Prefix}).
3723
3724 @item T M
3725 @kindex T M (Topic)
3726 @findex gnus-topic-move-matching
3727 Move all groups that match some regular expression to a topic
3728 (@code{gnus-topic-move-matching}).
3729
3730 @item T C
3731 @kindex T C (Topic)
3732 @findex gnus-topic-copy-matching
3733 Copy all groups that match some regular expression to a topic
3734 (@code{gnus-topic-copy-matching}).
3735
3736 @item T H
3737 @kindex T H (Topic)
3738 @findex gnus-topic-toggle-display-empty-topics
3739 Toggle hiding empty topics
3740 (@code{gnus-topic-toggle-display-empty-topics}).
3741
3742 @item T #
3743 @kindex T # (Topic)
3744 @findex gnus-topic-mark-topic
3745 Mark all groups in the current topic with the process mark
3746 (@code{gnus-topic-mark-topic}). This command works recursively on
3747 sub-topics unless given a prefix.
3748
3749 @item T M-#
3750 @kindex T M-# (Topic)
3751 @findex gnus-topic-unmark-topic
3752 Remove the process mark from all groups in the current topic
3753 (@code{gnus-topic-unmark-topic}). This command works recursively on
3754 sub-topics unless given a prefix.
3755
3756 @item C-c C-x
3757 @kindex C-c C-x (Topic)
3758 @findex gnus-topic-expire-articles
3759 Run all expirable articles in the current group or topic through the
3760 expiry process (if any)
3761 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3762
3763 @item T r
3764 @kindex T r (Topic)
3765 @findex gnus-topic-rename
3766 Rename a topic (@code{gnus-topic-rename}).
3767
3768 @item T DEL
3769 @kindex T DEL (Topic)
3770 @findex gnus-topic-delete
3771 Delete an empty topic (@code{gnus-topic-delete}).
3772
3773 @item A T
3774 @kindex A T (Topic)
3775 @findex gnus-topic-list-active
3776 List all groups that Gnus knows about in a topics-ified way
3777 (@code{gnus-topic-list-active}).
3778
3779 @item T M-n
3780 @kindex T M-n (Topic)
3781 @findex gnus-topic-goto-next-topic
3782 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3783
3784 @item T M-p
3785 @kindex T M-p (Topic)
3786 @findex gnus-topic-goto-previous-topic
3787 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3788
3789 @item G p
3790 @kindex G p (Topic)
3791 @findex gnus-topic-edit-parameters
3792 @cindex group parameters
3793 @cindex topic parameters
3794 @cindex parameters
3795 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3796 @xref{Topic Parameters}.
3797
3798 @end table
3799
3800
3801 @node Topic Variables
3802 @subsection Topic Variables
3803 @cindex topic variables
3804
3805 The previous section told you how to tell Gnus which topics to display.
3806 This section explains how to tell Gnus what to display about each topic.
3807
3808 @vindex gnus-topic-line-format
3809 The topic lines themselves are created according to the
3810 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3811 Valid elements are:
3812
3813 @table @samp
3814 @item i
3815 Indentation.
3816 @item n
3817 Topic name.
3818 @item v
3819 Visibility.
3820 @item l
3821 Level.
3822 @item g
3823 Number of groups in the topic.
3824 @item a
3825 Number of unread articles in the topic.
3826 @item A
3827 Number of unread articles in the topic and all its subtopics.
3828 @end table
3829
3830 @vindex gnus-topic-indent-level
3831 Each sub-topic (and the groups in the sub-topics) will be indented with
3832 @code{gnus-topic-indent-level} times the topic level number of spaces.
3833 The default is 2.
3834
3835 @vindex gnus-topic-mode-hook
3836 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3837
3838 @vindex gnus-topic-display-empty-topics
3839 The @code{gnus-topic-display-empty-topics} says whether to display even
3840 topics that have no unread articles in them. The default is @code{t}.
3841
3842
3843 @node Topic Sorting
3844 @subsection Topic Sorting
3845 @cindex topic sorting
3846
3847 You can sort the groups in each topic individually with the following
3848 commands:
3849
3850
3851 @table @kbd
3852 @item T S a
3853 @kindex T S a (Topic)
3854 @findex gnus-topic-sort-groups-by-alphabet
3855 Sort the current topic alphabetically by group name
3856 (@code{gnus-topic-sort-groups-by-alphabet}).
3857
3858 @item T S u
3859 @kindex T S u (Topic)
3860 @findex gnus-topic-sort-groups-by-unread
3861 Sort the current topic by the number of unread articles
3862 (@code{gnus-topic-sort-groups-by-unread}).
3863
3864 @item T S l
3865 @kindex T S l (Topic)
3866 @findex gnus-topic-sort-groups-by-level
3867 Sort the current topic by group level
3868 (@code{gnus-topic-sort-groups-by-level}).
3869
3870 @item T S v
3871 @kindex T S v (Topic)
3872 @findex gnus-topic-sort-groups-by-score
3873 Sort the current topic by group score
3874 (@code{gnus-topic-sort-groups-by-score}). @xref{Group Score}.
3875
3876 @item T S r
3877 @kindex T S r (Topic)
3878 @findex gnus-topic-sort-groups-by-rank
3879 Sort the current topic by group rank
3880 (@code{gnus-topic-sort-groups-by-rank}). @xref{Group Score}.
3881
3882 @item T S m
3883 @kindex T S m (Topic)
3884 @findex gnus-topic-sort-groups-by-method
3885 Sort the current topic alphabetically by back end name
3886 (@code{gnus-topic-sort-groups-by-method}).
3887
3888 @item T S e
3889 @kindex T S e (Topic)
3890 @findex gnus-topic-sort-groups-by-server
3891 Sort the current topic alphabetically by server name
3892 (@code{gnus-topic-sort-groups-by-server}).
3893
3894 @item T S s
3895 @kindex T S s (Topic)
3896 @findex gnus-topic-sort-groups
3897 Sort the current topic according to the function(s) given by the
3898 @code{gnus-group-sort-function} variable
3899 (@code{gnus-topic-sort-groups}).
3900
3901 @end table
3902
3903 When given a prefix argument, all these commands will sort in reverse
3904 order. @xref{Sorting Groups}, for more information about group
3905 sorting.
3906
3907
3908 @node Topic Topology
3909 @subsection Topic Topology
3910 @cindex topic topology
3911 @cindex topology
3912
3913 So, let's have a look at an example group buffer:
3914
3915 @example
3916 @group
3917 Gnus
3918 Emacs -- I wuw it!
3919 3: comp.emacs
3920 2: alt.religion.emacs
3921 Naughty Emacs
3922 452: alt.sex.emacs
3923 0: comp.talk.emacs.recovery
3924 Misc
3925 8: comp.binaries.fractals
3926 13: comp.sources.unix
3927 @end group
3928 @end example
3929
3930 So, here we have one top-level topic (@samp{Gnus}), two topics under
3931 that, and one sub-topic under one of the sub-topics. (There is always
3932 just one (1) top-level topic). This topology can be expressed as
3933 follows:
3934
3935 @lisp
3936 (("Gnus" visible)
3937 (("Emacs -- I wuw it!" visible)
3938 (("Naughty Emacs" visible)))
3939 (("Misc" visible)))
3940 @end lisp
3941
3942 @vindex gnus-topic-topology
3943 This is in fact how the variable @code{gnus-topic-topology} would look
3944 for the display above. That variable is saved in the @file{.newsrc.eld}
3945 file, and shouldn't be messed with manually---unless you really want
3946 to. Since this variable is read from the @file{.newsrc.eld} file,
3947 setting it in any other startup files will have no effect.
3948
3949 This topology shows what topics are sub-topics of what topics (right),
3950 and which topics are visible. Two settings are currently
3951 allowed---@code{visible} and @code{invisible}.
3952
3953
3954 @node Topic Parameters
3955 @subsection Topic Parameters
3956 @cindex topic parameters
3957
3958 All groups in a topic will inherit group parameters from the parent
3959 (and ancestor) topic parameters. All valid group parameters are valid
3960 topic parameters (@pxref{Group Parameters}). When the agent is
3961 enabled, all agent parameters (See Agent Parameters in @ref{Category
3962 Syntax}) are also valid topic parameters.
3963
3964 In addition, the following parameters are only valid as topic
3965 parameters:
3966
3967 @table @code
3968 @item subscribe
3969 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3970 @code{subscribe} topic parameter says what groups go in what topic. Its
3971 value should be a regexp to match the groups that should go in that
3972 topic.
3973
3974 @item subscribe-level
3975 When subscribing new groups by topic (see the @code{subscribe} parameter),
3976 the group will be subscribed with the level specified in the
3977 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3978
3979 @end table
3980
3981 Group parameters (of course) override topic parameters, and topic
3982 parameters in sub-topics override topic parameters in super-topics. You
3983 know. Normal inheritance rules. (@dfn{Rules} is here a noun, not a
3984 verb, although you may feel free to disagree with me here.)
3985
3986 @example
3987 @group
3988 Gnus
3989 Emacs
3990 3: comp.emacs
3991 2: alt.religion.emacs
3992 452: alt.sex.emacs
3993 Relief
3994 452: alt.sex.emacs
3995 0: comp.talk.emacs.recovery
3996 Misc
3997 8: comp.binaries.fractals
3998 13: comp.sources.unix
3999 452: alt.sex.emacs
4000 @end group
4001 @end example
4002
4003 The @samp{Emacs} topic has the topic parameter @code{(score-file
4004 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4005 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4006 topic parameter @code{(score-file . "emacs.SCORE")}. In addition,
4007 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4008 . "religion.SCORE")}.
4009
4010 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4011 will get the @file{relief.SCORE} home score file. If you enter the same
4012 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4013 score file. If you enter the group @samp{alt.religion.emacs}, you'll
4014 get the @file{religion.SCORE} home score file.
4015
4016 This seems rather simple and self-evident, doesn't it? Well, yes. But
4017 there are some problems, especially with the @code{total-expiry}
4018 parameter. Say you have a mail group in two topics; one with
4019 @code{total-expiry} and one without. What happens when you do @kbd{M-x
4020 gnus-expire-all-expirable-groups}? Gnus has no way of telling which one
4021 of these topics you mean to expire articles from, so anything may
4022 happen. In fact, I hereby declare that it is @dfn{undefined} what
4023 happens. You just have to be careful if you do stuff like that.
4024
4025
4026 @node Misc Group Stuff
4027 @section Misc Group Stuff
4028
4029 @menu
4030 * Scanning New Messages:: Asking Gnus to see whether new messages have arrived.
4031 * Group Information:: Information and help on groups and Gnus.
4032 * Group Timestamp:: Making Gnus keep track of when you last read a group.
4033 * File Commands:: Reading and writing the Gnus files.
4034 * Sieve Commands:: Managing Sieve scripts.
4035 @end menu
4036
4037 @table @kbd
4038
4039 @item v
4040 @kindex v (Group)
4041 @cindex keys, reserved for users (Group)
4042 The key @kbd{v} is reserved for users. You can bind it key to some
4043 function or better use it as a prefix key. For example:
4044
4045 @lisp
4046 (define-key gnus-group-mode-map (kbd "v j d")
4047 (lambda ()
4048 (interactive)
4049 (gnus-group-jump-to-group "nndraft:drafts")))
4050 @end lisp
4051
4052 On keys reserved for users in Emacs and on keybindings in general
4053 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
4054
4055 @item ^
4056 @kindex ^ (Group)
4057 @findex gnus-group-enter-server-mode
4058 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4059 @xref{Server Buffer}.
4060
4061 @item a
4062 @kindex a (Group)
4063 @findex gnus-group-post-news
4064 Start composing a message (a news by default)
4065 (@code{gnus-group-post-news}). If given a prefix, post to the group
4066 under the point. If the prefix is 1, prompt for a group to post to.
4067 Contrary to what the name of this function suggests, the prepared
4068 article might be a mail instead of a news, if a mail group is specified
4069 with the prefix argument. @xref{Composing Messages}.
4070
4071 @item m
4072 @kindex m (Group)
4073 @findex gnus-group-mail
4074 Mail a message somewhere (@code{gnus-group-mail}). If given a prefix,
4075 use the posting style of the group under the point. If the prefix is 1,
4076 prompt for a group name to find the posting style.
4077 @xref{Composing Messages}.
4078
4079 @item i
4080 @kindex i (Group)
4081 @findex gnus-group-news
4082 Start composing a news (@code{gnus-group-news}). If given a prefix,
4083 post to the group under the point. If the prefix is 1, prompt
4084 for group to post to. @xref{Composing Messages}.
4085
4086 This function actually prepares a news even when using mail groups.
4087 This is useful for ``posting'' messages to mail groups without actually
4088 sending them over the network: they're just saved directly to the group
4089 in question. The corresponding back end must have a request-post method
4090 for this to work though.
4091
4092 @end table
4093
4094 Variables for the group buffer:
4095
4096 @table @code
4097
4098 @item gnus-group-mode-hook
4099 @vindex gnus-group-mode-hook
4100 is called after the group buffer has been
4101 created.
4102
4103 @item gnus-group-prepare-hook
4104 @vindex gnus-group-prepare-hook
4105 is called after the group buffer is
4106 generated. It may be used to modify the buffer in some strange,
4107 unnatural way.
4108
4109 @item gnus-group-prepared-hook
4110 @vindex gnus-group-prepare-hook
4111 is called as the very last thing after the group buffer has been
4112 generated. It may be used to move point around, for instance.
4113
4114 @item gnus-permanently-visible-groups
4115 @vindex gnus-permanently-visible-groups
4116 Groups matching this regexp will always be listed in the group buffer,
4117 whether they are empty or not.
4118
4119 @item gnus-group-name-charset-method-alist
4120 @vindex gnus-group-name-charset-method-alist
4121 An alist of method and the charset for group names. It is used to show
4122 non-@acronym{ASCII} group names.
4123
4124 For example:
4125 @lisp
4126 (setq gnus-group-name-charset-method-alist
4127 '(((nntp "news.com.cn") . cn-gb-2312)))
4128 @end lisp
4129
4130 @item gnus-group-name-charset-group-alist
4131 @cindex UTF-8 group names
4132 @vindex gnus-group-name-charset-group-alist
4133 An alist of regexp of group name and the charset for group names. It
4134 is used to show non-@acronym{ASCII} group names. @code{((".*"
4135 utf-8))} is the default value if UTF-8 is supported, otherwise the
4136 default is @code{nil}.
4137
4138 For example:
4139 @lisp
4140 (setq gnus-group-name-charset-group-alist
4141 '(("\\.com\\.cn:" . cn-gb-2312)))
4142 @end lisp
4143
4144 @end table
4145
4146 @node Scanning New Messages
4147 @subsection Scanning New Messages
4148 @cindex new messages
4149 @cindex scanning new news
4150
4151 @table @kbd
4152
4153 @item g
4154 @kindex g (Group)
4155 @findex gnus-group-get-new-news
4156 @c @icon{gnus-group-get-new-news}
4157 Check the server(s) for new articles. If the numerical prefix is used,
4158 this command will check only groups of level @var{arg} and lower
4159 (@code{gnus-group-get-new-news}). If given a non-numerical prefix, this
4160 command will force a total re-reading of the active file(s) from the
4161 back end(s).
4162
4163 @item M-g
4164 @kindex M-g (Group)
4165 @findex gnus-group-get-new-news-this-group
4166 @vindex gnus-goto-next-group-when-activating
4167 @c @icon{gnus-group-get-new-news-this-group}
4168 Check whether new articles have arrived in the current group
4169 (@code{gnus-group-get-new-news-this-group}).
4170 @code{gnus-goto-next-group-when-activating} says whether this command is
4171 to move point to the next group or not. It is @code{t} by default.
4172
4173 @findex gnus-activate-all-groups
4174 @cindex activating groups
4175 @item C-c M-g
4176 @kindex C-c M-g (Group)
4177 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4178
4179 @item R
4180 @kindex R (Group)
4181 @cindex restarting
4182 @findex gnus-group-restart
4183 Restart Gnus (@code{gnus-group-restart}). This saves the @file{.newsrc}
4184 file(s), closes the connection to all servers, clears up all run-time
4185 Gnus variables, and then starts Gnus all over again.
4186
4187 @end table
4188
4189 @vindex gnus-get-new-news-hook
4190 @code{gnus-get-new-news-hook} is run just before checking for new news.
4191
4192 @vindex gnus-after-getting-new-news-hook
4193 @code{gnus-after-getting-new-news-hook} is run after checking for new
4194 news.
4195
4196
4197 @node Group Information
4198 @subsection Group Information
4199 @cindex group information
4200 @cindex information on groups
4201
4202 @table @kbd
4203
4204
4205 @item H f
4206 @kindex H f (Group)
4207 @findex gnus-group-fetch-faq
4208 @vindex gnus-group-faq-directory
4209 @cindex FAQ
4210 @cindex ange-ftp
4211 Try to fetch the @acronym{FAQ} for the current group
4212 (@code{gnus-group-fetch-faq}). Gnus will try to get the @acronym{FAQ}
4213 from @code{gnus-group-faq-directory}, which is usually a directory on
4214 a remote machine. This variable can also be a list of directories.
4215 In that case, giving a prefix to this command will allow you to choose
4216 between the various sites. @code{ange-ftp} (or @code{efs}) will be
4217 used for fetching the file.
4218
4219 If fetching from the first site is unsuccessful, Gnus will attempt to go
4220 through @code{gnus-group-faq-directory} and try to open them one by one.
4221
4222 @item H c
4223 @kindex H c (Group)
4224 @findex gnus-group-fetch-charter
4225 @vindex gnus-group-charter-alist
4226 @cindex charter
4227 Try to open the charter for the current group in a web browser
4228 (@code{gnus-group-fetch-charter}). Query for a group if given a
4229 prefix argument.
4230
4231 Gnus will use @code{gnus-group-charter-alist} to find the location of
4232 the charter. If no location is known, Gnus will fetch the control
4233 messages for the group, which in some cases includes the charter.
4234
4235 @item H C
4236 @kindex H C (Group)
4237 @findex gnus-group-fetch-control
4238 @vindex gnus-group-fetch-control-use-browse-url
4239 @cindex control message
4240 Fetch the control messages for the group from the archive at
4241 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4242 group if given a prefix argument.
4243
4244 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4245 Gnus will open the control messages in a browser using
4246 @code{browse-url}. Otherwise they are fetched using @code{ange-ftp}
4247 and displayed in an ephemeral group.
4248
4249 Note that the control messages are compressed. To use this command
4250 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4251 Files, ,Compressed Files, emacs, The Emacs Manual}).
4252
4253 @item H d
4254 @itemx C-c C-d
4255 @c @icon{gnus-group-describe-group}
4256 @kindex H d (Group)
4257 @kindex C-c C-d (Group)
4258 @cindex describing groups
4259 @cindex group description
4260 @findex gnus-group-describe-group
4261 Describe the current group (@code{gnus-group-describe-group}). If given
4262 a prefix, force Gnus to re-read the description from the server.
4263
4264 @item M-d
4265 @kindex M-d (Group)
4266 @findex gnus-group-describe-all-groups
4267 Describe all groups (@code{gnus-group-describe-all-groups}). If given a
4268 prefix, force Gnus to re-read the description file from the server.
4269
4270 @item H v
4271 @itemx V
4272 @kindex V (Group)
4273 @kindex H v (Group)
4274 @cindex version
4275 @findex gnus-version
4276 Display current Gnus version numbers (@code{gnus-version}).
4277
4278 @item ?
4279 @kindex ? (Group)
4280 @findex gnus-group-describe-briefly
4281 Give a very short help message (@code{gnus-group-describe-briefly}).
4282
4283 @item C-c C-i
4284 @kindex C-c C-i (Group)
4285 @cindex info
4286 @cindex manual
4287 @findex gnus-info-find-node
4288 Go to the Gnus info node (@code{gnus-info-find-node}).
4289 @end table
4290
4291
4292 @node Group Timestamp
4293 @subsection Group Timestamp
4294 @cindex timestamps
4295 @cindex group timestamps
4296
4297 It can be convenient to let Gnus keep track of when you last read a
4298 group. To set the ball rolling, you should add
4299 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4300
4301 @lisp
4302 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4303 @end lisp
4304
4305 After doing this, each time you enter a group, it'll be recorded.
4306
4307 This information can be displayed in various ways---the easiest is to
4308 use the @samp{%d} spec in the group line format:
4309
4310 @lisp
4311 (setq gnus-group-line-format
4312 "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4313 @end lisp
4314
4315 This will result in lines looking like:
4316
4317 @example
4318 * 0: mail.ding 19961002T012943
4319 0: custom 19961002T012713
4320 @end example
4321
4322 As you can see, the date is displayed in compact ISO 8601 format. This
4323 may be a bit too much, so to just display the date, you could say
4324 something like:
4325
4326 @lisp
4327 (setq gnus-group-line-format
4328 "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4329 @end lisp
4330
4331 If you would like greater control of the time format, you can use a
4332 user-defined format spec. Something like the following should do the
4333 trick:
4334
4335 @lisp
4336 (setq gnus-group-line-format
4337 "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4338 (defun gnus-user-format-function-d (headers)
4339 (let ((time (gnus-group-timestamp gnus-tmp-group)))
4340 (if time
4341 (format-time-string "%b %d %H:%M" time)
4342 "")))
4343 @end lisp
4344
4345
4346 @node File Commands
4347 @subsection File Commands
4348 @cindex file commands
4349
4350 @table @kbd
4351
4352 @item r
4353 @kindex r (Group)
4354 @findex gnus-group-read-init-file
4355 @vindex gnus-init-file
4356 @cindex reading init file
4357 Re-read the init file (@code{gnus-init-file}, which defaults to
4358 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4359
4360 @item s
4361 @kindex s (Group)
4362 @findex gnus-group-save-newsrc
4363 @cindex saving .newsrc
4364 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4365 (@code{gnus-group-save-newsrc}). If given a prefix, force saving the
4366 file(s) whether Gnus thinks it is necessary or not.
4367
4368 @c @item Z
4369 @c @kindex Z (Group)
4370 @c @findex gnus-group-clear-dribble
4371 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4372
4373 @end table
4374
4375
4376 @node Sieve Commands
4377 @subsection Sieve Commands
4378 @cindex group sieve commands
4379
4380 Sieve is a server-side mail filtering language. In Gnus you can use
4381 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4382 sieve rules that should apply to each group. Gnus provides two
4383 commands to translate all these group parameters into a proper Sieve
4384 script that can be transfered to the server somehow.
4385
4386 @vindex gnus-sieve-file
4387 @vindex gnus-sieve-region-start
4388 @vindex gnus-sieve-region-end
4389 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4390 default @file{~/.sieve}). The Sieve code that Gnus generate is placed
4391 between two delimiters, @code{gnus-sieve-region-start} and
4392 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4393 outside these delimiters that will not be removed the next time you
4394 regenerate the Sieve script.
4395
4396 @vindex gnus-sieve-crosspost
4397 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4398 is generated. If it is non-@code{nil} (the default) articles is
4399 placed in all groups that have matching rules, otherwise the article
4400 is only placed in the group with the first matching rule. For
4401 example, the group parameter @samp{(sieve address "sender"
4402 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4403 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4404 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4405 except that the line containing the call to @code{stop} is removed.)
4406
4407 @example
4408 if address "sender" "owner-ding@@hpc.uh.edu" @{
4409 fileinto "INBOX.ding";
4410 stop;
4411 @}
4412 @end example
4413
4414 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4415
4416 @table @kbd
4417
4418 @item D g
4419 @kindex D g (Group)
4420 @findex gnus-sieve-generate
4421 @vindex gnus-sieve-file
4422 @cindex generating sieve script
4423 Regenerate a Sieve script from the @code{sieve} group parameters and
4424 put you into the @code{gnus-sieve-file} without saving it.
4425
4426 @item D u
4427 @kindex D u (Group)
4428 @findex gnus-sieve-update
4429 @vindex gnus-sieve-file
4430 @cindex updating sieve script
4431 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4432 @code{sieve} group parameters, save the file and upload it to the
4433 server using the @code{sieveshell} program.
4434
4435 @end table
4436
4437
4438 @node Summary Buffer
4439 @chapter Summary Buffer
4440 @cindex summary buffer
4441
4442 A line for each article is displayed in the summary buffer. You can
4443 move around, read articles, post articles and reply to articles.
4444
4445 The most common way to a summary buffer is to select a group from the
4446 group buffer (@pxref{Selecting a Group}).
4447
4448 You can have as many summary buffers open as you wish.
4449
4450 @kindex v (Summary)
4451 @cindex keys, reserved for users (Summary)
4452 The key @kbd{v} is reserved for users. You can bind it key to some
4453 function or better use it as a prefix key. For example:
4454 @lisp
4455 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
4456 @end lisp
4457
4458 @menu
4459 * Summary Buffer Format:: Deciding how the summary buffer is to look.
4460 * Summary Maneuvering:: Moving around the summary buffer.
4461 * Choosing Articles:: Reading articles.
4462 * Paging the Article:: Scrolling the current article.
4463 * Reply Followup and Post:: Posting articles.
4464 * Delayed Articles:: Send articles at a later time.
4465 * Marking Articles:: Marking articles as read, expirable, etc.
4466 * Limiting:: You can limit the summary buffer.
4467 * Threading:: How threads are made.
4468 * Sorting the Summary Buffer:: How articles and threads are sorted.
4469 * Asynchronous Fetching:: Gnus might be able to pre-fetch articles.
4470 * Article Caching:: You may store articles in a cache.
4471 * Persistent Articles:: Making articles expiry-resistant.
4472 * Article Backlog:: Having already read articles hang around.
4473 * Saving Articles:: Ways of customizing article saving.
4474 * Decoding Articles:: Gnus can treat series of (uu)encoded articles.
4475 * Article Treatment:: The article buffer can be mangled at will.
4476 * MIME Commands:: Doing MIMEy things with the articles.
4477 * Charsets:: Character set issues.
4478 * Article Commands:: Doing various things with the article buffer.
4479 * Summary Sorting:: Sorting the summary buffer in various ways.
4480 * Finding the Parent:: No child support? Get the parent.
4481 * Alternative Approaches:: Reading using non-default summaries.
4482 * Tree Display:: A more visual display of threads.
4483 * Mail Group Commands:: Some commands can only be used in mail groups.
4484 * Various Summary Stuff:: What didn't fit anywhere else.
4485 * Exiting the Summary Buffer:: Returning to the Group buffer,
4486 or reselecting the current group.
4487 * Crosspost Handling:: How crossposted articles are dealt with.
4488 * Duplicate Suppression:: An alternative when crosspost handling fails.
4489 * Security:: Decrypt and Verify.
4490 * Mailing List:: Mailing list minor mode.
4491 @end menu
4492
4493
4494 @node Summary Buffer Format
4495 @section Summary Buffer Format
4496 @cindex summary buffer format
4497
4498 @iftex
4499 @iflatex
4500 \gnusfigure{The Summary Buffer}{180}{
4501 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4502 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4503 }
4504 @end iflatex
4505 @end iftex
4506
4507 @menu
4508 * Summary Buffer Lines:: You can specify how summary lines should look.
4509 * To From Newsgroups:: How to not display your own name.
4510 * Summary Buffer Mode Line:: You can say how the mode line should look.
4511 * Summary Highlighting:: Making the summary buffer all pretty and nice.
4512 @end menu
4513
4514 @findex mail-extract-address-components
4515 @findex gnus-extract-address-components
4516 @vindex gnus-extract-address-components
4517 Gnus will use the value of the @code{gnus-extract-address-components}
4518 variable as a function for getting the name and address parts of a
4519 @code{From} header. Two pre-defined functions exist:
4520 @code{gnus-extract-address-components}, which is the default, quite
4521 fast, and too simplistic solution; and
4522 @code{mail-extract-address-components}, which works very nicely, but is
4523 slower. The default function will return the wrong answer in 5% of the
4524 cases. If this is unacceptable to you, use the other function instead:
4525
4526 @lisp
4527 (setq gnus-extract-address-components
4528 'mail-extract-address-components)
4529 @end lisp
4530
4531 @vindex gnus-summary-same-subject
4532 @code{gnus-summary-same-subject} is a string indicating that the current
4533 article has the same subject as the previous. This string will be used
4534 with those specs that require it. The default is @code{""}.
4535
4536
4537 @node Summary Buffer Lines
4538 @subsection Summary Buffer Lines
4539
4540 @vindex gnus-summary-line-format
4541 You can change the format of the lines in the summary buffer by changing
4542 the @code{gnus-summary-line-format} variable. It works along the same
4543 lines as a normal @code{format} string, with some extensions
4544 (@pxref{Formatting Variables}).
4545
4546 There should always be a colon or a point position marker on the line;
4547 the cursor always moves to the point position marker or the colon after
4548 performing an operation. (Of course, Gnus wouldn't be Gnus if it wasn't
4549 possible to change this. Just write a new function
4550 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4551 @xref{Positioning Point}.
4552
4553 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4554
4555 The following format specification characters and extended format
4556 specification(s) are understood:
4557
4558 @table @samp
4559 @item N
4560 Article number.
4561 @item S
4562 Subject string. List identifiers stripped,
4563 @code{gnus-list-identifies}. @xref{Article Hiding}.
4564 @item s
4565 Subject if the article is the root of the thread or the previous article
4566 had a different subject, @code{gnus-summary-same-subject} otherwise.
4567 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4568 @item F
4569 Full @code{From} header.
4570 @item n
4571 The name (from the @code{From} header).
4572 @item f
4573 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4574 From Newsgroups}).
4575 @item a
4576 The name (from the @code{From} header). This differs from the @code{n}
4577 spec in that it uses the function designated by the
4578 @code{gnus-extract-address-components} variable, which is slower, but
4579 may be more thorough.
4580 @item A
4581 The address (from the @code{From} header). This works the same way as
4582 the @code{a} spec.
4583 @item L
4584 Number of lines in the article.
4585 @item c
4586 Number of characters in the article. This specifier is not supported
4587 in some methods (like nnfolder).
4588 @item k
4589 Pretty-printed version of the number of characters in the article;
4590 for example, @samp{1.2k} or @samp{0.4M}.
4591 @item I
4592 Indentation based on thread level (@pxref{Customizing Threading}).
4593 @item B
4594 A complex trn-style thread tree, showing response-connecting trace
4595 lines. A thread could be drawn like this:
4596
4597 @example
4598 >
4599 +->
4600 | +->
4601 | | \->
4602 | | \->
4603 | \->
4604 +->
4605 \->
4606 @end example
4607
4608 You can customize the appearance with the following options. Note
4609 that it is possible to make the thread display look really neat by
4610 replacing the default @acronym{ASCII} characters with graphic
4611 line-drawing glyphs.
4612 @table @code
4613 @item gnus-sum-thread-tree-root
4614 @vindex gnus-sum-thread-tree-root
4615 Used for the root of a thread. If @code{nil}, use subject
4616 instead. The default is @samp{> }.
4617
4618 @item gnus-sum-thread-tree-false-root
4619 @vindex gnus-sum-thread-tree-false-root
4620 Used for the false root of a thread (@pxref{Loose Threads}). If
4621 @code{nil}, use subject instead. The default is @samp{> }.
4622
4623 @item gnus-sum-thread-tree-single-indent
4624 @vindex gnus-sum-thread-tree-single-indent
4625 Used for a thread with just one message. If @code{nil}, use subject
4626 instead. The default is @samp{}.
4627
4628 @item gnus-sum-thread-tree-vertical
4629 @vindex gnus-sum-thread-tree-vertical
4630 Used for drawing a vertical line. The default is @samp{| }.
4631
4632 @item gnus-sum-thread-tree-indent
4633 @vindex gnus-sum-thread-tree-indent
4634 Used for indenting. The default is @samp{ }.
4635
4636 @item gnus-sum-thread-tree-leaf-with-other
4637 @vindex gnus-sum-thread-tree-leaf-with-other
4638 Used for a leaf with brothers. The default is @samp{+-> }.
4639
4640 @item gnus-sum-thread-tree-single-leaf
4641 @vindex gnus-sum-thread-tree-single-leaf
4642 Used for a leaf without brothers. The default is @samp{\-> }
4643
4644 @end table
4645
4646 @item T
4647 Nothing if the article is a root and lots of spaces if it isn't (it
4648 pushes everything after it off the screen).
4649 @item [
4650 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4651 for adopted articles (@pxref{Customizing Threading}).
4652 @item ]
4653 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4654 for adopted articles.
4655 @item >
4656 One space for each thread level.
4657 @item <
4658 Twenty minus thread level spaces.
4659 @item U
4660 Unread. @xref{Read Articles}.
4661
4662 @item R
4663 This misleadingly named specifier is the @dfn{secondary mark}. This
4664 mark will say whether the article has been replied to, has been cached,
4665 or has been saved. @xref{Other Marks}.
4666
4667 @item i
4668 Score as a number (@pxref{Scoring}).
4669 @item z
4670 @vindex gnus-summary-zcore-fuzz
4671 Zcore, @samp{+} if above the default level and @samp{-} if below the
4672 default level. If the difference between
4673 @code{gnus-summary-default-score} and the score is less than
4674 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4675 @item V
4676 Total thread score.
4677 @item x
4678 @code{Xref}.
4679 @item D
4680 @code{Date}.
4681 @item d
4682 The @code{Date} in @code{DD-MMM} format.
4683 @item o
4684 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4685 @item M
4686 @code{Message-ID}.
4687 @item r
4688 @code{References}.
4689 @item t
4690 Number of articles in the current sub-thread. Using this spec will slow
4691 down summary buffer generation somewhat.
4692 @item e
4693 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4694 article has any children.
4695 @item P
4696 The line number.
4697 @item O
4698 Download mark.
4699 @item *
4700 Desired cursor position (instead of after first colon).
4701 @item &user-date;
4702 Age sensitive date format. Various date format is defined in
4703 @code{gnus-user-date-format-alist}.
4704 @item u
4705 User defined specifier. The next character in the format string should
4706 be a letter. Gnus will call the function
4707 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4708 following @samp{%u}. The function will be passed the current header as
4709 argument. The function should return a string, which will be inserted
4710 into the summary just like information from any other summary specifier.
4711 @end table
4712
4713 Text between @samp{%(} and @samp{%)} will be highlighted with
4714 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4715 There can only be one such area.
4716
4717 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4718 have to be handled with care. For reasons of efficiency, Gnus will
4719 compute what column these characters will end up in, and ``hard-code''
4720 that. This means that it is invalid to have these specs after a
4721 variable-length spec. Well, you might not be arrested, but your summary
4722 buffer will look strange, which is bad enough.
4723
4724 The smart choice is to have these specs as far to the left as possible.
4725 (Isn't that the case with everything, though? But I digress.)
4726
4727 This restriction may disappear in later versions of Gnus.
4728
4729
4730 @node To From Newsgroups
4731 @subsection To From Newsgroups
4732 @cindex To
4733 @cindex Newsgroups
4734
4735 In some groups (particularly in archive groups), the @code{From} header
4736 isn't very interesting, since all the articles there are written by
4737 you. To display the information in the @code{To} or @code{Newsgroups}
4738 headers instead, you need to decide three things: What information to
4739 gather; where to display it; and when to display it.
4740
4741 @enumerate
4742 @item
4743 @vindex gnus-extra-headers
4744 The reading of extra header information is controlled by the
4745 @code{gnus-extra-headers}. This is a list of header symbols. For
4746 instance:
4747
4748 @lisp
4749 (setq gnus-extra-headers
4750 '(To Newsgroups X-Newsreader))
4751 @end lisp
4752
4753 This will result in Gnus trying to obtain these three headers, and
4754 storing it in header structures for later easy retrieval.
4755
4756 @item
4757 @findex gnus-extra-header
4758 The value of these extra headers can be accessed via the
4759 @code{gnus-extra-header} function. Here's a format line spec that will
4760 access the @code{X-Newsreader} header:
4761
4762 @example
4763 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4764 @end example
4765
4766 @item
4767 @vindex gnus-ignored-from-addresses
4768 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4769 summary line spec returns the @code{To}, @code{Newsreader} or
4770 @code{From} header. If this regexp matches the contents of the
4771 @code{From} header, the value of the @code{To} or @code{Newsreader}
4772 headers are used instead.
4773
4774 @end enumerate
4775
4776 @vindex nnmail-extra-headers
4777 A related variable is @code{nnmail-extra-headers}, which controls when
4778 to include extra headers when generating overview (@acronym{NOV}) files.
4779 If you have old overview files, you should regenerate them after
4780 changing this variable, by entering the server buffer using @kbd{^},
4781 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4782 regeneration.
4783
4784 @vindex gnus-summary-line-format
4785 You also have to instruct Gnus to display the data by changing the
4786 @code{%n} spec to the @code{%f} spec in the
4787 @code{gnus-summary-line-format} variable.
4788
4789 In summary, you'd typically put something like the following in
4790 @file{~/.gnus.el}:
4791
4792 @lisp
4793 (setq gnus-extra-headers
4794 '(To Newsgroups))
4795 (setq nnmail-extra-headers gnus-extra-headers)
4796 (setq gnus-summary-line-format
4797 "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4798 (setq gnus-ignored-from-addresses
4799 "Your Name Here")
4800 @end lisp
4801
4802 (The values listed above are the default values in Gnus. Alter them
4803 to fit your needs.)
4804
4805 A note for news server administrators, or for users who wish to try to
4806 convince their news server administrator to provide some additional
4807 support:
4808
4809 The above is mostly useful for mail groups, where you have control over
4810 the @acronym{NOV} files that are created. However, if you can persuade your
4811 nntp admin to add (in the usual implementation, notably INN):
4812
4813 @example
4814 Newsgroups:full
4815 @end example
4816
4817 to the end of her @file{overview.fmt} file, then you can use that just
4818 as you would the extra headers from the mail groups.
4819
4820
4821 @node Summary Buffer Mode Line
4822 @subsection Summary Buffer Mode Line
4823
4824 @vindex gnus-summary-mode-line-format
4825 You can also change the format of the summary mode bar (@pxref{Mode Line
4826 Formatting}). Set @code{gnus-summary-mode-line-format} to whatever you
4827 like. The default is @samp{Gnus: %%b [%A] %Z}.
4828
4829 Here are the elements you can play with:
4830
4831 @table @samp
4832 @item G
4833 Group name.
4834 @item p
4835 Unprefixed group name.
4836 @item A
4837 Current article number.
4838 @item z
4839 Current article score.
4840 @item V
4841 Gnus version.
4842 @item U
4843 Number of unread articles in this group.
4844 @item e
4845 Number of unread articles in this group that aren't displayed in the
4846 summary buffer.
4847 @item Z
4848 A string with the number of unread and unselected articles represented
4849 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4850 articles, and just as @samp{<%U more>} if there are just unread articles
4851 and no unselected ones.
4852 @item g
4853 Shortish group name. For instance, @samp{rec.arts.anime} will be
4854 shortened to @samp{r.a.anime}.
4855 @item S
4856 Subject of the current article.
4857 @item u
4858 User-defined spec (@pxref{User-Defined Specs}).
4859 @item s
4860 Name of the current score file (@pxref{Scoring}).
4861 @item d
4862 Number of dormant articles (@pxref{Unread Articles}).
4863 @item t
4864 Number of ticked articles (@pxref{Unread Articles}).
4865 @item r
4866 Number of articles that have been marked as read in this session.
4867 @item E
4868 Number of articles expunged by the score files.
4869 @end table
4870
4871
4872 @node Summary Highlighting
4873 @subsection Summary Highlighting
4874
4875 @table @code
4876
4877 @item gnus-visual-mark-article-hook
4878 @vindex gnus-visual-mark-article-hook
4879 This hook is run after selecting an article. It is meant to be used for
4880 highlighting the article in some way. It is not run if
4881 @code{gnus-visual} is @code{nil}.
4882
4883 @item gnus-summary-update-hook
4884 @vindex gnus-summary-update-hook
4885 This hook is called when a summary line is changed. It is not run if
4886 @code{gnus-visual} is @code{nil}.
4887
4888 @item gnus-summary-selected-face
4889 @vindex gnus-summary-selected-face
4890 This is the face (or @dfn{font} as some people call it) used to
4891 highlight the current article in the summary buffer.
4892
4893 @item gnus-summary-highlight
4894 @vindex gnus-summary-highlight
4895 Summary lines are highlighted according to this variable, which is a
4896 list where the elements are of the format @code{(@var{form}
4897 . @var{face})}. If you would, for instance, like ticked articles to be
4898 italic and high-scored articles to be bold, you could set this variable
4899 to something like
4900 @lisp
4901 (((eq mark gnus-ticked-mark) . italic)
4902 ((> score default) . bold))
4903 @end lisp
4904 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4905 @var{face} will be applied to the line.
4906 @end table
4907
4908
4909 @node Summary Maneuvering
4910 @section Summary Maneuvering
4911 @cindex summary movement
4912
4913 All the straight movement commands understand the numeric prefix and
4914 behave pretty much as you'd expect.
4915
4916 None of these commands select articles.
4917
4918 @table @kbd
4919 @item G M-n
4920 @itemx M-n
4921 @kindex M-n (Summary)
4922 @kindex G M-n (Summary)
4923 @findex gnus-summary-next-unread-subject
4924 Go to the next summary line of an unread article
4925 (@code{gnus-summary-next-unread-subject}).
4926
4927 @item G M-p
4928 @itemx M-p
4929 @kindex M-p (Summary)
4930 @kindex G M-p (Summary)
4931 @findex gnus-summary-prev-unread-subject
4932 Go to the previous summary line of an unread article
4933 (@code{gnus-summary-prev-unread-subject}).
4934
4935 @item G g
4936 @kindex G g (Summary)
4937 @findex gnus-summary-goto-subject
4938 Ask for an article number and then go to the summary line of that article
4939 without displaying the article (@code{gnus-summary-goto-subject}).
4940 @end table
4941
4942 If Gnus asks you to press a key to confirm going to the next group, you
4943 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4944 buffer, searching for the next group to read without actually returning
4945 to the group buffer.
4946
4947 Variables related to summary movement:
4948
4949 @table @code
4950
4951 @vindex gnus-auto-select-next
4952 @item gnus-auto-select-next
4953 If you issue one of the movement commands (like @kbd{n}) and there are
4954 no more unread articles after the current one, Gnus will offer to go to
4955 the next group. If this variable is @code{t} and the next group is
4956 empty, Gnus will exit summary mode and return to the group buffer. If
4957 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4958 next group with unread articles. As a special case, if this variable
4959 is @code{quietly}, Gnus will select the next group without asking for
4960 confirmation. If this variable is @code{almost-quietly}, the same
4961 will happen only if you are located on the last article in the group.
4962 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4963 command will go to the next group without confirmation. Also
4964 @pxref{Group Levels}.
4965
4966 @item gnus-auto-select-same
4967 @vindex gnus-auto-select-same
4968 If non-@code{nil}, all the movement commands will try to go to the next
4969 article with the same subject as the current. (@dfn{Same} here might
4970 mean @dfn{roughly equal}. See @code{gnus-summary-gather-subject-limit}
4971 for details (@pxref{Customizing Threading}).) If there are no more
4972 articles with the same subject, go to the first unread article.
4973
4974 This variable is not particularly useful if you use a threaded display.
4975
4976 @item gnus-summary-check-current
4977 @vindex gnus-summary-check-current
4978 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4979 to the next (or previous) article if the current article is unread.
4980 Instead, they will choose the current article.
4981
4982 @item gnus-auto-center-summary
4983 @vindex gnus-auto-center-summary
4984 If non-@code{nil}, Gnus will keep the point in the summary buffer
4985 centered at all times. This makes things quite tidy, but if you have a
4986 slow network connection, or simply do not like this un-Emacsism, you can
4987 set this variable to @code{nil} to get the normal Emacs scrolling
4988 action. This will also inhibit horizontal re-centering of the summary
4989 buffer, which might make it more inconvenient to read extremely long
4990 threads.
4991
4992 This variable can also be a number. In that case, center the window at
4993 the given number of lines from the top.
4994
4995 @end table
4996
4997
4998 @node Choosing Articles
4999 @section Choosing Articles
5000 @cindex selecting articles
5001
5002 @menu
5003 * Choosing Commands:: Commands for choosing articles.
5004 * Choosing Variables:: Variables that influence these commands.
5005 @end menu
5006
5007
5008 @node Choosing Commands
5009 @subsection Choosing Commands
5010
5011 None of the following movement commands understand the numeric prefix,
5012 and they all select and display an article.
5013
5014 If you want to fetch new articles or redisplay the group, see
5015 @ref{Exiting the Summary Buffer}.
5016
5017 @table @kbd
5018 @item SPACE
5019 @kindex SPACE (Summary)
5020 @findex gnus-summary-next-page
5021 Select the current article, or, if that one's read already, the next
5022 unread article (@code{gnus-summary-next-page}).
5023
5024 If you have an article window open already and you press @kbd{SPACE}
5025 again, the article will be scrolled. This lets you conveniently
5026 @kbd{SPACE} through an entire newsgroup. @xref{Paging the Article}.
5027
5028 @item G n
5029 @itemx n
5030 @kindex n (Summary)
5031 @kindex G n (Summary)
5032 @findex gnus-summary-next-unread-article
5033 @c @icon{gnus-summary-next-unread}
5034 Go to next unread article (@code{gnus-summary-next-unread-article}).
5035
5036 @item G p
5037 @itemx p
5038 @kindex p (Summary)
5039 @findex gnus-summary-prev-unread-article
5040 @c @icon{gnus-summary-prev-unread}
5041 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5042
5043 @item G N
5044 @itemx N
5045 @kindex N (Summary)
5046 @kindex G N (Summary)
5047 @findex gnus-summary-next-article
5048 Go to the next article (@code{gnus-summary-next-article}).
5049
5050 @item G P
5051 @itemx P
5052 @kindex P (Summary)
5053 @kindex G P (Summary)
5054 @findex gnus-summary-prev-article
5055 Go to the previous article (@code{gnus-summary-prev-article}).
5056
5057 @item G C-n
5058 @kindex G C-n (Summary)
5059 @findex gnus-summary-next-same-subject
5060 Go to the next article with the same subject
5061 (@code{gnus-summary-next-same-subject}).
5062
5063 @item G C-p
5064 @kindex G C-p (Summary)
5065 @findex gnus-summary-prev-same-subject
5066 Go to the previous article with the same subject
5067 (@code{gnus-summary-prev-same-subject}).
5068
5069 @item G f
5070 @itemx .
5071 @kindex G f (Summary)
5072 @kindex . (Summary)
5073 @findex gnus-summary-first-unread-article
5074 Go to the first unread article
5075 (@code{gnus-summary-first-unread-article}).
5076
5077 @item G b
5078 @itemx ,
5079 @kindex G b (Summary)
5080 @kindex , (Summary)
5081 @findex gnus-summary-best-unread-article
5082 Go to the unread article with the highest score
5083 (@code{gnus-summary-best-unread-article}). If given a prefix argument,
5084 go to the first unread article that has a score over the default score.
5085
5086 @item G l
5087 @itemx l
5088 @kindex l (Summary)
5089 @kindex G l (Summary)
5090 @findex gnus-summary-goto-last-article
5091 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5092
5093 @item G o
5094 @kindex G o (Summary)
5095 @findex gnus-summary-pop-article
5096 @cindex history
5097 @cindex article history
5098 Pop an article off the summary history and go to this article
5099 (@code{gnus-summary-pop-article}). This command differs from the
5100 command above in that you can pop as many previous articles off the
5101 history as you like, while @kbd{l} toggles the two last read articles.
5102 For a somewhat related issue (if you use these commands a lot),
5103 @pxref{Article Backlog}.
5104
5105 @item G j
5106 @itemx j
5107 @kindex j (Summary)
5108 @kindex G j (Summary)
5109 @findex gnus-summary-goto-article
5110 Ask for an article number or @code{Message-ID}, and then go to that
5111 article (@code{gnus-summary-goto-article}).
5112
5113 @end table
5114
5115
5116 @node Choosing Variables
5117 @subsection Choosing Variables
5118
5119 Some variables relevant for moving and selecting articles:
5120
5121 @table @code
5122 @item gnus-auto-extend-newsgroup
5123 @vindex gnus-auto-extend-newsgroup
5124 All the movement commands will try to go to the previous (or next)
5125 article, even if that article isn't displayed in the Summary buffer if
5126 this variable is non-@code{nil}. Gnus will then fetch the article from
5127 the server and display it in the article buffer.
5128
5129 @item gnus-select-article-hook
5130 @vindex gnus-select-article-hook
5131 This hook is called whenever an article is selected. The default is
5132 @code{nil}. If you would like each article to be saved in the Agent as
5133 you read it, putting @code{gnus-agent-fetch-selected-article} on this
5134 hook will do so.
5135
5136 @item gnus-mark-article-hook
5137 @vindex gnus-mark-article-hook
5138 @findex gnus-summary-mark-unread-as-read
5139 @findex gnus-summary-mark-read-and-unread-as-read
5140 @findex gnus-unread-mark
5141 This hook is called whenever an article is selected. It is intended to
5142 be used for marking articles as read. The default value is
5143 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5144 mark of almost any article you read to @code{gnus-read-mark}. The only
5145 articles not affected by this function are ticked, dormant, and
5146 expirable articles. If you'd instead like to just have unread articles
5147 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5148 instead. It will leave marks like @code{gnus-low-score-mark},
5149 @code{gnus-del-mark} (and so on) alone.
5150
5151 @end table
5152
5153
5154 @node Paging the Article
5155 @section Scrolling the Article
5156 @cindex article scrolling
5157
5158 @table @kbd
5159
5160 @item SPACE
5161 @kindex SPACE (Summary)
5162 @findex gnus-summary-next-page
5163 Pressing @kbd{SPACE} will scroll the current article forward one page,
5164 or, if you have come to the end of the current article, will choose the
5165 next article (@code{gnus-summary-next-page}).
5166
5167 @vindex gnus-article-boring-faces
5168 @vindex gnus-article-skip-boring
5169 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5170 the article consists only of citations and signature, then it will be
5171 skipped; the next article will be shown instead. You can customize
5172 what is considered uninteresting with
5173 @code{gnus-article-boring-faces}. You can manually view the article's
5174 pages, no matter how boring, using @kbd{C-M-v}.
5175
5176 @item DEL
5177 @kindex DEL (Summary)
5178 @findex gnus-summary-prev-page
5179 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5180
5181 @item RET
5182 @kindex RET (Summary)
5183 @findex gnus-summary-scroll-up
5184 Scroll the current article one line forward
5185 (@code{gnus-summary-scroll-up}).
5186
5187 @item M-RET
5188 @kindex M-RET (Summary)
5189 @findex gnus-summary-scroll-down
5190 Scroll the current article one line backward
5191 (@code{gnus-summary-scroll-down}).
5192
5193 @item A g
5194 @itemx g
5195 @kindex A g (Summary)
5196 @kindex g (Summary)
5197 @findex gnus-summary-show-article
5198 @vindex gnus-summary-show-article-charset-alist
5199 (Re)fetch the current article (@code{gnus-summary-show-article}). If
5200 given a prefix, fetch the current article, but don't run any of the
5201 article treatment functions. This will give you a ``raw'' article, just
5202 the way it came from the server.
5203
5204 If given a numerical prefix, you can do semi-manual charset stuff.
5205 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5206 encoded in the @code{cn-gb-2312} charset. If you have
5207
5208 @lisp
5209 (setq gnus-summary-show-article-charset-alist
5210 '((1 . cn-gb-2312)
5211 (2 . big5)))
5212 @end lisp
5213
5214 then you can say @kbd{C-u 1 g} to get the same effect.
5215
5216 @item A <
5217 @itemx <
5218 @kindex < (Summary)
5219 @kindex A < (Summary)
5220 @findex gnus-summary-beginning-of-article
5221 Scroll to the beginning of the article
5222 (@code{gnus-summary-beginning-of-article}).
5223
5224 @item A >
5225 @itemx >
5226 @kindex > (Summary)
5227 @kindex A > (Summary)
5228 @findex gnus-summary-end-of-article
5229 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5230
5231 @item A s
5232 @itemx s
5233 @kindex A s (Summary)
5234 @kindex s (Summary)
5235 @findex gnus-summary-isearch-article
5236 Perform an isearch in the article buffer
5237 (@code{gnus-summary-isearch-article}).
5238
5239 @item h
5240 @kindex h (Summary)
5241 @findex gnus-summary-select-article-buffer
5242 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5243
5244 @end table
5245
5246
5247 @node Reply Followup and Post
5248 @section Reply, Followup and Post
5249
5250 @menu
5251 * Summary Mail Commands:: Sending mail.
5252 * Summary Post Commands:: Sending news.
5253 * Summary Message Commands:: Other Message-related commands.
5254 * Canceling and Superseding::
5255 @end menu
5256
5257
5258 @node Summary Mail Commands
5259 @subsection Summary Mail Commands
5260 @cindex mail
5261 @cindex composing mail
5262
5263 Commands for composing a mail message:
5264
5265 @table @kbd
5266
5267 @item S r
5268 @itemx r
5269 @kindex S r (Summary)
5270 @kindex r (Summary)
5271 @findex gnus-summary-reply
5272 @c @icon{gnus-summary-mail-reply}
5273 @c @icon{gnus-summary-reply}
5274 Mail a reply to the author of the current article
5275 (@code{gnus-summary-reply}).
5276
5277 @item S R
5278 @itemx R
5279 @kindex R (Summary)
5280 @kindex S R (Summary)
5281 @findex gnus-summary-reply-with-original
5282 @c @icon{gnus-summary-reply-with-original}
5283 Mail a reply to the author of the current article and include the
5284 original message (@code{gnus-summary-reply-with-original}). This
5285 command uses the process/prefix convention.
5286
5287 @item S w
5288 @kindex S w (Summary)
5289 @findex gnus-summary-wide-reply
5290 Mail a wide reply to the author of the current article
5291 (@code{gnus-summary-wide-reply}). A @dfn{wide reply} is a reply that
5292 goes out to all people listed in the @code{To}, @code{From} (or
5293 @code{Reply-to}) and @code{Cc} headers. If @code{Mail-Followup-To} is
5294 present, that's used instead.
5295
5296 @item S W
5297 @kindex S W (Summary)
5298 @findex gnus-summary-wide-reply-with-original
5299 Mail a wide reply to the current article and include the original
5300 message (@code{gnus-summary-wide-reply-with-original}). This command uses
5301 the process/prefix convention.
5302
5303 @item S v
5304 @kindex S v (Summary)
5305 @findex gnus-summary-very-wide-reply
5306 Mail a very wide reply to the author of the current article
5307 (@code{gnus-summary-wide-reply}). A @dfn{very wide reply} is a reply
5308 that goes out to all people listed in the @code{To}, @code{From} (or
5309 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5310 articles. This command uses the process/prefix convention.
5311
5312 @item S V
5313 @kindex S V (Summary)
5314 @findex gnus-summary-very-wide-reply-with-original
5315 Mail a very wide reply to the author of the current article and include the
5316 original message (@code{gnus-summary-very-wide-reply-with-original}). This
5317 command uses the process/prefix convention.
5318
5319 @item S B r
5320 @kindex S B r (Summary)
5321 @findex gnus-summary-reply-broken-reply-to
5322 Mail a reply to the author of the current article but ignore the
5323 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5324 If you need this because a mailing list incorrectly sets a
5325 @code{Reply-To} header pointing to the list, you probably want to set
5326 the @code{broken-reply-to} group parameter instead, so things will work
5327 correctly. @xref{Group Parameters}.
5328
5329 @item S B R
5330 @kindex S B R (Summary)
5331 @findex gnus-summary-reply-broken-reply-to-with-original
5332 Mail a reply to the author of the current article and include the
5333 original message but ignore the @code{Reply-To} field
5334 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5335
5336 @item S o m
5337 @itemx C-c C-f
5338 @kindex S o m (Summary)
5339 @kindex C-c C-f (Summary)
5340 @findex gnus-summary-mail-forward
5341 @c @icon{gnus-summary-mail-forward}
5342 Forward the current article to some other person
5343 (@code{gnus-summary-mail-forward}). If no prefix is given, the message
5344 is forwarded according to the value of (@code{message-forward-as-mime})
5345 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5346 message and forward directly inline; if the prefix is 2, forward message
5347 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5348 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5349 directly inline; otherwise, the message is forwarded as no prefix given
5350 but use the flipped value of (@code{message-forward-as-mime}). By
5351 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5352 section.
5353
5354 @item S m
5355 @itemx m
5356 @kindex m (Summary)
5357 @kindex S m (Summary)
5358 @findex gnus-summary-mail-other-window
5359 @c @icon{gnus-summary-mail-originate}
5360 Prepare a mail (@code{gnus-summary-mail-other-window}). By default, use
5361 the posting style of the current group. If given a prefix, disable that.
5362 If the prefix is 1, prompt for a group name to find the posting style.
5363
5364 @item S i
5365 @itemx i
5366 @kindex i (Summary)
5367 @kindex S i (Summary)
5368 @findex gnus-summary-news-other-window
5369 Prepare a news (@code{gnus-summary-news-other-window}). By default,
5370 post to the current group. If given a prefix, disable that. If the
5371 prefix is 1, prompt for a group to post to.
5372
5373 This function actually prepares a news even when using mail groups.
5374 This is useful for ``posting'' messages to mail groups without actually
5375 sending them over the network: they're just saved directly to the group
5376 in question. The corresponding back end must have a request-post method
5377 for this to work though.
5378
5379 @item S D b
5380 @kindex S D b (Summary)
5381 @findex gnus-summary-resend-bounced-mail
5382 @cindex bouncing mail
5383 If you have sent a mail, but the mail was bounced back to you for some
5384 reason (wrong address, transient failure), you can use this command to
5385 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}). You
5386 will be popped into a mail buffer where you can edit the headers before
5387 sending the mail off again. If you give a prefix to this command, and
5388 the bounced mail is a reply to some other mail, Gnus will try to fetch
5389 that mail and display it for easy perusal of its headers. This might
5390 very well fail, though.
5391
5392 @item S D r
5393 @kindex S D r (Summary)
5394 @findex gnus-summary-resend-message
5395 Not to be confused with the previous command,
5396 @code{gnus-summary-resend-message} will prompt you for an address to
5397 send the current message off to, and then send it to that place. The
5398 headers of the message won't be altered---but lots of headers that say
5399 @code{Resent-To}, @code{Resent-From} and so on will be added. This
5400 means that you actually send a mail to someone that has a @code{To}
5401 header that (probably) points to yourself. This will confuse people.
5402 So, natcherly you'll only do that if you're really eVIl.
5403
5404 This command is mainly used if you have several accounts and want to
5405 ship a mail to a different account of yours. (If you're both
5406 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5407 to the @code{root} account, you may want to resend it to
5408 @code{postmaster}. Ordnung muss sein!
5409
5410 This command understands the process/prefix convention
5411 (@pxref{Process/Prefix}).
5412
5413 @item S D e
5414 @kindex S D e (Summary)
5415 @findex gnus-summary-resend-message-edit
5416
5417 Like the previous command, but will allow you to edit the message as
5418 if it were a new message before resending.
5419
5420 @item S O m
5421 @kindex S O m (Summary)
5422 @findex gnus-uu-digest-mail-forward
5423 Digest the current series (@pxref{Decoding Articles}) and forward the
5424 result using mail (@code{gnus-uu-digest-mail-forward}). This command
5425 uses the process/prefix convention (@pxref{Process/Prefix}).
5426
5427 @item S M-c
5428 @kindex S M-c (Summary)
5429 @findex gnus-summary-mail-crosspost-complaint
5430 @cindex crossposting
5431 @cindex excessive crossposting
5432 Send a complaint about excessive crossposting to the author of the
5433 current article (@code{gnus-summary-mail-crosspost-complaint}).
5434
5435 @findex gnus-crosspost-complaint
5436 This command is provided as a way to fight back against the current
5437 crossposting pandemic that's sweeping Usenet. It will compose a reply
5438 using the @code{gnus-crosspost-complaint} variable as a preamble. This
5439 command understands the process/prefix convention
5440 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5441
5442 @end table
5443
5444 Also @xref{Header Commands, ,Header Commands, message, The Message
5445 Manual}, for more information.
5446
5447
5448 @node Summary Post Commands
5449 @subsection Summary Post Commands
5450 @cindex post
5451 @cindex composing news
5452
5453 Commands for posting a news article:
5454
5455 @table @kbd
5456 @item S p
5457 @itemx a
5458 @kindex a (Summary)
5459 @kindex S p (Summary)
5460 @findex gnus-summary-post-news
5461 @c @icon{gnus-summary-post-news}
5462 Prepare for posting an article (@code{gnus-summary-post-news}). By
5463 default, post to the current group. If given a prefix, disable that.
5464 If the prefix is 1, prompt for another group instead.
5465
5466 @item S f
5467 @itemx f
5468 @kindex f (Summary)
5469 @kindex S f (Summary)
5470 @findex gnus-summary-followup
5471 @c @icon{gnus-summary-followup}
5472 Post a followup to the current article (@code{gnus-summary-followup}).
5473
5474 @item S F
5475 @itemx F
5476 @kindex S F (Summary)
5477 @kindex F (Summary)
5478 @c @icon{gnus-summary-followup-with-original}
5479 @findex gnus-summary-followup-with-original
5480 Post a followup to the current article and include the original message
5481 (@code{gnus-summary-followup-with-original}). This command uses the
5482 process/prefix convention.
5483
5484 @item S n
5485 @kindex S n (Summary)
5486 @findex gnus-summary-followup-to-mail
5487 Post a followup to the current article via news, even if you got the
5488 message through mail (@code{gnus-summary-followup-to-mail}).
5489
5490 @item S N
5491 @kindex S N (Summary)
5492 @findex gnus-summary-followup-to-mail-with-original
5493 Post a followup to the current article via news, even if you got the
5494 message through mail and include the original message
5495 (@code{gnus-summary-followup-to-mail-with-original}). This command uses
5496 the process/prefix convention.
5497
5498 @item S o p
5499 @kindex S o p (Summary)
5500 @findex gnus-summary-post-forward
5501 Forward the current article to a newsgroup
5502 (@code{gnus-summary-post-forward}).
5503 If no prefix is given, the message is forwarded according to the value
5504 of (@code{message-forward-as-mime}) and
5505 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5506 message and forward directly inline; if the prefix is 2, forward message
5507 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5508 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5509 directly inline; otherwise, the message is forwarded as no prefix given
5510 but use the flipped value of (@code{message-forward-as-mime}). By
5511 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5512
5513 @item S O p
5514 @kindex S O p (Summary)
5515 @findex gnus-uu-digest-post-forward
5516 @cindex digests
5517 @cindex making digests
5518 Digest the current series and forward the result to a newsgroup
5519 (@code{gnus-uu-digest-post-forward}). This command uses the
5520 process/prefix convention.
5521
5522 @item S u
5523 @kindex S u (Summary)
5524 @findex gnus-uu-post-news
5525 @c @icon{gnus-uu-post-news}
5526 Uuencode a file, split it into parts, and post it as a series
5527 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}).
5528 @end table
5529
5530 Also @xref{Header Commands, ,Header Commands, message, The Message
5531 Manual}, for more information.
5532
5533
5534 @node Summary Message Commands
5535 @subsection Summary Message Commands
5536
5537 @table @kbd
5538 @item S y
5539 @kindex S y (Summary)
5540 @findex gnus-summary-yank-message
5541 Yank the current article into an already existing Message composition
5542 buffer (@code{gnus-summary-yank-message}). This command prompts for
5543 what message buffer you want to yank into, and understands the
5544 process/prefix convention (@pxref{Process/Prefix}).
5545
5546 @end table
5547
5548
5549 @node Canceling and Superseding
5550 @subsection Canceling Articles
5551 @cindex canceling articles
5552 @cindex superseding articles
5553
5554 Have you ever written something, and then decided that you really,
5555 really, really wish you hadn't posted that?
5556
5557 Well, you can't cancel mail, but you can cancel posts.
5558
5559 @findex gnus-summary-cancel-article
5560 @kindex C (Summary)
5561 @c @icon{gnus-summary-cancel-article}
5562 Find the article you wish to cancel (you can only cancel your own
5563 articles, so don't try any funny stuff). Then press @kbd{C} or @kbd{S
5564 c} (@code{gnus-summary-cancel-article}). Your article will be
5565 canceled---machines all over the world will be deleting your article.
5566 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5567
5568 Be aware, however, that not all sites honor cancels, so your article may
5569 live on here and there, while most sites will delete the article in
5570 question.
5571
5572 Gnus will use the ``current'' select method when canceling. If you
5573 want to use the standard posting method, use the @samp{a} symbolic
5574 prefix (@pxref{Symbolic Prefixes}).
5575
5576 Gnus ensures that only you can cancel your own messages using a
5577 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
5578 message, Message Manual}).
5579
5580 If you discover that you have made some mistakes and want to do some
5581 corrections, you can post a @dfn{superseding} article that will replace
5582 your original article.
5583
5584 @findex gnus-summary-supersede-article
5585 @kindex S (Summary)
5586 Go to the original article and press @kbd{S s}
5587 (@code{gnus-summary-supersede-article}). You will be put in a buffer
5588 where you can edit the article all you want before sending it off the
5589 usual way.
5590
5591 The same goes for superseding as for canceling, only more so: Some
5592 sites do not honor superseding. On those sites, it will appear that you
5593 have posted almost the same article twice.
5594
5595 If you have just posted the article, and change your mind right away,
5596 there is a trick you can use to cancel/supersede the article without
5597 waiting for the article to appear on your site first. You simply return
5598 to the post buffer (which is called @code{*sent ...*}). There you will
5599 find the article you just posted, with all the headers intact. Change
5600 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5601 header by substituting one of those words for the word
5602 @code{Message-ID}. Then just press @kbd{C-c C-c} to send the article as
5603 you would do normally. The previous article will be
5604 canceled/superseded.
5605
5606 Just remember, kids: There is no 'c' in 'supersede'.
5607
5608 @node Delayed Articles
5609 @section Delayed Articles
5610 @cindex delayed sending
5611 @cindex send delayed
5612
5613 Sometimes, you might wish to delay the sending of a message. For
5614 example, you might wish to arrange for a message to turn up just in time
5615 to remind your about the birthday of your Significant Other. For this,
5616 there is the @code{gnus-delay} package. Setup is simple:
5617
5618 @lisp
5619 (gnus-delay-initialize)
5620 @end lisp
5621
5622 @findex gnus-delay-article
5623 Normally, to send a message you use the @kbd{C-c C-c} command from
5624 Message mode. To delay a message, use @kbd{C-c C-j}
5625 (@code{gnus-delay-article}) instead. This will ask you for how long the
5626 message should be delayed. Possible answers are:
5627
5628 @itemize @bullet
5629 @item
5630 A time span. Consists of an integer and a letter. For example,
5631 @code{42d} means to delay for 42 days. Available letters are @code{m}
5632 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5633 (months) and @code{Y} (years).
5634
5635 @item
5636 A specific date. Looks like @code{YYYY-MM-DD}. The message will be
5637 delayed until that day, at a specific time (eight o'clock by default).
5638 See also @code{gnus-delay-default-hour}.
5639
5640 @item
5641 A specific time of day. Given in @code{hh:mm} format, 24h, no am/pm
5642 stuff. The deadline will be at that time today, except if that time has
5643 already passed, then it's at the given time tomorrow. So if it's ten
5644 o'clock in the morning and you specify @code{11:15}, then the deadline
5645 is one hour and fifteen minutes hence. But if you specify @code{9:20},
5646 that means a time tomorrow.
5647 @end itemize
5648
5649 The action of the @code{gnus-delay-article} command is influenced by a
5650 couple of variables:
5651
5652 @table @code
5653 @item gnus-delay-default-hour
5654 @vindex gnus-delay-default-hour
5655 When you specify a specific date, the message will be due on that hour
5656 on the given date. Possible values are integers 0 through 23.
5657
5658 @item gnus-delay-default-delay
5659 @vindex gnus-delay-default-delay
5660 This is a string and gives the default delay. It can be of any of the
5661 formats described above.
5662
5663 @item gnus-delay-group
5664 @vindex gnus-delay-group
5665 Delayed articles will be kept in this group on the drafts server until
5666 they are due. You probably don't need to change this. The default
5667 value is @code{"delayed"}.
5668
5669 @item gnus-delay-header
5670 @vindex gnus-delay-header
5671 The deadline for each article will be stored in a header. This variable
5672 is a string and gives the header name. You probably don't need to
5673 change this. The default value is @code{"X-Gnus-Delayed"}.
5674 @end table
5675
5676 The way delaying works is like this: when you use the
5677 @code{gnus-delay-article} command, you give a certain delay. Gnus
5678 calculates the deadline of the message and stores it in the
5679 @code{X-Gnus-Delayed} header and puts the message in the
5680 @code{nndraft:delayed} group.
5681
5682 @findex gnus-delay-send-queue
5683 And whenever you get new news, Gnus looks through the group for articles
5684 which are due and sends them. It uses the @code{gnus-delay-send-queue}
5685 function for this. By default, this function is added to the hook
5686 @code{gnus-get-new-news-hook}. But of course, you can change this.
5687 Maybe you want to use the demon to send drafts? Just tell the demon to
5688 execute the @code{gnus-delay-send-queue} function.
5689
5690 @table @code
5691 @item gnus-delay-initialize
5692 @findex gnus-delay-initialize
5693 By default, this function installs @code{gnus-delay-send-queue} in
5694 @code{gnus-get-new-news-hook}. But it accepts the optional second
5695 argument @code{no-check}. If it is non-@code{nil},
5696 @code{gnus-get-new-news-hook} is not changed. The optional first
5697 argument is ignored.
5698
5699 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5700 Presumably, you want to use the demon for sending due delayed articles.
5701 Just don't forget to set that up :-)
5702 @end table
5703
5704
5705 @node Marking Articles
5706 @section Marking Articles
5707 @cindex article marking
5708 @cindex article ticking
5709 @cindex marks
5710
5711 There are several marks you can set on an article.
5712
5713 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5714 neologism ohoy!) of the article. Alphabetic marks generally mean
5715 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5716
5717 In addition, you also have marks that do not affect readedness.
5718
5719 @ifinfo
5720 There's a plethora of commands for manipulating these marks.
5721 @end ifinfo
5722
5723 @menu
5724 * Unread Articles:: Marks for unread articles.
5725 * Read Articles:: Marks for read articles.
5726 * Other Marks:: Marks that do not affect readedness.
5727 * Setting Marks:: How to set and remove marks.
5728 * Generic Marking Commands:: How to customize the marking.
5729 * Setting Process Marks:: How to mark articles for later processing.
5730 @end menu
5731
5732
5733 @node Unread Articles
5734 @subsection Unread Articles
5735
5736 The following marks mark articles as (kinda) unread, in one form or
5737 other.
5738
5739 @table @samp
5740 @item !
5741 @vindex gnus-ticked-mark
5742 Marked as ticked (@code{gnus-ticked-mark}).
5743
5744 @dfn{Ticked articles} are articles that will remain visible always. If
5745 you see an article that you find interesting, or you want to put off
5746 reading it, or replying to it, until sometime later, you'd typically
5747 tick it. However, articles can be expired (from news servers by the
5748 news server software, Gnus itself never expires ticked messages), so if
5749 you want to keep an article forever, you'll have to make it persistent
5750 (@pxref{Persistent Articles}).
5751
5752 @item ?
5753 @vindex gnus-dormant-mark
5754 Marked as dormant (@code{gnus-dormant-mark}).
5755
5756 @dfn{Dormant articles} will only appear in the summary buffer if there
5757 are followups to it. If you want to see them even if they don't have
5758 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5759 Otherwise (except for the visibility issue), they are just like ticked
5760 messages.
5761
5762 @item SPACE
5763 @vindex gnus-unread-mark
5764 Marked as unread (@code{gnus-unread-mark}).
5765
5766 @dfn{Unread articles} are articles that haven't been read at all yet.
5767 @end table
5768
5769
5770 @node Read Articles
5771 @subsection Read Articles
5772 @cindex expirable mark
5773
5774 All the following marks mark articles as read.
5775
5776 @table @samp
5777
5778 @item r
5779 @vindex gnus-del-mark
5780 These are articles that the user has marked as read with the @kbd{d}
5781 command manually, more or less (@code{gnus-del-mark}).
5782
5783 @item R
5784 @vindex gnus-read-mark
5785 Articles that have actually been read (@code{gnus-read-mark}).
5786
5787 @item O
5788 @vindex gnus-ancient-mark
5789 Articles that were marked as read in previous sessions and are now
5790 @dfn{old} (@code{gnus-ancient-mark}).
5791
5792 @item K
5793 @vindex gnus-killed-mark
5794 Marked as killed (@code{gnus-killed-mark}).
5795
5796 @item X
5797 @vindex gnus-kill-file-mark
5798 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5799
5800 @item Y
5801 @vindex gnus-low-score-mark
5802 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5803
5804 @item C
5805 @vindex gnus-catchup-mark
5806 Marked as read by a catchup (@code{gnus-catchup-mark}).
5807
5808 @item G
5809 @vindex gnus-canceled-mark
5810 Canceled article (@code{gnus-canceled-mark})
5811
5812 @item F
5813 @vindex gnus-souped-mark
5814 @sc{soup}ed article (@code{gnus-souped-mark}). @xref{SOUP}.
5815
5816 @item Q
5817 @vindex gnus-sparse-mark
5818 Sparsely reffed article (@code{gnus-sparse-mark}). @xref{Customizing
5819 Threading}.
5820
5821 @item M
5822 @vindex gnus-duplicate-mark
5823 Article marked as read by duplicate suppression
5824 (@code{gnus-duplicate-mark}). @xref{Duplicate Suppression}.
5825
5826 @end table
5827
5828 All these marks just mean that the article is marked as read, really.
5829 They are interpreted differently when doing adaptive scoring, though.
5830
5831 One more special mark, though:
5832
5833 @table @samp
5834 @item E
5835 @vindex gnus-expirable-mark
5836 Marked as expirable (@code{gnus-expirable-mark}).
5837
5838 Marking articles as @dfn{expirable} (or have them marked as such
5839 automatically) doesn't make much sense in normal groups---a user doesn't
5840 control expiring of news articles, but in mail groups, for instance,
5841 articles marked as @dfn{expirable} can be deleted by Gnus at
5842 any time.
5843 @end table
5844
5845
5846 @node Other Marks
5847 @subsection Other Marks
5848 @cindex process mark
5849 @cindex bookmarks
5850
5851 There are some marks that have nothing to do with whether the article is
5852 read or not.
5853
5854 @itemize @bullet
5855
5856 @item
5857 You can set a bookmark in the current article. Say you are reading a
5858 long thesis on cats' urinary tracts, and have to go home for dinner
5859 before you've finished reading the thesis. You can then set a bookmark
5860 in the article, and Gnus will jump to this bookmark the next time it
5861 encounters the article. @xref{Setting Marks}.
5862
5863 @item
5864 @vindex gnus-replied-mark
5865 All articles that you have replied to or made a followup to (i.e., have
5866 answered) will be marked with an @samp{A} in the second column
5867 (@code{gnus-replied-mark}).
5868
5869 @item
5870 @vindex gnus-forwarded-mark
5871 All articles that you have forwarded will be marked with an @samp{F} in
5872 the second column (@code{gnus-forwarded-mark}).
5873
5874 @item
5875 @vindex gnus-cached-mark
5876 Articles stored in the article cache will be marked with an @samp{*} in
5877 the second column (@code{gnus-cached-mark}). @xref{Article Caching}.
5878
5879 @item
5880 @vindex gnus-saved-mark
5881 Articles ``saved'' (in some manner or other; not necessarily
5882 religiously) are marked with an @samp{S} in the second column
5883 (@code{gnus-saved-mark}).
5884
5885 @item
5886 @vindex gnus-recent-mark
5887 Articles that according to the server haven't been shown to the user
5888 before are marked with a @samp{N} in the second column
5889 (@code{gnus-recent-mark}). Note that not all servers support this
5890 mark, in which case it simply never appears. Compare with
5891 @code{gnus-unseen-mark}.
5892
5893 @item
5894 @vindex gnus-unseen-mark
5895 Articles that haven't been seen before in Gnus by the user are marked
5896 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5897 Compare with @code{gnus-recent-mark}.
5898
5899 @item
5900 @vindex gnus-downloaded-mark
5901 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5902 downloaded for unplugged (offline) viewing. If you are using the
5903 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5904 (The variable @code{gnus-downloaded-mark} controls which character to
5905 use.)
5906
5907 @item
5908 @vindex gnus-undownloaded-mark
5909 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5910 not have been downloaded. Such articles cannot be viewed while you
5911 are unplugged (offline). If you are using the @samp{%O} spec, these
5912 articles get the @samp{-} mark in that spec. (The variable
5913 @code{gnus-undownloaded-mark} controls which character to use.)
5914
5915 @item
5916 @vindex gnus-downloadable-mark
5917 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5918 automatically, but it is also possible to explicitly mark articles for
5919 download, even if they would not be downloaded automatically. Such
5920 explicitly-marked articles get the @samp{%} mark in the first column.
5921 (The variable @code{gnus-downloadable-mark} controls which character to
5922 use.)
5923
5924 @item
5925 @vindex gnus-not-empty-thread-mark
5926 @vindex gnus-empty-thread-mark
5927 If the @samp{%e} spec is used, the presence of threads or not will be
5928 marked with @code{gnus-not-empty-thread-mark} and
5929 @code{gnus-empty-thread-mark} in the third column, respectively.
5930
5931 @item
5932 @vindex gnus-process-mark
5933 Finally we have the @dfn{process mark} (@code{gnus-process-mark}). A
5934 variety of commands react to the presence of the process mark. For
5935 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5936 all articles that have been marked with the process mark. Articles
5937 marked with the process mark have a @samp{#} in the second column.
5938
5939 @end itemize
5940
5941 You might have noticed that most of these ``non-readedness'' marks
5942 appear in the second column by default. So if you have a cached, saved,
5943 replied article that you have process-marked, what will that look like?
5944
5945 Nothing much. The precedence rules go as follows: process -> cache ->
5946 replied -> saved. So if the article is in the cache and is replied,
5947 you'll only see the cache mark and not the replied mark.
5948
5949
5950 @node Setting Marks
5951 @subsection Setting Marks
5952 @cindex setting marks
5953
5954 All the marking commands understand the numeric prefix.
5955
5956 @table @kbd
5957 @item M c
5958 @itemx M-u
5959 @kindex M c (Summary)
5960 @kindex M-u (Summary)
5961 @findex gnus-summary-clear-mark-forward
5962 @cindex mark as unread
5963 Clear all readedness-marks from the current article
5964 (@code{gnus-summary-clear-mark-forward}). In other words, mark the
5965 article as unread.
5966
5967 @item M t
5968 @itemx !
5969 @kindex ! (Summary)
5970 @kindex M t (Summary)
5971 @findex gnus-summary-tick-article-forward
5972 Tick the current article (@code{gnus-summary-tick-article-forward}).
5973 @xref{Article Caching}.
5974
5975 @item M ?
5976 @itemx ?
5977 @kindex ? (Summary)
5978 @kindex M ? (Summary)
5979 @findex gnus-summary-mark-as-dormant
5980 Mark the current article as dormant
5981 (@code{gnus-summary-mark-as-dormant}). @xref{Article Caching}.
5982
5983 @item M d
5984 @itemx d
5985 @kindex M d (Summary)
5986 @kindex d (Summary)
5987 @findex gnus-summary-mark-as-read-forward
5988 Mark the current article as read
5989 (@code{gnus-summary-mark-as-read-forward}).
5990
5991 @item D
5992 @kindex D (Summary)
5993 @findex gnus-summary-mark-as-read-backward
5994 Mark the current article as read and move point to the previous line
5995 (@code{gnus-summary-mark-as-read-backward}).
5996
5997 @item M k
5998 @itemx k
5999 @kindex k (Summary)
6000 @kindex M k (Summary)
6001 @findex gnus-summary-kill-same-subject-and-select
6002 Mark all articles that have the same subject as the current one as read,
6003 and then select the next unread article
6004 (@code{gnus-summary-kill-same-subject-and-select}).
6005
6006 @item M K
6007 @itemx C-k
6008 @kindex M K (Summary)
6009 @kindex C-k (Summary)
6010 @findex gnus-summary-kill-same-subject
6011 Mark all articles that have the same subject as the current one as read
6012 (@code{gnus-summary-kill-same-subject}).
6013
6014 @item M C
6015 @kindex M C (Summary)
6016 @findex gnus-summary-catchup
6017 @c @icon{gnus-summary-catchup}
6018 Mark all unread articles as read (@code{gnus-summary-catchup}).
6019
6020 @item M C-c
6021 @kindex M C-c (Summary)
6022 @findex gnus-summary-catchup-all
6023 Mark all articles in the group as read---even the ticked and dormant
6024 articles (@code{gnus-summary-catchup-all}).
6025
6026 @item M H
6027 @kindex M H (Summary)
6028 @findex gnus-summary-catchup-to-here
6029 Catchup the current group to point (before the point)
6030 (@code{gnus-summary-catchup-to-here}).
6031
6032 @item M h
6033 @kindex M h (Summary)
6034 @findex gnus-summary-catchup-from-here
6035 Catchup the current group from point (after the point)
6036 (@code{gnus-summary-catchup-from-here}).
6037
6038 @item C-w
6039 @kindex C-w (Summary)
6040 @findex gnus-summary-mark-region-as-read
6041 Mark all articles between point and mark as read
6042 (@code{gnus-summary-mark-region-as-read}).
6043
6044 @item M V k
6045 @kindex M V k (Summary)
6046 @findex gnus-summary-kill-below
6047 Kill all articles with scores below the default score (or below the
6048 numeric prefix) (@code{gnus-summary-kill-below}).
6049
6050 @item M e
6051 @itemx E
6052 @kindex M e (Summary)
6053 @kindex E (Summary)
6054 @findex gnus-summary-mark-as-expirable
6055 Mark the current article as expirable
6056 (@code{gnus-summary-mark-as-expirable}).
6057
6058 @item M b
6059 @kindex M b (Summary)
6060 @findex gnus-summary-set-bookmark
6061 Set a bookmark in the current article
6062 (@code{gnus-summary-set-bookmark}).
6063
6064 @item M B
6065 @kindex M B (Summary)
6066 @findex gnus-summary-remove-bookmark
6067 Remove the bookmark from the current article
6068 (@code{gnus-summary-remove-bookmark}).
6069
6070 @item M V c
6071 @kindex M V c (Summary)
6072 @findex gnus-summary-clear-above
6073 Clear all marks from articles with scores over the default score (or
6074 over the numeric prefix) (@code{gnus-summary-clear-above}).
6075
6076 @item M V u
6077 @kindex M V u (Summary)
6078 @findex gnus-summary-tick-above
6079 Tick all articles with scores over the default score (or over the
6080 numeric prefix) (@code{gnus-summary-tick-above}).
6081
6082 @item M V m
6083 @kindex M V m (Summary)
6084 @findex gnus-summary-mark-above
6085 Prompt for a mark, and mark all articles with scores over the default
6086 score (or over the numeric prefix) with this mark
6087 (@code{gnus-summary-clear-above}).
6088 @end table
6089
6090 @vindex gnus-summary-goto-unread
6091 The @code{gnus-summary-goto-unread} variable controls what action should
6092 be taken after setting a mark. If non-@code{nil}, point will move to
6093 the next/previous unread article. If @code{nil}, point will just move
6094 one line up or down. As a special case, if this variable is
6095 @code{never}, all the marking commands as well as other commands (like
6096 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6097 The default is @code{t}.
6098
6099
6100 @node Generic Marking Commands
6101 @subsection Generic Marking Commands
6102
6103 Some people would like the command that ticks an article (@kbd{!}) go to
6104 the next article. Others would like it to go to the next unread
6105 article. Yet others would like it to stay on the current article. And
6106 even though I haven't heard of anybody wanting it to go to the
6107 previous (unread) article, I'm sure there are people that want that as
6108 well.
6109
6110 Multiply these five behaviors with five different marking commands, and
6111 you get a potentially complex set of variable to control what each
6112 command should do.
6113
6114 To sidestep that mess, Gnus provides commands that do all these
6115 different things. They can be found on the @kbd{M M} map in the summary
6116 buffer. Type @kbd{M M C-h} to see them all---there are too many of them
6117 to list in this manual.
6118
6119 While you can use these commands directly, most users would prefer
6120 altering the summary mode keymap. For instance, if you would like the
6121 @kbd{!} command to go to the next article instead of the next unread
6122 article, you could say something like:
6123
6124 @lisp
6125 @group
6126 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6127 (defun my-alter-summary-map ()
6128 (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6129 @end group
6130 @end lisp
6131
6132 @noindent
6133 or
6134
6135 @lisp
6136 (defun my-alter-summary-map ()
6137 (local-set-key "!" "MM!n"))
6138 @end lisp
6139
6140
6141 @node Setting Process Marks
6142 @subsection Setting Process Marks
6143 @cindex setting process marks
6144
6145 Process marks are displayed as @code{#} in the summary buffer, and are
6146 used for marking articles in such a way that other commands will
6147 process these articles. For instance, if you process mark four
6148 articles and then use the @kbd{*} command, Gnus will enter these four
6149 commands into the cache. For more information,
6150 @pxref{Process/Prefix}.
6151
6152 @table @kbd
6153
6154 @item M P p
6155 @itemx #
6156 @kindex # (Summary)
6157 @kindex M P p (Summary)
6158 @findex gnus-summary-mark-as-processable
6159 Mark the current article with the process mark
6160 (@code{gnus-summary-mark-as-processable}).
6161 @findex gnus-summary-unmark-as-processable
6162
6163 @item M P u
6164 @itemx M-#
6165 @kindex M P u (Summary)
6166 @kindex M-# (Summary)
6167 Remove the process mark, if any, from the current article
6168 (@code{gnus-summary-unmark-as-processable}).
6169
6170 @item M P U
6171 @kindex M P U (Summary)
6172 @findex gnus-summary-unmark-all-processable
6173 Remove the process mark from all articles
6174 (@code{gnus-summary-unmark-all-processable}).
6175
6176 @item M P i
6177 @kindex M P i (Summary)
6178 @findex gnus-uu-invert-processable
6179 Invert the list of process marked articles
6180 (@code{gnus-uu-invert-processable}).
6181
6182 @item M P R
6183 @kindex M P R (Summary)
6184 @findex gnus-uu-mark-by-regexp
6185 Mark articles that have a @code{Subject} header that matches a regular
6186 expression (@code{gnus-uu-mark-by-regexp}).
6187
6188 @item M P G
6189 @kindex M P G (Summary)
6190 @findex gnus-uu-unmark-by-regexp
6191 Unmark articles that have a @code{Subject} header that matches a regular
6192 expression (@code{gnus-uu-unmark-by-regexp}).
6193
6194 @item M P r
6195 @kindex M P r (Summary)
6196 @findex gnus-uu-mark-region
6197 Mark articles in region (@code{gnus-uu-mark-region}).
6198
6199 @item M P g
6200 @kindex M P g (Summary)
6201 @findex gnus-uu-unmark-region
6202 Unmark articles in region (@code{gnus-uu-unmark-region}).
6203
6204 @item M P t
6205 @kindex M P t (Summary)
6206 @findex gnus-uu-mark-thread
6207 Mark all articles in the current (sub)thread
6208 (@code{gnus-uu-mark-thread}).
6209
6210 @item M P T
6211 @kindex M P T (Summary)
6212 @findex gnus-uu-unmark-thread
6213 Unmark all articles in the current (sub)thread
6214 (@code{gnus-uu-unmark-thread}).
6215
6216 @item M P v
6217 @kindex M P v (Summary)
6218 @findex gnus-uu-mark-over
6219 Mark all articles that have a score above the prefix argument
6220 (@code{gnus-uu-mark-over}).
6221
6222 @item M P s
6223 @kindex M P s (Summary)
6224 @findex gnus-uu-mark-series
6225 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6226
6227 @item M P S
6228 @kindex M P S (Summary)
6229 @findex gnus-uu-mark-sparse
6230 Mark all series that have already had some articles marked
6231 (@code{gnus-uu-mark-sparse}).
6232
6233 @item M P a
6234 @kindex M P a (Summary)
6235 @findex gnus-uu-mark-all
6236 Mark all articles in series order (@code{gnus-uu-mark-all}).
6237
6238 @item M P b
6239 @kindex M P b (Summary)
6240 @findex gnus-uu-mark-buffer
6241 Mark all articles in the buffer in the order they appear
6242 (@code{gnus-uu-mark-buffer}).
6243
6244 @item M P k
6245 @kindex M P k (Summary)
6246 @findex gnus-summary-kill-process-mark
6247 Push the current process mark set onto the stack and unmark all articles
6248 (@code{gnus-summary-kill-process-mark}).
6249
6250 @item M P y
6251 @kindex M P y (Summary)
6252 @findex gnus-summary-yank-process-mark
6253 Pop the previous process mark set from the stack and restore it
6254 (@code{gnus-summary-yank-process-mark}).
6255
6256 @item M P w
6257 @kindex M P w (Summary)
6258 @findex gnus-summary-save-process-mark
6259 Push the current process mark set onto the stack
6260 (@code{gnus-summary-save-process-mark}).
6261
6262 @end table
6263
6264 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6265 set process marks based on article body contents.
6266
6267
6268 @node Limiting
6269 @section Limiting
6270 @cindex limiting
6271
6272 It can be convenient to limit the summary buffer to just show some
6273 subset of the articles currently in the group. The effect most limit
6274 commands have is to remove a few (or many) articles from the summary
6275 buffer.
6276
6277 All limiting commands work on subsets of the articles already fetched
6278 from the servers. None of these commands query the server for
6279 additional articles.
6280
6281 @table @kbd
6282
6283 @item / /
6284 @itemx / s
6285 @kindex / / (Summary)
6286 @findex gnus-summary-limit-to-subject
6287 Limit the summary buffer to articles that match some subject
6288 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6289 matching articles.
6290
6291 @item / a
6292 @kindex / a (Summary)
6293 @findex gnus-summary-limit-to-author
6294 Limit the summary buffer to articles that match some author
6295 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6296 matching articles.
6297
6298 @item / x
6299 @kindex / x (Summary)
6300 @findex gnus-summary-limit-to-extra
6301 Limit the summary buffer to articles that match one of the ``extra''
6302 headers (@pxref{To From Newsgroups})
6303 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6304 matching articles.
6305
6306 @item / u
6307 @itemx x
6308 @kindex / u (Summary)
6309 @kindex x (Summary)
6310 @findex gnus-summary-limit-to-unread
6311 Limit the summary buffer to articles not marked as read
6312 (@code{gnus-summary-limit-to-unread}). If given a prefix, limit the
6313 buffer to articles strictly unread. This means that ticked and
6314 dormant articles will also be excluded.
6315
6316 @item / m
6317 @kindex / m (Summary)
6318 @findex gnus-summary-limit-to-marks
6319 Ask for a mark and then limit to all articles that have been marked
6320 with that mark (@code{gnus-summary-limit-to-marks}).
6321
6322 @item / t
6323 @kindex / t (Summary)
6324 @findex gnus-summary-limit-to-age
6325 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6326 (@code{gnus-summary-limit-to-age}). If given a prefix, limit to
6327 articles younger than that number of days.
6328
6329 @item / n
6330 @kindex / n (Summary)
6331 @findex gnus-summary-limit-to-articles
6332 Limit the summary buffer to the current article
6333 (@code{gnus-summary-limit-to-articles}). Uses the process/prefix
6334 convention (@pxref{Process/Prefix}).
6335
6336 @item / w
6337 @kindex / w (Summary)
6338 @findex gnus-summary-pop-limit
6339 Pop the previous limit off the stack and restore it
6340 (@code{gnus-summary-pop-limit}). If given a prefix, pop all limits off
6341 the stack.
6342
6343 @item / .
6344 @kindex / . (Summary)
6345 @findex gnus-summary-limit-to-unseen
6346 Limit the summary buffer to the unseen articles
6347 (@code{gnus-summary-limit-to-unseen}).
6348
6349 @item / v
6350 @kindex / v (Summary)
6351 @findex gnus-summary-limit-to-score
6352 Limit the summary buffer to articles that have a score at or above some
6353 score (@code{gnus-summary-limit-to-score}).
6354
6355 @item / p
6356 @kindex / p (Summary)
6357 @findex gnus-summary-limit-to-display-predicate
6358 Limit the summary buffer to articles that satisfy the @code{display}
6359 group parameter predicate
6360 (@code{gnus-summary-limit-to-display-predicate}). @xref{Group
6361 Parameters}, for more on this predicate.
6362
6363 @item / E
6364 @itemx M S
6365 @kindex M S (Summary)
6366 @kindex / E (Summary)
6367 @findex gnus-summary-limit-include-expunged
6368 Include all expunged articles in the limit
6369 (@code{gnus-summary-limit-include-expunged}).
6370
6371 @item / D
6372 @kindex / D (Summary)
6373 @findex gnus-summary-limit-include-dormant
6374 Include all dormant articles in the limit
6375 (@code{gnus-summary-limit-include-dormant}).
6376
6377 @item / *
6378 @kindex / * (Summary)
6379 @findex gnus-summary-limit-include-cached
6380 Include all cached articles in the limit
6381 (@code{gnus-summary-limit-include-cached}).
6382
6383 @item / d
6384 @kindex / d (Summary)
6385 @findex gnus-summary-limit-exclude-dormant
6386 Exclude all dormant articles from the limit
6387 (@code{gnus-summary-limit-exclude-dormant}).
6388
6389 @item / M
6390 @kindex / M (Summary)
6391 @findex gnus-summary-limit-exclude-marks
6392 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6393
6394 @item / T
6395 @kindex / T (Summary)
6396 @findex gnus-summary-limit-include-thread
6397 Include all the articles in the current thread in the limit.
6398
6399 @item / c
6400 @kindex / c (Summary)
6401 @findex gnus-summary-limit-exclude-childless-dormant
6402 Exclude all dormant articles that have no children from the limit@*
6403 (@code{gnus-summary-limit-exclude-childless-dormant}).
6404
6405 @item / C
6406 @kindex / C (Summary)
6407 @findex gnus-summary-limit-mark-excluded-as-read
6408 Mark all excluded unread articles as read
6409 (@code{gnus-summary-limit-mark-excluded-as-read}). If given a prefix,
6410 also mark excluded ticked and dormant articles as read.
6411
6412 @item / N
6413 @kindex / N (Summary)
6414 @findex gnus-summary-insert-new-articles
6415 Insert all new articles in the summary buffer. It scans for new emails
6416 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6417
6418 @item / o
6419 @kindex / o (Summary)
6420 @findex gnus-summary-insert-old-articles
6421 Insert all old articles in the summary buffer. If given a numbered
6422 prefix, fetch this number of articles.
6423
6424 @end table
6425
6426
6427 @node Threading
6428 @section Threading
6429 @cindex threading
6430 @cindex article threading
6431
6432 Gnus threads articles by default. @dfn{To thread} is to put responses
6433 to articles directly after the articles they respond to---in a
6434 hierarchical fashion.
6435
6436 Threading is done by looking at the @code{References} headers of the
6437 articles. In a perfect world, this would be enough to build pretty
6438 trees, but unfortunately, the @code{References} header is often broken
6439 or simply missing. Weird news propagation exacerbates the problem,
6440 so one has to employ other heuristics to get pleasing results. A
6441 plethora of approaches exists, as detailed in horrible detail in
6442 @ref{Customizing Threading}.
6443
6444 First, a quick overview of the concepts:
6445
6446 @table @dfn
6447 @item root
6448 The top-most article in a thread; the first article in the thread.
6449
6450 @item thread
6451 A tree-like article structure.
6452
6453 @item sub-thread
6454 A small(er) section of this tree-like structure.
6455
6456 @item loose threads
6457 Threads often lose their roots due to article expiry, or due to the root
6458 already having been read in a previous session, and not displayed in the
6459 summary buffer. We then typically have many sub-threads that really
6460 belong to one thread, but are without connecting roots. These are
6461 called loose threads.
6462
6463 @item thread gathering
6464 An attempt to gather loose threads into bigger threads.
6465
6466 @item sparse threads
6467 A thread where the missing articles have been ``guessed'' at, and are
6468 displayed as empty lines in the summary buffer.
6469
6470 @end table
6471
6472
6473 @menu
6474 * Customizing Threading:: Variables you can change to affect the threading.
6475 * Thread Commands:: Thread based commands in the summary buffer.
6476 @end menu
6477
6478
6479 @node Customizing Threading
6480 @subsection Customizing Threading
6481 @cindex customizing threading
6482
6483 @menu
6484 * Loose Threads:: How Gnus gathers loose threads into bigger threads.
6485 * Filling In Threads:: Making the threads displayed look fuller.
6486 * More Threading:: Even more variables for fiddling with threads.
6487 * Low-Level Threading:: You thought it was over@dots{} but you were wrong!
6488 @end menu
6489
6490
6491 @node Loose Threads
6492 @subsubsection Loose Threads
6493 @cindex <
6494 @cindex >
6495 @cindex loose threads
6496
6497 @table @code
6498 @item gnus-summary-make-false-root
6499 @vindex gnus-summary-make-false-root
6500 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6501 and create a dummy root at the top. (Wait a minute. Root at the top?
6502 Yup.) Loose subtrees occur when the real root has expired, or you've
6503 read or killed the root in a previous session.
6504
6505 When there is no real root of a thread, Gnus will have to fudge
6506 something. This variable says what fudging method Gnus should use.
6507 There are four possible values:
6508
6509 @iftex
6510 @iflatex
6511 \gnusfigure{The Summary Buffer}{390}{
6512 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6513 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6514 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6515 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6516 }
6517 @end iflatex
6518 @end iftex
6519
6520 @cindex adopting articles
6521
6522 @table @code
6523
6524 @item adopt
6525 Gnus will make the first of the orphaned articles the parent. This
6526 parent will adopt all the other articles. The adopted articles will be
6527 marked as such by pointy brackets (@samp{<>}) instead of the standard
6528 square brackets (@samp{[]}). This is the default method.
6529
6530 @item dummy
6531 @vindex gnus-summary-dummy-line-format
6532 @vindex gnus-summary-make-false-root-always
6533 Gnus will create a dummy summary line that will pretend to be the
6534 parent. This dummy line does not correspond to any real article, so
6535 selecting it will just select the first real article after the dummy
6536 article. @code{gnus-summary-dummy-line-format} is used to specify the
6537 format of the dummy roots. It accepts only one format spec: @samp{S},
6538 which is the subject of the article. @xref{Formatting Variables}.
6539 If you want all threads to have a dummy root, even the non-gathered
6540 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6541
6542 @item empty
6543 Gnus won't actually make any article the parent, but simply leave the
6544 subject field of all orphans except the first empty. (Actually, it will
6545 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6546 Buffer Format}).)
6547
6548 @item none
6549 Don't make any article parent at all. Just gather the threads and
6550 display them after one another.
6551
6552 @item nil
6553 Don't gather loose threads.
6554 @end table
6555
6556 @item gnus-summary-gather-subject-limit
6557 @vindex gnus-summary-gather-subject-limit
6558 Loose threads are gathered by comparing subjects of articles. If this
6559 variable is @code{nil}, Gnus requires an exact match between the
6560 subjects of the loose threads before gathering them into one big
6561 super-thread. This might be too strict a requirement, what with the
6562 presence of stupid newsreaders that chop off long subject lines. If
6563 you think so, set this variable to, say, 20 to require that only the
6564 first 20 characters of the subjects have to match. If you set this
6565 variable to a really low number, you'll find that Gnus will gather
6566 everything in sight into one thread, which isn't very helpful.
6567
6568 @cindex fuzzy article gathering
6569 If you set this variable to the special value @code{fuzzy}, Gnus will
6570 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6571 Matching}).
6572
6573 @item gnus-simplify-subject-fuzzy-regexp
6574 @vindex gnus-simplify-subject-fuzzy-regexp
6575 This can either be a regular expression or list of regular expressions
6576 that match strings that will be removed from subjects if fuzzy subject
6577 simplification is used.
6578
6579 @item gnus-simplify-ignored-prefixes
6580 @vindex gnus-simplify-ignored-prefixes
6581 If you set @code{gnus-summary-gather-subject-limit} to something as low
6582 as 10, you might consider setting this variable to something sensible:
6583
6584 @c Written by Michael Ernst <mernst@cs.rice.edu>
6585 @lisp
6586 (setq gnus-simplify-ignored-prefixes
6587 (concat
6588 "\\`\\[?\\("
6589 (mapconcat
6590 'identity
6591 '("looking"
6592 "wanted" "followup" "summary\\( of\\)?"
6593 "help" "query" "problem" "question"
6594 "answer" "reference" "announce"
6595 "How can I" "How to" "Comparison of"
6596 ;; ...
6597 )
6598 "\\|")
6599 "\\)\\s *\\("
6600 (mapconcat 'identity
6601 '("for" "for reference" "with" "about")
6602 "\\|")
6603 "\\)?\\]?:?[ \t]*"))
6604 @end lisp
6605
6606 All words that match this regexp will be removed before comparing two
6607 subjects.
6608
6609 @item gnus-simplify-subject-functions
6610 @vindex gnus-simplify-subject-functions
6611 If non-@code{nil}, this variable overrides
6612 @code{gnus-summary-gather-subject-limit}. This variable should be a
6613 list of functions to apply to the @code{Subject} string iteratively to
6614 arrive at the simplified version of the string.
6615
6616 Useful functions to put in this list include:
6617
6618 @table @code
6619 @item gnus-simplify-subject-re
6620 @findex gnus-simplify-subject-re
6621 Strip the leading @samp{Re:}.
6622
6623 @item gnus-simplify-subject-fuzzy
6624 @findex gnus-simplify-subject-fuzzy
6625 Simplify fuzzily.
6626
6627 @item gnus-simplify-whitespace
6628 @findex gnus-simplify-whitespace
6629 Remove excessive whitespace.
6630
6631 @item gnus-simplify-all-whitespace
6632 @findex gnus-simplify-all-whitespace
6633 Remove all whitespace.
6634 @end table
6635
6636 You may also write your own functions, of course.
6637
6638
6639 @item gnus-summary-gather-exclude-subject
6640 @vindex gnus-summary-gather-exclude-subject
6641 Since loose thread gathering is done on subjects only, that might lead
6642 to many false hits, especially with certain common subjects like
6643 @samp{} and @samp{(none)}. To make the situation slightly better,
6644 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6645 what subjects should be excluded from the gathering process.@*
6646 The default is @samp{^ *$\\|^(none)$}.
6647
6648 @item gnus-summary-thread-gathering-function
6649 @vindex gnus-summary-thread-gathering-function
6650 Gnus gathers threads by looking at @code{Subject} headers. This means
6651 that totally unrelated articles may end up in the same ``thread'', which
6652 is confusing. An alternate approach is to look at all the
6653 @code{Message-ID}s in all the @code{References} headers to find matches.
6654 This will ensure that no gathered threads ever include unrelated
6655 articles, but it also means that people who have posted with broken
6656 newsreaders won't be gathered properly. The choice is yours---plague or
6657 cholera:
6658
6659 @table @code
6660 @item gnus-gather-threads-by-subject
6661 @findex gnus-gather-threads-by-subject
6662 This function is the default gathering function and looks at
6663 @code{Subject}s exclusively.
6664
6665 @item gnus-gather-threads-by-references
6666 @findex gnus-gather-threads-by-references
6667 This function looks at @code{References} headers exclusively.
6668 @end table
6669
6670 If you want to test gathering by @code{References}, you could say
6671 something like:
6672
6673 @lisp
6674 (setq gnus-summary-thread-gathering-function
6675 'gnus-gather-threads-by-references)
6676 @end lisp
6677
6678 @end table
6679
6680
6681 @node Filling In Threads
6682 @subsubsection Filling In Threads
6683
6684 @table @code
6685 @item gnus-fetch-old-headers
6686 @vindex gnus-fetch-old-headers
6687 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6688 more old headers---headers to articles marked as read. If you would
6689 like to display as few summary lines as possible, but still connect as
6690 many loose threads as possible, you should set this variable to
6691 @code{some} or a number. If you set it to a number, no more than that
6692 number of extra old headers will be fetched. In either case, fetching
6693 old headers only works if the back end you are using carries overview
6694 files---this would normally be @code{nntp}, @code{nnspool},
6695 @code{nnml}, and @code{nnmaildir}. Also remember that if the root of
6696 the thread has been expired by the server, there's not much Gnus can
6697 do about that.
6698
6699 This variable can also be set to @code{invisible}. This won't have any
6700 visible effects, but is useful if you use the @kbd{A T} command a lot
6701 (@pxref{Finding the Parent}).
6702
6703 @item gnus-fetch-old-ephemeral-headers
6704 @vindex gnus-fetch-old-ephemeral-headers
6705 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6706 newsgroups.
6707
6708 @item gnus-build-sparse-threads
6709 @vindex gnus-build-sparse-threads
6710 Fetching old headers can be slow. A low-rent similar effect can be
6711 gotten by setting this variable to @code{some}. Gnus will then look at
6712 the complete @code{References} headers of all articles and try to string
6713 together articles that belong in the same thread. This will leave
6714 @dfn{gaps} in the threading display where Gnus guesses that an article
6715 is missing from the thread. (These gaps appear like normal summary
6716 lines. If you select a gap, Gnus will try to fetch the article in
6717 question.) If this variable is @code{t}, Gnus will display all these
6718 ``gaps'' without regard for whether they are useful for completing the
6719 thread or not. Finally, if this variable is @code{more}, Gnus won't cut
6720 off sparse leaf nodes that don't lead anywhere. This variable is
6721 @code{nil} by default.
6722
6723 @item gnus-read-all-available-headers
6724 @vindex gnus-read-all-available-headers
6725 This is a rather obscure variable that few will find useful. It's
6726 intended for those non-news newsgroups where the back end has to fetch
6727 quite a lot to present the summary buffer, and where it's impossible to
6728 go back to parents of articles. This is mostly the case in the
6729 web-based groups, like the @code{nnultimate} groups.
6730
6731 If you don't use those, then it's safe to leave this as the default
6732 @code{nil}. If you want to use this variable, it should be a regexp
6733 that matches the group name, or @code{t} for all groups.
6734
6735 @end table
6736
6737
6738 @node More Threading
6739 @subsubsection More Threading
6740
6741 @table @code
6742 @item gnus-show-threads
6743 @vindex gnus-show-threads
6744 If this variable is @code{nil}, no threading will be done, and all of
6745 the rest of the variables here will have no effect. Turning threading
6746 off will speed group selection up a bit, but it is sure to make reading
6747 slower and more awkward.
6748
6749 @item gnus-thread-hide-subtree
6750 @vindex gnus-thread-hide-subtree
6751 If non-@code{nil}, all threads will be hidden when the summary buffer is
6752 generated.
6753
6754 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6755 Available predicates are @code{gnus-article-unread-p} and
6756 @code{gnus-article-unseen-p}.
6757
6758 Here's an example:
6759
6760 @lisp
6761 (setq gnus-thread-hide-subtree
6762 '(or gnus-article-unread-p
6763 gnus-article-unseen-p))
6764 @end lisp
6765
6766 (It's a pretty nonsensical example, since all unseen articles are also
6767 unread, but you get my drift.)
6768
6769
6770 @item gnus-thread-expunge-below
6771 @vindex gnus-thread-expunge-below
6772 All threads that have a total score (as defined by
6773 @code{gnus-thread-score-function}) less than this number will be
6774 expunged. This variable is @code{nil} by default, which means that no
6775 threads are expunged.
6776
6777 @item gnus-thread-hide-killed
6778 @vindex gnus-thread-hide-killed
6779 if you kill a thread and this variable is non-@code{nil}, the subtree
6780 will be hidden.
6781
6782 @item gnus-thread-ignore-subject
6783 @vindex gnus-thread-ignore-subject
6784 Sometimes somebody changes the subject in the middle of a thread. If
6785 this variable is non-@code{nil}, which is the default, the subject
6786 change is ignored. If it is @code{nil}, a change in the subject will
6787 result in a new thread.
6788
6789 @item gnus-thread-indent-level
6790 @vindex gnus-thread-indent-level
6791 This is a number that says how much each sub-thread should be indented.
6792 The default is 4.
6793
6794 @item gnus-sort-gathered-threads-function
6795 @vindex gnus-sort-gathered-threads-function
6796 Sometimes, particularly with mailing lists, the order in which mails
6797 arrive locally is not necessarily the same as the order in which they
6798 arrived on the mailing list. Consequently, when sorting sub-threads
6799 using the default @code{gnus-thread-sort-by-number}, responses can end
6800 up appearing before the article to which they are responding to.
6801 Setting this variable to an alternate value
6802 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6803 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6804 more logical sub-thread ordering in such instances.
6805
6806 @end table
6807
6808
6809 @node Low-Level Threading
6810 @subsubsection Low-Level Threading
6811
6812 @table @code
6813
6814 @item gnus-parse-headers-hook
6815 @vindex gnus-parse-headers-hook
6816 Hook run before parsing any headers.
6817
6818 @item gnus-alter-header-function
6819 @vindex gnus-alter-header-function
6820 If non-@code{nil}, this function will be called to allow alteration of
6821 article header structures. The function is called with one parameter,
6822 the article header vector, which it may alter in any way. For instance,
6823 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6824 in systematic ways (by adding prefixes and such), you can use this
6825 variable to un-scramble the @code{Message-ID}s so that they are more
6826 meaningful. Here's one example:
6827
6828 @lisp
6829 (setq gnus-alter-header-function 'my-alter-message-id)
6830
6831 (defun my-alter-message-id (header)
6832 (let ((id (mail-header-id header)))
6833 (when (string-match
6834 "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6835 (mail-header-set-id
6836 (concat (match-string 1 id) "@@" (match-string 2 id))
6837 header))))
6838 @end lisp
6839
6840 @end table
6841
6842
6843 @node Thread Commands
6844 @subsection Thread Commands
6845 @cindex thread commands
6846
6847 @table @kbd
6848
6849 @item T k
6850 @itemx C-M-k
6851 @kindex T k (Summary)
6852 @kindex C-M-k (Summary)
6853 @findex gnus-summary-kill-thread
6854 Mark all articles in the current (sub-)thread as read
6855 (@code{gnus-summary-kill-thread}). If the prefix argument is positive,
6856 remove all marks instead. If the prefix argument is negative, tick
6857 articles instead.
6858
6859 @item T l
6860 @itemx C-M-l
6861 @kindex T l (Summary)
6862 @kindex C-M-l (Summary)
6863 @findex gnus-summary-lower-thread
6864 Lower the score of the current (sub-)thread
6865 (@code{gnus-summary-lower-thread}).
6866
6867 @item T i
6868 @kindex T i (Summary)
6869 @findex gnus-summary-raise-thread
6870 Increase the score of the current (sub-)thread
6871 (@code{gnus-summary-raise-thread}).
6872
6873 @item T #
6874 @kindex T # (Summary)
6875 @findex gnus-uu-mark-thread
6876 Set the process mark on the current (sub-)thread
6877 (@code{gnus-uu-mark-thread}).
6878
6879 @item T M-#
6880 @kindex T M-# (Summary)
6881 @findex gnus-uu-unmark-thread
6882 Remove the process mark from the current (sub-)thread
6883 (@code{gnus-uu-unmark-thread}).
6884
6885 @item T T
6886 @kindex T T (Summary)
6887 @findex gnus-summary-toggle-threads
6888 Toggle threading (@code{gnus-summary-toggle-threads}).
6889
6890 @item T s
6891 @kindex T s (Summary)
6892 @findex gnus-summary-show-thread
6893 Expose the (sub-)thread hidden under the current article, if any@*
6894 (@code{gnus-summary-show-thread}).
6895
6896 @item T h
6897 @kindex T h (Summary)
6898 @findex gnus-summary-hide-thread
6899 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6900
6901 @item T S
6902 @kindex T S (Summary)
6903 @findex gnus-summary-show-all-threads
6904 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6905
6906 @item T H
6907 @kindex T H (Summary)
6908 @findex gnus-summary-hide-all-threads
6909 Hide all threads (@code{gnus-summary-hide-all-threads}).
6910
6911 @item T t
6912 @kindex T t (Summary)
6913 @findex gnus-summary-rethread-current
6914 Re-thread the current article's thread
6915 (@code{gnus-summary-rethread-current}). This works even when the
6916 summary buffer is otherwise unthreaded.
6917
6918 @item T ^
6919 @kindex T ^ (Summary)
6920 @findex gnus-summary-reparent-thread
6921 Make the current article the child of the marked (or previous) article
6922 (@code{gnus-summary-reparent-thread}).
6923
6924 @end table
6925
6926 The following commands are thread movement commands. They all
6927 understand the numeric prefix.
6928
6929 @table @kbd
6930
6931 @item T n
6932 @kindex T n (Summary)
6933 @itemx C-M-f
6934 @kindex C-M-n (Summary)
6935 @itemx M-down
6936 @kindex M-down (Summary)
6937 @findex gnus-summary-next-thread
6938 Go to the next thread (@code{gnus-summary-next-thread}).
6939
6940 @item T p
6941 @kindex T p (Summary)
6942 @itemx C-M-b
6943 @kindex C-M-p (Summary)
6944 @itemx M-up
6945 @kindex M-up (Summary)
6946 @findex gnus-summary-prev-thread
6947 Go to the previous thread (@code{gnus-summary-prev-thread}).
6948
6949 @item T d
6950 @kindex T d (Summary)
6951 @findex gnus-summary-down-thread
6952 Descend the thread (@code{gnus-summary-down-thread}).
6953
6954 @item T u
6955 @kindex T u (Summary)
6956 @findex gnus-summary-up-thread
6957 Ascend the thread (@code{gnus-summary-up-thread}).
6958
6959 @item T o
6960 @kindex T o (Summary)
6961 @findex gnus-summary-top-thread
6962 Go to the top of the thread (@code{gnus-summary-top-thread}).
6963 @end table
6964
6965 @vindex gnus-thread-operation-ignore-subject
6966 If you ignore subject while threading, you'll naturally end up with
6967 threads that have several different subjects in them. If you then issue
6968 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6969 wish to kill the entire thread, but just those parts of the thread that
6970 have the same subject as the current article. If you like this idea,
6971 you can fiddle with @code{gnus-thread-operation-ignore-subject}. If it
6972 is non-@code{nil} (which it is by default), subjects will be ignored
6973 when doing thread commands. If this variable is @code{nil}, articles in
6974 the same thread with different subjects will not be included in the
6975 operation in question. If this variable is @code{fuzzy}, only articles
6976 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6977 Matching}).
6978
6979
6980 @node Sorting the Summary Buffer
6981 @section Sorting the Summary Buffer
6982
6983 @findex gnus-thread-sort-by-total-score
6984 @findex gnus-thread-sort-by-date
6985 @findex gnus-thread-sort-by-score
6986 @findex gnus-thread-sort-by-subject
6987 @findex gnus-thread-sort-by-author
6988 @findex gnus-thread-sort-by-number
6989 @findex gnus-thread-sort-by-random
6990 @vindex gnus-thread-sort-functions
6991 @findex gnus-thread-sort-by-most-recent-number
6992 @findex gnus-thread-sort-by-most-recent-date
6993 If you are using a threaded summary display, you can sort the threads by
6994 setting @code{gnus-thread-sort-functions}, which can be either a single
6995 function, a list of functions, or a list containing functions and
6996 @code{(not some-function)} elements.
6997
6998 By default, sorting is done on article numbers. Ready-made sorting
6999 predicate functions include @code{gnus-thread-sort-by-number},
7000 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
7001 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
7002 @code{gnus-thread-sort-by-most-recent-number},
7003 @code{gnus-thread-sort-by-most-recent-date},
7004 @code{gnus-thread-sort-by-random} and
7005 @code{gnus-thread-sort-by-total-score}.
7006
7007 Each function takes two threads and returns non-@code{nil} if the first
7008 thread should be sorted before the other. Note that sorting really is
7009 normally done by looking only at the roots of each thread.
7010
7011 If you use more than one function, the primary sort key should be the
7012 last function in the list. You should probably always include
7013 @code{gnus-thread-sort-by-number} in the list of sorting
7014 functions---preferably first. This will ensure that threads that are
7015 equal with respect to the other sort criteria will be displayed in
7016 ascending article order.
7017
7018 If you would like to sort by reverse score, then by subject, and finally
7019 by number, you could do something like:
7020
7021 @lisp
7022 (setq gnus-thread-sort-functions
7023 '(gnus-thread-sort-by-number
7024 gnus-thread-sort-by-subject
7025 (not gnus-thread-sort-by-total-score)))
7026 @end lisp
7027
7028 The threads that have highest score will be displayed first in the
7029 summary buffer. When threads have the same score, they will be sorted
7030 alphabetically. The threads that have the same score and the same
7031 subject will be sorted by number, which is (normally) the sequence in
7032 which the articles arrived.
7033
7034 If you want to sort by score and then reverse arrival order, you could
7035 say something like:
7036
7037 @lisp
7038 (setq gnus-thread-sort-functions
7039 '((lambda (t1 t2)
7040 (not (gnus-thread-sort-by-number t1 t2)))
7041 gnus-thread-sort-by-score))
7042 @end lisp
7043
7044 @vindex gnus-thread-score-function
7045 The function in the @code{gnus-thread-score-function} variable (default
7046 @code{+}) is used for calculating the total score of a thread. Useful
7047 functions might be @code{max}, @code{min}, or squared means, or whatever
7048 tickles your fancy.
7049
7050 @findex gnus-article-sort-functions
7051 @findex gnus-article-sort-by-date
7052 @findex gnus-article-sort-by-score
7053 @findex gnus-article-sort-by-subject
7054 @findex gnus-article-sort-by-author
7055 @findex gnus-article-sort-by-random
7056 @findex gnus-article-sort-by-number
7057 If you are using an unthreaded display for some strange reason or
7058 other, you have to fiddle with the @code{gnus-article-sort-functions}
7059 variable. It is very similar to the
7060 @code{gnus-thread-sort-functions}, except that it uses slightly
7061 different functions for article comparison. Available sorting
7062 predicate functions are @code{gnus-article-sort-by-number},
7063 @code{gnus-article-sort-by-author},
7064 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7065 @code{gnus-article-sort-by-random}, and
7066 @code{gnus-article-sort-by-score}.
7067
7068 If you want to sort an unthreaded summary display by subject, you could
7069 say something like:
7070
7071 @lisp
7072 (setq gnus-article-sort-functions
7073 '(gnus-article-sort-by-number
7074 gnus-article-sort-by-subject))
7075 @end lisp
7076
7077
7078
7079 @node Asynchronous Fetching
7080 @section Asynchronous Article Fetching
7081 @cindex asynchronous article fetching
7082 @cindex article pre-fetch
7083 @cindex pre-fetch
7084
7085 If you read your news from an @acronym{NNTP} server that's far away, the
7086 network latencies may make reading articles a chore. You have to wait
7087 for a while after pressing @kbd{n} to go to the next article before the
7088 article appears. Why can't Gnus just go ahead and fetch the article
7089 while you are reading the previous one? Why not, indeed.
7090
7091 First, some caveats. There are some pitfalls to using asynchronous
7092 article fetching, especially the way Gnus does it.
7093
7094 Let's say you are reading article 1, which is short, and article 2 is
7095 quite long, and you are not interested in reading that. Gnus does not
7096 know this, so it goes ahead and fetches article 2. You decide to read
7097 article 3, but since Gnus is in the process of fetching article 2, the
7098 connection is blocked.
7099
7100 To avoid these situations, Gnus will open two (count 'em two)
7101 connections to the server. Some people may think this isn't a very nice
7102 thing to do, but I don't see any real alternatives. Setting up that
7103 extra connection takes some time, so Gnus startup will be slower.
7104
7105 Gnus will fetch more articles than you will read. This will mean that
7106 the link between your machine and the @acronym{NNTP} server will become more
7107 loaded than if you didn't use article pre-fetch. The server itself will
7108 also become more loaded---both with the extra article requests, and the
7109 extra connection.
7110
7111 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7112 you really want to.
7113
7114 @vindex gnus-asynchronous
7115 Here's how: Set @code{gnus-asynchronous} to @code{t}. The rest should
7116 happen automatically.
7117
7118 @vindex gnus-use-article-prefetch
7119 You can control how many articles are to be pre-fetched by setting
7120 @code{gnus-use-article-prefetch}. This is 30 by default, which means
7121 that when you read an article in the group, the back end will pre-fetch
7122 the next 30 articles. If this variable is @code{t}, the back end will
7123 pre-fetch all the articles it can without bound. If it is
7124 @code{nil}, no pre-fetching will be done.
7125
7126 @vindex gnus-async-prefetch-article-p
7127 @findex gnus-async-read-p
7128 There are probably some articles that you don't want to pre-fetch---read
7129 articles, for instance. The @code{gnus-async-prefetch-article-p}
7130 variable controls whether an article is to be pre-fetched. This
7131 function should return non-@code{nil} when the article in question is
7132 to be pre-fetched. The default is @code{gnus-async-read-p}, which
7133 returns @code{nil} on read articles. The function is called with an
7134 article data structure as the only parameter.
7135
7136 If, for instance, you wish to pre-fetch only unread articles shorter
7137 than 100 lines, you could say something like:
7138
7139 @lisp
7140 (defun my-async-short-unread-p (data)
7141 "Return non-nil for short, unread articles."
7142 (and (gnus-data-unread-p data)
7143 (< (mail-header-lines (gnus-data-header data))
7144 100)))
7145
7146 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7147 @end lisp
7148
7149 These functions will be called many, many times, so they should
7150 preferably be short and sweet to avoid slowing down Gnus too much.
7151 It's probably a good idea to byte-compile things like this.
7152
7153 @vindex gnus-prefetched-article-deletion-strategy
7154 Articles have to be removed from the asynch buffer sooner or later. The
7155 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7156 articles. This is a list that may contain the following elements:
7157
7158 @table @code
7159 @item read
7160 Remove articles when they are read.
7161
7162 @item exit
7163 Remove articles when exiting the group.
7164 @end table
7165
7166 The default value is @code{(read exit)}.
7167
7168 @c @vindex gnus-use-header-prefetch
7169 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7170 @c from the next group.
7171
7172
7173 @node Article Caching
7174 @section Article Caching
7175 @cindex article caching
7176 @cindex caching
7177
7178 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7179 consider turning article caching on. Each article will then be stored
7180 locally under your home directory. As you may surmise, this could
7181 potentially use @emph{huge} amounts of disk space, as well as eat up all
7182 your inodes so fast it will make your head swim. In vodka.
7183
7184 Used carefully, though, it could be just an easier way to save articles.
7185
7186 @vindex gnus-use-long-file-name
7187 @vindex gnus-cache-directory
7188 @vindex gnus-use-cache
7189 To turn caching on, set @code{gnus-use-cache} to @code{t}. By default,
7190 all articles ticked or marked as dormant will then be copied
7191 over to your local cache (@code{gnus-cache-directory}). Whether this
7192 cache is flat or hierarchical is controlled by the
7193 @code{gnus-use-long-file-name} variable, as usual.
7194
7195 When re-selecting a ticked or dormant article, it will be fetched from the
7196 cache instead of from the server. As articles in your cache will never
7197 expire, this might serve as a method of saving articles while still
7198 keeping them where they belong. Just mark all articles you want to save
7199 as dormant, and don't worry.
7200
7201 When an article is marked as read, is it removed from the cache.
7202
7203 @vindex gnus-cache-remove-articles
7204 @vindex gnus-cache-enter-articles
7205 The entering/removal of articles from the cache is controlled by the
7206 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7207 variables. Both are lists of symbols. The first is @code{(ticked
7208 dormant)} by default, meaning that ticked and dormant articles will be
7209 put in the cache. The latter is @code{(read)} by default, meaning that
7210 articles marked as read are removed from the cache. Possibly
7211 symbols in these two lists are @code{ticked}, @code{dormant},
7212 @code{unread} and @code{read}.
7213
7214 @findex gnus-jog-cache
7215 So where does the massive article-fetching and storing come into the
7216 picture? The @code{gnus-jog-cache} command will go through all
7217 subscribed newsgroups, request all unread articles, score them, and
7218 store them in the cache. You should only ever, ever ever ever, use this
7219 command if 1) your connection to the @acronym{NNTP} server is really, really,
7220 really slow and 2) you have a really, really, really huge disk.
7221 Seriously. One way to cut down on the number of articles downloaded is
7222 to score unwanted articles down and have them marked as read. They will
7223 not then be downloaded by this command.
7224
7225 @vindex gnus-uncacheable-groups
7226 @vindex gnus-cacheable-groups
7227 It is likely that you do not want caching on all groups. For instance,
7228 if your @code{nnml} mail is located under your home directory, it makes no
7229 sense to cache it somewhere else under your home directory. Unless you
7230 feel that it's neat to use twice as much space.
7231
7232 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7233 regexp of groups to cache, @samp{^nntp} for instance, or set the
7234 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7235 Both variables are @code{nil} by default. If a group matches both
7236 variables, the group is not cached.
7237
7238 @findex gnus-cache-generate-nov-databases
7239 @findex gnus-cache-generate-active
7240 @vindex gnus-cache-active-file
7241 The cache stores information on what articles it contains in its active
7242 file (@code{gnus-cache-active-file}). If this file (or any other parts
7243 of the cache) becomes all messed up for some reason or other, Gnus
7244 offers two functions that will try to set things right. @kbd{M-x
7245 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7246 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7247 file.
7248
7249 @findex gnus-cache-move-cache
7250 @code{gnus-cache-move-cache} will move your whole
7251 @code{gnus-cache-directory} to some other location. You get asked to
7252 where, isn't that cool?
7253
7254 @node Persistent Articles
7255 @section Persistent Articles
7256 @cindex persistent articles
7257
7258 Closely related to article caching, we have @dfn{persistent articles}.
7259 In fact, it's just a different way of looking at caching, and much more
7260 useful in my opinion.
7261
7262 Say you're reading a newsgroup, and you happen on to some valuable gem
7263 that you want to keep and treasure forever. You'd normally just save it
7264 (using one of the many saving commands) in some file. The problem with
7265 that is that it's just, well, yucky. Ideally you'd prefer just having
7266 the article remain in the group where you found it forever; untouched by
7267 the expiry going on at the news server.
7268
7269 This is what a @dfn{persistent article} is---an article that just won't
7270 be deleted. It's implemented using the normal cache functions, but
7271 you use two explicit commands for managing persistent articles:
7272
7273 @table @kbd
7274
7275 @item *
7276 @kindex * (Summary)
7277 @findex gnus-cache-enter-article
7278 Make the current article persistent (@code{gnus-cache-enter-article}).
7279
7280 @item M-*
7281 @kindex M-* (Summary)
7282 @findex gnus-cache-remove-article
7283 Remove the current article from the persistent articles
7284 (@code{gnus-cache-remove-article}). This will normally delete the
7285 article.
7286 @end table
7287
7288 Both these commands understand the process/prefix convention.
7289
7290 To avoid having all ticked articles (and stuff) entered into the cache,
7291 you should set @code{gnus-use-cache} to @code{passive} if you're just
7292 interested in persistent articles:
7293
7294 @lisp
7295 (setq gnus-use-cache 'passive)
7296 @end lisp
7297
7298
7299 @node Article Backlog
7300 @section Article Backlog
7301 @cindex backlog
7302 @cindex article backlog
7303
7304 If you have a slow connection, but the idea of using caching seems
7305 unappealing to you (and it is, really), you can help the situation some
7306 by switching on the @dfn{backlog}. This is where Gnus will buffer
7307 already read articles so that it doesn't have to re-fetch articles
7308 you've already read. This only helps if you are in the habit of
7309 re-selecting articles you've recently read, of course. If you never do
7310 that, turning the backlog on will slow Gnus down a little bit, and
7311 increase memory usage some.
7312
7313 @vindex gnus-keep-backlog
7314 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7315 at most @var{n} old articles in a buffer for later re-fetching. If this
7316 variable is non-@code{nil} and is not a number, Gnus will store
7317 @emph{all} read articles, which means that your Emacs will grow without
7318 bound before exploding and taking your machine down with you. I put
7319 that in there just to keep y'all on your toes.
7320
7321 The default value is 20.
7322
7323
7324 @node Saving Articles
7325 @section Saving Articles
7326 @cindex saving articles
7327
7328 Gnus can save articles in a number of ways. Below is the documentation
7329 for saving articles in a fairly straight-forward fashion (i.e., little
7330 processing of the article is done before it is saved). For a different
7331 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7332 (@pxref{Decoding Articles}).
7333
7334 For the commands listed here, the target is a file. If you want to
7335 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7336 command (@pxref{Mail Group Commands}).
7337
7338 @vindex gnus-save-all-headers
7339 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7340 unwanted headers before saving the article.
7341
7342 @vindex gnus-saved-headers
7343 If the preceding variable is @code{nil}, all headers that match the
7344 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7345 deleted before saving.
7346
7347 @table @kbd
7348
7349 @item O o
7350 @itemx o
7351 @kindex O o (Summary)
7352 @kindex o (Summary)
7353 @findex gnus-summary-save-article
7354 @c @icon{gnus-summary-save-article}
7355 Save the current article using the default article saver
7356 (@code{gnus-summary-save-article}).
7357
7358 @item O m
7359 @kindex O m (Summary)
7360 @findex gnus-summary-save-article-mail
7361 Save the current article in mail format
7362 (@code{gnus-summary-save-article-mail}).
7363
7364 @item O r
7365 @kindex O r (Summary)
7366 @findex gnus-summary-save-article-rmail
7367 Save the current article in Rmail format
7368 (@code{gnus-summary-save-article-rmail}).
7369
7370 @item O f
7371 @kindex O f (Summary)
7372 @findex gnus-summary-save-article-file
7373 @c @icon{gnus-summary-save-article-file}
7374 Save the current article in plain file format
7375 (@code{gnus-summary-save-article-file}).
7376
7377 @item O F
7378 @kindex O F (Summary)
7379 @findex gnus-summary-write-article-file
7380 Write the current article in plain file format, overwriting any previous
7381 file contents (@code{gnus-summary-write-article-file}).
7382
7383 @item O b
7384 @kindex O b (Summary)
7385 @findex gnus-summary-save-article-body-file
7386 Save the current article body in plain file format
7387 (@code{gnus-summary-save-article-body-file}).
7388
7389 @item O h
7390 @kindex O h (Summary)
7391 @findex gnus-summary-save-article-folder
7392 Save the current article in mh folder format
7393 (@code{gnus-summary-save-article-folder}).
7394
7395 @item O v
7396 @kindex O v (Summary)
7397 @findex gnus-summary-save-article-vm
7398 Save the current article in a VM folder
7399 (@code{gnus-summary-save-article-vm}).
7400
7401 @item O p
7402 @itemx |
7403 @kindex O p (Summary)
7404 @kindex | (Summary)
7405 @findex gnus-summary-pipe-output
7406 Save the current article in a pipe. Uhm, like, what I mean is---Pipe
7407 the current article to a process (@code{gnus-summary-pipe-output}).
7408 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7409 complete headers in the piped output.
7410
7411 @item O P
7412 @kindex O P (Summary)
7413 @findex gnus-summary-muttprint
7414 @vindex gnus-summary-muttprint-program
7415 Save the current article into muttprint. That is, print it using the
7416 external program @uref{http://muttprint.sourceforge.net/,
7417 Muttprint}. The program name and options to use is controlled by the
7418 variable @code{gnus-summary-muttprint-program}.
7419 (@code{gnus-summary-muttprint}).
7420
7421 @end table
7422
7423 @vindex gnus-prompt-before-saving
7424 All these commands use the process/prefix convention
7425 (@pxref{Process/Prefix}). If you save bunches of articles using these
7426 functions, you might get tired of being prompted for files to save each
7427 and every article in. The prompting action is controlled by
7428 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7429 default, giving you that excessive prompting action you know and
7430 loathe. If you set this variable to @code{t} instead, you'll be prompted
7431 just once for each series of articles you save. If you like to really
7432 have Gnus do all your thinking for you, you can even set this variable
7433 to @code{nil}, which means that you will never be prompted for files to
7434 save articles in. Gnus will simply save all the articles in the default
7435 files.
7436
7437
7438 @vindex gnus-default-article-saver
7439 You can customize the @code{gnus-default-article-saver} variable to make
7440 Gnus do what you want it to. You can use any of the six ready-made
7441 functions below, or you can create your own.
7442
7443 @table @code
7444
7445 @item gnus-summary-save-in-rmail
7446 @findex gnus-summary-save-in-rmail
7447 @vindex gnus-rmail-save-name
7448 @findex gnus-plain-save-name
7449 This is the default format, @dfn{Babyl}. Uses the function in the
7450 @code{gnus-rmail-save-name} variable to get a file name to save the
7451 article in. The default is @code{gnus-plain-save-name}.
7452
7453 @item gnus-summary-save-in-mail
7454 @findex gnus-summary-save-in-mail
7455 @vindex gnus-mail-save-name
7456 Save in a Unix mail (mbox) file. Uses the function in the
7457 @code{gnus-mail-save-name} variable to get a file name to save the
7458 article in. The default is @code{gnus-plain-save-name}.
7459
7460 @item gnus-summary-save-in-file
7461 @findex gnus-summary-save-in-file
7462 @vindex gnus-file-save-name
7463 @findex gnus-numeric-save-name
7464 Append the article straight to an ordinary file. Uses the function in
7465 the @code{gnus-file-save-name} variable to get a file name to save the
7466 article in. The default is @code{gnus-numeric-save-name}.
7467
7468 @item gnus-summary-write-to-file
7469 @findex gnus-summary-write-to-file
7470 Write the article straight to an ordinary file. The file is
7471 overwritten if it exists. Uses the function in the
7472 @code{gnus-file-save-name} variable to get a file name to save the
7473 article in. The default is @code{gnus-numeric-save-name}.
7474
7475 @item gnus-summary-save-body-in-file
7476 @findex gnus-summary-save-body-in-file
7477 Append the article body to an ordinary file. Uses the function in the
7478 @code{gnus-file-save-name} variable to get a file name to save the
7479 article in. The default is @code{gnus-numeric-save-name}.
7480
7481 @item gnus-summary-save-in-folder
7482 @findex gnus-summary-save-in-folder
7483 @findex gnus-folder-save-name
7484 @findex gnus-Folder-save-name
7485 @vindex gnus-folder-save-name
7486 @cindex rcvstore
7487 @cindex MH folders
7488 Save the article to an MH folder using @code{rcvstore} from the MH
7489 library. Uses the function in the @code{gnus-folder-save-name} variable
7490 to get a file name to save the article in. The default is
7491 @code{gnus-folder-save-name}, but you can also use
7492 @code{gnus-Folder-save-name}, which creates capitalized names.
7493
7494 @item gnus-summary-save-in-vm
7495 @findex gnus-summary-save-in-vm
7496 Save the article in a VM folder. You have to have the VM mail
7497 reader to use this setting.
7498 @end table
7499
7500 @vindex gnus-article-save-directory
7501 All of these functions, except for the last one, will save the article
7502 in the @code{gnus-article-save-directory}, which is initialized from the
7503 @env{SAVEDIR} environment variable. This is @file{~/News/} by
7504 default.
7505
7506 As you can see above, the functions use different functions to find a
7507 suitable name of a file to save the article in. Below is a list of
7508 available functions that generate names:
7509
7510 @table @code
7511
7512 @item gnus-Numeric-save-name
7513 @findex gnus-Numeric-save-name
7514 File names like @file{~/News/Alt.andrea-dworkin/45}.
7515
7516 @item gnus-numeric-save-name
7517 @findex gnus-numeric-save-name
7518 File names like @file{~/News/alt.andrea-dworkin/45}.
7519
7520 @item gnus-Plain-save-name
7521 @findex gnus-Plain-save-name
7522 File names like @file{~/News/Alt.andrea-dworkin}.
7523
7524 @item gnus-plain-save-name
7525 @findex gnus-plain-save-name
7526 File names like @file{~/News/alt.andrea-dworkin}.
7527
7528 @item gnus-sender-save-name
7529 @findex gnus-sender-save-name
7530 File names like @file{~/News/larsi}.
7531 @end table
7532
7533 @vindex gnus-split-methods
7534 You can have Gnus suggest where to save articles by plonking a regexp into
7535 the @code{gnus-split-methods} alist. For instance, if you would like to
7536 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7537 related to VM in @file{vm-stuff}, you could set this variable to something
7538 like:
7539
7540 @lisp
7541 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7542 ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7543 (my-choosing-function "../other-dir/my-stuff")
7544 ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7545 @end lisp
7546
7547 We see that this is a list where each element is a list that has two
7548 elements---the @dfn{match} and the @dfn{file}. The match can either be
7549 a string (in which case it is used as a regexp to match on the article
7550 head); it can be a symbol (which will be called as a function with the
7551 group name as a parameter); or it can be a list (which will be
7552 @code{eval}ed). If any of these actions have a non-@code{nil} result,
7553 the @dfn{file} will be used as a default prompt. In addition, the
7554 result of the operation itself will be used if the function or form
7555 called returns a string or a list of strings.
7556
7557 You basically end up with a list of file names that might be used when
7558 saving the current article. (All ``matches'' will be used.) You will
7559 then be prompted for what you really want to use as a name, with file
7560 name completion over the results from applying this variable.
7561
7562 This variable is @code{((gnus-article-archive-name))} by default, which
7563 means that Gnus will look at the articles it saves for an
7564 @code{Archive-name} line and use that as a suggestion for the file
7565 name.
7566
7567 Here's an example function to clean up file names somewhat. If you have
7568 lots of mail groups called things like
7569 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7570 these group names before creating the file name to save to. The
7571 following will do just that:
7572
7573 @lisp
7574 (defun my-save-name (group)
7575 (when (string-match "^nnml:mail." group)
7576 (substring group (match-end 0))))
7577
7578 (setq gnus-split-methods
7579 '((gnus-article-archive-name)
7580 (my-save-name)))
7581 @end lisp
7582
7583
7584 @vindex gnus-use-long-file-name
7585 Finally, you have the @code{gnus-use-long-file-name} variable. If it is
7586 @code{nil}, all the preceding functions will replace all periods
7587 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7588 the functions will generate hierarchies of directories instead of having
7589 all the files in the top level directory
7590 (@file{~/News/alt/andrea-dworkin} instead of
7591 @file{~/News/alt.andrea-dworkin}.) This variable is @code{t} by default
7592 on most systems. However, for historical reasons, this is @code{nil} on
7593 Xenix and usg-unix-v machines by default.
7594
7595 This function also affects kill and score file names. If this variable
7596 is a list, and the list contains the element @code{not-score}, long file
7597 names will not be used for score files, if it contains the element
7598 @code{not-save}, long file names will not be used for saving, and if it
7599 contains the element @code{not-kill}, long file names will not be used
7600 for kill files.
7601
7602 If you'd like to save articles in a hierarchy that looks something like
7603 a spool, you could
7604
7605 @lisp
7606 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7607 (setq gnus-default-article-saver
7608 'gnus-summary-save-in-file) ; @r{no encoding}
7609 @end lisp
7610
7611 Then just save with @kbd{o}. You'd then read this hierarchy with
7612 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7613 the top level directory as the argument (@file{~/News/}). Then just walk
7614 around to the groups/directories with @code{nneething}.
7615
7616
7617 @node Decoding Articles
7618 @section Decoding Articles
7619 @cindex decoding articles
7620
7621 Sometime users post articles (or series of articles) that have been
7622 encoded in some way or other. Gnus can decode them for you.
7623
7624 @menu
7625 * Uuencoded Articles:: Uudecode articles.
7626 * Shell Archives:: Unshar articles.
7627 * PostScript Files:: Split PostScript.
7628 * Other Files:: Plain save and binhex.
7629 * Decoding Variables:: Variables for a happy decoding.
7630 * Viewing Files:: You want to look at the result of the decoding?
7631 @end menu
7632
7633 @cindex series
7634 @cindex article series
7635 All these functions use the process/prefix convention
7636 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7637 the extension that a ``single article'' means ``a single series''. Gnus
7638 can find out by itself what articles belong to a series, decode all the
7639 articles and unpack/view/save the resulting file(s).
7640
7641 Gnus guesses what articles are in the series according to the following
7642 simplish rule: The subjects must be (nearly) identical, except for the
7643 last two numbers of the line. (Spaces are largely ignored, however.)
7644
7645 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7646 will find all the articles that match the regexp @samp{^cat.gif
7647 ([0-9]+/[0-9]+).*$}.
7648
7649 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7650 series}, will not be properly recognized by any of the automatic viewing
7651 commands, and you have to mark the articles manually with @kbd{#}.
7652
7653
7654 @node Uuencoded Articles
7655 @subsection Uuencoded Articles
7656 @cindex uudecode
7657 @cindex uuencoded articles
7658
7659 @table @kbd
7660
7661 @item X u
7662 @kindex X u (Summary)
7663 @findex gnus-uu-decode-uu
7664 @c @icon{gnus-uu-decode-uu}
7665 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7666
7667 @item X U
7668 @kindex X U (Summary)
7669 @findex gnus-uu-decode-uu-and-save
7670 Uudecodes and saves the current series
7671 (@code{gnus-uu-decode-uu-and-save}).
7672
7673 @item X v u
7674 @kindex X v u (Summary)
7675 @findex gnus-uu-decode-uu-view
7676 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7677
7678 @item X v U
7679 @kindex X v U (Summary)
7680 @findex gnus-uu-decode-uu-and-save-view
7681 Uudecodes, views and saves the current series
7682 (@code{gnus-uu-decode-uu-and-save-view}).
7683
7684 @end table
7685
7686 Remember that these all react to the presence of articles marked with
7687 the process mark. If, for instance, you'd like to decode and save an
7688 entire newsgroup, you'd typically do @kbd{M P a}
7689 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7690 (@code{gnus-uu-decode-uu-and-save}).
7691
7692 All this is very much different from how @code{gnus-uu} worked with
7693 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7694 the sun. This version of @code{gnus-uu} generally assumes that you mark
7695 articles in some way (@pxref{Setting Process Marks}) and then press
7696 @kbd{X u}.
7697
7698 @vindex gnus-uu-notify-files
7699 Note: When trying to decode articles that have names matching
7700 @code{gnus-uu-notify-files}, which is hard-coded to
7701 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7702 automatically post an article on @samp{comp.unix.wizards} saying that
7703 you have just viewed the file in question. This feature can't be turned
7704 off.
7705
7706
7707 @node Shell Archives
7708 @subsection Shell Archives
7709 @cindex unshar
7710 @cindex shell archives
7711 @cindex shared articles
7712
7713 Shell archives (``shar files'') used to be a popular way to distribute
7714 sources, but it isn't used all that much today. In any case, we have
7715 some commands to deal with these:
7716
7717 @table @kbd
7718
7719 @item X s
7720 @kindex X s (Summary)
7721 @findex gnus-uu-decode-unshar
7722 Unshars the current series (@code{gnus-uu-decode-unshar}).
7723
7724 @item X S
7725 @kindex X S (Summary)
7726 @findex gnus-uu-decode-unshar-and-save
7727 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7728
7729 @item X v s
7730 @kindex X v s (Summary)
7731 @findex gnus-uu-decode-unshar-view
7732 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7733
7734 @item X v S
7735 @kindex X v S (Summary)
7736 @findex gnus-uu-decode-unshar-and-save-view
7737 Unshars, views and saves the current series
7738 (@code{gnus-uu-decode-unshar-and-save-view}).
7739 @end table
7740
7741
7742 @node PostScript Files
7743 @subsection PostScript Files
7744 @cindex PostScript
7745
7746 @table @kbd
7747
7748 @item X p
7749 @kindex X p (Summary)
7750 @findex gnus-uu-decode-postscript
7751 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7752
7753 @item X P
7754 @kindex X P (Summary)
7755 @findex gnus-uu-decode-postscript-and-save
7756 Unpack and save the current PostScript series
7757 (@code{gnus-uu-decode-postscript-and-save}).
7758
7759 @item X v p
7760 @kindex X v p (Summary)
7761 @findex gnus-uu-decode-postscript-view
7762 View the current PostScript series
7763 (@code{gnus-uu-decode-postscript-view}).
7764
7765 @item X v P
7766 @kindex X v P (Summary)
7767 @findex gnus-uu-decode-postscript-and-save-view
7768 View and save the current PostScript series
7769 (@code{gnus-uu-decode-postscript-and-save-view}).
7770 @end table
7771
7772
7773 @node Other Files
7774 @subsection Other Files
7775
7776 @table @kbd
7777 @item X o
7778 @kindex X o (Summary)
7779 @findex gnus-uu-decode-save
7780 Save the current series
7781 (@code{gnus-uu-decode-save}).
7782
7783 @item X b
7784 @kindex X b (Summary)
7785 @findex gnus-uu-decode-binhex
7786 Unbinhex the current series (@code{gnus-uu-decode-binhex}). This
7787 doesn't really work yet.
7788 @end table
7789
7790
7791 @node Decoding Variables
7792 @subsection Decoding Variables
7793
7794 Adjective, not verb.
7795
7796 @menu
7797 * Rule Variables:: Variables that say how a file is to be viewed.
7798 * Other Decode Variables:: Other decode variables.
7799 * Uuencoding and Posting:: Variables for customizing uuencoding.
7800 @end menu
7801
7802
7803 @node Rule Variables
7804 @subsubsection Rule Variables
7805 @cindex rule variables
7806
7807 Gnus uses @dfn{rule variables} to decide how to view a file. All these
7808 variables are of the form
7809
7810 @lisp
7811 (list '(regexp1 command2)
7812 '(regexp2 command2)
7813 ...)
7814 @end lisp
7815
7816 @table @code
7817
7818 @item gnus-uu-user-view-rules
7819 @vindex gnus-uu-user-view-rules
7820 @cindex sox
7821 This variable is consulted first when viewing files. If you wish to use,
7822 for instance, @code{sox} to convert an @file{.au} sound file, you could
7823 say something like:
7824 @lisp
7825 (setq gnus-uu-user-view-rules
7826 (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7827 @end lisp
7828
7829 @item gnus-uu-user-view-rules-end
7830 @vindex gnus-uu-user-view-rules-end
7831 This variable is consulted if Gnus couldn't make any matches from the
7832 user and default view rules.
7833
7834 @item gnus-uu-user-archive-rules
7835 @vindex gnus-uu-user-archive-rules
7836 This variable can be used to say what commands should be used to unpack
7837 archives.
7838 @end table
7839
7840
7841 @node Other Decode Variables
7842 @subsubsection Other Decode Variables
7843
7844 @table @code
7845 @vindex gnus-uu-grabbed-file-functions
7846
7847 @item gnus-uu-grabbed-file-functions
7848 All functions in this list will be called right after each file has been
7849 successfully decoded---so that you can move or view files right away,
7850 and don't have to wait for all files to be decoded before you can do
7851 anything. Ready-made functions you can put in this list are:
7852
7853 @table @code
7854
7855 @item gnus-uu-grab-view
7856 @findex gnus-uu-grab-view
7857 View the file.
7858
7859 @item gnus-uu-grab-move
7860 @findex gnus-uu-grab-move
7861 Move the file (if you're using a saving function.)
7862 @end table
7863
7864 @item gnus-uu-be-dangerous
7865 @vindex gnus-uu-be-dangerous
7866 Specifies what to do if unusual situations arise during decoding. If
7867 @code{nil}, be as conservative as possible. If @code{t}, ignore things
7868 that didn't work, and overwrite existing files. Otherwise, ask each
7869 time.
7870
7871 @item gnus-uu-ignore-files-by-name
7872 @vindex gnus-uu-ignore-files-by-name
7873 Files with name matching this regular expression won't be viewed.
7874
7875 @item gnus-uu-ignore-files-by-type
7876 @vindex gnus-uu-ignore-files-by-type
7877 Files with a @acronym{MIME} type matching this variable won't be viewed.
7878 Note that Gnus tries to guess what type the file is based on the name.
7879 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7880 kludgey.
7881
7882 @item gnus-uu-tmp-dir
7883 @vindex gnus-uu-tmp-dir
7884 Where @code{gnus-uu} does its work.
7885
7886 @item gnus-uu-do-not-unpack-archives
7887 @vindex gnus-uu-do-not-unpack-archives
7888 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7889 looking for files to display.
7890
7891 @item gnus-uu-view-and-save
7892 @vindex gnus-uu-view-and-save
7893 Non-@code{nil} means that the user will always be asked to save a file
7894 after viewing it.
7895
7896 @item gnus-uu-ignore-default-view-rules
7897 @vindex gnus-uu-ignore-default-view-rules
7898 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7899 rules.
7900
7901 @item gnus-uu-ignore-default-archive-rules
7902 @vindex gnus-uu-ignore-default-archive-rules
7903 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7904 unpacking commands.
7905
7906 @item gnus-uu-kill-carriage-return
7907 @vindex gnus-uu-kill-carriage-return
7908 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7909 from articles.
7910
7911 @item gnus-uu-unmark-articles-not-decoded
7912 @vindex gnus-uu-unmark-articles-not-decoded
7913 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7914 decoded articles as unread.
7915
7916 @item gnus-uu-correct-stripped-uucode
7917 @vindex gnus-uu-correct-stripped-uucode
7918 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7919 uuencoded files that have had trailing spaces deleted.
7920
7921 @item gnus-uu-pre-uudecode-hook
7922 @vindex gnus-uu-pre-uudecode-hook
7923 Hook run before sending a message to @code{uudecode}.
7924
7925 @item gnus-uu-view-with-metamail
7926 @vindex gnus-uu-view-with-metamail
7927 @cindex metamail
7928 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7929 commands defined by the rule variables and just fudge a @acronym{MIME}
7930 content type based on the file name. The result will be fed to
7931 @code{metamail} for viewing.
7932
7933 @item gnus-uu-save-in-digest
7934 @vindex gnus-uu-save-in-digest
7935 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7936 decoding, will save in digests. If this variable is @code{nil},
7937 @code{gnus-uu} will just save everything in a file without any
7938 embellishments. The digesting almost conforms to RFC 1153---no easy way
7939 to specify any meaningful volume and issue numbers were found, so I
7940 simply dropped them.
7941
7942 @end table
7943
7944
7945 @node Uuencoding and Posting
7946 @subsubsection Uuencoding and Posting
7947
7948 @table @code
7949
7950 @item gnus-uu-post-include-before-composing
7951 @vindex gnus-uu-post-include-before-composing
7952 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7953 before you compose the article. If this variable is @code{t}, you can
7954 either include an encoded file with @kbd{C-c C-i} or have one included
7955 for you when you post the article.
7956
7957 @item gnus-uu-post-length
7958 @vindex gnus-uu-post-length
7959 Maximum length of an article. The encoded file will be split into how
7960 many articles it takes to post the entire file.
7961
7962 @item gnus-uu-post-threaded
7963 @vindex gnus-uu-post-threaded
7964 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7965 thread. This may not be smart, as no other decoder I have seen is able
7966 to follow threads when collecting uuencoded articles. (Well, I have
7967 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7968 think that counts@dots{}) Default is @code{nil}.
7969
7970 @item gnus-uu-post-separate-description
7971 @vindex gnus-uu-post-separate-description
7972 Non-@code{nil} means that the description will be posted in a separate
7973 article. The first article will typically be numbered (0/x). If this
7974 variable is @code{nil}, the description the user enters will be included
7975 at the beginning of the first article, which will be numbered (1/x).
7976 Default is @code{t}.
7977
7978 @end table
7979
7980
7981 @node Viewing Files
7982 @subsection Viewing Files
7983 @cindex viewing files
7984 @cindex pseudo-articles
7985
7986 After decoding, if the file is some sort of archive, Gnus will attempt
7987 to unpack the archive and see if any of the files in the archive can be
7988 viewed. For instance, if you have a gzipped tar file @file{pics.tar.gz}
7989 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7990 uncompress and de-tar the main file, and then view the two pictures.
7991 This unpacking process is recursive, so if the archive contains archives
7992 of archives, it'll all be unpacked.
7993
7994 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7995 extracted file into the summary buffer. If you go to these
7996 ``articles'', you will be prompted for a command to run (usually Gnus
7997 will make a suggestion), and then the command will be run.
7998
7999 @vindex gnus-view-pseudo-asynchronously
8000 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
8001 until the viewing is done before proceeding.
8002
8003 @vindex gnus-view-pseudos
8004 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
8005 the pseudo-articles into the summary buffer, but view them
8006 immediately. If this variable is @code{not-confirm}, the user won't even
8007 be asked for a confirmation before viewing is done.
8008
8009 @vindex gnus-view-pseudos-separately
8010 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
8011 pseudo-article will be created for each file to be viewed. If
8012 @code{nil}, all files that use the same viewing command will be given as
8013 a list of parameters to that command.
8014
8015 @vindex gnus-insert-pseudo-articles
8016 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
8017 pseudo-articles when decoding. It is @code{t} by default.
8018
8019 So; there you are, reading your @emph{pseudo-articles} in your
8020 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
8021 Why isn't anything real anymore? How did we get here?
8022
8023
8024 @node Article Treatment
8025 @section Article Treatment
8026
8027 Reading through this huge manual, you may have quite forgotten that the
8028 object of newsreaders is to actually, like, read what people have
8029 written. Reading articles. Unfortunately, people are quite bad at
8030 writing, so there are tons of functions and variables to make reading
8031 these articles easier.
8032
8033 @menu
8034 * Article Highlighting:: You want to make the article look like fruit salad.
8035 * Article Fontisizing:: Making emphasized text look nice.
8036 * Article Hiding:: You also want to make certain info go away.
8037 * Article Washing:: Lots of way-neat functions to make life better.
8038 * Article Header:: Doing various header transformations.
8039 * Article Buttons:: Click on URLs, Message-IDs, addresses and the like.
8040 * Article Button Levels:: Controlling appearance of buttons.
8041 * Article Date:: Grumble, UT!
8042 * Article Display:: Display various stuff---X-Face, Picons, Smileys
8043 * Article Signature:: What is a signature?
8044 * Article Miscellanea:: Various other stuff.
8045 @end menu
8046
8047
8048 @node Article Highlighting
8049 @subsection Article Highlighting
8050 @cindex highlighting
8051
8052 Not only do you want your article buffer to look like fruit salad, but
8053 you want it to look like technicolor fruit salad.
8054
8055 @table @kbd
8056
8057 @item W H a
8058 @kindex W H a (Summary)
8059 @findex gnus-article-highlight
8060 @findex gnus-article-maybe-highlight
8061 Do much highlighting of the current article
8062 (@code{gnus-article-highlight}). This function highlights header, cited
8063 text, the signature, and adds buttons to the body and the head.
8064
8065 @item W H h
8066 @kindex W H h (Summary)
8067 @findex gnus-article-highlight-headers
8068 @vindex gnus-header-face-alist
8069 Highlight the headers (@code{gnus-article-highlight-headers}). The
8070 highlighting will be done according to the @code{gnus-header-face-alist}
8071 variable, which is a list where each element has the form
8072 @code{(@var{regexp} @var{name} @var{content})}.
8073 @var{regexp} is a regular expression for matching the
8074 header, @var{name} is the face used for highlighting the header name
8075 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8076 the header value. The first match made will be used. Note that
8077 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8078
8079 @item W H c
8080 @kindex W H c (Summary)
8081 @findex gnus-article-highlight-citation
8082 Highlight cited text (@code{gnus-article-highlight-citation}).
8083
8084 Some variables to customize the citation highlights:
8085
8086 @table @code
8087 @vindex gnus-cite-parse-max-size
8088
8089 @item gnus-cite-parse-max-size
8090 If the article size if bigger than this variable (which is 25000 by
8091 default), no citation highlighting will be performed.
8092
8093 @item gnus-cite-max-prefix
8094 @vindex gnus-cite-max-prefix
8095 Maximum possible length for a citation prefix (default 20).
8096
8097 @item gnus-cite-face-list
8098 @vindex gnus-cite-face-list
8099 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8100 When there are citations from multiple articles in the same message,
8101 Gnus will try to give each citation from each article its own face.
8102 This should make it easier to see who wrote what.
8103
8104 @item gnus-supercite-regexp
8105 @vindex gnus-supercite-regexp
8106 Regexp matching normal Supercite attribution lines.
8107
8108 @item gnus-supercite-secondary-regexp
8109 @vindex gnus-supercite-secondary-regexp
8110 Regexp matching mangled Supercite attribution lines.
8111
8112 @item gnus-cite-minimum-match-count
8113 @vindex gnus-cite-minimum-match-count
8114 Minimum number of identical prefixes we have to see before we believe
8115 that it's a citation.
8116
8117 @item gnus-cite-attribution-prefix
8118 @vindex gnus-cite-attribution-prefix
8119 Regexp matching the beginning of an attribution line.
8120
8121 @item gnus-cite-attribution-suffix
8122 @vindex gnus-cite-attribution-suffix
8123 Regexp matching the end of an attribution line.
8124
8125 @item gnus-cite-attribution-face
8126 @vindex gnus-cite-attribution-face
8127 Face used for attribution lines. It is merged with the face for the
8128 cited text belonging to the attribution.
8129
8130 @item gnus-cite-ignore-quoted-from
8131 @vindex gnus-cite-ignore-quoted-from
8132 If non-@code{nil}, no citation highlighting will be performed on lines
8133 beginning with @samp{>From }. Those lines may have been quoted by MTAs
8134 in order not to mix up with the envelope From line. The default value
8135 is @code{t}.
8136
8137 @end table
8138
8139
8140 @item W H s
8141 @kindex W H s (Summary)
8142 @vindex gnus-signature-separator
8143 @vindex gnus-signature-face
8144 @findex gnus-article-highlight-signature
8145 Highlight the signature (@code{gnus-article-highlight-signature}).
8146 Everything after @code{gnus-signature-separator} (@pxref{Article
8147 Signature}) in an article will be considered a signature and will be
8148 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8149 default.
8150
8151 @end table
8152
8153 @xref{Customizing Articles}, for how to highlight articles automatically.
8154
8155
8156 @node Article Fontisizing
8157 @subsection Article Fontisizing
8158 @cindex emphasis
8159 @cindex article emphasis
8160
8161 @findex gnus-article-emphasize
8162 @kindex W e (Summary)
8163 People commonly add emphasis to words in news articles by writing things
8164 like @samp{_this_} or @samp{*this*} or @samp{/this/}. Gnus can make
8165 this look nicer by running the article through the @kbd{W e}
8166 (@code{gnus-article-emphasize}) command.
8167
8168 @vindex gnus-emphasis-alist
8169 How the emphasis is computed is controlled by the
8170 @code{gnus-emphasis-alist} variable. This is an alist where the first
8171 element is a regular expression to be matched. The second is a number
8172 that says what regular expression grouping is used to find the entire
8173 emphasized word. The third is a number that says what regexp grouping
8174 should be displayed and highlighted. (The text between these two
8175 groupings will be hidden.) The fourth is the face used for
8176 highlighting.
8177
8178 @lisp
8179 (setq gnus-emphasis-alist
8180 '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8181 ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8182 @end lisp
8183
8184 @cindex slash
8185 @cindex asterisk
8186 @cindex underline
8187 @cindex /
8188 @cindex *
8189
8190 @vindex gnus-emphasis-underline
8191 @vindex gnus-emphasis-bold
8192 @vindex gnus-emphasis-italic
8193 @vindex gnus-emphasis-underline-bold
8194 @vindex gnus-emphasis-underline-italic
8195 @vindex gnus-emphasis-bold-italic
8196 @vindex gnus-emphasis-underline-bold-italic
8197 By default, there are seven rules, and they use the following faces:
8198 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8199 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8200 @code{gnus-emphasis-underline-italic},
8201 @code{gnus-emphasis-underline-bold}, and
8202 @code{gnus-emphasis-underline-bold-italic}.
8203
8204 If you want to change these faces, you can either use @kbd{M-x
8205 customize}, or you can use @code{copy-face}. For instance, if you want
8206 to make @code{gnus-emphasis-italic} use a red face instead, you could
8207 say something like:
8208
8209 @lisp
8210 (copy-face 'red 'gnus-emphasis-italic)
8211 @end lisp
8212
8213 @vindex gnus-group-highlight-words-alist
8214
8215 If you want to highlight arbitrary words, you can use the
8216 @code{gnus-group-highlight-words-alist} variable, which uses the same
8217 syntax as @code{gnus-emphasis-alist}. The @code{highlight-words} group
8218 parameter (@pxref{Group Parameters}) can also be used.
8219
8220 @xref{Customizing Articles}, for how to fontize articles automatically.
8221
8222
8223 @node Article Hiding
8224 @subsection Article Hiding
8225 @cindex article hiding
8226
8227 Or rather, hiding certain things in each article. There usually is much
8228 too much cruft in most articles.
8229
8230 @table @kbd
8231
8232 @item W W a
8233 @kindex W W a (Summary)
8234 @findex gnus-article-hide
8235 Do quite a lot of hiding on the article buffer
8236 (@kbd{gnus-article-hide}). In particular, this function will hide
8237 headers, @acronym{PGP}, cited text and the signature.
8238
8239 @item W W h
8240 @kindex W W h (Summary)
8241 @findex gnus-article-hide-headers
8242 Hide headers (@code{gnus-article-hide-headers}). @xref{Hiding
8243 Headers}.
8244
8245 @item W W b
8246 @kindex W W b (Summary)
8247 @findex gnus-article-hide-boring-headers
8248 Hide headers that aren't particularly interesting
8249 (@code{gnus-article-hide-boring-headers}). @xref{Hiding Headers}.
8250
8251 @item W W s
8252 @kindex W W s (Summary)
8253 @findex gnus-article-hide-signature
8254 Hide signature (@code{gnus-article-hide-signature}). @xref{Article
8255 Signature}.
8256
8257 @item W W l
8258 @kindex W W l (Summary)
8259 @findex gnus-article-hide-list-identifiers
8260 @vindex gnus-list-identifiers
8261 Strip list identifiers specified in @code{gnus-list-identifiers}. These
8262 are strings some mailing list servers add to the beginning of all
8263 @code{Subject} headers---for example, @samp{[zebra 4711]}. Any leading
8264 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8265 may not contain @code{\\(..\\)}.
8266
8267 @table @code
8268
8269 @item gnus-list-identifiers
8270 @vindex gnus-list-identifiers
8271 A regular expression that matches list identifiers to be removed from
8272 subject. This can also be a list of regular expressions.
8273
8274 @end table
8275
8276 @item W W P
8277 @kindex W W P (Summary)
8278 @findex gnus-article-hide-pem
8279 Hide @acronym{PEM} (privacy enhanced messages) cruft
8280 (@code{gnus-article-hide-pem}).
8281
8282 @item W W B
8283 @kindex W W B (Summary)
8284 @findex gnus-article-strip-banner
8285 @vindex gnus-article-banner-alist
8286 @vindex gnus-article-address-banner-alist
8287 @cindex banner
8288 @cindex OneList
8289 @cindex stripping advertisements
8290 @cindex advertisements
8291 Strip the banner specified by the @code{banner} group parameter
8292 (@code{gnus-article-strip-banner}). This is mainly used to hide those
8293 annoying banners and/or signatures that some mailing lists and moderated
8294 groups adds to all the messages. The way to use this function is to add
8295 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8296 group you want banners stripped from. The parameter either be a string,
8297 which will be interpreted as a regular expression matching text to be
8298 removed, or the symbol @code{signature}, meaning that the (last)
8299 signature should be removed, or other symbol, meaning that the
8300 corresponding regular expression in @code{gnus-article-banner-alist} is
8301 used.
8302
8303 Regardless of a group, you can hide things like advertisements only when
8304 the sender of an article has a certain mail address specified in
8305 @code{gnus-article-address-banner-alist}.
8306
8307 @table @code
8308
8309 @item gnus-article-address-banner-alist
8310 @vindex gnus-article-address-banner-alist
8311 Alist of mail addresses and banners. Each element has the form
8312 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8313 matching a mail address in the From header, @var{banner} is one of a
8314 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8315 a regexp and @code{nil}. If @var{address} matches author's mail
8316 address, it will remove things like advertisements. For example, if a
8317 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8318 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8319 sends, you can use the following element to remove them:
8320
8321 @lisp
8322 ("@@yoo-hoo\\.co\\.jp\\'" .
8323 "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8324 @end lisp
8325
8326 @end table
8327
8328 @item W W c
8329 @kindex W W c (Summary)
8330 @findex gnus-article-hide-citation
8331 Hide citation (@code{gnus-article-hide-citation}). Some variables for
8332 customizing the hiding:
8333
8334 @table @code
8335
8336 @item gnus-cited-opened-text-button-line-format
8337 @itemx gnus-cited-closed-text-button-line-format
8338 @vindex gnus-cited-closed-text-button-line-format
8339 @vindex gnus-cited-opened-text-button-line-format
8340 Gnus adds buttons to show where the cited text has been hidden, and to
8341 allow toggle hiding the text. The format of the variable is specified
8342 by these format-like variable (@pxref{Formatting Variables}). These
8343 specs are valid:
8344
8345 @table @samp
8346 @item b
8347 Starting point of the hidden text.
8348 @item e
8349 Ending point of the hidden text.
8350 @item l
8351 Number of characters in the hidden region.
8352 @item n
8353 Number of lines of hidden text.
8354 @end table
8355
8356 @item gnus-cited-lines-visible
8357 @vindex gnus-cited-lines-visible
8358 The number of lines at the beginning of the cited text to leave
8359 shown. This can also be a cons cell with the number of lines at the top
8360 and bottom of the text, respectively, to remain visible.
8361
8362 @end table
8363
8364 @item W W C-c
8365 @kindex W W C-c (Summary)
8366 @findex gnus-article-hide-citation-maybe
8367
8368 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8369 following two variables:
8370
8371 @table @code
8372 @item gnus-cite-hide-percentage
8373 @vindex gnus-cite-hide-percentage
8374 If the cited text is of a bigger percentage than this variable (default
8375 50), hide the cited text.
8376
8377 @item gnus-cite-hide-absolute
8378 @vindex gnus-cite-hide-absolute
8379 The cited text must have at least this length (default 10) before it
8380 is hidden.
8381 @end table
8382
8383 @item W W C
8384 @kindex W W C (Summary)
8385 @findex gnus-article-hide-citation-in-followups
8386 Hide cited text in articles that aren't roots
8387 (@code{gnus-article-hide-citation-in-followups}). This isn't very
8388 useful as an interactive command, but might be a handy function to stick
8389 have happen automatically (@pxref{Customizing Articles}).
8390
8391 @end table
8392
8393 All these ``hiding'' commands are toggles, but if you give a negative
8394 prefix to these commands, they will show what they have previously
8395 hidden. If you give a positive prefix, they will always hide.
8396
8397 Also @pxref{Article Highlighting} for further variables for
8398 citation customization.
8399
8400 @xref{Customizing Articles}, for how to hide article elements
8401 automatically.
8402
8403
8404 @node Article Washing
8405 @subsection Article Washing
8406 @cindex washing
8407 @cindex article washing
8408
8409 We call this ``article washing'' for a really good reason. Namely, the
8410 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8411
8412 @dfn{Washing} is defined by us as ``changing something from something to
8413 something else'', but normally results in something looking better.
8414 Cleaner, perhaps.
8415
8416 @xref{Customizing Articles}, if you want to change how Gnus displays
8417 articles by default.
8418
8419 @table @kbd
8420
8421 @item C-u g
8422 This is not really washing, it's sort of the opposite of washing. If
8423 you type this, you see the article exactly as it exists on disk or on
8424 the server.
8425
8426 @item g
8427 Force redisplaying of the current article
8428 (@code{gnus-summary-show-article}). This is also not really washing.
8429 If you type this, you see the article without any previously applied
8430 interactive Washing functions but with all default treatments
8431 (@pxref{Customizing Articles}).
8432
8433 @item W l
8434 @kindex W l (Summary)
8435 @findex gnus-summary-stop-page-breaking
8436 Remove page breaks from the current article
8437 (@code{gnus-summary-stop-page-breaking}). @xref{Misc Article}, for page
8438 delimiters.
8439
8440 @item W r
8441 @kindex W r (Summary)
8442 @findex gnus-summary-caesar-message
8443 @c @icon{gnus-summary-caesar-message}
8444 Do a Caesar rotate (rot13) on the article buffer
8445 (@code{gnus-summary-caesar-message}).
8446 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8447 (Typically offensive jokes and such.)
8448
8449 It's commonly called ``rot13'' because each letter is rotated 13
8450 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8451 #15). It is sometimes referred to as ``Caesar rotate'' because Caesar
8452 is rumored to have employed this form of, uh, somewhat weak encryption.
8453
8454 @item W m
8455 @kindex W m (Summary)
8456 @findex gnus-summary-morse-message
8457 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8458
8459 @item W t
8460 @item t
8461 @kindex W t (Summary)
8462 @kindex t (Summary)
8463 @findex gnus-summary-toggle-header
8464 Toggle whether to display all headers in the article buffer
8465 (@code{gnus-summary-toggle-header}).
8466
8467 @item W v
8468 @kindex W v (Summary)
8469 @findex gnus-summary-verbose-headers
8470 Toggle whether to display all headers in the article buffer permanently
8471 (@code{gnus-summary-verbose-headers}).
8472
8473 @item W o
8474 @kindex W o (Summary)
8475 @findex gnus-article-treat-overstrike
8476 Treat overstrike (@code{gnus-article-treat-overstrike}).
8477
8478 @item W d
8479 @kindex W d (Summary)
8480 @findex gnus-article-treat-dumbquotes
8481 @vindex gnus-article-dumbquotes-map
8482 @cindex Smartquotes
8483 @cindex M****s*** sm*rtq**t*s
8484 @cindex Latin 1
8485 Treat M****s*** sm*rtq**t*s according to
8486 @code{gnus-article-dumbquotes-map}
8487 (@code{gnus-article-treat-dumbquotes}). Note that this function guesses
8488 whether a character is a sm*rtq**t* or not, so it should only be used
8489 interactively.
8490
8491 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8492 an attempt to provide more quoting characters. If you see something
8493 like @code{\222} or @code{\264} where you're expecting some kind of
8494 apostrophe or quotation mark, then try this wash.
8495
8496 @item W Y f
8497 @kindex W Y f (Summary)
8498 @findex gnus-article-outlook-deuglify-article
8499 @cindex Outlook Express
8500 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8501 unwrap lines, repair attribution and rearrange citation.
8502 (@code{gnus-article-outlook-deuglify-article}).
8503
8504 @item W Y u
8505 @kindex W Y u (Summary)
8506 @findex gnus-article-outlook-unwrap-lines
8507 @vindex gnus-outlook-deuglify-unwrap-min
8508 @vindex gnus-outlook-deuglify-unwrap-max
8509 Unwrap lines that appear to be wrapped citation lines. You can control
8510 what lines will be unwrapped by frobbing
8511 @code{gnus-outlook-deuglify-unwrap-min} and
8512 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8513 maximum length of an unwrapped citation line.
8514 (@code{gnus-article-outlook-unwrap-lines}).
8515
8516 @item W Y a
8517 @kindex W Y a (Summary)
8518 @findex gnus-article-outlook-repair-attribution
8519 Repair a broken attribution line.@*
8520 (@code{gnus-article-outlook-repair-attribution}).
8521
8522 @item W Y c
8523 @kindex W Y c (Summary)
8524 @findex gnus-article-outlook-rearrange-citation
8525 Repair broken citations by rearranging the text.
8526 (@code{gnus-article-outlook-rearrange-citation}).
8527
8528 @item W w
8529 @kindex W w (Summary)
8530 @findex gnus-article-fill-cited-article
8531 Do word wrap (@code{gnus-article-fill-cited-article}).
8532
8533 You can give the command a numerical prefix to specify the width to use
8534 when filling.
8535
8536 @item W Q
8537 @kindex W Q (Summary)
8538 @findex gnus-article-fill-long-lines
8539 Fill long lines (@code{gnus-article-fill-long-lines}).
8540
8541 @item W C
8542 @kindex W C (Summary)
8543 @findex gnus-article-capitalize-sentences
8544 Capitalize the first word in each sentence
8545 (@code{gnus-article-capitalize-sentences}).
8546
8547 @item W c
8548 @kindex W c (Summary)
8549 @findex gnus-article-remove-cr
8550 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8551 (this takes care of DOS line endings), and then translate any remaining
8552 CRs into LF (this takes care of Mac line endings)
8553 (@code{gnus-article-remove-cr}).
8554
8555 @item W q
8556 @kindex W q (Summary)
8557 @findex gnus-article-de-quoted-unreadable
8558 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8559 Quoted-Printable is one common @acronym{MIME} encoding employed when
8560 sending non-@acronym{ASCII} (i.e., 8-bit) articles. It typically
8561 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8562 doesn't look very readable to me. Note that this is usually done
8563 automatically by Gnus if the message in question has a
8564 @code{Content-Transfer-Encoding} header that says that this encoding
8565 has been done. If a prefix is given, a charset will be asked for.
8566
8567 @item W 6
8568 @kindex W 6 (Summary)
8569 @findex gnus-article-de-base64-unreadable
8570 Treat base64 (@code{gnus-article-de-base64-unreadable}). Base64 is
8571 one common @acronym{MIME} encoding employed when sending
8572 non-@acronym{ASCII} (i.e., 8-bit) articles. Note that this is
8573 usually done automatically by Gnus if the message in question has a
8574 @code{Content-Transfer-Encoding} header that says that this encoding
8575 has been done. If a prefix is given, a charset will be asked for.
8576
8577 @item W Z
8578 @kindex W Z (Summary)
8579 @findex gnus-article-decode-HZ
8580 Treat HZ or HZP (@code{gnus-article-decode-HZ}). HZ (or HZP) is one
8581 common encoding employed when sending Chinese articles. It typically
8582 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8583
8584 @item W u
8585 @kindex W u (Summary)
8586 @findex gnus-article-unsplit-urls
8587 Remove newlines from within URLs. Some mailers insert newlines into
8588 outgoing email messages to keep lines short. This reformatting can
8589 split long URLs onto multiple lines. Repair those URLs by removing
8590 the newlines (@code{gnus-article-unsplit-urls}).
8591
8592 @item W h
8593 @kindex W h (Summary)
8594 @findex gnus-article-wash-html
8595 Treat @acronym{HTML} (@code{gnus-article-wash-html}). Note that this is
8596 usually done automatically by Gnus if the message in question has a
8597 @code{Content-Type} header that says that the message is @acronym{HTML}.
8598
8599 If a prefix is given, a charset will be asked for. If it is a number,
8600 the charset defined in @code{gnus-summary-show-article-charset-alist}
8601 (@pxref{Paging the Article}) will be used.
8602
8603 @vindex gnus-article-wash-function
8604 The default is to use the function specified by
8605 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8606 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8607 @acronym{HTML}, but this is controlled by the
8608 @code{gnus-article-wash-function} variable. Pre-defined functions you
8609 can use include:
8610
8611 @table @code
8612 @item w3
8613 Use Emacs/W3.
8614
8615 @item w3m
8616 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8617
8618 @item w3m-standalone
8619 Use @uref{http://w3m.sourceforge.net/, w3m}.
8620
8621 @item links
8622 Use @uref{http://links.sf.net/, Links}.
8623
8624 @item lynx
8625 Use @uref{http://lynx.isc.org/, Lynx}.
8626
8627 @item html2text
8628 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8629
8630 @end table
8631
8632 @item W b
8633 @kindex W b (Summary)
8634 @findex gnus-article-add-buttons
8635 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8636 @xref{Article Buttons}.
8637
8638 @item W B
8639 @kindex W B (Summary)
8640 @findex gnus-article-add-buttons-to-head
8641 Add clickable buttons to the article headers
8642 (@code{gnus-article-add-buttons-to-head}).
8643
8644 @item W p
8645 @kindex W p (Summary)
8646 @findex gnus-article-verify-x-pgp-sig
8647 Verify a signed control message
8648 (@code{gnus-article-verify-x-pgp-sig}). Control messages such as
8649 @code{newgroup} and @code{checkgroups} are usually signed by the
8650 hierarchy maintainer. You need to add the @acronym{PGP} public key of
8651 the maintainer to your keyring to verify the
8652 message.@footnote{@acronym{PGP} keys for many hierarchies are
8653 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8654
8655 @item W s
8656 @kindex W s (Summary)
8657 @findex gnus-summary-force-verify-and-decrypt
8658 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8659 @acronym{S/MIME}) message
8660 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8661
8662 @item W a
8663 @kindex W a (Summary)
8664 @findex gnus-article-strip-headers-in-body
8665 Strip headers like the @code{X-No-Archive} header from the beginning of
8666 article bodies (@code{gnus-article-strip-headers-in-body}).
8667
8668 @item W E l
8669 @kindex W E l (Summary)
8670 @findex gnus-article-strip-leading-blank-lines
8671 Remove all blank lines from the beginning of the article
8672 (@code{gnus-article-strip-leading-blank-lines}).
8673
8674 @item W E m
8675 @kindex W E m (Summary)
8676 @findex gnus-article-strip-multiple-blank-lines
8677 Replace all blank lines with empty lines and then all multiple empty
8678 lines with a single empty line.
8679 (@code{gnus-article-strip-multiple-blank-lines}).
8680
8681 @item W E t
8682 @kindex W E t (Summary)
8683 @findex gnus-article-remove-trailing-blank-lines
8684 Remove all blank lines at the end of the article
8685 (@code{gnus-article-remove-trailing-blank-lines}).
8686
8687 @item W E a
8688 @kindex W E a (Summary)
8689 @findex gnus-article-strip-blank-lines
8690 Do all the three commands above
8691 (@code{gnus-article-strip-blank-lines}).
8692
8693 @item W E A
8694 @kindex W E A (Summary)
8695 @findex gnus-article-strip-all-blank-lines
8696 Remove all blank lines
8697 (@code{gnus-article-strip-all-blank-lines}).
8698
8699 @item W E s
8700 @kindex W E s (Summary)
8701 @findex gnus-article-strip-leading-space
8702 Remove all white space from the beginning of all lines of the article
8703 body (@code{gnus-article-strip-leading-space}).
8704
8705 @item W E e
8706 @kindex W E e (Summary)
8707 @findex gnus-article-strip-trailing-space
8708 Remove all white space from the end of all lines of the article
8709 body (@code{gnus-article-strip-trailing-space}).
8710
8711 @end table
8712
8713 @xref{Customizing Articles}, for how to wash articles automatically.
8714
8715
8716 @node Article Header
8717 @subsection Article Header
8718
8719 These commands perform various transformations of article header.
8720
8721 @table @kbd
8722
8723 @item W G u
8724 @kindex W G u (Summary)
8725 @findex gnus-article-treat-unfold-headers
8726 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8727
8728 @item W G n
8729 @kindex W G n (Summary)
8730 @findex gnus-article-treat-fold-newsgroups
8731 Fold the @code{Newsgroups} and @code{Followup-To} headers
8732 (@code{gnus-article-treat-fold-newsgroups}).
8733
8734 @item W G f
8735 @kindex W G f (Summary)
8736 @findex gnus-article-treat-fold-headers
8737 Fold all the message headers
8738 (@code{gnus-article-treat-fold-headers}).
8739
8740 @item W E w
8741 @kindex W E w (Summary)
8742 @findex gnus-article-remove-leading-whitespace
8743 Remove excessive whitespace from all headers
8744 (@code{gnus-article-remove-leading-whitespace}).
8745
8746 @end table
8747
8748
8749 @node Article Buttons
8750 @subsection Article Buttons
8751 @cindex buttons
8752
8753 People often include references to other stuff in articles, and it would
8754 be nice if Gnus could just fetch whatever it is that people talk about
8755 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8756 button on these references.
8757
8758 @vindex gnus-button-man-handler
8759 Gnus adds @dfn{buttons} to certain standard references by default:
8760 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8761 Emacs or Gnus related references. This is controlled by two variables,
8762 one that handles article bodies and one that handles article heads:
8763
8764 @table @code
8765
8766 @item gnus-button-alist
8767 @vindex gnus-button-alist
8768 This is an alist where each entry has this form:
8769
8770 @lisp
8771 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8772 @end lisp
8773
8774 @table @var
8775
8776 @item regexp
8777 All text that match this regular expression (case insensitive) will be
8778 considered an external reference. Here's a typical regexp that matches
8779 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}. This can also be a
8780 variable containing a regexp, useful variables to use include
8781 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8782
8783 @item button-par
8784 Gnus has to know which parts of the matches is to be highlighted. This
8785 is a number that says what sub-expression of the regexp is to be
8786 highlighted. If you want it all highlighted, you use 0 here.
8787
8788 @item use-p
8789 This form will be @code{eval}ed, and if the result is non-@code{nil},
8790 this is considered a match. This is useful if you want extra sifting to
8791 avoid false matches. Often variables named
8792 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8793 Levels}, but any other form may be used too.
8794
8795 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8796
8797 @item function
8798 This function will be called when you click on this button.
8799
8800 @item data-par
8801 As with @var{button-par}, this is a sub-expression number, but this one
8802 says which part of the match is to be sent as data to @var{function}.
8803
8804 @end table
8805
8806 So the full entry for buttonizing URLs is then
8807
8808 @lisp
8809 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8810 @end lisp
8811
8812 @item gnus-header-button-alist
8813 @vindex gnus-header-button-alist
8814 This is just like the other alist, except that it is applied to the
8815 article head only, and that each entry has an additional element that is
8816 used to say what headers to apply the buttonize coding to:
8817
8818 @lisp
8819 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8820 @end lisp
8821
8822 @var{header} is a regular expression.
8823 @end table
8824
8825 @subsubsection Related variables and functions
8826
8827 @table @code
8828 @item gnus-button-@var{*}-level
8829 @xref{Article Button Levels}.
8830
8831 @c Stuff related to gnus-button-browse-level
8832
8833 @item gnus-button-url-regexp
8834 @vindex gnus-button-url-regexp
8835 A regular expression that matches embedded URLs. It is used in the
8836 default values of the variables above.
8837
8838 @c Stuff related to gnus-button-man-level
8839
8840 @item gnus-button-man-handler
8841 @vindex gnus-button-man-handler
8842 The function to use for displaying man pages. It must take at least one
8843 argument with a string naming the man page.
8844
8845 @c Stuff related to gnus-button-message-level
8846
8847 @item gnus-button-mid-or-mail-regexp
8848 @vindex gnus-button-mid-or-mail-regexp
8849 Regular expression that matches a message ID or a mail address.
8850
8851 @item gnus-button-prefer-mid-or-mail
8852 @vindex gnus-button-prefer-mid-or-mail
8853 This variable determines what to do when the button on a string as
8854 @samp{foo123@@bar.invalid} is pushed. Strings like this can be either a
8855 message ID or a mail address. If it is one of the symbols @code{mid} or
8856 @code{mail}, Gnus will always assume that the string is a message ID or
8857 a mail address, respectively. If this variable is set to the symbol
8858 @code{ask}, always query the user what do do. If it is a function, this
8859 function will be called with the string as its only argument. The
8860 function must return @code{mid}, @code{mail}, @code{invalid} or
8861 @code{ask}. The default value is the function
8862 @code{gnus-button-mid-or-mail-heuristic}.
8863
8864 @item gnus-button-mid-or-mail-heuristic
8865 @findex gnus-button-mid-or-mail-heuristic
8866 Function that guesses whether its argument is a message ID or a mail
8867 address. Returns @code{mid} if it's a message IDs, @code{mail} if
8868 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8869 string is invalid.
8870
8871 @item gnus-button-mid-or-mail-heuristic-alist
8872 @vindex gnus-button-mid-or-mail-heuristic-alist
8873 An alist of @code{(RATE . REGEXP)} pairs used by the function
8874 @code{gnus-button-mid-or-mail-heuristic}.
8875
8876 @c Stuff related to gnus-button-tex-level
8877
8878 @item gnus-button-ctan-handler
8879 @findex gnus-button-ctan-handler
8880 The function to use for displaying CTAN links. It must take one
8881 argument, the string naming the URL.
8882
8883 @item gnus-ctan-url
8884 @vindex gnus-ctan-url
8885 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8886 by @code{gnus-button-ctan-handler}.
8887
8888 @c Misc stuff
8889
8890 @item gnus-article-button-face
8891 @vindex gnus-article-button-face
8892 Face used on buttons.
8893
8894 @item gnus-article-mouse-face
8895 @vindex gnus-article-mouse-face
8896 Face used when the mouse cursor is over a button.
8897
8898 @end table
8899
8900 @xref{Customizing Articles}, for how to buttonize articles automatically.
8901
8902
8903 @node Article Button Levels
8904 @subsection Article button levels
8905 @cindex button levels
8906 The higher the value of the variables @code{gnus-button-@var{*}-level},
8907 the more buttons will appear. If the level is zero, no corresponding
8908 buttons are displayed. With the default value (which is 5) you should
8909 already see quite a lot of buttons. With higher levels, you will see
8910 more buttons, but you may also get more false positives. To avoid them,
8911 you can set the variables @code{gnus-button-@var{*}-level} local to
8912 specific groups (@pxref{Group Parameters}). Here's an example for the
8913 variable @code{gnus-parameters}:
8914
8915 @lisp
8916 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8917 (setq gnus-parameters
8918 '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8919 ("\\<unix\\>" (gnus-button-man-level 10))
8920 ("\\<tex\\>" (gnus-button-tex-level 10))))
8921 @end lisp
8922
8923 @table @code
8924
8925 @item gnus-button-browse-level
8926 @vindex gnus-button-browse-level
8927 Controls the display of references to message IDs, mail addresses and
8928 news URLs. Related variables and functions include
8929 @code{gnus-button-url-regexp}, @code{browse-url}, and
8930 @code{browse-url-browser-function}.
8931
8932 @item gnus-button-emacs-level
8933 @vindex gnus-button-emacs-level
8934 Controls the display of Emacs or Gnus references. Related functions are
8935 @code{gnus-button-handle-custom},
8936 @code{gnus-button-handle-describe-function},
8937 @code{gnus-button-handle-describe-variable},
8938 @code{gnus-button-handle-symbol},
8939 @code{gnus-button-handle-describe-key},
8940 @code{gnus-button-handle-apropos},
8941 @code{gnus-button-handle-apropos-command},
8942 @code{gnus-button-handle-apropos-variable},
8943 @code{gnus-button-handle-apropos-documentation}, and
8944 @code{gnus-button-handle-library}.
8945
8946 @item gnus-button-man-level
8947 @vindex gnus-button-man-level
8948 Controls the display of references to (Unix) man pages.
8949 See @code{gnus-button-man-handler}.
8950
8951 @item gnus-button-message-level
8952 @vindex gnus-button-message-level
8953 Controls the display of message IDs, mail addresses and news URLs.
8954 Related variables and functions include
8955 @code{gnus-button-mid-or-mail-regexp},
8956 @code{gnus-button-prefer-mid-or-mail},
8957 @code{gnus-button-mid-or-mail-heuristic}, and
8958 @code{gnus-button-mid-or-mail-heuristic-alist}.
8959
8960 @item gnus-button-tex-level
8961 @vindex gnus-button-tex-level
8962 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8963 URLs. See the variables @code{gnus-ctan-url},
8964 @code{gnus-button-ctan-handler},
8965 @code{gnus-button-ctan-directory-regexp}, and
8966 @code{gnus-button-handle-ctan-bogus-regexp}.
8967
8968 @end table
8969
8970
8971 @node Article Date
8972 @subsection Article Date
8973
8974 The date is most likely generated in some obscure timezone you've never
8975 heard of, so it's quite nice to be able to find out what the time was
8976 when the article was sent.
8977
8978 @table @kbd
8979
8980 @item W T u
8981 @kindex W T u (Summary)
8982 @findex gnus-article-date-ut
8983 Display the date in UT (aka. GMT, aka ZULU)
8984 (@code{gnus-article-date-ut}).
8985
8986 @item W T i
8987 @kindex W T i (Summary)
8988 @findex gnus-article-date-iso8601
8989 @cindex ISO 8601
8990 Display the date in international format, aka. ISO 8601
8991 (@code{gnus-article-date-iso8601}).
8992
8993 @item W T l
8994 @kindex W T l (Summary)
8995 @findex gnus-article-date-local
8996 Display the date in the local timezone (@code{gnus-article-date-local}).
8997
8998 @item W T p
8999 @kindex W T p (Summary)
9000 @findex gnus-article-date-english
9001 Display the date in a format that's easily pronounceable in English
9002 (@code{gnus-article-date-english}).
9003
9004 @item W T s
9005 @kindex W T s (Summary)
9006 @vindex gnus-article-time-format
9007 @findex gnus-article-date-user
9008 @findex format-time-string
9009 Display the date using a user-defined format
9010 (@code{gnus-article-date-user}). The format is specified by the
9011 @code{gnus-article-time-format} variable, and is a string that's passed
9012 to @code{format-time-string}. See the documentation of that variable
9013 for a list of possible format specs.
9014
9015 @item W T e
9016 @kindex W T e (Summary)
9017 @findex gnus-article-date-lapsed
9018 @findex gnus-start-date-timer
9019 @findex gnus-stop-date-timer
9020 Say how much time has elapsed between the article was posted and now
9021 (@code{gnus-article-date-lapsed}). It looks something like:
9022
9023 @example
9024 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
9025 @end example
9026
9027 @vindex gnus-article-date-lapsed-new-header
9028 The value of @code{gnus-article-date-lapsed-new-header} determines
9029 whether this header will just be added below the old Date one, or will
9030 replace it.
9031
9032 An advantage of using Gnus to read mail is that it converts simple bugs
9033 into wonderful absurdities.
9034
9035 If you want to have this line updated continually, you can put
9036
9037 @lisp
9038 (gnus-start-date-timer)
9039 @end lisp
9040
9041 in your @file{~/.gnus.el} file, or you can run it off of some hook. If
9042 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
9043 command.
9044
9045 @item W T o
9046 @kindex W T o (Summary)
9047 @findex gnus-article-date-original
9048 Display the original date (@code{gnus-article-date-original}). This can
9049 be useful if you normally use some other conversion function and are
9050 worried that it might be doing something totally wrong. Say, claiming
9051 that the article was posted in 1854. Although something like that is
9052 @emph{totally} impossible. Don't you trust me? *titter*
9053
9054 @end table
9055
9056 @xref{Customizing Articles}, for how to display the date in your
9057 preferred format automatically.
9058
9059
9060 @node Article Display
9061 @subsection Article Display
9062 @cindex picons
9063 @cindex x-face
9064 @cindex smileys
9065
9066 These commands add various frivolous display gimmicks to the article
9067 buffer in Emacs versions that support them.
9068
9069 @code{X-Face} headers are small black-and-white images supplied by the
9070 message headers (@pxref{X-Face}).
9071
9072 @code{Face} headers are small colored images supplied by the message
9073 headers (@pxref{Face}).
9074
9075 Smileys are those little @samp{:-)} symbols that people like to litter
9076 their messages with (@pxref{Smileys}).
9077
9078 Picons, on the other hand, reside on your own system, and Gnus will
9079 try to match the headers to what you have (@pxref{Picons}).
9080
9081 All these functions are toggles---if the elements already exist,
9082 they'll be removed.
9083
9084 @table @kbd
9085 @item W D x
9086 @kindex W D x (Summary)
9087 @findex gnus-article-display-x-face
9088 Display an @code{X-Face} in the @code{From} header.
9089 (@code{gnus-article-display-x-face}).
9090
9091 @item W D d
9092 @kindex W D d (Summary)
9093 @findex gnus-article-display-face
9094 Display a @code{Face} in the @code{From} header.
9095 (@code{gnus-article-display-face}).
9096
9097 @item W D s
9098 @kindex W D s (Summary)
9099 @findex gnus-treat-smiley
9100 Display smileys (@code{gnus-treat-smiley}).
9101
9102 @item W D f
9103 @kindex W D f (Summary)
9104 @findex gnus-treat-from-picon
9105 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9106
9107 @item W D m
9108 @kindex W D m (Summary)
9109 @findex gnus-treat-mail-picon
9110 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9111 (@code{gnus-treat-mail-picon}).
9112
9113 @item W D n
9114 @kindex W D n (Summary)
9115 @findex gnus-treat-newsgroups-picon
9116 Piconify all news headers (i. e., @code{Newsgroups} and
9117 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9118
9119 @item W D D
9120 @kindex W D D (Summary)
9121 @findex gnus-article-remove-images
9122 Remove all images from the article buffer
9123 (@code{gnus-article-remove-images}).
9124
9125 @end table
9126
9127
9128
9129 @node Article Signature
9130 @subsection Article Signature
9131 @cindex signatures
9132 @cindex article signature
9133
9134 @vindex gnus-signature-separator
9135 Each article is divided into two parts---the head and the body. The
9136 body can be divided into a signature part and a text part. The variable
9137 that says what is to be considered a signature is
9138 @code{gnus-signature-separator}. This is normally the standard
9139 @samp{^-- $} as mandated by son-of-RFC 1036. However, many people use
9140 non-standard signature separators, so this variable can also be a list
9141 of regular expressions to be tested, one by one. (Searches are done
9142 from the end of the body towards the beginning.) One likely value is:
9143
9144 @lisp
9145 (setq gnus-signature-separator
9146 '("^-- $" ; @r{The standard}
9147 "^-- *$" ; @r{A common mangling}
9148 "^-------*$" ; @r{Many people just use a looong}
9149 ; @r{line of dashes. Shame!}
9150 "^ *--------*$" ; @r{Double-shame!}
9151 "^________*$" ; @r{Underscores are also popular}
9152 "^========*$")) ; @r{Pervert!}
9153 @end lisp
9154
9155 The more permissive you are, the more likely it is that you'll get false
9156 positives.
9157
9158 @vindex gnus-signature-limit
9159 @code{gnus-signature-limit} provides a limit to what is considered a
9160 signature when displaying articles.
9161
9162 @enumerate
9163 @item
9164 If it is an integer, no signature may be longer (in characters) than
9165 that integer.
9166 @item
9167 If it is a floating point number, no signature may be longer (in lines)
9168 than that number.
9169 @item
9170 If it is a function, the function will be called without any parameters,
9171 and if it returns @code{nil}, there is no signature in the buffer.
9172 @item
9173 If it is a string, it will be used as a regexp. If it matches, the text
9174 in question is not a signature.
9175 @end enumerate
9176
9177 This variable can also be a list where the elements may be of the types
9178 listed above. Here's an example:
9179
9180 @lisp
9181 (setq gnus-signature-limit
9182 '(200.0 "^---*Forwarded article"))
9183 @end lisp
9184
9185 This means that if there are more than 200 lines after the signature
9186 separator, or the text after the signature separator is matched by
9187 the regular expression @samp{^---*Forwarded article}, then it isn't a
9188 signature after all.
9189
9190
9191 @node Article Miscellanea
9192 @subsection Article Miscellanea
9193
9194 @table @kbd
9195 @item A t
9196 @kindex A t (Summary)
9197 @findex gnus-article-babel
9198 Translate the article from one language to another
9199 (@code{gnus-article-babel}).
9200
9201 @end table
9202
9203
9204 @node MIME Commands
9205 @section MIME Commands
9206 @cindex MIME decoding
9207 @cindex attachments
9208 @cindex viewing attachments
9209
9210 The following commands all understand the numerical prefix. For
9211 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9212
9213 @table @kbd
9214 @item b
9215 @itemx K v
9216 @kindex b (Summary)
9217 @kindex K v (Summary)
9218 View the @acronym{MIME} part.
9219
9220 @item K o
9221 @kindex K o (Summary)
9222 Save the @acronym{MIME} part.
9223
9224 @item K c
9225 @kindex K c (Summary)
9226 Copy the @acronym{MIME} part.
9227
9228 @item K e
9229 @kindex K e (Summary)
9230 View the @acronym{MIME} part externally.
9231
9232 @item K i
9233 @kindex K i (Summary)
9234 View the @acronym{MIME} part internally.
9235
9236 @item K |
9237 @kindex K | (Summary)
9238 Pipe the @acronym{MIME} part to an external command.
9239 @end table
9240
9241 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9242 the same manner:
9243
9244 @table @kbd
9245 @item K b
9246 @kindex K b (Summary)
9247 Make all the @acronym{MIME} parts have buttons in front of them. This is
9248 mostly useful if you wish to save (or perform other actions) on inlined
9249 parts.
9250
9251 @item K m
9252 @kindex K m (Summary)
9253 @findex gnus-summary-repair-multipart
9254 Some multipart messages are transmitted with missing or faulty headers.
9255 This command will attempt to ``repair'' these messages so that they can
9256 be viewed in a more pleasant manner
9257 (@code{gnus-summary-repair-multipart}).
9258
9259 @item X m
9260 @kindex X m (Summary)
9261 @findex gnus-summary-save-parts
9262 Save all parts matching a @acronym{MIME} type to a directory
9263 (@code{gnus-summary-save-parts}). Understands the process/prefix
9264 convention (@pxref{Process/Prefix}).
9265
9266 @item M-t
9267 @kindex M-t (Summary)
9268 @findex gnus-summary-toggle-display-buttonized
9269 Toggle the buttonized display of the article buffer
9270 (@code{gnus-summary-toggle-display-buttonized}).
9271
9272 @item W M w
9273 @kindex W M w (Summary)
9274 @findex gnus-article-decode-mime-words
9275 Decode RFC 2047-encoded words in the article headers
9276 (@code{gnus-article-decode-mime-words}).
9277
9278 @item W M c
9279 @kindex W M c (Summary)
9280 @findex gnus-article-decode-charset
9281 Decode encoded article bodies as well as charsets
9282 (@code{gnus-article-decode-charset}).
9283
9284 This command looks in the @code{Content-Type} header to determine the
9285 charset. If there is no such header in the article, you can give it a
9286 prefix, which will prompt for the charset to decode as. In regional
9287 groups where people post using some common encoding (but do not
9288 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9289 parameter to the required charset (@pxref{Group Parameters}).
9290
9291 @item W M v
9292 @kindex W M v (Summary)
9293 @findex gnus-mime-view-all-parts
9294 View all the @acronym{MIME} parts in the current article
9295 (@code{gnus-mime-view-all-parts}).
9296
9297 @end table
9298
9299 Relevant variables:
9300
9301 @table @code
9302 @item gnus-ignored-mime-types
9303 @vindex gnus-ignored-mime-types
9304 This is a list of regexps. @acronym{MIME} types that match a regexp from
9305 this list will be completely ignored by Gnus. The default value is
9306 @code{nil}.
9307
9308 To have all Vcards be ignored, you'd say something like this:
9309
9310 @lisp
9311 (setq gnus-ignored-mime-types
9312 '("text/x-vcard"))
9313 @end lisp
9314
9315 @item gnus-article-loose-mime
9316 @vindex gnus-article-loose-mime
9317 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9318 before interpreting the message as a @acronym{MIME} message. This helps
9319 when reading messages from certain broken mail user agents. The
9320 default is @code{nil}.
9321
9322 @item gnus-article-emulate-mime
9323 @vindex gnus-article-emulate-mime
9324 There are other, non-@acronym{MIME} encoding methods used. The most common
9325 is @samp{uuencode}, but yEncode is also getting to be popular. If
9326 this variable is non-@code{nil}, Gnus will look in message bodies to
9327 see if it finds these encodings, and if so, it'll run them through the
9328 Gnus @acronym{MIME} machinery. The default is @code{t}.
9329
9330 @item gnus-unbuttonized-mime-types
9331 @vindex gnus-unbuttonized-mime-types
9332 This is a list of regexps. @acronym{MIME} types that match a regexp from
9333 this list won't have @acronym{MIME} buttons inserted unless they aren't
9334 displayed or this variable is overridden by
9335 @code{gnus-buttonized-mime-types}. The default value is
9336 @code{(".*/.*")}. This variable is only used when
9337 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9338
9339 @item gnus-buttonized-mime-types
9340 @vindex gnus-buttonized-mime-types
9341 This is a list of regexps. @acronym{MIME} types that match a regexp from
9342 this list will have @acronym{MIME} buttons inserted unless they aren't
9343 displayed. This variable overrides
9344 @code{gnus-unbuttonized-mime-types}. The default value is @code{nil}.
9345 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9346 is @code{nil}.
9347
9348 To see e.g. security buttons but no other buttons, you could set this
9349 variable to @code{("multipart/signed")} and leave
9350 @code{gnus-unbuttonized-mime-types} at the default value.
9351
9352 You could also add @code{"multipart/alternative"} to this list to
9353 display radio buttons that allow you to choose one of two media types
9354 those mails include. See also @code{mm-discouraged-alternatives}
9355 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
9356 Emacs MIME Manual}).
9357
9358 @item gnus-inhibit-mime-unbuttonizing
9359 @vindex gnus-inhibit-mime-unbuttonizing
9360 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons. The
9361 default value is @code{nil}.
9362
9363 @item gnus-article-mime-part-function
9364 @vindex gnus-article-mime-part-function
9365 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9366 handle as the parameter. The function is meant to be used to allow
9367 users to gather information from the article (e. g., add Vcard info to
9368 the bbdb database) or to do actions based on parts (e. g., automatically
9369 save all jpegs into some directory).
9370
9371 Here's an example function the does the latter:
9372
9373 @lisp
9374 (defun my-save-all-jpeg-parts (handle)
9375 (when (equal (car (mm-handle-type handle)) "image/jpeg")
9376 (with-temp-buffer
9377 (insert (mm-get-part handle))
9378 (write-region (point-min) (point-max)
9379 (read-file-name "Save jpeg to: ")))))
9380 (setq gnus-article-mime-part-function
9381 'my-save-all-jpeg-parts)
9382 @end lisp
9383
9384 @vindex gnus-mime-multipart-functions
9385 @item gnus-mime-multipart-functions
9386 Alist of @acronym{MIME} multipart types and functions to handle them.
9387
9388 @vindex gnus-mime-display-multipart-alternative-as-mixed
9389 @item gnus-mime-display-multipart-alternative-as-mixed
9390 Display "multipart/alternative" parts as "multipart/mixed".
9391
9392 @vindex gnus-mime-display-multipart-related-as-mixed
9393 @item gnus-mime-display-multipart-related-as-mixed
9394 Display "multipart/related" parts as "multipart/mixed".
9395
9396 If displaying "text/html" is discouraged, see
9397 @code{mm-discouraged-alternatives}, images or other material inside a
9398 "multipart/related" part might be overlooked when this variable is
9399 @code{nil}. @ref{Display Customization, Display Customization, ,
9400 emacs-mime, Emacs-Mime Manual}.
9401
9402 @vindex gnus-mime-display-multipart-as-mixed
9403 @item gnus-mime-display-multipart-as-mixed
9404 Display "multipart" parts as "multipart/mixed". If @code{t}, it
9405 overrides @code{nil} values of
9406 @code{gnus-mime-display-multipart-alternative-as-mixed} and
9407 @code{gnus-mime-display-multipart-related-as-mixed}.
9408
9409 @vindex mm-file-name-rewrite-functions
9410 @item mm-file-name-rewrite-functions
9411 List of functions used for rewriting file names of @acronym{MIME} parts.
9412 Each function takes a file name as input and returns a file name.
9413
9414 Ready-made functions include@*
9415 @code{mm-file-name-delete-whitespace},
9416 @code{mm-file-name-trim-whitespace},
9417 @code{mm-file-name-collapse-whitespace}, and
9418 @code{mm-file-name-replace-whitespace}. The later uses the value of
9419 the variable @code{mm-file-name-replace-whitespace} to replace each
9420 whitespace character in a file name with that string; default value
9421 is @code{"_"} (a single underscore).
9422 @findex mm-file-name-delete-whitespace
9423 @findex mm-file-name-trim-whitespace
9424 @findex mm-file-name-collapse-whitespace
9425 @findex mm-file-name-replace-whitespace
9426 @vindex mm-file-name-replace-whitespace
9427
9428 The standard functions @code{capitalize}, @code{downcase},
9429 @code{upcase}, and @code{upcase-initials} may be useful, too.
9430
9431 Everybody knows that whitespace characters in file names are evil,
9432 except those who don't know. If you receive lots of attachments from
9433 such unenlightened users, you can make live easier by adding
9434
9435 @lisp
9436 (setq mm-file-name-rewrite-functions
9437 '(mm-file-name-trim-whitespace
9438 mm-file-name-collapse-whitespace
9439 mm-file-name-replace-whitespace))
9440 @end lisp
9441
9442 @noindent
9443 to your @file{~/.gnus.el} file.
9444
9445 @end table
9446
9447
9448 @node Charsets
9449 @section Charsets
9450 @cindex charsets
9451
9452 People use different charsets, and we have @acronym{MIME} to let us know what
9453 charsets they use. Or rather, we wish we had. Many people use
9454 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9455 just send out messages without saying what character sets they use. To
9456 help a bit with this, some local news hierarchies have policies that say
9457 what character set is the default. For instance, the @samp{fj}
9458 hierarchy uses @code{iso-2022-jp}.
9459
9460 @vindex gnus-group-charset-alist
9461 This knowledge is encoded in the @code{gnus-group-charset-alist}
9462 variable, which is an alist of regexps (use the first item to match full
9463 group names) and default charsets to be used when reading these groups.
9464
9465 @vindex gnus-newsgroup-ignored-charsets
9466 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9467 aren't. These blithely mark messages as being in @code{iso-8859-1}
9468 even if they really are in @code{koi-8}. To help here, the
9469 @code{gnus-newsgroup-ignored-charsets} variable can be used. The
9470 charsets that are listed here will be ignored. The variable can be
9471 set on a group-by-group basis using the group parameters (@pxref{Group
9472 Parameters}). The default value is @code{(unknown-8bit x-unknown)},
9473 which includes values some agents insist on having in there.
9474
9475 @vindex gnus-group-posting-charset-alist
9476 When posting, @code{gnus-group-posting-charset-alist} is used to
9477 determine which charsets should not be encoded using the @acronym{MIME}
9478 encodings. For instance, some hierarchies discourage using
9479 quoted-printable header encoding.
9480
9481 This variable is an alist of regexps and permitted unencoded charsets
9482 for posting. Each element of the alist has the form @code{(}@var{test
9483 header body-list}@code{)}, where:
9484
9485 @table @var
9486 @item test
9487 is either a regular expression matching the newsgroup header or a
9488 variable to query,
9489 @item header
9490 is the charset which may be left unencoded in the header (@code{nil}
9491 means encode all charsets),
9492 @item body-list
9493 is a list of charsets which may be encoded using 8bit content-transfer
9494 encoding in the body, or one of the special values @code{nil} (always
9495 encode using quoted-printable) or @code{t} (always use 8bit).
9496 @end table
9497
9498 @cindex Russian
9499 @cindex koi8-r
9500 @cindex koi8-u
9501 @cindex iso-8859-5
9502 @cindex coding system aliases
9503 @cindex preferred charset
9504
9505 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
9506 The Emacs MIME Manual}, for additional variables that control which
9507 MIME charsets are used when sending messages.
9508
9509 Other charset tricks that may be useful, although not Gnus-specific:
9510
9511 If there are several @acronym{MIME} charsets that encode the same Emacs
9512 charset, you can choose what charset to use by saying the following:
9513
9514 @lisp
9515 (put-charset-property 'cyrillic-iso8859-5
9516 'preferred-coding-system 'koi8-r)
9517 @end lisp
9518
9519 This means that Russian will be encoded using @code{koi8-r} instead of
9520 the default @code{iso-8859-5} @acronym{MIME} charset.
9521
9522 If you want to read messages in @code{koi8-u}, you can cheat and say
9523
9524 @lisp
9525 (define-coding-system-alias 'koi8-u 'koi8-r)
9526 @end lisp
9527
9528 This will almost do the right thing.
9529
9530 And finally, to read charsets like @code{windows-1251}, you can say
9531 something like
9532
9533 @lisp
9534 (codepage-setup 1251)
9535 (define-coding-system-alias 'windows-1251 'cp1251)
9536 @end lisp
9537
9538
9539 @node Article Commands
9540 @section Article Commands
9541
9542 @table @kbd
9543
9544 @item A P
9545 @cindex PostScript
9546 @cindex printing
9547 @kindex A P (Summary)
9548 @vindex gnus-ps-print-hook
9549 @findex gnus-summary-print-article
9550 Generate and print a PostScript image of the article buffer
9551 (@code{gnus-summary-print-article}). @code{gnus-ps-print-hook} will
9552 be run just before printing the buffer. An alternative way to print
9553 article is to use Muttprint (@pxref{Saving Articles}).
9554
9555 @end table
9556
9557
9558 @node Summary Sorting
9559 @section Summary Sorting
9560 @cindex summary sorting
9561
9562 You can have the summary buffer sorted in various ways, even though I
9563 can't really see why you'd want that.
9564
9565 @table @kbd
9566
9567 @item C-c C-s C-n
9568 @kindex C-c C-s C-n (Summary)
9569 @findex gnus-summary-sort-by-number
9570 Sort by article number (@code{gnus-summary-sort-by-number}).
9571
9572 @item C-c C-s C-a
9573 @kindex C-c C-s C-a (Summary)
9574 @findex gnus-summary-sort-by-author
9575 Sort by author (@code{gnus-summary-sort-by-author}).
9576
9577 @item C-c C-s C-s
9578 @kindex C-c C-s C-s (Summary)
9579 @findex gnus-summary-sort-by-subject
9580 Sort by subject (@code{gnus-summary-sort-by-subject}).
9581
9582 @item C-c C-s C-d
9583 @kindex C-c C-s C-d (Summary)
9584 @findex gnus-summary-sort-by-date
9585 Sort by date (@code{gnus-summary-sort-by-date}).
9586
9587 @item C-c C-s C-l
9588 @kindex C-c C-s C-l (Summary)
9589 @findex gnus-summary-sort-by-lines
9590 Sort by lines (@code{gnus-summary-sort-by-lines}).
9591
9592 @item C-c C-s C-c
9593 @kindex C-c C-s C-c (Summary)
9594 @findex gnus-summary-sort-by-chars
9595 Sort by article length (@code{gnus-summary-sort-by-chars}).
9596
9597 @item C-c C-s C-i
9598 @kindex C-c C-s C-i (Summary)
9599 @findex gnus-summary-sort-by-score
9600 Sort by score (@code{gnus-summary-sort-by-score}).
9601
9602 @item C-c C-s C-r
9603 @kindex C-c C-s C-r (Summary)
9604 @findex gnus-summary-sort-by-random
9605 Randomize (@code{gnus-summary-sort-by-random}).
9606
9607 @item C-c C-s C-o
9608 @kindex C-c C-s C-o (Summary)
9609 @findex gnus-summary-sort-by-original
9610 Sort using the default sorting method
9611 (@code{gnus-summary-sort-by-original}).
9612 @end table
9613
9614 These functions will work both when you use threading and when you don't
9615 use threading. In the latter case, all summary lines will be sorted,
9616 line by line. In the former case, sorting will be done on a
9617 root-by-root basis, which might not be what you were looking for. To
9618 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9619 Commands}).
9620
9621
9622 @node Finding the Parent
9623 @section Finding the Parent
9624 @cindex parent articles
9625 @cindex referring articles
9626
9627 @table @kbd
9628 @item ^
9629 @kindex ^ (Summary)
9630 @findex gnus-summary-refer-parent-article
9631 If you'd like to read the parent of the current article, and it is not
9632 displayed in the summary buffer, you might still be able to. That is,
9633 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9634 and the @code{References} in the current article are not mangled, you
9635 can just press @kbd{^} or @kbd{A r}
9636 (@code{gnus-summary-refer-parent-article}). If everything goes well,
9637 you'll get the parent. If the parent is already displayed in the
9638 summary buffer, point will just move to this article.
9639
9640 If given a positive numerical prefix, fetch that many articles back into
9641 the ancestry. If given a negative numerical prefix, fetch just that
9642 ancestor. So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9643 grandparent and the grandgrandparent of the current article. If you say
9644 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9645 article.
9646
9647 @item A R (Summary)
9648 @findex gnus-summary-refer-references
9649 @kindex A R (Summary)
9650 Fetch all articles mentioned in the @code{References} header of the
9651 article (@code{gnus-summary-refer-references}).
9652
9653 @item A T (Summary)
9654 @findex gnus-summary-refer-thread
9655 @kindex A T (Summary)
9656 Display the full thread where the current article appears
9657 (@code{gnus-summary-refer-thread}). This command has to fetch all the
9658 headers in the current group to work, so it usually takes a while. If
9659 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9660 to @code{invisible} (@pxref{Filling In Threads}). This won't have any
9661 visible effects normally, but it'll make this command work a whole lot
9662 faster. Of course, it'll make group entry somewhat slow.
9663
9664 @vindex gnus-refer-thread-limit
9665 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9666 articles before the first displayed in the current group) headers to
9667 fetch when doing this command. The default is 200. If @code{t}, all
9668 the available headers will be fetched. This variable can be overridden
9669 by giving the @kbd{A T} command a numerical prefix.
9670
9671 @item M-^ (Summary)
9672 @findex gnus-summary-refer-article
9673 @kindex M-^ (Summary)
9674 @cindex Message-ID
9675 @cindex fetching by Message-ID
9676 You can also ask Gnus for an arbitrary article, no matter what group it
9677 belongs to. @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
9678 for a @code{Message-ID}, which is one of those long, hard-to-read
9679 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
9680 You have to get it all exactly right. No fuzzy searches, I'm afraid.
9681
9682 Gnus looks for the @code{Message-ID} in the headers that have already
9683 been fetched, but also tries all the select methods specified by
9684 @code{gnus-refer-article-method} if it is not found.
9685 @end table
9686
9687 @vindex gnus-refer-article-method
9688 If the group you are reading is located on a back end that does not
9689 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9690 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method. It
9691 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9692 updating the spool you are reading from, but that's not really
9693 necessary.
9694
9695 It can also be a list of select methods, as well as the special symbol
9696 @code{current}, which means to use the current select method. If it
9697 is a list, Gnus will try all the methods in the list until it finds a
9698 match.
9699
9700 Here's an example setting that will first try the current method, and
9701 then ask Google if that fails:
9702
9703 @lisp
9704 (setq gnus-refer-article-method
9705 '(current
9706 (nnweb "google" (nnweb-type google))))
9707 @end lisp
9708
9709 Most of the mail back ends support fetching by @code{Message-ID}, but
9710 do not do a particularly excellent job at it. That is, @code{nnmbox},
9711 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
9712 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
9713 only able to locate articles that have been posted to the current
9714 group. (Anything else would be too time consuming.) @code{nnmh} does
9715 not support this at all.
9716
9717
9718 @node Alternative Approaches
9719 @section Alternative Approaches
9720
9721 Different people like to read news using different methods. This being
9722 Gnus, we offer a small selection of minor modes for the summary buffers.
9723
9724 @menu
9725 * Pick and Read:: First mark articles and then read them.
9726 * Binary Groups:: Auto-decode all articles.
9727 @end menu
9728
9729
9730 @node Pick and Read
9731 @subsection Pick and Read
9732 @cindex pick and read
9733
9734 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9735 a two-phased reading interface. The user first marks in a summary
9736 buffer the articles she wants to read. Then she starts reading the
9737 articles with just an article buffer displayed.
9738
9739 @findex gnus-pick-mode
9740 @kindex M-x gnus-pick-mode
9741 Gnus provides a summary buffer minor mode that allows
9742 this---@code{gnus-pick-mode}. This basically means that a few process
9743 mark commands become one-keystroke commands to allow easy marking, and
9744 it provides one additional command for switching to the summary buffer.
9745
9746 Here are the available keystrokes when using pick mode:
9747
9748 @table @kbd
9749 @item .
9750 @kindex . (Pick)
9751 @findex gnus-pick-article-or-thread
9752 Pick the article or thread on the current line
9753 (@code{gnus-pick-article-or-thread}). If the variable
9754 @code{gnus-thread-hide-subtree} is true, then this key selects the
9755 entire thread when used at the first article of the thread. Otherwise,
9756 it selects just the article. If given a numerical prefix, go to that
9757 thread or article and pick it. (The line number is normally displayed
9758 at the beginning of the summary pick lines.)
9759
9760 @item SPACE
9761 @kindex SPACE (Pick)
9762 @findex gnus-pick-next-page
9763 Scroll the summary buffer up one page (@code{gnus-pick-next-page}). If
9764 at the end of the buffer, start reading the picked articles.
9765
9766 @item u
9767 @kindex u (Pick)
9768 @findex gnus-pick-unmark-article-or-thread.
9769 Unpick the thread or article
9770 (@code{gnus-pick-unmark-article-or-thread}). If the variable
9771 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9772 thread if used at the first article of the thread. Otherwise it unpicks
9773 just the article. You can give this key a numerical prefix to unpick
9774 the thread or article at that line.
9775
9776 @item RET
9777 @kindex RET (Pick)
9778 @findex gnus-pick-start-reading
9779 @vindex gnus-pick-display-summary
9780 Start reading the picked articles (@code{gnus-pick-start-reading}). If
9781 given a prefix, mark all unpicked articles as read first. If
9782 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9783 will still be visible when you are reading.
9784
9785 @end table
9786
9787 All the normal summary mode commands are still available in the
9788 pick-mode, with the exception of @kbd{u}. However @kbd{!} is available
9789 which is mapped to the same function
9790 @code{gnus-summary-tick-article-forward}.
9791
9792 If this sounds like a good idea to you, you could say:
9793
9794 @lisp
9795 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9796 @end lisp
9797
9798 @vindex gnus-pick-mode-hook
9799 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9800
9801 @vindex gnus-mark-unpicked-articles-as-read
9802 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9803 all unpicked articles as read. The default is @code{nil}.
9804
9805 @vindex gnus-summary-pick-line-format
9806 The summary line format in pick mode is slightly different from the
9807 standard format. At the beginning of each line the line number is
9808 displayed. The pick mode line format is controlled by the
9809 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9810 Variables}). It accepts the same format specs that
9811 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9812
9813
9814 @node Binary Groups
9815 @subsection Binary Groups
9816 @cindex binary groups
9817
9818 @findex gnus-binary-mode
9819 @kindex M-x gnus-binary-mode
9820 If you spend much time in binary groups, you may grow tired of hitting
9821 @kbd{X u}, @kbd{n}, @kbd{RET} all the time. @kbd{M-x gnus-binary-mode}
9822 is a minor mode for summary buffers that makes all ordinary Gnus article
9823 selection functions uudecode series of articles and display the result
9824 instead of just displaying the articles the normal way.
9825
9826 @kindex g (Binary)
9827 @findex gnus-binary-show-article
9828 The only way, in fact, to see the actual articles is the @kbd{g}
9829 command, when you have turned on this mode
9830 (@code{gnus-binary-show-article}).
9831
9832 @vindex gnus-binary-mode-hook
9833 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9834
9835
9836 @node Tree Display
9837 @section Tree Display
9838 @cindex trees
9839
9840 @vindex gnus-use-trees
9841 If you don't like the normal Gnus summary display, you might try setting
9842 @code{gnus-use-trees} to @code{t}. This will create (by default) an
9843 additional @dfn{tree buffer}. You can execute all summary mode commands
9844 in the tree buffer.
9845
9846 There are a few variables to customize the tree display, of course:
9847
9848 @table @code
9849 @item gnus-tree-mode-hook
9850 @vindex gnus-tree-mode-hook
9851 A hook called in all tree mode buffers.
9852
9853 @item gnus-tree-mode-line-format
9854 @vindex gnus-tree-mode-line-format
9855 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9856 Line Formatting}). The default is @samp{Gnus: %%b %S %Z}. For a list
9857 of valid specs, @pxref{Summary Buffer Mode Line}.
9858
9859 @item gnus-selected-tree-face
9860 @vindex gnus-selected-tree-face
9861 Face used for highlighting the selected article in the tree buffer. The
9862 default is @code{modeline}.
9863
9864 @item gnus-tree-line-format
9865 @vindex gnus-tree-line-format
9866 A format string for the tree nodes. The name is a bit of a misnomer,
9867 though---it doesn't define a line, but just the node. The default value
9868 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9869 the name of the poster. It is vital that all nodes are of the same
9870 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9871
9872 Valid specs are:
9873
9874 @table @samp
9875 @item n
9876 The name of the poster.
9877 @item f
9878 The @code{From} header.
9879 @item N
9880 The number of the article.
9881 @item [
9882 The opening bracket.
9883 @item ]
9884 The closing bracket.
9885 @item s
9886 The subject.
9887 @end table
9888
9889 @xref{Formatting Variables}.
9890
9891 Variables related to the display are:
9892
9893 @table @code
9894 @item gnus-tree-brackets
9895 @vindex gnus-tree-brackets
9896 This is used for differentiating between ``real'' articles and
9897 ``sparse'' articles. The format is
9898 @example
9899 ((@var{real-open} . @var{real-close})
9900 (@var{sparse-open} . @var{sparse-close})
9901 (@var{dummy-open} . @var{dummy-close}))
9902 @end example
9903 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9904
9905 @item gnus-tree-parent-child-edges
9906 @vindex gnus-tree-parent-child-edges
9907 This is a list that contains the characters used for connecting parent
9908 nodes to their children. The default is @code{(?- ?\\ ?|)}.
9909
9910 @end table
9911
9912 @item gnus-tree-minimize-window
9913 @vindex gnus-tree-minimize-window
9914 If this variable is non-@code{nil}, Gnus will try to keep the tree
9915 buffer as small as possible to allow more room for the other Gnus
9916 windows. If this variable is a number, the tree buffer will never be
9917 higher than that number. The default is @code{t}. Note that if you
9918 have several windows displayed side-by-side in a frame and the tree
9919 buffer is one of these, minimizing the tree window will also resize all
9920 other windows displayed next to it.
9921
9922 You may also wish to add the following hook to keep the window minimized
9923 at all times:
9924
9925 @lisp
9926 (add-hook 'gnus-configure-windows-hook
9927 'gnus-tree-perhaps-minimize)
9928 @end lisp
9929
9930 @item gnus-generate-tree-function
9931 @vindex gnus-generate-tree-function
9932 @findex gnus-generate-horizontal-tree
9933 @findex gnus-generate-vertical-tree
9934 The function that actually generates the thread tree. Two predefined
9935 functions are available: @code{gnus-generate-horizontal-tree} and
9936 @code{gnus-generate-vertical-tree} (which is the default).
9937
9938 @end table
9939
9940 Here's an example from a horizontal tree buffer:
9941
9942 @example
9943 @{***@}-(***)-[odd]-[Gun]
9944 | \[Jan]
9945 | \[odd]-[Eri]
9946 | \(***)-[Eri]
9947 | \[odd]-[Paa]
9948 \[Bjo]
9949 \[Gun]
9950 \[Gun]-[Jor]
9951 @end example
9952
9953 Here's the same thread displayed in a vertical tree buffer:
9954
9955 @example
9956 @group
9957 @{***@}
9958 |--------------------------\-----\-----\
9959 (***) [Bjo] [Gun] [Gun]
9960 |--\-----\-----\ |
9961 [odd] [Jan] [odd] (***) [Jor]
9962 | | |--\
9963 [Gun] [Eri] [Eri] [odd]
9964 |
9965 [Paa]
9966 @end group
9967 @end example
9968
9969 If you're using horizontal trees, it might be nice to display the trees
9970 side-by-side with the summary buffer. You could add something like the
9971 following to your @file{~/.gnus.el} file:
9972
9973 @lisp
9974 (setq gnus-use-trees t
9975 gnus-generate-tree-function 'gnus-generate-horizontal-tree
9976 gnus-tree-minimize-window nil)
9977 (gnus-add-configuration
9978 '(article
9979 (vertical 1.0
9980 (horizontal 0.25
9981 (summary 0.75 point)
9982 (tree 1.0))
9983 (article 1.0))))
9984 @end lisp
9985
9986 @xref{Window Layout}.
9987
9988
9989 @node Mail Group Commands
9990 @section Mail Group Commands
9991 @cindex mail group commands
9992
9993 Some commands only make sense in mail groups. If these commands are
9994 invalid in the current group, they will raise a hell and let you know.
9995
9996 All these commands (except the expiry and edit commands) use the
9997 process/prefix convention (@pxref{Process/Prefix}).
9998
9999 @table @kbd
10000
10001 @item B e
10002 @kindex B e (Summary)
10003 @findex gnus-summary-expire-articles
10004 Run all expirable articles in the current group through the expiry
10005 process (@code{gnus-summary-expire-articles}). That is, delete all
10006 expirable articles in the group that have been around for a while.
10007 (@pxref{Expiring Mail}).
10008
10009 @item B C-M-e
10010 @kindex B C-M-e (Summary)
10011 @findex gnus-summary-expire-articles-now
10012 Delete all the expirable articles in the group
10013 (@code{gnus-summary-expire-articles-now}). This means that @strong{all}
10014 articles eligible for expiry in the current group will
10015 disappear forever into that big @file{/dev/null} in the sky.
10016
10017 @item B DEL
10018 @kindex B DEL (Summary)
10019 @findex gnus-summary-delete-article
10020 @c @icon{gnus-summary-mail-delete}
10021 Delete the mail article. This is ``delete'' as in ``delete it from your
10022 disk forever and ever, never to return again.'' Use with caution.
10023 (@code{gnus-summary-delete-article}).
10024
10025 @item B m
10026 @kindex B m (Summary)
10027 @cindex move mail
10028 @findex gnus-summary-move-article
10029 @vindex gnus-preserve-marks
10030 Move the article from one mail group to another
10031 (@code{gnus-summary-move-article}). Marks will be preserved if
10032 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10033
10034 @item B c
10035 @kindex B c (Summary)
10036 @cindex copy mail
10037 @findex gnus-summary-copy-article
10038 @c @icon{gnus-summary-mail-copy}
10039 Copy the article from one group (mail group or not) to a mail group
10040 (@code{gnus-summary-copy-article}). Marks will be preserved if
10041 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10042
10043 @item B B
10044 @kindex B B (Summary)
10045 @cindex crosspost mail
10046 @findex gnus-summary-crosspost-article
10047 Crosspost the current article to some other group
10048 (@code{gnus-summary-crosspost-article}). This will create a new copy of
10049 the article in the other group, and the Xref headers of the article will
10050 be properly updated.
10051
10052 @item B i
10053 @kindex B i (Summary)
10054 @findex gnus-summary-import-article
10055 Import an arbitrary file into the current mail newsgroup
10056 (@code{gnus-summary-import-article}). You will be prompted for a file
10057 name, a @code{From} header and a @code{Subject} header.
10058
10059 @item B I
10060 @kindex B I (Summary)
10061 @findex gnus-summary-create-article
10062 Create an empty article in the current mail newsgroups
10063 (@code{gnus-summary-create-article}). You will be prompted for a
10064 @code{From} header and a @code{Subject} header.
10065
10066 @item B r
10067 @kindex B r (Summary)
10068 @findex gnus-summary-respool-article
10069 @vindex gnus-summary-respool-default-method
10070 Respool the mail article (@code{gnus-summary-respool-article}).
10071 @code{gnus-summary-respool-default-method} will be used as the default
10072 select method when respooling. This variable is @code{nil} by default,
10073 which means that the current group select method will be used instead.
10074 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
10075 (which is the default).
10076
10077 @item B w
10078 @itemx e
10079 @kindex B w (Summary)
10080 @kindex e (Summary)
10081 @findex gnus-summary-edit-article
10082 @kindex C-c C-c (Article)
10083 @findex gnus-summary-edit-article-done
10084 Edit the current article (@code{gnus-summary-edit-article}). To finish
10085 editing and make the changes permanent, type @kbd{C-c C-c}
10086 (@code{gnus-summary-edit-article-done}). If you give a prefix to the
10087 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10088
10089 @item B q
10090 @kindex B q (Summary)
10091 @findex gnus-summary-respool-query
10092 If you want to re-spool an article, you might be curious as to what group
10093 the article will end up in before you do the re-spooling. This command
10094 will tell you (@code{gnus-summary-respool-query}).
10095
10096 @item B t
10097 @kindex B t (Summary)
10098 @findex gnus-summary-respool-trace
10099 Similarly, this command will display all fancy splitting patterns used
10100 when respooling, if any (@code{gnus-summary-respool-trace}).
10101
10102 @item B p
10103 @kindex B p (Summary)
10104 @findex gnus-summary-article-posted-p
10105 Some people have a tendency to send you ``courtesy'' copies when they
10106 follow up to articles you have posted. These usually have a
10107 @code{Newsgroups} header in them, but not always. This command
10108 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10109 article from your news server (or rather, from
10110 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10111 report back whether it found the article or not. Even if it says that
10112 it didn't find the article, it may have been posted anyway---mail
10113 propagation is much faster than news propagation, and the news copy may
10114 just not have arrived yet.
10115
10116 @item K E
10117 @kindex K E (Summary)
10118 @findex gnus-article-encrypt-body
10119 @vindex gnus-article-encrypt-protocol
10120 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10121 The body is encrypted with the encryption protocol specified by the
10122 variable @code{gnus-article-encrypt-protocol}.
10123
10124 @end table
10125
10126 @vindex gnus-move-split-methods
10127 @cindex moving articles
10128 If you move (or copy) articles regularly, you might wish to have Gnus
10129 suggest where to put the articles. @code{gnus-move-split-methods} is a
10130 variable that uses the same syntax as @code{gnus-split-methods}
10131 (@pxref{Saving Articles}). You may customize that variable to create
10132 suggestions you find reasonable. (Note that
10133 @code{gnus-move-split-methods} uses group names where
10134 @code{gnus-split-methods} uses file names.)
10135
10136 @lisp
10137 (setq gnus-move-split-methods
10138 '(("^From:.*Lars Magne" "nnml:junk")
10139 ("^Subject:.*gnus" "nnfolder:important")
10140 (".*" "nnml:misc")))
10141 @end lisp
10142
10143
10144 @node Various Summary Stuff
10145 @section Various Summary Stuff
10146
10147 @menu
10148 * Summary Group Information:: Information oriented commands.
10149 * Searching for Articles:: Multiple article commands.
10150 * Summary Generation Commands::
10151 * Really Various Summary Commands:: Those pesky non-conformant commands.
10152 @end menu
10153
10154 @table @code
10155 @vindex gnus-summary-display-while-building
10156 @item gnus-summary-display-while-building
10157 If non-@code{nil}, show and update the summary buffer as it's being
10158 built. If @code{t}, update the buffer after every line is inserted.
10159 If the value is an integer, @var{n}, update the display every @var{n}
10160 lines. The default is @code{nil}.
10161
10162 @vindex gnus-summary-display-arrow
10163 @item gnus-summary-display-arrow
10164 If non-@code{nil}, display an arrow in the fringe to indicate the
10165 current article.
10166
10167 @vindex gnus-summary-mode-hook
10168 @item gnus-summary-mode-hook
10169 This hook is called when creating a summary mode buffer.
10170
10171 @vindex gnus-summary-generate-hook
10172 @item gnus-summary-generate-hook
10173 This is called as the last thing before doing the threading and the
10174 generation of the summary buffer. It's quite convenient for customizing
10175 the threading variables based on what data the newsgroup has. This hook
10176 is called from the summary buffer after most summary buffer variables
10177 have been set.
10178
10179 @vindex gnus-summary-prepare-hook
10180 @item gnus-summary-prepare-hook
10181 It is called after the summary buffer has been generated. You might use
10182 it to, for instance, highlight lines or modify the look of the buffer in
10183 some other ungodly manner. I don't care.
10184
10185 @vindex gnus-summary-prepared-hook
10186 @item gnus-summary-prepared-hook
10187 A hook called as the very last thing after the summary buffer has been
10188 generated.
10189
10190 @vindex gnus-summary-ignore-duplicates
10191 @item gnus-summary-ignore-duplicates
10192 When Gnus discovers two articles that have the same @code{Message-ID},
10193 it has to do something drastic. No articles are allowed to have the
10194 same @code{Message-ID}, but this may happen when reading mail from some
10195 sources. Gnus allows you to customize what happens with this variable.
10196 If it is @code{nil} (which is the default), Gnus will rename the
10197 @code{Message-ID} (for display purposes only) and display the article as
10198 any other article. If this variable is @code{t}, it won't display the
10199 article---it'll be as if it never existed.
10200
10201 @vindex gnus-alter-articles-to-read-function
10202 @item gnus-alter-articles-to-read-function
10203 This function, which takes two parameters (the group name and the list
10204 of articles to be selected), is called to allow the user to alter the
10205 list of articles to be selected.
10206
10207 For instance, the following function adds the list of cached articles to
10208 the list in one particular group:
10209
10210 @lisp
10211 (defun my-add-cached-articles (group articles)
10212 (if (string= group "some.group")
10213 (append gnus-newsgroup-cached articles)
10214 articles))
10215 @end lisp
10216
10217 @vindex gnus-newsgroup-variables
10218 @item gnus-newsgroup-variables
10219 A list of newsgroup (summary buffer) local variables, or cons of
10220 variables and their default expressions to be evalled (when the default
10221 values are not @code{nil}), that should be made global while the summary
10222 buffer is active.
10223
10224 Note: The default expressions will be evaluated (using function
10225 @code{eval}) before assignment to the local variable rather than just
10226 assigned to it. If the default expression is the symbol @code{global},
10227 that symbol will not be evaluated but the global value of the local
10228 variable will be used instead.
10229
10230 These variables can be used to set variables in the group parameters
10231 while still allowing them to affect operations done in other
10232 buffers. For example:
10233
10234 @lisp
10235 (setq gnus-newsgroup-variables
10236 '(message-use-followup-to
10237 (gnus-visible-headers .
10238 "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10239 @end lisp
10240
10241 Also @pxref{Group Parameters}.
10242 @end table
10243
10244
10245 @node Summary Group Information
10246 @subsection Summary Group Information
10247
10248 @table @kbd
10249
10250 @item H f
10251 @kindex H f (Summary)
10252 @findex gnus-summary-fetch-faq
10253 @vindex gnus-group-faq-directory
10254 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10255 for the current group (@code{gnus-summary-fetch-faq}). Gnus will try
10256 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10257 is usually a directory on a remote machine. This variable can also be
10258 a list of directories. In that case, giving a prefix to this command
10259 will allow you to choose between the various sites. @code{ange-ftp}
10260 or @code{efs} will probably be used for fetching the file.
10261
10262 @item H d
10263 @kindex H d (Summary)
10264 @findex gnus-summary-describe-group
10265 Give a brief description of the current group
10266 (@code{gnus-summary-describe-group}). If given a prefix, force
10267 rereading the description from the server.
10268
10269 @item H h
10270 @kindex H h (Summary)
10271 @findex gnus-summary-describe-briefly
10272 Give an extremely brief description of the most important summary
10273 keystrokes (@code{gnus-summary-describe-briefly}).
10274
10275 @item H i
10276 @kindex H i (Summary)
10277 @findex gnus-info-find-node
10278 Go to the Gnus info node (@code{gnus-info-find-node}).
10279 @end table
10280
10281
10282 @node Searching for Articles
10283 @subsection Searching for Articles
10284
10285 @table @kbd
10286
10287 @item M-s
10288 @kindex M-s (Summary)
10289 @findex gnus-summary-search-article-forward
10290 Search through all subsequent (raw) articles for a regexp
10291 (@code{gnus-summary-search-article-forward}).
10292
10293 @item M-r
10294 @kindex M-r (Summary)
10295 @findex gnus-summary-search-article-backward
10296 Search through all previous (raw) articles for a regexp
10297 (@code{gnus-summary-search-article-backward}).
10298
10299 @item &
10300 @kindex & (Summary)
10301 @findex gnus-summary-execute-command
10302 This command will prompt you for a header, a regular expression to match
10303 on this field, and a command to be executed if the match is made
10304 (@code{gnus-summary-execute-command}). If the header is an empty
10305 string, the match is done on the entire article. If given a prefix,
10306 search backward instead.
10307
10308 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10309 all articles that have heads or bodies that match @samp{some.*string}.
10310
10311 @item M-&
10312 @kindex M-& (Summary)
10313 @findex gnus-summary-universal-argument
10314 Perform any operation on all articles that have been marked with
10315 the process mark (@code{gnus-summary-universal-argument}).
10316 @end table
10317
10318 @node Summary Generation Commands
10319 @subsection Summary Generation Commands
10320
10321 @table @kbd
10322
10323 @item Y g
10324 @kindex Y g (Summary)
10325 @findex gnus-summary-prepare
10326 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10327
10328 @item Y c
10329 @kindex Y c (Summary)
10330 @findex gnus-summary-insert-cached-articles
10331 Pull all cached articles (for the current group) into the summary buffer
10332 (@code{gnus-summary-insert-cached-articles}).
10333
10334 @item Y d
10335 @kindex Y d (Summary)
10336 @findex gnus-summary-insert-dormant-articles
10337 Pull all dormant articles (for the current group) into the summary buffer
10338 (@code{gnus-summary-insert-dormant-articles}).
10339
10340 @end table
10341
10342
10343 @node Really Various Summary Commands
10344 @subsection Really Various Summary Commands
10345
10346 @table @kbd
10347
10348 @item A D
10349 @itemx C-d
10350 @kindex C-d (Summary)
10351 @kindex A D (Summary)
10352 @findex gnus-summary-enter-digest-group
10353 If the current article is a collection of other articles (for instance,
10354 a digest), you might use this command to enter a group based on the that
10355 article (@code{gnus-summary-enter-digest-group}). Gnus will try to
10356 guess what article type is currently displayed unless you give a prefix
10357 to this command, which forces a ``digest'' interpretation. Basically,
10358 whenever you see a message that is a collection of other messages of
10359 some format, you @kbd{C-d} and read these messages in a more convenient
10360 fashion.
10361
10362 @item C-M-d
10363 @kindex C-M-d (Summary)
10364 @findex gnus-summary-read-document
10365 This command is very similar to the one above, but lets you gather
10366 several documents into one biiig group
10367 (@code{gnus-summary-read-document}). It does this by opening several
10368 @code{nndoc} groups for each document, and then opening an
10369 @code{nnvirtual} group on top of these @code{nndoc} groups. This
10370 command understands the process/prefix convention
10371 (@pxref{Process/Prefix}).
10372
10373 @item C-t
10374 @kindex C-t (Summary)
10375 @findex gnus-summary-toggle-truncation
10376 Toggle truncation of summary lines
10377 (@code{gnus-summary-toggle-truncation}). This will probably confuse the
10378 line centering function in the summary buffer, so it's not a good idea
10379 to have truncation switched off while reading articles.
10380
10381 @item =
10382 @kindex = (Summary)
10383 @findex gnus-summary-expand-window
10384 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10385 If given a prefix, force an @code{article} window configuration.
10386
10387 @item C-M-e
10388 @kindex C-M-e (Summary)
10389 @findex gnus-summary-edit-parameters
10390 Edit the group parameters (@pxref{Group Parameters}) of the current
10391 group (@code{gnus-summary-edit-parameters}).
10392
10393 @item C-M-a
10394 @kindex C-M-a (Summary)
10395 @findex gnus-summary-customize-parameters
10396 Customize the group parameters (@pxref{Group Parameters}) of the current
10397 group (@code{gnus-summary-customize-parameters}).
10398
10399 @end table
10400
10401
10402 @node Exiting the Summary Buffer
10403 @section Exiting the Summary Buffer
10404 @cindex summary exit
10405 @cindex exiting groups
10406
10407 Exiting from the summary buffer will normally update all info on the
10408 group and return you to the group buffer.
10409
10410 @table @kbd
10411
10412 @item Z Z
10413 @itemx Z Q
10414 @itemx q
10415 @kindex Z Z (Summary)
10416 @kindex Z Q (Summary)
10417 @kindex q (Summary)
10418 @findex gnus-summary-exit
10419 @vindex gnus-summary-exit-hook
10420 @vindex gnus-summary-prepare-exit-hook
10421 @vindex gnus-group-no-more-groups-hook
10422 @c @icon{gnus-summary-exit}
10423 Exit the current group and update all information on the group
10424 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
10425 called before doing much of the exiting, which calls
10426 @code{gnus-summary-expire-articles} by default.
10427 @code{gnus-summary-exit-hook} is called after finishing the exit
10428 process. @code{gnus-group-no-more-groups-hook} is run when returning to
10429 group mode having no more (unread) groups.
10430
10431 @item Z E
10432 @itemx Q
10433 @kindex Z E (Summary)
10434 @kindex Q (Summary)
10435 @findex gnus-summary-exit-no-update
10436 Exit the current group without updating any information on the group
10437 (@code{gnus-summary-exit-no-update}).
10438
10439 @item Z c
10440 @itemx c
10441 @kindex Z c (Summary)
10442 @kindex c (Summary)
10443 @findex gnus-summary-catchup-and-exit
10444 @c @icon{gnus-summary-catchup-and-exit}
10445 Mark all unticked articles in the group as read and then exit
10446 (@code{gnus-summary-catchup-and-exit}).
10447
10448 @item Z C
10449 @kindex Z C (Summary)
10450 @findex gnus-summary-catchup-all-and-exit
10451 Mark all articles, even the ticked ones, as read and then exit
10452 (@code{gnus-summary-catchup-all-and-exit}).
10453
10454 @item Z n
10455 @kindex Z n (Summary)
10456 @findex gnus-summary-catchup-and-goto-next-group
10457 Mark all articles as read and go to the next group
10458 (@code{gnus-summary-catchup-and-goto-next-group}).
10459
10460 @item Z R
10461 @itemx C-x C-s
10462 @kindex Z R (Summary)
10463 @kindex C-x C-s (Summary)
10464 @findex gnus-summary-reselect-current-group
10465 Exit this group, and then enter it again
10466 (@code{gnus-summary-reselect-current-group}). If given a prefix, select
10467 all articles, both read and unread.
10468
10469 @item Z G
10470 @itemx M-g
10471 @kindex Z G (Summary)
10472 @kindex M-g (Summary)
10473 @findex gnus-summary-rescan-group
10474 @c @icon{gnus-summary-mail-get}
10475 Exit the group, check for new articles in the group, and select the
10476 group (@code{gnus-summary-rescan-group}). If given a prefix, select all
10477 articles, both read and unread.
10478
10479 @item Z N
10480 @kindex Z N (Summary)
10481 @findex gnus-summary-next-group
10482 Exit the group and go to the next group
10483 (@code{gnus-summary-next-group}).
10484
10485 @item Z P
10486 @kindex Z P (Summary)
10487 @findex gnus-summary-prev-group
10488 Exit the group and go to the previous group
10489 (@code{gnus-summary-prev-group}).
10490
10491 @item Z s
10492 @kindex Z s (Summary)
10493 @findex gnus-summary-save-newsrc
10494 Save the current number of read/marked articles in the dribble buffer
10495 and then save the dribble buffer (@code{gnus-summary-save-newsrc}). If
10496 given a prefix, also save the @file{.newsrc} file(s). Using this
10497 command will make exit without updating (the @kbd{Q} command) worthless.
10498 @end table
10499
10500 @vindex gnus-exit-group-hook
10501 @code{gnus-exit-group-hook} is called when you exit the current group
10502 with an ``updating'' exit. For instance @kbd{Q}
10503 (@code{gnus-summary-exit-no-update}) does not call this hook.
10504
10505 @findex gnus-summary-wake-up-the-dead
10506 @findex gnus-dead-summary-mode
10507 @vindex gnus-kill-summary-on-exit
10508 If you're in the habit of exiting groups, and then changing your mind
10509 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10510 If you do that, Gnus won't kill the summary buffer when you exit it.
10511 (Quelle surprise!) Instead it will change the name of the buffer to
10512 something like @samp{*Dead Summary ... *} and install a minor mode
10513 called @code{gnus-dead-summary-mode}. Now, if you switch back to this
10514 buffer, you'll find that all keys are mapped to a function called
10515 @code{gnus-summary-wake-up-the-dead}. So tapping any keys in a dead
10516 summary buffer will result in a live, normal summary buffer.
10517
10518 There will never be more than one dead summary buffer at any one time.
10519
10520 @vindex gnus-use-cross-reference
10521 The data on the current group will be updated (which articles you have
10522 read, which articles you have replied to, etc.) when you exit the
10523 summary buffer. If the @code{gnus-use-cross-reference} variable is
10524 @code{t} (which is the default), articles that are cross-referenced to
10525 this group and are marked as read, will also be marked as read in the
10526 other subscribed groups they were cross-posted to. If this variable is
10527 neither @code{nil} nor @code{t}, the article will be marked as read in
10528 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10529
10530
10531 @node Crosspost Handling
10532 @section Crosspost Handling
10533
10534 @cindex velveeta
10535 @cindex spamming
10536 Marking cross-posted articles as read ensures that you'll never have to
10537 read the same article more than once. Unless, of course, somebody has
10538 posted it to several groups separately. Posting the same article to
10539 several groups (not cross-posting) is called @dfn{spamming}, and you are
10540 by law required to send nasty-grams to anyone who perpetrates such a
10541 heinous crime. You may want to try NoCeM handling to filter out spam
10542 (@pxref{NoCeM}).
10543
10544 Remember: Cross-posting is kinda ok, but posting the same article
10545 separately to several groups is not. Massive cross-posting (aka.
10546 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10547 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10548 excessive crossposting (@pxref{Summary Mail Commands}).
10549
10550 @cindex cross-posting
10551 @cindex Xref
10552 @cindex @acronym{NOV}
10553 One thing that may cause Gnus to not do the cross-posting thing
10554 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10555 (which is very nice, because it speeds things up considerably) which
10556 does not include the @code{Xref} header in its @acronym{NOV} lines. This is
10557 Evil, but all too common, alas, alack. Gnus tries to Do The Right Thing
10558 even with @sc{xover} by registering the @code{Xref} lines of all
10559 articles you actually read, but if you kill the articles, or just mark
10560 them as read without reading them, Gnus will not get a chance to snoop
10561 the @code{Xref} lines out of these articles, and will be unable to use
10562 the cross reference mechanism.
10563
10564 @cindex LIST overview.fmt
10565 @cindex overview.fmt
10566 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10567 in its overview files, try @samp{telnet your.nntp.server nntp},
10568 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10569 overview.fmt}. This may not work, but if it does, and the last line you
10570 get does not read @samp{Xref:full}, then you should shout and whine at
10571 your news admin until she includes the @code{Xref} header in the
10572 overview files.
10573
10574 @vindex gnus-nov-is-evil
10575 If you want Gnus to get the @code{Xref}s right all the time, you have to
10576 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10577 considerably.
10578
10579 C'est la vie.
10580
10581 For an alternative approach, @pxref{Duplicate Suppression}.
10582
10583
10584 @node Duplicate Suppression
10585 @section Duplicate Suppression
10586
10587 By default, Gnus tries to make sure that you don't have to read the same
10588 article more than once by utilizing the crossposting mechanism
10589 (@pxref{Crosspost Handling}). However, that simple and efficient
10590 approach may not work satisfactory for some users for various
10591 reasons.
10592
10593 @enumerate
10594 @item
10595 The @acronym{NNTP} server may fail to generate the @code{Xref} header. This
10596 is evil and not very common.
10597
10598 @item
10599 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10600 @file{.overview} data bases. This is evil and all too common, alas.
10601
10602 @item
10603 You may be reading the same group (or several related groups) from
10604 different @acronym{NNTP} servers.
10605
10606 @item
10607 You may be getting mail that duplicates articles posted to groups.
10608 @end enumerate
10609
10610 I'm sure there are other situations where @code{Xref} handling fails as
10611 well, but these four are the most common situations.
10612
10613 If, and only if, @code{Xref} handling fails for you, then you may
10614 consider switching on @dfn{duplicate suppression}. If you do so, Gnus
10615 will remember the @code{Message-ID}s of all articles you have read or
10616 otherwise marked as read, and then, as if by magic, mark them as read
10617 all subsequent times you see them---in @emph{all} groups. Using this
10618 mechanism is quite likely to be somewhat inefficient, but not overly
10619 so. It's certainly preferable to reading the same articles more than
10620 once.
10621
10622 Duplicate suppression is not a very subtle instrument. It's more like a
10623 sledge hammer than anything else. It works in a very simple
10624 fashion---if you have marked an article as read, it adds this Message-ID
10625 to a cache. The next time it sees this Message-ID, it will mark the
10626 article as read with the @samp{M} mark. It doesn't care what group it
10627 saw the article in.
10628
10629 @table @code
10630 @item gnus-suppress-duplicates
10631 @vindex gnus-suppress-duplicates
10632 If non-@code{nil}, suppress duplicates.
10633
10634 @item gnus-save-duplicate-list
10635 @vindex gnus-save-duplicate-list
10636 If non-@code{nil}, save the list of duplicates to a file. This will
10637 make startup and shutdown take longer, so the default is @code{nil}.
10638 However, this means that only duplicate articles read in a single Gnus
10639 session are suppressed.
10640
10641 @item gnus-duplicate-list-length
10642 @vindex gnus-duplicate-list-length
10643 This variable says how many @code{Message-ID}s to keep in the duplicate
10644 suppression list. The default is 10000.
10645
10646 @item gnus-duplicate-file
10647 @vindex gnus-duplicate-file
10648 The name of the file to store the duplicate suppression list in. The
10649 default is @file{~/News/suppression}.
10650 @end table
10651
10652 If you have a tendency to stop and start Gnus often, setting
10653 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea. If
10654 you leave Gnus running for weeks on end, you may have it @code{nil}. On
10655 the other hand, saving the list makes startup and shutdown much slower,
10656 so that means that if you stop and start Gnus often, you should set
10657 @code{gnus-save-duplicate-list} to @code{nil}. Uhm. I'll leave this up
10658 to you to figure out, I think.
10659
10660 @node Security
10661 @section Security
10662
10663 Gnus is able to verify signed messages or decrypt encrypted messages.
10664 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10665 and @acronym{S/MIME}, however you need some external programs to get
10666 things to work:
10667
10668 @enumerate
10669 @item
10670 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10671 install an OpenPGP implementation such as GnuPG. The Lisp interface
10672 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10673 Manual}), but Mailcrypt and gpg.el are also supported.
10674
10675 @item
10676 To handle @acronym{S/MIME} message, you need to install OpenSSL. OpenSSL 0.9.6
10677 or newer is recommended.
10678
10679 @end enumerate
10680
10681 The variables that control security functionality on reading messages
10682 include:
10683
10684 @table @code
10685 @item mm-verify-option
10686 @vindex mm-verify-option
10687 Option of verifying signed parts. @code{never}, not verify;
10688 @code{always}, always verify; @code{known}, only verify known
10689 protocols. Otherwise, ask user.
10690
10691 @item mm-decrypt-option
10692 @vindex mm-decrypt-option
10693 Option of decrypting encrypted parts. @code{never}, no decryption;
10694 @code{always}, always decrypt; @code{known}, only decrypt known
10695 protocols. Otherwise, ask user.
10696
10697 @item mml1991-use
10698 @vindex mml1991-use
10699 Symbol indicating elisp interface to OpenPGP implementation for
10700 @acronym{PGP} messages. The default is @code{pgg}, but
10701 @code{mailcrypt} and @code{gpg} are also supported although
10702 deprecated.
10703
10704 @item mml2015-use
10705 @vindex mml2015-use
10706 Symbol indicating elisp interface to OpenPGP implementation for
10707 @acronym{PGP/MIME} messages. The default is @code{pgg}, but
10708 @code{mailcrypt} and @code{gpg} are also supported although
10709 deprecated.
10710
10711 @end table
10712
10713 By default the buttons that display security information are not
10714 shown, because they clutter reading the actual e-mail. You can type
10715 @kbd{K b} manually to display the information. Use the
10716 @code{gnus-buttonized-mime-types} and
10717 @code{gnus-unbuttonized-mime-types} variables to control this
10718 permanently. @ref{MIME Commands} for further details, and hints on
10719 how to customize these variables to always display security
10720 information.
10721
10722 @cindex snarfing keys
10723 @cindex importing PGP keys
10724 @cindex PGP key ring import
10725 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10726 key ring) is not supported explicitly through a menu item or command,
10727 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10728 allowing you to specify whatever action you think is appropriate
10729 through the usual @acronym{MIME} infrastructure. You can use a
10730 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10731 Emacs MIME Manual}) such as the following to import keys using GNU
10732 Privacy Guard when you click on the @acronym{MIME} button
10733 (@pxref{Using MIME}).
10734
10735 @example
10736 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10737 @end example
10738 @noindent
10739 This happens to also be the default action defined in
10740 @code{mailcap-mime-data}.
10741
10742 More information on how to set things for sending outgoing signed and
10743 encrypted messages up can be found in the message manual
10744 (@pxref{Security, ,Security, message, Message Manual}).
10745
10746 @node Mailing List
10747 @section Mailing List
10748 @cindex mailing list
10749 @cindex RFC 2396
10750
10751 @kindex A M (summary)
10752 @findex gnus-mailing-list-insinuate
10753 Gnus understands some mailing list fields of RFC 2369. To enable it,
10754 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10755 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10756 summary buffer.
10757
10758 That enables the following commands to the summary buffer:
10759
10760 @table @kbd
10761
10762 @item C-c C-n h
10763 @kindex C-c C-n h (Summary)
10764 @findex gnus-mailing-list-help
10765 Send a message to fetch mailing list help, if List-Help field exists.
10766
10767 @item C-c C-n s
10768 @kindex C-c C-n s (Summary)
10769 @findex gnus-mailing-list-subscribe
10770 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10771
10772 @item C-c C-n u
10773 @kindex C-c C-n u (Summary)
10774 @findex gnus-mailing-list-unsubscribe
10775 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10776 field exists.
10777
10778 @item C-c C-n p
10779 @kindex C-c C-n p (Summary)
10780 @findex gnus-mailing-list-post
10781 Post to the mailing list, if List-Post field exists.
10782
10783 @item C-c C-n o
10784 @kindex C-c C-n o (Summary)
10785 @findex gnus-mailing-list-owner
10786 Send a message to the mailing list owner, if List-Owner field exists.
10787
10788 @item C-c C-n a
10789 @kindex C-c C-n a (Summary)
10790 @findex gnus-mailing-list-owner
10791 Browse the mailing list archive, if List-Archive field exists.
10792
10793 @end table
10794
10795
10796 @node Article Buffer
10797 @chapter Article Buffer
10798 @cindex article buffer
10799
10800 The articles are displayed in the article buffer, of which there is only
10801 one. All the summary buffers share the same article buffer unless you
10802 tell Gnus otherwise.
10803
10804 @menu
10805 * Hiding Headers:: Deciding what headers should be displayed.
10806 * Using MIME:: Pushing articles through @acronym{MIME} before reading them.
10807 * Customizing Articles:: Tailoring the look of the articles.
10808 * Article Keymap:: Keystrokes available in the article buffer.
10809 * Misc Article:: Other stuff.
10810 @end menu
10811
10812
10813 @node Hiding Headers
10814 @section Hiding Headers
10815 @cindex hiding headers
10816 @cindex deleting headers
10817
10818 The top section of each article is the @dfn{head}. (The rest is the
10819 @dfn{body}, but you may have guessed that already.)
10820
10821 @vindex gnus-show-all-headers
10822 There is a lot of useful information in the head: the name of the person
10823 who wrote the article, the date it was written and the subject of the
10824 article. That's well and nice, but there's also lots of information
10825 most people do not want to see---what systems the article has passed
10826 through before reaching you, the @code{Message-ID}, the
10827 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10828 of some of those lines. If you want to keep all those lines in the
10829 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10830
10831 Gnus provides you with two variables for sifting headers:
10832
10833 @table @code
10834
10835 @item gnus-visible-headers
10836 @vindex gnus-visible-headers
10837 If this variable is non-@code{nil}, it should be a regular expression
10838 that says what headers you wish to keep in the article buffer. All
10839 headers that do not match this variable will be hidden.
10840
10841 For instance, if you only want to see the name of the person who wrote
10842 the article and the subject, you'd say:
10843
10844 @lisp
10845 (setq gnus-visible-headers "^From:\\|^Subject:")
10846 @end lisp
10847
10848 This variable can also be a list of regexps to match headers to
10849 remain visible.
10850
10851 @item gnus-ignored-headers
10852 @vindex gnus-ignored-headers
10853 This variable is the reverse of @code{gnus-visible-headers}. If this
10854 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10855 should be a regular expression that matches all lines that you want to
10856 hide. All lines that do not match this variable will remain visible.
10857
10858 For instance, if you just want to get rid of the @code{References} line
10859 and the @code{Xref} line, you might say:
10860
10861 @lisp
10862 (setq gnus-ignored-headers "^References:\\|^Xref:")
10863 @end lisp
10864
10865 This variable can also be a list of regexps to match headers to
10866 be removed.
10867
10868 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10869 variable will have no effect.
10870
10871 @end table
10872
10873 @vindex gnus-sorted-header-list
10874 Gnus can also sort the headers for you. (It does this by default.) You
10875 can control the sorting by setting the @code{gnus-sorted-header-list}
10876 variable. It is a list of regular expressions that says in what order
10877 the headers are to be displayed.
10878
10879 For instance, if you want the name of the author of the article first,
10880 and then the subject, you might say something like:
10881
10882 @lisp
10883 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10884 @end lisp
10885
10886 Any headers that are to remain visible, but are not listed in this
10887 variable, will be displayed in random order after all the headers listed in this variable.
10888
10889 @findex gnus-article-hide-boring-headers
10890 @vindex gnus-boring-article-headers
10891 You can hide further boring headers by setting
10892 @code{gnus-treat-hide-boring-headers} to @code{head}. What this function
10893 does depends on the @code{gnus-boring-article-headers} variable. It's a
10894 list, but this list doesn't actually contain header names. Instead it
10895 lists various @dfn{boring conditions} that Gnus can check and remove
10896 from sight.
10897
10898 These conditions are:
10899 @table @code
10900 @item empty
10901 Remove all empty headers.
10902 @item followup-to
10903 Remove the @code{Followup-To} header if it is identical to the
10904 @code{Newsgroups} header.
10905 @item reply-to
10906 Remove the @code{Reply-To} header if it lists the same addresses as
10907 the @code{From} header, or if the @code{broken-reply-to} group
10908 parameter is set.
10909 @item newsgroups
10910 Remove the @code{Newsgroups} header if it only contains the current group
10911 name.
10912 @item to-address
10913 Remove the @code{To} header if it only contains the address identical to
10914 the current group's @code{to-address} parameter.
10915 @item to-list
10916 Remove the @code{To} header if it only contains the address identical to
10917 the current group's @code{to-list} parameter.
10918 @item cc-list
10919 Remove the @code{CC} header if it only contains the address identical to
10920 the current group's @code{to-list} parameter.
10921 @item date
10922 Remove the @code{Date} header if the article is less than three days
10923 old.
10924 @item long-to
10925 Remove the @code{To} header if it is very long.
10926 @item many-to
10927 Remove all @code{To} headers if there are more than one.
10928 @end table
10929
10930 To include these three elements, you could say something like:
10931
10932 @lisp
10933 (setq gnus-boring-article-headers
10934 '(empty followup-to reply-to))
10935 @end lisp
10936
10937 This is also the default value for this variable.
10938
10939
10940 @node Using MIME
10941 @section Using MIME
10942 @cindex @acronym{MIME}
10943
10944 Mime is a standard for waving your hands through the air, aimlessly,
10945 while people stand around yawning.
10946
10947 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10948 while all newsreaders die of fear.
10949
10950 @acronym{MIME} may specify what character set the article uses, the encoding
10951 of the characters, and it also makes it possible to embed pictures and
10952 other naughty stuff in innocent-looking articles.
10953
10954 @vindex gnus-display-mime-function
10955 @findex gnus-display-mime
10956 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10957 to display the @acronym{MIME} parts. This is @code{gnus-display-mime} by
10958 default, which creates a bundle of clickable buttons that can be used to
10959 display, save and manipulate the @acronym{MIME} objects.
10960
10961 The following commands are available when you have placed point over a
10962 @acronym{MIME} button:
10963
10964 @table @kbd
10965 @findex gnus-article-press-button
10966 @item RET (Article)
10967 @kindex RET (Article)
10968 @itemx BUTTON-2 (Article)
10969 Toggle displaying of the @acronym{MIME} object
10970 (@code{gnus-article-press-button}). If built-in viewers can not display
10971 the object, Gnus resorts to external viewers in the @file{mailcap}
10972 files. If a viewer has the @samp{copiousoutput} specification, the
10973 object is displayed inline.
10974
10975 @findex gnus-mime-view-part
10976 @item M-RET (Article)
10977 @kindex M-RET (Article)
10978 @itemx v (Article)
10979 Prompt for a method, and then view the @acronym{MIME} object using this
10980 method (@code{gnus-mime-view-part}).
10981
10982 @findex gnus-mime-view-part-as-type
10983 @item t (Article)
10984 @kindex t (Article)
10985 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10986 (@code{gnus-mime-view-part-as-type}).
10987
10988 @findex gnus-mime-view-part-as-charset
10989 @item C (Article)
10990 @kindex C (Article)
10991 Prompt for a charset, and then view the @acronym{MIME} object using this
10992 charset (@code{gnus-mime-view-part-as-charset}).
10993
10994 @findex gnus-mime-save-part
10995 @item o (Article)
10996 @kindex o (Article)
10997 Prompt for a file name, and then save the @acronym{MIME} object
10998 (@code{gnus-mime-save-part}).
10999
11000 @findex gnus-mime-save-part-and-strip
11001 @item C-o (Article)
11002 @kindex C-o (Article)
11003 Prompt for a file name, then save the @acronym{MIME} object and strip it from
11004 the article. Then proceed to article editing, where a reasonable
11005 suggestion is being made on how the altered article should look
11006 like. The stripped @acronym{MIME} object will be referred via the
11007 message/external-body @acronym{MIME} type.
11008 (@code{gnus-mime-save-part-and-strip}).
11009
11010 @findex gnus-mime-delete-part
11011 @item d (Article)
11012 @kindex d (Article)
11013 Delete the @acronym{MIME} object from the article and replace it with some
11014 information about the removed @acronym{MIME} object
11015 (@code{gnus-mime-delete-part}).
11016
11017 @findex gnus-mime-copy-part
11018 @item c (Article)
11019 @kindex c (Article)
11020 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
11021 (@code{gnus-mime-copy-part}). Compressed files like @file{.gz} and
11022 @file{.bz2} are automatically decompressed if
11023 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
11024 Accessing Compressed Files, emacs, The Emacs Editor}).
11025
11026 @findex gnus-mime-print-part
11027 @item p (Article)
11028 @kindex p (Article)
11029 Print the @acronym{MIME} object (@code{gnus-mime-print-part}). This
11030 command respects the @samp{print=} specifications in the
11031 @file{.mailcap} file.
11032
11033 @findex gnus-mime-inline-part
11034 @item i (Article)
11035 @kindex i (Article)
11036 Insert the contents of the @acronym{MIME} object into the buffer
11037 (@code{gnus-mime-inline-part}) as text/plain. If given a prefix, insert
11038 the raw contents without decoding. If given a numerical prefix, you can
11039 do semi-manual charset stuff (see
11040 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
11041 Article}).
11042
11043 @findex gnus-mime-view-part-internally
11044 @item E (Article)
11045 @kindex E (Article)
11046 View the @acronym{MIME} object with an internal viewer. If no internal
11047 viewer is available, use an external viewer
11048 (@code{gnus-mime-view-part-internally}).
11049
11050 @findex gnus-mime-view-part-externally
11051 @item e (Article)
11052 @kindex e (Article)
11053 View the @acronym{MIME} object with an external viewer.
11054 (@code{gnus-mime-view-part-externally}).
11055
11056 @findex gnus-mime-pipe-part
11057 @item | (Article)
11058 @kindex | (Article)
11059 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
11060
11061 @findex gnus-mime-action-on-part
11062 @item . (Article)
11063 @kindex . (Article)
11064 Interactively run an action on the @acronym{MIME} object
11065 (@code{gnus-mime-action-on-part}).
11066
11067 @end table
11068
11069 Gnus will display some @acronym{MIME} objects automatically. The way Gnus
11070 determines which parts to do this with is described in the Emacs
11071 @acronym{MIME} manual.
11072
11073 It might be best to just use the toggling functions from the article
11074 buffer to avoid getting nasty surprises. (For instance, you enter the
11075 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
11076 decoded the sound file in the article and some horrible sing-a-long song
11077 comes screaming out your speakers, and you can't find the volume button,
11078 because there isn't one, and people are starting to look at you, and you
11079 try to stop the program, but you can't, and you can't find the program
11080 to control the volume, and everybody else in the room suddenly decides
11081 to look at you disdainfully, and you'll feel rather stupid.)
11082
11083 Any similarity to real events and people is purely coincidental. Ahem.
11084
11085 Also @pxref{MIME Commands}.
11086
11087
11088 @node Customizing Articles
11089 @section Customizing Articles
11090 @cindex article customization
11091
11092 A slew of functions for customizing how the articles are to look like
11093 exist. You can call these functions interactively
11094 (@pxref{Article Washing}), or you can have them
11095 called automatically when you select the articles.
11096
11097 To have them called automatically, you should set the corresponding
11098 ``treatment'' variable. For instance, to have headers hidden, you'd set
11099 @code{gnus-treat-hide-headers}. Below is a list of variables that can
11100 be set, but first we discuss the values these variables can have.
11101
11102 Note: Some values, while valid, make little sense. Check the list below
11103 for sensible values.
11104
11105 @enumerate
11106 @item
11107 @code{nil}: Don't do this treatment.
11108
11109 @item
11110 @code{t}: Do this treatment on all body parts.
11111
11112 @item
11113 @code{head}: Do the treatment on the headers.
11114
11115 @item
11116 @code{last}: Do this treatment on the last part.
11117
11118 @item
11119 An integer: Do this treatment on all body parts that have a length less
11120 than this number.
11121
11122 @item
11123 A list of strings: Do this treatment on all body parts that are in
11124 articles that are read in groups that have names that match one of the
11125 regexps in the list.
11126
11127 @item
11128 A list where the first element is not a string:
11129
11130 The list is evaluated recursively. The first element of the list is a
11131 predicate. The following predicates are recognized: @code{or},
11132 @code{and}, @code{not} and @code{typep}. Here's an example:
11133
11134 @lisp
11135 (or last
11136 (typep "text/x-vcard"))
11137 @end lisp
11138
11139 @end enumerate
11140
11141 You may have noticed that the word @dfn{part} is used here. This refers
11142 to the fact that some messages are @acronym{MIME} multipart articles that may
11143 be divided into several parts. Articles that are not multiparts are
11144 considered to contain just a single part.
11145
11146 @vindex gnus-article-treat-types
11147 Are the treatments applied to all sorts of multipart parts? Yes, if you
11148 want to, but by default, only @samp{text/plain} parts are given the
11149 treatment. This is controlled by the @code{gnus-article-treat-types}
11150 variable, which is a list of regular expressions that are matched to the
11151 type of the part. This variable is ignored if the value of the
11152 controlling variable is a predicate list, as described above.
11153
11154 The following treatment options are available. The easiest way to
11155 customize this is to examine the @code{gnus-article-treat} customization
11156 group. Values in parenthesis are suggested sensible values. Others are
11157 possible but those listed are probably sufficient for most people.
11158
11159 @table @code
11160 @item gnus-treat-buttonize (t, integer)
11161 @item gnus-treat-buttonize-head (head)
11162
11163 @xref{Article Buttons}.
11164
11165 @item gnus-treat-capitalize-sentences (t, integer)
11166 @item gnus-treat-overstrike (t, integer)
11167 @item gnus-treat-strip-cr (t, integer)
11168 @item gnus-treat-strip-headers-in-body (t, integer)
11169 @item gnus-treat-strip-leading-blank-lines (t, integer)
11170 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11171 @item gnus-treat-strip-pem (t, last, integer)
11172 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11173 @item gnus-treat-unsplit-urls (t, integer)
11174 @item gnus-treat-wash-html (t, integer)
11175
11176 @xref{Article Washing}.
11177
11178 @item gnus-treat-date-english (head)
11179 @item gnus-treat-date-iso8601 (head)
11180 @item gnus-treat-date-lapsed (head)
11181 @item gnus-treat-date-local (head)
11182 @item gnus-treat-date-original (head)
11183 @item gnus-treat-date-user-defined (head)
11184 @item gnus-treat-date-ut (head)
11185
11186 @xref{Article Date}.
11187
11188 @item gnus-treat-from-picon (head)
11189 @item gnus-treat-mail-picon (head)
11190 @item gnus-treat-newsgroups-picon (head)
11191
11192 @xref{Picons}.
11193
11194 @item gnus-treat-display-smileys (t, integer)
11195
11196 @item gnus-treat-body-boundary (head)
11197
11198 @vindex gnus-body-boundary-delimiter
11199 Adds a delimiter between header and body, the string used as delimiter
11200 is controlled by @code{gnus-body-boundary-delimiter}.
11201
11202 @xref{Smileys}.
11203
11204 @item gnus-treat-display-x-face (head)
11205
11206 @xref{X-Face}.
11207
11208 @item gnus-treat-display-face (head)
11209
11210 @xref{Face}.
11211
11212 @item gnus-treat-emphasize (t, head, integer)
11213 @item gnus-treat-fill-article (t, integer)
11214 @item gnus-treat-fill-long-lines (t, integer)
11215 @item gnus-treat-hide-boring-headers (head)
11216 @item gnus-treat-hide-citation (t, integer)
11217 @item gnus-treat-hide-citation-maybe (t, integer)
11218 @item gnus-treat-hide-headers (head)
11219 @item gnus-treat-hide-signature (t, last)
11220 @item gnus-treat-strip-banner (t, last)
11221 @item gnus-treat-strip-list-identifiers (head)
11222
11223 @xref{Article Hiding}.
11224
11225 @item gnus-treat-highlight-citation (t, integer)
11226 @item gnus-treat-highlight-headers (head)
11227 @item gnus-treat-highlight-signature (t, last, integer)
11228
11229 @xref{Article Highlighting}.
11230
11231 @item gnus-treat-play-sounds
11232 @item gnus-treat-translate
11233 @item gnus-treat-x-pgp-sig (head)
11234
11235 @item gnus-treat-unfold-headers (head)
11236 @item gnus-treat-fold-headers (head)
11237 @item gnus-treat-fold-newsgroups (head)
11238 @item gnus-treat-leading-whitespace (head)
11239
11240 @xref{Article Header}.
11241
11242
11243 @end table
11244
11245 @vindex gnus-part-display-hook
11246 You can, of course, write your own functions to be called from
11247 @code{gnus-part-display-hook}. The functions are called narrowed to the
11248 part, and you can do anything you like, pretty much. There is no
11249 information that you have to keep in the buffer---you can change
11250 everything.
11251
11252
11253 @node Article Keymap
11254 @section Article Keymap
11255
11256 Most of the keystrokes in the summary buffer can also be used in the
11257 article buffer. They should behave as if you typed them in the summary
11258 buffer, which means that you don't actually have to have a summary
11259 buffer displayed while reading. You can do it all from the article
11260 buffer.
11261
11262 @kindex v (Article)
11263 @cindex keys, reserved for users (Article)
11264 The key @kbd{v} is reserved for users. You can bind it key to some
11265 function or better use it as a prefix key.
11266
11267 A few additional keystrokes are available:
11268
11269 @table @kbd
11270
11271 @item SPACE
11272 @kindex SPACE (Article)
11273 @findex gnus-article-next-page
11274 Scroll forwards one page (@code{gnus-article-next-page}).
11275 This is exactly the same as @kbd{h SPACE h}.
11276
11277 @item DEL
11278 @kindex DEL (Article)
11279 @findex gnus-article-prev-page
11280 Scroll backwards one page (@code{gnus-article-prev-page}).
11281 This is exactly the same as @kbd{h DEL h}.
11282
11283 @item C-c ^
11284 @kindex C-c ^ (Article)
11285 @findex gnus-article-refer-article
11286 If point is in the neighborhood of a @code{Message-ID} and you press
11287 @kbd{C-c ^}, Gnus will try to get that article from the server
11288 (@code{gnus-article-refer-article}).
11289
11290 @item C-c C-m
11291 @kindex C-c C-m (Article)
11292 @findex gnus-article-mail
11293 Send a reply to the address near point (@code{gnus-article-mail}). If
11294 given a prefix, include the mail.
11295
11296 @item s
11297 @kindex s (Article)
11298 @findex gnus-article-show-summary
11299 Reconfigure the buffers so that the summary buffer becomes visible
11300 (@code{gnus-article-show-summary}).
11301
11302 @item ?
11303 @kindex ? (Article)
11304 @findex gnus-article-describe-briefly
11305 Give a very brief description of the available keystrokes
11306 (@code{gnus-article-describe-briefly}).
11307
11308 @item TAB
11309 @kindex TAB (Article)
11310 @findex gnus-article-next-button
11311 Go to the next button, if any (@code{gnus-article-next-button}). This
11312 only makes sense if you have buttonizing turned on.
11313
11314 @item M-TAB
11315 @kindex M-TAB (Article)
11316 @findex gnus-article-prev-button
11317 Go to the previous button, if any (@code{gnus-article-prev-button}).
11318
11319 @item R
11320 @kindex R (Article)
11321 @findex gnus-article-reply-with-original
11322 Send a reply to the current article and yank the current article
11323 (@code{gnus-article-reply-with-original}). If given a prefix, make a
11324 wide reply. If the region is active, only yank the text in the
11325 region.
11326
11327 @item F
11328 @kindex F (Article)
11329 @findex gnus-article-followup-with-original
11330 Send a followup to the current article and yank the current article
11331 (@code{gnus-article-followup-with-original}). If given a prefix, make
11332 a wide reply. If the region is active, only yank the text in the
11333 region.
11334
11335
11336 @end table
11337
11338
11339 @node Misc Article
11340 @section Misc Article
11341
11342 @table @code
11343
11344 @item gnus-single-article-buffer
11345 @vindex gnus-single-article-buffer
11346 If non-@code{nil}, use the same article buffer for all the groups.
11347 (This is the default.) If @code{nil}, each group will have its own
11348 article buffer.
11349
11350 @vindex gnus-article-decode-hook
11351 @item gnus-article-decode-hook
11352 @cindex @acronym{MIME}
11353 Hook used to decode @acronym{MIME} articles. The default value is
11354 @code{(article-decode-charset article-decode-encoded-words)}
11355
11356 @vindex gnus-article-prepare-hook
11357 @item gnus-article-prepare-hook
11358 This hook is called right after the article has been inserted into the
11359 article buffer. It is mainly intended for functions that do something
11360 depending on the contents; it should probably not be used for changing
11361 the contents of the article buffer.
11362
11363 @item gnus-article-mode-hook
11364 @vindex gnus-article-mode-hook
11365 Hook called in article mode buffers.
11366
11367 @item gnus-article-mode-syntax-table
11368 @vindex gnus-article-mode-syntax-table
11369 Syntax table used in article buffers. It is initialized from
11370 @code{text-mode-syntax-table}.
11371
11372 @vindex gnus-article-over-scroll
11373 @item gnus-article-over-scroll
11374 If non-@code{nil}, allow scrolling the article buffer even when there
11375 no more new text to scroll in. The default is @code{nil}.
11376
11377 @vindex gnus-article-mode-line-format
11378 @item gnus-article-mode-line-format
11379 This variable is a format string along the same lines as
11380 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
11381 Line}). It accepts the same format specifications as that variable,
11382 with two extensions:
11383
11384 @table @samp
11385
11386 @item w
11387 The @dfn{wash status} of the article. This is a short string with one
11388 character for each possible article wash operation that may have been
11389 performed. The characters and their meaning:
11390
11391 @table @samp
11392
11393 @item c
11394 Displayed when cited text may be hidden in the article buffer.
11395
11396 @item h
11397 Displayed when headers are hidden in the article buffer.
11398
11399 @item p
11400 Displayed when article is digitally signed or encrypted, and Gnus has
11401 hidden the security headers. (N.B. does not tell anything about
11402 security status, i.e. good or bad signature.)
11403
11404 @item s
11405 Displayed when the signature has been hidden in the Article buffer.
11406
11407 @item o
11408 Displayed when Gnus has treated overstrike characters in the article buffer.
11409
11410 @item e
11411 Displayed when Gnus has treated emphasised strings in the article buffer.
11412
11413 @end table
11414
11415 @item m
11416 The number of @acronym{MIME} parts in the article.
11417
11418 @end table
11419
11420 @vindex gnus-break-pages
11421
11422 @item gnus-break-pages
11423 Controls whether @dfn{page breaking} is to take place. If this variable
11424 is non-@code{nil}, the articles will be divided into pages whenever a
11425 page delimiter appears in the article. If this variable is @code{nil},
11426 paging will not be done.
11427
11428 @item gnus-page-delimiter
11429 @vindex gnus-page-delimiter
11430 This is the delimiter mentioned above. By default, it is @samp{^L}
11431 (formfeed).
11432
11433 @cindex IDNA
11434 @cindex internationalized domain names
11435 @vindex gnus-use-idna
11436 @item gnus-use-idna
11437 This variable controls whether Gnus performs IDNA decoding of
11438 internationalized domain names inside @samp{From}, @samp{To} and
11439 @samp{Cc} headers. This requires
11440 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11441 variable is only enabled if you have installed it.
11442
11443 @end table
11444
11445
11446 @node Composing Messages
11447 @chapter Composing Messages
11448 @cindex composing messages
11449 @cindex messages
11450 @cindex mail
11451 @cindex sending mail
11452 @cindex reply
11453 @cindex followup
11454 @cindex post
11455 @cindex using gpg
11456 @cindex using s/mime
11457 @cindex using smime
11458
11459 @kindex C-c C-c (Post)
11460 All commands for posting and mailing will put you in a message buffer
11461 where you can edit the article all you like, before you send the
11462 article by pressing @kbd{C-c C-c}. @xref{Top, , Overview, message,
11463 Message Manual}. Where the message will be posted/mailed to depends
11464 on your setup (@pxref{Posting Server}).
11465
11466 @menu
11467 * Mail:: Mailing and replying.
11468 * Posting Server:: What server should you post and mail via?
11469 * POP before SMTP:: You cannot send a mail unless you read a mail.
11470 * Mail and Post:: Mailing and posting at the same time.
11471 * Archived Messages:: Where Gnus stores the messages you've sent.
11472 * Posting Styles:: An easier way to specify who you are.
11473 * Drafts:: Postponing messages and rejected messages.
11474 * Rejected Articles:: What happens if the server doesn't like your article?
11475 * Signing and encrypting:: How to compose secure messages.
11476 @end menu
11477
11478 Also @pxref{Canceling and Superseding} for information on how to
11479 remove articles you shouldn't have posted.
11480
11481
11482 @node Mail
11483 @section Mail
11484
11485 Variables for customizing outgoing mail:
11486
11487 @table @code
11488 @item gnus-uu-digest-headers
11489 @vindex gnus-uu-digest-headers
11490 List of regexps to match headers included in digested messages. The
11491 headers will be included in the sequence they are matched. If
11492 @code{nil} include all headers.
11493
11494 @item gnus-add-to-list
11495 @vindex gnus-add-to-list
11496 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11497 that have none when you do a @kbd{a}.
11498
11499 @item gnus-confirm-mail-reply-to-news
11500 @vindex gnus-confirm-mail-reply-to-news
11501 If non-@code{nil}, Gnus will ask you for a confirmation when you are
11502 about to reply to news articles by mail. If it is @code{nil}, nothing
11503 interferes in what you want to do. This can also be a function
11504 receiving the group name as the only parameter which should return
11505 non-@code{nil} if a confirmation is needed, or a regular expression
11506 matching group names, where confirmation should be asked for.
11507
11508 If you find yourself never wanting to reply to mail, but occasionally
11509 press @kbd{R} anyway, this variable might be for you.
11510
11511 @item gnus-confirm-treat-mail-like-news
11512 @vindex gnus-confirm-treat-mail-like-news
11513 If non-@code{nil}, Gnus also requests confirmation according to
11514 @code{gnus-confirm-mail-reply-to-news} when replying to mail. This is
11515 useful for treating mailing lists like newsgroups.
11516
11517 @end table
11518
11519
11520 @node Posting Server
11521 @section Posting Server
11522
11523 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11524 (extremely intelligent, of course) article, where does it go?
11525
11526 Thank you for asking. I hate you.
11527
11528 It can be quite complicated.
11529
11530 @vindex gnus-post-method
11531 When posting news, Message usually invokes @code{message-send-news}
11532 (@pxref{News Variables, , News Variables, message, Message Manual}).
11533 Normally, Gnus will post using the same select method as you're
11534 reading from (which might be convenient if you're reading lots of
11535 groups from different private servers). However. If the server
11536 you're reading from doesn't allow posting, just reading, you probably
11537 want to use some other server to post your (extremely intelligent and
11538 fabulously interesting) articles. You can then set the
11539 @code{gnus-post-method} to some other method:
11540
11541 @lisp
11542 (setq gnus-post-method '(nnspool ""))
11543 @end lisp
11544
11545 Now, if you've done this, and then this server rejects your article, or
11546 this server is down, what do you do then? To override this variable you
11547 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11548 the ``current'' server, to get back the default behavior, for posting.
11549
11550 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11551 Gnus will prompt you for what method to use for posting.
11552
11553 You can also set @code{gnus-post-method} to a list of select methods.
11554 If that's the case, Gnus will always prompt you for what method to use
11555 for posting.
11556
11557 Finally, if you want to always post using the native select method,
11558 you can set this variable to @code{native}.
11559
11560 When sending mail, Message invokes @code{message-send-mail-function}.
11561 The default function, @code{message-send-mail-with-sendmail}, pipes
11562 your article to the @code{sendmail} binary for further queuing and
11563 sending. When your local system is not configured for sending mail
11564 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11565 server, you can set @code{message-send-mail-function} to
11566 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11567 package correctly. An example:
11568
11569 @lisp
11570 (setq message-send-mail-function 'smtpmail-send-it
11571 smtpmail-default-smtp-server "YOUR SMTP HOST")
11572 @end lisp
11573
11574 To the thing similar to this, there is
11575 @code{message-smtpmail-send-it}. It is useful if your @acronym{ISP}
11576 requires the @acronym{POP}-before-@acronym{SMTP} authentication.
11577 @xref{POP before SMTP}.
11578
11579 Other possible choices for @code{message-send-mail-function} includes
11580 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11581 and @code{feedmail-send-it}.
11582
11583 @node POP before SMTP
11584 @section POP before SMTP
11585 @cindex pop before smtp
11586 @findex message-smtpmail-send-it
11587 @findex mail-source-touch-pop
11588
11589 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
11590 authentication? It is whether you need to connect to the @acronym{POP}
11591 mail server within a certain time before sending mails. If so, there is
11592 a convenient way. To do that, put the following lines in your
11593 @file{~/.gnus.el} file:
11594
11595 @lisp
11596 (setq message-send-mail-function 'message-smtpmail-send-it)
11597 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
11598 @end lisp
11599
11600 @noindent
11601 It means to let Gnus connect to the @acronym{POP} mail server in advance
11602 whenever you send a mail. The @code{mail-source-touch-pop} function
11603 does only a @acronym{POP} authentication according to the value of
11604 @code{mail-sources} without fetching mails, just before sending a mail.
11605 Note that you have to use @code{message-smtpmail-send-it} which runs
11606 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
11607 set the value of @code{mail-sources} for a @acronym{POP} connection
11608 correctly. @xref{Mail Sources}.
11609
11610 If you have two or more @acronym{POP} mail servers set in
11611 @code{mail-sources}, you may want to specify one of them to
11612 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
11613 used for the @acronym{POP}-before-@acronym{SMTP} authentication. If it
11614 is your primary @acronym{POP} mail server (i.e., you are fetching mails
11615 mainly from that server), you can set it permanently as follows:
11616
11617 @lisp
11618 (setq mail-source-primary-source
11619 '(pop :server "pop3.mail.server"
11620 :password "secret"))
11621 @end lisp
11622
11623 @noindent
11624 Otherwise, bind it dynamically only when performing the
11625 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
11626
11627 @lisp
11628 (add-hook 'message-send-mail-hook
11629 (lambda ()
11630 (let ((mail-source-primary-source
11631 '(pop :server "pop3.mail.server"
11632 :password "secret")))
11633 (mail-source-touch-pop))))
11634 @end lisp
11635
11636 @node Mail and Post
11637 @section Mail and Post
11638
11639 Here's a list of variables relevant to both mailing and
11640 posting:
11641
11642 @table @code
11643 @item gnus-mailing-list-groups
11644 @findex gnus-mailing-list-groups
11645 @cindex mailing lists
11646
11647 If your news server offers groups that are really mailing lists
11648 gatewayed to the @acronym{NNTP} server, you can read those groups without
11649 problems, but you can't post/followup to them without some difficulty.
11650 One solution is to add a @code{to-address} to the group parameters
11651 (@pxref{Group Parameters}). An easier thing to do is set the
11652 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11653 really are mailing lists. Then, at least, followups to the mailing
11654 lists will work most of the time. Posting to these groups (@kbd{a}) is
11655 still a pain, though.
11656
11657 @item gnus-user-agent
11658 @vindex gnus-user-agent
11659 @cindex User-Agent
11660
11661 This variable controls which information should be exposed in the
11662 User-Agent header. It can be one of the symbols @code{gnus} (show only
11663 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11664 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11665 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11666 system type) or a custom string. If you set it to a string, be sure to
11667 use a valid format, see RFC 2616.
11668
11669 @end table
11670
11671 You may want to do spell-checking on messages that you send out. Or, if
11672 you don't want to spell-check by hand, you could add automatic
11673 spell-checking via the @code{ispell} package:
11674
11675 @cindex ispell
11676 @findex ispell-message
11677 @lisp
11678 (add-hook 'message-send-hook 'ispell-message)
11679 @end lisp
11680
11681 If you want to change the @code{ispell} dictionary based on what group
11682 you're in, you could say something like the following:
11683
11684 @lisp
11685 (add-hook 'gnus-select-group-hook
11686 (lambda ()
11687 (cond
11688 ((string-match
11689 "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11690 (ispell-change-dictionary "deutsch"))
11691 (t
11692 (ispell-change-dictionary "english")))))
11693 @end lisp
11694
11695 Modify to suit your needs.
11696
11697
11698 @node Archived Messages
11699 @section Archived Messages
11700 @cindex archived messages
11701 @cindex sent messages
11702
11703 Gnus provides a few different methods for storing the mail and news you
11704 send. The default method is to use the @dfn{archive virtual server} to
11705 store the messages. If you want to disable this completely, the
11706 @code{gnus-message-archive-group} variable should be @code{nil}, which
11707 is the default.
11708
11709 For archiving interesting messages in a group you read, see the
11710 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11711 Group Commands}).
11712
11713 @vindex gnus-message-archive-method
11714 @code{gnus-message-archive-method} says what virtual server Gnus is to
11715 use to store sent messages. The default is:
11716
11717 @lisp
11718 (nnfolder "archive"
11719 (nnfolder-directory "~/Mail/archive")
11720 (nnfolder-active-file "~/Mail/archive/active")
11721 (nnfolder-get-new-mail nil)
11722 (nnfolder-inhibit-expiry t))
11723 @end lisp
11724
11725 You can, however, use any mail select method (@code{nnml},
11726 @code{nnmbox}, etc.). @code{nnfolder} is a quite likable select method
11727 for doing this sort of thing, though. If you don't like the default
11728 directory chosen, you could say something like:
11729
11730 @lisp
11731 (setq gnus-message-archive-method
11732 '(nnfolder "archive"
11733 (nnfolder-inhibit-expiry t)
11734 (nnfolder-active-file "~/News/sent-mail/active")
11735 (nnfolder-directory "~/News/sent-mail/")))
11736 @end lisp
11737
11738 @vindex gnus-message-archive-group
11739 @cindex Gcc
11740 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11741 to one or more group(s) on that server. Which group to use is
11742 determined by the @code{gnus-message-archive-group} variable.
11743
11744 This variable can be used to do the following:
11745
11746 @table @asis
11747 @item a string
11748 Messages will be saved in that group.
11749
11750 Note that you can include a select method in the group name, then the
11751 message will not be stored in the select method given by
11752 @code{gnus-message-archive-method}, but in the select method specified
11753 by the group name, instead. Suppose @code{gnus-message-archive-method}
11754 has the default value shown above. Then setting
11755 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11756 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11757 value @code{"nnml:foo"}, then outgoing messages will be stored in
11758 @samp{nnml:foo}.
11759
11760 @item a list of strings
11761 Messages will be saved in all those groups.
11762
11763 @item an alist of regexps, functions and forms
11764 When a key ``matches'', the result is used.
11765
11766 @item @code{nil}
11767 No message archiving will take place. This is the default.
11768 @end table
11769
11770 Let's illustrate:
11771
11772 Just saving to a single group called @samp{MisK}:
11773 @lisp
11774 (setq gnus-message-archive-group "MisK")
11775 @end lisp
11776
11777 Saving to two groups, @samp{MisK} and @samp{safe}:
11778 @lisp
11779 (setq gnus-message-archive-group '("MisK" "safe"))
11780 @end lisp
11781
11782 Save to different groups based on what group you are in:
11783 @lisp
11784 (setq gnus-message-archive-group
11785 '(("^alt" "sent-to-alt")
11786 ("mail" "sent-to-mail")
11787 (".*" "sent-to-misc")))
11788 @end lisp
11789
11790 More complex stuff:
11791 @lisp
11792 (setq gnus-message-archive-group
11793 '((if (message-news-p)
11794 "misc-news"
11795 "misc-mail")))
11796 @end lisp
11797
11798 How about storing all news messages in one file, but storing all mail
11799 messages in one file per month:
11800
11801 @lisp
11802 (setq gnus-message-archive-group
11803 '((if (message-news-p)
11804 "misc-news"
11805 (concat "mail." (format-time-string "%Y-%m")))))
11806 @end lisp
11807
11808 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11809 @c use a different value for @code{gnus-message-archive-group} there.)
11810
11811 Now, when you send a message off, it will be stored in the appropriate
11812 group. (If you want to disable storing for just one particular message,
11813 you can just remove the @code{Gcc} header that has been inserted.) The
11814 archive group will appear in the group buffer the next time you start
11815 Gnus, or the next time you press @kbd{F} in the group buffer. You can
11816 enter it and read the articles in it just like you'd read any other
11817 group. If the group gets really big and annoying, you can simply rename
11818 if (using @kbd{G r} in the group buffer) to something
11819 nice---@samp{misc-mail-september-1995}, or whatever. New messages will
11820 continue to be stored in the old (now empty) group.
11821
11822 That's the default method of archiving sent messages. Gnus offers a
11823 different way for the people who don't like the default method. In that
11824 case you should set @code{gnus-message-archive-group} to @code{nil};
11825 this will disable archiving.
11826
11827 @table @code
11828 @item gnus-outgoing-message-group
11829 @vindex gnus-outgoing-message-group
11830 All outgoing messages will be put in this group. If you want to store
11831 all your outgoing mail and articles in the group @samp{nnml:archive},
11832 you set this variable to that value. This variable can also be a list of
11833 group names.
11834
11835 If you want to have greater control over what group to put each
11836 message in, you can set this variable to a function that checks the
11837 current newsgroup name and then returns a suitable group name (or list
11838 of names).
11839
11840 This variable can be used instead of @code{gnus-message-archive-group},
11841 but the latter is the preferred method.
11842
11843 @item gnus-gcc-mark-as-read
11844 @vindex gnus-gcc-mark-as-read
11845 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11846
11847 @item gnus-gcc-externalize-attachments
11848 @vindex gnus-gcc-externalize-attachments
11849 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11850 and matches the Gcc group name, attach files as external parts; if it is
11851 @code{all}, attach local files as external parts; if it is other
11852 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11853 changed in the future.
11854
11855 @end table
11856
11857
11858 @node Posting Styles
11859 @section Posting Styles
11860 @cindex posting styles
11861 @cindex styles
11862
11863 All them variables, they make my head swim.
11864
11865 So what if you want a different @code{Organization} and signature based
11866 on what groups you post to? And you post both from your home machine
11867 and your work machine, and you want different @code{From} lines, and so
11868 on?
11869
11870 @vindex gnus-posting-styles
11871 One way to do stuff like that is to write clever hooks that change the
11872 variables you need to have changed. That's a bit boring, so somebody
11873 came up with the bright idea of letting the user specify these things in
11874 a handy alist. Here's an example of a @code{gnus-posting-styles}
11875 variable:
11876
11877 @lisp
11878 ((".*"
11879 (signature "Peace and happiness")
11880 (organization "What me?"))
11881 ("^comp"
11882 (signature "Death to everybody"))
11883 ("comp.emacs.i-love-it"
11884 (organization "Emacs is it")))
11885 @end lisp
11886
11887 As you might surmise from this example, this alist consists of several
11888 @dfn{styles}. Each style will be applicable if the first element
11889 ``matches'', in some form or other. The entire alist will be iterated
11890 over, from the beginning towards the end, and each match will be
11891 applied, which means that attributes in later styles that match override
11892 the same attributes in earlier matching styles. So
11893 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11894 signature and the @samp{What me?} @code{Organization} header.
11895
11896 The first element in each style is called the @code{match}. If it's a
11897 string, then Gnus will try to regexp match it against the group name.
11898 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11899 will look in the original article for a header whose name is
11900 @var{match} and compare that @var{regexp}. @var{match} and
11901 @var{regexp} are strings. (The original article is the one you are
11902 replying or following up to. If you are not composing a reply or a
11903 followup, then there is nothing to match against.) If the
11904 @code{match} is a function symbol, that function will be called with
11905 no arguments. If it's a variable symbol, then the variable will be
11906 referenced. If it's a list, then that list will be @code{eval}ed. In
11907 any case, if this returns a non-@code{nil} value, then the style is
11908 said to @dfn{match}.
11909
11910 Each style may contain an arbitrary amount of @dfn{attributes}. Each
11911 attribute consists of a @code{(@var{name} @var{value})} pair. In
11912 addition, you can also use the @code{(@var{name} :file @var{value})}
11913 form or the @code{(@var{name} :value @var{value})} form. Where
11914 @code{:file} signifies @var{value} represents a file name and its
11915 contents should be used as the attribute value, @code{:value} signifies
11916 @var{value} does not represent a file name explicitly. The attribute
11917 name can be one of:
11918
11919 @itemize @bullet
11920 @item @code{signature}
11921 @item @code{signature-file}
11922 @item @code{x-face-file}
11923 @item @code{address}, overriding @code{user-mail-address}
11924 @item @code{name}, overriding @code{(user-full-name)}
11925 @item @code{body}
11926 @end itemize
11927
11928 The attribute name can also be a string or a symbol. In that case,
11929 this will be used as a header name, and the value will be inserted in
11930 the headers of the article; if the value is @code{nil}, the header
11931 name will be removed. If the attribute name is @code{eval}, the form
11932 is evaluated, and the result is thrown away.
11933
11934 The attribute value can be a string (used verbatim), a function with
11935 zero arguments (the return value will be used), a variable (its value
11936 will be used) or a list (it will be @code{eval}ed and the return value
11937 will be used). The functions and sexps are called/@code{eval}ed in the
11938 message buffer that is being set up. The headers of the current article
11939 are available through the @code{message-reply-headers} variable, which
11940 is a vector of the following headers: number subject from date id
11941 references chars lines xref extra.
11942
11943 @vindex message-reply-headers
11944
11945 If you wish to check whether the message you are about to compose is
11946 meant to be a news article or a mail message, you can check the values
11947 of the @code{message-news-p} and @code{message-mail-p} functions.
11948
11949 @findex message-mail-p
11950 @findex message-news-p
11951
11952 So here's a new example:
11953
11954 @lisp
11955 (setq gnus-posting-styles
11956 '((".*"
11957 (signature-file "~/.signature")
11958 (name "User Name")
11959 (x-face-file "~/.xface")
11960 (x-url (getenv "WWW_HOME"))
11961 (organization "People's Front Against MWM"))
11962 ("^rec.humor"
11963 (signature my-funny-signature-randomizer))
11964 ((equal (system-name) "gnarly") ;; @r{A form}
11965 (signature my-quote-randomizer))
11966 (message-news-p ;; @r{A function symbol}
11967 (signature my-news-signature))
11968 (window-system ;; @r{A value symbol}
11969 ("X-Window-System" (format "%s" window-system)))
11970 ;; @r{If I'm replying to Larsi, set the Organization header.}
11971 ((header "from" "larsi.*org")
11972 (Organization "Somewhere, Inc."))
11973 ((posting-from-work-p) ;; @r{A user defined function}
11974 (signature-file "~/.work-signature")
11975 (address "user@@bar.foo")
11976 (body "You are fired.\n\nSincerely, your boss.")
11977 (organization "Important Work, Inc"))
11978 ("nnml:.*"
11979 (From (save-excursion
11980 (set-buffer gnus-article-buffer)
11981 (message-fetch-field "to"))))
11982 ("^nn.+:"
11983 (signature-file "~/.mail-signature"))))
11984 @end lisp
11985
11986 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11987 @code{From} address in all your outgoing replies, which might be handy
11988 if you fill many roles.
11989
11990
11991 @node Drafts
11992 @section Drafts
11993 @cindex drafts
11994
11995 If you are writing a message (mail or news) and suddenly remember that
11996 you have a steak in the oven (or some pesto in the food processor, you
11997 craaazy vegetarians), you'll probably wish there was a method to save
11998 the message you are writing so that you can continue editing it some
11999 other day, and send it when you feel its finished.
12000
12001 Well, don't worry about it. Whenever you start composing a message of
12002 some sort using the Gnus mail and post commands, the buffer you get will
12003 automatically associate to an article in a special @dfn{draft} group.
12004 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
12005 article will be saved there. (Auto-save files also go to the draft
12006 group.)
12007
12008 @cindex nndraft
12009 @vindex nndraft-directory
12010 The draft group is a special group (which is implemented as an
12011 @code{nndraft} group, if you absolutely have to know) called
12012 @samp{nndraft:drafts}. The variable @code{nndraft-directory} says where
12013 @code{nndraft} is to store its files. What makes this group special is
12014 that you can't tick any articles in it or mark any articles as
12015 read---all articles in the group are permanently unread.
12016
12017 If the group doesn't exist, it will be created and you'll be subscribed
12018 to it. The only way to make it disappear from the Group buffer is to
12019 unsubscribe it. The special properties of the draft group comes from
12020 a group property (@pxref{Group Parameters}), and if lost the group
12021 behaves like any other group. This means the commands below will not
12022 be available. To restore the special properties of the group, the
12023 simplest way is to kill the group, using @kbd{C-k}, and restart
12024 Gnus. The group is automatically created again with the
12025 correct parameters. The content of the group is not lost.
12026
12027 @c @findex gnus-dissociate-buffer-from-draft
12028 @c @kindex C-c M-d (Mail)
12029 @c @kindex C-c M-d (Post)
12030 @c @findex gnus-associate-buffer-with-draft
12031 @c @kindex C-c C-d (Mail)
12032 @c @kindex C-c C-d (Post)
12033 @c If you're writing some super-secret message that you later want to
12034 @c encode with PGP before sending, you may wish to turn the auto-saving
12035 @c (and association with the draft group) off. You never know who might be
12036 @c interested in reading all your extremely valuable and terribly horrible
12037 @c and interesting secrets. The @kbd{C-c M-d}
12038 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
12039 @c If you change your mind and want to turn the auto-saving back on again,
12040 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
12041 @c
12042 @c @vindex gnus-use-draft
12043 @c To leave association with the draft group off by default, set
12044 @c @code{gnus-use-draft} to @code{nil}. It is @code{t} by default.
12045
12046 @findex gnus-draft-edit-message
12047 @kindex D e (Draft)
12048 When you want to continue editing the article, you simply enter the
12049 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
12050 that. You will be placed in a buffer where you left off.
12051
12052 Rejected articles will also be put in this draft group (@pxref{Rejected
12053 Articles}).
12054
12055 @findex gnus-draft-send-all-messages
12056 @kindex D s (Draft)
12057 @findex gnus-draft-send-message
12058 @kindex D S (Draft)
12059 If you have lots of rejected messages you want to post (or mail) without
12060 doing further editing, you can use the @kbd{D s} command
12061 (@code{gnus-draft-send-message}). This command understands the
12062 process/prefix convention (@pxref{Process/Prefix}). The @kbd{D S}
12063 command (@code{gnus-draft-send-all-messages}) will ship off all messages
12064 in the buffer.
12065
12066 @findex gnus-draft-toggle-sending
12067 @kindex D t (Draft)
12068 If you have some messages that you wish not to send, you can use the
12069 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
12070 as unsendable. This is a toggling command.
12071
12072
12073 @node Rejected Articles
12074 @section Rejected Articles
12075 @cindex rejected articles
12076
12077 Sometimes a news server will reject an article. Perhaps the server
12078 doesn't like your face. Perhaps it just feels miserable. Perhaps
12079 @emph{there be demons}. Perhaps you have included too much cited text.
12080 Perhaps the disk is full. Perhaps the server is down.
12081
12082 These situations are, of course, totally beyond the control of Gnus.
12083 (Gnus, of course, loves the way you look, always feels great, has angels
12084 fluttering around inside of it, doesn't care about how much cited text
12085 you include, never runs full and never goes down.) So Gnus saves these
12086 articles until some later time when the server feels better.
12087
12088 The rejected articles will automatically be put in a special draft group
12089 (@pxref{Drafts}). When the server comes back up again, you'd then
12090 typically enter that group and send all the articles off.
12091
12092 @node Signing and encrypting
12093 @section Signing and encrypting
12094 @cindex using gpg
12095 @cindex using s/mime
12096 @cindex using smime
12097
12098 Gnus can digitally sign and encrypt your messages, using vanilla
12099 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}. For
12100 decoding such messages, see the @code{mm-verify-option} and
12101 @code{mm-decrypt-option} options (@pxref{Security}).
12102
12103 @vindex gnus-message-replysign
12104 @vindex gnus-message-replyencrypt
12105 @vindex gnus-message-replysignencrypted
12106 Often, you would like to sign replies to people who send you signed
12107 messages. Even more often, you might want to encrypt messages which
12108 are in reply to encrypted messages. Gnus offers
12109 @code{gnus-message-replysign} to enable the former, and
12110 @code{gnus-message-replyencrypt} for the latter. In addition, setting
12111 @code{gnus-message-replysignencrypted} (on by default) will sign
12112 automatically encrypted messages.
12113
12114 Instructing @acronym{MML} to perform security operations on a
12115 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
12116 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
12117
12118 @table @kbd
12119
12120 @item C-c C-m s s
12121 @kindex C-c C-m s s (Message)
12122 @findex mml-secure-message-sign-smime
12123
12124 Digitally sign current message using @acronym{S/MIME}.
12125
12126 @item C-c C-m s o
12127 @kindex C-c C-m s o (Message)
12128 @findex mml-secure-message-sign-pgp
12129
12130 Digitally sign current message using @acronym{PGP}.
12131
12132 @item C-c C-m s p
12133 @kindex C-c C-m s p (Message)
12134 @findex mml-secure-message-sign-pgp
12135
12136 Digitally sign current message using @acronym{PGP/MIME}.
12137
12138 @item C-c C-m c s
12139 @kindex C-c C-m c s (Message)
12140 @findex mml-secure-message-encrypt-smime
12141
12142 Digitally encrypt current message using @acronym{S/MIME}.
12143
12144 @item C-c C-m c o
12145 @kindex C-c C-m c o (Message)
12146 @findex mml-secure-message-encrypt-pgp
12147
12148 Digitally encrypt current message using @acronym{PGP}.
12149
12150 @item C-c C-m c p
12151 @kindex C-c C-m c p (Message)
12152 @findex mml-secure-message-encrypt-pgpmime
12153
12154 Digitally encrypt current message using @acronym{PGP/MIME}.
12155
12156 @item C-c C-m C-n
12157 @kindex C-c C-m C-n (Message)
12158 @findex mml-unsecure-message
12159 Remove security related @acronym{MML} tags from message.
12160
12161 @end table
12162
12163 @xref{Security, ,Security, message, Message Manual}, for more information.
12164
12165 @node Select Methods
12166 @chapter Select Methods
12167 @cindex foreign groups
12168 @cindex select methods
12169
12170 A @dfn{foreign group} is a group not read by the usual (or
12171 default) means. It could be, for instance, a group from a different
12172 @acronym{NNTP} server, it could be a virtual group, or it could be your own
12173 personal mail group.
12174
12175 A foreign group (or any group, really) is specified by a @dfn{name} and
12176 a @dfn{select method}. To take the latter first, a select method is a
12177 list where the first element says what back end to use (e.g. @code{nntp},
12178 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
12179 name}. There may be additional elements in the select method, where the
12180 value may have special meaning for the back end in question.
12181
12182 One could say that a select method defines a @dfn{virtual server}---so
12183 we do just that (@pxref{Server Buffer}).
12184
12185 The @dfn{name} of the group is the name the back end will recognize the
12186 group as.
12187
12188 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
12189 @samp{some.where.edu} will have the name @samp{soc.motss} and select
12190 method @code{(nntp "some.where.edu")}. Gnus will call this group
12191 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
12192 back end just knows this group as @samp{soc.motss}.
12193
12194 The different methods all have their peculiarities, of course.
12195
12196 @menu
12197 * Server Buffer:: Making and editing virtual servers.
12198 * Getting News:: Reading USENET news with Gnus.
12199 * Getting Mail:: Reading your personal mail with Gnus.
12200 * Browsing the Web:: Getting messages from a plethora of Web sources.
12201 * IMAP:: Using Gnus as a @acronym{IMAP} client.
12202 * Other Sources:: Reading directories, files, SOUP packets.
12203 * Combined Groups:: Combining groups into one group.
12204 * Gnus Unplugged:: Reading news and mail offline.
12205 @end menu
12206
12207
12208 @node Server Buffer
12209 @section Server Buffer
12210
12211 Traditionally, a @dfn{server} is a machine or a piece of software that
12212 one connects to, and then requests information from. Gnus does not
12213 connect directly to any real servers, but does all transactions through
12214 one back end or other. But that's just putting one layer more between
12215 the actual media and Gnus, so we might just as well say that each
12216 back end represents a virtual server.
12217
12218 For instance, the @code{nntp} back end may be used to connect to several
12219 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
12220 on the same actual @acronym{NNTP} server. You tell Gnus which back end to
12221 use, and what parameters to set by specifying a @dfn{select method}.
12222
12223 These select method specifications can sometimes become quite
12224 complicated---say, for instance, that you want to read from the
12225 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12226 hangs if queried for @acronym{NOV} headers and has a buggy select. Ahem.
12227 Anyway, if you had to specify that for each group that used this
12228 server, that would be too much work, so Gnus offers a way of naming
12229 select methods, which is what you do in the server buffer.
12230
12231 To enter the server buffer, use the @kbd{^}
12232 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12233
12234 @menu
12235 * Server Buffer Format:: You can customize the look of this buffer.
12236 * Server Commands:: Commands to manipulate servers.
12237 * Example Methods:: Examples server specifications.
12238 * Creating a Virtual Server:: An example session.
12239 * Server Variables:: Which variables to set.
12240 * Servers and Methods:: You can use server names as select methods.
12241 * Unavailable Servers:: Some servers you try to contact may be down.
12242 @end menu
12243
12244 @vindex gnus-server-mode-hook
12245 @code{gnus-server-mode-hook} is run when creating the server buffer.
12246
12247
12248 @node Server Buffer Format
12249 @subsection Server Buffer Format
12250 @cindex server buffer format
12251
12252 @vindex gnus-server-line-format
12253 You can change the look of the server buffer lines by changing the
12254 @code{gnus-server-line-format} variable. This is a @code{format}-like
12255 variable, with some simple extensions:
12256
12257 @table @samp
12258
12259 @item h
12260 How the news is fetched---the back end name.
12261
12262 @item n
12263 The name of this server.
12264
12265 @item w
12266 Where the news is to be fetched from---the address.
12267
12268 @item s
12269 The opened/closed/denied status of the server.
12270
12271 @item a
12272 Whether this server is agentized.
12273 @end table
12274
12275 @vindex gnus-server-mode-line-format
12276 The mode line can also be customized by using the
12277 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12278 Formatting}). The following specs are understood:
12279
12280 @table @samp
12281 @item S
12282 Server name.
12283
12284 @item M
12285 Server method.
12286 @end table
12287
12288 Also @pxref{Formatting Variables}.
12289
12290
12291 @node Server Commands
12292 @subsection Server Commands
12293 @cindex server commands
12294
12295 @table @kbd
12296
12297 @item v
12298 @kindex v (Server)
12299 @cindex keys, reserved for users (Server)
12300 The key @kbd{v} is reserved for users. You can bind it key to some
12301 function or better use it as a prefix key.
12302
12303 @item a
12304 @kindex a (Server)
12305 @findex gnus-server-add-server
12306 Add a new server (@code{gnus-server-add-server}).
12307
12308 @item e
12309 @kindex e (Server)
12310 @findex gnus-server-edit-server
12311 Edit a server (@code{gnus-server-edit-server}).
12312
12313 @item SPACE
12314 @kindex SPACE (Server)
12315 @findex gnus-server-read-server
12316 Browse the current server (@code{gnus-server-read-server}).
12317
12318 @item q
12319 @kindex q (Server)
12320 @findex gnus-server-exit
12321 Return to the group buffer (@code{gnus-server-exit}).
12322
12323 @item k
12324 @kindex k (Server)
12325 @findex gnus-server-kill-server
12326 Kill the current server (@code{gnus-server-kill-server}).
12327
12328 @item y
12329 @kindex y (Server)
12330 @findex gnus-server-yank-server
12331 Yank the previously killed server (@code{gnus-server-yank-server}).
12332
12333 @item c
12334 @kindex c (Server)
12335 @findex gnus-server-copy-server
12336 Copy the current server (@code{gnus-server-copy-server}).
12337
12338 @item l
12339 @kindex l (Server)
12340 @findex gnus-server-list-servers
12341 List all servers (@code{gnus-server-list-servers}).
12342
12343 @item s
12344 @kindex s (Server)
12345 @findex gnus-server-scan-server
12346 Request that the server scan its sources for new articles
12347 (@code{gnus-server-scan-server}). This is mainly sensible with mail
12348 servers.
12349
12350 @item g
12351 @kindex g (Server)
12352 @findex gnus-server-regenerate-server
12353 Request that the server regenerate all its data structures
12354 (@code{gnus-server-regenerate-server}). This can be useful if you have
12355 a mail back end that has gotten out of sync.
12356
12357 @end table
12358
12359
12360 @node Example Methods
12361 @subsection Example Methods
12362
12363 Most select methods are pretty simple and self-explanatory:
12364
12365 @lisp
12366 (nntp "news.funet.fi")
12367 @end lisp
12368
12369 Reading directly from the spool is even simpler:
12370
12371 @lisp
12372 (nnspool "")
12373 @end lisp
12374
12375 As you can see, the first element in a select method is the name of the
12376 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12377 will.
12378
12379 After these two elements, there may be an arbitrary number of
12380 @code{(@var{variable} @var{form})} pairs.
12381
12382 To go back to the first example---imagine that you want to read from
12383 port 15 on that machine. This is what the select method should
12384 look like then:
12385
12386 @lisp
12387 (nntp "news.funet.fi" (nntp-port-number 15))
12388 @end lisp
12389
12390 You should read the documentation to each back end to find out what
12391 variables are relevant, but here's an @code{nnmh} example:
12392
12393 @code{nnmh} is a mail back end that reads a spool-like structure. Say
12394 you have two structures that you wish to access: One is your private
12395 mail spool, and the other is a public one. Here's the possible spec for
12396 your private mail:
12397
12398 @lisp
12399 (nnmh "private" (nnmh-directory "~/private/mail/"))
12400 @end lisp
12401
12402 (This server is then called @samp{private}, but you may have guessed
12403 that.)
12404
12405 Here's the method for a public spool:
12406
12407 @lisp
12408 (nnmh "public"
12409 (nnmh-directory "/usr/information/spool/")
12410 (nnmh-get-new-mail nil))
12411 @end lisp
12412
12413 @cindex proxy
12414 @cindex firewall
12415
12416 If you are behind a firewall and only have access to the @acronym{NNTP}
12417 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12418 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12419 Doing this can be rather fiddly, but your virtual server definition
12420 should probably look something like this:
12421
12422 @lisp
12423 (nntp "firewall"
12424 (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12425 (nntp-via-address "the.firewall.machine")
12426 (nntp-address "the.real.nntp.host")
12427 (nntp-end-of-line "\n"))
12428 @end lisp
12429
12430 If you want to use the wonderful @code{ssh} program to provide a
12431 compressed connection over the modem line, you could add the following
12432 configuration to the example above:
12433
12434 @lisp
12435 (nntp-via-rlogin-command "ssh")
12436 @end lisp
12437
12438 See also @code{nntp-via-rlogin-command-switches}.
12439
12440 If you're behind a firewall, but have direct access to the outside world
12441 through a wrapper command like "runsocks", you could open a socksified
12442 telnet connection to the news server as follows:
12443
12444 @lisp
12445 (nntp "outside"
12446 (nntp-pre-command "runsocks")
12447 (nntp-open-connection-function nntp-open-via-telnet)
12448 (nntp-address "the.news.server")
12449 (nntp-end-of-line "\n"))
12450 @end lisp
12451
12452 This means that you have to have set up @code{ssh-agent} correctly to
12453 provide automatic authorization, of course. And to get a compressed
12454 connection, you have to have the @samp{Compression} option in the
12455 @code{ssh} @file{config} file.
12456
12457
12458 @node Creating a Virtual Server
12459 @subsection Creating a Virtual Server
12460
12461 If you're saving lots of articles in the cache by using persistent
12462 articles, you may want to create a virtual server to read the cache.
12463
12464 First you need to add a new server. The @kbd{a} command does that. It
12465 would probably be best to use @code{nnml} to read the cache. You
12466 could also use @code{nnspool} or @code{nnmh}, though.
12467
12468 Type @kbd{a nnml RET cache RET}.
12469
12470 You should now have a brand new @code{nnml} virtual server called
12471 @samp{cache}. You now need to edit it to have the right definitions.
12472 Type @kbd{e} to edit the server. You'll be entered into a buffer that
12473 will contain the following:
12474
12475 @lisp
12476 (nnml "cache")
12477 @end lisp
12478
12479 Change that to:
12480
12481 @lisp
12482 (nnml "cache"
12483 (nnml-directory "~/News/cache/")
12484 (nnml-active-file "~/News/cache/active"))
12485 @end lisp
12486
12487 Type @kbd{C-c C-c} to return to the server buffer. If you now press
12488 @kbd{RET} over this virtual server, you should be entered into a browse
12489 buffer, and you should be able to enter any of the groups displayed.
12490
12491
12492 @node Server Variables
12493 @subsection Server Variables
12494 @cindex server variables
12495 @cindex server parameters
12496
12497 One sticky point when defining variables (both on back ends and in Emacs
12498 in general) is that some variables are typically initialized from other
12499 variables when the definition of the variables is being loaded. If you
12500 change the ``base'' variable after the variables have been loaded, you
12501 won't change the ``derived'' variables.
12502
12503 This typically affects directory and file variables. For instance,
12504 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12505 directory variables are initialized from that variable, so
12506 @code{nnml-active-file} will be @file{~/Mail/active}. If you define a
12507 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12508 @code{nnml-directory}---you have to explicitly set all the file
12509 variables to be what you want them to be. For a complete list of
12510 variables for each back end, see each back end's section later in this
12511 manual, but here's an example @code{nnml} definition:
12512
12513 @lisp
12514 (nnml "public"
12515 (nnml-directory "~/my-mail/")
12516 (nnml-active-file "~/my-mail/active")
12517 (nnml-newsgroups-file "~/my-mail/newsgroups"))
12518 @end lisp
12519
12520 Server variables are often called @dfn{server parameters}.
12521
12522 @node Servers and Methods
12523 @subsection Servers and Methods
12524
12525 Wherever you would normally use a select method
12526 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12527 when browsing a foreign server) you can use a virtual server name
12528 instead. This could potentially save lots of typing. And it's nice all
12529 over.
12530
12531
12532 @node Unavailable Servers
12533 @subsection Unavailable Servers
12534
12535 If a server seems to be unreachable, Gnus will mark that server as
12536 @code{denied}. That means that any subsequent attempt to make contact
12537 with that server will just be ignored. ``It can't be opened,'' Gnus
12538 will tell you, without making the least effort to see whether that is
12539 actually the case or not.
12540
12541 That might seem quite naughty, but it does make sense most of the time.
12542 Let's say you have 10 groups subscribed to on server
12543 @samp{nephelococcygia.com}. This server is located somewhere quite far
12544 away from you and the machine is quite slow, so it takes 1 minute just
12545 to find out that it refuses connection to you today. If Gnus were to
12546 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12547 attempt to do that. Once it has gotten a single ``connection refused'',
12548 it will regard that server as ``down''.
12549
12550 So, what happens if the machine was only feeling unwell temporarily?
12551 How do you test to see whether the machine has come up again?
12552
12553 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12554 with the following commands:
12555
12556 @table @kbd
12557
12558 @item O
12559 @kindex O (Server)
12560 @findex gnus-server-open-server
12561 Try to establish connection to the server on the current line
12562 (@code{gnus-server-open-server}).
12563
12564 @item C
12565 @kindex C (Server)
12566 @findex gnus-server-close-server
12567 Close the connection (if any) to the server
12568 (@code{gnus-server-close-server}).
12569
12570 @item D
12571 @kindex D (Server)
12572 @findex gnus-server-deny-server
12573 Mark the current server as unreachable
12574 (@code{gnus-server-deny-server}).
12575
12576 @item M-o
12577 @kindex M-o (Server)
12578 @findex gnus-server-open-all-servers
12579 Open the connections to all servers in the buffer
12580 (@code{gnus-server-open-all-servers}).
12581
12582 @item M-c
12583 @kindex M-c (Server)
12584 @findex gnus-server-close-all-servers
12585 Close the connections to all servers in the buffer
12586 (@code{gnus-server-close-all-servers}).
12587
12588 @item R
12589 @kindex R (Server)
12590 @findex gnus-server-remove-denials
12591 Remove all marks to whether Gnus was denied connection from any servers
12592 (@code{gnus-server-remove-denials}).
12593
12594 @item L
12595 @kindex L (Server)
12596 @findex gnus-server-offline-server
12597 Set server status to offline (@code{gnus-server-offline-server}).
12598
12599 @end table
12600
12601
12602 @node Getting News
12603 @section Getting News
12604 @cindex reading news
12605 @cindex news back ends
12606
12607 A newsreader is normally used for reading news. Gnus currently provides
12608 only two methods of getting news---it can read from an @acronym{NNTP} server,
12609 or it can read from a local spool.
12610
12611 @menu
12612 * NNTP:: Reading news from an @acronym{NNTP} server.
12613 * News Spool:: Reading news from the local spool.
12614 @end menu
12615
12616
12617 @node NNTP
12618 @subsection NNTP
12619 @cindex nntp
12620
12621 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12622 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12623 server as the, uhm, address.
12624
12625 If the @acronym{NNTP} server is located at a non-standard port, setting the
12626 third element of the select method to this port number should allow you
12627 to connect to the right port. You'll have to edit the group info for
12628 that (@pxref{Foreign Groups}).
12629
12630 The name of the foreign group can be the same as a native group. In
12631 fact, you can subscribe to the same group from as many different servers
12632 you feel like. There will be no name collisions.
12633
12634 The following variables can be used to create a virtual @code{nntp}
12635 server:
12636
12637 @table @code
12638
12639 @item nntp-server-opened-hook
12640 @vindex nntp-server-opened-hook
12641 @cindex @sc{mode reader}
12642 @cindex authinfo
12643 @cindex authentification
12644 @cindex nntp authentification
12645 @findex nntp-send-authinfo
12646 @findex nntp-send-mode-reader
12647 is run after a connection has been made. It can be used to send
12648 commands to the @acronym{NNTP} server after it has been contacted. By
12649 default it sends the command @code{MODE READER} to the server with the
12650 @code{nntp-send-mode-reader} function. This function should always be
12651 present in this hook.
12652
12653 @item nntp-authinfo-function
12654 @vindex nntp-authinfo-function
12655 @findex nntp-send-authinfo
12656 @vindex nntp-authinfo-file
12657 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12658 server. The default function is @code{nntp-send-authinfo}, which looks
12659 through your @file{~/.authinfo} (or whatever you've set the
12660 @code{nntp-authinfo-file} variable to) for applicable entries. If none
12661 are found, it will prompt you for a login name and a password. The
12662 format of the @file{~/.authinfo} file is (almost) the same as the
12663 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12664 manual page, but here are the salient facts:
12665
12666 @enumerate
12667 @item
12668 The file contains one or more line, each of which define one server.
12669
12670 @item
12671 Each line may contain an arbitrary number of token/value pairs.
12672
12673 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12674 @samp{default}. In addition Gnus introduces two new tokens, not present
12675 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12676 @samp{force}. (This is the only way the @file{.authinfo} file format
12677 deviates from the @file{.netrc} file format.) @samp{port} is used to
12678 indicate what port on the server the credentials apply to and
12679 @samp{force} is explained below.
12680
12681 @end enumerate
12682
12683 Here's an example file:
12684
12685 @example
12686 machine news.uio.no login larsi password geheimnis
12687 machine nntp.ifi.uio.no login larsi force yes
12688 @end example
12689
12690 The token/value pairs may appear in any order; @samp{machine} doesn't
12691 have to be first, for instance.
12692
12693 In this example, both login name and password have been supplied for the
12694 former server, while the latter has only the login name listed, and the
12695 user will be prompted for the password. The latter also has the
12696 @samp{force} tag, which means that the authinfo will be sent to the
12697 @var{nntp} server upon connection; the default (i.e., when there is not
12698 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12699 until the @var{nntp} server asks for it.
12700
12701 You can also add @samp{default} lines that will apply to all servers
12702 that don't have matching @samp{machine} lines.
12703
12704 @example
12705 default force yes
12706 @end example
12707
12708 This will force sending @samp{AUTHINFO} commands to all servers not
12709 previously mentioned.
12710
12711 Remember to not leave the @file{~/.authinfo} file world-readable.
12712
12713 @item nntp-server-action-alist
12714 @vindex nntp-server-action-alist
12715 This is a list of regexps to match on server types and actions to be
12716 taken when matches are made. For instance, if you want Gnus to beep
12717 every time you connect to innd, you could say something like:
12718
12719 @lisp
12720 (setq nntp-server-action-alist
12721 '(("innd" (ding))))
12722 @end lisp
12723
12724 You probably don't want to do that, though.
12725
12726 The default value is
12727
12728 @lisp
12729 '(("nntpd 1\\.5\\.11t"
12730 (remove-hook 'nntp-server-opened-hook
12731 'nntp-send-mode-reader)))
12732 @end lisp
12733
12734 This ensures that Gnus doesn't send the @code{MODE READER} command to
12735 nntpd 1.5.11t, since that command chokes that server, I've been told.
12736
12737 @item nntp-maximum-request
12738 @vindex nntp-maximum-request
12739 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12740 will collect headers by sending a series of @code{head} commands. To
12741 speed things up, the back end sends lots of these commands without
12742 waiting for reply, and then reads all the replies. This is controlled
12743 by the @code{nntp-maximum-request} variable, and is 400 by default. If
12744 your network is buggy, you should set this to 1.
12745
12746 @item nntp-connection-timeout
12747 @vindex nntp-connection-timeout
12748 If you have lots of foreign @code{nntp} groups that you connect to
12749 regularly, you're sure to have problems with @acronym{NNTP} servers not
12750 responding properly, or being too loaded to reply within reasonable
12751 time. This is can lead to awkward problems, which can be helped
12752 somewhat by setting @code{nntp-connection-timeout}. This is an integer
12753 that says how many seconds the @code{nntp} back end should wait for a
12754 connection before giving up. If it is @code{nil}, which is the default,
12755 no timeouts are done.
12756
12757 @item nntp-nov-is-evil
12758 @vindex nntp-nov-is-evil
12759 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12760 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12761 can be used.
12762
12763 @item nntp-xover-commands
12764 @vindex nntp-xover-commands
12765 @cindex @acronym{NOV}
12766 @cindex XOVER
12767 List of strings used as commands to fetch @acronym{NOV} lines from a
12768 server. The default value of this variable is @code{("XOVER"
12769 "XOVERVIEW")}.
12770
12771 @item nntp-nov-gap
12772 @vindex nntp-nov-gap
12773 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12774 the server. The server responds with one huge list of lines. However,
12775 if you have read articles 2-5000 in the group, and only want to read
12776 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12777 lines that you will not need. This variable says how
12778 big a gap between two consecutive articles is allowed to be before the
12779 @code{XOVER} request is split into several request. Note that if your
12780 network is fast, setting this variable to a really small number means
12781 that fetching will probably be slower. If this variable is @code{nil},
12782 @code{nntp} will never split requests. The default is 5.
12783
12784 @item nntp-prepare-server-hook
12785 @vindex nntp-prepare-server-hook
12786 A hook run before attempting to connect to an @acronym{NNTP} server.
12787
12788 @item nntp-record-commands
12789 @vindex nntp-record-commands
12790 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12791 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12792 buffer. This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12793 that doesn't seem to work.
12794
12795 @item nntp-open-connection-function
12796 @vindex nntp-open-connection-function
12797 It is possible to customize how the connection to the nntp server will
12798 be opened. If you specify an @code{nntp-open-connection-function}
12799 parameter, Gnus will use that function to establish the connection.
12800 Six pre-made functions are supplied. These functions can be grouped in
12801 two categories: direct connection functions (four pre-made), and
12802 indirect ones (two pre-made).
12803
12804 @item nntp-prepare-post-hook
12805 @vindex nntp-prepare-post-hook
12806 A hook run just before posting an article. If there is no
12807 @code{Message-ID} header in the article and the news server provides the
12808 recommended ID, it will be added to the article before running this
12809 hook. It is useful to make @code{Cancel-Lock} headers even if you
12810 inhibit Gnus to add a @code{Message-ID} header, you could say:
12811
12812 @lisp
12813 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12814 @end lisp
12815
12816 Note that not all servers support the recommended ID. This works for
12817 INN versions 2.3.0 and later, for instance.
12818
12819 @end table
12820
12821 @menu
12822 * Direct Functions:: Connecting directly to the server.
12823 * Indirect Functions:: Connecting indirectly to the server.
12824 * Common Variables:: Understood by several connection functions.
12825 @end menu
12826
12827
12828 @node Direct Functions
12829 @subsubsection Direct Functions
12830 @cindex direct connection functions
12831
12832 These functions are called direct because they open a direct connection
12833 between your machine and the @acronym{NNTP} server. The behavior of these
12834 functions is also affected by commonly understood variables
12835 (@pxref{Common Variables}).
12836
12837 @table @code
12838 @findex nntp-open-network-stream
12839 @item nntp-open-network-stream
12840 This is the default, and simply connects to some port or other on the
12841 remote system.
12842
12843 @findex nntp-open-tls-stream
12844 @item nntp-open-tls-stream
12845 Opens a connection to a server over a @dfn{secure} channel. To use
12846 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12847 installed. You then define a server as follows:
12848
12849 @lisp
12850 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12851 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12852 ;;
12853 (nntp "snews.bar.com"
12854 (nntp-open-connection-function nntp-open-tls-stream)
12855 (nntp-port-number )
12856 (nntp-address "snews.bar.com"))
12857 @end lisp
12858
12859 @findex nntp-open-ssl-stream
12860 @item nntp-open-ssl-stream
12861 Opens a connection to a server over a @dfn{secure} channel. To use
12862 this you must have @uref{http://www.openssl.org, OpenSSL} or
12863 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed. You
12864 then define a server as follows:
12865
12866 @lisp
12867 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12868 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12869 ;;
12870 (nntp "snews.bar.com"
12871 (nntp-open-connection-function nntp-open-ssl-stream)
12872 (nntp-port-number 563)
12873 (nntp-address "snews.bar.com"))
12874 @end lisp
12875
12876 @findex nntp-open-telnet-stream
12877 @item nntp-open-telnet-stream
12878 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12879 it. You might wonder why this function exists, since we have the
12880 default @code{nntp-open-network-stream} which would do the job. (One
12881 of) the reason(s) is that if you are behind a firewall but have direct
12882 connections to the outside world thanks to a command wrapper like
12883 @code{runsocks}, you can use it like this:
12884
12885 @lisp
12886 (nntp "socksified"
12887 (nntp-pre-command "runsocks")
12888 (nntp-open-connection-function nntp-open-telnet-stream)
12889 (nntp-address "the.news.server"))
12890 @end lisp
12891
12892 With the default method, you would need to wrap your whole Emacs
12893 session, which is not a good idea.
12894 @end table
12895
12896
12897 @node Indirect Functions
12898 @subsubsection Indirect Functions
12899 @cindex indirect connection functions
12900
12901 These functions are called indirect because they connect to an
12902 intermediate host before actually connecting to the @acronym{NNTP} server.
12903 All of these functions and related variables are also said to belong to
12904 the ``via'' family of connection: they're all prefixed with ``via'' to make
12905 things cleaner. The behavior of these functions is also affected by
12906 commonly understood variables (@pxref{Common Variables}).
12907
12908 @table @code
12909 @item nntp-open-via-rlogin-and-telnet
12910 @findex nntp-open-via-rlogin-and-telnet
12911 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12912 to the real @acronym{NNTP} server from there. This is useful for instance if
12913 you need to connect to a firewall machine first.
12914
12915 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12916
12917 @table @code
12918 @item nntp-via-rlogin-command
12919 @vindex nntp-via-rlogin-command
12920 Command used to log in on the intermediate host. The default is
12921 @samp{rsh}, but @samp{ssh} is a popular alternative.
12922
12923 @item nntp-via-rlogin-command-switches
12924 @vindex nntp-via-rlogin-command-switches
12925 List of strings to be used as the switches to
12926 @code{nntp-via-rlogin-command}. The default is @code{nil}. If you use
12927 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12928 @samp{("-C")} in order to compress all data connections, otherwise set
12929 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12930 the telnet command requires a pseudo-tty allocation on an intermediate
12931 host.
12932 @end table
12933
12934 @item nntp-open-via-telnet-and-telnet
12935 @findex nntp-open-via-telnet-and-telnet
12936 Does essentially the same, but uses @samp{telnet} instead of
12937 @samp{rlogin} to connect to the intermediate host.
12938
12939 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12940
12941 @table @code
12942 @item nntp-via-telnet-command
12943 @vindex nntp-via-telnet-command
12944 Command used to @code{telnet} the intermediate host. The default is
12945 @samp{telnet}.
12946
12947 @item nntp-via-telnet-switches
12948 @vindex nntp-via-telnet-switches
12949 List of strings to be used as the switches to the
12950 @code{nntp-via-telnet-command} command. The default is @samp{("-8")}.
12951
12952 @item nntp-via-user-password
12953 @vindex nntp-via-user-password
12954 Password to use when logging in on the intermediate host.
12955
12956 @item nntp-via-envuser
12957 @vindex nntp-via-envuser
12958 If non-@code{nil}, the intermediate @code{telnet} session (client and
12959 server both) will support the @code{ENVIRON} option and not prompt for
12960 login name. This works for Solaris @code{telnet}, for instance.
12961
12962 @item nntp-via-shell-prompt
12963 @vindex nntp-via-shell-prompt
12964 Regexp matching the shell prompt on the intermediate host. The default
12965 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12966
12967 @end table
12968
12969 @end table
12970
12971
12972 Here are some additional variables that are understood by all the above
12973 functions:
12974
12975 @table @code
12976
12977 @item nntp-via-user-name
12978 @vindex nntp-via-user-name
12979 User name to use when connecting to the intermediate host.
12980
12981 @item nntp-via-address
12982 @vindex nntp-via-address
12983 Address of the intermediate host to connect to.
12984
12985 @end table
12986
12987
12988 @node Common Variables
12989 @subsubsection Common Variables
12990
12991 The following variables affect the behavior of all, or several of the
12992 pre-made connection functions. When not specified, all functions are
12993 affected (the values of the following variables will be used as the
12994 default if each virtual @code{nntp} server doesn't specify those server
12995 variables individually).
12996
12997 @table @code
12998
12999 @item nntp-pre-command
13000 @vindex nntp-pre-command
13001 A command wrapper to use when connecting through a non native
13002 connection function (all except @code{nntp-open-network-stream},
13003 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}). This is
13004 where you would put a @samp{SOCKS} wrapper for instance.
13005
13006 @item nntp-address
13007 @vindex nntp-address
13008 The address of the @acronym{NNTP} server.
13009
13010 @item nntp-port-number
13011 @vindex nntp-port-number
13012 Port number to connect to the @acronym{NNTP} server. The default is
13013 @samp{nntp}. If you use @acronym{NNTP} over
13014 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
13015 than named ports (i.e, use @samp{563} instead of @samp{snews} or
13016 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
13017 not work with named ports.
13018
13019 @item nntp-end-of-line
13020 @vindex nntp-end-of-line
13021 String to use as end-of-line marker when talking to the @acronym{NNTP}
13022 server. This is @samp{\r\n} by default, but should be @samp{\n} when
13023 using a non native connection function.
13024
13025 @item nntp-telnet-command
13026 @vindex nntp-telnet-command
13027 Command to use when connecting to the @acronym{NNTP} server through
13028 @samp{telnet}. This is @emph{not} for an intermediate host. This is
13029 just for the real @acronym{NNTP} server. The default is
13030 @samp{telnet}.
13031
13032 @item nntp-telnet-switches
13033 @vindex nntp-telnet-switches
13034 A list of switches to pass to @code{nntp-telnet-command}. The default
13035 is @samp{("-8")}.
13036
13037 @end table
13038
13039
13040 @node News Spool
13041 @subsection News Spool
13042 @cindex nnspool
13043 @cindex news spool
13044
13045 Subscribing to a foreign group from the local spool is extremely easy,
13046 and might be useful, for instance, to speed up reading groups that
13047 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
13048 instance.
13049
13050 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
13051 anything else) as the address.
13052
13053 If you have access to a local spool, you should probably use that as the
13054 native select method (@pxref{Finding the News}). It is normally faster
13055 than using an @code{nntp} select method, but might not be. It depends.
13056 You just have to try to find out what's best at your site.
13057
13058 @table @code
13059
13060 @item nnspool-inews-program
13061 @vindex nnspool-inews-program
13062 Program used to post an article.
13063
13064 @item nnspool-inews-switches
13065 @vindex nnspool-inews-switches
13066 Parameters given to the inews program when posting an article.
13067
13068 @item nnspool-spool-directory
13069 @vindex nnspool-spool-directory
13070 Where @code{nnspool} looks for the articles. This is normally
13071 @file{/usr/spool/news/}.
13072
13073 @item nnspool-nov-directory
13074 @vindex nnspool-nov-directory
13075 Where @code{nnspool} will look for @acronym{NOV} files. This is normally@*
13076 @file{/usr/spool/news/over.view/}.
13077
13078 @item nnspool-lib-dir
13079 @vindex nnspool-lib-dir
13080 Where the news lib dir is (@file{/usr/lib/news/} by default).
13081
13082 @item nnspool-active-file
13083 @vindex nnspool-active-file
13084 The name of the active file.
13085
13086 @item nnspool-newsgroups-file
13087 @vindex nnspool-newsgroups-file
13088 The name of the group descriptions file.
13089
13090 @item nnspool-history-file
13091 @vindex nnspool-history-file
13092 The name of the news history file.
13093
13094 @item nnspool-active-times-file
13095 @vindex nnspool-active-times-file
13096 The name of the active date file.
13097
13098 @item nnspool-nov-is-evil
13099 @vindex nnspool-nov-is-evil
13100 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
13101 that it finds.
13102
13103 @item nnspool-sift-nov-with-sed
13104 @vindex nnspool-sift-nov-with-sed
13105 @cindex sed
13106 If non-@code{nil}, which is the default, use @code{sed} to get the
13107 relevant portion from the overview file. If @code{nil},
13108 @code{nnspool} will load the entire file into a buffer and process it
13109 there.
13110
13111 @end table
13112
13113
13114 @node Getting Mail
13115 @section Getting Mail
13116 @cindex reading mail
13117 @cindex mail
13118
13119 Reading mail with a newsreader---isn't that just plain WeIrD? But of
13120 course.
13121
13122 @menu
13123 * Mail in a Newsreader:: Important introductory notes.
13124 * Getting Started Reading Mail:: A simple cookbook example.
13125 * Splitting Mail:: How to create mail groups.
13126 * Mail Sources:: How to tell Gnus where to get mail from.
13127 * Mail Back End Variables:: Variables for customizing mail handling.
13128 * Fancy Mail Splitting:: Gnus can do hairy splitting of incoming mail.
13129 * Group Mail Splitting:: Use group customize to drive mail splitting.
13130 * Incorporating Old Mail:: What about the old mail you have?
13131 * Expiring Mail:: Getting rid of unwanted mail.
13132 * Washing Mail:: Removing cruft from the mail you get.
13133 * Duplicates:: Dealing with duplicated mail.
13134 * Not Reading Mail:: Using mail back ends for reading other files.
13135 * Choosing a Mail Back End:: Gnus can read a variety of mail formats.
13136 @end menu
13137
13138
13139 @node Mail in a Newsreader
13140 @subsection Mail in a Newsreader
13141
13142 If you are used to traditional mail readers, but have decided to switch
13143 to reading mail with Gnus, you may find yourself experiencing something
13144 of a culture shock.
13145
13146 Gnus does not behave like traditional mail readers. If you want to make
13147 it behave that way, you can, but it's an uphill battle.
13148
13149 Gnus, by default, handles all its groups using the same approach. This
13150 approach is very newsreaderly---you enter a group, see the new/unread
13151 messages, and when you read the messages, they get marked as read, and
13152 you don't see them any more. (Unless you explicitly ask for them.)
13153
13154 In particular, you do not do anything explicitly to delete messages.
13155
13156 Does this mean that all the messages that have been marked as read are
13157 deleted? How awful!
13158
13159 But, no, it means that old messages are @dfn{expired} according to some
13160 scheme or other. For news messages, the expire process is controlled by
13161 the news administrator; for mail, the expire process is controlled by
13162 you. The expire process for mail is covered in depth in @ref{Expiring
13163 Mail}.
13164
13165 What many Gnus users find, after using it a while for both news and
13166 mail, is that the transport mechanism has very little to do with how
13167 they want to treat a message.
13168
13169 Many people subscribe to several mailing lists. These are transported
13170 via @acronym{SMTP}, and are therefore mail. But we might go for weeks without
13171 answering, or even reading these messages very carefully. We may not
13172 need to save them because if we should need to read one again, they are
13173 archived somewhere else.
13174
13175 Some people have local news groups which have only a handful of readers.
13176 These are transported via @acronym{NNTP}, and are therefore news. But we may need
13177 to read and answer a large fraction of the messages very carefully in
13178 order to do our work. And there may not be an archive, so we may need
13179 to save the interesting messages the same way we would personal mail.
13180
13181 The important distinction turns out to be not the transport mechanism,
13182 but other factors such as how interested we are in the subject matter,
13183 or how easy it is to retrieve the message if we need to read it again.
13184
13185 Gnus provides many options for sorting mail into ``groups'' which behave
13186 like newsgroups, and for treating each group (whether mail or news)
13187 differently.
13188
13189 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13190 that Gnus should grow up and be a male, er, mail reader. It is possible
13191 to whip Gnus into a more mailreaderly being, but, as said before, it's
13192 not easy. People who prefer proper mail readers should try @sc{vm}
13193 instead, which is an excellent, and proper, mail reader.
13194
13195 I don't mean to scare anybody off, but I want to make it clear that you
13196 may be required to learn a new way of thinking about messages. After
13197 you've been subjected to The Gnus Way, you will come to love it. I can
13198 guarantee it. (At least the guy who sold me the Emacs Subliminal
13199 Brain-Washing Functions that I've put into Gnus did guarantee it. You
13200 Will Be Assimilated. You Love Gnus. You Love The Gnus Mail Way.
13201 You Do.)
13202
13203
13204 @node Getting Started Reading Mail
13205 @subsection Getting Started Reading Mail
13206
13207 It's quite easy to use Gnus to read your new mail. You just plonk the
13208 mail back end of your choice into @code{gnus-secondary-select-methods},
13209 and things will happen automatically.
13210
13211 For instance, if you want to use @code{nnml} (which is a ``one file per
13212 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13213
13214 @lisp
13215 (setq gnus-secondary-select-methods '((nnml "")))
13216 @end lisp
13217
13218 Now, the next time you start Gnus, this back end will be queried for new
13219 articles, and it will move all the messages in your spool file to its
13220 directory, which is @file{~/Mail/} by default. The new group that will
13221 be created (@samp{mail.misc}) will be subscribed, and you can read it
13222 like any other group.
13223
13224 You will probably want to split the mail into several groups, though:
13225
13226 @lisp
13227 (setq nnmail-split-methods
13228 '(("junk" "^From:.*Lars Ingebrigtsen")
13229 ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13230 ("other" "")))
13231 @end lisp
13232
13233 This will result in three new @code{nnml} mail groups being created:
13234 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}. All the
13235 mail that doesn't fit into the first two groups will be placed in the
13236 last group.
13237
13238 This should be sufficient for reading mail with Gnus. You might want to
13239 give the other sections in this part of the manual a perusal, though.
13240 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13241
13242
13243 @node Splitting Mail
13244 @subsection Splitting Mail
13245 @cindex splitting mail
13246 @cindex mail splitting
13247 @cindex mail filtering (splitting)
13248
13249 @vindex nnmail-split-methods
13250 The @code{nnmail-split-methods} variable says how the incoming mail is
13251 to be split into groups.
13252
13253 @lisp
13254 (setq nnmail-split-methods
13255 '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13256 ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13257 ("mail.other" "")))
13258 @end lisp
13259
13260 This variable is a list of lists, where the first element of each of
13261 these lists is the name of the mail group (they do not have to be called
13262 something beginning with @samp{mail}, by the way), and the second
13263 element is a regular expression used on the header of each mail to
13264 determine if it belongs in this mail group. The first string may
13265 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13266 insert sub-expressions from the matched text. For instance:
13267
13268 @lisp
13269 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13270 @end lisp
13271
13272 @noindent
13273 In that case, @code{nnmail-split-lowercase-expanded} controls whether
13274 the inserted text should be made lowercase. @xref{Fancy Mail Splitting}.
13275
13276 The second element can also be a function. In that case, it will be
13277 called narrowed to the headers with the first element of the rule as the
13278 argument. It should return a non-@code{nil} value if it thinks that the
13279 mail belongs in that group.
13280
13281 @cindex @samp{bogus} group
13282 The last of these groups should always be a general one, and the regular
13283 expression should @emph{always} be @samp{""} so that it matches any mails
13284 that haven't been matched by any of the other regexps. (These rules are
13285 processed from the beginning of the alist toward the end. The first rule
13286 to make a match will ``win'', unless you have crossposting enabled. In
13287 that case, all matching rules will ``win''.) If no rule matched, the mail
13288 will end up in the @samp{bogus} group. When new groups are created by
13289 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
13290 see the new groups. This also applies to the @samp{bogus} group.
13291
13292 If you like to tinker with this yourself, you can set this variable to a
13293 function of your choice. This function will be called without any
13294 arguments in a buffer narrowed to the headers of an incoming mail
13295 message. The function should return a list of group names that it
13296 thinks should carry this mail message.
13297
13298 Note that the mail back ends are free to maul the poor, innocent,
13299 incoming headers all they want to. They all add @code{Lines} headers;
13300 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13301 @code{From<SPACE>} line to something else.
13302
13303 @vindex nnmail-crosspost
13304 The mail back ends all support cross-posting. If several regexps match,
13305 the mail will be ``cross-posted'' to all those groups.
13306 @code{nnmail-crosspost} says whether to use this mechanism or not. Note
13307 that no articles are crossposted to the general (@samp{""}) group.
13308
13309 @vindex nnmail-crosspost-link-function
13310 @cindex crosspost
13311 @cindex links
13312 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13313 the crossposted articles. However, not all file systems support hard
13314 links. If that's the case for you, set
13315 @code{nnmail-crosspost-link-function} to @code{copy-file}. (This
13316 variable is @code{add-name-to-file} by default.)
13317
13318 @kindex M-x nnmail-split-history
13319 @findex nnmail-split-history
13320 If you wish to see where the previous mail split put the messages, you
13321 can use the @kbd{M-x nnmail-split-history} command. If you wish to see
13322 where re-spooling messages would put the messages, you can use
13323 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13324 Group Commands}).
13325
13326 @vindex nnmail-split-header-length-limit
13327 Header lines longer than the value of
13328 @code{nnmail-split-header-length-limit} are excluded from the split
13329 function.
13330
13331 @vindex nnmail-mail-splitting-charset
13332 @vindex nnmail-mail-splitting-decodes
13333 By default the splitting codes @acronym{MIME} decodes headers so you
13334 can match on non-@acronym{ASCII} strings. The
13335 @code{nnmail-mail-splitting-charset} variable specifies the default
13336 charset for decoding. The behavior can be turned off completely by
13337 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13338 useful if you want to match articles based on the raw header data.
13339
13340 @vindex nnmail-resplit-incoming
13341 By default, splitting is performed on all incoming messages. If you
13342 specify a @code{directory} entry for the variable @code{mail-sources}
13343 (@pxref{Mail Source Specifiers}), however, then splitting does
13344 @emph{not} happen by default. You can set the variable
13345 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13346 splitting happen even in this case. (This variable has no effect on
13347 other kinds of entries.)
13348
13349 Gnus gives you all the opportunity you could possibly want for shooting
13350 yourself in the foot. Let's say you create a group that will contain
13351 all the mail you get from your boss. And then you accidentally
13352 unsubscribe from the group. Gnus will still put all the mail from your
13353 boss in the unsubscribed group, and so, when your boss mails you ``Have
13354 that report ready by Monday or you're fired!'', you'll never see it and,
13355 come Tuesday, you'll still believe that you're gainfully employed while
13356 you really should be out collecting empty bottles to save up for next
13357 month's rent money.
13358
13359
13360 @node Mail Sources
13361 @subsection Mail Sources
13362
13363 Mail can be gotten from many different sources---the mail spool, from
13364 a @acronym{POP} mail server, from a procmail directory, or from a
13365 maildir, for instance.
13366
13367 @menu
13368 * Mail Source Specifiers:: How to specify what a mail source is.
13369 * Mail Source Customization:: Some variables that influence things.
13370 * Fetching Mail:: Using the mail source specifiers.
13371 @end menu
13372
13373
13374 @node Mail Source Specifiers
13375 @subsubsection Mail Source Specifiers
13376 @cindex POP
13377 @cindex mail server
13378 @cindex procmail
13379 @cindex mail spool
13380 @cindex mail source
13381
13382 You tell Gnus how to fetch mail by setting @code{mail-sources}
13383 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13384
13385 Here's an example:
13386
13387 @lisp
13388 (pop :server "pop3.mailserver.com" :user "myname")
13389 @end lisp
13390
13391 As can be observed, a mail source specifier is a list where the first
13392 element is a @dfn{mail source type}, followed by an arbitrary number of
13393 @dfn{keywords}. Keywords that are not explicitly specified are given
13394 default values.
13395
13396 The following mail source types are available:
13397
13398 @table @code
13399 @item file
13400 Get mail from a single file; typically from the mail spool.
13401
13402 Keywords:
13403
13404 @table @code
13405 @item :path
13406 The file name. Defaults to the value of the @env{MAIL}
13407 environment variable or the value of @code{rmail-spool-directory}
13408 (usually something like @file{/usr/mail/spool/user-name}).
13409
13410 @item :prescript
13411 @itemx :postscript
13412 Script run before/after fetching mail.
13413 @end table
13414
13415 An example file mail source:
13416
13417 @lisp
13418 (file :path "/usr/spool/mail/user-name")
13419 @end lisp
13420
13421 Or using the default file name:
13422
13423 @lisp
13424 (file)
13425 @end lisp
13426
13427 If the mail spool file is not located on the local machine, it's best
13428 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13429 You can not use ange-ftp file names here---it has no way to lock the
13430 mail spool while moving the mail.
13431
13432 If it's impossible to set up a proper server, you can use ssh instead.
13433
13434 @lisp
13435 (setq mail-sources
13436 '((file :prescript "ssh host bin/getmail >%t")))
13437 @end lisp
13438
13439 The @samp{getmail} script would look something like the following:
13440
13441 @example
13442 #!/bin/sh
13443 # getmail - move mail from spool to stdout
13444 # flu@@iki.fi
13445
13446 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13447 TMP=$HOME/Mail/tmp
13448 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13449 @end example
13450
13451 Alter this script to fit find the @samp{movemail} you want to use.
13452
13453
13454 @item directory
13455 @vindex nnmail-scan-directory-mail-source-once
13456 Get mail from several files in a directory. This is typically used
13457 when you have procmail split the incoming mail into several files.
13458 That is, there is a one-to-one correspondence between files in that
13459 directory and groups, so that mail from the file @file{foo.bar.spool}
13460 will be put in the group @code{foo.bar}. (You can change the suffix
13461 to be used instead of @code{.spool}.) Setting
13462 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13463 Gnus to scan the mail source only once. This is particularly useful
13464 if you want to scan mail groups at a specified level.
13465
13466 @vindex nnmail-resplit-incoming
13467 There is also the variable @code{nnmail-resplit-incoming}, if you set
13468 that to a non-@code{nil} value, then the normal splitting process is
13469 applied to all the files from the directory, @ref{Splitting Mail}.
13470
13471 Keywords:
13472
13473 @table @code
13474 @item :path
13475 The name of the directory where the files are. There is no default
13476 value.
13477
13478 @item :suffix
13479 Only files ending with this suffix are used. The default is
13480 @samp{.spool}.
13481
13482 @item :predicate
13483 Only files that have this predicate return non-@code{nil} are returned.
13484 The default is @code{identity}. This is used as an additional
13485 filter---only files that have the right suffix @emph{and} satisfy this
13486 predicate are considered.
13487
13488 @item :prescript
13489 @itemx :postscript
13490 Script run before/after fetching mail.
13491
13492 @end table
13493
13494 An example directory mail source:
13495
13496 @lisp
13497 (directory :path "/home/user-name/procmail-dir/"
13498 :suffix ".prcml")
13499 @end lisp
13500
13501 @item pop
13502 Get mail from a @acronym{POP} server.
13503
13504 Keywords:
13505
13506 @table @code
13507 @item :server
13508 The name of the @acronym{POP} server. The default is taken from the
13509 @env{MAILHOST} environment variable.
13510
13511 @item :port
13512 The port number of the @acronym{POP} server. This can be a number (eg,
13513 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}). If it is a
13514 string, it should be a service name as listed in @file{/etc/services} on
13515 Unix systems. The default is @samp{"pop3"}. On some systems you might
13516 need to specify it as @samp{"pop-3"} instead.
13517
13518 @item :user
13519 The user name to give to the @acronym{POP} server. The default is the login
13520 name.
13521
13522 @item :password
13523 The password to give to the @acronym{POP} server. If not specified,
13524 the user is prompted.
13525
13526 @item :program
13527 The program to use to fetch mail from the @acronym{POP} server. This
13528 should be a @code{format}-like string. Here's an example:
13529
13530 @example
13531 fetchmail %u@@%s -P %p %t
13532 @end example
13533
13534 The valid format specifier characters are:
13535
13536 @table @samp
13537 @item t
13538 The name of the file the mail is to be moved to. This must always be
13539 included in this string.
13540
13541 @item s
13542 The name of the server.
13543
13544 @item P
13545 The port number of the server.
13546
13547 @item u
13548 The user name to use.
13549
13550 @item p
13551 The password to use.
13552 @end table
13553
13554 The values used for these specs are taken from the values you give the
13555 corresponding keywords.
13556
13557 @item :prescript
13558 A script to be run before fetching the mail. The syntax is the same as
13559 the @code{:program} keyword. This can also be a function to be run.
13560
13561 @item :postscript
13562 A script to be run after fetching the mail. The syntax is the same as
13563 the @code{:program} keyword. This can also be a function to be run.
13564
13565 @item :function
13566 The function to use to fetch mail from the @acronym{POP} server. The
13567 function is called with one parameter---the name of the file where the
13568 mail should be moved to.
13569
13570 @item :authentication
13571 This can be either the symbol @code{password} or the symbol @code{apop}
13572 and says what authentication scheme to use. The default is
13573 @code{password}.
13574
13575 @end table
13576
13577 @vindex pop3-movemail
13578 @vindex pop3-leave-mail-on-server
13579 If the @code{:program} and @code{:function} keywords aren't specified,
13580 @code{pop3-movemail} will be used. If the
13581 @code{pop3-leave-mail-on-server} is non-@code{nil} the mail is to be
13582 left on the @acronym{POP} server after fetching when using
13583 @code{pop3-movemail}. Note that POP servers maintain no state
13584 information between sessions, so what the client believes is there and
13585 what is actually there may not match up. If they do not, then the whole
13586 thing can fall apart and leave you with a corrupt mailbox.
13587
13588 Here are some examples. Fetch from the default @acronym{POP} server,
13589 using the default user name, and default fetcher:
13590
13591 @lisp
13592 (pop)
13593 @end lisp
13594
13595 Fetch from a named server with a named user and password:
13596
13597 @lisp
13598 (pop :server "my.pop.server"
13599 :user "user-name" :password "secret")
13600 @end lisp
13601
13602 Use @samp{movemail} to move the mail:
13603
13604 @lisp
13605 (pop :program "movemail po:%u %t %p")
13606 @end lisp
13607
13608 @item maildir
13609 Get mail from a maildir. This is a type of mailbox that is supported by
13610 at least qmail and postfix, where each file in a special directory
13611 contains exactly one mail.
13612
13613 Keywords:
13614
13615 @table @code
13616 @item :path
13617 The name of the directory where the mails are stored. The default is
13618 taken from the @env{MAILDIR} environment variable or
13619 @file{~/Maildir/}.
13620 @item :subdirs
13621 The subdirectories of the Maildir. The default is
13622 @samp{("new" "cur")}.
13623
13624 @c If you sometimes look at your mail through a pop3 daemon before fetching
13625 @c them with Gnus, you may also have to fetch your mails from the
13626 @c @code{cur} directory inside the maildir, like in the first example
13627 @c below.
13628
13629 You can also get mails from remote hosts (because maildirs don't suffer
13630 from locking problems).
13631
13632 @end table
13633
13634 Two example maildir mail sources:
13635
13636 @lisp
13637 (maildir :path "/home/user-name/Maildir/"
13638 :subdirs ("cur" "new"))
13639 @end lisp
13640
13641 @lisp
13642 (maildir :path "/user@@remotehost.org:~/Maildir/"
13643 :subdirs ("new"))
13644 @end lisp
13645
13646 @item imap
13647 Get mail from a @acronym{IMAP} server. If you don't want to use
13648 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13649 with nnimap), for some reason or other, Gnus let you treat it similar
13650 to a @acronym{POP} server and fetches articles from a given
13651 @acronym{IMAP} mailbox. @xref{IMAP}, for more information.
13652
13653 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13654 may need external programs and libraries, @xref{IMAP}.
13655
13656 Keywords:
13657
13658 @table @code
13659 @item :server
13660 The name of the @acronym{IMAP} server. The default is taken from the
13661 @env{MAILHOST} environment variable.
13662
13663 @item :port
13664 The port number of the @acronym{IMAP} server. The default is @samp{143}, or
13665 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13666
13667 @item :user
13668 The user name to give to the @acronym{IMAP} server. The default is the login
13669 name.
13670
13671 @item :password
13672 The password to give to the @acronym{IMAP} server. If not specified, the user is
13673 prompted.
13674
13675 @item :stream
13676 What stream to use for connecting to the server, this is one of the
13677 symbols in @code{imap-stream-alist}. Right now, this means
13678 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13679 @samp{ssl}, @samp{shell} or the default @samp{network}.
13680
13681 @item :authentication
13682 Which authenticator to use for authenticating to the server, this is
13683 one of the symbols in @code{imap-authenticator-alist}. Right now,
13684 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13685 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13686
13687 @item :program
13688 When using the `shell' :stream, the contents of this variable is
13689 mapped into the @code{imap-shell-program} variable. This should be a
13690 @code{format}-like string (or list of strings). Here's an example:
13691
13692 @example
13693 ssh %s imapd
13694 @end example
13695
13696 The valid format specifier characters are:
13697
13698 @table @samp
13699 @item s
13700 The name of the server.
13701
13702 @item l
13703 User name from @code{imap-default-user}.
13704
13705 @item p
13706 The port number of the server.
13707 @end table
13708
13709 The values used for these specs are taken from the values you give the
13710 corresponding keywords.
13711
13712 @item :mailbox
13713 The name of the mailbox to get mail from. The default is @samp{INBOX}
13714 which normally is the mailbox which receive incoming mail.
13715
13716 @item :predicate
13717 The predicate used to find articles to fetch. The default, @samp{UNSEEN
13718 UNDELETED}, is probably the best choice for most people, but if you
13719 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13720 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13721 Then all articles in the mailbox is fetched, no matter what. For a
13722 complete list of predicates, see RFC 2060 section 6.4.4.
13723
13724 @item :fetchflag
13725 How to flag fetched articles on the server, the default @samp{\Deleted}
13726 will mark them as deleted, an alternative would be @samp{\Seen} which
13727 would simply mark them as read. These are the two most likely choices,
13728 but more flags are defined in RFC 2060 section 2.3.2.
13729
13730 @item :dontexpunge
13731 If non-@code{nil}, don't remove all articles marked as deleted in the
13732 mailbox after finishing the fetch.
13733
13734 @end table
13735
13736 An example @acronym{IMAP} mail source:
13737
13738 @lisp
13739 (imap :server "mail.mycorp.com"
13740 :stream kerberos4
13741 :fetchflag "\\Seen")
13742 @end lisp
13743
13744 @item webmail
13745 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
13746 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
13747 @uref{http://mail.yahoo.com/}.
13748
13749 NOTE: Webmail largely depends on cookies. A "one-line-cookie" patch is
13750 required for url "4.0pre.46".
13751
13752 WARNING: Mails may be lost. NO WARRANTY.
13753
13754 Keywords:
13755
13756 @table @code
13757 @item :subtype
13758 The type of the webmail server. The default is @code{hotmail}. The
13759 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13760
13761 @item :user
13762 The user name to give to the webmail server. The default is the login
13763 name.
13764
13765 @item :password
13766 The password to give to the webmail server. If not specified, the user is
13767 prompted.
13768
13769 @item :dontexpunge
13770 If non-@code{nil}, only fetch unread articles and don't move them to
13771 trash folder after finishing the fetch.
13772
13773 @end table
13774
13775 An example webmail source:
13776
13777 @lisp
13778 (webmail :subtype 'hotmail
13779 :user "user-name"
13780 :password "secret")
13781 @end lisp
13782 @end table
13783
13784 @table @dfn
13785 @item Common Keywords
13786 Common keywords can be used in any type of mail source.
13787
13788 Keywords:
13789
13790 @table @code
13791 @item :plugged
13792 If non-@code{nil}, fetch the mail even when Gnus is unplugged. If you
13793 use directory source to get mail, you can specify it as in this
13794 example:
13795
13796 @lisp
13797 (setq mail-sources
13798 '((directory :path "/home/pavel/.Spool/"
13799 :suffix ""
13800 :plugged t)))
13801 @end lisp
13802
13803 Gnus will then fetch your mail even when you are unplugged. This is
13804 useful when you use local mail and news.
13805
13806 @end table
13807 @end table
13808
13809 @subsubsection Function Interface
13810
13811 Some of the above keywords specify a Lisp function to be executed.
13812 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13813 the value of the keyword while the function is executing. For example,
13814 consider the following mail-source setting:
13815
13816 @lisp
13817 (setq mail-sources '((pop :user "jrl"
13818 :server "pophost" :function fetchfunc)))
13819 @end lisp
13820
13821 While the function @code{fetchfunc} is executing, the symbol @code{user}
13822 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13823 @code{"pophost"}. The symbols @code{port}, @code{password},
13824 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13825 and @code{authentication} are also bound (to their default values).
13826
13827 See above for a list of keywords for each type of mail source.
13828
13829
13830 @node Mail Source Customization
13831 @subsubsection Mail Source Customization
13832
13833 The following is a list of variables that influence how the mail is
13834 fetched. You would normally not need to set or change any of these
13835 variables.
13836
13837 @table @code
13838 @item mail-source-crash-box
13839 @vindex mail-source-crash-box
13840 File where mail will be stored while processing it. The default is@*
13841 @file{~/.emacs-mail-crash-box}.
13842
13843 @item mail-source-delete-incoming
13844 @vindex mail-source-delete-incoming
13845 If non-@code{nil}, delete incoming files after handling them. If
13846 @code{t}, delete the files immediately, if @code{nil}, never delete any
13847 files. If a positive number, delete files older than number of days
13848 (This will only happen, when receiving new mail). You may also set
13849 @code{mail-source-delete-incoming} to @code{nil} and call
13850 @code{mail-source-delete-old-incoming} from a hook or interactively.
13851
13852 @item mail-source-delete-old-incoming-confirm
13853 @vindex mail-source-delete-old-incoming-confirm
13854 If non-@code{nil}, ask for for confirmation before deleting old incoming
13855 files. This variable only applies when
13856 @code{mail-source-delete-incoming} is a positive number.
13857
13858 @item mail-source-ignore-errors
13859 @vindex mail-source-ignore-errors
13860 If non-@code{nil}, ignore errors when reading mail from a mail source.
13861
13862 @item mail-source-directory
13863 @vindex mail-source-directory
13864 Directory where incoming mail source files (if any) will be stored. The
13865 default is @file{~/Mail/}. At present, the only thing this is used for
13866 is to say where the incoming files will be stored if the variable
13867 @code{mail-source-delete-incoming} is @code{nil} or a number.
13868
13869 @item mail-source-incoming-file-prefix
13870 @vindex mail-source-incoming-file-prefix
13871 Prefix for file name for storing incoming mail. The default is
13872 @file{Incoming}, in which case files will end up with names like
13873 @file{Incoming30630D_} or @file{Incoming298602ZD}. This is really only
13874 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
13875 number.
13876
13877 @item mail-source-default-file-modes
13878 @vindex mail-source-default-file-modes
13879 All new mail files will get this file mode. The default is 384.
13880
13881 @item mail-source-movemail-program
13882 @vindex mail-source-movemail-program
13883 If non-@code{nil}, name of program for fetching new mail. If
13884 @code{nil}, @code{movemail} in @var{exec-directory}.
13885
13886 @end table
13887
13888
13889 @node Fetching Mail
13890 @subsubsection Fetching Mail
13891
13892 @vindex mail-sources
13893 @vindex nnmail-spool-file
13894 The way to actually tell Gnus where to get new mail from is to set
13895 @code{mail-sources} to a list of mail source specifiers
13896 (@pxref{Mail Source Specifiers}).
13897
13898 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13899 @code{nil}, the mail back ends will never attempt to fetch mail by
13900 themselves.
13901
13902 If you want to fetch mail both from your local spool as well as a
13903 @acronym{POP} mail server, you'd say something like:
13904
13905 @lisp
13906 (setq mail-sources
13907 '((file)
13908 (pop :server "pop3.mail.server"
13909 :password "secret")))
13910 @end lisp
13911
13912 Or, if you don't want to use any of the keyword defaults:
13913
13914 @lisp
13915 (setq mail-sources
13916 '((file :path "/var/spool/mail/user-name")
13917 (pop :server "pop3.mail.server"
13918 :user "user-name"
13919 :port "pop3"
13920 :password "secret")))
13921 @end lisp
13922
13923
13924 When you use a mail back end, Gnus will slurp all your mail from your
13925 inbox and plonk it down in your home directory. Gnus doesn't move any
13926 mail if you're not using a mail back end---you have to do a lot of magic
13927 invocations first. At the time when you have finished drawing the
13928 pentagram, lightened the candles, and sacrificed the goat, you really
13929 shouldn't be too surprised when Gnus moves your mail.
13930
13931
13932
13933 @node Mail Back End Variables
13934 @subsection Mail Back End Variables
13935
13936 These variables are (for the most part) pertinent to all the various
13937 mail back ends.
13938
13939 @table @code
13940 @vindex nnmail-read-incoming-hook
13941 @item nnmail-read-incoming-hook
13942 The mail back ends all call this hook after reading new mail. You can
13943 use this hook to notify any mail watch programs, if you want to.
13944
13945 @vindex nnmail-split-hook
13946 @item nnmail-split-hook
13947 @findex gnus-article-decode-encoded-words
13948 @cindex RFC 1522 decoding
13949 @cindex RFC 2047 decoding
13950 Hook run in the buffer where the mail headers of each message is kept
13951 just before the splitting based on these headers is done. The hook is
13952 free to modify the buffer contents in any way it sees fit---the buffer
13953 is discarded after the splitting has been done, and no changes performed
13954 in the buffer will show up in any files.
13955 @code{gnus-article-decode-encoded-words} is one likely function to add
13956 to this hook.
13957
13958 @vindex nnmail-pre-get-new-mail-hook
13959 @vindex nnmail-post-get-new-mail-hook
13960 @item nnmail-pre-get-new-mail-hook
13961 @itemx nnmail-post-get-new-mail-hook
13962 These are two useful hooks executed when treating new incoming
13963 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13964 starting to handle the new mail) and
13965 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13966 is done). Here's and example of using these two hooks to change the
13967 default file modes the new mail files get:
13968
13969 @lisp
13970 (add-hook 'nnmail-pre-get-new-mail-hook
13971 (lambda () (set-default-file-modes 511)))
13972
13973 (add-hook 'nnmail-post-get-new-mail-hook
13974 (lambda () (set-default-file-modes 551)))
13975 @end lisp
13976
13977 @item nnmail-use-long-file-names
13978 @vindex nnmail-use-long-file-names
13979 If non-@code{nil}, the mail back ends will use long file and directory
13980 names. Groups like @samp{mail.misc} will end up in directories
13981 (assuming use of @code{nnml} back end) or files (assuming use of
13982 @code{nnfolder} back end) like @file{mail.misc}. If it is @code{nil},
13983 the same group will end up in @file{mail/misc}.
13984
13985 @item nnmail-delete-file-function
13986 @vindex nnmail-delete-file-function
13987 @findex delete-file
13988 Function called to delete files. It is @code{delete-file} by default.
13989
13990 @item nnmail-cache-accepted-message-ids
13991 @vindex nnmail-cache-accepted-message-ids
13992 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13993 the back end (via @code{Gcc}, for instance) into the mail duplication
13994 discovery cache. The default is @code{nil}.
13995
13996 @item nnmail-cache-ignore-groups
13997 @vindex nnmail-cache-ignore-groups
13998 This can be a regular expression or a list of regular expressions.
13999 Group names that match any of the regular expressions will never be
14000 recorded in the @code{Message-ID} cache.
14001
14002 This can be useful, for example, when using Fancy Splitting
14003 (@pxref{Fancy Mail Splitting}) together with the function
14004 @code{nnmail-split-fancy-with-parent}.
14005
14006 @end table
14007
14008
14009 @node Fancy Mail Splitting
14010 @subsection Fancy Mail Splitting
14011 @cindex mail splitting
14012 @cindex fancy mail splitting
14013
14014 @vindex nnmail-split-fancy
14015 @findex nnmail-split-fancy
14016 If the rather simple, standard method for specifying how to split mail
14017 doesn't allow you to do what you want, you can set
14018 @code{nnmail-split-methods} to @code{nnmail-split-fancy}. Then you can
14019 play with the @code{nnmail-split-fancy} variable.
14020
14021 Let's look at an example value of this variable first:
14022
14023 @lisp
14024 ;; @r{Messages from the mailer daemon are not crossposted to any of}
14025 ;; @r{the ordinary groups. Warnings are put in a separate group}
14026 ;; @r{from real errors.}
14027 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
14028 "mail.misc"))
14029 ;; @r{Non-error messages are crossposted to all relevant}
14030 ;; @r{groups, but we don't crosspost between the group for the}
14031 ;; @r{(ding) list and the group for other (ding) related mail.}
14032 (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
14033 ("subject" "ding" "ding.misc"))
14034 ;; @r{Other mailing lists@dots{}}
14035 (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
14036 (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
14037 ;; @r{Both lists below have the same suffix, so prevent}
14038 ;; @r{cross-posting to mkpkg.list of messages posted only to}
14039 ;; @r{the bugs- list, but allow cross-posting when the}
14040 ;; @r{message was really cross-posted.}
14041 (any "bugs-mypackage@@somewhere" "mypkg.bugs")
14042 (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
14043 ;; @r{People@dots{}}
14044 (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
14045 ;; @r{Unmatched mail goes to the catch all group.}
14046 "misc.misc")
14047 @end lisp
14048
14049 This variable has the format of a @dfn{split}. A split is a
14050 (possibly) recursive structure where each split may contain other
14051 splits. Here are the possible split syntaxes:
14052
14053 @table @code
14054
14055 @item group
14056 If the split is a string, that will be taken as a group name. Normal
14057 regexp match expansion will be done. See below for examples.
14058
14059 @c Don't fold this line.
14060 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
14061 The split can be a list containing at least three elements. If the
14062 first element @var{field} (a regexp matching a header) contains
14063 @var{value} (also a regexp) then store the message as specified by
14064 @var{split}.
14065
14066 If @var{restrict} (yet another regexp) matches some string after
14067 @var{field} and before the end of the matched @var{value}, the
14068 @var{split} is ignored. If none of the @var{restrict} clauses match,
14069 @var{split} is processed.
14070
14071 The last element @var{invert-partial} is optional. If it is
14072 non-@code{nil}, the match-partial-words behavior controlled by the
14073 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
14074 be inverted. (New in Gnus 5.10.7)
14075
14076 @item (| @var{split} @dots{})
14077 If the split is a list, and the first element is @code{|} (vertical
14078 bar), then process each @var{split} until one of them matches. A
14079 @var{split} is said to match if it will cause the mail message to be
14080 stored in one or more groups.
14081
14082 @item (& @var{split} @dots{})
14083 If the split is a list, and the first element is @code{&}, then
14084 process all @var{split}s in the list.
14085
14086 @item junk
14087 If the split is the symbol @code{junk}, then don't save (i.e., delete)
14088 this message. Use with extreme caution.
14089
14090 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
14091 If the split is a list, and the first element is @samp{:}, then the
14092 second element will be called as a function with @var{args} given as
14093 arguments. The function should return a @var{split}.
14094
14095 @cindex body split
14096 For instance, the following function could be used to split based on the
14097 body of the messages:
14098
14099 @lisp
14100 (defun split-on-body ()
14101 (save-excursion
14102 (save-restriction
14103 (widen)
14104 (goto-char (point-min))
14105 (when (re-search-forward "Some.*string" nil t)
14106 "string.group"))))
14107 @end lisp
14108
14109 The buffer is narrowed to the message in question when @var{function}
14110 is run. That's why @code{(widen)} needs to be called after
14111 @code{save-excursion} and @code{save-restriction} in the example
14112 above. Also note that with the nnimap backend, message bodies will
14113 not be downloaded by default. You need to set
14114 @code{nnimap-split-download-body} to @code{t} to do that
14115 (@pxref{Splitting in IMAP}).
14116
14117 @item (! @var{func} @var{split})
14118 If the split is a list, and the first element is @code{!}, then
14119 @var{split} will be processed, and @var{func} will be called as a
14120 function with the result of @var{split} as argument. @var{func}
14121 should return a split.
14122
14123 @item nil
14124 If the split is @code{nil}, it is ignored.
14125
14126 @end table
14127
14128 In these splits, @var{field} must match a complete field name.
14129
14130 Normally, @var{value} in these splits must match a complete @emph{word}
14131 according to the fundamental mode syntax table. In other words, all
14132 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
14133 which are word delimiters. Therefore, if you use the following split,
14134 for example,
14135
14136 @example
14137 (any "joe" "joemail")
14138 @end example
14139
14140 @noindent
14141 messages sent from @samp{joedavis@@foo.org} will normally not be filed
14142 in @samp{joemail}. If you want to alter this behavior, you can use any
14143 of the following three ways:
14144
14145 @enumerate
14146 @item
14147 @vindex nnmail-split-fancy-match-partial-words
14148 You can set the @code{nnmail-split-fancy-match-partial-words} variable
14149 to non-@code{nil} in order to ignore word boundaries and instead the
14150 match becomes more like a grep. This variable controls whether partial
14151 words are matched during fancy splitting. The default value is
14152 @code{nil}.
14153
14154 Note that it influences all @var{value}'s in your split rules.
14155
14156 @item
14157 @var{value} beginning with @code{.*} ignores word boundaries in front of
14158 a word. Similarly, if @var{value} ends with @code{.*}, word boundaries
14159 in the rear of a word will be ignored. For example, the @var{value}
14160 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
14161 @code{".*@@example\\.com"} does.
14162
14163 @item
14164 You can set the @var{invert-partial} flag in your split rules of the
14165 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
14166 section. If the flag is set, word boundaries on both sides of a word
14167 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
14168 @code{nil}. Contrarily, if the flag is set, word boundaries are not
14169 ignored even if @code{nnmail-split-fancy-match-partial-words} is
14170 non-@code{nil}. (New in Gnus 5.10.7)
14171 @end enumerate
14172
14173 @vindex nnmail-split-abbrev-alist
14174 @var{field} and @var{value} can also be Lisp symbols, in that case
14175 they are expanded as specified by the variable
14176 @code{nnmail-split-abbrev-alist}. This is an alist of cons cells,
14177 where the @sc{car} of a cell contains the key, and the @sc{cdr}
14178 contains the associated value. Predefined entries in
14179 @code{nnmail-split-abbrev-alist} include:
14180
14181 @table @code
14182 @item from
14183 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
14184 @item to
14185 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
14186 @samp{Resent-To} and @samp{Resent-Cc} fields.
14187 @item any
14188 Is the union of the @code{from} and @code{to} entries.
14189 @end table
14190
14191 @vindex nnmail-split-fancy-syntax-table
14192 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
14193 when all this splitting is performed.
14194
14195 If you want to have Gnus create groups dynamically based on some
14196 information in the headers (i.e., do @code{replace-match}-like
14197 substitutions in the group names), you can say things like:
14198
14199 @example
14200 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
14201 @end example
14202
14203 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
14204 will be filed in @samp{mail.debian.foo}.
14205
14206 If the string contains the element @samp{\&}, then the previously
14207 matched string will be substituted. Similarly, the elements @samp{\\1}
14208 up to @samp{\\9} will be substituted with the text matched by the
14209 groupings 1 through 9.
14210
14211 @vindex nnmail-split-lowercase-expanded
14212 Where @code{nnmail-split-lowercase-expanded} controls whether the
14213 lowercase of the matched string should be used for the substitution.
14214 Setting it as non-@code{nil} is useful to avoid the creation of multiple
14215 groups when users send to an address using different case
14216 (i.e. mailing-list@@domain vs Mailing-List@@Domain). The default value
14217 is @code{t}.
14218
14219 @findex nnmail-split-fancy-with-parent
14220 @code{nnmail-split-fancy-with-parent} is a function which allows you to
14221 split followups into the same groups their parents are in. Sometimes
14222 you can't make splitting rules for all your mail. For example, your
14223 boss might send you personal mail regarding different projects you are
14224 working on, and as you can't tell your boss to put a distinguishing
14225 string into the subject line, you have to resort to manually moving the
14226 messages into the right group. With this function, you only have to do
14227 it once per thread.
14228
14229 To use this feature, you have to set @code{nnmail-treat-duplicates}
14230 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
14231 value. And then you can include @code{nnmail-split-fancy-with-parent}
14232 using the colon feature, like so:
14233 @lisp
14234 (setq nnmail-treat-duplicates 'warn ; @r{or @code{delete}}
14235 nnmail-cache-accepted-message-ids t
14236 nnmail-split-fancy
14237 '(| (: nnmail-split-fancy-with-parent)
14238 ;; @r{other splits go here}
14239 ))
14240 @end lisp
14241
14242 This feature works as follows: when @code{nnmail-treat-duplicates} is
14243 non-@code{nil}, Gnus records the message id of every message it sees
14244 in the file specified by the variable
14245 @code{nnmail-message-id-cache-file}, together with the group it is in
14246 (the group is omitted for non-mail messages). When mail splitting is
14247 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
14248 at the References (and In-Reply-To) header of each message to split
14249 and searches the file specified by @code{nnmail-message-id-cache-file}
14250 for the message ids. When it has found a parent, it returns the
14251 corresponding group name unless the group name matches the regexp
14252 @code{nnmail-split-fancy-with-parent-ignore-groups}. It is
14253 recommended that you set @code{nnmail-message-id-cache-length} to a
14254 somewhat higher number than the default so that the message ids are
14255 still in the cache. (A value of 5000 appears to create a file some
14256 300 kBytes in size.)
14257 @vindex nnmail-cache-accepted-message-ids
14258 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
14259 also records the message ids of moved articles, so that the followup
14260 messages goes into the new group.
14261
14262 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14263 want certain groups to be recorded in the cache. For example, if all
14264 outgoing messages are written to an ``outgoing'' group, you could set
14265 @code{nnmail-cache-ignore-groups} to match that group name.
14266 Otherwise, answers to all your messages would end up in the
14267 ``outgoing'' group.
14268
14269
14270 @node Group Mail Splitting
14271 @subsection Group Mail Splitting
14272 @cindex mail splitting
14273 @cindex group mail splitting
14274
14275 @findex gnus-group-split
14276 If you subscribe to dozens of mailing lists but you don't want to
14277 maintain mail splitting rules manually, group mail splitting is for you.
14278 You just have to set @code{to-list} and/or @code{to-address} in group
14279 parameters or group customization and set @code{nnmail-split-methods} to
14280 @code{gnus-group-split}. This splitting function will scan all groups
14281 for those parameters and split mail accordingly, i.e., messages posted
14282 from or to the addresses specified in the parameters @code{to-list} or
14283 @code{to-address} of a mail group will be stored in that group.
14284
14285 Sometimes, mailing lists have multiple addresses, and you may want mail
14286 splitting to recognize them all: just set the @code{extra-aliases} group
14287 parameter to the list of additional addresses and it's done. If you'd
14288 rather use a regular expression, set @code{split-regexp}.
14289
14290 All these parameters in a group will be used to create an
14291 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14292 the @var{value} is a single regular expression that matches
14293 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
14294 matches of @code{split-regexp}, and the @var{split} is the name of the
14295 group. @var{restrict}s are also supported: just set the
14296 @code{split-exclude} parameter to a list of regular expressions.
14297
14298 If you can't get the right split to be generated using all these
14299 parameters, or you just need something fancier, you can set the
14300 parameter @code{split-spec} to an @code{nnmail-split-fancy} split. In
14301 this case, all other aforementioned parameters will be ignored by
14302 @code{gnus-group-split}. In particular, @code{split-spec} may be set to
14303 @code{nil}, in which case the group will be ignored by
14304 @code{gnus-group-split}.
14305
14306 @vindex gnus-group-split-default-catch-all-group
14307 @code{gnus-group-split} will do cross-posting on all groups that match,
14308 by defining a single @code{&} fancy split containing one split for each
14309 group. If a message doesn't match any split, it will be stored in the
14310 group named in @code{gnus-group-split-default-catch-all-group}, unless
14311 some group has @code{split-spec} set to @code{catch-all}, in which case
14312 that group is used as the catch-all group. Even though this variable is
14313 often used just to name a group, it may also be set to an arbitrarily
14314 complex fancy split (after all, a group name is a fancy split), and this
14315 may be useful to split mail that doesn't go to any mailing list to
14316 personal mail folders. Note that this fancy split is added as the last
14317 element of a @code{|} split list that also contains a @code{&} split
14318 with the rules extracted from group parameters.
14319
14320 It's time for an example. Assume the following group parameters have
14321 been defined:
14322
14323 @example
14324 nnml:mail.bar:
14325 ((to-address . "bar@@femail.com")
14326 (split-regexp . ".*@@femail\\.com"))
14327 nnml:mail.foo:
14328 ((to-list . "foo@@nowhere.gov")
14329 (extra-aliases "foo@@localhost" "foo-redist@@home")
14330 (split-exclude "bugs-foo" "rambling-foo")
14331 (admin-address . "foo-request@@nowhere.gov"))
14332 nnml:mail.others:
14333 ((split-spec . catch-all))
14334 @end example
14335
14336 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14337 behave as if @code{nnmail-split-fancy} had been selected and variable
14338 @code{nnmail-split-fancy} had been set as follows:
14339
14340 @lisp
14341 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14342 (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14343 - "bugs-foo" - "rambling-foo" "mail.foo"))
14344 "mail.others")
14345 @end lisp
14346
14347 @findex gnus-group-split-fancy
14348 If you'd rather not use group splitting for all your mail groups, you
14349 may use it for only some of them, by using @code{nnmail-split-fancy}
14350 splits like this:
14351
14352 @lisp
14353 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14354 @end lisp
14355
14356 @var{groups} may be a regular expression or a list of group names whose
14357 parameters will be scanned to generate the output split.
14358 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14359 single @code{|} split will be output. @var{catch-all} is the fall back
14360 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
14361 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
14362 empty string in any selected group, no catch-all split will be issued.
14363 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
14364 this group will override the value of the @var{catch-all} argument.
14365
14366 @findex gnus-group-split-setup
14367 Unfortunately, scanning all groups and their parameters can be quite
14368 slow, especially considering that it has to be done for every message.
14369 But don't despair! The function @code{gnus-group-split-setup} can be
14370 used to enable @code{gnus-group-split} in a much more efficient way. It
14371 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14372 @code{nnmail-split-fancy} to the split produced by
14373 @code{gnus-group-split-fancy}. Thus, the group parameters are only
14374 scanned once, no matter how many messages are split.
14375
14376 @findex gnus-group-split-update
14377 However, if you change group parameters, you'd have to update
14378 @code{nnmail-split-fancy} manually. You can do it by running
14379 @code{gnus-group-split-update}. If you'd rather have it updated
14380 automatically, just tell @code{gnus-group-split-setup} to do it for
14381 you. For example, add to your @file{~/.gnus.el}:
14382
14383 @lisp
14384 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14385 @end lisp
14386
14387 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14388 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14389 have to worry about updating @code{nnmail-split-fancy} again. If you
14390 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14391 @code{gnus-group-split-default-catch-all-group} will be set to its
14392 value.
14393
14394 @vindex gnus-group-split-updated-hook
14395 Because you may want to change @code{nnmail-split-fancy} after it is set
14396 by @code{gnus-group-split-update}, this function will run
14397 @code{gnus-group-split-updated-hook} just before finishing.
14398
14399 @node Incorporating Old Mail
14400 @subsection Incorporating Old Mail
14401 @cindex incorporating old mail
14402 @cindex import old mail
14403
14404 Most people have lots of old mail stored in various file formats. If
14405 you have set up Gnus to read mail using one of the spiffy Gnus mail
14406 back ends, you'll probably wish to have that old mail incorporated into
14407 your mail groups.
14408
14409 Doing so can be quite easy.
14410
14411 To take an example: You're reading mail using @code{nnml}
14412 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14413 satisfactory value (@pxref{Splitting Mail}). You have an old Unix mbox
14414 file filled with important, but old, mail. You want to move it into
14415 your @code{nnml} groups.
14416
14417 Here's how:
14418
14419 @enumerate
14420 @item
14421 Go to the group buffer.
14422
14423 @item
14424 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14425 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14426
14427 @item
14428 Type @kbd{SPACE} to enter the newly created group.
14429
14430 @item
14431 Type @kbd{M P b} to process-mark all articles in this group's buffer
14432 (@pxref{Setting Process Marks}).
14433
14434 @item
14435 Type @kbd{B r} to respool all the process-marked articles, and answer
14436 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14437 @end enumerate
14438
14439 All the mail messages in the mbox file will now also be spread out over
14440 all your @code{nnml} groups. Try entering them and check whether things
14441 have gone without a glitch. If things look ok, you may consider
14442 deleting the mbox file, but I wouldn't do that unless I was absolutely
14443 sure that all the mail has ended up where it should be.
14444
14445 Respooling is also a handy thing to do if you're switching from one mail
14446 back end to another. Just respool all the mail in the old mail groups
14447 using the new mail back end.
14448
14449
14450 @node Expiring Mail
14451 @subsection Expiring Mail
14452 @cindex article expiry
14453
14454 Traditional mail readers have a tendency to remove mail articles when
14455 you mark them as read, in some way. Gnus takes a fundamentally
14456 different approach to mail reading.
14457
14458 Gnus basically considers mail just to be news that has been received in
14459 a rather peculiar manner. It does not think that it has the power to
14460 actually change the mail, or delete any mail messages. If you enter a
14461 mail group, and mark articles as ``read'', or kill them in some other
14462 fashion, the mail articles will still exist on the system. I repeat:
14463 Gnus will not delete your old, read mail. Unless you ask it to, of
14464 course.
14465
14466 To make Gnus get rid of your unwanted mail, you have to mark the
14467 articles as @dfn{expirable}. (With the default key bindings, this means
14468 that you have to type @kbd{E}.) This does not mean that the articles
14469 will disappear right away, however. In general, a mail article will be
14470 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14471 more than one week old. If you do not mark an article as expirable, it
14472 will remain on your system until hell freezes over. This bears
14473 repeating one more time, with some spurious capitalizations: IF you do
14474 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14475
14476 You do not have to mark articles as expirable by hand. Gnus provides
14477 two features, called ``auto-expire'' and ``total-expire'', that can help you
14478 with this. In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14479 for you when you select an article. And ``total-expire'' means that Gnus
14480 considers all articles as expirable that are read. So, in addition to
14481 the articles marked @samp{E}, also the articles marked @samp{r},
14482 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14483 expirable.
14484
14485 When should either auto-expire or total-expire be used? Most people
14486 who are subscribed to mailing lists split each list into its own group
14487 and then turn on auto-expire or total-expire for those groups.
14488 (@xref{Splitting Mail}, for more information on splitting each list
14489 into its own group.)
14490
14491 Which one is better, auto-expire or total-expire? It's not easy to
14492 answer. Generally speaking, auto-expire is probably faster. Another
14493 advantage of auto-expire is that you get more marks to work with: for
14494 the articles that are supposed to stick around, you can still choose
14495 between tick and dormant and read marks. But with total-expire, you
14496 only have dormant and ticked to choose from. The advantage of
14497 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14498 Scoring}). Auto-expire works with normal scoring but not with adaptive
14499 scoring.
14500
14501 @vindex gnus-auto-expirable-newsgroups
14502 Groups that match the regular expression
14503 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14504 read marked as expirable automatically. All articles marked as
14505 expirable have an @samp{E} in the first column in the summary buffer.
14506
14507 By default, if you have auto expiry switched on, Gnus will mark all the
14508 articles you read as expirable, no matter if they were read or unread
14509 before. To avoid having articles marked as read marked as expirable
14510 automatically, you can put something like the following in your
14511 @file{~/.gnus.el} file:
14512
14513 @vindex gnus-mark-article-hook
14514 @lisp
14515 (remove-hook 'gnus-mark-article-hook
14516 'gnus-summary-mark-read-and-unread-as-read)
14517 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14518 @end lisp
14519
14520 Note that making a group auto-expirable doesn't mean that all read
14521 articles are expired---only the articles marked as expirable
14522 will be expired. Also note that using the @kbd{d} command won't make
14523 articles expirable---only semi-automatic marking of articles as read will
14524 mark the articles as expirable in auto-expirable groups.
14525
14526 Let's say you subscribe to a couple of mailing lists, and you want the
14527 articles you have read to disappear after a while:
14528
14529 @lisp
14530 (setq gnus-auto-expirable-newsgroups
14531 "mail.nonsense-list\\|mail.nice-list")
14532 @end lisp
14533
14534 Another way to have auto-expiry happen is to have the element
14535 @code{auto-expire} in the group parameters of the group.
14536
14537 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14538 auto-expiring, you'll have problems. Auto-expiring and adaptive scoring
14539 don't really mix very well.
14540
14541 @vindex nnmail-expiry-wait
14542 The @code{nnmail-expiry-wait} variable supplies the default time an
14543 expirable article has to live. Gnus starts counting days from when the
14544 message @emph{arrived}, not from when it was sent. The default is seven
14545 days.
14546
14547 Gnus also supplies a function that lets you fine-tune how long articles
14548 are to live, based on what group they are in. Let's say you want to
14549 have one month expiry period in the @samp{mail.private} group, a one day
14550 expiry period in the @samp{mail.junk} group, and a six day expiry period
14551 everywhere else:
14552
14553 @vindex nnmail-expiry-wait-function
14554 @lisp
14555 (setq nnmail-expiry-wait-function
14556 (lambda (group)
14557 (cond ((string= group "mail.private")
14558 31)
14559 ((string= group "mail.junk")
14560 1)
14561 ((string= group "important")
14562 'never)
14563 (t
14564 6))))
14565 @end lisp
14566
14567 The group names this function is fed are ``unadorned'' group
14568 names---no @samp{nnml:} prefixes and the like.
14569
14570 The @code{nnmail-expiry-wait} variable and
14571 @code{nnmail-expiry-wait-function} function can either be a number (not
14572 necessarily an integer) or one of the symbols @code{immediate} or
14573 @code{never}.
14574
14575 You can also use the @code{expiry-wait} group parameter to selectively
14576 change the expiry period (@pxref{Group Parameters}).
14577
14578 @vindex nnmail-expiry-target
14579 The normal action taken when expiring articles is to delete them.
14580 However, in some circumstances it might make more sense to move them
14581 to other groups instead of deleting them. The variable
14582 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14583 parameter) controls this. The variable supplies a default value for
14584 all groups, which can be overridden for specific groups by the group
14585 parameter. default value is @code{delete}, but this can also be a
14586 string (which should be the name of the group the message should be
14587 moved to), or a function (which will be called in a buffer narrowed to
14588 the message in question, and with the name of the group being moved
14589 from as its parameter) which should return a target---either a group
14590 name or @code{delete}.
14591
14592 Here's an example for specifying a group name:
14593 @lisp
14594 (setq nnmail-expiry-target "nnml:expired")
14595 @end lisp
14596
14597 @findex nnmail-fancy-expiry-target
14598 @vindex nnmail-fancy-expiry-targets
14599 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14600 expire mail to groups according to the variable
14601 @code{nnmail-fancy-expiry-targets}. Here's an example:
14602
14603 @lisp
14604 (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14605 nnmail-fancy-expiry-targets
14606 '((to-from "boss" "nnfolder:Work")
14607 ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14608 ("from" ".*" "nnfolder:Archive-%Y")))
14609 @end lisp
14610
14611 With this setup, any mail that has @code{IMPORTANT} in its Subject
14612 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14613 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
14614 From or To header contains the string @code{boss}, it will get expired
14615 to @code{nnfolder:Work}. All other mail will get expired to
14616 @code{nnfolder:Archive-YYYY}.
14617
14618 @vindex nnmail-keep-last-article
14619 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14620 expire the final article in a mail newsgroup. This is to make life
14621 easier for procmail users.
14622
14623 @vindex gnus-total-expirable-newsgroups
14624 By the way: That line up there, about Gnus never expiring non-expirable
14625 articles, is a lie. If you put @code{total-expire} in the group
14626 parameters, articles will not be marked as expirable, but all read
14627 articles will be put through the expiry process. Use with extreme
14628 caution. Even more dangerous is the
14629 @code{gnus-total-expirable-newsgroups} variable. All groups that match
14630 this regexp will have all read articles put through the expiry process,
14631 which means that @emph{all} old mail articles in the groups in question
14632 will be deleted after a while. Use with extreme caution, and don't come
14633 crying to me when you discover that the regexp you used matched the
14634 wrong group and all your important mail has disappeared. Be a
14635 @emph{man}! Or a @emph{woman}! Whatever you feel more comfortable
14636 with! So there!
14637
14638 Most people make most of their mail groups total-expirable, though.
14639
14640 @vindex gnus-inhibit-user-auto-expire
14641 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14642 commands will not mark an article as expirable, even if the group has
14643 auto-expire turned on.
14644
14645
14646 @node Washing Mail
14647 @subsection Washing Mail
14648 @cindex mail washing
14649 @cindex list server brain damage
14650 @cindex incoming mail treatment
14651
14652 Mailers and list servers are notorious for doing all sorts of really,
14653 really stupid things with mail. ``Hey, RFC 822 doesn't explicitly
14654 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14655 end of all lines passing through our server, so let's do that!!!!1!''
14656 Yes, but RFC 822 wasn't designed to be read by morons. Things that were
14657 considered to be self-evident were not discussed. So. Here we are.
14658
14659 Case in point: The German version of Microsoft Exchange adds @samp{AW:
14660 } to the subjects of replies instead of @samp{Re: }. I could pretend to
14661 be shocked and dismayed by this, but I haven't got the energy. It is to
14662 laugh.
14663
14664 Gnus provides a plethora of functions for washing articles while
14665 displaying them, but it might be nicer to do the filtering before
14666 storing the mail to disk. For that purpose, we have three hooks and
14667 various functions that can be put in these hooks.
14668
14669 @table @code
14670 @item nnmail-prepare-incoming-hook
14671 @vindex nnmail-prepare-incoming-hook
14672 This hook is called before doing anything with the mail and is meant for
14673 grand, sweeping gestures. It is called in a buffer that contains all
14674 the new, incoming mail. Functions to be used include:
14675
14676 @table @code
14677 @item nnheader-ms-strip-cr
14678 @findex nnheader-ms-strip-cr
14679 Remove trailing carriage returns from each line. This is default on
14680 Emacs running on MS machines.
14681
14682 @end table
14683
14684 @item nnmail-prepare-incoming-header-hook
14685 @vindex nnmail-prepare-incoming-header-hook
14686 This hook is called narrowed to each header. It can be used when
14687 cleaning up the headers. Functions that can be used include:
14688
14689 @table @code
14690 @item nnmail-remove-leading-whitespace
14691 @findex nnmail-remove-leading-whitespace
14692 Clear leading white space that ``helpful'' listservs have added to the
14693 headers to make them look nice. Aaah.
14694
14695 (Note that this function works on both the header on the body of all
14696 messages, so it is a potentially dangerous function to use (if a body
14697 of a message contains something that looks like a header line). So
14698 rather than fix the bug, it is of course the right solution to make it
14699 into a feature by documenting it.)
14700
14701 @item nnmail-remove-list-identifiers
14702 @findex nnmail-remove-list-identifiers
14703 Some list servers add an identifier---for example, @samp{(idm)}---to the
14704 beginning of all @code{Subject} headers. I'm sure that's nice for
14705 people who use stone age mail readers. This function will remove
14706 strings that match the @code{nnmail-list-identifiers} regexp, which can
14707 also be a list of regexp. @code{nnmail-list-identifiers} may not contain
14708 @code{\\(..\\)}.
14709
14710 For instance, if you want to remove the @samp{(idm)} and the
14711 @samp{nagnagnag} identifiers:
14712
14713 @lisp
14714 (setq nnmail-list-identifiers
14715 '("(idm)" "nagnagnag"))
14716 @end lisp
14717
14718 This can also be done non-destructively with
14719 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14720
14721 @item nnmail-remove-tabs
14722 @findex nnmail-remove-tabs
14723 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14724
14725 @item nnmail-fix-eudora-headers
14726 @findex nnmail-fix-eudora-headers
14727 @cindex Eudora
14728 Eudora produces broken @code{References} headers, but OK
14729 @code{In-Reply-To} headers. This function will get rid of the
14730 @code{References} headers.
14731
14732 @end table
14733
14734 @item nnmail-prepare-incoming-message-hook
14735 @vindex nnmail-prepare-incoming-message-hook
14736 This hook is called narrowed to each message. Functions to be used
14737 include:
14738
14739 @table @code
14740 @item article-de-quoted-unreadable
14741 @findex article-de-quoted-unreadable
14742 Decode Quoted Readable encoding.
14743
14744 @end table
14745 @end table
14746
14747
14748 @node Duplicates
14749 @subsection Duplicates
14750
14751 @vindex nnmail-treat-duplicates
14752 @vindex nnmail-message-id-cache-length
14753 @vindex nnmail-message-id-cache-file
14754 @cindex duplicate mails
14755 If you are a member of a couple of mailing lists, you will sometimes
14756 receive two copies of the same mail. This can be quite annoying, so
14757 @code{nnmail} checks for and treats any duplicates it might find. To do
14758 this, it keeps a cache of old @code{Message-ID}s---
14759 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14760 default. The approximate maximum number of @code{Message-ID}s stored
14761 there is controlled by the @code{nnmail-message-id-cache-length}
14762 variable, which is 1000 by default. (So 1000 @code{Message-ID}s will be
14763 stored.) If all this sounds scary to you, you can set
14764 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14765 default), and @code{nnmail} won't delete duplicate mails. Instead it
14766 will insert a warning into the head of the mail saying that it thinks
14767 that this is a duplicate of a different message.
14768
14769 This variable can also be a function. If that's the case, the function
14770 will be called from a buffer narrowed to the message in question with
14771 the @code{Message-ID} as a parameter. The function must return either
14772 @code{nil}, @code{warn}, or @code{delete}.
14773
14774 You can turn this feature off completely by setting the variable to
14775 @code{nil}.
14776
14777 If you want all the duplicate mails to be put into a special
14778 @dfn{duplicates} group, you could do that using the normal mail split
14779 methods:
14780
14781 @lisp
14782 (setq nnmail-split-fancy
14783 '(| ;; @r{Messages duplicates go to a separate group.}
14784 ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14785 ;; @r{Message from daemons, postmaster, and the like to another.}
14786 (any mail "mail.misc")
14787 ;; @r{Other rules.}
14788 [...] ))
14789 @end lisp
14790 @noindent
14791 Or something like:
14792 @lisp
14793 (setq nnmail-split-methods
14794 '(("duplicates" "^Gnus-Warning:.*duplicate")
14795 ;; @r{Other rules.}
14796 [...]))
14797 @end lisp
14798
14799 Here's a neat feature: If you know that the recipient reads her mail
14800 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14801 @code{delete}, you can send her as many insults as you like, just by
14802 using a @code{Message-ID} of a mail that you know that she's already
14803 received. Think of all the fun! She'll never see any of it! Whee!
14804
14805
14806 @node Not Reading Mail
14807 @subsection Not Reading Mail
14808
14809 If you start using any of the mail back ends, they have the annoying
14810 habit of assuming that you want to read mail with them. This might not
14811 be unreasonable, but it might not be what you want.
14812
14813 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14814 @code{nil}, none of the back ends will ever attempt to read incoming
14815 mail, which should help.
14816
14817 @vindex nnbabyl-get-new-mail
14818 @vindex nnmbox-get-new-mail
14819 @vindex nnml-get-new-mail
14820 @vindex nnmh-get-new-mail
14821 @vindex nnfolder-get-new-mail
14822 This might be too much, if, for instance, you are reading mail quite
14823 happily with @code{nnml} and just want to peek at some old Rmail
14824 file you have stashed away with @code{nnbabyl}. All back ends have
14825 variables called back-end-@code{get-new-mail}. If you want to disable
14826 the @code{nnbabyl} mail reading, you edit the virtual server for the
14827 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14828
14829 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14830 narrowed to the article to be saved before saving it when reading
14831 incoming mail.
14832
14833
14834 @node Choosing a Mail Back End
14835 @subsection Choosing a Mail Back End
14836
14837 Gnus will read the mail spool when you activate a mail group. The mail
14838 file is first copied to your home directory. What happens after that
14839 depends on what format you want to store your mail in.
14840
14841 There are six different mail back ends in the standard Gnus, and more
14842 back ends are available separately. The mail back end most people use
14843 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14844 Spool}).
14845
14846 @menu
14847 * Unix Mail Box:: Using the (quite) standard Un*x mbox.
14848 * Rmail Babyl:: Emacs programs use the Rmail Babyl format.
14849 * Mail Spool:: Store your mail in a private spool?
14850 * MH Spool:: An mhspool-like back end.
14851 * Maildir:: Another one-file-per-message format.
14852 * Mail Folders:: Having one file for each group.
14853 * Comparing Mail Back Ends:: An in-depth looks at pros and cons.
14854 @end menu
14855
14856
14857 @node Unix Mail Box
14858 @subsubsection Unix Mail Box
14859 @cindex nnmbox
14860 @cindex unix mail box
14861
14862 @vindex nnmbox-active-file
14863 @vindex nnmbox-mbox-file
14864 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14865 mail. @code{nnmbox} will add extra headers to each mail article to say
14866 which group it belongs in.
14867
14868 Virtual server settings:
14869
14870 @table @code
14871 @item nnmbox-mbox-file
14872 @vindex nnmbox-mbox-file
14873 The name of the mail box in the user's home directory. Default is
14874 @file{~/mbox}.
14875
14876 @item nnmbox-active-file
14877 @vindex nnmbox-active-file
14878 The name of the active file for the mail box. Default is
14879 @file{~/.mbox-active}.
14880
14881 @item nnmbox-get-new-mail
14882 @vindex nnmbox-get-new-mail
14883 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14884 into groups. Default is @code{t}.
14885 @end table
14886
14887
14888 @node Rmail Babyl
14889 @subsubsection Rmail Babyl
14890 @cindex nnbabyl
14891 @cindex Rmail mbox
14892
14893 @vindex nnbabyl-active-file
14894 @vindex nnbabyl-mbox-file
14895 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14896 mbox}) to store mail. @code{nnbabyl} will add extra headers to each
14897 mail article to say which group it belongs in.
14898
14899 Virtual server settings:
14900
14901 @table @code
14902 @item nnbabyl-mbox-file
14903 @vindex nnbabyl-mbox-file
14904 The name of the Rmail mbox file. The default is @file{~/RMAIL}
14905
14906 @item nnbabyl-active-file
14907 @vindex nnbabyl-active-file
14908 The name of the active file for the rmail box. The default is
14909 @file{~/.rmail-active}
14910
14911 @item nnbabyl-get-new-mail
14912 @vindex nnbabyl-get-new-mail
14913 If non-@code{nil}, @code{nnbabyl} will read incoming mail. Default is
14914 @code{t}
14915 @end table
14916
14917
14918 @node Mail Spool
14919 @subsubsection Mail Spool
14920 @cindex nnml
14921 @cindex mail @acronym{NOV} spool
14922
14923 The @dfn{nnml} spool mail format isn't compatible with any other known
14924 format. It should be used with some caution.
14925
14926 @vindex nnml-directory
14927 If you use this back end, Gnus will split all incoming mail into files,
14928 one file for each mail, and put the articles into the corresponding
14929 directories under the directory specified by the @code{nnml-directory}
14930 variable. The default value is @file{~/Mail/}.
14931
14932 You do not have to create any directories beforehand; Gnus will take
14933 care of all that.
14934
14935 If you have a strict limit as to how many files you are allowed to store
14936 in your account, you should not use this back end. As each mail gets its
14937 own file, you might very well occupy thousands of inodes within a few
14938 weeks. If this is no problem for you, and it isn't a problem for you
14939 having your friendly systems administrator walking around, madly,
14940 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14941 know that this is probably the fastest format to use. You do not have
14942 to trudge through a big mbox file just to read your new mail.
14943
14944 @code{nnml} is probably the slowest back end when it comes to article
14945 splitting. It has to create lots of files, and it also generates
14946 @acronym{NOV} databases for the incoming mails. This makes it possibly the
14947 fastest back end when it comes to reading mail.
14948
14949 @cindex self contained nnml servers
14950 @cindex marks
14951 When the marks file is used (which it is by default), @code{nnml}
14952 servers have the property that you may backup them using @code{tar} or
14953 similar, and later be able to restore them into Gnus (by adding the
14954 proper @code{nnml} server) and have all your marks be preserved. Marks
14955 for a group is usually stored in the @code{.marks} file (but see
14956 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14957 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14958 to restore the group (after restoring the backup into the nnml
14959 directory).
14960
14961 If for some reason you believe your @file{.marks} files are screwed
14962 up, you can just delete them all. Gnus will then correctly regenerate
14963 them next time it starts.
14964
14965 Virtual server settings:
14966
14967 @table @code
14968 @item nnml-directory
14969 @vindex nnml-directory
14970 All @code{nnml} directories will be placed under this directory. The
14971 default is the value of @code{message-directory} (whose default value
14972 is @file{~/Mail}).
14973
14974 @item nnml-active-file
14975 @vindex nnml-active-file
14976 The active file for the @code{nnml} server. The default is
14977 @file{~/Mail/active}.
14978
14979 @item nnml-newsgroups-file
14980 @vindex nnml-newsgroups-file
14981 The @code{nnml} group descriptions file. @xref{Newsgroups File
14982 Format}. The default is @file{~/Mail/newsgroups}.
14983
14984 @item nnml-get-new-mail
14985 @vindex nnml-get-new-mail
14986 If non-@code{nil}, @code{nnml} will read incoming mail. The default is
14987 @code{t}.
14988
14989 @item nnml-nov-is-evil
14990 @vindex nnml-nov-is-evil
14991 If non-@code{nil}, this back end will ignore any @acronym{NOV} files. The
14992 default is @code{nil}.
14993
14994 @item nnml-nov-file-name
14995 @vindex nnml-nov-file-name
14996 The name of the @acronym{NOV} files. The default is @file{.overview}.
14997
14998 @item nnml-prepare-save-mail-hook
14999 @vindex nnml-prepare-save-mail-hook
15000 Hook run narrowed to an article before saving.
15001
15002 @item nnml-marks-is-evil
15003 @vindex nnml-marks-is-evil
15004 If non-@code{nil}, this back end will ignore any @sc{marks} files. The
15005 default is @code{nil}.
15006
15007 @item nnml-marks-file-name
15008 @vindex nnml-marks-file-name
15009 The name of the @dfn{marks} files. The default is @file{.marks}.
15010
15011 @item nnml-use-compressed-files
15012 @vindex nnml-use-compressed-files
15013 If non-@code{nil}, @code{nnml} will allow using compressed message
15014 files.
15015
15016 @end table
15017
15018 @findex nnml-generate-nov-databases
15019 If your @code{nnml} groups and @acronym{NOV} files get totally out of
15020 whack, you can do a complete update by typing @kbd{M-x
15021 nnml-generate-nov-databases}. This command will trawl through the
15022 entire @code{nnml} hierarchy, looking at each and every article, so it
15023 might take a while to complete. A better interface to this
15024 functionality can be found in the server buffer (@pxref{Server
15025 Commands}).
15026
15027
15028 @node MH Spool
15029 @subsubsection MH Spool
15030 @cindex nnmh
15031 @cindex mh-e mail spool
15032
15033 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
15034 @acronym{NOV} databases and it doesn't keep an active file or marks
15035 file. This makes @code{nnmh} a @emph{much} slower back end than
15036 @code{nnml}, but it also makes it easier to write procmail scripts
15037 for.
15038
15039 Virtual server settings:
15040
15041 @table @code
15042 @item nnmh-directory
15043 @vindex nnmh-directory
15044 All @code{nnmh} directories will be located under this directory. The
15045 default is the value of @code{message-directory} (whose default is
15046 @file{~/Mail})
15047
15048 @item nnmh-get-new-mail
15049 @vindex nnmh-get-new-mail
15050 If non-@code{nil}, @code{nnmh} will read incoming mail. The default is
15051 @code{t}.
15052
15053 @item nnmh-be-safe
15054 @vindex nnmh-be-safe
15055 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
15056 sure that the articles in the folder are actually what Gnus thinks
15057 they are. It will check date stamps and stat everything in sight, so
15058 setting this to @code{t} will mean a serious slow-down. If you never
15059 use anything but Gnus to read the @code{nnmh} articles, you do not
15060 have to set this variable to @code{t}. The default is @code{nil}.
15061 @end table
15062
15063
15064 @node Maildir
15065 @subsubsection Maildir
15066 @cindex nnmaildir
15067 @cindex maildir
15068
15069 @code{nnmaildir} stores mail in the maildir format, with each maildir
15070 corresponding to a group in Gnus. This format is documented here:
15071 @uref{http://cr.yp.to/proto/maildir.html} and here:
15072 @uref{http://www.qmail.org/man/man5/maildir.html}. @code{nnmaildir}
15073 also stores extra information in the @file{.nnmaildir/} directory
15074 within a maildir.
15075
15076 Maildir format was designed to allow concurrent deliveries and
15077 reading, without needing locks. With other back ends, you would have
15078 your mail delivered to a spool of some kind, and then you would
15079 configure Gnus to split mail from that spool into your groups. You
15080 can still do that with @code{nnmaildir}, but the more common
15081 configuration is to have your mail delivered directly to the maildirs
15082 that appear as group in Gnus.
15083
15084 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
15085 never corrupt its data in memory, and @code{SIGKILL} will never
15086 corrupt its data in the filesystem.
15087
15088 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
15089 maildir. So you can copy a whole maildir from one Gnus setup to
15090 another, and you will keep your marks.
15091
15092 Virtual server settings:
15093
15094 @table @code
15095 @item directory
15096 For each of your @code{nnmaildir} servers (it's very unlikely that
15097 you'd need more than one), you need to create a directory and populate
15098 it with maildirs or symlinks to maildirs (and nothing else; do not
15099 choose a directory already used for other purposes). Each maildir
15100 will be represented in Gnus as a newsgroup on that server; the
15101 filename of the symlink will be the name of the group. Any filenames
15102 in the directory starting with @samp{.} are ignored. The directory is
15103 scanned when you first start Gnus, and each time you type @kbd{g} in
15104 the group buffer; if any maildirs have been removed or added,
15105 @code{nnmaildir} notices at these times.
15106
15107 The value of the @code{directory} parameter should be a Lisp form
15108 which is processed by @code{eval} and @code{expand-file-name} to get
15109 the path of the directory for this server. The form is @code{eval}ed
15110 only when the server is opened; the resulting string is used until the
15111 server is closed. (If you don't know about forms and @code{eval},
15112 don't worry---a simple string will work.) This parameter is not
15113 optional; you must specify it. I don't recommend using
15114 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
15115 use that directory by default for various things, and may get confused
15116 if @code{nnmaildir} uses it too. @code{"~/.nnmaildir"} is a typical
15117 value.
15118
15119 @item target-prefix
15120 This should be a Lisp form which is processed by @code{eval} and
15121 @code{expand-file-name}. The form is @code{eval}ed only when the
15122 server is opened; the resulting string is used until the server is
15123 closed.
15124
15125 When you create a group on an @code{nnmaildir} server, the maildir is
15126 created with @code{target-prefix} prepended to its name, and a symlink
15127 pointing to that maildir is created, named with the plain group name.
15128 So if @code{directory} is @code{"~/.nnmaildir"} and
15129 @code{target-prefix} is @code{"../maildirs/"}, then when you create
15130 the group @code{foo}, @code{nnmaildir} will create
15131 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
15132 @file{~/.nnmaildir/foo} as a symlink pointing to
15133 @file{../maildirs/foo}.
15134
15135 You can set @code{target-prefix} to a string without any slashes to
15136 create both maildirs and symlinks in the same @code{directory}; in
15137 this case, any maildirs found in @code{directory} whose names start
15138 with @code{target-prefix} will not be listed as groups (but the
15139 symlinks pointing to them will be).
15140
15141 As a special case, if @code{target-prefix} is @code{""} (the default),
15142 then when you create a group, the maildir will be created in
15143 @code{directory} without a corresponding symlink. Beware that you
15144 cannot use @code{gnus-group-delete-group} on such groups without the
15145 @code{force} argument.
15146
15147 @item directory-files
15148 This should be a function with the same interface as
15149 @code{directory-files} (such as @code{directory-files} itself). It is
15150 used to scan the server's @code{directory} for maildirs. This
15151 parameter is optional; the default is
15152 @code{nnheader-directory-files-safe} if
15153 @code{nnheader-directory-files-is-safe} is @code{nil}, and
15154 @code{directory-files} otherwise.
15155 (@code{nnheader-directory-files-is-safe} is checked only once when the
15156 server is opened; if you want to check it each time the directory is
15157 scanned, you'll have to provide your own function that does that.)
15158
15159 @item get-new-mail
15160 If non-@code{nil}, then after scanning for new mail in the group
15161 maildirs themselves as usual, this server will also incorporate mail
15162 the conventional Gnus way, from @code{mail-sources} according to
15163 @code{nnmail-split-methods} or @code{nnmail-split-fancy}. The default
15164 value is @code{nil}.
15165
15166 Do @emph{not} use the same maildir both in @code{mail-sources} and as
15167 an @code{nnmaildir} group. The results might happen to be useful, but
15168 that would be by chance, not by design, and the results might be
15169 different in the future. If your split rules create new groups,
15170 remember to supply a @code{create-directory} server parameter.
15171 @end table
15172
15173 @subsubsection Group parameters
15174
15175 @code{nnmaildir} uses several group parameters. It's safe to ignore
15176 all this; the default behavior for @code{nnmaildir} is the same as the
15177 default behavior for other mail back ends: articles are deleted after
15178 one week, etc. Except for the expiry parameters, all this
15179 functionality is unique to @code{nnmaildir}, so you can ignore it if
15180 you're just trying to duplicate the behavior you already have with
15181 another back end.
15182
15183 If the value of any of these parameters is a vector, the first element
15184 is evaluated as a Lisp form and the result is used, rather than the
15185 original value. If the value is not a vector, the value itself is
15186 evaluated as a Lisp form. (This is why these parameters use names
15187 different from those of other, similar parameters supported by other
15188 back ends: they have different, though similar, meanings.) (For
15189 numbers, strings, @code{nil}, and @code{t}, you can ignore the
15190 @code{eval} business again; for other values, remember to use an extra
15191 quote and wrap the value in a vector when appropriate.)
15192
15193 @table @code
15194 @item expire-age
15195 An integer specifying the minimum age, in seconds, of an article
15196 before it will be expired, or the symbol @code{never} to specify that
15197 articles should never be expired. If this parameter is not set,
15198 @code{nnmaildir} falls back to the usual
15199 @code{nnmail-expiry-wait}(@code{-function}) variables (the
15200 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
15201 and makes @code{nnmail-expiry-wait-function} ineffective). If you
15202 wanted a value of 3 days, you could use something like @code{[(* 3 24
15203 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
15204 An article's age is measured starting from the article file's
15205 modification time. Normally, this is the same as the article's
15206 delivery time, but editing an article makes it younger. Moving an
15207 article (other than via expiry) may also make an article younger.
15208
15209 @item expire-group
15210 If this is set to a string such as a full Gnus group name, like
15211 @example
15212 "backend+server.address.string:group.name"
15213 @end example
15214 and if it is not the name of the same group that the parameter belongs
15215 to, then articles will be moved to the specified group during expiry
15216 before being deleted. @emph{If this is set to an @code{nnmaildir}
15217 group, the article will be just as old in the destination group as it
15218 was in the source group.} So be careful with @code{expire-age} in the
15219 destination group. If this is set to the name of the same group that
15220 the parameter belongs to, then the article is not expired at all. If
15221 you use the vector form, the first element is evaluated once for each
15222 article. So that form can refer to
15223 @code{nnmaildir-article-file-name}, etc., to decide where to put the
15224 article. @emph{Even if this parameter is not set, @code{nnmaildir}
15225 does not fall back to the @code{expiry-target} group parameter or the
15226 @code{nnmail-expiry-target} variable.}
15227
15228 @item read-only
15229 If this is set to @code{t}, @code{nnmaildir} will treat the articles
15230 in this maildir as read-only. This means: articles are not renamed
15231 from @file{new/} into @file{cur/}; articles are only found in
15232 @file{new/}, not @file{cur/}; articles are never deleted; articles
15233 cannot be edited. @file{new/} is expected to be a symlink to the
15234 @file{new/} directory of another maildir---e.g., a system-wide mailbox
15235 containing a mailing list of common interest. Everything in the
15236 maildir outside @file{new/} is @emph{not} treated as read-only, so for
15237 a shared mailbox, you do still need to set up your own maildir (or
15238 have write permission to the shared mailbox); your maildir just won't
15239 contain extra copies of the articles.
15240
15241 @item directory-files
15242 A function with the same interface as @code{directory-files}. It is
15243 used to scan the directories in the maildir corresponding to this
15244 group to find articles. The default is the function specified by the
15245 server's @code{directory-files} parameter.
15246
15247 @item distrust-Lines:
15248 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
15249 article, rather than use the @code{Lines:} header field. If
15250 @code{nil}, the header field will be used if present.
15251
15252 @item always-marks
15253 A list of mark symbols, such as @code{['(read expire)]}. Whenever
15254 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15255 say that all articles have these marks, regardless of whether the
15256 marks stored in the filesystem say so. This is a proof-of-concept
15257 feature that will probably be removed eventually; it ought to be done
15258 in Gnus proper, or abandoned if it's not worthwhile.
15259
15260 @item never-marks
15261 A list of mark symbols, such as @code{['(tick expire)]}. Whenever
15262 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15263 say that no articles have these marks, regardless of whether the marks
15264 stored in the filesystem say so. @code{never-marks} overrides
15265 @code{always-marks}. This is a proof-of-concept feature that will
15266 probably be removed eventually; it ought to be done in Gnus proper, or
15267 abandoned if it's not worthwhile.
15268
15269 @item nov-cache-size
15270 An integer specifying the size of the @acronym{NOV} memory cache. To
15271 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
15272 for a limited number of articles in each group. (This is probably not
15273 worthwhile, and will probably be removed in the future.) This
15274 parameter's value is noticed only the first time a group is seen after
15275 the server is opened---i.e., when you first start Gnus, typically.
15276 The @acronym{NOV} cache is never resized until the server is closed
15277 and reopened. The default is an estimate of the number of articles
15278 that would be displayed in the summary buffer: a count of articles
15279 that are either marked with @code{tick} or not marked with
15280 @code{read}, plus a little extra.
15281 @end table
15282
15283 @subsubsection Article identification
15284 Articles are stored in the @file{cur/} subdirectory of each maildir.
15285 Each article file is named like @code{uniq:info}, where @code{uniq}
15286 contains no colons. @code{nnmaildir} ignores, but preserves, the
15287 @code{:info} part. (Other maildir readers typically use this part of
15288 the filename to store marks.) The @code{uniq} part uniquely
15289 identifies the article, and is used in various places in the
15290 @file{.nnmaildir/} subdirectory of the maildir to store information
15291 about the corresponding article. The full pathname of an article is
15292 available in the variable @code{nnmaildir-article-file-name} after you
15293 request the article in the summary buffer.
15294
15295 @subsubsection NOV data
15296 An article identified by @code{uniq} has its @acronym{NOV} data (used
15297 to generate lines in the summary buffer) stored in
15298 @code{.nnmaildir/nov/uniq}. There is no
15299 @code{nnmaildir-generate-nov-databases} function. (There isn't much
15300 need for it---an article's @acronym{NOV} data is updated automatically
15301 when the article or @code{nnmail-extra-headers} has changed.) You can
15302 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
15303 single article simply by deleting the corresponding @acronym{NOV}
15304 file, but @emph{beware}: this will also cause @code{nnmaildir} to
15305 assign a new article number for this article, which may cause trouble
15306 with @code{seen} marks, the Agent, and the cache.
15307
15308 @subsubsection Article marks
15309 An article identified by @code{uniq} is considered to have the mark
15310 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15311 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
15312 looks for such files and reports the set of marks it finds. When Gnus
15313 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
15314 creates and deletes the corresponding files as needed. (Actually,
15315 rather than create a new file for each mark, it just creates hard
15316 links to @file{.nnmaildir/markfile}, to save inodes.)
15317
15318 You can invent new marks by creating a new directory in
15319 @file{.nnmaildir/marks/}. You can tar up a maildir and remove it from
15320 your server, untar it later, and keep your marks. You can add and
15321 remove marks yourself by creating and deleting mark files. If you do
15322 this while Gnus is running and your @code{nnmaildir} server is open,
15323 it's best to exit all summary buffers for @code{nnmaildir} groups and
15324 type @kbd{s} in the group buffer first, and to type @kbd{g} or
15325 @kbd{M-g} in the group buffer afterwards. Otherwise, Gnus might not
15326 pick up the changes, and might undo them.
15327
15328
15329 @node Mail Folders
15330 @subsubsection Mail Folders
15331 @cindex nnfolder
15332 @cindex mbox folders
15333 @cindex mail folders
15334
15335 @code{nnfolder} is a back end for storing each mail group in a
15336 separate file. Each file is in the standard Un*x mbox format.
15337 @code{nnfolder} will add extra headers to keep track of article
15338 numbers and arrival dates.
15339
15340 @cindex self contained nnfolder servers
15341 @cindex marks
15342 When the marks file is used (which it is by default), @code{nnfolder}
15343 servers have the property that you may backup them using @code{tar} or
15344 similar, and later be able to restore them into Gnus (by adding the
15345 proper @code{nnfolder} server) and have all your marks be preserved.
15346 Marks for a group are usually stored in a file named as the mbox file
15347 with @code{.mrk} concatenated to it (but see
15348 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
15349 directory. Individual @code{nnfolder} groups are also possible to
15350 backup, use @kbd{G m} to restore the group (after restoring the backup
15351 into the @code{nnfolder} directory).
15352
15353 Virtual server settings:
15354
15355 @table @code
15356 @item nnfolder-directory
15357 @vindex nnfolder-directory
15358 All the @code{nnfolder} mail boxes will be stored under this
15359 directory. The default is the value of @code{message-directory}
15360 (whose default is @file{~/Mail})
15361
15362 @item nnfolder-active-file
15363 @vindex nnfolder-active-file
15364 The name of the active file. The default is @file{~/Mail/active}.
15365
15366 @item nnfolder-newsgroups-file
15367 @vindex nnfolder-newsgroups-file
15368 The name of the group descriptions file. @xref{Newsgroups File
15369 Format}. The default is @file{~/Mail/newsgroups}
15370
15371 @item nnfolder-get-new-mail
15372 @vindex nnfolder-get-new-mail
15373 If non-@code{nil}, @code{nnfolder} will read incoming mail. The
15374 default is @code{t}
15375
15376 @item nnfolder-save-buffer-hook
15377 @vindex nnfolder-save-buffer-hook
15378 @cindex backup files
15379 Hook run before saving the folders. Note that Emacs does the normal
15380 backup renaming of files even with the @code{nnfolder} buffers. If
15381 you wish to switch this off, you could say something like the
15382 following in your @file{.emacs} file:
15383
15384 @lisp
15385 (defun turn-off-backup ()
15386 (set (make-local-variable 'backup-inhibited) t))
15387
15388 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15389 @end lisp
15390
15391 @item nnfolder-delete-mail-hook
15392 @vindex nnfolder-delete-mail-hook
15393 Hook run in a buffer narrowed to the message that is to be deleted.
15394 This function can be used to copy the message to somewhere else, or to
15395 extract some information from it before removing it.
15396
15397 @item nnfolder-nov-is-evil
15398 @vindex nnfolder-nov-is-evil
15399 If non-@code{nil}, this back end will ignore any @acronym{NOV} files. The
15400 default is @code{nil}.
15401
15402 @item nnfolder-nov-file-suffix
15403 @vindex nnfolder-nov-file-suffix
15404 The extension for @acronym{NOV} files. The default is @file{.nov}.
15405
15406 @item nnfolder-nov-directory
15407 @vindex nnfolder-nov-directory
15408 The directory where the @acronym{NOV} files should be stored. If
15409 @code{nil}, @code{nnfolder-directory} is used.
15410
15411 @item nnfolder-marks-is-evil
15412 @vindex nnfolder-marks-is-evil
15413 If non-@code{nil}, this back end will ignore any @sc{marks} files. The
15414 default is @code{nil}.
15415
15416 @item nnfolder-marks-file-suffix
15417 @vindex nnfolder-marks-file-suffix
15418 The extension for @sc{marks} files. The default is @file{.mrk}.
15419
15420 @item nnfolder-marks-directory
15421 @vindex nnfolder-marks-directory
15422 The directory where the @sc{marks} files should be stored. If
15423 @code{nil}, @code{nnfolder-directory} is used.
15424
15425 @end table
15426
15427
15428 @findex nnfolder-generate-active-file
15429 @kindex M-x nnfolder-generate-active-file
15430 If you have lots of @code{nnfolder}-like files you'd like to read with
15431 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15432 command to make @code{nnfolder} aware of all likely files in
15433 @code{nnfolder-directory}. This only works if you use long file names,
15434 though.
15435
15436 @node Comparing Mail Back Ends
15437 @subsubsection Comparing Mail Back Ends
15438
15439 First, just for terminology, the @dfn{back end} is the common word for a
15440 low-level access method---a transport, if you will, by which something
15441 is acquired. The sense is that one's mail has to come from somewhere,
15442 and so selection of a suitable back end is required in order to get that
15443 mail within spitting distance of Gnus.
15444
15445 The same concept exists for Usenet itself: Though access to articles is
15446 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15447 in the world got at Usenet by running a reader on the machine where the
15448 articles lay (the machine which today we call an @acronym{NNTP} server), and
15449 access was by the reader stepping into the articles' directory spool
15450 area directly. One can still select between either the @code{nntp} or
15451 @code{nnspool} back ends, to select between these methods, if one happens
15452 actually to live on the server (or can see its spool directly, anyway,
15453 via NFS).
15454
15455 The goal in selecting a mail back end is to pick one which
15456 simultaneously represents a suitable way of dealing with the original
15457 format plus leaving mail in a form that is convenient to use in the
15458 future. Here are some high and low points on each:
15459
15460 @table @code
15461 @item nnmbox
15462
15463 UNIX systems have historically had a single, very common, and well-
15464 defined format. All messages arrive in a single @dfn{spool file}, and
15465 they are delineated by a line whose regular expression matches
15466 @samp{^From_}. (My notational use of @samp{_} is to indicate a space,
15467 to make it clear in this instance that this is not the RFC-specified
15468 @samp{From:} header.) Because Emacs and therefore Gnus emanate
15469 historically from the Unix environment, it is simplest if one does not
15470 mess a great deal with the original mailbox format, so if one chooses
15471 this back end, Gnus' primary activity in getting mail from the real spool
15472 area to Gnus' preferred directory is simply to copy it, with no
15473 (appreciable) format change in the process. It is the ``dumbest'' way
15474 to move mail into availability in the Gnus environment. This makes it
15475 fast to move into place, but slow to parse, when Gnus has to look at
15476 what's where.
15477
15478 @item nnbabyl
15479
15480 Once upon a time, there was the DEC-10 and DEC-20, running operating
15481 systems called TOPS and related things, and the usual (only?) mail
15482 reading environment was a thing called Babyl. I don't know what format
15483 was used for mail landing on the system, but Babyl had its own internal
15484 format to which mail was converted, primarily involving creating a
15485 spool-file-like entity with a scheme for inserting Babyl-specific
15486 headers and status bits above the top of each message in the file.
15487 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15488 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15489 to understand the mail files folks already had in existence. Gnus (and
15490 VM, for that matter) continue to support this format because it's
15491 perceived as having some good qualities in those mailer-specific
15492 headers/status bits stuff. Rmail itself still exists as well, of
15493 course, and is still maintained by Stallman.
15494
15495 Both of the above forms leave your mail in a single file on your
15496 file system, and they must parse that entire file each time you take a
15497 look at your mail.
15498
15499 @item nnml
15500
15501 @code{nnml} is the back end which smells the most as though you were
15502 actually operating with an @code{nnspool}-accessed Usenet system. (In
15503 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15504 lo these years ago.) One's mail is taken from the original spool file,
15505 and is then cut up into individual message files, 1:1. It maintains a
15506 Usenet-style active file (analogous to what one finds in an INN- or
15507 CNews-based news system in (for instance) @file{/var/lib/news/active},
15508 or what is returned via the @samp{NNTP LIST} verb) and also creates
15509 @dfn{overview} files for efficient group entry, as has been defined for
15510 @acronym{NNTP} servers for some years now. It is slower in mail-splitting,
15511 due to the creation of lots of files, updates to the @code{nnml} active
15512 file, and additions to overview files on a per-message basis, but it is
15513 extremely fast on access because of what amounts to the indexing support
15514 provided by the active file and overviews.
15515
15516 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15517 resource which defines available places in the file system to put new
15518 files. Sysadmins take a dim view of heavy inode occupation within
15519 tight, shared file systems. But if you live on a personal machine where
15520 the file system is your own and space is not at a premium, @code{nnml}
15521 wins big.
15522
15523 It is also problematic using this back end if you are living in a
15524 FAT16-based Windows world, since much space will be wasted on all these
15525 tiny files.
15526
15527 @item nnmh
15528
15529 The Rand MH mail-reading system has been around UNIX systems for a very
15530 long time; it operates by splitting one's spool file of messages into
15531 individual files, but with little or no indexing support---@code{nnmh}
15532 is considered to be semantically equivalent to ``@code{nnml} without
15533 active file or overviews''. This is arguably the worst choice, because
15534 one gets the slowness of individual file creation married to the
15535 slowness of access parsing when learning what's new in one's groups.
15536
15537 @item nnfolder
15538
15539 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15540 method described above) on a per-group basis. That is, @code{nnmbox}
15541 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15542 little bit of optimization to this so that each of one's mail groups has
15543 a Unix mail box file. It's faster than @code{nnmbox} because each group
15544 can be parsed separately, and still provides the simple Unix mail box
15545 format requiring minimal effort in moving the mail around. In addition,
15546 it maintains an ``active'' file making it much faster for Gnus to figure
15547 out how many messages there are in each separate group.
15548
15549 If you have groups that are expected to have a massive amount of
15550 messages, @code{nnfolder} is not the best choice, but if you receive
15551 only a moderate amount of mail, @code{nnfolder} is probably the most
15552 friendly mail back end all over.
15553
15554 @item nnmaildir
15555
15556 For configuring expiry and other things, @code{nnmaildir} uses
15557 incompatible group parameters, slightly different from those of other
15558 mail back ends.
15559
15560 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15561 differences. Each message is stored in a separate file, but the
15562 filename is unrelated to the article number in Gnus. @code{nnmaildir}
15563 also stores the equivalent of @code{nnml}'s overview files in one file
15564 per article, so it uses about twice as many inodes as @code{nnml}. (Use
15565 @code{df -i} to see how plentiful your inode supply is.) If this slows
15566 you down or takes up very much space, consider switching to
15567 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15568 file system.
15569
15570 Since maildirs don't require locking for delivery, the maildirs you use
15571 as groups can also be the maildirs your mail is directly delivered to.
15572 This means you can skip Gnus' mail splitting if your mail is already
15573 organized into different mailboxes during delivery. A @code{directory}
15574 entry in @code{mail-sources} would have a similar effect, but would
15575 require one set of mailboxes for spooling deliveries (in mbox format,
15576 thus damaging message bodies), and another set to be used as groups (in
15577 whatever format you like). A maildir has a built-in spool, in the
15578 @code{new/} subdirectory. Beware that currently, mail moved from
15579 @code{new/} to @code{cur/} instead of via mail splitting will not
15580 undergo treatment such as duplicate checking.
15581
15582 @code{nnmaildir} stores article marks for a given group in the
15583 corresponding maildir, in a way designed so that it's easy to manipulate
15584 them from outside Gnus. You can tar up a maildir, unpack it somewhere
15585 else, and still have your marks. @code{nnml} also stores marks, but
15586 it's not as easy to work with them from outside Gnus as with
15587 @code{nnmaildir}.
15588
15589 @code{nnmaildir} uses a significant amount of memory to speed things up.
15590 (It keeps in memory some of the things that @code{nnml} stores in files
15591 and that @code{nnmh} repeatedly parses out of message files.) If this
15592 is a problem for you, you can set the @code{nov-cache-size} group
15593 parameter to something small (0 would probably not work, but 1 probably
15594 would) to make it use less memory. This caching will probably be
15595 removed in the future.
15596
15597 Startup is likely to be slower with @code{nnmaildir} than with other
15598 back ends. Everything else is likely to be faster, depending in part
15599 on your file system.
15600
15601 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15602 to write an @code{nnmaildir}-derived back end.
15603
15604 @end table
15605
15606
15607 @node Browsing the Web
15608 @section Browsing the Web
15609 @cindex web
15610 @cindex browsing the web
15611 @cindex www
15612 @cindex http
15613
15614 Web-based discussion forums are getting more and more popular. On many
15615 subjects, the web-based forums have become the most important forums,
15616 eclipsing the importance of mailing lists and news groups. The reason
15617 is easy to understand---they are friendly to new users; you just point
15618 and click, and there's the discussion. With mailing lists, you have to
15619 go through a cumbersome subscription procedure, and most people don't
15620 even know what a news group is.
15621
15622 The problem with this scenario is that web browsers are not very good at
15623 being newsreaders. They do not keep track of what articles you've read;
15624 they do not allow you to score on subjects you're interested in; they do
15625 not allow off-line browsing; they require you to click around and drive
15626 you mad in the end.
15627
15628 So---if web browsers suck at reading discussion forums, why not use Gnus
15629 to do it instead?
15630
15631 Gnus has been getting a bit of a collection of back ends for providing
15632 interfaces to these sources.
15633
15634 @menu
15635 * Archiving Mail::
15636 * Web Searches:: Creating groups from articles that match a string.
15637 * Slashdot:: Reading the Slashdot comments.
15638 * Ultimate:: The Ultimate Bulletin Board systems.
15639 * Web Archive:: Reading mailing list archived on web.
15640 * RSS:: Reading RDF site summary.
15641 * Customizing W3:: Doing stuff to Emacs/W3 from Gnus.
15642 @end menu
15643
15644 All the web sources require Emacs/W3 and the url library or those
15645 alternatives to work.
15646
15647 The main caveat with all these web sources is that they probably won't
15648 work for a very long time. Gleaning information from the @acronym{HTML} data
15649 is guesswork at best, and when the layout is altered, the Gnus back end
15650 will fail. If you have reasonably new versions of these back ends,
15651 though, you should be ok.
15652
15653 One thing all these Web methods have in common is that the Web sources
15654 are often down, unavailable or just plain too slow to be fun. In those
15655 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15656 Unplugged}) handle downloading articles, and then you can read them at
15657 leisure from your local disk. No more World Wide Wait for you.
15658
15659 @node Archiving Mail
15660 @subsection Archiving Mail
15661 @cindex archiving mail
15662 @cindex backup of mail
15663
15664 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15665 @code{nnmaildir}, now actually store the article marks with each group.
15666 For these servers, archiving and restoring a group while preserving
15667 marks is fairly simple.
15668
15669 (Preserving the group level and group parameters as well still
15670 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15671 though.)
15672
15673 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15674 server, take a recursive copy of the server directory. There is no need
15675 to shut down Gnus, so archiving may be invoked by @code{cron} or
15676 similar. You restore the data by restoring the directory tree, and
15677 adding a server definition pointing to that directory in Gnus. The
15678 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15679 might interfere with overwriting data, so you may want to shut down Gnus
15680 before you restore the data.
15681
15682 It is also possible to archive individual @code{nnml},
15683 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15684 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15685 directory. For @code{nnfolder} you need to copy both the base folder
15686 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15687 this example). Restoring the group is done with @kbd{G m} from the Group
15688 buffer. The last step makes Gnus notice the new directory.
15689 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15690 is unnecessary in that case.
15691
15692 @node Web Searches
15693 @subsection Web Searches
15694 @cindex nnweb
15695 @cindex Google
15696 @cindex dejanews
15697 @cindex gmane
15698 @cindex Usenet searches
15699 @cindex searching the Usenet
15700
15701 It's, like, too neat to search the Usenet for articles that match a
15702 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15703 those, like, Web browsers, and you, like, have to, rilly, like, look at
15704 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15705 searches without having to use a browser.
15706
15707 The @code{nnweb} back end allows an easy interface to the mighty search
15708 engine. You create an @code{nnweb} group, enter a search pattern, and
15709 then enter the group and read the articles like you would any normal
15710 group. The @kbd{G w} command in the group buffer (@pxref{Foreign
15711 Groups}) will do this in an easy-to-use fashion.
15712
15713 @code{nnweb} groups don't really lend themselves to being solid
15714 groups---they have a very fleeting idea of article numbers. In fact,
15715 each time you enter an @code{nnweb} group (not even changing the search
15716 pattern), you are likely to get the articles ordered in a different
15717 manner. Not even using duplicate suppression (@pxref{Duplicate
15718 Suppression}) will help, since @code{nnweb} doesn't even know the
15719 @code{Message-ID} of the articles before reading them using some search
15720 engines (Google, for instance). The only possible way to keep track
15721 of which articles you've read is by scoring on the @code{Date}
15722 header---mark all articles posted before the last date you read the
15723 group as read.
15724
15725 If the search engine changes its output substantially, @code{nnweb}
15726 won't be able to parse it and will fail. One could hardly fault the Web
15727 providers if they were to do this---their @emph{raison d'être} is to
15728 make money off of advertisements, not to provide services to the
15729 community. Since @code{nnweb} washes the ads off all the articles, one
15730 might think that the providers might be somewhat miffed. We'll see.
15731
15732 You must have the @code{url} and @code{W3} package or those alternatives
15733 (try @code{customize-group} on the @samp{mm-url} variable group)
15734 installed to be able to use @code{nnweb}.
15735
15736 Virtual server variables:
15737
15738 @table @code
15739 @item nnweb-type
15740 @vindex nnweb-type
15741 What search engine type is being used. The currently supported types
15742 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
15743 @code{dejanews} is an alias to @code{google}.
15744
15745 @item nnweb-search
15746 @vindex nnweb-search
15747 The search string to feed to the search engine.
15748
15749 @item nnweb-max-hits
15750 @vindex nnweb-max-hits
15751 Advisory maximum number of hits per search to display. The default is
15752 999.
15753
15754 @item nnweb-type-definition
15755 @vindex nnweb-type-definition
15756 Type-to-definition alist. This alist says what @code{nnweb} should do
15757 with the various search engine types. The following elements must be
15758 present:
15759
15760 @table @code
15761 @item article
15762 Function to decode the article and provide something that Gnus
15763 understands.
15764
15765 @item map
15766 Function to create an article number to message header and URL alist.
15767
15768 @item search
15769 Function to send the search string to the search engine.
15770
15771 @item address
15772 The address the aforementioned function should send the search string
15773 to.
15774
15775 @item id
15776 Format string URL to fetch an article by @code{Message-ID}.
15777 @end table
15778
15779 @end table
15780
15781
15782 @node Slashdot
15783 @subsection Slashdot
15784 @cindex Slashdot
15785 @cindex nnslashdot
15786
15787 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15788 lively discussion following the news articles. @code{nnslashdot} will
15789 let you read this forum in a convenient manner.
15790
15791 The easiest way to read this source is to put something like the
15792 following in your @file{~/.gnus.el} file:
15793
15794 @lisp
15795 (setq gnus-secondary-select-methods
15796 '((nnslashdot "")))
15797 @end lisp
15798
15799 This will make Gnus query the @code{nnslashdot} back end for new comments
15800 and groups. The @kbd{F} command will subscribe each new news article as
15801 a new Gnus group, and you can read the comments by entering these
15802 groups. (Note that the default subscription method is to subscribe new
15803 groups as zombies. Other methods are available (@pxref{Subscription
15804 Methods}).
15805
15806 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15807 command is the most handy tool (@pxref{Foreign Groups}).
15808
15809 When following up to @code{nnslashdot} comments (or posting new
15810 comments), some light @acronym{HTML}izations will be performed. In
15811 particular, text quoted with @samp{> } will be quoted with
15812 @samp{blockquote} instead, and signatures will have @samp{br} added to
15813 the end of each line. Other than that, you can just write @acronym{HTML}
15814 directly into the message buffer. Note that Slashdot filters out some
15815 @acronym{HTML} forms.
15816
15817 The following variables can be altered to change its behavior:
15818
15819 @table @code
15820 @item nnslashdot-threaded
15821 Whether @code{nnslashdot} should display threaded groups or not. The
15822 default is @code{t}. To be able to display threads, @code{nnslashdot}
15823 has to retrieve absolutely all comments in a group upon entry. If a
15824 threaded display is not required, @code{nnslashdot} will only retrieve
15825 the comments that are actually wanted by the user. Threading is nicer,
15826 but much, much slower than unthreaded.
15827
15828 @item nnslashdot-login-name
15829 @vindex nnslashdot-login-name
15830 The login name to use when posting.
15831
15832 @item nnslashdot-password
15833 @vindex nnslashdot-password
15834 The password to use when posting.
15835
15836 @item nnslashdot-directory
15837 @vindex nnslashdot-directory
15838 Where @code{nnslashdot} will store its files. The default is
15839 @file{~/News/slashdot/}.
15840
15841 @item nnslashdot-active-url
15842 @vindex nnslashdot-active-url
15843 The @acronym{URL} format string that will be used to fetch the
15844 information on news articles and comments. The default is@*
15845 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15846
15847 @item nnslashdot-comments-url
15848 @vindex nnslashdot-comments-url
15849 The @acronym{URL} format string that will be used to fetch comments.
15850
15851 @item nnslashdot-article-url
15852 @vindex nnslashdot-article-url
15853 The @acronym{URL} format string that will be used to fetch the news
15854 article. The default is
15855 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15856
15857 @item nnslashdot-threshold
15858 @vindex nnslashdot-threshold
15859 The score threshold. The default is -1.
15860
15861 @item nnslashdot-group-number
15862 @vindex nnslashdot-group-number
15863 The number of old groups, in addition to the ten latest, to keep
15864 updated. The default is 0.
15865
15866 @end table
15867
15868
15869
15870 @node Ultimate
15871 @subsection Ultimate
15872 @cindex nnultimate
15873 @cindex Ultimate Bulletin Board
15874
15875 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15876 probably the most popular Web bulletin board system used. It has a
15877 quite regular and nice interface, and it's possible to get the
15878 information Gnus needs to keep groups updated.
15879
15880 The easiest way to get started with @code{nnultimate} is to say
15881 something like the following in the group buffer: @kbd{B nnultimate RET
15882 http://www.tcj.com/messboard/ubbcgi/ RET}. (Substitute the @acronym{URL}
15883 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15884 you're interested in; there's quite a list of them on the Ultimate web
15885 site.) Then subscribe to the groups you're interested in from the
15886 server buffer, and read them from the group buffer.
15887
15888 The following @code{nnultimate} variables can be altered:
15889
15890 @table @code
15891 @item nnultimate-directory
15892 @vindex nnultimate-directory
15893 The directory where @code{nnultimate} stores its files. The default is@*
15894 @file{~/News/ultimate/}.
15895 @end table
15896
15897
15898 @node Web Archive
15899 @subsection Web Archive
15900 @cindex nnwarchive
15901 @cindex Web Archive
15902
15903 Some mailing lists only have archives on Web servers, such as
15904 @uref{http://www.egroups.com/} and
15905 @uref{http://www.mail-archive.com/}. It has a quite regular and nice
15906 interface, and it's possible to get the information Gnus needs to keep
15907 groups updated.
15908
15909 @findex gnus-group-make-warchive-group
15910 The easiest way to get started with @code{nnwarchive} is to say
15911 something like the following in the group buffer: @kbd{M-x
15912 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15913 www.egroups.com RET @var{your@@email.address} RET}. (Substitute the
15914 @var{an_egroup} with the mailing list you subscribed, the
15915 @var{your@@email.address} with your email address.), or to browse the
15916 back end by @kbd{B nnwarchive RET mail-archive RET}.
15917
15918 The following @code{nnwarchive} variables can be altered:
15919
15920 @table @code
15921 @item nnwarchive-directory
15922 @vindex nnwarchive-directory
15923 The directory where @code{nnwarchive} stores its files. The default is@*
15924 @file{~/News/warchive/}.
15925
15926 @item nnwarchive-login
15927 @vindex nnwarchive-login
15928 The account name on the web server.
15929
15930 @item nnwarchive-passwd
15931 @vindex nnwarchive-passwd
15932 The password for your account on the web server.
15933 @end table
15934
15935 @node RSS
15936 @subsection RSS
15937 @cindex nnrss
15938 @cindex RSS
15939
15940 Some web sites have an RDF Site Summary (@acronym{RSS}).
15941 @acronym{RSS} is a format for summarizing headlines from news related
15942 sites (such as BBC or CNN). But basically anything list-like can be
15943 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
15944 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
15945
15946 @acronym{RSS} has a quite regular and nice interface, and it's
15947 possible to get the information Gnus needs to keep groups updated.
15948
15949 Note: you had better use Emacs which supports the @code{utf-8} coding
15950 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
15951 text by default. It is also used by default for non-@acronym{ASCII}
15952 group names.
15953
15954 @kindex G R (Group)
15955 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
15956 prompted for the location, the title and the description of the feed.
15957 The title, which allows any characters, will be used for the group name
15958 and the name of the group data file. The description can be omitted.
15959
15960 An easy way to get started with @code{nnrss} is to say something like
15961 the following in the group buffer: @kbd{B nnrss RET RET y}, then
15962 subscribe to groups.
15963
15964 The @code{nnrss} back end saves the group data file in
15965 @code{nnrss-directory} (see below) for each @code{nnrss} group. File
15966 names containing non-@acronym{ASCII} characters will be encoded by the
15967 coding system specified with the @code{nnmail-pathname-coding-system}
15968 variable. If it is @code{nil}, in Emacs the coding system defaults to
15969 the value of @code{default-file-name-coding-system}. If you are using
15970 XEmacs and want to use non-@acronym{ASCII} group names, you should set
15971 the value for the @code{nnmail-pathname-coding-system} variable properly.
15972
15973 The @code{nnrss} back end generates @samp{multipart/alternative}
15974 @acronym{MIME} articles in which each contains a @samp{text/plain} part
15975 and a @samp{text/html} part.
15976
15977 @cindex OPML
15978 You can also use the following commands to import and export your
15979 subscriptions from a file in @acronym{OPML} format (Outline Processor
15980 Markup Language).
15981
15982 @defun nnrss-opml-import file
15983 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
15984 file.
15985 @end defun
15986
15987 @defun nnrss-opml-export
15988 Write your current @acronym{RSS} subscriptions to a buffer in
15989 @acronym{OPML} format.
15990 @end defun
15991
15992 The following @code{nnrss} variables can be altered:
15993
15994 @table @code
15995 @item nnrss-directory
15996 @vindex nnrss-directory
15997 The directory where @code{nnrss} stores its files. The default is
15998 @file{~/News/rss/}.
15999
16000 @item nnrss-file-coding-system
16001 @vindex nnrss-file-coding-system
16002 The coding system used when reading and writing the @code{nnrss} groups
16003 data files. The default is the value of
16004 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
16005 in Emacs or @code{escape-quoted} in XEmacs).
16006
16007 @item nnrss-use-local
16008 @vindex nnrss-use-local
16009 @findex nnrss-generate-download-script
16010 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
16011 the feeds from local files in @code{nnrss-directory}. You can use
16012 the command @code{nnrss-generate-download-script} to generate a
16013 download script using @command{wget}.
16014
16015 @item nnrss-wash-html-in-text-plain-parts
16016 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
16017 parts as @acronym{HTML}. The function specified by the
16018 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
16019 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
16020 to render text. If it is @code{nil}, which is the default, text will
16021 simply be folded. Leave it @code{nil} if you prefer to see
16022 @samp{text/html} parts.
16023 @end table
16024
16025 The following code may be helpful, if you want to show the description in
16026 the summary buffer.
16027
16028 @lisp
16029 (add-to-list 'nnmail-extra-headers nnrss-description-field)
16030 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
16031
16032 (defun gnus-user-format-function-X (header)
16033 (let ((descr
16034 (assq nnrss-description-field (mail-header-extra header))))
16035 (if descr (concat "\n\t" (cdr descr)) "")))
16036 @end lisp
16037
16038 The following code may be useful to open an nnrss url directly from the
16039 summary buffer.
16040
16041 @lisp
16042 (require 'browse-url)
16043
16044 (defun browse-nnrss-url( arg )
16045 (interactive "p")
16046 (let ((url (assq nnrss-url-field
16047 (mail-header-extra
16048 (gnus-data-header
16049 (assq (gnus-summary-article-number)
16050 gnus-newsgroup-data))))))
16051 (if url
16052 (progn
16053 (browse-url (cdr url))
16054 (gnus-summary-mark-as-read-forward 1))
16055 (gnus-summary-scroll-up arg))))
16056
16057 (eval-after-load "gnus"
16058 #'(define-key gnus-summary-mode-map
16059 (kbd "<RET>") 'browse-nnrss-url))
16060 (add-to-list 'nnmail-extra-headers nnrss-url-field)
16061 @end lisp
16062
16063 Even if you have added @code{"text/html"} to the
16064 @code{mm-discouraged-alternatives} variable (@pxref{Display
16065 Customization, ,Display Customization, emacs-mime, The Emacs MIME
16066 Manual}) since you don't want to see @acronym{HTML} parts, it might be
16067 more useful especially in @code{nnrss} groups to display
16068 @samp{text/html} parts. Here's an example of setting
16069 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
16070 Parameters}) in order to display @samp{text/html} parts only in
16071 @code{nnrss} groups:
16072
16073 @lisp
16074 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
16075 (eval-after-load "gnus-sum"
16076 '(add-to-list
16077 'gnus-newsgroup-variables
16078 '(mm-discouraged-alternatives
16079 . '("text/html" "image/.*"))))
16080
16081 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
16082 (add-to-list
16083 'gnus-parameters
16084 '("\\`nnrss:" (mm-discouraged-alternatives nil)))
16085 @end lisp
16086
16087
16088 @node Customizing W3
16089 @subsection Customizing W3
16090 @cindex W3
16091 @cindex html
16092 @cindex url
16093 @cindex Netscape
16094
16095 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
16096 alternatives) to display web pages. Emacs/W3 is documented in its own
16097 manual, but there are some things that may be more relevant for Gnus
16098 users.
16099
16100 For instance, a common question is how to make Emacs/W3 follow links
16101 using the @code{browse-url} functions (which will call some external web
16102 browser like Netscape). Here's one way:
16103
16104 @lisp
16105 (eval-after-load "w3"
16106 '(progn
16107 (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
16108 (defun w3-fetch (&optional url target)
16109 (interactive (list (w3-read-url-with-default)))
16110 (if (eq major-mode 'gnus-article-mode)
16111 (browse-url url)
16112 (w3-fetch-orig url target)))))
16113 @end lisp
16114
16115 Put that in your @file{.emacs} file, and hitting links in W3-rendered
16116 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
16117 follow the link.
16118
16119
16120 @node IMAP
16121 @section IMAP
16122 @cindex nnimap
16123 @cindex @acronym{IMAP}
16124
16125 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
16126 think of it as a modernized @acronym{NNTP}. Connecting to a @acronym{IMAP}
16127 server is much similar to connecting to a news server, you just
16128 specify the network address of the server.
16129
16130 @acronym{IMAP} has two properties. First, @acronym{IMAP} can do
16131 everything that @acronym{POP} can, it can hence be viewed as a
16132 @acronym{POP++}. Secondly, @acronym{IMAP} is a mail storage protocol,
16133 similar to @acronym{NNTP} being a news storage protocol---however,
16134 @acronym{IMAP} offers more features than @acronym{NNTP} because news
16135 is more or less read-only whereas mail is read-write.
16136
16137 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
16138 entry in @code{mail-sources}. With this, Gnus will fetch mails from
16139 the @acronym{IMAP} server and store them on the local disk. This is
16140 not the usage described in this section---@xref{Mail Sources}.
16141
16142 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
16143 entry in @code{gnus-secondary-select-methods}. With this, Gnus will
16144 manipulate mails stored on the @acronym{IMAP} server. This is the kind of
16145 usage explained in this section.
16146
16147 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
16148 servers might look something like the following. (Note that for
16149 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
16150 see below.)
16151
16152 @lisp
16153 (setq gnus-secondary-select-methods
16154 '((nnimap "simpleserver") ; @r{no special configuration}
16155 ; @r{perhaps a ssh port forwarded server:}
16156 (nnimap "dolk"
16157 (nnimap-address "localhost")
16158 (nnimap-server-port 1430))
16159 ; @r{a UW server running on localhost}
16160 (nnimap "barbar"
16161 (nnimap-server-port 143)
16162 (nnimap-address "localhost")
16163 (nnimap-list-pattern ("INBOX" "mail/*")))
16164 ; @r{anonymous public cyrus server:}
16165 (nnimap "cyrus.andrew.cmu.edu"
16166 (nnimap-authenticator anonymous)
16167 (nnimap-list-pattern "archive.*")
16168 (nnimap-stream network))
16169 ; @r{a ssl server on a non-standard port:}
16170 (nnimap "vic20"
16171 (nnimap-address "vic20.somewhere.com")
16172 (nnimap-server-port 9930)
16173 (nnimap-stream ssl))))
16174 @end lisp
16175
16176 After defining the new server, you can subscribe to groups on the
16177 server using normal Gnus commands such as @kbd{U} in the Group Buffer
16178 (@pxref{Subscription Commands}) or via the Server Buffer
16179 (@pxref{Server Buffer}).
16180
16181 The following variables can be used to create a virtual @code{nnimap}
16182 server:
16183
16184 @table @code
16185
16186 @item nnimap-address
16187 @vindex nnimap-address
16188
16189 The address of the remote @acronym{IMAP} server. Defaults to the virtual
16190 server name if not specified.
16191
16192 @item nnimap-server-port
16193 @vindex nnimap-server-port
16194 Port on server to contact. Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
16195
16196 Note that this should be an integer, example server specification:
16197
16198 @lisp
16199 (nnimap "mail.server.com"
16200 (nnimap-server-port 4711))
16201 @end lisp
16202
16203 @item nnimap-list-pattern
16204 @vindex nnimap-list-pattern
16205 String or list of strings of mailboxes to limit available groups to.
16206 This is used when the server has very many mailboxes and you're only
16207 interested in a few---some servers export your home directory via
16208 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
16209 @file{~/Mail/*} then.
16210
16211 The string can also be a cons of REFERENCE and the string as above, what
16212 REFERENCE is used for is server specific, but on the University of
16213 Washington server it's a directory that will be concatenated with the
16214 mailbox.
16215
16216 Example server specification:
16217
16218 @lisp
16219 (nnimap "mail.server.com"
16220 (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
16221 ("~friend/Mail/" . "list/*"))))
16222 @end lisp
16223
16224 @item nnimap-stream
16225 @vindex nnimap-stream
16226 The type of stream used to connect to your server. By default, nnimap
16227 will detect and automatically use all of the below, with the exception
16228 of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over
16229 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
16230 be automatically detected, but it's not widely deployed yet.)
16231
16232 Example server specification:
16233
16234 @lisp
16235 (nnimap "mail.server.com"
16236 (nnimap-stream ssl))
16237 @end lisp
16238
16239 Please note that the value of @code{nnimap-stream} is a symbol!
16240
16241 @itemize @bullet
16242 @item
16243 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
16244 @samp{gsasl} or @samp{imtest} program.
16245 @item
16246 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
16247 @item
16248 @dfn{starttls:} Connect via the STARTTLS extension (similar to
16249 @acronym{TLS}/@acronym{SSL}). Requires the external library @samp{starttls.el} and program
16250 @samp{starttls}.
16251 @item
16252 @dfn{tls:} Connect through @acronym{TLS}. Requires GNUTLS (the program
16253 @samp{gnutls-cli}).
16254 @item
16255 @dfn{ssl:} Connect through @acronym{SSL}. Requires OpenSSL (the program
16256 @samp{openssl}) or SSLeay (@samp{s_client}).
16257 @item
16258 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
16259 @item
16260 @dfn{network:} Plain, TCP/IP network connection.
16261 @end itemize
16262
16263 @vindex imap-kerberos4-program
16264 The @samp{imtest} program is shipped with Cyrus IMAPD. If you're
16265 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
16266 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
16267 to make @code{imap.el} use a pty instead of a pipe when communicating
16268 with @samp{imtest}. You will then suffer from a line length
16269 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
16270 indefinitely if you have many articles in a mailbox. The variable
16271 @code{imap-kerberos4-program} contain parameters to pass to the imtest
16272 program.
16273
16274 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
16275 needed. It is available from
16276 @uref{http://www.gnu.org/software/gnutls/}.
16277
16278 @vindex imap-gssapi-program
16279 This parameter specifies a list of command lines that invoke a GSSAPI
16280 authenticated @acronym{IMAP} stream in a subshell. They are tried
16281 sequentially until a connection is made, or the list has been
16282 exhausted. By default, @samp{gsasl} from GNU SASL, available from
16283 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
16284 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
16285 tried.
16286
16287 @vindex imap-ssl-program
16288 For @acronym{SSL} connections, the OpenSSL program is available from
16289 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
16290 and nnimap support it too---although the most recent versions of
16291 SSLeay, 0.9.x, are known to have serious bugs making it
16292 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
16293 work. The variable @code{imap-ssl-program} contain parameters to pass
16294 to OpenSSL/SSLeay.
16295
16296 @vindex imap-shell-program
16297 @vindex imap-shell-host
16298 For @acronym{IMAP} connections using the @code{shell} stream, the variable
16299 @code{imap-shell-program} specify what program to call.
16300
16301 @item nnimap-authenticator
16302 @vindex nnimap-authenticator
16303
16304 The authenticator used to connect to the server. By default, nnimap
16305 will use the most secure authenticator your server is capable of.
16306
16307 Example server specification:
16308
16309 @lisp
16310 (nnimap "mail.server.com"
16311 (nnimap-authenticator anonymous))
16312 @end lisp
16313
16314 Please note that the value of @code{nnimap-authenticator} is a symbol!
16315
16316 @itemize @bullet
16317 @item
16318 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
16319 external program @code{gsasl} or @code{imtest}.
16320 @item
16321 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
16322 @code{imtest}.
16323 @item
16324 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
16325 external library @code{digest-md5.el}.
16326 @item
16327 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
16328 @item
16329 @dfn{login:} Plain-text username/password via LOGIN.
16330 @item
16331 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
16332 @end itemize
16333
16334 @item nnimap-expunge-on-close
16335 @cindex expunging
16336 @vindex nnimap-expunge-on-close
16337 Unlike Parmenides the @acronym{IMAP} designers have decided things that
16338 don't exist actually do exist. More specifically, @acronym{IMAP} has
16339 this concept of marking articles @code{Deleted} which doesn't actually
16340 delete them, and this (marking them @code{Deleted}, that is) is what
16341 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
16342 similar).
16343
16344 Since the articles aren't really removed when we mark them with the
16345 @code{Deleted} flag we'll need a way to actually delete them. Feel like
16346 running in circles yet?
16347
16348 Traditionally, nnimap has removed all articles marked as @code{Deleted}
16349 when closing a mailbox but this is now configurable by this server
16350 variable.
16351
16352 The possible options are:
16353
16354 @table @code
16355
16356 @item always
16357 The default behavior, delete all articles marked as ``Deleted'' when
16358 closing a mailbox.
16359 @item never
16360 Never actually delete articles. Currently there is no way of showing
16361 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16362 may allow you to do this. If you ever want to run the EXPUNGE command
16363 manually, @xref{Expunging mailboxes}.
16364 @item ask
16365 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16366 articles or not.
16367
16368 @end table
16369
16370 @item nnimap-importantize-dormant
16371 @vindex nnimap-importantize-dormant
16372
16373 If non-@code{nil} (the default), marks dormant articles as ticked (as
16374 well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will
16375 naturally still (only) be marked as dormant. This is to make dormant
16376 articles stand out, just like ticked articles, in other @acronym{IMAP}
16377 clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16378 has only one.)
16379
16380 Probably the only reason for frobing this would be if you're trying
16381 enable per-user persistent dormant flags, using something like:
16382
16383 @lisp
16384 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16385 (format "gnus-dormant-%s" (user-login-name)))
16386 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16387 (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16388 @end lisp
16389
16390 In this case, you would not want the per-user dormant flag showing up
16391 as ticked for other users.
16392
16393 @item nnimap-expunge-search-string
16394 @cindex expunging
16395 @vindex nnimap-expunge-search-string
16396
16397 This variable contain the @acronym{IMAP} search command sent to server when
16398 searching for articles eligible for expiring. The default is
16399 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16400 UID set and the second @code{%s} is replaced by a date.
16401
16402 Probably the only useful value to change this to is
16403 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16404 messages instead of the internal article date. See section 6.4.4 of
16405 RFC 2060 for more information on valid strings.
16406
16407 @item nnimap-authinfo-file
16408 @vindex nnimap-authinfo-file
16409
16410 A file containing credentials used to log in on servers. The format is
16411 (almost) the same as the @code{ftp} @file{~/.netrc} file. See the
16412 variable @code{nntp-authinfo-file} for exact syntax; also see
16413 @ref{NNTP}. An example of an .authinfo line for an IMAP server, is:
16414
16415 @example
16416 machine students.uio.no login larsi password geheimnis port imap
16417 @end example
16418
16419 Note that it should be @code{port imap}, or @code{port 143}, if you
16420 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
16421 actual port number used is port 993 for secured IMAP. For
16422 convenience, Gnus will accept @code{port imaps} as a synonym of
16423 @code{port imap}.
16424
16425 @item nnimap-need-unselect-to-notice-new-mail
16426 @vindex nnimap-need-unselect-to-notice-new-mail
16427
16428 Unselect mailboxes before looking for new mail in them. Some servers
16429 seem to need this under some circumstances; it was reported that
16430 Courier 1.7.1 did.
16431
16432 @end table
16433
16434 @menu
16435 * Splitting in IMAP:: Splitting mail with nnimap.
16436 * Expiring in IMAP:: Expiring mail with nnimap.
16437 * Editing IMAP ACLs:: Limiting/enabling other users access to a mailbox.
16438 * Expunging mailboxes:: Equivalent of a ``compress mailbox'' button.
16439 * A note on namespaces:: How to (not) use @acronym{IMAP} namespace in Gnus.
16440 * Debugging IMAP:: What to do when things don't work.
16441 @end menu
16442
16443
16444
16445 @node Splitting in IMAP
16446 @subsection Splitting in IMAP
16447 @cindex splitting imap mail
16448
16449 Splitting is something Gnus users have loved and used for years, and now
16450 the rest of the world is catching up. Yeah, dream on, not many
16451 @acronym{IMAP} servers have server side splitting and those that have
16452 splitting seem to use some non-standard protocol. This means that
16453 @acronym{IMAP} support for Gnus has to do its own splitting.
16454
16455 And it does.
16456
16457 (Incidentally, people seem to have been dreaming on, and Sieve has
16458 gaining a market share and is supported by several IMAP servers.
16459 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16460
16461 Here are the variables of interest:
16462
16463 @table @code
16464
16465 @item nnimap-split-crosspost
16466 @cindex splitting, crosspost
16467 @cindex crosspost
16468 @vindex nnimap-split-crosspost
16469
16470 If non-@code{nil}, do crossposting if several split methods match the
16471 mail. If @code{nil}, the first match in @code{nnimap-split-rule}
16472 found will be used.
16473
16474 Nnmail equivalent: @code{nnmail-crosspost}.
16475
16476 @item nnimap-split-inbox
16477 @cindex splitting, inbox
16478 @cindex inbox
16479 @vindex nnimap-split-inbox
16480
16481 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16482 mailboxes to split from. Defaults to @code{nil}, which means that
16483 splitting is disabled!
16484
16485 @lisp
16486 (setq nnimap-split-inbox
16487 '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16488 @end lisp
16489
16490 No nnmail equivalent.
16491
16492 @item nnimap-split-rule
16493 @cindex splitting, rules
16494 @vindex nnimap-split-rule
16495
16496 New mail found in @code{nnimap-split-inbox} will be split according to
16497 this variable.
16498
16499 This variable contains a list of lists, where the first element in the
16500 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16501 matching the regexp in the second element in the sublist. Got that?
16502 Neither did I, we need examples.
16503
16504 @lisp
16505 (setq nnimap-split-rule
16506 '(("INBOX.nnimap"
16507 "^Sender: owner-nnimap@@vic20.globalcom.se")
16508 ("INBOX.junk" "^Subject:.*MAKE MONEY")
16509 ("INBOX.private" "")))
16510 @end lisp
16511
16512 This will put all articles from the nnimap mailing list into mailbox
16513 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16514 into INBOX.junk and everything else in INBOX.private.
16515
16516 The first string may contain @samp{\\1} forms, like the ones used by
16517 replace-match to insert sub-expressions from the matched text. For
16518 instance:
16519
16520 @lisp
16521 ("INBOX.lists.\\1" "^Sender: owner-\\([a-z-]+\\)@@")
16522 @end lisp
16523
16524 The first element can also be the symbol @code{junk} to indicate that
16525 matching messages should simply be deleted. Use with care.
16526
16527 The second element can also be a function. In that case, it will be
16528 called with the first element of the rule as the argument, in a buffer
16529 containing the headers of the article. It should return a
16530 non-@code{nil} value if it thinks that the mail belongs in that group.
16531
16532 Nnmail users might recollect that the last regexp had to be empty to
16533 match all articles (like in the example above). This is not required in
16534 nnimap. Articles not matching any of the regexps will not be moved out
16535 of your inbox. (This might affect performance if you keep lots of
16536 unread articles in your inbox, since the splitting code would go over
16537 them every time you fetch new mail.)
16538
16539 These rules are processed from the beginning of the alist toward the
16540 end. The first rule to make a match will ``win'', unless you have
16541 crossposting enabled. In that case, all matching rules will ``win''.
16542
16543 This variable can also have a function as its value, the function will
16544 be called with the headers narrowed and should return a group where it
16545 thinks the article should be split to. See @code{nnimap-split-fancy}.
16546
16547 The splitting code tries to create mailboxes if it needs to.
16548
16549 To allow for different split rules on different virtual servers, and
16550 even different split rules in different inboxes on the same server,
16551 the syntax of this variable have been extended along the lines of:
16552
16553 @lisp
16554 (setq nnimap-split-rule
16555 '(("my1server" (".*" (("ding" "ding@@gnus.org")
16556 ("junk" "From:.*Simon"))))
16557 ("my2server" ("INBOX" nnimap-split-fancy))
16558 ("my[34]server" (".*" (("private" "To:.*Simon")
16559 ("junk" my-junk-func))))))
16560 @end lisp
16561
16562 The virtual server name is in fact a regexp, so that the same rules
16563 may apply to several servers. In the example, the servers
16564 @code{my3server} and @code{my4server} both use the same rules.
16565 Similarly, the inbox string is also a regexp. The actual splitting
16566 rules are as before, either a function, or a list with group/regexp or
16567 group/function elements.
16568
16569 Nnmail equivalent: @code{nnmail-split-methods}.
16570
16571 @item nnimap-split-predicate
16572 @cindex splitting
16573 @vindex nnimap-split-predicate
16574
16575 Mail matching this predicate in @code{nnimap-split-inbox} will be
16576 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16577
16578 This might be useful if you use another @acronym{IMAP} client to read mail in
16579 your inbox but would like Gnus to split all articles in the inbox
16580 regardless of readedness. Then you might change this to
16581 @samp{UNDELETED}.
16582
16583 @item nnimap-split-fancy
16584 @cindex splitting, fancy
16585 @findex nnimap-split-fancy
16586 @vindex nnimap-split-fancy
16587
16588 It's possible to set @code{nnimap-split-rule} to
16589 @code{nnmail-split-fancy} if you want to use fancy
16590 splitting. @xref{Fancy Mail Splitting}.
16591
16592 However, to be able to have different fancy split rules for nnmail and
16593 nnimap back ends you can set @code{nnimap-split-rule} to
16594 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16595 rule in @code{nnimap-split-fancy}.
16596
16597 Example:
16598
16599 @lisp
16600 (setq nnimap-split-rule 'nnimap-split-fancy
16601 nnimap-split-fancy ...)
16602 @end lisp
16603
16604 Nnmail equivalent: @code{nnmail-split-fancy}.
16605
16606 @item nnimap-split-download-body
16607 @findex nnimap-split-download-body
16608 @vindex nnimap-split-download-body
16609
16610 Set to non-@code{nil} to download entire articles during splitting.
16611 This is generally not required, and will slow things down
16612 considerably. You may need it if you want to use an advanced
16613 splitting function that analyzes the body to split the article.
16614
16615 @end table
16616
16617 @node Expiring in IMAP
16618 @subsection Expiring in IMAP
16619 @cindex expiring imap mail
16620
16621 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16622 end, it supports most features in regular expiring (@pxref{Expiring
16623 Mail}). Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16624 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16625 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables. What
16626 follows below are the variables used by the @code{nnimap} expiry
16627 process.
16628
16629 A note on how the expire mark is stored on the @acronym{IMAP} server is
16630 appropriate here as well. The expire mark is translated into a
16631 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16632 message. This means that likely only Gnus will understand and treat
16633 the @code{gnus-expire} mark properly, although other clients may allow
16634 you to view client specific flags on the message. It also means that
16635 your server must support permanent storage of client specific flags on
16636 messages. Most do, fortunately.
16637
16638 @table @code
16639
16640 @item nnmail-expiry-wait
16641 @item nnmail-expiry-wait-function
16642
16643 These variables are fully supported. The expire value can be a
16644 number, the symbol @code{immediate} or @code{never}.
16645
16646 @item nnmail-expiry-target
16647
16648 This variable is supported, and internally implemented by calling the
16649 @code{nnmail} functions that handle this. It contains an optimization
16650 that if the destination is a @acronym{IMAP} group on the same server, the
16651 article is copied instead of appended (that is, uploaded again).
16652
16653 @end table
16654
16655 @node Editing IMAP ACLs
16656 @subsection Editing IMAP ACLs
16657 @cindex editing imap acls
16658 @cindex Access Control Lists
16659 @cindex Editing @acronym{IMAP} ACLs
16660 @kindex G l (Group)
16661 @findex gnus-group-nnimap-edit-acl
16662
16663 ACL stands for Access Control List. ACLs are used in @acronym{IMAP} for
16664 limiting (or enabling) other users access to your mail boxes. Not all
16665 @acronym{IMAP} servers support this, this function will give an error if it
16666 doesn't.
16667
16668 To edit an ACL for a mailbox, type @kbd{G l}
16669 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16670 editing window with detailed instructions.
16671
16672 Some possible uses:
16673
16674 @itemize @bullet
16675 @item
16676 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16677 on your mailing list mailboxes enables other users on the same server to
16678 follow the list without subscribing to it.
16679 @item
16680 At least with the Cyrus server, you are required to give the user
16681 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16682 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16683 INBOX.mailbox).
16684 @end itemize
16685
16686 @node Expunging mailboxes
16687 @subsection Expunging mailboxes
16688 @cindex expunging
16689
16690 @cindex expunge
16691 @cindex manual expunging
16692 @kindex G x (Group)
16693 @findex gnus-group-nnimap-expunge
16694
16695 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16696 you may want the option of expunging all deleted articles in a mailbox
16697 manually. This is exactly what @kbd{G x} does.
16698
16699 Currently there is no way of showing deleted articles, you can just
16700 delete them.
16701
16702 @node A note on namespaces
16703 @subsection A note on namespaces
16704 @cindex IMAP namespace
16705 @cindex namespaces
16706
16707 The @acronym{IMAP} protocol has a concept called namespaces, described
16708 by the following text in the RFC2060:
16709
16710 @display
16711 5.1.2. Mailbox Namespace Naming Convention
16712
16713 By convention, the first hierarchical element of any mailbox name
16714 which begins with "#" identifies the "namespace" of the remainder of
16715 the name. This makes it possible to disambiguate between different
16716 types of mailbox stores, each of which have their own namespaces.
16717
16718 For example, implementations which offer access to USENET
16719 newsgroups MAY use the "#news" namespace to partition the USENET
16720 newsgroup namespace from that of other mailboxes. Thus, the
16721 comp.mail.misc newsgroup would have an mailbox name of
16722 "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16723 to a different object (e.g. a user's private mailbox).
16724 @end display
16725
16726 While there is nothing in this text that warrants concern for the
16727 @acronym{IMAP} implementation in Gnus, some servers use namespace
16728 prefixes in a way that does not work with how Gnus uses mailbox names.
16729
16730 Specifically, University of Washington's @acronym{IMAP} server uses
16731 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16732 in the @sc{create} and @sc{append} commands. After the mailbox is
16733 created (or a messages is appended to a mailbox), it must be accessed
16734 without the namespace prefix, i.e. @code{read-mail}. Since Gnus do
16735 not make it possible for the user to guarantee that user entered
16736 mailbox names will only be used with the CREATE and APPEND commands,
16737 you should simply not use the namespace prefixed mailbox names in
16738 Gnus.
16739
16740 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16741 for more information on how to use the prefixes. They are a power
16742 tool and should be used only if you are sure what the effects are.
16743
16744 @node Debugging IMAP
16745 @subsection Debugging IMAP
16746 @cindex IMAP debugging
16747 @cindex protocol dump (IMAP)
16748
16749 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
16750 @acronym{POP3}. Implementation bugs are not unlikely, and we do our
16751 best to fix them right away. If you encounter odd behavior, chances
16752 are that either the server or Gnus is buggy.
16753
16754 If you are familiar with network protocols in general, you will
16755 probably be able to extract some clues from the protocol dump of the
16756 exchanges between Gnus and the server. Even if you are not familiar
16757 with network protocols, when you include the protocol dump in
16758 @acronym{IMAP}-related bug reports you are helping us with data
16759 critical to solving the problem. Therefore, we strongly encourage you
16760 to include the protocol dump when reporting IMAP bugs in Gnus.
16761
16762
16763 @vindex imap-log
16764 Because the protocol dump, when enabled, generates lots of data, it is
16765 disabled by default. You can enable it by setting @code{imap-log} as
16766 follows:
16767
16768 @lisp
16769 (setq imap-log t)
16770 @end lisp
16771
16772 This instructs the @code{imap.el} package to log any exchanges with
16773 the server. The log is stored in the buffer @samp{*imap-log*}. Look
16774 for error messages, which sometimes are tagged with the keyword
16775 @code{BAD}---but when submitting a bug, make sure to include all the
16776 data.
16777
16778 @node Other Sources
16779 @section Other Sources
16780
16781 Gnus can do more than just read news or mail. The methods described
16782 below allow Gnus to view directories and files as if they were
16783 newsgroups.
16784
16785 @menu
16786 * Directory Groups:: You can read a directory as if it was a newsgroup.
16787 * Anything Groups:: Dired? Who needs dired?
16788 * Document Groups:: Single files can be the basis of a group.
16789 * SOUP:: Reading @sc{soup} packets ``offline''.
16790 * Mail-To-News Gateways:: Posting articles via mail-to-news gateways.
16791 @end menu
16792
16793
16794 @node Directory Groups
16795 @subsection Directory Groups
16796 @cindex nndir
16797 @cindex directory groups
16798
16799 If you have a directory that has lots of articles in separate files in
16800 it, you might treat it as a newsgroup. The files have to have numerical
16801 names, of course.
16802
16803 This might be an opportune moment to mention @code{ange-ftp} (and its
16804 successor @code{efs}), that most wonderful of all wonderful Emacs
16805 packages. When I wrote @code{nndir}, I didn't think much about it---a
16806 back end to read directories. Big deal.
16807
16808 @code{ange-ftp} changes that picture dramatically. For instance, if you
16809 enter the @code{ange-ftp} file name
16810 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16811 @code{ange-ftp} or @code{efs} will actually allow you to read this
16812 directory over at @samp{sina} as a newsgroup. Distributed news ahoy!
16813
16814 @code{nndir} will use @acronym{NOV} files if they are present.
16815
16816 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16817 articles with this method. You can use @code{nnmh} or @code{nnml} for
16818 whatever you use @code{nndir} for, so you could switch to any of those
16819 methods if you feel the need to have a non-read-only @code{nndir}.
16820
16821
16822 @node Anything Groups
16823 @subsection Anything Groups
16824 @cindex nneething
16825
16826 From the @code{nndir} back end (which reads a single spool-like
16827 directory), it's just a hop and a skip to @code{nneething}, which
16828 pretends that any arbitrary directory is a newsgroup. Strange, but
16829 true.
16830
16831 When @code{nneething} is presented with a directory, it will scan this
16832 directory and assign article numbers to each file. When you enter such
16833 a group, @code{nneething} must create ``headers'' that Gnus can use.
16834 After all, Gnus is a newsreader, in case you're forgetting.
16835 @code{nneething} does this in a two-step process. First, it snoops each
16836 file in question. If the file looks like an article (i.e., the first
16837 few lines look like headers), it will use this as the head. If this is
16838 just some arbitrary file without a head (e.g. a C source file),
16839 @code{nneething} will cobble up a header out of thin air. It will use
16840 file ownership, name and date and do whatever it can with these
16841 elements.
16842
16843 All this should happen automatically for you, and you will be presented
16844 with something that looks very much like a newsgroup. Totally like a
16845 newsgroup, to be precise. If you select an article, it will be displayed
16846 in the article buffer, just as usual.
16847
16848 If you select a line that represents a directory, Gnus will pop you into
16849 a new summary buffer for this @code{nneething} group. And so on. You can
16850 traverse the entire disk this way, if you feel like, but remember that
16851 Gnus is not dired, really, and does not intend to be, either.
16852
16853 There are two overall modes to this action---ephemeral or solid. When
16854 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16855 will not store information on what files you have read, and what files
16856 are new, and so on. If you create a solid @code{nneething} group the
16857 normal way with @kbd{G m}, Gnus will store a mapping table between
16858 article numbers and file names, and you can treat this group like any
16859 other groups. When you activate a solid @code{nneething} group, you will
16860 be told how many unread articles it contains, etc., etc.
16861
16862 Some variables:
16863
16864 @table @code
16865 @item nneething-map-file-directory
16866 @vindex nneething-map-file-directory
16867 All the mapping files for solid @code{nneething} groups will be stored
16868 in this directory, which defaults to @file{~/.nneething/}.
16869
16870 @item nneething-exclude-files
16871 @vindex nneething-exclude-files
16872 All files that match this regexp will be ignored. Nice to use to exclude
16873 auto-save files and the like, which is what it does by default.
16874
16875 @item nneething-include-files
16876 @vindex nneething-include-files
16877 Regexp saying what files to include in the group. If this variable is
16878 non-@code{nil}, only files matching this regexp will be included.
16879
16880 @item nneething-map-file
16881 @vindex nneething-map-file
16882 Name of the map files.
16883 @end table
16884
16885
16886 @node Document Groups
16887 @subsection Document Groups
16888 @cindex nndoc
16889 @cindex documentation group
16890 @cindex help group
16891
16892 @code{nndoc} is a cute little thing that will let you read a single file
16893 as a newsgroup. Several files types are supported:
16894
16895 @table @code
16896 @cindex Babyl
16897 @cindex Rmail mbox
16898 @item babyl
16899 The Babyl (Rmail) mail box.
16900
16901 @cindex mbox
16902 @cindex Unix mbox
16903 @item mbox
16904 The standard Unix mbox file.
16905
16906 @cindex MMDF mail box
16907 @item mmdf
16908 The MMDF mail box format.
16909
16910 @item news
16911 Several news articles appended into a file.
16912
16913 @cindex rnews batch files
16914 @item rnews
16915 The rnews batch transport format.
16916
16917 @item nsmail
16918 Netscape mail boxes.
16919
16920 @item mime-parts
16921 @acronym{MIME} multipart messages.
16922
16923 @item standard-digest
16924 The standard (RFC 1153) digest format.
16925
16926 @item mime-digest
16927 A @acronym{MIME} digest of messages.
16928
16929 @item lanl-gov-announce
16930 Announcement messages from LANL Gov Announce.
16931
16932 @cindex forwarded messages
16933 @item rfc822-forward
16934 A message forwarded according to RFC822.
16935
16936 @item outlook
16937 The Outlook mail box.
16938
16939 @item oe-dbx
16940 The Outlook Express dbx mail box.
16941
16942 @item exim-bounce
16943 A bounce message from the Exim MTA.
16944
16945 @item forward
16946 A message forwarded according to informal rules.
16947
16948 @item rfc934
16949 An RFC934-forwarded message.
16950
16951 @item mailman
16952 A mailman digest.
16953
16954 @item clari-briefs
16955 A digest of Clarinet brief news items.
16956
16957 @item slack-digest
16958 Non-standard digest format---matches most things, but does it badly.
16959
16960 @item mail-in-mail
16961 The last resort.
16962 @end table
16963
16964 You can also use the special ``file type'' @code{guess}, which means
16965 that @code{nndoc} will try to guess what file type it is looking at.
16966 @code{digest} means that @code{nndoc} should guess what digest type the
16967 file is.
16968
16969 @code{nndoc} will not try to change the file or insert any extra headers into
16970 it---it will simply, like, let you use the file as the basis for a
16971 group. And that's it.
16972
16973 If you have some old archived articles that you want to insert into your
16974 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16975 that. Say you have an old @file{RMAIL} file with mail that you now want
16976 to split into your new @code{nnml} groups. You look at that file using
16977 @code{nndoc} (using the @kbd{G f} command in the group buffer
16978 (@pxref{Foreign Groups})), set the process mark on all the articles in
16979 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16980 using @code{nnml}. If all goes well, all the mail in the @file{RMAIL}
16981 file is now also stored in lots of @code{nnml} directories, and you can
16982 delete that pesky @file{RMAIL} file. If you have the guts!
16983
16984 Virtual server variables:
16985
16986 @table @code
16987 @item nndoc-article-type
16988 @vindex nndoc-article-type
16989 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16990 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16991 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16992 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16993 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16994
16995 @item nndoc-post-type
16996 @vindex nndoc-post-type
16997 This variable says whether Gnus is to consider the group a news group or
16998 a mail group. There are two valid values: @code{mail} (the default)
16999 and @code{news}.
17000 @end table
17001
17002 @menu
17003 * Document Server Internals:: How to add your own document types.
17004 @end menu
17005
17006
17007 @node Document Server Internals
17008 @subsubsection Document Server Internals
17009
17010 Adding new document types to be recognized by @code{nndoc} isn't
17011 difficult. You just have to whip up a definition of what the document
17012 looks like, write a predicate function to recognize that document type,
17013 and then hook into @code{nndoc}.
17014
17015 First, here's an example document type definition:
17016
17017 @example
17018 (mmdf
17019 (article-begin . "^\^A\^A\^A\^A\n")
17020 (body-end . "^\^A\^A\^A\^A\n"))
17021 @end example
17022
17023 The definition is simply a unique @dfn{name} followed by a series of
17024 regexp pseudo-variable settings. Below are the possible
17025 variables---don't be daunted by the number of variables; most document
17026 types can be defined with very few settings:
17027
17028 @table @code
17029 @item first-article
17030 If present, @code{nndoc} will skip past all text until it finds
17031 something that match this regexp. All text before this will be
17032 totally ignored.
17033
17034 @item article-begin
17035 This setting has to be present in all document type definitions. It
17036 says what the beginning of each article looks like. To do more
17037 complicated things that cannot be dealt with a simple regexp, you can
17038 use @code{article-begin-function} instead of this.
17039
17040 @item article-begin-function
17041 If present, this should be a function that moves point to the beginning
17042 of each article. This setting overrides @code{article-begin}.
17043
17044 @item head-begin
17045 If present, this should be a regexp that matches the head of the
17046 article. To do more complicated things that cannot be dealt with a
17047 simple regexp, you can use @code{head-begin-function} instead of this.
17048
17049 @item head-begin-function
17050 If present, this should be a function that moves point to the head of
17051 the article. This setting overrides @code{head-begin}.
17052
17053 @item head-end
17054 This should match the end of the head of the article. It defaults to
17055 @samp{^$}---the empty line.
17056
17057 @item body-begin
17058 This should match the beginning of the body of the article. It defaults
17059 to @samp{^\n}. To do more complicated things that cannot be dealt with
17060 a simple regexp, you can use @code{body-begin-function} instead of this.
17061
17062 @item body-begin-function
17063 If present, this function should move point to the beginning of the body
17064 of the article. This setting overrides @code{body-begin}.
17065
17066 @item body-end
17067 If present, this should match the end of the body of the article. To do
17068 more complicated things that cannot be dealt with a simple regexp, you
17069 can use @code{body-end-function} instead of this.
17070
17071 @item body-end-function
17072 If present, this function should move point to the end of the body of
17073 the article. This setting overrides @code{body-end}.
17074
17075 @item file-begin
17076 If present, this should match the beginning of the file. All text
17077 before this regexp will be totally ignored.
17078
17079 @item file-end
17080 If present, this should match the end of the file. All text after this
17081 regexp will be totally ignored.
17082
17083 @end table
17084
17085 So, using these variables @code{nndoc} is able to dissect a document
17086 file into a series of articles, each with a head and a body. However, a
17087 few more variables are needed since not all document types are all that
17088 news-like---variables needed to transform the head or the body into
17089 something that's palatable for Gnus:
17090
17091 @table @code
17092 @item prepare-body-function
17093 If present, this function will be called when requesting an article. It
17094 will be called with point at the start of the body, and is useful if the
17095 document has encoded some parts of its contents.
17096
17097 @item article-transform-function
17098 If present, this function is called when requesting an article. It's
17099 meant to be used for more wide-ranging transformation of both head and
17100 body of the article.
17101
17102 @item generate-head-function
17103 If present, this function is called to generate a head that Gnus can
17104 understand. It is called with the article number as a parameter, and is
17105 expected to generate a nice head for the article in question. It is
17106 called when requesting the headers of all articles.
17107
17108 @item generate-article-function
17109 If present, this function is called to generate an entire article that
17110 Gnus can understand. It is called with the article number as a
17111 parameter when requesting all articles.
17112
17113 @item dissection-function
17114 If present, this function is called to dissect a document by itself,
17115 overriding @code{first-article}, @code{article-begin},
17116 @code{article-begin-function}, @code{head-begin},
17117 @code{head-begin-function}, @code{head-end}, @code{body-begin},
17118 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
17119 @code{file-begin}, and @code{file-end}.
17120
17121 @end table
17122
17123 Let's look at the most complicated example I can come up with---standard
17124 digests:
17125
17126 @example
17127 (standard-digest
17128 (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
17129 (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
17130 (prepare-body-function . nndoc-unquote-dashes)
17131 (body-end-function . nndoc-digest-body-end)
17132 (head-end . "^ ?$")
17133 (body-begin . "^ ?\n")
17134 (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
17135 (subtype digest guess))
17136 @end example
17137
17138 We see that all text before a 70-width line of dashes is ignored; all
17139 text after a line that starts with that @samp{^End of} is also ignored;
17140 each article begins with a 30-width line of dashes; the line separating
17141 the head from the body may contain a single space; and that the body is
17142 run through @code{nndoc-unquote-dashes} before being delivered.
17143
17144 To hook your own document definition into @code{nndoc}, use the
17145 @code{nndoc-add-type} function. It takes two parameters---the first
17146 is the definition itself and the second (optional) parameter says
17147 where in the document type definition alist to put this definition.
17148 The alist is traversed sequentially, and
17149 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
17150 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
17151 @code{mmdf} type, and so on. These type predicates should return
17152 @code{nil} if the document is not of the correct type; @code{t} if it
17153 is of the correct type; and a number if the document might be of the
17154 correct type. A high number means high probability; a low number
17155 means low probability with @samp{0} being the lowest valid number.
17156
17157
17158 @node SOUP
17159 @subsection SOUP
17160 @cindex SOUP
17161 @cindex offline
17162
17163 In the PC world people often talk about ``offline'' newsreaders. These
17164 are thingies that are combined reader/news transport monstrosities.
17165 With built-in modem programs. Yecchh!
17166
17167 Of course, us Unix Weenie types of human beans use things like
17168 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
17169 transport things like Ghod intended. And then we just use normal
17170 newsreaders.
17171
17172 However, it can sometimes be convenient to do something that's a bit
17173 easier on the brain if you have a very slow modem, and you're not really
17174 that interested in doing things properly.
17175
17176 A file format called @sc{soup} has been developed for transporting news
17177 and mail from servers to home machines and back again. It can be a bit
17178 fiddly.
17179
17180 First some terminology:
17181
17182 @table @dfn
17183
17184 @item server
17185 This is the machine that is connected to the outside world and where you
17186 get news and/or mail from.
17187
17188 @item home machine
17189 This is the machine that you want to do the actual reading and responding
17190 on. It is typically not connected to the rest of the world in any way.
17191
17192 @item packet
17193 Something that contains messages and/or commands. There are two kinds
17194 of packets:
17195
17196 @table @dfn
17197 @item message packets
17198 These are packets made at the server, and typically contain lots of
17199 messages for you to read. These are called @file{SoupoutX.tgz} by
17200 default, where @var{x} is a number.
17201
17202 @item response packets
17203 These are packets made at the home machine, and typically contains
17204 replies that you've written. These are called @file{SoupinX.tgz} by
17205 default, where @var{x} is a number.
17206
17207 @end table
17208
17209 @end table
17210
17211
17212 @enumerate
17213
17214 @item
17215 You log in on the server and create a @sc{soup} packet. You can either
17216 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
17217 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
17218 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
17219
17220 @item
17221 You transfer the packet home. Rail, boat, car or modem will do fine.
17222
17223 @item
17224 You put the packet in your home directory.
17225
17226 @item
17227 You fire up Gnus on your home machine using the @code{nnsoup} back end as
17228 the native or secondary server.
17229
17230 @item
17231 You read articles and mail and answer and followup to the things you
17232 want (@pxref{SOUP Replies}).
17233
17234 @item
17235 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
17236 packet.
17237
17238 @item
17239 You transfer this packet to the server.
17240
17241 @item
17242 You use Gnus to mail this packet out with the @kbd{G s s} command.
17243
17244 @item
17245 You then repeat until you die.
17246
17247 @end enumerate
17248
17249 So you basically have a bipartite system---you use @code{nnsoup} for
17250 reading and Gnus for packing/sending these @sc{soup} packets.
17251
17252 @menu
17253 * SOUP Commands:: Commands for creating and sending @sc{soup} packets
17254 * SOUP Groups:: A back end for reading @sc{soup} packets.
17255 * SOUP Replies:: How to enable @code{nnsoup} to take over mail and news.
17256 @end menu
17257
17258
17259 @node SOUP Commands
17260 @subsubsection SOUP Commands
17261
17262 These are commands for creating and manipulating @sc{soup} packets.
17263
17264 @table @kbd
17265 @item G s b
17266 @kindex G s b (Group)
17267 @findex gnus-group-brew-soup
17268 Pack all unread articles in the current group
17269 (@code{gnus-group-brew-soup}). This command understands the
17270 process/prefix convention.
17271
17272 @item G s w
17273 @kindex G s w (Group)
17274 @findex gnus-soup-save-areas
17275 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
17276
17277 @item G s s
17278 @kindex G s s (Group)
17279 @findex gnus-soup-send-replies
17280 Send all replies from the replies packet
17281 (@code{gnus-soup-send-replies}).
17282
17283 @item G s p
17284 @kindex G s p (Group)
17285 @findex gnus-soup-pack-packet
17286 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
17287
17288 @item G s r
17289 @kindex G s r (Group)
17290 @findex nnsoup-pack-replies
17291 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
17292
17293 @item O s
17294 @kindex O s (Summary)
17295 @findex gnus-soup-add-article
17296 This summary-mode command adds the current article to a @sc{soup} packet
17297 (@code{gnus-soup-add-article}). It understands the process/prefix
17298 convention (@pxref{Process/Prefix}).
17299
17300 @end table
17301
17302
17303 There are a few variables to customize where Gnus will put all these
17304 thingies:
17305
17306 @table @code
17307
17308 @item gnus-soup-directory
17309 @vindex gnus-soup-directory
17310 Directory where Gnus will save intermediate files while composing
17311 @sc{soup} packets. The default is @file{~/SoupBrew/}.
17312
17313 @item gnus-soup-replies-directory
17314 @vindex gnus-soup-replies-directory
17315 This is what Gnus will use as a temporary directory while sending our
17316 reply packets. @file{~/SoupBrew/SoupReplies/} is the default.
17317
17318 @item gnus-soup-prefix-file
17319 @vindex gnus-soup-prefix-file
17320 Name of the file where Gnus stores the last used prefix. The default is
17321 @samp{gnus-prefix}.
17322
17323 @item gnus-soup-packer
17324 @vindex gnus-soup-packer
17325 A format string command for packing a @sc{soup} packet. The default is
17326 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
17327
17328 @item gnus-soup-unpacker
17329 @vindex gnus-soup-unpacker
17330 Format string command for unpacking a @sc{soup} packet. The default is
17331 @samp{gunzip -c %s | tar xvf -}.
17332
17333 @item gnus-soup-packet-directory
17334 @vindex gnus-soup-packet-directory
17335 Where Gnus will look for reply packets. The default is @file{~/}.
17336
17337 @item gnus-soup-packet-regexp
17338 @vindex gnus-soup-packet-regexp
17339 Regular expression matching @sc{soup} reply packets in
17340 @code{gnus-soup-packet-directory}.
17341
17342 @end table
17343
17344
17345 @node SOUP Groups
17346 @subsubsection SOUP Groups
17347 @cindex nnsoup
17348
17349 @code{nnsoup} is the back end for reading @sc{soup} packets. It will
17350 read incoming packets, unpack them, and put them in a directory where
17351 you can read them at leisure.
17352
17353 These are the variables you can use to customize its behavior:
17354
17355 @table @code
17356
17357 @item nnsoup-tmp-directory
17358 @vindex nnsoup-tmp-directory
17359 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
17360 directory. (@file{/tmp/} by default.)
17361
17362 @item nnsoup-directory
17363 @vindex nnsoup-directory
17364 @code{nnsoup} then moves each message and index file to this directory.
17365 The default is @file{~/SOUP/}.
17366
17367 @item nnsoup-replies-directory
17368 @vindex nnsoup-replies-directory
17369 All replies will be stored in this directory before being packed into a
17370 reply packet. The default is @file{~/SOUP/replies/}.
17371
17372 @item nnsoup-replies-format-type
17373 @vindex nnsoup-replies-format-type
17374 The @sc{soup} format of the replies packets. The default is @samp{?n}
17375 (rnews), and I don't think you should touch that variable. I probably
17376 shouldn't even have documented it. Drats! Too late!
17377
17378 @item nnsoup-replies-index-type
17379 @vindex nnsoup-replies-index-type
17380 The index type of the replies packet. The default is @samp{?n}, which
17381 means ``none''. Don't fiddle with this one either!
17382
17383 @item nnsoup-active-file
17384 @vindex nnsoup-active-file
17385 Where @code{nnsoup} stores lots of information. This is not an ``active
17386 file'' in the @code{nntp} sense; it's an Emacs Lisp file. If you lose
17387 this file or mess it up in any way, you're dead. The default is
17388 @file{~/SOUP/active}.
17389
17390 @item nnsoup-packer
17391 @vindex nnsoup-packer
17392 Format string command for packing a reply @sc{soup} packet. The default
17393 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17394
17395 @item nnsoup-unpacker
17396 @vindex nnsoup-unpacker
17397 Format string command for unpacking incoming @sc{soup} packets. The
17398 default is @samp{gunzip -c %s | tar xvf -}.
17399
17400 @item nnsoup-packet-directory
17401 @vindex nnsoup-packet-directory
17402 Where @code{nnsoup} will look for incoming packets. The default is
17403 @file{~/}.
17404
17405 @item nnsoup-packet-regexp
17406 @vindex nnsoup-packet-regexp
17407 Regular expression matching incoming @sc{soup} packets. The default is
17408 @samp{Soupout}.
17409
17410 @item nnsoup-always-save
17411 @vindex nnsoup-always-save
17412 If non-@code{nil}, save the replies buffer after each posted message.
17413
17414 @end table
17415
17416
17417 @node SOUP Replies
17418 @subsubsection SOUP Replies
17419
17420 Just using @code{nnsoup} won't mean that your postings and mailings end
17421 up in @sc{soup} reply packets automagically. You have to work a bit
17422 more for that to happen.
17423
17424 @findex nnsoup-set-variables
17425 The @code{nnsoup-set-variables} command will set the appropriate
17426 variables to ensure that all your followups and replies end up in the
17427 @sc{soup} system.
17428
17429 In specific, this is what it does:
17430
17431 @lisp
17432 (setq message-send-news-function 'nnsoup-request-post)
17433 (setq message-send-mail-function 'nnsoup-request-mail)
17434 @end lisp
17435
17436 And that's it, really. If you only want news to go into the @sc{soup}
17437 system you just use the first line. If you only want mail to be
17438 @sc{soup}ed you use the second.
17439
17440
17441 @node Mail-To-News Gateways
17442 @subsection Mail-To-News Gateways
17443 @cindex mail-to-news gateways
17444 @cindex gateways
17445
17446 If your local @code{nntp} server doesn't allow posting, for some reason
17447 or other, you can post using one of the numerous mail-to-news gateways.
17448 The @code{nngateway} back end provides the interface.
17449
17450 Note that you can't read anything from this back end---it can only be
17451 used to post with.
17452
17453 Server variables:
17454
17455 @table @code
17456 @item nngateway-address
17457 @vindex nngateway-address
17458 This is the address of the mail-to-news gateway.
17459
17460 @item nngateway-header-transformation
17461 @vindex nngateway-header-transformation
17462 News headers often have to be transformed in some odd way or other
17463 for the mail-to-news gateway to accept it. This variable says what
17464 transformation should be called, and defaults to
17465 @code{nngateway-simple-header-transformation}. The function is called
17466 narrowed to the headers to be transformed and with one parameter---the
17467 gateway address.
17468
17469 This default function just inserts a new @code{To} header based on the
17470 @code{Newsgroups} header and the gateway address.
17471 For instance, an article with this @code{Newsgroups} header:
17472
17473 @example
17474 Newsgroups: alt.religion.emacs
17475 @end example
17476
17477 will get this @code{To} header inserted:
17478
17479 @example
17480 To: alt-religion-emacs@@GATEWAY
17481 @end example
17482
17483 The following pre-defined functions exist:
17484
17485 @findex nngateway-simple-header-transformation
17486 @table @code
17487
17488 @item nngateway-simple-header-transformation
17489 Creates a @code{To} header that looks like
17490 @var{newsgroup}@@@code{nngateway-address}.
17491
17492 @findex nngateway-mail2news-header-transformation
17493
17494 @item nngateway-mail2news-header-transformation
17495 Creates a @code{To} header that looks like
17496 @code{nngateway-address}.
17497 @end table
17498
17499 @end table
17500
17501 Here's an example:
17502
17503 @lisp
17504 (setq gnus-post-method
17505 '(nngateway
17506 "mail2news@@replay.com"
17507 (nngateway-header-transformation
17508 nngateway-mail2news-header-transformation)))
17509 @end lisp
17510
17511 So, to use this, simply say something like:
17512
17513 @lisp
17514 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17515 @end lisp
17516
17517
17518
17519 @node Combined Groups
17520 @section Combined Groups
17521
17522 Gnus allows combining a mixture of all the other group types into bigger
17523 groups.
17524
17525 @menu
17526 * Virtual Groups:: Combining articles from many groups.
17527 * Kibozed Groups:: Looking through parts of the newsfeed for articles.
17528 @end menu
17529
17530
17531 @node Virtual Groups
17532 @subsection Virtual Groups
17533 @cindex nnvirtual
17534 @cindex virtual groups
17535 @cindex merging groups
17536
17537 An @dfn{nnvirtual group} is really nothing more than a collection of
17538 other groups.
17539
17540 For instance, if you are tired of reading many small groups, you can
17541 put them all in one big group, and then grow tired of reading one
17542 big, unwieldy group. The joys of computing!
17543
17544 You specify @code{nnvirtual} as the method. The address should be a
17545 regexp to match component groups.
17546
17547 All marks in the virtual group will stick to the articles in the
17548 component groups. So if you tick an article in a virtual group, the
17549 article will also be ticked in the component group from whence it
17550 came. (And vice versa---marks from the component groups will also be
17551 shown in the virtual group.). To create an empty virtual group, run
17552 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17553 and edit the method regexp with @kbd{M-e}
17554 (@code{gnus-group-edit-group-method})
17555
17556 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17557 newsgroups into one, big, happy newsgroup:
17558
17559 @lisp
17560 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17561 @end lisp
17562
17563 The component groups can be native or foreign; everything should work
17564 smoothly, but if your computer explodes, it was probably my fault.
17565
17566 Collecting the same group from several servers might actually be a good
17567 idea if users have set the Distribution header to limit distribution.
17568 If you would like to read @samp{soc.motss} both from a server in Japan
17569 and a server in Norway, you could use the following as the group regexp:
17570
17571 @example
17572 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17573 @end example
17574
17575 (Remember, though, that if you're creating the group with @kbd{G m}, you
17576 shouldn't double the backslashes, and you should leave off the quote
17577 characters at the beginning and the end of the string.)
17578
17579 This should work kinda smoothly---all articles from both groups should
17580 end up in this one, and there should be no duplicates. Threading (and
17581 the rest) will still work as usual, but there might be problems with the
17582 sequence of articles. Sorting on date might be an option here
17583 (@pxref{Selecting a Group}).
17584
17585 One limitation, however---all groups included in a virtual
17586 group have to be alive (i.e., subscribed or unsubscribed). Killed or
17587 zombie groups can't be component groups for @code{nnvirtual} groups.
17588
17589 @vindex nnvirtual-always-rescan
17590 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
17591 is the default), @code{nnvirtual} will always scan groups for unread
17592 articles when entering a virtual group. If this variable is @code{nil}
17593 and you read articles in a component group after the virtual group has
17594 been activated, the read articles from the component group will show up
17595 when you enter the virtual group. You'll also see this effect if you
17596 have two virtual groups that have a component group in common. If
17597 that's the case, you should set this variable to @code{t}. Or you can
17598 just tap @code{M-g} on the virtual group every time before you enter
17599 it---it'll have much the same effect.
17600
17601 @code{nnvirtual} can have both mail and news groups as component groups.
17602 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17603 has to ask the back end of the component group the article comes from
17604 whether it is a news or mail back end. However, when you do a @kbd{^},
17605 there is typically no sure way for the component back end to know this,
17606 and in that case @code{nnvirtual} tells Gnus that the article came from a
17607 not-news back end. (Just to be on the safe side.)
17608
17609 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17610 line from the article you respond to in these cases.
17611
17612 @code{nnvirtual} groups do not inherit anything but articles and marks
17613 from component groups---group parameters, for instance, are not
17614 inherited.
17615
17616
17617 @node Kibozed Groups
17618 @subsection Kibozed Groups
17619 @cindex nnkiboze
17620 @cindex kibozing
17621
17622 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17623 (parts of) the news feed''. @code{nnkiboze} is a back end that will
17624 do this for you. Oh joy! Now you can grind any @acronym{NNTP} server
17625 down to a halt with useless requests! Oh happiness!
17626
17627 @kindex G k (Group)
17628 To create a kibozed group, use the @kbd{G k} command in the group
17629 buffer.
17630
17631 The address field of the @code{nnkiboze} method is, as with
17632 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17633 @code{nnkiboze} group. That's where most similarities between
17634 @code{nnkiboze} and @code{nnvirtual} end.
17635
17636 In addition to this regexp detailing component groups, an
17637 @code{nnkiboze} group must have a score file to say what articles are
17638 to be included in the group (@pxref{Scoring}).
17639
17640 @kindex M-x nnkiboze-generate-groups
17641 @findex nnkiboze-generate-groups
17642 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17643 @code{nnkiboze} groups you want to have. This command will take time.
17644 Lots of time. Oodles and oodles of time. Gnus has to fetch the
17645 headers from all the articles in all the component groups and run them
17646 through the scoring process to determine if there are any articles in
17647 the groups that are to be part of the @code{nnkiboze} groups.
17648
17649 Please limit the number of component groups by using restrictive
17650 regexps. Otherwise your sysadmin may become annoyed with you, and the
17651 @acronym{NNTP} site may throw you off and never let you back in again.
17652 Stranger things have happened.
17653
17654 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17655 and they can be foreign. No restrictions.
17656
17657 @vindex nnkiboze-directory
17658 The generation of an @code{nnkiboze} group means writing two files in
17659 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17660 One contains the @acronym{NOV} header lines for all the articles in
17661 the group, and the other is an additional @file{.newsrc} file to store
17662 information on what groups have been searched through to find
17663 component articles.
17664
17665 Articles marked as read in the @code{nnkiboze} group will have
17666 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17667
17668
17669 @node Gnus Unplugged
17670 @section Gnus Unplugged
17671 @cindex offline
17672 @cindex unplugged
17673 @cindex agent
17674 @cindex Gnus agent
17675 @cindex Gnus unplugged
17676
17677 In olden times (ca. February '88), people used to run their newsreaders
17678 on big machines with permanent connections to the net. News transport
17679 was dealt with by news servers, and all the newsreaders had to do was to
17680 read news. Believe it or not.
17681
17682 Nowadays most people read news and mail at home, and use some sort of
17683 modem to connect to the net. To avoid running up huge phone bills, it
17684 would be nice to have a way to slurp down all the news and mail, hang up
17685 the phone, read for several hours, and then upload any responses you
17686 have to make. And then you repeat the procedure.
17687
17688 Of course, you can use news servers for doing this as well. I've used
17689 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17690 for some years, but doing that's a bore. Moving the news server
17691 functionality up to the newsreader makes sense if you're the only person
17692 reading news on a machine.
17693
17694 Setting up Gnus as an ``offline'' newsreader is quite simple. In
17695 fact, you don't even have to configure anything.
17696
17697 Of course, to use it as such, you have to learn a few new commands.
17698
17699 @menu
17700 * Agent Basics:: How it all is supposed to work.
17701 * Agent Categories:: How to tell the Gnus Agent what to download.
17702 * Agent Commands:: New commands for all the buffers.
17703 * Agent Visuals:: Ways that the agent may effect your summary buffer.
17704 * Agent as Cache:: The Agent is a big cache too.
17705 * Agent Expiry:: How to make old articles go away.
17706 * Agent Regeneration:: How to recover from lost connections and other accidents.
17707 * Agent and IMAP:: How to use the Agent with @acronym{IMAP}.
17708 * Outgoing Messages:: What happens when you post/mail something?
17709 * Agent Variables:: Customizing is fun.
17710 * Example Setup:: An example @file{~/.gnus.el} file for offline people.
17711 * Batching Agents:: How to fetch news from a @code{cron} job.
17712 * Agent Caveats:: What you think it'll do and what it does.
17713 @end menu
17714
17715
17716 @node Agent Basics
17717 @subsection Agent Basics
17718
17719 First, let's get some terminology out of the way.
17720
17721 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17722 connection to the net (and notified the Agent that this is the case).
17723 When the connection to the net is up again (and Gnus knows this), the
17724 Agent is @dfn{plugged}.
17725
17726 The @dfn{local} machine is the one you're running on, and which isn't
17727 connected to the net continuously.
17728
17729 @dfn{Downloading} means fetching things from the net to your local
17730 machine. @dfn{Uploading} is doing the opposite.
17731
17732 You know that Gnus gives you all the opportunity you'd ever want for
17733 shooting yourself in the foot. Some people call it flexibility. Gnus
17734 is also customizable to a great extent, which means that the user has a
17735 say on how Gnus behaves. Other newsreaders might unconditionally shoot
17736 you in your foot, but with Gnus, you have a choice!
17737
17738 Gnus is never really in plugged or unplugged state. Rather, it applies
17739 that state to each server individually. This means that some servers
17740 can be plugged while others can be unplugged. Additionally, some
17741 servers can be ignored by the Agent altogether (which means that
17742 they're kinda like plugged always).
17743
17744 So when you unplug the Agent and then wonder why is Gnus opening a
17745 connection to the Net, the next step to do is to look whether all
17746 servers are agentized. If there is an unagentized server, you found
17747 the culprit.
17748
17749 Another thing is the @dfn{offline} state. Sometimes, servers aren't
17750 reachable. When Gnus notices this, it asks you whether you want the
17751 server to be switched to offline state. If you say yes, then the
17752 server will behave somewhat as if it was unplugged, except that Gnus
17753 will ask you whether you want to switch it back online again.
17754
17755 Let's take a typical Gnus session using the Agent.
17756
17757 @itemize @bullet
17758
17759 @item
17760 @findex gnus-unplugged
17761 You start Gnus with @code{gnus-unplugged}. This brings up the Gnus
17762 Agent in a disconnected state. You can read all the news that you have
17763 already fetched while in this mode.
17764
17765 @item
17766 You then decide to see whether any new news has arrived. You connect
17767 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17768 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17769 as usual. To check for new mail in unplugged mode (@pxref{Mail
17770 Source Specifiers}).
17771
17772 @item
17773 You can then read the new news immediately, or you can download the
17774 news onto your local machine. If you want to do the latter, you press
17775 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17776 all the eligible articles in all the groups. (To let Gnus know which
17777 articles you want to download, @pxref{Agent Categories}).
17778
17779 @item
17780 After fetching the articles, you press @kbd{J j} to make Gnus become
17781 unplugged again, and you shut down the PPP thing (or whatever). And
17782 then you read the news offline.
17783
17784 @item
17785 And then you go to step 2.
17786 @end itemize
17787
17788 Here are some things you should do the first time (or so) that you use
17789 the Agent.
17790
17791 @itemize @bullet
17792
17793 @item
17794 Decide which servers should be covered by the Agent. If you have a mail
17795 back end, it would probably be nonsensical to have it covered by the
17796 Agent. Go to the server buffer (@kbd{^} in the group buffer) and press
17797 @kbd{J a} on the server (or servers) that you wish to have covered by the
17798 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17799 added servers you do not wish to have covered by the Agent. By default,
17800 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17801 @code{gnus-secondary-select-methods} are agentized.
17802
17803 @item
17804 Decide on download policy. It's fairly simple once you decide whether
17805 you are going to use agent categories, topic parameters, and/or group
17806 parameters to implement your policy. If you're new to gnus, it
17807 is probably best to start with a category, @xref{Agent Categories}.
17808
17809 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17810 (@pxref{Agent Categories}) provide for setting a policy that applies
17811 to multiple groups. Which you use is entirely up to you. Topic
17812 parameters do override categories so, if you mix the two, you'll have
17813 to take that into account. If you have a few groups that deviate from
17814 your policy, you can use group parameters (@pxref{Group Parameters}) to
17815 configure them.
17816
17817 @item
17818 Uhm@dots{} that's it.
17819 @end itemize
17820
17821
17822 @node Agent Categories
17823 @subsection Agent Categories
17824
17825 One of the main reasons to integrate the news transport layer into the
17826 newsreader is to allow greater control over what articles to download.
17827 There's not much point in downloading huge amounts of articles, just to
17828 find out that you're not interested in reading any of them. It's better
17829 to be somewhat more conservative in choosing what to download, and then
17830 mark the articles for downloading manually if it should turn out that
17831 you're interested in the articles anyway.
17832
17833 One of the more effective methods for controlling what is to be
17834 downloaded is to create a @dfn{category} and then assign some (or all)
17835 groups to this category. Groups that do not belong in any other
17836 category belong to the @code{default} category. Gnus has its own
17837 buffer for creating and managing categories.
17838
17839 If you prefer, you can also use group parameters (@pxref{Group
17840 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17841 alternative approach to controlling the agent. The only real
17842 difference is that categories are specific to the agent (so there is
17843 less to learn) while group and topic parameters include the kitchen
17844 sink.
17845
17846 Since you can set agent parameters in several different places we have
17847 a rule to decide which source to believe. This rule specifies that
17848 the parameter sources are checked in the following order: group
17849 parameters, topic parameters, agent category, and finally customizable
17850 variables. So you can mix all of these sources to produce a wide range
17851 of behavior, just don't blame me if you don't remember where you put
17852 your settings.
17853
17854 @menu
17855 * Category Syntax:: What a category looks like.
17856 * Category Buffer:: A buffer for maintaining categories.
17857 * Category Variables:: Customize'r'Us.
17858 @end menu
17859
17860
17861 @node Category Syntax
17862 @subsubsection Category Syntax
17863
17864 A category consists of a name, the list of groups belonging to the
17865 category, and a number of optional parameters that override the
17866 customizable variables. The complete list of agent parameters are
17867 listed below.
17868
17869 @cindex Agent Parameters
17870 @table @code
17871 @item gnus-agent-cat-name
17872 The name of the category.
17873
17874 @item gnus-agent-cat-groups
17875 The list of groups that are in this category.
17876
17877 @item gnus-agent-cat-predicate
17878 A predicate which (generally) gives a rough outline of which articles
17879 are eligible for downloading; and
17880
17881 @item gnus-agent-cat-score-file
17882 a score rule which (generally) gives you a finer granularity when
17883 deciding what articles to download. (Note that this @dfn{download
17884 score} is not necessarily related to normal scores.)
17885
17886 @item gnus-agent-cat-enable-expiration
17887 a boolean indicating whether the agent should expire old articles in
17888 this group. Most groups should be expired to conserve disk space. In
17889 fact, its probably safe to say that the gnus.* hierarchy contains the
17890 only groups that should not be expired.
17891
17892 @item gnus-agent-cat-days-until-old
17893 an integer indicating the number of days that the agent should wait
17894 before deciding that a read article is safe to expire.
17895
17896 @item gnus-agent-cat-low-score
17897 an integer that overrides the value of @code{gnus-agent-low-score}.
17898
17899 @item gnus-agent-cat-high-score
17900 an integer that overrides the value of @code{gnus-agent-high-score}.
17901
17902 @item gnus-agent-cat-length-when-short
17903 an integer that overrides the value of
17904 @code{gnus-agent-short-article}.
17905
17906 @item gnus-agent-cat-length-when-long
17907 an integer that overrides the value of @code{gnus-agent-long-article}.
17908
17909 @c @item gnus-agent-cat-disable-undownloaded-faces
17910 @c a symbol indicating whether the summary buffer should @emph{not} display
17911 @c undownloaded articles using the gnus-summary-*-undownloaded-face
17912 @c faces. The symbol nil will enable the use of undownloaded faces while
17913 @c all other symbols disable them.
17914
17915 @item gnus-agent-cat-enable-undownloaded-faces
17916 a symbol indicating whether the summary buffer should display
17917 undownloaded articles using the gnus-summary-*-undownloaded-face
17918 faces. The symbol nil will disable the use of undownloaded faces while
17919 all other symbols enable them.
17920 @end table
17921
17922 The name of a category can not be changed once the category has been
17923 created.
17924
17925 Each category maintains a list of groups that are exclusive members of
17926 that category. The exclusivity rule is automatically enforced, add a
17927 group to a new category and it is automatically removed from its old
17928 category.
17929
17930 A predicate in its simplest form can be a single predicate such as
17931 @code{true} or @code{false}. These two will download every available
17932 article or nothing respectively. In the case of these two special
17933 predicates an additional score rule is superfluous.
17934
17935 Predicates of @code{high} or @code{low} download articles in respect of
17936 their scores in relationship to @code{gnus-agent-high-score} and
17937 @code{gnus-agent-low-score} as described below.
17938
17939 To gain even finer control of what is to be regarded eligible for
17940 download a predicate can consist of a number of predicates with logical
17941 operators sprinkled in between.
17942
17943 Perhaps some examples are in order.
17944
17945 Here's a simple predicate. (It's the default predicate, in fact, used
17946 for all groups that don't belong to any other category.)
17947
17948 @lisp
17949 short
17950 @end lisp
17951
17952 Quite simple, eh? This predicate is true if and only if the article is
17953 short (for some value of ``short'').
17954
17955 Here's a more complex predicate:
17956
17957 @lisp
17958 (or high
17959 (and
17960 (not low)
17961 (not long)))
17962 @end lisp
17963
17964 This means that an article should be downloaded if it has a high score,
17965 or if the score is not low and the article is not long. You get the
17966 drift.
17967
17968 The available logical operators are @code{or}, @code{and} and
17969 @code{not}. (If you prefer, you can use the more ``C''-ish operators
17970 @samp{|}, @code{&} and @code{!} instead.)
17971
17972 The following predicates are pre-defined, but if none of these fit what
17973 you want to do, you can write your own.
17974
17975 When evaluating each of these predicates, the named constant will be
17976 bound to the value determined by calling
17977 @code{gnus-agent-find-parameter} on the appropriate parameter. For
17978 example, gnus-agent-short-article will be bound to
17979 @code{(gnus-agent-find-parameter group 'agent-short-article)}. This
17980 means that you can specify a predicate in your category then tune that
17981 predicate to individual groups.
17982
17983 @table @code
17984 @item short
17985 True iff the article is shorter than @code{gnus-agent-short-article}
17986 lines; default 100.
17987
17988 @item long
17989 True iff the article is longer than @code{gnus-agent-long-article}
17990 lines; default 200.
17991
17992 @item low
17993 True iff the article has a download score less than
17994 @code{gnus-agent-low-score}; default 0.
17995
17996 @item high
17997 True iff the article has a download score greater than
17998 @code{gnus-agent-high-score}; default 0.
17999
18000 @item spam
18001 True iff the Gnus Agent guesses that the article is spam. The
18002 heuristics may change over time, but at present it just computes a
18003 checksum and sees whether articles match.
18004
18005 @item true
18006 Always true.
18007
18008 @item false
18009 Always false.
18010 @end table
18011
18012 If you want to create your own predicate function, here's what you have
18013 to know: The functions are called with no parameters, but the
18014 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
18015 useful values.
18016
18017 For example, you could decide that you don't want to download articles
18018 that were posted more than a certain number of days ago (e.g. posted
18019 more than @code{gnus-agent-expire-days} ago) you might write a function
18020 something along the lines of the following:
18021
18022 @lisp
18023 (defun my-article-old-p ()
18024 "Say whether an article is old."
18025 (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
18026 (- (time-to-days (current-time)) gnus-agent-expire-days)))
18027 @end lisp
18028
18029 with the predicate then defined as:
18030
18031 @lisp
18032 (not my-article-old-p)
18033 @end lisp
18034
18035 or you could append your predicate to the predefined
18036 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
18037 wherever.
18038
18039 @lisp
18040 (require 'gnus-agent)
18041 (setq gnus-category-predicate-alist
18042 (append gnus-category-predicate-alist
18043 '((old . my-article-old-p))))
18044 @end lisp
18045
18046 and simply specify your predicate as:
18047
18048 @lisp
18049 (not old)
18050 @end lisp
18051
18052 If/when using something like the above, be aware that there are many
18053 misconfigured systems/mailers out there and so an article's date is not
18054 always a reliable indication of when it was posted. Hell, some people
18055 just don't give a damn.
18056
18057 The above predicates apply to @emph{all} the groups which belong to the
18058 category. However, if you wish to have a specific predicate for an
18059 individual group within a category, or you're just too lazy to set up a
18060 new category, you can enter a group's individual predicate in its group
18061 parameters like so:
18062
18063 @lisp
18064 (agent-predicate . short)
18065 @end lisp
18066
18067 This is the group/topic parameter equivalent of the agent category default.
18068 Note that when specifying a single word predicate like this, the
18069 @code{agent-predicate} specification must be in dotted pair notation.
18070
18071 The equivalent of the longer example from above would be:
18072
18073 @lisp
18074 (agent-predicate or high (and (not low) (not long)))
18075 @end lisp
18076
18077 The outer parenthesis required in the category specification are not
18078 entered here as, not being in dotted pair notation, the value of the
18079 predicate is assumed to be a list.
18080
18081
18082 Now, the syntax of the download score is the same as the syntax of
18083 normal score files, except that all elements that require actually
18084 seeing the article itself are verboten. This means that only the
18085 following headers can be scored on: @code{Subject}, @code{From},
18086 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
18087 @code{Lines}, and @code{Xref}.
18088
18089 As with predicates, the specification of the @code{download score rule}
18090 to use in respect of a group can be in either the category definition if
18091 it's to be applicable to all groups in therein, or a group's parameters
18092 if it's to be specific to that group.
18093
18094 In both of these places the @code{download score rule} can take one of
18095 three forms:
18096
18097 @enumerate
18098 @item
18099 Score rule
18100
18101 This has the same syntax as a normal Gnus score file except only a
18102 subset of scoring keywords are available as mentioned above.
18103
18104 example:
18105
18106 @itemize @bullet
18107 @item
18108 Category specification
18109
18110 @lisp
18111 (("from"
18112 ("Lars Ingebrigtsen" 1000000 nil s))
18113 ("lines"
18114 (500 -100 nil <)))
18115 @end lisp
18116
18117 @item
18118 Group/Topic Parameter specification
18119
18120 @lisp
18121 (agent-score ("from"
18122 ("Lars Ingebrigtsen" 1000000 nil s))
18123 ("lines"
18124 (500 -100 nil <)))
18125 @end lisp
18126
18127 Again, note the omission of the outermost parenthesis here.
18128 @end itemize
18129
18130 @item
18131 Agent score file
18132
18133 These score files must @emph{only} contain the permitted scoring
18134 keywords stated above.
18135
18136 example:
18137
18138 @itemize @bullet
18139 @item
18140 Category specification
18141
18142 @lisp
18143 ("~/News/agent.SCORE")
18144 @end lisp
18145
18146 or perhaps
18147
18148 @lisp
18149 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
18150 @end lisp
18151
18152 @item
18153 Group Parameter specification
18154
18155 @lisp
18156 (agent-score "~/News/agent.SCORE")
18157 @end lisp
18158
18159 Additional score files can be specified as above. Need I say anything
18160 about parenthesis?
18161 @end itemize
18162
18163 @item
18164 Use @code{normal} score files
18165
18166 If you don't want to maintain two sets of scoring rules for a group, and
18167 your desired @code{downloading} criteria for a group are the same as your
18168 @code{reading} criteria then you can tell the agent to refer to your
18169 @code{normal} score files when deciding what to download.
18170
18171 These directives in either the category definition or a group's
18172 parameters will cause the agent to read in all the applicable score
18173 files for a group, @emph{filtering out} those sections that do not
18174 relate to one of the permitted subset of scoring keywords.
18175
18176 @itemize @bullet
18177 @item
18178 Category Specification
18179
18180 @lisp
18181 file
18182 @end lisp
18183
18184 @item
18185 Group Parameter specification
18186
18187 @lisp
18188 (agent-score . file)
18189 @end lisp
18190 @end itemize
18191 @end enumerate
18192
18193 @node Category Buffer
18194 @subsubsection Category Buffer
18195
18196 You'd normally do all category maintenance from the category buffer.
18197 When you enter it for the first time (with the @kbd{J c} command from
18198 the group buffer), you'll only see the @code{default} category.
18199
18200 The following commands are available in this buffer:
18201
18202 @table @kbd
18203 @item q
18204 @kindex q (Category)
18205 @findex gnus-category-exit
18206 Return to the group buffer (@code{gnus-category-exit}).
18207
18208 @item e
18209 @kindex e (Category)
18210 @findex gnus-category-customize-category
18211 Use a customization buffer to set all of the selected category's
18212 parameters at one time (@code{gnus-category-customize-category}).
18213
18214 @item k
18215 @kindex k (Category)
18216 @findex gnus-category-kill
18217 Kill the current category (@code{gnus-category-kill}).
18218
18219 @item c
18220 @kindex c (Category)
18221 @findex gnus-category-copy
18222 Copy the current category (@code{gnus-category-copy}).
18223
18224 @item a
18225 @kindex a (Category)
18226 @findex gnus-category-add
18227 Add a new category (@code{gnus-category-add}).
18228
18229 @item p
18230 @kindex p (Category)
18231 @findex gnus-category-edit-predicate
18232 Edit the predicate of the current category
18233 (@code{gnus-category-edit-predicate}).
18234
18235 @item g
18236 @kindex g (Category)
18237 @findex gnus-category-edit-groups
18238 Edit the list of groups belonging to the current category
18239 (@code{gnus-category-edit-groups}).
18240
18241 @item s
18242 @kindex s (Category)
18243 @findex gnus-category-edit-score
18244 Edit the download score rule of the current category
18245 (@code{gnus-category-edit-score}).
18246
18247 @item l
18248 @kindex l (Category)
18249 @findex gnus-category-list
18250 List all the categories (@code{gnus-category-list}).
18251 @end table
18252
18253
18254 @node Category Variables
18255 @subsubsection Category Variables
18256
18257 @table @code
18258 @item gnus-category-mode-hook
18259 @vindex gnus-category-mode-hook
18260 Hook run in category buffers.
18261
18262 @item gnus-category-line-format
18263 @vindex gnus-category-line-format
18264 Format of the lines in the category buffer (@pxref{Formatting
18265 Variables}). Valid elements are:
18266
18267 @table @samp
18268 @item c
18269 The name of the category.
18270
18271 @item g
18272 The number of groups in the category.
18273 @end table
18274
18275 @item gnus-category-mode-line-format
18276 @vindex gnus-category-mode-line-format
18277 Format of the category mode line (@pxref{Mode Line Formatting}).
18278
18279 @item gnus-agent-short-article
18280 @vindex gnus-agent-short-article
18281 Articles that have fewer lines than this are short. Default 100.
18282
18283 @item gnus-agent-long-article
18284 @vindex gnus-agent-long-article
18285 Articles that have more lines than this are long. Default 200.
18286
18287 @item gnus-agent-low-score
18288 @vindex gnus-agent-low-score
18289 Articles that have a score lower than this have a low score. Default
18290 0.
18291
18292 @item gnus-agent-high-score
18293 @vindex gnus-agent-high-score
18294 Articles that have a score higher than this have a high score. Default
18295 0.
18296
18297 @item gnus-agent-expire-days
18298 @vindex gnus-agent-expire-days
18299 The number of days that a @samp{read} article must stay in the agent's
18300 local disk before becoming eligible for expiration (While the name is
18301 the same, this doesn't mean expiring the article on the server. It
18302 just means deleting the local copy of the article). What is also
18303 important to understand is that the counter starts with the time the
18304 article was written to the local disk and not the time the article was
18305 read.
18306 Default 7.
18307
18308 @item gnus-agent-enable-expiration
18309 @vindex gnus-agent-enable-expiration
18310 Determines whether articles in a group are, by default, expired or
18311 retained indefinitely. The default is @code{ENABLE} which means that
18312 you'll have to disable expiration when desired. On the other hand,
18313 you could set this to @code{DISABLE}. In that case, you would then
18314 have to enable expiration in selected groups.
18315
18316 @end table
18317
18318
18319 @node Agent Commands
18320 @subsection Agent Commands
18321 @findex gnus-agent-toggle-plugged
18322 @kindex J j (Agent)
18323
18324 All the Gnus Agent commands are on the @kbd{J} submap. The @kbd{J j}
18325 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
18326 toggles the plugged/unplugged state of the Gnus Agent.
18327
18328
18329 @menu
18330 * Group Agent Commands:: Configure groups and fetch their contents.
18331 * Summary Agent Commands:: Manually select then fetch specific articles.
18332 * Server Agent Commands:: Select the servers that are supported by the agent.
18333 @end menu
18334
18335
18336
18337
18338 @node Group Agent Commands
18339 @subsubsection Group Agent Commands
18340
18341 @table @kbd
18342 @item J u
18343 @kindex J u (Agent Group)
18344 @findex gnus-agent-fetch-groups
18345 Fetch all eligible articles in the current group
18346 (@code{gnus-agent-fetch-groups}).
18347
18348 @item J c
18349 @kindex J c (Agent Group)
18350 @findex gnus-enter-category-buffer
18351 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
18352
18353 @item J s
18354 @kindex J s (Agent Group)
18355 @findex gnus-agent-fetch-session
18356 Fetch all eligible articles in all groups
18357 (@code{gnus-agent-fetch-session}).
18358
18359 @item J S
18360 @kindex J S (Agent Group)
18361 @findex gnus-group-send-queue
18362 Send all sendable messages in the queue group
18363 (@code{gnus-group-send-queue}). @xref{Drafts}.
18364
18365 @item J a
18366 @kindex J a (Agent Group)
18367 @findex gnus-agent-add-group
18368 Add the current group to an Agent category
18369 (@code{gnus-agent-add-group}). This command understands the
18370 process/prefix convention (@pxref{Process/Prefix}).
18371
18372 @item J r
18373 @kindex J r (Agent Group)
18374 @findex gnus-agent-remove-group
18375 Remove the current group from its category, if any
18376 (@code{gnus-agent-remove-group}). This command understands the
18377 process/prefix convention (@pxref{Process/Prefix}).
18378
18379 @item J Y
18380 @kindex J Y (Agent Group)
18381 @findex gnus-agent-synchronize-flags
18382 Synchronize flags changed while unplugged with remote server, if any.
18383
18384
18385 @end table
18386
18387
18388 @node Summary Agent Commands
18389 @subsubsection Summary Agent Commands
18390
18391 @table @kbd
18392 @item J #
18393 @kindex J # (Agent Summary)
18394 @findex gnus-agent-mark-article
18395 Mark the article for downloading (@code{gnus-agent-mark-article}).
18396
18397 @item J M-#
18398 @kindex J M-# (Agent Summary)
18399 @findex gnus-agent-unmark-article
18400 Remove the downloading mark from the article
18401 (@code{gnus-agent-unmark-article}).
18402
18403 @cindex %
18404 @item @@
18405 @kindex @@ (Agent Summary)
18406 @findex gnus-agent-toggle-mark
18407 Toggle whether to download the article
18408 (@code{gnus-agent-toggle-mark}). The download mark is @samp{%} by
18409 default.
18410
18411 @item J c
18412 @kindex J c (Agent Summary)
18413 @findex gnus-agent-catchup
18414 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18415
18416 @item J S
18417 @kindex J S (Agent Summary)
18418 @findex gnus-agent-fetch-group
18419 Download all eligible (@pxref{Agent Categories}) articles in this group.
18420 (@code{gnus-agent-fetch-group}).
18421
18422 @item J s
18423 @kindex J s (Agent Summary)
18424 @findex gnus-agent-fetch-series
18425 Download all processable articles in this group.
18426 (@code{gnus-agent-fetch-series}).
18427
18428 @item J u
18429 @kindex J u (Agent Summary)
18430 @findex gnus-agent-summary-fetch-group
18431 Download all downloadable articles in the current group
18432 (@code{gnus-agent-summary-fetch-group}).
18433
18434 @end table
18435
18436
18437 @node Server Agent Commands
18438 @subsubsection Server Agent Commands
18439
18440 @table @kbd
18441 @item J a
18442 @kindex J a (Agent Server)
18443 @findex gnus-agent-add-server
18444 Add the current server to the list of servers covered by the Gnus Agent
18445 (@code{gnus-agent-add-server}).
18446
18447 @item J r
18448 @kindex J r (Agent Server)
18449 @findex gnus-agent-remove-server
18450 Remove the current server from the list of servers covered by the Gnus
18451 Agent (@code{gnus-agent-remove-server}).
18452
18453 @end table
18454
18455
18456 @node Agent Visuals
18457 @subsection Agent Visuals
18458
18459 If you open a summary while unplugged and, Gnus knows from the group's
18460 active range that there are more articles than the headers currently
18461 stored in the Agent, you may see some articles whose subject looks
18462 something like @samp{[Undownloaded article #####]}. These are
18463 placeholders for the missing headers. Aside from setting a mark,
18464 there is not much that can be done with one of these placeholders.
18465 When Gnus finally gets a chance to fetch the group's headers, the
18466 placeholders will automatically be replaced by the actual headers.
18467 You can configure the summary buffer's maneuvering to skip over the
18468 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18469
18470 While it may be obvious to all, the only headers and articles
18471 available while unplugged are those headers and articles that were
18472 fetched into the Agent while previously plugged. To put it another
18473 way, ``If you forget to fetch something while plugged, you might have a
18474 less than satisfying unplugged session''. For this reason, the Agent
18475 adds two visual effects to your summary buffer. These effects display
18476 the download status of each article so that you always know which
18477 articles will be available when unplugged.
18478
18479 The first visual effect is the @samp{%O} spec. If you customize
18480 @code{gnus-summary-line-format} to include this specifier, you will add
18481 a single character field that indicates an article's download status.
18482 Articles that have been fetched into either the Agent or the Cache,
18483 will display @code{gnus-downloaded-mark} (defaults to @samp{+}). All
18484 other articles will display @code{gnus-undownloaded-mark} (defaults to
18485 @samp{-}). If you open a group that has not been agentized, a space
18486 (@samp{ }) will be displayed.
18487
18488 The second visual effect are the undownloaded faces. The faces, there
18489 are three indicating the article's score (low, normal, high), seem to
18490 result in a love/hate response from many Gnus users. The problem is
18491 that the face selection is controlled by a list of condition tests and
18492 face names (See @code{gnus-summary-highlight}). Each condition is
18493 tested in the order in which it appears in the list so early
18494 conditions have precedence over later conditions. All of this means
18495 that, if you tick an undownloaded article, the article will continue
18496 to be displayed in the undownloaded face rather than the ticked face.
18497
18498 If you use the Agent as a cache (to avoid downloading the same article
18499 each time you visit it or to minimize your connection time), the
18500 undownloaded face will probably seem like a good idea. The reason
18501 being that you do all of our work (marking, reading, deleting) with
18502 downloaded articles so the normal faces always appear.
18503
18504 For occasional Agent users, the undownloaded faces may appear to be an
18505 absolutely horrible idea. The issue being that, since most of their
18506 articles have not been fetched into the Agent, most of the normal
18507 faces will be obscured by the undownloaded faces. If this is your
18508 situation, you have two choices available. First, you can completely
18509 disable the undownload faces by customizing
18510 @code{gnus-summary-highlight} to delete the three cons-cells that
18511 refer to the @code{gnus-summary-*-undownloaded-face} faces. Second,
18512 if you prefer to take a more fine-grained approach, you may set the
18513 @code{agent-disable-undownloaded-faces} group parameter to @code{t}.
18514 This parameter, like all other agent parameters, may be set on an
18515 Agent Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18516 Parameters}), or an individual group (@pxref{Group Parameters}).
18517
18518 @node Agent as Cache
18519 @subsection Agent as Cache
18520
18521 When Gnus is plugged, it is not efficient to download headers or
18522 articles from the server again, if they are already stored in the
18523 Agent. So, Gnus normally only downloads headers once, and stores them
18524 in the Agent. These headers are later used when generating the summary
18525 buffer, regardless of whether you are plugged or unplugged. Articles
18526 are not cached in the Agent by default though (that would potentially
18527 consume lots of disk space), but if you have already downloaded an
18528 article into the Agent, Gnus will not download the article from the
18529 server again but use the locally stored copy instead.
18530
18531 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18532 @pxref{Agent Variables}) to always download headers and articles while
18533 plugged. Gnus will almost certainly be slower, but it will be kept
18534 synchronized with the server. That last point probably won't make any
18535 sense if you are using a nntp or nnimap back end.
18536
18537 @node Agent Expiry
18538 @subsection Agent Expiry
18539
18540 @vindex gnus-agent-expire-days
18541 @findex gnus-agent-expire
18542 @kindex M-x gnus-agent-expire
18543 @kindex M-x gnus-agent-expire-group
18544 @findex gnus-agent-expire-group
18545 @cindex agent expiry
18546 @cindex Gnus agent expiry
18547 @cindex expiry
18548
18549 The Agent back end, @code{nnagent}, doesn't handle expiry. Well, at
18550 least it doesn't handle it like other back ends. Instead, there are
18551 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18552 commands that will expire all read articles that are older than
18553 @code{gnus-agent-expire-days} days. They can be run whenever you feel
18554 that you're running out of space. Neither are particularly fast or
18555 efficient, and it's not a particularly good idea to interrupt them (with
18556 @kbd{C-g} or anything else) once you've started one of them.
18557
18558 Note that other functions, e.g. @code{gnus-request-expire-articles},
18559 might run @code{gnus-agent-expire} for you to keep the agent
18560 synchronized with the group.
18561
18562 The agent parameter @code{agent-enable-expiration} may be used to
18563 prevent expiration in selected groups.
18564
18565 @vindex gnus-agent-expire-all
18566 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18567 expiration commands will expire all articles---unread, read, ticked
18568 and dormant. If @code{nil} (which is the default), only read articles
18569 are eligible for expiry, and unread, ticked and dormant articles will
18570 be kept indefinitely.
18571
18572 If you find that some articles eligible for expiry are never expired,
18573 perhaps some Gnus Agent files are corrupted. There's are special
18574 commands, @code{gnus-agent-regenerate} and
18575 @code{gnus-agent-regenerate-group}, to fix possible problems.
18576
18577 @node Agent Regeneration
18578 @subsection Agent Regeneration
18579
18580 @cindex agent regeneration
18581 @cindex Gnus agent regeneration
18582 @cindex regeneration
18583
18584 The local data structures used by @code{nnagent} may become corrupted
18585 due to certain exceptional conditions. When this happens,
18586 @code{nnagent} functionality may degrade or even fail. The solution
18587 to this problem is to repair the local data structures by removing all
18588 internal inconsistencies.
18589
18590 For example, if your connection to your server is lost while
18591 downloaded articles into the agent, the local data structures will not
18592 know about articles successfully downloaded prior to the connection
18593 failure. Running @code{gnus-agent-regenerate} or
18594 @code{gnus-agent-regenerate-group} will update the data structures
18595 such that you don't need to download these articles a second time.
18596
18597 @findex gnus-agent-regenerate
18598 @kindex M-x gnus-agent-regenerate
18599 The command @code{gnus-agent-regenerate} will perform
18600 @code{gnus-agent-regenerate-group} on every agentized group. While
18601 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18602 recommended that you first close all summary buffers.
18603
18604 @findex gnus-agent-regenerate-group
18605 @kindex M-x gnus-agent-regenerate-group
18606 The command @code{gnus-agent-regenerate-group} uses the local copies
18607 of individual articles to repair the local @acronym{NOV}(header) database. It
18608 then updates the internal data structures that document which articles
18609 are stored locally. An optional argument will mark articles in the
18610 agent as unread.
18611
18612 @node Agent and IMAP
18613 @subsection Agent and IMAP
18614
18615 The Agent works with any Gnus back end, including nnimap. However,
18616 since there are some conceptual differences between @acronym{NNTP} and
18617 @acronym{IMAP}, this section (should) provide you with some information to
18618 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18619
18620 The first thing to keep in mind is that all flags (read, ticked, etc)
18621 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18622 case for nntp. Thus Gnus need to remember flag changes when
18623 disconnected, and synchronize these flags when you plug back in.
18624
18625 Gnus keeps track of flag changes when reading nnimap groups under the
18626 Agent. When you plug back in, Gnus will check if you have any changed
18627 any flags and ask if you wish to synchronize these with the server.
18628 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18629
18630 @vindex gnus-agent-synchronize-flags
18631 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18632 never automatically synchronize flags. If it is @code{ask}, which is
18633 the default, the Agent will check if you made any changes and if so
18634 ask if you wish to synchronize these when you re-connect. If it has
18635 any other value, all flags will be synchronized automatically.
18636
18637 If you do not wish to synchronize flags automatically when you
18638 re-connect, you can do it manually with the
18639 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18640 in the group buffer.
18641
18642 Some things are currently not implemented in the Agent that you'd might
18643 expect from a disconnected @acronym{IMAP} client, including:
18644
18645 @itemize @bullet
18646
18647 @item
18648 Copying/moving articles into nnimap groups when unplugged.
18649
18650 @item
18651 Creating/deleting nnimap groups when unplugged.
18652
18653 @end itemize
18654
18655 Technical note: the synchronization algorithm does not work by ``pushing''
18656 all local flags to the server, but rather incrementally update the
18657 server view of flags by changing only those flags that were changed by
18658 the user. Thus, if you set one flag on an article, quit the group and
18659 re-select the group and remove the flag; the flag will be set and
18660 removed from the server when you ``synchronize''. The queued flag
18661 operations can be found in the per-server @code{flags} file in the Agent
18662 directory. It's emptied when you synchronize flags.
18663
18664
18665 @node Outgoing Messages
18666 @subsection Outgoing Messages
18667
18668 When Gnus is unplugged, all outgoing messages (both mail and news) are
18669 stored in the draft group ``queue'' (@pxref{Drafts}). You can view
18670 them there after posting, and edit them at will.
18671
18672 When Gnus is plugged again, you can send the messages either from the
18673 draft group with the special commands available there, or you can use
18674 the @kbd{J S} command in the group buffer to send all the sendable
18675 messages in the draft group.
18676
18677
18678
18679 @node Agent Variables
18680 @subsection Agent Variables
18681
18682 @table @code
18683 @item gnus-agent-directory
18684 @vindex gnus-agent-directory
18685 Where the Gnus Agent will store its files. The default is
18686 @file{~/News/agent/}.
18687
18688 @item gnus-agent-handle-level
18689 @vindex gnus-agent-handle-level
18690 Groups on levels (@pxref{Group Levels}) higher than this variable will
18691 be ignored by the Agent. The default is @code{gnus-level-subscribed},
18692 which means that only subscribed group will be considered by the Agent
18693 by default.
18694
18695 @item gnus-agent-plugged-hook
18696 @vindex gnus-agent-plugged-hook
18697 Hook run when connecting to the network.
18698
18699 @item gnus-agent-unplugged-hook
18700 @vindex gnus-agent-unplugged-hook
18701 Hook run when disconnecting from the network.
18702
18703 @item gnus-agent-fetched-hook
18704 @vindex gnus-agent-fetched-hook
18705 Hook run when finished fetching articles.
18706
18707 @item gnus-agent-cache
18708 @vindex gnus-agent-cache
18709 Variable to control whether use the locally stored @acronym{NOV} and
18710 articles when plugged, e.g. essentially using the Agent as a cache.
18711 The default is non-@code{nil}, which means to use the Agent as a cache.
18712
18713 @item gnus-agent-go-online
18714 @vindex gnus-agent-go-online
18715 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18716 automatically switch offline servers into online status. If it is
18717 @code{ask}, the default, the Agent will ask if you wish to switch
18718 offline servers into online status when you re-connect. If it has any
18719 other value, all offline servers will be automatically switched into
18720 online status.
18721
18722 @item gnus-agent-mark-unread-after-downloaded
18723 @vindex gnus-agent-mark-unread-after-downloaded
18724 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18725 mark articles as unread after downloading. This is usually a safe
18726 thing to do as the newly downloaded article has obviously not been
18727 read. The default is @code{t}.
18728
18729 @item gnus-agent-consider-all-articles
18730 @vindex gnus-agent-consider-all-articles
18731 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18732 agent will let the agent predicate decide whether articles need to be
18733 downloaded or not, for all articles. When @code{nil}, the default,
18734 the agent will only let the predicate decide whether unread articles
18735 are downloaded or not. If you enable this, you may also want to look
18736 into the agent expiry settings (@pxref{Category Variables}), so that
18737 the agent doesn't download articles which the agent will later expire,
18738 over and over again.
18739
18740 @item gnus-agent-max-fetch-size
18741 @vindex gnus-agent-max-fetch-size
18742 The agent fetches articles into a temporary buffer prior to parsing
18743 them into individual files. To avoid exceeding the max. buffer size,
18744 the agent alternates between fetching and parsing until all articles
18745 have been fetched. @code{gnus-agent-max-fetch-size} provides a size
18746 limit to control how often the cycling occurs. A large value improves
18747 performance. A small value minimizes the time lost should the
18748 connection be lost while fetching (You may need to run
18749 @code{gnus-agent-regenerate-group} to update the group's state.
18750 However, all articles parsed prior to loosing the connection will be
18751 available while unplugged). The default is 10M so it is unusual to
18752 see any cycling.
18753
18754 @item gnus-server-unopen-status
18755 @vindex gnus-server-unopen-status
18756 Perhaps not an Agent variable, but closely related to the Agent, this
18757 variable says what will happen if Gnus cannot open a server. If the
18758 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18759 whether to deny the server or whether to unplug the agent. If the
18760 Agent is disabled, Gnus always simply deny the server. Other choices
18761 for this variable include @code{denied} and @code{offline} the latter
18762 is only valid if the Agent is used.
18763
18764 @item gnus-auto-goto-ignores
18765 @vindex gnus-auto-goto-ignores
18766 Another variable that isn't an Agent variable, yet so closely related
18767 that most will look for it here, this variable tells the summary
18768 buffer how to maneuver around undownloaded (only headers stored in the
18769 agent) and unfetched (neither article nor headers stored) articles.
18770
18771 The valid values are @code{nil} (maneuver to any article),
18772 @code{undownloaded} (maneuvering while unplugged ignores articles that
18773 have not been fetched), @code{always-undownloaded} (maneuvering always
18774 ignores articles that have not been fetched), @code{unfetched}
18775 (maneuvering ignores articles whose headers have not been fetched).
18776
18777 @item gnus-agent-auto-agentize-methods
18778 @vindex gnus-agent-auto-agentize-methods
18779 If you have never used the Agent before (or more technically, if
18780 @file{~/News/agent/lib/servers} does not exist), Gnus will
18781 automatically agentize a few servers for you. This variable control
18782 which backends should be auto-agentized. It is typically only useful
18783 to agentize remote backends. The auto-agentizing has the same effect
18784 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
18785 If the file exist, you must manage the servers manually by adding or
18786 removing them, this variable is only applicable the first time you
18787 start Gnus. The default is @samp{(nntp nnimap)}.
18788
18789 @end table
18790
18791
18792 @node Example Setup
18793 @subsection Example Setup
18794
18795 If you don't want to read this manual, and you have a fairly standard
18796 setup, you may be able to use something like the following as your
18797 @file{~/.gnus.el} file to get started.
18798
18799 @lisp
18800 ;;; @r{Define how Gnus is to fetch news. We do this over @acronym{NNTP}}
18801 ;;; @r{from your ISP's server.}
18802 (setq gnus-select-method '(nntp "news.your-isp.com"))
18803
18804 ;;; @r{Define how Gnus is to read your mail. We read mail from}
18805 ;;; @r{your ISP's @acronym{POP} server.}
18806 (setq mail-sources '((pop :server "pop.your-isp.com")))
18807
18808 ;;; @r{Say how Gnus is to store the mail. We use nnml groups.}
18809 (setq gnus-secondary-select-methods '((nnml "")))
18810
18811 ;;; @r{Make Gnus into an offline newsreader.}
18812 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18813 ;;; (setq gnus-agent t) ; @r{Now the default.}
18814 @end lisp
18815
18816 That should be it, basically. Put that in your @file{~/.gnus.el} file,
18817 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18818 gnus}.
18819
18820 If this is the first time you've run Gnus, you will be subscribed
18821 automatically to a few default newsgroups. You'll probably want to
18822 subscribe to more groups, and to do that, you have to query the
18823 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18824 command. This usually takes quite a while, but you only have to do it
18825 once.
18826
18827 After reading and parsing a while, you'll be presented with a list of
18828 groups. Subscribe to the ones you want to read with the @kbd{u}
18829 command. @kbd{l} to make all the killed groups disappear after you've
18830 subscribe to all the groups you want to read. (@kbd{A k} will bring
18831 back all the killed groups.)
18832
18833 You can now read the groups at once, or you can download the articles
18834 with the @kbd{J s} command. And then read the rest of this manual to
18835 find out which of the other gazillion things you want to customize.
18836
18837
18838 @node Batching Agents
18839 @subsection Batching Agents
18840 @findex gnus-agent-batch
18841
18842 Having the Gnus Agent fetch articles (and post whatever messages you've
18843 written) is quite easy once you've gotten things set up properly. The
18844 following shell script will do everything that is necessary:
18845
18846 You can run a complete batch command from the command line with the
18847 following incantation:
18848
18849 @example
18850 #!/bin/sh
18851 emacs -batch -l ~/.emacs -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18852 @end example
18853
18854
18855 @node Agent Caveats
18856 @subsection Agent Caveats
18857
18858 The Gnus Agent doesn't seem to work like most other offline
18859 newsreaders. Here are some common questions that some imaginary people
18860 may ask:
18861
18862 @table @dfn
18863 @item If I read an article while plugged, do they get entered into the Agent?
18864
18865 @strong{No}. If you want this behavior, add
18866 @code{gnus-agent-fetch-selected-article} to
18867 @code{gnus-select-article-hook}.
18868
18869 @item If I read an article while plugged, and the article already exists in
18870 the Agent, will it get downloaded once more?
18871
18872 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18873
18874 @end table
18875
18876 In short, when Gnus is unplugged, it only looks into the locally stored
18877 articles; when it's plugged, it talks to your ISP and may also use the
18878 locally stored articles.
18879
18880
18881 @node Scoring
18882 @chapter Scoring
18883 @cindex scoring
18884
18885 Other people use @dfn{kill files}, but we here at Gnus Towers like
18886 scoring better than killing, so we'd rather switch than fight. They do
18887 something completely different as well, so sit up straight and pay
18888 attention!
18889
18890 @vindex gnus-summary-mark-below
18891 All articles have a default score (@code{gnus-summary-default-score}),
18892 which is 0 by default. This score may be raised or lowered either
18893 interactively or by score files. Articles that have a score lower than
18894 @code{gnus-summary-mark-below} are marked as read.
18895
18896 Gnus will read any @dfn{score files} that apply to the current group
18897 before generating the summary buffer.
18898
18899 There are several commands in the summary buffer that insert score
18900 entries based on the current article. You can, for instance, ask Gnus to
18901 lower or increase the score of all articles with a certain subject.
18902
18903 There are two sorts of scoring entries: Permanent and temporary.
18904 Temporary score entries are self-expiring entries. Any entries that are
18905 temporary and have not been used for, say, a week, will be removed
18906 silently to help keep the sizes of the score files down.
18907
18908 @menu
18909 * Summary Score Commands:: Adding score entries for the current group.
18910 * Group Score Commands:: General score commands.
18911 * Score Variables:: Customize your scoring. (My, what terminology).
18912 * Score File Format:: What a score file may contain.
18913 * Score File Editing:: You can edit score files by hand as well.
18914 * Adaptive Scoring:: Big Sister Gnus knows what you read.
18915 * Home Score File:: How to say where new score entries are to go.
18916 * Followups To Yourself:: Having Gnus notice when people answer you.
18917 * Scoring On Other Headers:: Scoring on non-standard headers.
18918 * Scoring Tips:: How to score effectively.
18919 * Reverse Scoring:: That problem child of old is not problem.
18920 * Global Score Files:: Earth-spanning, ear-splitting score files.
18921 * Kill Files:: They are still here, but they can be ignored.
18922 * Converting Kill Files:: Translating kill files to score files.
18923 * GroupLens:: Getting predictions on what you like to read.
18924 * Advanced Scoring:: Using logical expressions to build score rules.
18925 * Score Decays:: It can be useful to let scores wither away.
18926 @end menu
18927
18928
18929 @node Summary Score Commands
18930 @section Summary Score Commands
18931 @cindex score commands
18932
18933 The score commands that alter score entries do not actually modify real
18934 score files. That would be too inefficient. Gnus maintains a cache of
18935 previously loaded score files, one of which is considered the
18936 @dfn{current score file alist}. The score commands simply insert
18937 entries into this list, and upon group exit, this list is saved.
18938
18939 The current score file is by default the group's local score file, even
18940 if no such score file actually exists. To insert score commands into
18941 some other score file (e.g. @file{all.SCORE}), you must first make this
18942 score file the current one.
18943
18944 General score commands that don't actually change the score file:
18945
18946 @table @kbd
18947
18948 @item V s
18949 @kindex V s (Summary)
18950 @findex gnus-summary-set-score
18951 Set the score of the current article (@code{gnus-summary-set-score}).
18952
18953 @item V S
18954 @kindex V S (Summary)
18955 @findex gnus-summary-current-score
18956 Display the score of the current article
18957 (@code{gnus-summary-current-score}).
18958
18959 @item V t
18960 @kindex V t (Summary)
18961 @findex gnus-score-find-trace
18962 Display all score rules that have been used on the current article
18963 (@code{gnus-score-find-trace}). In the @code{*Score Trace*} buffer, you
18964 may type @kbd{e} to edit score file corresponding to the score rule on
18965 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
18966 score file and edit it.
18967
18968 @item V w
18969 @kindex V w (Summary)
18970 @findex gnus-score-find-favourite-words
18971 List words used in scoring (@code{gnus-score-find-favourite-words}).
18972
18973 @item V R
18974 @kindex V R (Summary)
18975 @findex gnus-summary-rescore
18976 Run the current summary through the scoring process
18977 (@code{gnus-summary-rescore}). This might be useful if you're playing
18978 around with your score files behind Gnus' back and want to see the
18979 effect you're having.
18980
18981 @item V c
18982 @kindex V c (Summary)
18983 @findex gnus-score-change-score-file
18984 Make a different score file the current
18985 (@code{gnus-score-change-score-file}).
18986
18987 @item V e
18988 @kindex V e (Summary)
18989 @findex gnus-score-edit-current-scores
18990 Edit the current score file (@code{gnus-score-edit-current-scores}).
18991 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18992 File Editing}).
18993
18994 @item V f
18995 @kindex V f (Summary)
18996 @findex gnus-score-edit-file
18997 Edit a score file and make this score file the current one
18998 (@code{gnus-score-edit-file}).
18999
19000 @item V F
19001 @kindex V F (Summary)
19002 @findex gnus-score-flush-cache
19003 Flush the score cache (@code{gnus-score-flush-cache}). This is useful
19004 after editing score files.
19005
19006 @item V C
19007 @kindex V C (Summary)
19008 @findex gnus-score-customize
19009 Customize a score file in a visually pleasing manner
19010 (@code{gnus-score-customize}).
19011
19012 @end table
19013
19014 The rest of these commands modify the local score file.
19015
19016 @table @kbd
19017
19018 @item V m
19019 @kindex V m (Summary)
19020 @findex gnus-score-set-mark-below
19021 Prompt for a score, and mark all articles with a score below this as
19022 read (@code{gnus-score-set-mark-below}).
19023
19024 @item V x
19025 @kindex V x (Summary)
19026 @findex gnus-score-set-expunge-below
19027 Prompt for a score, and add a score rule to the current score file to
19028 expunge all articles below this score
19029 (@code{gnus-score-set-expunge-below}).
19030 @end table
19031
19032 The keystrokes for actually making score entries follow a very regular
19033 pattern, so there's no need to list all the commands. (Hundreds of
19034 them.)
19035
19036 @findex gnus-summary-increase-score
19037 @findex gnus-summary-lower-score
19038
19039 @enumerate
19040 @item
19041 The first key is either @kbd{I} (upper case i) for increasing the score
19042 or @kbd{L} for lowering the score.
19043 @item
19044 The second key says what header you want to score on. The following
19045 keys are available:
19046 @table @kbd
19047
19048 @item a
19049 Score on the author name.
19050
19051 @item s
19052 Score on the subject line.
19053
19054 @item x
19055 Score on the @code{Xref} line---i.e., the cross-posting line.
19056
19057 @item r
19058 Score on the @code{References} line.
19059
19060 @item d
19061 Score on the date.
19062
19063 @item l
19064 Score on the number of lines.
19065
19066 @item i
19067 Score on the @code{Message-ID} header.
19068
19069 @item e
19070 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
19071 if your @acronym{NNTP} server tracks additional header data in overviews.
19072
19073 @item f
19074 Score on followups---this matches the author name, and adds scores to
19075 the followups to this author. (Using this key leads to the creation of
19076 @file{ADAPT} files.)
19077
19078 @item b
19079 Score on the body.
19080
19081 @item h
19082 Score on the head.
19083
19084 @item t
19085 Score on thread. (Using this key leads to the creation of @file{ADAPT}
19086 files.)
19087
19088 @end table
19089
19090 @item
19091 The third key is the match type. Which match types are valid depends on
19092 what headers you are scoring on.
19093
19094 @table @code
19095
19096 @item strings
19097
19098 @table @kbd
19099
19100 @item e
19101 Exact matching.
19102
19103 @item s
19104 Substring matching.
19105
19106 @item f
19107 Fuzzy matching (@pxref{Fuzzy Matching}).
19108
19109 @item r
19110 Regexp matching
19111 @end table
19112
19113 @item date
19114 @table @kbd
19115
19116 @item b
19117 Before date.
19118
19119 @item a
19120 After date.
19121
19122 @item n
19123 This date.
19124 @end table
19125
19126 @item number
19127 @table @kbd
19128
19129 @item <
19130 Less than number.
19131
19132 @item =
19133 Equal to number.
19134
19135 @item >
19136 Greater than number.
19137 @end table
19138 @end table
19139
19140 @item
19141 The fourth and usually final key says whether this is a temporary (i.e.,
19142 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
19143 or whether it is to be done immediately, without adding to the score
19144 file.
19145 @table @kbd
19146
19147 @item t
19148 Temporary score entry.
19149
19150 @item p
19151 Permanent score entry.
19152
19153 @item i
19154 Immediately scoring.
19155 @end table
19156
19157 @item
19158 If you are scoring on `e' (extra) headers, you will then be prompted for
19159 the header name on which you wish to score. This must be a header named
19160 in gnus-extra-headers, and @samp{TAB} completion is available.
19161
19162 @end enumerate
19163
19164 So, let's say you want to increase the score on the current author with
19165 exact matching permanently: @kbd{I a e p}. If you want to lower the
19166 score based on the subject line, using substring matching, and make a
19167 temporary score entry: @kbd{L s s t}. Pretty easy.
19168
19169 To make things a bit more complicated, there are shortcuts. If you use
19170 a capital letter on either the second or third keys, Gnus will use
19171 defaults for the remaining one or two keystrokes. The defaults are
19172 ``substring'' and ``temporary''. So @kbd{I A} is the same as @kbd{I a s
19173 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
19174
19175 These functions take both the numerical prefix and the symbolic prefix
19176 (@pxref{Symbolic Prefixes}). A numerical prefix says how much to lower
19177 (or increase) the score of the article. A symbolic prefix of @code{a}
19178 says to use the @file{all.SCORE} file for the command instead of the
19179 current score file.
19180
19181 @vindex gnus-score-mimic-keymap
19182 The @code{gnus-score-mimic-keymap} says whether these commands will
19183 pretend they are keymaps or not.
19184
19185
19186 @node Group Score Commands
19187 @section Group Score Commands
19188 @cindex group score commands
19189
19190 There aren't many of these as yet, I'm afraid.
19191
19192 @table @kbd
19193
19194 @item W f
19195 @kindex W f (Group)
19196 @findex gnus-score-flush-cache
19197 Gnus maintains a cache of score alists to avoid having to reload them
19198 all the time. This command will flush the cache
19199 (@code{gnus-score-flush-cache}).
19200
19201 @end table
19202
19203 You can do scoring from the command line by saying something like:
19204
19205 @findex gnus-batch-score
19206 @cindex batch scoring
19207 @example
19208 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
19209 @end example
19210
19211
19212 @node Score Variables
19213 @section Score Variables
19214 @cindex score variables
19215
19216 @table @code
19217
19218 @item gnus-use-scoring
19219 @vindex gnus-use-scoring
19220 If @code{nil}, Gnus will not check for score files, and will not, in
19221 general, do any score-related work. This is @code{t} by default.
19222
19223 @item gnus-kill-killed
19224 @vindex gnus-kill-killed
19225 If this variable is @code{nil}, Gnus will never apply score files to
19226 articles that have already been through the kill process. While this
19227 may save you lots of time, it also means that if you apply a kill file
19228 to a group, and then change the kill file and want to run it over you
19229 group again to kill more articles, it won't work. You have to set this
19230 variable to @code{t} to do that. (It is @code{t} by default.)
19231
19232 @item gnus-kill-files-directory
19233 @vindex gnus-kill-files-directory
19234 All kill and score files will be stored in this directory, which is
19235 initialized from the @env{SAVEDIR} environment variable by default.
19236 This is @file{~/News/} by default.
19237
19238 @item gnus-score-file-suffix
19239 @vindex gnus-score-file-suffix
19240 Suffix to add to the group name to arrive at the score file name
19241 (@file{SCORE} by default.)
19242
19243 @item gnus-score-uncacheable-files
19244 @vindex gnus-score-uncacheable-files
19245 @cindex score cache
19246 All score files are normally cached to avoid excessive re-loading of
19247 score files. However, if this might make your Emacs grow big and
19248 bloated, so this regexp can be used to weed out score files unlikely
19249 to be needed again. It would be a bad idea to deny caching of
19250 @file{all.SCORE}, while it might be a good idea to not cache
19251 @file{comp.infosystems.www.authoring.misc.ADAPT}. In fact, this
19252 variable is @samp{ADAPT$} by default, so no adaptive score files will
19253 be cached.
19254
19255 @item gnus-save-score
19256 @vindex gnus-save-score
19257 If you have really complicated score files, and do lots of batch
19258 scoring, then you might set this variable to @code{t}. This will make
19259 Gnus save the scores into the @file{.newsrc.eld} file.
19260
19261 If you do not set this to @code{t}, then manual scores (like those set
19262 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
19263 across group visits.
19264
19265 @item gnus-score-interactive-default-score
19266 @vindex gnus-score-interactive-default-score
19267 Score used by all the interactive raise/lower commands to raise/lower
19268 score with. Default is 1000, which may seem excessive, but this is to
19269 ensure that the adaptive scoring scheme gets enough room to play with.
19270 We don't want the small changes from the adaptive scoring to overwrite
19271 manually entered data.
19272
19273 @item gnus-summary-default-score
19274 @vindex gnus-summary-default-score
19275 Default score of an article, which is 0 by default.
19276
19277 @item gnus-summary-expunge-below
19278 @vindex gnus-summary-expunge-below
19279 Don't display the summary lines of articles that have scores lower than
19280 this variable. This is @code{nil} by default, which means that no
19281 articles will be hidden. This variable is local to the summary buffers,
19282 and has to be set from @code{gnus-summary-mode-hook}.
19283
19284 @item gnus-score-over-mark
19285 @vindex gnus-score-over-mark
19286 Mark (in the third column) used for articles with a score over the
19287 default. Default is @samp{+}.
19288
19289 @item gnus-score-below-mark
19290 @vindex gnus-score-below-mark
19291 Mark (in the third column) used for articles with a score below the
19292 default. Default is @samp{-}.
19293
19294 @item gnus-score-find-score-files-function
19295 @vindex gnus-score-find-score-files-function
19296 Function used to find score files for the current group. This function
19297 is called with the name of the group as the argument.
19298
19299 Predefined functions available are:
19300 @table @code
19301
19302 @item gnus-score-find-single
19303 @findex gnus-score-find-single
19304 Only apply the group's own score file.
19305
19306 @item gnus-score-find-bnews
19307 @findex gnus-score-find-bnews
19308 Apply all score files that match, using bnews syntax. This is the
19309 default. If the current group is @samp{gnu.emacs.gnus}, for instance,
19310 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
19311 @file{gnu.all.SCORE} would all apply. In short, the instances of
19312 @samp{all} in the score file names are translated into @samp{.*}, and
19313 then a regexp match is done.
19314
19315 This means that if you have some score entries that you want to apply to
19316 all groups, then you put those entries in the @file{all.SCORE} file.
19317
19318 The score files are applied in a semi-random order, although Gnus will
19319 try to apply the more general score files before the more specific score
19320 files. It does this by looking at the number of elements in the score
19321 file names---discarding the @samp{all} elements.
19322
19323 @item gnus-score-find-hierarchical
19324 @findex gnus-score-find-hierarchical
19325 Apply all score files from all the parent groups. This means that you
19326 can't have score files like @file{all.SCORE}, but you can have
19327 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
19328 server.
19329
19330 @end table
19331 This variable can also be a list of functions. In that case, all
19332 these functions will be called with the group name as argument, and
19333 all the returned lists of score files will be applied. These
19334 functions can also return lists of lists of score alists directly. In
19335 that case, the functions that return these non-file score alists
19336 should probably be placed before the ``real'' score file functions, to
19337 ensure that the last score file returned is the local score file.
19338 Phu.
19339
19340 For example, to do hierarchical scoring but use a non-server-specific
19341 overall score file, you could use the value
19342 @example
19343 (list (lambda (group) ("all.SCORE"))
19344 'gnus-score-find-hierarchical)
19345 @end example
19346
19347 @item gnus-score-expiry-days
19348 @vindex gnus-score-expiry-days
19349 This variable says how many days should pass before an unused score file
19350 entry is expired. If this variable is @code{nil}, no score file entries
19351 are expired. It's 7 by default.
19352
19353 @item gnus-update-score-entry-dates
19354 @vindex gnus-update-score-entry-dates
19355 If this variable is non-@code{nil}, temporary score entries that have
19356 been triggered (matched) will have their dates updated. (This is how Gnus
19357 controls expiry---all non-matched-entries will become too old while
19358 matched entries will stay fresh and young.) However, if you set this
19359 variable to @code{nil}, even matched entries will grow old and will
19360 have to face that oh-so grim reaper.
19361
19362 @item gnus-score-after-write-file-function
19363 @vindex gnus-score-after-write-file-function
19364 Function called with the name of the score file just written.
19365
19366 @item gnus-score-thread-simplify
19367 @vindex gnus-score-thread-simplify
19368 If this variable is non-@code{nil}, article subjects will be
19369 simplified for subject scoring purposes in the same manner as with
19370 threading---according to the current value of
19371 @code{gnus-simplify-subject-functions}. If the scoring entry uses
19372 @code{substring} or @code{exact} matching, the match will also be
19373 simplified in this manner.
19374
19375 @end table
19376
19377
19378 @node Score File Format
19379 @section Score File Format
19380 @cindex score file format
19381
19382 A score file is an @code{emacs-lisp} file that normally contains just a
19383 single form. Casual users are not expected to edit these files;
19384 everything can be changed from the summary buffer.
19385
19386 Anyway, if you'd like to dig into it yourself, here's an example:
19387
19388 @lisp
19389 (("from"
19390 ("Lars Ingebrigtsen" -10000)
19391 ("Per Abrahamsen")
19392 ("larsi\\|lmi" -50000 nil R))
19393 ("subject"
19394 ("Ding is Badd" nil 728373))
19395 ("xref"
19396 ("alt.politics" -1000 728372 s))
19397 ("lines"
19398 (2 -100 nil <))
19399 (mark 0)
19400 (expunge -1000)
19401 (mark-and-expunge -10)
19402 (read-only nil)
19403 (orphan -10)
19404 (adapt t)
19405 (files "/hom/larsi/News/gnu.SCORE")
19406 (exclude-files "all.SCORE")
19407 (local (gnus-newsgroup-auto-expire t)
19408 (gnus-summary-make-false-root empty))
19409 (eval (ding)))
19410 @end lisp
19411
19412 This example demonstrates most score file elements. @xref{Advanced
19413 Scoring}, for a different approach.
19414
19415 Even though this looks much like Lisp code, nothing here is actually
19416 @code{eval}ed. The Lisp reader is used to read this form, though, so it
19417 has to be valid syntactically, if not semantically.
19418
19419 Six keys are supported by this alist:
19420
19421 @table @code
19422
19423 @item STRING
19424 If the key is a string, it is the name of the header to perform the
19425 match on. Scoring can only be performed on these eight headers:
19426 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19427 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}. In addition to
19428 these headers, there are three strings to tell Gnus to fetch the entire
19429 article and do the match on larger parts of the article: @code{Body}
19430 will perform the match on the body of the article, @code{Head} will
19431 perform the match on the head of the article, and @code{All} will
19432 perform the match on the entire article. Note that using any of these
19433 last three keys will slow down group entry @emph{considerably}. The
19434 final ``header'' you can score on is @code{Followup}. These score
19435 entries will result in new score entries being added for all follow-ups
19436 to articles that matches these score entries.
19437
19438 Following this key is an arbitrary number of score entries, where each
19439 score entry has one to four elements.
19440 @enumerate
19441
19442 @item
19443 The first element is the @dfn{match element}. On most headers this will
19444 be a string, but on the Lines and Chars headers, this must be an
19445 integer.
19446
19447 @item
19448 If the second element is present, it should be a number---the @dfn{score
19449 element}. This number should be an integer in the neginf to posinf
19450 interval. This number is added to the score of the article if the match
19451 is successful. If this element is not present, the
19452 @code{gnus-score-interactive-default-score} number will be used
19453 instead. This is 1000 by default.
19454
19455 @item
19456 If the third element is present, it should be a number---the @dfn{date
19457 element}. This date says when the last time this score entry matched,
19458 which provides a mechanism for expiring the score entries. It this
19459 element is not present, the score entry is permanent. The date is
19460 represented by the number of days since December 31, 1 BCE.
19461
19462 @item
19463 If the fourth element is present, it should be a symbol---the @dfn{type
19464 element}. This element specifies what function should be used to see
19465 whether this score entry matches the article. What match types that can
19466 be used depends on what header you wish to perform the match on.
19467 @table @dfn
19468
19469 @item From, Subject, References, Xref, Message-ID
19470 For most header types, there are the @code{r} and @code{R} (regexp), as
19471 well as @code{s} and @code{S} (substring) types, and @code{e} and
19472 @code{E} (exact match), and @code{w} (word match) types. If this
19473 element is not present, Gnus will assume that substring matching should
19474 be used. @code{R}, @code{S}, and @code{E} differ from the others in
19475 that the matches will be done in a case-sensitive manner. All these
19476 one-letter types are really just abbreviations for the @code{regexp},
19477 @code{string}, @code{exact}, and @code{word} types, which you can use
19478 instead, if you feel like.
19479
19480 @item Extra
19481 Just as for the standard string overview headers, if you are using
19482 gnus-extra-headers, you can score on these headers' values. In this
19483 case, there is a 5th element in the score entry, being the name of the
19484 header to be scored. The following entry is useful in your
19485 @file{all.SCORE} file in case of spam attacks from a single origin
19486 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19487 overviews:
19488
19489 @lisp
19490 ("111.222.333.444" -1000 nil s
19491 "NNTP-Posting-Host")
19492 @end lisp
19493
19494 @item Lines, Chars
19495 These two headers use different match types: @code{<}, @code{>},
19496 @code{=}, @code{>=} and @code{<=}.
19497
19498 These predicates are true if
19499
19500 @example
19501 (PREDICATE HEADER MATCH)
19502 @end example
19503
19504 evaluates to non-@code{nil}. For instance, the advanced match
19505 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19506 following form:
19507
19508 @lisp
19509 (< header-value 4)
19510 @end lisp
19511
19512 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19513 the match, we get the score added if the article has less than 4 lines.
19514 (It's easy to get confused and think it's the other way around. But
19515 it's not. I think.)
19516
19517 When matching on @code{Lines}, be careful because some back ends (like
19518 @code{nndir}) do not generate @code{Lines} header, so every article ends
19519 up being marked as having 0 lines. This can lead to strange results if
19520 you happen to lower score of the articles with few lines.
19521
19522 @item Date
19523 For the Date header we have three kinda silly match types:
19524 @code{before}, @code{at} and @code{after}. I can't really imagine this
19525 ever being useful, but, like, it would feel kinda silly not to provide
19526 this function. Just in case. You never know. Better safe than sorry.
19527 Once burnt, twice shy. Don't judge a book by its cover. Never not have
19528 sex on a first date. (I have been told that at least one person, and I
19529 quote, ``found this function indispensable'', however.)
19530
19531 @cindex ISO8601
19532 @cindex date
19533 A more useful match type is @code{regexp}. With it, you can match the
19534 date string using a regular expression. The date is normalized to
19535 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}. If
19536 you want to match all articles that have been posted on April 1st in
19537 every year, you could use @samp{....0401.........} as a match string,
19538 for instance. (Note that the date is kept in its original time zone, so
19539 this will match articles that were posted when it was April 1st where
19540 the article was posted from. Time zones are such wholesome fun for the
19541 whole family, eh?)
19542
19543 @item Head, Body, All
19544 These three match keys use the same match types as the @code{From} (etc)
19545 header uses.
19546
19547 @item Followup
19548 This match key is somewhat special, in that it will match the
19549 @code{From} header, and affect the score of not only the matching
19550 articles, but also all followups to the matching articles. This allows
19551 you e.g. increase the score of followups to your own articles, or
19552 decrease the score of followups to the articles of some known
19553 trouble-maker. Uses the same match types as the @code{From} header
19554 uses. (Using this match key will lead to creation of @file{ADAPT}
19555 files.)
19556
19557 @item Thread
19558 This match key works along the same lines as the @code{Followup} match
19559 key. If you say that you want to score on a (sub-)thread started by an
19560 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19561 match. This will add a new @samp{thread} match for each article that
19562 has @var{x} in its @code{References} header. (These new @samp{thread}
19563 matches will use the @code{Message-ID}s of these matching articles.)
19564 This will ensure that you can raise/lower the score of an entire thread,
19565 even though some articles in the thread may not have complete
19566 @code{References} headers. Note that using this may lead to
19567 undeterministic scores of the articles in the thread. (Using this match
19568 key will lead to creation of @file{ADAPT} files.)
19569 @end table
19570 @end enumerate
19571
19572 @cindex score file atoms
19573 @item mark
19574 The value of this entry should be a number. Any articles with a score
19575 lower than this number will be marked as read.
19576
19577 @item expunge
19578 The value of this entry should be a number. Any articles with a score
19579 lower than this number will be removed from the summary buffer.
19580
19581 @item mark-and-expunge
19582 The value of this entry should be a number. Any articles with a score
19583 lower than this number will be marked as read and removed from the
19584 summary buffer.
19585
19586 @item thread-mark-and-expunge
19587 The value of this entry should be a number. All articles that belong to
19588 a thread that has a total score below this number will be marked as read
19589 and removed from the summary buffer. @code{gnus-thread-score-function}
19590 says how to compute the total score for a thread.
19591
19592 @item files
19593 The value of this entry should be any number of file names. These files
19594 are assumed to be score files as well, and will be loaded the same way
19595 this one was.
19596
19597 @item exclude-files
19598 The clue of this entry should be any number of files. These files will
19599 not be loaded, even though they would normally be so, for some reason or
19600 other.
19601
19602 @item eval
19603 The value of this entry will be @code{eval}el. This element will be
19604 ignored when handling global score files.
19605
19606 @item read-only
19607 Read-only score files will not be updated or saved. Global score files
19608 should feature this atom (@pxref{Global Score Files}). (Note:
19609 @dfn{Global} here really means @dfn{global}; not your personal
19610 apply-to-all-groups score files.)
19611
19612 @item orphan
19613 The value of this entry should be a number. Articles that do not have
19614 parents will get this number added to their scores. Imagine you follow
19615 some high-volume newsgroup, like @samp{comp.lang.c}. Most likely you
19616 will only follow a few of the threads, also want to see any new threads.
19617
19618 You can do this with the following two score file entries:
19619
19620 @example
19621 (orphan -500)
19622 (mark-and-expunge -100)
19623 @end example
19624
19625 When you enter the group the first time, you will only see the new
19626 threads. You then raise the score of the threads that you find
19627 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19628 rest. Next time you enter the group, you will see new articles in the
19629 interesting threads, plus any new threads.
19630
19631 I.e.---the orphan score atom is for high-volume groups where a few
19632 interesting threads which can't be found automatically by ordinary
19633 scoring rules exist.
19634
19635 @item adapt
19636 This entry controls the adaptive scoring. If it is @code{t}, the
19637 default adaptive scoring rules will be used. If it is @code{ignore}, no
19638 adaptive scoring will be performed on this group. If it is a list, this
19639 list will be used as the adaptive scoring rules. If it isn't present,
19640 or is something other than @code{t} or @code{ignore}, the default
19641 adaptive scoring rules will be used. If you want to use adaptive
19642 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19643 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19644 not want adaptive scoring. If you only want adaptive scoring in a few
19645 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19646 insert @code{(adapt t)} in the score files of the groups where you want
19647 it.
19648
19649 @item adapt-file
19650 All adaptive score entries will go to the file named by this entry. It
19651 will also be applied when entering the group. This atom might be handy
19652 if you want to adapt on several groups at once, using the same adaptive
19653 file for a number of groups.
19654
19655 @item local
19656 @cindex local variables
19657 The value of this entry should be a list of @code{(@var{var}
19658 @var{value})} pairs. Each @var{var} will be made buffer-local to the
19659 current summary buffer, and set to the value specified. This is a
19660 convenient, if somewhat strange, way of setting variables in some
19661 groups if you don't like hooks much. Note that the @var{value} won't
19662 be evaluated.
19663 @end table
19664
19665
19666 @node Score File Editing
19667 @section Score File Editing
19668
19669 You normally enter all scoring commands from the summary buffer, but you
19670 might feel the urge to edit them by hand as well, so we've supplied you
19671 with a mode for that.
19672
19673 It's simply a slightly customized @code{emacs-lisp} mode, with these
19674 additional commands:
19675
19676 @table @kbd
19677
19678 @item C-c C-c
19679 @kindex C-c C-c (Score)
19680 @findex gnus-score-edit-done
19681 Save the changes you have made and return to the summary buffer
19682 (@code{gnus-score-edit-done}).
19683
19684 @item C-c C-d
19685 @kindex C-c C-d (Score)
19686 @findex gnus-score-edit-insert-date
19687 Insert the current date in numerical format
19688 (@code{gnus-score-edit-insert-date}). This is really the day number, if
19689 you were wondering.
19690
19691 @item C-c C-p
19692 @kindex C-c C-p (Score)
19693 @findex gnus-score-pretty-print
19694 The adaptive score files are saved in an unformatted fashion. If you
19695 intend to read one of these files, you want to @dfn{pretty print} it
19696 first. This command (@code{gnus-score-pretty-print}) does that for
19697 you.
19698
19699 @end table
19700
19701 Type @kbd{M-x gnus-score-mode} to use this mode.
19702
19703 @vindex gnus-score-mode-hook
19704 @code{gnus-score-menu-hook} is run in score mode buffers.
19705
19706 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
19707 @kbd{V t} to begin editing score files.
19708
19709
19710 @node Adaptive Scoring
19711 @section Adaptive Scoring
19712 @cindex adaptive scoring
19713
19714 If all this scoring is getting you down, Gnus has a way of making it all
19715 happen automatically---as if by magic. Or rather, as if by artificial
19716 stupidity, to be precise.
19717
19718 @vindex gnus-use-adaptive-scoring
19719 When you read an article, or mark an article as read, or kill an
19720 article, you leave marks behind. On exit from the group, Gnus can sniff
19721 these marks and add score elements depending on what marks it finds.
19722 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19723 @code{t} or @code{(line)}. If you want score adaptively on separate
19724 words appearing in the subjects, you should set this variable to
19725 @code{(word)}. If you want to use both adaptive methods, set this
19726 variable to @code{(word line)}.
19727
19728 @vindex gnus-default-adaptive-score-alist
19729 To give you complete control over the scoring process, you can customize
19730 the @code{gnus-default-adaptive-score-alist} variable. For instance, it
19731 might look something like this:
19732
19733 @lisp
19734 (setq gnus-default-adaptive-score-alist
19735 '((gnus-unread-mark)
19736 (gnus-ticked-mark (from 4))
19737 (gnus-dormant-mark (from 5))
19738 (gnus-del-mark (from -4) (subject -1))
19739 (gnus-read-mark (from 4) (subject 2))
19740 (gnus-expirable-mark (from -1) (subject -1))
19741 (gnus-killed-mark (from -1) (subject -3))
19742 (gnus-kill-file-mark)
19743 (gnus-ancient-mark)
19744 (gnus-low-score-mark)
19745 (gnus-catchup-mark (from -1) (subject -1))))
19746 @end lisp
19747
19748 As you see, each element in this alist has a mark as a key (either a
19749 variable name or a ``real'' mark---a character). Following this key is
19750 a arbitrary number of header/score pairs. If there are no header/score
19751 pairs following the key, no adaptive scoring will be done on articles
19752 that have that key as the article mark. For instance, articles with
19753 @code{gnus-unread-mark} in the example above will not get adaptive score
19754 entries.
19755
19756 Each article can have only one mark, so just a single of these rules
19757 will be applied to each article.
19758
19759 To take @code{gnus-del-mark} as an example---this alist says that all
19760 articles that have that mark (i.e., are marked with @samp{e}) will have a
19761 score entry added to lower based on the @code{From} header by -4, and
19762 lowered by @code{Subject} by -1. Change this to fit your prejudices.
19763
19764 If you have marked 10 articles with the same subject with
19765 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19766 That means that that subject will get a score of ten times -1, which
19767 should be, unless I'm much mistaken, -10.
19768
19769 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19770 the read articles will be marked with the @samp{E} mark. This'll
19771 probably make adaptive scoring slightly impossible, so auto-expiring and
19772 adaptive scoring doesn't really mix very well.
19773
19774 The headers you can score on are @code{from}, @code{subject},
19775 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19776 @code{chars} and @code{date}. In addition, you can score on
19777 @code{followup}, which will create an adaptive score entry that matches
19778 on the @code{References} header using the @code{Message-ID} of the
19779 current article, thereby matching the following thread.
19780
19781 If you use this scheme, you should set the score file atom @code{mark}
19782 to something small---like -300, perhaps, to avoid having small random
19783 changes result in articles getting marked as read.
19784
19785 After using adaptive scoring for a week or so, Gnus should start to
19786 become properly trained and enhance the authors you like best, and kill
19787 the authors you like least, without you having to say so explicitly.
19788
19789 You can control what groups the adaptive scoring is to be performed on
19790 by using the score files (@pxref{Score File Format}). This will also
19791 let you use different rules in different groups.
19792
19793 @vindex gnus-adaptive-file-suffix
19794 The adaptive score entries will be put into a file where the name is the
19795 group name with @code{gnus-adaptive-file-suffix} appended. The default
19796 is @file{ADAPT}.
19797
19798 @vindex gnus-score-exact-adapt-limit
19799 When doing adaptive scoring, substring or fuzzy matching would probably
19800 give you the best results in most cases. However, if the header one
19801 matches is short, the possibility for false positives is great, so if
19802 the length of the match is less than
19803 @code{gnus-score-exact-adapt-limit}, exact matching will be used. If
19804 this variable is @code{nil}, exact matching will always be used to avoid
19805 this problem.
19806
19807 @vindex gnus-default-adaptive-word-score-alist
19808 As mentioned above, you can adapt either on individual words or entire
19809 headers. If you adapt on words, the
19810 @code{gnus-default-adaptive-word-score-alist} variable says what score
19811 each instance of a word should add given a mark.
19812
19813 @lisp
19814 (setq gnus-default-adaptive-word-score-alist
19815 `((,gnus-read-mark . 30)
19816 (,gnus-catchup-mark . -10)
19817 (,gnus-killed-mark . -20)
19818 (,gnus-del-mark . -15)))
19819 @end lisp
19820
19821 This is the default value. If you have adaption on words enabled, every
19822 word that appears in subjects of articles marked with
19823 @code{gnus-read-mark} will result in a score rule that increase the
19824 score with 30 points.
19825
19826 @vindex gnus-default-ignored-adaptive-words
19827 @vindex gnus-ignored-adaptive-words
19828 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19829 will be ignored. If you wish to add more words to be ignored, use the
19830 @code{gnus-ignored-adaptive-words} list instead.
19831
19832 @vindex gnus-adaptive-word-length-limit
19833 Some may feel that short words shouldn't count when doing adaptive
19834 scoring. If so, you may set @code{gnus-adaptive-word-length-limit} to
19835 an integer. Words shorter than this number will be ignored. This
19836 variable defaults to @code{nil}.
19837
19838 @vindex gnus-adaptive-word-syntax-table
19839 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19840 syntax table in effect. It is similar to the standard syntax table, but
19841 it considers numbers to be non-word-constituent characters.
19842
19843 @vindex gnus-adaptive-word-minimum
19844 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19845 word scoring process will never bring down the score of an article to
19846 below this number. The default is @code{nil}.
19847
19848 @vindex gnus-adaptive-word-no-group-words
19849 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19850 won't adaptively word score any of the words in the group name. Useful
19851 for groups like @samp{comp.editors.emacs}, where most of the subject
19852 lines contain the word @samp{emacs}.
19853
19854 After using this scheme for a while, it might be nice to write a
19855 @code{gnus-psychoanalyze-user} command to go through the rules and see
19856 what words you like and what words you don't like. Or perhaps not.
19857
19858 Note that the adaptive word scoring thing is highly experimental and is
19859 likely to change in the future. Initial impressions seem to indicate
19860 that it's totally useless as it stands. Some more work (involving more
19861 rigorous statistical methods) will have to be done to make this useful.
19862
19863
19864 @node Home Score File
19865 @section Home Score File
19866
19867 The score file where new score file entries will go is called the
19868 @dfn{home score file}. This is normally (and by default) the score file
19869 for the group itself. For instance, the home score file for
19870 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19871
19872 However, this may not be what you want. It is often convenient to share
19873 a common home score file among many groups---all @samp{emacs} groups
19874 could perhaps use the same home score file.
19875
19876 @vindex gnus-home-score-file
19877 The variable that controls this is @code{gnus-home-score-file}. It can
19878 be:
19879
19880 @enumerate
19881 @item
19882 A string. Then this file will be used as the home score file for all
19883 groups.
19884
19885 @item
19886 A function. The result of this function will be used as the home score
19887 file. The function will be called with the name of the group as the
19888 parameter.
19889
19890 @item
19891 A list. The elements in this list can be:
19892
19893 @enumerate
19894 @item
19895 @code{(@var{regexp} @var{file-name})}. If the @var{regexp} matches the
19896 group name, the @var{file-name} will be used as the home score file.
19897
19898 @item
19899 A function. If the function returns non-@code{nil}, the result will
19900 be used as the home score file. The function will be called with the
19901 name of the group as the parameter.
19902
19903 @item
19904 A string. Use the string as the home score file.
19905 @end enumerate
19906
19907 The list will be traversed from the beginning towards the end looking
19908 for matches.
19909
19910 @end enumerate
19911
19912 So, if you want to use just a single score file, you could say:
19913
19914 @lisp
19915 (setq gnus-home-score-file
19916 "my-total-score-file.SCORE")
19917 @end lisp
19918
19919 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19920 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19921
19922 @findex gnus-hierarchial-home-score-file
19923 @lisp
19924 (setq gnus-home-score-file
19925 'gnus-hierarchial-home-score-file)
19926 @end lisp
19927
19928 This is a ready-made function provided for your convenience.
19929 Other functions include
19930
19931 @table @code
19932 @item gnus-current-home-score-file
19933 @findex gnus-current-home-score-file
19934 Return the ``current'' regular score file. This will make scoring
19935 commands add entry to the ``innermost'' matching score file.
19936
19937 @end table
19938
19939 If you want to have one score file for the @samp{emacs} groups and
19940 another for the @samp{comp} groups, while letting all other groups use
19941 their own home score files:
19942
19943 @lisp
19944 (setq gnus-home-score-file
19945 ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19946 '(("\\.emacs" "emacs.SCORE")
19947 ;; @r{All the comp groups in one score file}
19948 ("^comp" "comp.SCORE")))
19949 @end lisp
19950
19951 @vindex gnus-home-adapt-file
19952 @code{gnus-home-adapt-file} works exactly the same way as
19953 @code{gnus-home-score-file}, but says what the home adaptive score file
19954 is instead. All new adaptive file entries will go into the file
19955 specified by this variable, and the same syntax is allowed.
19956
19957 In addition to using @code{gnus-home-score-file} and
19958 @code{gnus-home-adapt-file}, you can also use group parameters
19959 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19960 Parameters}) to achieve much the same. Group and topic parameters take
19961 precedence over this variable.
19962
19963
19964 @node Followups To Yourself
19965 @section Followups To Yourself
19966
19967 Gnus offers two commands for picking out the @code{Message-ID} header in
19968 the current buffer. Gnus will then add a score rule that scores using
19969 this @code{Message-ID} on the @code{References} header of other
19970 articles. This will, in effect, increase the score of all articles that
19971 respond to the article in the current buffer. Quite useful if you want
19972 to easily note when people answer what you've said.
19973
19974 @table @code
19975
19976 @item gnus-score-followup-article
19977 @findex gnus-score-followup-article
19978 This will add a score to articles that directly follow up your own
19979 article.
19980
19981 @item gnus-score-followup-thread
19982 @findex gnus-score-followup-thread
19983 This will add a score to all articles that appear in a thread ``below''
19984 your own article.
19985 @end table
19986
19987 @vindex message-sent-hook
19988 These two functions are both primarily meant to be used in hooks like
19989 @code{message-sent-hook}, like this:
19990 @lisp
19991 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19992 @end lisp
19993
19994
19995 If you look closely at your own @code{Message-ID}, you'll notice that
19996 the first two or three characters are always the same. Here's two of
19997 mine:
19998
19999 @example
20000 <x6u3u47icf.fsf@@eyesore.no>
20001 <x6sp9o7ibw.fsf@@eyesore.no>
20002 @end example
20003
20004 So ``my'' ident on this machine is @samp{x6}. This can be
20005 exploited---the following rule will raise the score on all followups to
20006 myself:
20007
20008 @lisp
20009 ("references"
20010 ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
20011 1000 nil r))
20012 @end lisp
20013
20014 Whether it's the first two or first three characters that are ``yours''
20015 is system-dependent.
20016
20017
20018 @node Scoring On Other Headers
20019 @section Scoring On Other Headers
20020 @cindex scoring on other headers
20021
20022 Gnus is quite fast when scoring the ``traditional''
20023 headers---@samp{From}, @samp{Subject} and so on. However, scoring
20024 other headers requires writing a @code{head} scoring rule, which means
20025 that Gnus has to request every single article from the back end to find
20026 matches. This takes a long time in big groups.
20027
20028 Now, there's not much you can do about this for news groups, but for
20029 mail groups, you have greater control. In @ref{To From Newsgroups},
20030 it's explained in greater detail what this mechanism does, but here's
20031 a cookbook example for @code{nnml} on how to allow scoring on the
20032 @samp{To} and @samp{Cc} headers.
20033
20034 Put the following in your @file{~/.gnus.el} file.
20035
20036 @lisp
20037 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
20038 nnmail-extra-headers gnus-extra-headers)
20039 @end lisp
20040
20041 Restart Gnus and rebuild your @code{nnml} overview files with the
20042 @kbd{M-x nnml-generate-nov-databases} command. This will take a long
20043 time if you have much mail.
20044
20045 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
20046 so: @kbd{I e s p To RET <your name> RET}.
20047
20048 See? Simple.
20049
20050
20051 @node Scoring Tips
20052 @section Scoring Tips
20053 @cindex scoring tips
20054
20055 @table @dfn
20056
20057 @item Crossposts
20058 @cindex crossposts
20059 @cindex scoring crossposts
20060 If you want to lower the score of crossposts, the line to match on is
20061 the @code{Xref} header.
20062 @lisp
20063 ("xref" (" talk.politics.misc:" -1000))
20064 @end lisp
20065
20066 @item Multiple crossposts
20067 If you want to lower the score of articles that have been crossposted to
20068 more than, say, 3 groups:
20069 @lisp
20070 ("xref"
20071 ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
20072 -1000 nil r))
20073 @end lisp
20074
20075 @item Matching on the body
20076 This is generally not a very good idea---it takes a very long time.
20077 Gnus actually has to fetch each individual article from the server. But
20078 you might want to anyway, I guess. Even though there are three match
20079 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
20080 and stick with it in each score file. If you use any two, each article
20081 will be fetched @emph{twice}. If you want to match a bit on the
20082 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
20083 the matches.
20084
20085 @item Marking as read
20086 You will probably want to mark articles that have scores below a certain
20087 number as read. This is most easily achieved by putting the following
20088 in your @file{all.SCORE} file:
20089 @lisp
20090 ((mark -100))
20091 @end lisp
20092 You may also consider doing something similar with @code{expunge}.
20093
20094 @item Negated character classes
20095 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
20096 That will match newlines, which might lead to, well, The Unknown. Say
20097 @code{[^abcd\n]*} instead.
20098 @end table
20099
20100
20101 @node Reverse Scoring
20102 @section Reverse Scoring
20103 @cindex reverse scoring
20104
20105 If you want to keep just articles that have @samp{Sex with Emacs} in the
20106 subject header, and expunge all other articles, you could put something
20107 like this in your score file:
20108
20109 @lisp
20110 (("subject"
20111 ("Sex with Emacs" 2))
20112 (mark 1)
20113 (expunge 1))
20114 @end lisp
20115
20116 So, you raise all articles that match @samp{Sex with Emacs} and mark the
20117 rest as read, and expunge them to boot.
20118
20119
20120 @node Global Score Files
20121 @section Global Score Files
20122 @cindex global score files
20123
20124 Sure, other newsreaders have ``global kill files''. These are usually
20125 nothing more than a single kill file that applies to all groups, stored
20126 in the user's home directory. Bah! Puny, weak newsreaders!
20127
20128 What I'm talking about here are Global Score Files. Score files from
20129 all over the world, from users everywhere, uniting all nations in one
20130 big, happy score file union! Ange-score! New and untested!
20131
20132 @vindex gnus-global-score-files
20133 All you have to do to use other people's score files is to set the
20134 @code{gnus-global-score-files} variable. One entry for each score file,
20135 or each score file directory. Gnus will decide by itself what score
20136 files are applicable to which group.
20137
20138 To use the score file
20139 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
20140 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
20141 say this:
20142
20143 @lisp
20144 (setq gnus-global-score-files
20145 '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
20146 "/ftp@@ftp.some-where:/pub/score/"))
20147 @end lisp
20148
20149 @findex gnus-score-search-global-directories
20150 @noindent
20151 Simple, eh? Directory names must end with a @samp{/}. These
20152 directories are typically scanned only once during each Gnus session.
20153 If you feel the need to manually re-scan the remote directories, you can
20154 use the @code{gnus-score-search-global-directories} command.
20155
20156 Note that, at present, using this option will slow down group entry
20157 somewhat. (That is---a lot.)
20158
20159 If you want to start maintaining score files for other people to use,
20160 just put your score file up for anonymous ftp and announce it to the
20161 world. Become a retro-moderator! Participate in the retro-moderator
20162 wars sure to ensue, where retro-moderators battle it out for the
20163 sympathy of the people, luring them to use their score files on false
20164 premises! Yay! The net is saved!
20165
20166 Here are some tips for the would-be retro-moderator, off the top of my
20167 head:
20168
20169 @itemize @bullet
20170
20171 @item
20172 Articles heavily crossposted are probably junk.
20173 @item
20174 To lower a single inappropriate article, lower by @code{Message-ID}.
20175 @item
20176 Particularly brilliant authors can be raised on a permanent basis.
20177 @item
20178 Authors that repeatedly post off-charter for the group can safely be
20179 lowered out of existence.
20180 @item
20181 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
20182 articles completely.
20183
20184 @item
20185 Use expiring score entries to keep the size of the file down. You
20186 should probably have a long expiry period, though, as some sites keep
20187 old articles for a long time.
20188 @end itemize
20189
20190 @dots{} I wonder whether other newsreaders will support global score files
20191 in the future. @emph{Snicker}. Yup, any day now, newsreaders like Blue
20192 Wave, xrn and 1stReader are bound to implement scoring. Should we start
20193 holding our breath yet?
20194
20195
20196 @node Kill Files
20197 @section Kill Files
20198 @cindex kill files
20199
20200 Gnus still supports those pesky old kill files. In fact, the kill file
20201 entries can now be expiring, which is something I wrote before Daniel
20202 Quinlan thought of doing score files, so I've left the code in there.
20203
20204 In short, kill processing is a lot slower (and I do mean @emph{a lot})
20205 than score processing, so it might be a good idea to rewrite your kill
20206 files into score files.
20207
20208 Anyway, a kill file is a normal @code{emacs-lisp} file. You can put any
20209 forms into this file, which means that you can use kill files as some
20210 sort of primitive hook function to be run on group entry, even though
20211 that isn't a very good idea.
20212
20213 Normal kill files look like this:
20214
20215 @lisp
20216 (gnus-kill "From" "Lars Ingebrigtsen")
20217 (gnus-kill "Subject" "ding")
20218 (gnus-expunge "X")
20219 @end lisp
20220
20221 This will mark every article written by me as read, and remove the
20222 marked articles from the summary buffer. Very useful, you'll agree.
20223
20224 Other programs use a totally different kill file syntax. If Gnus
20225 encounters what looks like a @code{rn} kill file, it will take a stab at
20226 interpreting it.
20227
20228 Two summary functions for editing a @sc{gnus} kill file:
20229
20230 @table @kbd
20231
20232 @item M-k
20233 @kindex M-k (Summary)
20234 @findex gnus-summary-edit-local-kill
20235 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
20236
20237 @item M-K
20238 @kindex M-K (Summary)
20239 @findex gnus-summary-edit-global-kill
20240 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
20241 @end table
20242
20243 Two group mode functions for editing the kill files:
20244
20245 @table @kbd
20246
20247 @item M-k
20248 @kindex M-k (Group)
20249 @findex gnus-group-edit-local-kill
20250 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
20251
20252 @item M-K
20253 @kindex M-K (Group)
20254 @findex gnus-group-edit-global-kill
20255 Edit the general kill file (@code{gnus-group-edit-global-kill}).
20256 @end table
20257
20258 Kill file variables:
20259
20260 @table @code
20261 @item gnus-kill-file-name
20262 @vindex gnus-kill-file-name
20263 A kill file for the group @samp{soc.motss} is normally called
20264 @file{soc.motss.KILL}. The suffix appended to the group name to get
20265 this file name is detailed by the @code{gnus-kill-file-name} variable.
20266 The ``global'' kill file (not in the score file sense of ``global'', of
20267 course) is just called @file{KILL}.
20268
20269 @vindex gnus-kill-save-kill-file
20270 @item gnus-kill-save-kill-file
20271 If this variable is non-@code{nil}, Gnus will save the
20272 kill file after processing, which is necessary if you use expiring
20273 kills.
20274
20275 @item gnus-apply-kill-hook
20276 @vindex gnus-apply-kill-hook
20277 @findex gnus-apply-kill-file-unless-scored
20278 @findex gnus-apply-kill-file
20279 A hook called to apply kill files to a group. It is
20280 @code{(gnus-apply-kill-file)} by default. If you want to ignore the
20281 kill file if you have a score file for the same group, you can set this
20282 hook to @code{(gnus-apply-kill-file-unless-scored)}. If you don't want
20283 kill files to be processed, you should set this variable to @code{nil}.
20284
20285 @item gnus-kill-file-mode-hook
20286 @vindex gnus-kill-file-mode-hook
20287 A hook called in kill-file mode buffers.
20288
20289 @end table
20290
20291
20292 @node Converting Kill Files
20293 @section Converting Kill Files
20294 @cindex kill files
20295 @cindex converting kill files
20296
20297 If you have loads of old kill files, you may want to convert them into
20298 score files. If they are ``regular'', you can use
20299 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
20300 by hand.
20301
20302 The kill to score conversion package isn't included in Gnus by default.
20303 You can fetch it from
20304 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
20305
20306 If your old kill files are very complex---if they contain more
20307 non-@code{gnus-kill} forms than not, you'll have to convert them by
20308 hand. Or just let them be as they are. Gnus will still use them as
20309 before.
20310
20311
20312 @node GroupLens
20313 @section GroupLens
20314 @cindex GroupLens
20315
20316 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
20317 so this section is mostly of historical interest.
20318
20319 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
20320 collaborative filtering system that helps you work together with other
20321 people to find the quality news articles out of the huge volume of
20322 news articles generated every day.
20323
20324 To accomplish this the GroupLens system combines your opinions about
20325 articles you have already read with the opinions of others who have done
20326 likewise and gives you a personalized prediction for each unread news
20327 article. Think of GroupLens as a matchmaker. GroupLens watches how you
20328 rate articles, and finds other people that rate articles the same way.
20329 Once it has found some people you agree with it tells you, in the form
20330 of a prediction, what they thought of the article. You can use this
20331 prediction to help you decide whether or not you want to read the
20332 article.
20333
20334 @menu
20335 * Using GroupLens:: How to make Gnus use GroupLens.
20336 * Rating Articles:: Letting GroupLens know how you rate articles.
20337 * Displaying Predictions:: Displaying predictions given by GroupLens.
20338 * GroupLens Variables:: Customizing GroupLens.
20339 @end menu
20340
20341
20342 @node Using GroupLens
20343 @subsection Using GroupLens
20344
20345 To use GroupLens you must register a pseudonym with your local
20346 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
20347 Bureau (BBB)} is the only better bit in town at the moment.
20348
20349 Once you have registered you'll need to set a couple of variables.
20350
20351 @table @code
20352
20353 @item gnus-use-grouplens
20354 @vindex gnus-use-grouplens
20355 Setting this variable to a non-@code{nil} value will make Gnus hook into
20356 all the relevant GroupLens functions.
20357
20358 @item grouplens-pseudonym
20359 @vindex grouplens-pseudonym
20360 This variable should be set to the pseudonym you got when registering
20361 with the Better Bit Bureau.
20362
20363 @item grouplens-newsgroups
20364 @vindex grouplens-newsgroups
20365 A list of groups that you want to get GroupLens predictions for.
20366
20367 @end table
20368
20369 That's the minimum of what you need to get up and running with GroupLens.
20370 Once you've registered, GroupLens will start giving you scores for
20371 articles based on the average of what other people think. But, to get
20372 the real benefit of GroupLens you need to start rating articles
20373 yourself. Then the scores GroupLens gives you will be personalized for
20374 you, based on how the people you usually agree with have already rated.
20375
20376
20377 @node Rating Articles
20378 @subsection Rating Articles
20379
20380 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
20381 Where 1 means something like this article is a waste of bandwidth and 5
20382 means that the article was really good. The basic question to ask
20383 yourself is, ``on a scale from 1 to 5 would I like to see more articles
20384 like this one?''
20385
20386 There are four ways to enter a rating for an article in GroupLens.
20387
20388 @table @kbd
20389
20390 @item r
20391 @kindex r (GroupLens)
20392 @findex bbb-summary-rate-article
20393 This function will prompt you for a rating on a scale of one to five.
20394
20395 @item k
20396 @kindex k (GroupLens)
20397 @findex grouplens-score-thread
20398 This function will prompt you for a rating, and rate all the articles in
20399 the thread. This is really useful for some of those long running giant
20400 threads in rec.humor.
20401
20402 @end table
20403
20404 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
20405 the score of the article you're reading.
20406
20407 @table @kbd
20408
20409 @item 1-5 n
20410 @kindex n (GroupLens)
20411 @findex grouplens-next-unread-article
20412 Rate the article and go to the next unread article.
20413
20414 @item 1-5 ,
20415 @kindex , (GroupLens)
20416 @findex grouplens-best-unread-article
20417 Rate the article and go to the next unread article with the highest score.
20418
20419 @end table
20420
20421 If you want to give the current article a score of 4 and then go to the
20422 next article, just type @kbd{4 n}.
20423
20424
20425 @node Displaying Predictions
20426 @subsection Displaying Predictions
20427
20428 GroupLens makes a prediction for you about how much you will like a
20429 news article. The predictions from GroupLens are on a scale from 1 to
20430 5, where 1 is the worst and 5 is the best. You can use the predictions
20431 from GroupLens in one of three ways controlled by the variable
20432 @code{gnus-grouplens-override-scoring}.
20433
20434 @vindex gnus-grouplens-override-scoring
20435 There are three ways to display predictions in grouplens. You may
20436 choose to have the GroupLens scores contribute to, or override the
20437 regular Gnus scoring mechanism. override is the default; however, some
20438 people prefer to see the Gnus scores plus the grouplens scores. To get
20439 the separate scoring behavior you need to set
20440 @code{gnus-grouplens-override-scoring} to @code{'separate}. To have the
20441 GroupLens predictions combined with the grouplens scores set it to
20442 @code{'override} and to combine the scores set
20443 @code{gnus-grouplens-override-scoring} to @code{'combine}. When you use
20444 the combine option you will also want to set the values for
20445 @code{grouplens-prediction-offset} and
20446 @code{grouplens-score-scale-factor}.
20447
20448 @vindex grouplens-prediction-display
20449 In either case, GroupLens gives you a few choices for how you would like
20450 to see your predictions displayed. The display of predictions is
20451 controlled by the @code{grouplens-prediction-display} variable.
20452
20453 The following are valid values for that variable.
20454
20455 @table @code
20456 @item prediction-spot
20457 The higher the prediction, the further to the right an @samp{*} is
20458 displayed.
20459
20460 @item confidence-interval
20461 A numeric confidence interval.
20462
20463 @item prediction-bar
20464 The higher the prediction, the longer the bar.
20465
20466 @item confidence-bar
20467 Numerical confidence.
20468
20469 @item confidence-spot
20470 The spot gets bigger with more confidence.
20471
20472 @item prediction-num
20473 Plain-old numeric value.
20474
20475 @item confidence-plus-minus
20476 Prediction +/- confidence.
20477
20478 @end table
20479
20480
20481 @node GroupLens Variables
20482 @subsection GroupLens Variables
20483
20484 @table @code
20485
20486 @item gnus-summary-grouplens-line-format
20487 The summary line format used in GroupLens-enhanced summary buffers. It
20488 accepts the same specs as the normal summary line format (@pxref{Summary
20489 Buffer Lines}). The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20490 %s\n}.
20491
20492 @item grouplens-bbb-host
20493 Host running the bbbd server. @samp{grouplens.cs.umn.edu} is the
20494 default.
20495
20496 @item grouplens-bbb-port
20497 Port of the host running the bbbd server. The default is 9000.
20498
20499 @item grouplens-score-offset
20500 Offset the prediction by this value. In other words, subtract the
20501 prediction value by this number to arrive at the effective score. The
20502 default is 0.
20503
20504 @item grouplens-score-scale-factor
20505 This variable allows the user to magnify the effect of GroupLens scores.
20506 The scale factor is applied after the offset. The default is 1.
20507
20508 @end table
20509
20510
20511 @node Advanced Scoring
20512 @section Advanced Scoring
20513
20514 Scoring on Subjects and From headers is nice enough, but what if you're
20515 really interested in what a person has to say only when she's talking
20516 about a particular subject? Or what if you really don't want to
20517 read what person A has to say when she's following up to person B, but
20518 want to read what she says when she's following up to person C?
20519
20520 By using advanced scoring rules you may create arbitrarily complex
20521 scoring patterns.
20522
20523 @menu
20524 * Advanced Scoring Syntax:: A definition.
20525 * Advanced Scoring Examples:: What they look like.
20526 * Advanced Scoring Tips:: Getting the most out of it.
20527 @end menu
20528
20529
20530 @node Advanced Scoring Syntax
20531 @subsection Advanced Scoring Syntax
20532
20533 Ordinary scoring rules have a string as the first element in the rule.
20534 Advanced scoring rules have a list as the first element. The second
20535 element is the score to be applied if the first element evaluated to a
20536 non-@code{nil} value.
20537
20538 These lists may consist of three logical operators, one redirection
20539 operator, and various match operators.
20540
20541 Logical operators:
20542
20543 @table @code
20544 @item &
20545 @itemx and
20546 This logical operator will evaluate each of its arguments until it finds
20547 one that evaluates to @code{false}, and then it'll stop. If all arguments
20548 evaluate to @code{true} values, then this operator will return
20549 @code{true}.
20550
20551 @item |
20552 @itemx or
20553 This logical operator will evaluate each of its arguments until it finds
20554 one that evaluates to @code{true}. If no arguments are @code{true},
20555 then this operator will return @code{false}.
20556
20557 @item !
20558 @itemx not
20559 @itemx ¬
20560 This logical operator only takes a single argument. It returns the
20561 logical negation of the value of its argument.
20562
20563 @end table
20564
20565 There is an @dfn{indirection operator} that will make its arguments
20566 apply to the ancestors of the current article being scored. For
20567 instance, @code{1-} will make score rules apply to the parent of the
20568 current article. @code{2-} will make score rules apply to the
20569 grandparent of the current article. Alternatively, you can write
20570 @code{^^}, where the number of @code{^}s (carets) says how far back into
20571 the ancestry you want to go.
20572
20573 Finally, we have the match operators. These are the ones that do the
20574 real work. Match operators are header name strings followed by a match
20575 and a match type. A typical match operator looks like @samp{("from"
20576 "Lars Ingebrigtsen" s)}. The header names are the same as when using
20577 simple scoring, and the match types are also the same.
20578
20579
20580 @node Advanced Scoring Examples
20581 @subsection Advanced Scoring Examples
20582
20583 Please note that the following examples are score file rules. To
20584 make a complete score file from them, surround them with another pair
20585 of parentheses.
20586
20587 Let's say you want to increase the score of articles written by Lars
20588 when he's talking about Gnus:
20589
20590 @example
20591 @group
20592 ((&
20593 ("from" "Lars Ingebrigtsen")
20594 ("subject" "Gnus"))
20595 1000)
20596 @end group
20597 @end example
20598
20599 Quite simple, huh?
20600
20601 When he writes long articles, he sometimes has something nice to say:
20602
20603 @example
20604 ((&
20605 ("from" "Lars Ingebrigtsen")
20606 (|
20607 ("subject" "Gnus")
20608 ("lines" 100 >)))
20609 1000)
20610 @end example
20611
20612 However, when he responds to things written by Reig Eigil Logge, you
20613 really don't want to read what he's written:
20614
20615 @example
20616 ((&
20617 ("from" "Lars Ingebrigtsen")
20618 (1- ("from" "Reig Eigir Logge")))
20619 -100000)
20620 @end example
20621
20622 Everybody that follows up Redmondo when he writes about disappearing
20623 socks should have their scores raised, but only when they talk about
20624 white socks. However, when Lars talks about socks, it's usually not
20625 very interesting:
20626
20627 @example
20628 ((&
20629 (1-
20630 (&
20631 ("from" "redmondo@@.*no" r)
20632 ("body" "disappearing.*socks" t)))
20633 (! ("from" "Lars Ingebrigtsen"))
20634 ("body" "white.*socks"))
20635 1000)
20636 @end example
20637
20638 Suppose you're reading a high volume group and you're only interested
20639 in replies. The plan is to score down all articles that don't have
20640 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
20641 parents of articles that have subjects that begin with reply marks.
20642
20643 @example
20644 ((! ("subject" "re:\\|fwd?:" r))
20645 -200)
20646 ((1- ("subject" "re:\\|fwd?:" r))
20647 200)
20648 @end example
20649
20650 The possibilities are endless.
20651
20652 @node Advanced Scoring Tips
20653 @subsection Advanced Scoring Tips
20654
20655 The @code{&} and @code{|} logical operators do short-circuit logic.
20656 That is, they stop processing their arguments when it's clear what the
20657 result of the operation will be. For instance, if one of the arguments
20658 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20659 the rest of the arguments. This means that you should put slow matches
20660 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20661 @samp{subject}) first.
20662
20663 The indirection arguments (@code{1-} and so on) will make their
20664 arguments work on previous generations of the thread. If you say
20665 something like:
20666
20667 @example
20668 ...
20669 (1-
20670 (1-
20671 ("from" "lars")))
20672 ...
20673 @end example
20674
20675 Then that means ``score on the from header of the grandparent of the
20676 current article''. An indirection is quite fast, but it's better to say:
20677
20678 @example
20679 (1-
20680 (&
20681 ("from" "Lars")
20682 ("subject" "Gnus")))
20683 @end example
20684
20685 than it is to say:
20686
20687 @example
20688 (&
20689 (1- ("from" "Lars"))
20690 (1- ("subject" "Gnus")))
20691 @end example
20692
20693
20694 @node Score Decays
20695 @section Score Decays
20696 @cindex score decays
20697 @cindex decays
20698
20699 You may find that your scores have a tendency to grow without
20700 bounds, especially if you're using adaptive scoring. If scores get too
20701 big, they lose all meaning---they simply max out and it's difficult to
20702 use them in any sensible way.
20703
20704 @vindex gnus-decay-scores
20705 @findex gnus-decay-score
20706 @vindex gnus-decay-score-function
20707 Gnus provides a mechanism for decaying scores to help with this problem.
20708 When score files are loaded and @code{gnus-decay-scores} is
20709 non-@code{nil}, Gnus will run the score files through the decaying
20710 mechanism thereby lowering the scores of all non-permanent score rules.
20711 The decay itself if performed by the @code{gnus-decay-score-function}
20712 function, which is @code{gnus-decay-score} by default. Here's the
20713 definition of that function:
20714
20715 @lisp
20716 (defun gnus-decay-score (score)
20717 "Decay SCORE according to `gnus-score-decay-constant'
20718 and `gnus-score-decay-scale'."
20719 (let ((n (- score
20720 (* (if (< score 0) -1 1)
20721 (min (abs score)
20722 (max gnus-score-decay-constant
20723 (* (abs score)
20724 gnus-score-decay-scale)))))))
20725 (if (and (featurep 'xemacs)
20726 ;; XEmacs' floor can handle only the floating point
20727 ;; number below the half of the maximum integer.
20728 (> (abs n) (lsh -1 -2)))
20729 (string-to-number
20730 (car (split-string (number-to-string n) "\\.")))
20731 (floor n))))
20732 @end lisp
20733
20734 @vindex gnus-score-decay-scale
20735 @vindex gnus-score-decay-constant
20736 @code{gnus-score-decay-constant} is 3 by default and
20737 @code{gnus-score-decay-scale} is 0.05. This should cause the following:
20738
20739 @enumerate
20740 @item
20741 Scores between -3 and 3 will be set to 0 when this function is called.
20742
20743 @item
20744 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20745
20746 @item
20747 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20748 score.
20749 @end enumerate
20750
20751 If you don't like this decay function, write your own. It is called
20752 with the score to be decayed as its only parameter, and it should return
20753 the new score, which should be an integer.
20754
20755 Gnus will try to decay scores once a day. If you haven't run Gnus for
20756 four days, Gnus will decay the scores four times, for instance.
20757
20758 @iftex
20759 @iflatex
20760 @chapter Message
20761 @include message.texi
20762 @chapter Emacs MIME
20763 @include emacs-mime.texi
20764 @chapter Sieve
20765 @include sieve.texi
20766 @chapter PGG
20767 @include pgg.texi
20768 @end iflatex
20769 @end iftex
20770
20771 @node Various
20772 @chapter Various
20773
20774 @menu
20775 * Process/Prefix:: A convention used by many treatment commands.
20776 * Interactive:: Making Gnus ask you many questions.
20777 * Symbolic Prefixes:: How to supply some Gnus functions with options.
20778 * Formatting Variables:: You can specify what buffers should look like.
20779 * Window Layout:: Configuring the Gnus buffer windows.
20780 * Faces and Fonts:: How to change how faces look.
20781 * Compilation:: How to speed Gnus up.
20782 * Mode Lines:: Displaying information in the mode lines.
20783 * Highlighting and Menus:: Making buffers look all nice and cozy.
20784 * Buttons:: Get tendinitis in ten easy steps!
20785 * Daemons:: Gnus can do things behind your back.
20786 * NoCeM:: How to avoid spam and other fatty foods.
20787 * Undo:: Some actions can be undone.
20788 * Predicate Specifiers:: Specifying predicates.
20789 * Moderation:: What to do if you're a moderator.
20790 * Fetching a Group:: Starting Gnus just to read a group.
20791 * Image Enhancements:: Modern versions of Emacs/XEmacs can display images.
20792 * Fuzzy Matching:: What's the big fuzz?
20793 * Thwarting Email Spam:: Simple ways to avoid unsolicited commercial email.
20794 * Spam Package:: A package for filtering and processing spam.
20795 * Other modes:: Interaction with other modes.
20796 * Various Various:: Things that are really various.
20797 @end menu
20798
20799
20800 @node Process/Prefix
20801 @section Process/Prefix
20802 @cindex process/prefix convention
20803
20804 Many functions, among them functions for moving, decoding and saving
20805 articles, use what is known as the @dfn{Process/Prefix convention}.
20806
20807 This is a method for figuring out what articles the user wants the
20808 command to be performed on.
20809
20810 It goes like this:
20811
20812 If the numeric prefix is N, perform the operation on the next N
20813 articles, starting with the current one. If the numeric prefix is
20814 negative, perform the operation on the previous N articles, starting
20815 with the current one.
20816
20817 @vindex transient-mark-mode
20818 If @code{transient-mark-mode} in non-@code{nil} and the region is
20819 active, all articles in the region will be worked upon.
20820
20821 If there is no numeric prefix, but some articles are marked with the
20822 process mark, perform the operation on the articles marked with
20823 the process mark.
20824
20825 If there is neither a numeric prefix nor any articles marked with the
20826 process mark, just perform the operation on the current article.
20827
20828 Quite simple, really, but it needs to be made clear so that surprises
20829 are avoided.
20830
20831 Commands that react to the process mark will push the current list of
20832 process marked articles onto a stack and will then clear all process
20833 marked articles. You can restore the previous configuration with the
20834 @kbd{M P y} command (@pxref{Setting Process Marks}).
20835
20836 @vindex gnus-summary-goto-unread
20837 One thing that seems to shock & horrify lots of people is that, for
20838 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20839 Since each @kbd{d} (which marks the current article as read) by default
20840 goes to the next unread article after marking, this means that @kbd{3 d}
20841 will mark the next three unread articles as read, no matter what the
20842 summary buffer looks like. Set @code{gnus-summary-goto-unread} to
20843 @code{nil} for a more straightforward action.
20844
20845 Many commands do not use the process/prefix convention. All commands
20846 that do explicitly say so in this manual. To apply the process/prefix
20847 convention to commands that do not use it, you can use the @kbd{M-&}
20848 command. For instance, to mark all the articles in the group as
20849 expirable, you could say @kbd{M P b M-& E}.
20850
20851
20852 @node Interactive
20853 @section Interactive
20854 @cindex interaction
20855
20856 @table @code
20857
20858 @item gnus-novice-user
20859 @vindex gnus-novice-user
20860 If this variable is non-@code{nil}, you are either a newcomer to the
20861 World of Usenet, or you are very cautious, which is a nice thing to be,
20862 really. You will be given questions of the type ``Are you sure you want
20863 to do this?'' before doing anything dangerous. This is @code{t} by
20864 default.
20865
20866 @item gnus-expert-user
20867 @vindex gnus-expert-user
20868 If this variable is non-@code{nil}, you will seldom be asked any
20869 questions by Gnus. It will simply assume you know what you're doing, no
20870 matter how strange.
20871
20872 @item gnus-interactive-catchup
20873 @vindex gnus-interactive-catchup
20874 Require confirmation before catching up a group if non-@code{nil}. It
20875 is @code{t} by default.
20876
20877 @item gnus-interactive-exit
20878 @vindex gnus-interactive-exit
20879 Require confirmation before exiting Gnus. This variable is @code{t} by
20880 default.
20881 @end table
20882
20883
20884 @node Symbolic Prefixes
20885 @section Symbolic Prefixes
20886 @cindex symbolic prefixes
20887
20888 Quite a lot of Emacs commands react to the (numeric) prefix. For
20889 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20890 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20891 rule of 900 to the current article.
20892
20893 This is all nice and well, but what if you want to give a command some
20894 additional information? Well, what most commands do is interpret the
20895 ``raw'' prefix in some special way. @kbd{C-u 0 C-x C-s} means that one
20896 doesn't want a backup file to be created when saving the current buffer,
20897 for instance. But what if you want to save without making a backup
20898 file, and you want Emacs to flash lights and play a nice tune at the
20899 same time? You can't, and you're probably perfectly happy that way.
20900
20901 @kindex M-i (Summary)
20902 @findex gnus-symbolic-argument
20903 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}. The
20904 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20905 character typed in is the value. You can stack as many @kbd{M-i}
20906 prefixes as you want. @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20907 command the symbolic prefix @code{a}''. @kbd{M-i a M-i b C-M-u} means
20908 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20909 @code{b}''. You get the drift.
20910
20911 Typing in symbolic prefixes to commands that don't accept them doesn't
20912 hurt, but it doesn't do any good either. Currently not many Gnus
20913 functions make use of the symbolic prefix.
20914
20915 If you're interested in how Gnus implements this, @pxref{Extended
20916 Interactive}.
20917
20918
20919 @node Formatting Variables
20920 @section Formatting Variables
20921 @cindex formatting variables
20922
20923 Throughout this manual you've probably noticed lots of variables called
20924 things like @code{gnus-group-line-format} and
20925 @code{gnus-summary-mode-line-format}. These control how Gnus is to
20926 output lines in the various buffers. There's quite a lot of them.
20927 Fortunately, they all use the same syntax, so there's not that much to
20928 be annoyed by.
20929
20930 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20931 %(%g%)\n}. We see that it is indeed extremely ugly, and that there are
20932 lots of percentages everywhere.
20933
20934 @menu
20935 * Formatting Basics:: A formatting variable is basically a format string.
20936 * Mode Line Formatting:: Some rules about mode line formatting variables.
20937 * Advanced Formatting:: Modifying output in various ways.
20938 * User-Defined Specs:: Having Gnus call your own functions.
20939 * Formatting Fonts:: Making the formatting look colorful and nice.
20940 * Positioning Point:: Moving point to a position after an operation.
20941 * Tabulation:: Tabulating your output.
20942 * Wide Characters:: Dealing with wide characters.
20943 @end menu
20944
20945 Currently Gnus uses the following formatting variables:
20946 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20947 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20948 @code{gnus-group-mode-line-format},
20949 @code{gnus-summary-mode-line-format},
20950 @code{gnus-article-mode-line-format},
20951 @code{gnus-server-mode-line-format}, and
20952 @code{gnus-summary-pick-line-format}.
20953
20954 All these format variables can also be arbitrary elisp forms. In that
20955 case, they will be @code{eval}ed to insert the required lines.
20956
20957 @kindex M-x gnus-update-format
20958 @findex gnus-update-format
20959 Gnus includes a command to help you while creating your own format
20960 specs. @kbd{M-x gnus-update-format} will @code{eval} the current form,
20961 update the spec in question and pop you to a buffer where you can
20962 examine the resulting Lisp code to be run to generate the line.
20963
20964
20965
20966 @node Formatting Basics
20967 @subsection Formatting Basics
20968
20969 Each @samp{%} element will be replaced by some string or other when the
20970 buffer in question is generated. @samp{%5y} means ``insert the @samp{y}
20971 spec, and pad with spaces to get a 5-character field''.
20972
20973 As with normal C and Emacs Lisp formatting strings, the numerical
20974 modifier between the @samp{%} and the formatting type character will
20975 @dfn{pad} the output so that it is always at least that long.
20976 @samp{%5y} will make the field always (at least) five characters wide by
20977 padding with spaces to the left. If you say @samp{%-5y}, it will pad to
20978 the right instead.
20979
20980 You may also wish to limit the length of the field to protect against
20981 particularly wide values. For that you can say @samp{%4,6y}, which
20982 means that the field will never be more than 6 characters wide and never
20983 less than 4 characters wide.
20984
20985 Also Gnus supports some extended format specifications, such as
20986 @samp{%&user-date;}.
20987
20988
20989 @node Mode Line Formatting
20990 @subsection Mode Line Formatting
20991
20992 Mode line formatting variables (e.g.,
20993 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20994 buffer line oriented formatting variables (@pxref{Formatting Basics})
20995 with the following two differences:
20996
20997 @enumerate
20998
20999 @item
21000 There must be no newline (@samp{\n}) at the end.
21001
21002 @item
21003 The special @samp{%%b} spec can be used to display the buffer name.
21004 Well, it's no spec at all, really---@samp{%%} is just a way to quote
21005 @samp{%} to allow it to pass through the formatting machinery unmangled,
21006 so that Emacs receives @samp{%b}, which is something the Emacs mode line
21007 display interprets to mean ``show the buffer name''. For a full list of
21008 mode line specs Emacs understands, see the documentation of the
21009 @code{mode-line-format} variable.
21010
21011 @end enumerate
21012
21013
21014 @node Advanced Formatting
21015 @subsection Advanced Formatting
21016
21017 It is frequently useful to post-process the fields in some way.
21018 Padding, limiting, cutting off parts and suppressing certain values can
21019 be achieved by using @dfn{tilde modifiers}. A typical tilde spec might
21020 look like @samp{%~(cut 3)~(ignore "0")y}.
21021
21022 These are the valid modifiers:
21023
21024 @table @code
21025 @item pad
21026 @itemx pad-left
21027 Pad the field to the left with spaces until it reaches the required
21028 length.
21029
21030 @item pad-right
21031 Pad the field to the right with spaces until it reaches the required
21032 length.
21033
21034 @item max
21035 @itemx max-left
21036 Cut off characters from the left until it reaches the specified length.
21037
21038 @item max-right
21039 Cut off characters from the right until it reaches the specified
21040 length.
21041
21042 @item cut
21043 @itemx cut-left
21044 Cut off the specified number of characters from the left.
21045
21046 @item cut-right
21047 Cut off the specified number of characters from the right.
21048
21049 @item ignore
21050 Return an empty string if the field is equal to the specified value.
21051
21052 @item form
21053 Use the specified form as the field value when the @samp{@@} spec is
21054 used.
21055
21056 Here's an example:
21057
21058 @lisp
21059 "~(form (current-time-string))@@"
21060 @end lisp
21061
21062 @end table
21063
21064 Let's take an example. The @samp{%o} spec in the summary mode lines
21065 will return a date in compact ISO8601 format---@samp{19960809T230410}.
21066 This is quite a mouthful, so we want to shave off the century number and
21067 the time, leaving us with a six-character date. That would be
21068 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}. (Cutting is done before
21069 maxing, and we need the padding to ensure that the date is never less
21070 than 6 characters to make it look nice in columns.)
21071
21072 Ignoring is done first; then cutting; then maxing; and then as the very
21073 last operation, padding.
21074
21075 If you use lots of these advanced thingies, you'll find that Gnus gets
21076 quite slow. This can be helped enormously by running @kbd{M-x
21077 gnus-compile} when you are satisfied with the look of your lines.
21078 @xref{Compilation}.
21079
21080
21081 @node User-Defined Specs
21082 @subsection User-Defined Specs
21083
21084 All the specs allow for inserting user defined specifiers---@samp{u}.
21085 The next character in the format string should be a letter. Gnus
21086 will call the function @code{gnus-user-format-function-}@samp{X}, where
21087 @samp{X} is the letter following @samp{%u}. The function will be passed
21088 a single parameter---what the parameter means depends on what buffer
21089 it's being called from. The function should return a string, which will
21090 be inserted into the buffer just like information from any other
21091 specifier. This function may also be called with dummy values, so it
21092 should protect against that.
21093
21094 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
21095 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
21096
21097 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
21098 much the same without defining new functions. Here's an example:
21099 @samp{%~(form (count-lines (point-min) (point)))@@}. The form
21100 given here will be evaluated to yield the current line number, and then
21101 inserted.
21102
21103
21104 @node Formatting Fonts
21105 @subsection Formatting Fonts
21106
21107 There are specs for highlighting, and these are shared by all the format
21108 variables. Text inside the @samp{%(} and @samp{%)} specifiers will get
21109 the special @code{mouse-face} property set, which means that it will be
21110 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
21111 over it.
21112
21113 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
21114 normal faces set using @code{gnus-face-0}, which is @code{bold} by
21115 default. If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
21116 and so on. Create as many faces as you wish. The same goes for the
21117 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
21118 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
21119
21120 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
21121 special @code{balloon-help} property set to
21122 @code{gnus-balloon-face-0}. If you say @samp{%1<<}, you'll get
21123 @code{gnus-balloon-face-1} and so on. The @code{gnus-balloon-face-*}
21124 variables should be either strings or symbols naming functions that
21125 return a string. When the mouse passes over text with this property
21126 set, a balloon window will appear and display the string. Please
21127 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
21128 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
21129 XEmacs) for more information on this. (For technical reasons, the
21130 guillemets have been approximated as @samp{<<} and @samp{>>} in this
21131 paragraph.)
21132
21133 Here's an alternative recipe for the group buffer:
21134
21135 @lisp
21136 ;; @r{Create three face types.}
21137 (setq gnus-face-1 'bold)
21138 (setq gnus-face-3 'italic)
21139
21140 ;; @r{We want the article count to be in}
21141 ;; @r{a bold and green face. So we create}
21142 ;; @r{a new face called @code{my-green-bold}.}
21143 (copy-face 'bold 'my-green-bold)
21144 ;; @r{Set the color.}
21145 (set-face-foreground 'my-green-bold "ForestGreen")
21146 (setq gnus-face-2 'my-green-bold)
21147
21148 ;; @r{Set the new & fancy format.}
21149 (setq gnus-group-line-format
21150 "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
21151 @end lisp
21152
21153 I'm sure you'll be able to use this scheme to create totally unreadable
21154 and extremely vulgar displays. Have fun!
21155
21156 Note that the @samp{%(} specs (and friends) do not make any sense on the
21157 mode-line variables.
21158
21159 @node Positioning Point
21160 @subsection Positioning Point
21161
21162 Gnus usually moves point to a pre-defined place on each line in most
21163 buffers. By default, point move to the first colon character on the
21164 line. You can customize this behavior in three different ways.
21165
21166 You can move the colon character to somewhere else on the line.
21167
21168 @findex gnus-goto-colon
21169 You can redefine the function that moves the point to the colon. The
21170 function is called @code{gnus-goto-colon}.
21171
21172 But perhaps the most convenient way to deal with this, if you don't want
21173 to have a colon in your line, is to use the @samp{%*} specifier. If you
21174 put a @samp{%*} somewhere in your format line definition, Gnus will
21175 place point there.
21176
21177
21178 @node Tabulation
21179 @subsection Tabulation
21180
21181 You can usually line up your displays by padding and cutting your
21182 strings. However, when combining various strings of different size, it
21183 can often be more convenient to just output the strings, and then worry
21184 about lining up the following text afterwards.
21185
21186 To do that, Gnus supplies tabulator specs---@samp{%=}. There are two
21187 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
21188
21189 @samp{%50=} will insert space characters to pad the line up to column
21190 50. If the text is already past column 50, nothing will be inserted.
21191 This is the soft tabulator.
21192
21193 @samp{%-50=} will insert space characters to pad the line up to column
21194 50. If the text is already past column 50, the excess text past column
21195 50 will be removed. This is the hard tabulator.
21196
21197
21198 @node Wide Characters
21199 @subsection Wide Characters
21200
21201 Fixed width fonts in most countries have characters of the same width.
21202 Some countries, however, use Latin characters mixed with wider
21203 characters---most notable East Asian countries.
21204
21205 The problem is that when formatting, Gnus assumes that if a string is 10
21206 characters wide, it'll be 10 Latin characters wide on the screen. In
21207 these countries, that's not true.
21208
21209 @vindex gnus-use-correct-string-widths
21210 To help fix this, you can set @code{gnus-use-correct-string-widths} to
21211 @code{t}. This makes buffer generation slower, but the results will be
21212 prettier. The default value under XEmacs is @code{t} but @code{nil}
21213 for Emacs.
21214
21215
21216 @node Window Layout
21217 @section Window Layout
21218 @cindex window layout
21219
21220 No, there's nothing here about X, so be quiet.
21221
21222 @vindex gnus-use-full-window
21223 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
21224 other windows and occupy the entire Emacs screen by itself. It is
21225 @code{t} by default.
21226
21227 Setting this variable to @code{nil} kinda works, but there are
21228 glitches. Use at your own peril.
21229
21230 @vindex gnus-buffer-configuration
21231 @code{gnus-buffer-configuration} describes how much space each Gnus
21232 buffer should be given. Here's an excerpt of this variable:
21233
21234 @lisp
21235 ((group (vertical 1.0 (group 1.0 point)
21236 (if gnus-carpal (group-carpal 4))))
21237 (article (vertical 1.0 (summary 0.25 point)
21238 (article 1.0))))
21239 @end lisp
21240
21241 This is an alist. The @dfn{key} is a symbol that names some action or
21242 other. For instance, when displaying the group buffer, the window
21243 configuration function will use @code{group} as the key. A full list of
21244 possible names is listed below.
21245
21246 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
21247 should occupy. To take the @code{article} split as an example -
21248
21249 @lisp
21250 (article (vertical 1.0 (summary 0.25 point)
21251 (article 1.0)))
21252 @end lisp
21253
21254 This @dfn{split} says that the summary buffer should occupy 25% of upper
21255 half of the screen, and that it is placed over the article buffer. As
21256 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
21257 reaching for that calculator there). However, the special number
21258 @code{1.0} is used to signal that this buffer should soak up all the
21259 rest of the space available after the rest of the buffers have taken
21260 whatever they need. There should be only one buffer with the @code{1.0}
21261 size spec per split.
21262
21263 Point will be put in the buffer that has the optional third element
21264 @code{point}. In a @code{frame} split, the last subsplit having a leaf
21265 split where the tag @code{frame-focus} is a member (i.e. is the third or
21266 fourth element in the list, depending on whether the @code{point} tag is
21267 present) gets focus.
21268
21269 Here's a more complicated example:
21270
21271 @lisp
21272 (article (vertical 1.0 (group 4)
21273 (summary 0.25 point)
21274 (if gnus-carpal (summary-carpal 4))
21275 (article 1.0)))
21276 @end lisp
21277
21278 If the size spec is an integer instead of a floating point number,
21279 then that number will be used to say how many lines a buffer should
21280 occupy, not a percentage.
21281
21282 If the @dfn{split} looks like something that can be @code{eval}ed (to be
21283 precise---if the @code{car} of the split is a function or a subr), this
21284 split will be @code{eval}ed. If the result is non-@code{nil}, it will
21285 be used as a split. This means that there will be three buffers if
21286 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
21287 is non-@code{nil}.
21288
21289 Not complicated enough for you? Well, try this on for size:
21290
21291 @lisp
21292 (article (horizontal 1.0
21293 (vertical 0.5
21294 (group 1.0)
21295 (gnus-carpal 4))
21296 (vertical 1.0
21297 (summary 0.25 point)
21298 (summary-carpal 4)
21299 (article 1.0))))
21300 @end lisp
21301
21302 Whoops. Two buffers with the mystery 100% tag. And what's that
21303 @code{horizontal} thingie?
21304
21305 If the first element in one of the split is @code{horizontal}, Gnus will
21306 split the window horizontally, giving you two windows side-by-side.
21307 Inside each of these strips you may carry on all you like in the normal
21308 fashion. The number following @code{horizontal} says what percentage of
21309 the screen is to be given to this strip.
21310
21311 For each split, there @emph{must} be one element that has the 100% tag.
21312 The splitting is never accurate, and this buffer will eat any leftover
21313 lines from the splits.
21314
21315 To be slightly more formal, here's a definition of what a valid split
21316 may look like:
21317
21318 @example
21319 @group
21320 split = frame | horizontal | vertical | buffer | form
21321 frame = "(frame " size *split ")"
21322 horizontal = "(horizontal " size *split ")"
21323 vertical = "(vertical " size *split ")"
21324 buffer = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
21325 size = number | frame-params
21326 buf-name = group | article | summary ...
21327 @end group
21328 @end example
21329
21330 The limitations are that the @code{frame} split can only appear as the
21331 top-level split. @var{form} should be an Emacs Lisp form that should
21332 return a valid split. We see that each split is fully recursive, and
21333 may contain any number of @code{vertical} and @code{horizontal} splits.
21334
21335 @vindex gnus-window-min-width
21336 @vindex gnus-window-min-height
21337 @cindex window height
21338 @cindex window width
21339 Finding the right sizes can be a bit complicated. No window may be less
21340 than @code{gnus-window-min-height} (default 1) characters high, and all
21341 windows must be at least @code{gnus-window-min-width} (default 1)
21342 characters wide. Gnus will try to enforce this before applying the
21343 splits. If you want to use the normal Emacs window width/height limit,
21344 you can just set these two variables to @code{nil}.
21345
21346 If you're not familiar with Emacs terminology, @code{horizontal} and
21347 @code{vertical} splits may work the opposite way of what you'd expect.
21348 Windows inside a @code{horizontal} split are shown side-by-side, and
21349 windows within a @code{vertical} split are shown above each other.
21350
21351 @findex gnus-configure-frame
21352 If you want to experiment with window placement, a good tip is to call
21353 @code{gnus-configure-frame} directly with a split. This is the function
21354 that does all the real work when splitting buffers. Below is a pretty
21355 nonsensical configuration with 5 windows; two for the group buffer and
21356 three for the article buffer. (I said it was nonsensical.) If you
21357 @code{eval} the statement below, you can get an idea of how that would
21358 look straight away, without going through the normal Gnus channels.
21359 Play with it until you're satisfied, and then use
21360 @code{gnus-add-configuration} to add your new creation to the buffer
21361 configuration list.
21362
21363 @lisp
21364 (gnus-configure-frame
21365 '(horizontal 1.0
21366 (vertical 10
21367 (group 1.0)
21368 (article 0.3 point))
21369 (vertical 1.0
21370 (article 1.0)
21371 (horizontal 4
21372 (group 1.0)
21373 (article 10)))))
21374 @end lisp
21375
21376 You might want to have several frames as well. No prob---just use the
21377 @code{frame} split:
21378
21379 @lisp
21380 (gnus-configure-frame
21381 '(frame 1.0
21382 (vertical 1.0
21383 (summary 0.25 point frame-focus)
21384 (article 1.0))
21385 (vertical ((height . 5) (width . 15)
21386 (user-position . t)
21387 (left . -1) (top . 1))
21388 (picon 1.0))))
21389
21390 @end lisp
21391
21392 This split will result in the familiar summary/article window
21393 configuration in the first (or ``main'') frame, while a small additional
21394 frame will be created where picons will be shown. As you can see,
21395 instead of the normal @code{1.0} top-level spec, each additional split
21396 should have a frame parameter alist as the size spec.
21397 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
21398 Reference Manual}. Under XEmacs, a frame property list will be
21399 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
21400 is such a plist.
21401 The list of all possible keys for @code{gnus-buffer-configuration} can
21402 be found in its default value.
21403
21404 Note that the @code{message} key is used for both
21405 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}. If
21406 it is desirable to distinguish between the two, something like this
21407 might be used:
21408
21409 @lisp
21410 (message (horizontal 1.0
21411 (vertical 1.0 (message 1.0 point))
21412 (vertical 0.24
21413 (if (buffer-live-p gnus-summary-buffer)
21414 '(summary 0.5))
21415 (group 1.0))))
21416 @end lisp
21417
21418 One common desire for a multiple frame split is to have a separate frame
21419 for composing mail and news while leaving the original frame intact. To
21420 accomplish that, something like the following can be done:
21421
21422 @lisp
21423 (message
21424 (frame 1.0
21425 (if (not (buffer-live-p gnus-summary-buffer))
21426 (car (cdr (assoc 'group gnus-buffer-configuration)))
21427 (car (cdr (assoc 'summary gnus-buffer-configuration))))
21428 (vertical ((user-position . t) (top . 1) (left . 1)
21429 (name . "Message"))
21430 (message 1.0 point))))
21431 @end lisp
21432
21433 @findex gnus-add-configuration
21434 Since the @code{gnus-buffer-configuration} variable is so long and
21435 complicated, there's a function you can use to ease changing the config
21436 of a single setting: @code{gnus-add-configuration}. If, for instance,
21437 you want to change the @code{article} setting, you could say:
21438
21439 @lisp
21440 (gnus-add-configuration
21441 '(article (vertical 1.0
21442 (group 4)
21443 (summary .25 point)
21444 (article 1.0))))
21445 @end lisp
21446
21447 You'd typically stick these @code{gnus-add-configuration} calls in your
21448 @file{~/.gnus.el} file or in some startup hook---they should be run after
21449 Gnus has been loaded.
21450
21451 @vindex gnus-always-force-window-configuration
21452 If all windows mentioned in the configuration are already visible, Gnus
21453 won't change the window configuration. If you always want to force the
21454 ``right'' window configuration, you can set
21455 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21456
21457 If you're using tree displays (@pxref{Tree Display}), and the tree
21458 window is displayed vertically next to another window, you may also want
21459 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21460 windows resized.
21461
21462 @subsection Example Window Configurations
21463
21464 @itemize @bullet
21465 @item
21466 Narrow left hand side occupied by group buffer. Right hand side split
21467 between summary buffer (top one-sixth) and article buffer (bottom).
21468
21469 @ifinfo
21470 @example
21471 +---+---------+
21472 | G | Summary |
21473 | r +---------+
21474 | o | |
21475 | u | Article |
21476 | p | |
21477 +---+---------+
21478 @end example
21479 @end ifinfo
21480
21481 @lisp
21482 (gnus-add-configuration
21483 '(article
21484 (horizontal 1.0
21485 (vertical 25 (group 1.0))
21486 (vertical 1.0
21487 (summary 0.16 point)
21488 (article 1.0)))))
21489
21490 (gnus-add-configuration
21491 '(summary
21492 (horizontal 1.0
21493 (vertical 25 (group 1.0))
21494 (vertical 1.0 (summary 1.0 point)))))
21495 @end lisp
21496
21497 @end itemize
21498
21499
21500 @node Faces and Fonts
21501 @section Faces and Fonts
21502 @cindex faces
21503 @cindex fonts
21504 @cindex colors
21505
21506 Fiddling with fonts and faces used to be very difficult, but these days
21507 it is very simple. You simply say @kbd{M-x customize-face}, pick out
21508 the face you want to alter, and alter it via the standard Customize
21509 interface.
21510
21511
21512 @node Compilation
21513 @section Compilation
21514 @cindex compilation
21515 @cindex byte-compilation
21516
21517 @findex gnus-compile
21518
21519 Remember all those line format specification variables?
21520 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21521 on. Now, Gnus will of course heed whatever these variables are, but,
21522 unfortunately, changing them will mean a quite significant slow-down.
21523 (The default values of these variables have byte-compiled functions
21524 associated with them, while the user-generated versions do not, of
21525 course.)
21526
21527 To help with this, you can run @kbd{M-x gnus-compile} after you've
21528 fiddled around with the variables and feel that you're (kind of)
21529 satisfied. This will result in the new specs being byte-compiled, and
21530 you'll get top speed again. Gnus will save these compiled specs in the
21531 @file{.newsrc.eld} file. (User-defined functions aren't compiled by
21532 this function, though---you should compile them yourself by sticking
21533 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21534
21535
21536 @node Mode Lines
21537 @section Mode Lines
21538 @cindex mode lines
21539
21540 @vindex gnus-updated-mode-lines
21541 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21542 lines updated. It is a list of symbols. Supported symbols include
21543 @code{group}, @code{article}, @code{summary}, @code{server},
21544 @code{browse}, and @code{tree}. If the corresponding symbol is present,
21545 Gnus will keep that mode line updated with information that may be
21546 pertinent. If this variable is @code{nil}, screen refresh may be
21547 quicker.
21548
21549 @cindex display-time
21550
21551 @vindex gnus-mode-non-string-length
21552 By default, Gnus displays information on the current article in the mode
21553 lines of the summary and article buffers. The information Gnus wishes
21554 to display (e.g. the subject of the article) is often longer than the
21555 mode lines, and therefore have to be cut off at some point. The
21556 @code{gnus-mode-non-string-length} variable says how long the other
21557 elements on the line is (i.e., the non-info part). If you put
21558 additional elements on the mode line (e.g. a clock), you should modify
21559 this variable:
21560
21561 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21562 @lisp
21563 (add-hook 'display-time-hook
21564 (lambda () (setq gnus-mode-non-string-length
21565 (+ 21
21566 (if line-number-mode 5 0)
21567 (if column-number-mode 4 0)
21568 (length display-time-string)))))
21569 @end lisp
21570
21571 If this variable is @code{nil} (which is the default), the mode line
21572 strings won't be chopped off, and they won't be padded either. Note
21573 that the default is unlikely to be desirable, as even the percentage
21574 complete in the buffer may be crowded off the mode line; the user should
21575 configure this variable appropriately for her configuration.
21576
21577
21578 @node Highlighting and Menus
21579 @section Highlighting and Menus
21580 @cindex visual
21581 @cindex highlighting
21582 @cindex menus
21583
21584 @vindex gnus-visual
21585 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21586 aspects. If @code{nil}, Gnus won't attempt to create menus or use fancy
21587 colors or fonts. This will also inhibit loading the @file{gnus-vis.el}
21588 file.
21589
21590 This variable can be a list of visual properties that are enabled. The
21591 following elements are valid, and are all included by default:
21592
21593 @table @code
21594 @item group-highlight
21595 Do highlights in the group buffer.
21596 @item summary-highlight
21597 Do highlights in the summary buffer.
21598 @item article-highlight
21599 Do highlights in the article buffer.
21600 @item highlight
21601 Turn on highlighting in all buffers.
21602 @item group-menu
21603 Create menus in the group buffer.
21604 @item summary-menu
21605 Create menus in the summary buffers.
21606 @item article-menu
21607 Create menus in the article buffer.
21608 @item browse-menu
21609 Create menus in the browse buffer.
21610 @item server-menu
21611 Create menus in the server buffer.
21612 @item score-menu
21613 Create menus in the score buffers.
21614 @item menu
21615 Create menus in all buffers.
21616 @end table
21617
21618 So if you only want highlighting in the article buffer and menus in all
21619 buffers, you could say something like:
21620
21621 @lisp
21622 (setq gnus-visual '(article-highlight menu))
21623 @end lisp
21624
21625 If you want highlighting only and no menus whatsoever, you'd say:
21626
21627 @lisp
21628 (setq gnus-visual '(highlight))
21629 @end lisp
21630
21631 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21632 in all Gnus buffers.
21633
21634 Other general variables that influence the look of all buffers include:
21635
21636 @table @code
21637 @item gnus-mouse-face
21638 @vindex gnus-mouse-face
21639 This is the face (i.e., font) used for mouse highlighting in Gnus. No
21640 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21641
21642 @end table
21643
21644 There are hooks associated with the creation of all the different menus:
21645
21646 @table @code
21647
21648 @item gnus-article-menu-hook
21649 @vindex gnus-article-menu-hook
21650 Hook called after creating the article mode menu.
21651
21652 @item gnus-group-menu-hook
21653 @vindex gnus-group-menu-hook
21654 Hook called after creating the group mode menu.
21655
21656 @item gnus-summary-menu-hook
21657 @vindex gnus-summary-menu-hook
21658 Hook called after creating the summary mode menu.
21659
21660 @item gnus-server-menu-hook
21661 @vindex gnus-server-menu-hook
21662 Hook called after creating the server mode menu.
21663
21664 @item gnus-browse-menu-hook
21665 @vindex gnus-browse-menu-hook
21666 Hook called after creating the browse mode menu.
21667
21668 @item gnus-score-menu-hook
21669 @vindex gnus-score-menu-hook
21670 Hook called after creating the score mode menu.
21671
21672 @end table
21673
21674
21675 @node Buttons
21676 @section Buttons
21677 @cindex buttons
21678 @cindex mouse
21679 @cindex click
21680
21681 Those new-fangled @dfn{mouse} contraptions is very popular with the
21682 young, hep kids who don't want to learn the proper way to do things
21683 these days. Why, I remember way back in the summer of '89, when I was
21684 using Emacs on a Tops 20 system. Three hundred users on one single
21685 machine, and every user was running Simula compilers. Bah!
21686
21687 Right.
21688
21689 @vindex gnus-carpal
21690 Well, you can make Gnus display bufferfuls of buttons you can click to
21691 do anything by setting @code{gnus-carpal} to @code{t}. Pretty simple,
21692 really. Tell the chiropractor I sent you.
21693
21694
21695 @table @code
21696
21697 @item gnus-carpal-mode-hook
21698 @vindex gnus-carpal-mode-hook
21699 Hook run in all carpal mode buffers.
21700
21701 @item gnus-carpal-button-face
21702 @vindex gnus-carpal-button-face
21703 Face used on buttons.
21704
21705 @item gnus-carpal-header-face
21706 @vindex gnus-carpal-header-face
21707 Face used on carpal buffer headers.
21708
21709 @item gnus-carpal-group-buffer-buttons
21710 @vindex gnus-carpal-group-buffer-buttons
21711 Buttons in the group buffer.
21712
21713 @item gnus-carpal-summary-buffer-buttons
21714 @vindex gnus-carpal-summary-buffer-buttons
21715 Buttons in the summary buffer.
21716
21717 @item gnus-carpal-server-buffer-buttons
21718 @vindex gnus-carpal-server-buffer-buttons
21719 Buttons in the server buffer.
21720
21721 @item gnus-carpal-browse-buffer-buttons
21722 @vindex gnus-carpal-browse-buffer-buttons
21723 Buttons in the browse buffer.
21724 @end table
21725
21726 All the @code{buttons} variables are lists. The elements in these list
21727 are either cons cells where the @code{car} contains a text to be displayed and
21728 the @code{cdr} contains a function symbol, or a simple string.
21729
21730
21731 @node Daemons
21732 @section Daemons
21733 @cindex demons
21734 @cindex daemons
21735
21736 Gnus, being larger than any program ever written (allegedly), does lots
21737 of strange stuff that you may wish to have done while you're not
21738 present. For instance, you may want it to check for new mail once in a
21739 while. Or you may want it to close down all connections to all servers
21740 when you leave Emacs idle. And stuff like that.
21741
21742 Gnus will let you do stuff like that by defining various
21743 @dfn{handlers}. Each handler consists of three elements: A
21744 @var{function}, a @var{time}, and an @var{idle} parameter.
21745
21746 Here's an example of a handler that closes connections when Emacs has
21747 been idle for thirty minutes:
21748
21749 @lisp
21750 (gnus-demon-close-connections nil 30)
21751 @end lisp
21752
21753 Here's a handler that scans for @acronym{PGP} headers every hour when
21754 Emacs is idle:
21755
21756 @lisp
21757 (gnus-demon-scan-pgp 60 t)
21758 @end lisp
21759
21760 This @var{time} parameter and that @var{idle} parameter work together
21761 in a strange, but wonderful fashion. Basically, if @var{idle} is
21762 @code{nil}, then the function will be called every @var{time} minutes.
21763
21764 If @var{idle} is @code{t}, then the function will be called after
21765 @var{time} minutes only if Emacs is idle. So if Emacs is never idle,
21766 the function will never be called. But once Emacs goes idle, the
21767 function will be called every @var{time} minutes.
21768
21769 If @var{idle} is a number and @var{time} is a number, the function will
21770 be called every @var{time} minutes only when Emacs has been idle for
21771 @var{idle} minutes.
21772
21773 If @var{idle} is a number and @var{time} is @code{nil}, the function
21774 will be called once every time Emacs has been idle for @var{idle}
21775 minutes.
21776
21777 And if @var{time} is a string, it should look like @samp{07:31}, and
21778 the function will then be called once every day somewhere near that
21779 time. Modified by the @var{idle} parameter, of course.
21780
21781 @vindex gnus-demon-timestep
21782 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21783 seconds. This is 60 by default. If you change that variable,
21784 all the timings in the handlers will be affected.)
21785
21786 So, if you want to add a handler, you could put something like this in
21787 your @file{~/.gnus.el} file:
21788
21789 @findex gnus-demon-add-handler
21790 @lisp
21791 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21792 @end lisp
21793
21794 @findex gnus-demon-add-nocem
21795 @findex gnus-demon-add-scanmail
21796 @findex gnus-demon-add-rescan
21797 @findex gnus-demon-add-scan-timestamps
21798 @findex gnus-demon-add-disconnection
21799 Some ready-made functions to do this have been created:
21800 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21801 @code{gnus-demon-add-nntp-close-connection},
21802 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21803 @code{gnus-demon-add-scanmail}. Just put those functions in your
21804 @file{~/.gnus.el} if you want those abilities.
21805
21806 @findex gnus-demon-init
21807 @findex gnus-demon-cancel
21808 @vindex gnus-demon-handlers
21809 If you add handlers to @code{gnus-demon-handlers} directly, you should
21810 run @code{gnus-demon-init} to make the changes take hold. To cancel all
21811 daemons, you can use the @code{gnus-demon-cancel} function.
21812
21813 Note that adding daemons can be pretty naughty if you over do it. Adding
21814 functions that scan all news and mail from all servers every two seconds
21815 is a sure-fire way of getting booted off any respectable system. So
21816 behave.
21817
21818
21819 @node NoCeM
21820 @section NoCeM
21821 @cindex nocem
21822 @cindex spam
21823
21824 @dfn{Spamming} is posting the same article lots and lots of times.
21825 Spamming is bad. Spamming is evil.
21826
21827 Spamming is usually canceled within a day or so by various anti-spamming
21828 agencies. These agencies usually also send out @dfn{NoCeM} messages.
21829 NoCeM is pronounced ``no see-'em'', and means what the name
21830 implies---these are messages that make the offending articles, like, go
21831 away.
21832
21833 What use are these NoCeM messages if the articles are canceled anyway?
21834 Some sites do not honor cancel messages and some sites just honor cancels
21835 from a select few people. Then you may wish to make use of the NoCeM
21836 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21837
21838 Gnus can read and parse the messages in this group automatically, and
21839 this will make spam disappear.
21840
21841 There are some variables to customize, of course:
21842
21843 @table @code
21844 @item gnus-use-nocem
21845 @vindex gnus-use-nocem
21846 Set this variable to @code{t} to set the ball rolling. It is @code{nil}
21847 by default.
21848
21849 You can also set this variable to a positive number as a group level.
21850 In that case, Gnus scans NoCeM messages when checking new news if this
21851 value is not exceeding a group level that you specify as the prefix
21852 argument to some commands, e.g. @code{gnus},
21853 @code{gnus-group-get-new-news}, etc. Otherwise, Gnus does not scan
21854 NoCeM messages if you specify a group level to those commands. For
21855 example, if you use 1 or 2 on the mail groups and the levels on the news
21856 groups remain the default, 3 is the best choice.
21857
21858 @item gnus-nocem-groups
21859 @vindex gnus-nocem-groups
21860 Gnus will look for NoCeM messages in the groups in this list. The
21861 default is
21862 @lisp
21863 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21864 "alt.nocem.misc" "news.admin.net-abuse.announce")
21865 @end lisp
21866
21867 @item gnus-nocem-issuers
21868 @vindex gnus-nocem-issuers
21869 There are many people issuing NoCeM messages. This list says what
21870 people you want to listen to. The default is
21871 @lisp
21872 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21873 "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21874 @end lisp
21875 fine, upstanding citizens all of them.
21876
21877 Known despammers that you can put in this list are listed at@*
21878 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21879
21880 You do not have to heed NoCeM messages from all these people---just the
21881 ones you want to listen to. You also don't have to accept all NoCeM
21882 messages from the people you like. Each NoCeM message has a @dfn{type}
21883 header that gives the message a (more or less, usually less) rigorous
21884 definition. Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21885 @samp{binary}, and @samp{troll}. To specify this, you have to use
21886 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21887 Each condition is either a string (which is a regexp that matches types
21888 you want to use) or a list on the form @code{(not @var{string})}, where
21889 @var{string} is a regexp that matches types you don't want to use.
21890
21891 For instance, if you want all NoCeM messages from Chris Lewis except his
21892 @samp{troll} messages, you'd say:
21893
21894 @lisp
21895 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21896 @end lisp
21897
21898 On the other hand, if you just want nothing but his @samp{spam} and
21899 @samp{spew} messages, you'd say:
21900
21901 @lisp
21902 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21903 @end lisp
21904
21905 The specs are applied left-to-right.
21906
21907
21908 @item gnus-nocem-verifyer
21909 @vindex gnus-nocem-verifyer
21910 @findex pgg-verify
21911 This should be a function for verifying that the NoCeM issuer is who she
21912 says she is. The default is @code{pgg-verify}, which returns
21913 non-@code{nil} if the verification is successful, otherwise (including
21914 the case the NoCeM message was not signed) returns @code{nil}. If this
21915 is too slow and you don't care for verification (which may be dangerous),
21916 you can set this variable to @code{nil}.
21917
21918 Formerly the default was @code{mc-verify}, which is a Mailcrypt
21919 function. While you can still use it, you can change it into
21920 @code{pgg-verify} running with GnuPG if you are willing to add the
21921 @acronym{PGP} public keys to GnuPG's keyring.
21922
21923 @item gnus-nocem-directory
21924 @vindex gnus-nocem-directory
21925 This is where Gnus will store its NoCeM cache files. The default is@*
21926 @file{~/News/NoCeM/}.
21927
21928 @item gnus-nocem-expiry-wait
21929 @vindex gnus-nocem-expiry-wait
21930 The number of days before removing old NoCeM entries from the cache.
21931 The default is 15. If you make it shorter Gnus will be faster, but you
21932 might then see old spam.
21933
21934 @item gnus-nocem-check-from
21935 @vindex gnus-nocem-check-from
21936 Non-@code{nil} means check for valid issuers in message bodies.
21937 Otherwise don't bother fetching articles unless their author matches a
21938 valid issuer; that is much faster if you are selective about the
21939 issuers.
21940
21941 @item gnus-nocem-check-article-limit
21942 @vindex gnus-nocem-check-article-limit
21943 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21944 group. NoCeM groups can be huge and very slow to process.
21945
21946 @end table
21947
21948 Using NoCeM could potentially be a memory hog. If you have many living
21949 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21950 big. If this is a problem, you should kill off all (or most) of your
21951 unsubscribed groups (@pxref{Subscription Commands}).
21952
21953
21954 @node Undo
21955 @section Undo
21956 @cindex undo
21957
21958 It is very useful to be able to undo actions one has done. In normal
21959 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21960 In Gnus buffers, however, it isn't that simple.
21961
21962 The things Gnus displays in its buffer is of no value whatsoever to
21963 Gnus---it's all just data designed to look nice to the user.
21964 Killing a group in the group buffer with @kbd{C-k} makes the line
21965 disappear, but that's just a side-effect of the real action---the
21966 removal of the group in question from the internal Gnus structures.
21967 Undoing something like that can't be done by the normal Emacs
21968 @code{undo} function.
21969
21970 Gnus tries to remedy this somewhat by keeping track of what the user
21971 does and coming up with actions that would reverse the actions the user
21972 takes. When the user then presses the @code{undo} key, Gnus will run
21973 the code to reverse the previous action, or the previous actions.
21974 However, not all actions are easily reversible, so Gnus currently offers
21975 a few key functions to be undoable. These include killing groups,
21976 yanking groups, and changing the list of read articles of groups.
21977 That's it, really. More functions may be added in the future, but each
21978 added function means an increase in data to be stored, so Gnus will
21979 never be totally undoable.
21980
21981 @findex gnus-undo-mode
21982 @vindex gnus-use-undo
21983 @findex gnus-undo
21984 The undoability is provided by the @code{gnus-undo-mode} minor mode. It
21985 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21986 default. The @kbd{C-M-_} key performs the @code{gnus-undo}
21987 command, which should feel kinda like the normal Emacs @code{undo}
21988 command.
21989
21990
21991 @node Predicate Specifiers
21992 @section Predicate Specifiers
21993 @cindex predicate specifiers
21994
21995 Some Gnus variables are @dfn{predicate specifiers}. This is a special
21996 form that allows flexible specification of predicates without having
21997 to type all that much.
21998
21999 These specifiers are lists consisting of functions, symbols and lists.
22000
22001 Here's an example:
22002
22003 @lisp
22004 (or gnus-article-unseen-p
22005 gnus-article-unread-p)
22006 @end lisp
22007
22008 The available symbols are @code{or}, @code{and} and @code{not}. The
22009 functions all take one parameter.
22010
22011 @findex gnus-make-predicate
22012 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
22013 to create a function that can be called. This input parameter to this
22014 function will be passed along to all the functions in the predicate
22015 specifier.
22016
22017
22018 @node Moderation
22019 @section Moderation
22020 @cindex moderation
22021
22022 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
22023 It is not included in the standard Gnus package. Write a mail to
22024 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
22025 get a copy.
22026
22027 The moderation package is implemented as a minor mode for summary
22028 buffers. Put
22029
22030 @lisp
22031 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
22032 @end lisp
22033
22034 in your @file{~/.gnus.el} file.
22035
22036 If you are the moderator of @samp{rec.zoofle}, this is how it's
22037 supposed to work:
22038
22039 @enumerate
22040 @item
22041 You split your incoming mail by matching on
22042 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
22043 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
22044
22045 @item
22046 You enter that group once in a while and post articles using the @kbd{e}
22047 (edit-and-post) or @kbd{s} (just send unedited) commands.
22048
22049 @item
22050 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
22051 articles that weren't approved by you, you can cancel them with the
22052 @kbd{c} command.
22053 @end enumerate
22054
22055 To use moderation mode in these two groups, say:
22056
22057 @lisp
22058 (setq gnus-moderated-list
22059 "^nnml:rec.zoofle$\\|^rec.zoofle$")
22060 @end lisp
22061
22062
22063 @node Fetching a Group
22064 @section Fetching a Group
22065 @cindex fetching a group
22066
22067 @findex gnus-fetch-group
22068 It is sometimes convenient to be able to just say ``I want to read this
22069 group and I don't care whether Gnus has been started or not''. This is
22070 perhaps more useful for people who write code than for users, but the
22071 command @code{gnus-fetch-group} provides this functionality in any case.
22072 It takes the group name as a parameter.
22073
22074
22075 @node Image Enhancements
22076 @section Image Enhancements
22077
22078 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
22079 support images yet.}, is able to display pictures and stuff, so Gnus has
22080 taken advantage of that.
22081
22082 @menu
22083 * X-Face:: Display a funky, teensy black-and-white image.
22084 * Face:: Display a funkier, teensier colored image.
22085 * Smileys:: Show all those happy faces the way they were meant to be shown.
22086 * Picons:: How to display pictures of what you're reading.
22087 * XVarious:: Other XEmacsy Gnusey variables.
22088 @end menu
22089
22090
22091 @node X-Face
22092 @subsection X-Face
22093 @cindex x-face
22094
22095 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
22096 depth) image that's supposed to represent the author of the message.
22097 It seems to be supported by an ever-growing number of mail and news
22098 readers.
22099
22100 @cindex x-face
22101 @findex gnus-article-display-x-face
22102 @vindex gnus-article-x-face-command
22103 @vindex gnus-article-x-face-too-ugly
22104 @iftex
22105 @iflatex
22106 \include{xface}
22107 @end iflatex
22108 @end iftex
22109 @c @anchor{X-Face}
22110
22111 Viewing an @code{X-Face} header either requires an Emacs that has
22112 @samp{compface} support (which most XEmacs versions has), or that you
22113 have suitable conversion or display programs installed. If your Emacs
22114 has image support the default action is to display the face before the
22115 @code{From} header. If there's no native @code{X-Face} support, Gnus
22116 will try to convert the @code{X-Face} header using external programs
22117 from the @code{pbmplus} package and friends. For XEmacs it's faster if
22118 XEmacs has been compiled with @code{X-Face} support. The default action
22119 under Emacs without image support is to fork off the @code{display}
22120 program.
22121
22122 On a GNU/Linux system, the @code{display} program is from the
22123 ImageMagick package. For external conversion programs look for packages
22124 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
22125
22126 The variable that controls this is the
22127 @code{gnus-article-x-face-command} variable. If this variable is a
22128 string, this string will be executed in a sub-shell. If it is a
22129 function, this function will be called with the face as the argument.
22130 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
22131 the @code{From} header, the face will not be shown.
22132
22133 (Note: @code{x-face} is used in the variable/function names, not
22134 @code{xface}).
22135
22136 @noindent
22137 Face and variable:
22138
22139 @table @code
22140 @item gnus-x-face
22141 @vindex gnus-x-face
22142 Face to show X-Face. The colors from this face are used as the
22143 foreground and background colors of the displayed X-Faces. The
22144 default colors are black and white.
22145 @end table
22146
22147 If you use posting styles, you can use an @code{x-face-file} entry in
22148 @code{gnus-posting-styles}, @xref{Posting Styles}. If you don't, Gnus
22149 provides a few convenience functions and variables to allow easier
22150 insertion of X-Face headers in outgoing messages. You also need the
22151 above mentioned ImageMagick, netpbm or other image conversion packages
22152 (depending the values of the variables below) for these functions.
22153
22154 @findex gnus-random-x-face
22155 @vindex gnus-convert-pbm-to-x-face-command
22156 @vindex gnus-x-face-directory
22157 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
22158 @code{gnus-x-face-directory} and picks one at random, and then
22159 converts it to the X-Face format by using the
22160 @code{gnus-convert-pbm-to-x-face-command} shell command. The
22161 @samp{pbm} files should be 48x48 pixels big. It returns the X-Face
22162 header data as a string.
22163
22164 @findex gnus-insert-random-x-face-header
22165 @code{gnus-insert-random-x-face-header} calls
22166 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
22167 randomly generated data.
22168
22169 @findex gnus-x-face-from-file
22170 @vindex gnus-convert-image-to-x-face-command
22171 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
22172 converts the file to X-Face format by using the
22173 @code{gnus-convert-image-to-x-face-command} shell command.
22174
22175 Here's how you would typically use the first function. Put something
22176 like the following in your @file{~/.gnus.el} file:
22177
22178 @lisp
22179 (setq message-required-news-headers
22180 (nconc message-required-news-headers
22181 (list '(X-Face . gnus-random-x-face))))
22182 @end lisp
22183
22184 Using the last function would be something like this:
22185
22186 @lisp
22187 (setq message-required-news-headers
22188 (nconc message-required-news-headers
22189 (list '(X-Face . (lambda ()
22190 (gnus-x-face-from-file
22191 "~/My-face.gif"))))))
22192 @end lisp
22193
22194
22195 @node Face
22196 @subsection Face
22197 @cindex face
22198
22199 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
22200
22201 @code{Face} headers are essentially a funkier version of @code{X-Face}
22202 ones. They describe a 48x48 pixel colored image that's supposed to
22203 represent the author of the message.
22204
22205 @cindex face
22206 @findex gnus-article-display-face
22207 The contents of a @code{Face} header must be a base64 encoded PNG image.
22208 See @uref{http://quimby.gnus.org/circus/face/} for the precise
22209 specifications.
22210
22211 Viewing an @code{Face} header requires an Emacs that is able to display
22212 PNG images.
22213 @c Maybe add this:
22214 @c (if (featurep 'xemacs)
22215 @c (featurep 'png)
22216 @c (image-type-available-p 'png))
22217
22218 Gnus provides a few convenience functions and variables to allow
22219 easier insertion of Face headers in outgoing messages.
22220
22221 @findex gnus-convert-png-to-face
22222 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
22223 726 bytes long, and converts it to a face.
22224
22225 @findex gnus-face-from-file
22226 @vindex gnus-convert-image-to-face-command
22227 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
22228 converts the file to Face format by using the
22229 @code{gnus-convert-image-to-face-command} shell command.
22230
22231 Here's how you would typically use this function. Put something like the
22232 following in your @file{~/.gnus.el} file:
22233
22234 @lisp
22235 (setq message-required-news-headers
22236 (nconc message-required-news-headers
22237 (list '(Face . (lambda ()
22238 (gnus-face-from-file "~/face.jpg"))))))
22239 @end lisp
22240
22241
22242 @node Smileys
22243 @subsection Smileys
22244 @cindex smileys
22245
22246 @iftex
22247 @iflatex
22248 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
22249 \input{smiley}
22250 @end iflatex
22251 @end iftex
22252
22253 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
22254 currently the only package that uses Smiley, it is documented here.
22255
22256 In short---to use Smiley in Gnus, put the following in your
22257 @file{~/.gnus.el} file:
22258
22259 @lisp
22260 (setq gnus-treat-display-smileys t)
22261 @end lisp
22262
22263 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
22264 the like---to pictures and displays those instead of the text smiley
22265 faces. The conversion is controlled by a list of regexps that matches
22266 text and maps that to file names.
22267
22268 @vindex smiley-regexp-alist
22269 The alist used is specified by the @code{smiley-regexp-alist}
22270 variable. The first item in each element is the regexp to be matched;
22271 the second element is the regexp match group that is to be replaced by
22272 the picture; and the third element is the name of the file to be
22273 displayed.
22274
22275 The following variables customize where Smiley will look for these
22276 files:
22277
22278 @table @code
22279
22280 @item smiley-data-directory
22281 @vindex smiley-data-directory
22282 Where Smiley will look for smiley faces files.
22283
22284 @item gnus-smiley-file-types
22285 @vindex gnus-smiley-file-types
22286 List of suffixes on smiley file names to try.
22287
22288 @end table
22289
22290
22291 @node Picons
22292 @subsection Picons
22293
22294 @iftex
22295 @iflatex
22296 \include{picons}
22297 @end iflatex
22298 @end iftex
22299
22300 So@dots{} You want to slow down your news reader even more! This is a
22301 good way to do so. It's also a great way to impress people staring
22302 over your shoulder as you read news.
22303
22304 What are Picons? To quote directly from the Picons Web site:
22305
22306 @iftex
22307 @iflatex
22308 \margindex{}
22309 @end iflatex
22310 @end iftex
22311
22312 @quotation
22313 @dfn{Picons} is short for ``personal icons''. They're small,
22314 constrained images used to represent users and domains on the net,
22315 organized into databases so that the appropriate image for a given
22316 e-mail address can be found. Besides users and domains, there are picon
22317 databases for Usenet newsgroups and weather forecasts. The picons are
22318 in either monochrome @code{XBM} format or color @code{XPM} and
22319 @code{GIF} formats.
22320 @end quotation
22321
22322 @vindex gnus-picon-databases
22323 For instructions on obtaining and installing the picons databases,
22324 point your Web browser at
22325 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
22326
22327 If you are using Debian GNU/Linux, saying @samp{apt-get install
22328 picons.*} will install the picons where Gnus can find them.
22329
22330 To enable displaying picons, simply make sure that
22331 @code{gnus-picon-databases} points to the directory containing the
22332 Picons databases.
22333
22334 The following variables offer control over where things are located.
22335
22336 @table @code
22337
22338 @item gnus-picon-databases
22339 @vindex gnus-picon-databases
22340 The location of the picons database. This is a list of directories
22341 containing the @file{news}, @file{domains}, @file{users} (and so on)
22342 subdirectories. Defaults to @code{("/usr/lib/picon"
22343 "/usr/local/faces")}.
22344
22345 @item gnus-picon-news-directories
22346 @vindex gnus-picon-news-directories
22347 List of subdirectories to search in @code{gnus-picon-databases} for
22348 newsgroups faces. @code{("news")} is the default.
22349
22350 @item gnus-picon-user-directories
22351 @vindex gnus-picon-user-directories
22352 List of subdirectories to search in @code{gnus-picon-databases} for user
22353 faces. @code{("users" "usenix" "local" "misc")} is the default.
22354
22355 @item gnus-picon-domain-directories
22356 @vindex gnus-picon-domain-directories
22357 List of subdirectories to search in @code{gnus-picon-databases} for
22358 domain name faces. Defaults to @code{("domains")}. Some people may
22359 want to add @samp{"unknown"} to this list.
22360
22361 @item gnus-picon-file-types
22362 @vindex gnus-picon-file-types
22363 Ordered list of suffixes on picon file names to try. Defaults to
22364 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
22365
22366 @end table
22367
22368
22369 @node XVarious
22370 @subsection Various XEmacs Variables
22371
22372 @table @code
22373 @item gnus-xmas-glyph-directory
22374 @vindex gnus-xmas-glyph-directory
22375 This is where Gnus will look for pictures. Gnus will normally
22376 auto-detect this directory, but you may set it manually if you have an
22377 unusual directory structure.
22378
22379 @item gnus-xmas-modeline-glyph
22380 @vindex gnus-xmas-modeline-glyph
22381 A glyph displayed in all Gnus mode lines. It is a tiny gnu head by
22382 default.
22383
22384 @end table
22385
22386 @subsubsection Toolbar
22387
22388 @table @code
22389
22390 @item gnus-use-toolbar
22391 @vindex gnus-use-toolbar
22392 This variable specifies the position to display the toolbar. If
22393 @code{nil}, don't display toolbars. If it is non-@code{nil}, it should
22394 be one of the symbols @code{default}, @code{top}, @code{bottom},
22395 @code{right}, and @code{left}. @code{default} means to use the default
22396 toolbar, the rest mean to display the toolbar on the place which those
22397 names show. The default is @code{default}.
22398
22399 @item gnus-toolbar-thickness
22400 @vindex gnus-toolbar-thickness
22401 Cons of the height and the width specifying the thickness of a toolbar.
22402 The height is used for the toolbar displayed on the top or the bottom,
22403 the width is used for the toolbar displayed on the right or the left.
22404 The default is that of the default toolbar.
22405
22406 @item gnus-group-toolbar
22407 @vindex gnus-group-toolbar
22408 The toolbar in the group buffer.
22409
22410 @item gnus-summary-toolbar
22411 @vindex gnus-summary-toolbar
22412 The toolbar in the summary buffer.
22413
22414 @item gnus-summary-mail-toolbar
22415 @vindex gnus-summary-mail-toolbar
22416 The toolbar in the summary buffer of mail groups.
22417
22418 @end table
22419
22420 @iftex
22421 @iflatex
22422 \margindex{}
22423 @end iflatex
22424 @end iftex
22425
22426
22427 @node Fuzzy Matching
22428 @section Fuzzy Matching
22429 @cindex fuzzy matching
22430
22431 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
22432 things like scoring, thread gathering and thread comparison.
22433
22434 As opposed to regular expression matching, fuzzy matching is very fuzzy.
22435 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
22436 means, and the implementation has changed over time.
22437
22438 Basically, it tries to remove all noise from lines before comparing.
22439 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
22440 out of the strings before comparing the results. This often leads to
22441 adequate results---even when faced with strings generated by text
22442 manglers masquerading as newsreaders.
22443
22444
22445 @node Thwarting Email Spam
22446 @section Thwarting Email Spam
22447 @cindex email spam
22448 @cindex spam
22449 @cindex UCE
22450 @cindex unsolicited commercial email
22451
22452 In these last days of the Usenet, commercial vultures are hanging about
22453 and grepping through news like crazy to find email addresses they can
22454 foist off their scams and products to. As a reaction to this, many
22455 people have started putting nonsense addresses into their @code{From}
22456 lines. I think this is counterproductive---it makes it difficult for
22457 people to send you legitimate mail in response to things you write, as
22458 well as making it difficult to see who wrote what. This rewriting may
22459 perhaps be a bigger menace than the unsolicited commercial email itself
22460 in the end.
22461
22462 The biggest problem I have with email spam is that it comes in under
22463 false pretenses. I press @kbd{g} and Gnus merrily informs me that I
22464 have 10 new emails. I say ``Golly gee! Happy is me!'' and select the
22465 mail group, only to find two pyramid schemes, seven advertisements
22466 (``New! Miracle tonic for growing full, lustrous hair on your toes!'')
22467 and one mail asking me to repent and find some god.
22468
22469 This is annoying. Here's what you can do about it.
22470
22471 @menu
22472 * The problem of spam:: Some background, and some solutions
22473 * Anti-Spam Basics:: Simple steps to reduce the amount of spam.
22474 * SpamAssassin:: How to use external anti-spam tools.
22475 * Hashcash:: Reduce spam by burning CPU time.
22476 @end menu
22477
22478 @node The problem of spam
22479 @subsection The problem of spam
22480 @cindex email spam
22481 @cindex spam filtering approaches
22482 @cindex filtering approaches, spam
22483 @cindex UCE
22484 @cindex unsolicited commercial email
22485
22486 First, some background on spam.
22487
22488 If you have access to e-mail, you are familiar with spam (technically
22489 termed @acronym{UCE}, Unsolicited Commercial E-mail). Simply put, it
22490 exists because e-mail delivery is very cheap compared to paper mail,
22491 so only a very small percentage of people need to respond to an UCE to
22492 make it worthwhile to the advertiser. Ironically, one of the most
22493 common spams is the one offering a database of e-mail addresses for
22494 further spamming. Senders of spam are usually called @emph{spammers},
22495 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
22496 @emph{morons} are in common use as well.
22497
22498 Spam comes from a wide variety of sources. It is simply impossible to
22499 dispose of all spam without discarding useful messages. A good
22500 example is the TMDA system, which requires senders
22501 unknown to you to confirm themselves as legitimate senders before
22502 their e-mail can reach you. Without getting into the technical side
22503 of TMDA, a downside is clearly that e-mail from legitimate sources may
22504 be discarded if those sources can't or won't confirm themselves
22505 through the TMDA system. Another problem with TMDA is that it
22506 requires its users to have a basic understanding of e-mail delivery
22507 and processing.
22508
22509 The simplest approach to filtering spam is filtering, at the mail
22510 server or when you sort through incoming mail. If you get 200 spam
22511 messages per day from @samp{random-address@@vmadmin.com}, you block
22512 @samp{vmadmin.com}. If you get 200 messages about @samp{VIAGRA}, you
22513 discard all messages with @samp{VIAGRA} in the message. If you get
22514 lots of spam from Bulgaria, for example, you try to filter all mail
22515 from Bulgarian IPs.
22516
22517 This, unfortunately, is a great way to discard legitimate e-mail. The
22518 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
22519 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
22520 you should be obvious, so don't do it if you have the choice.
22521
22522 In another instance, the very informative and useful RISKS digest has
22523 been blocked by overzealous mail filters because it @strong{contained}
22524 words that were common in spam messages. Nevertheless, in isolated
22525 cases, with great care, direct filtering of mail can be useful.
22526
22527 Another approach to filtering e-mail is the distributed spam
22528 processing, for instance DCC implements such a system. In essence,
22529 @var{N} systems around the world agree that a machine @var{X} in
22530 Ghana, Estonia, or California is sending out spam e-mail, and these
22531 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
22532 database. The criteria for spam detection vary---it may be the number
22533 of messages sent, the content of the messages, and so on. When a user
22534 of the distributed processing system wants to find out if a message is
22535 spam, he consults one of those @var{N} systems.
22536
22537 Distributed spam processing works very well against spammers that send
22538 a large number of messages at once, but it requires the user to set up
22539 fairly complicated checks. There are commercial and free distributed
22540 spam processing systems. Distributed spam processing has its risks as
22541 well. For instance legitimate e-mail senders have been accused of
22542 sending spam, and their web sites and mailing lists have been shut
22543 down for some time because of the incident.
22544
22545 The statistical approach to spam filtering is also popular. It is
22546 based on a statistical analysis of previous spam messages. Usually
22547 the analysis is a simple word frequency count, with perhaps pairs of
22548 words or 3-word combinations thrown into the mix. Statistical
22549 analysis of spam works very well in most of the cases, but it can
22550 classify legitimate e-mail as spam in some cases. It takes time to
22551 run the analysis, the full message must be analyzed, and the user has
22552 to store the database of spam analyses. Statistical analysis on the
22553 server is gaining popularity. This has the advantage of letting the
22554 user Just Read Mail, but has the disadvantage that it's harder to tell
22555 the server that it has misclassified mail.
22556
22557 Fighting spam is not easy, no matter what anyone says. There is no
22558 magic switch that will distinguish Viagra ads from Mom's e-mails.
22559 Even people are having a hard time telling spam apart from non-spam,
22560 because spammers are actively looking to fool us into thinking they
22561 are Mom, essentially. Spamming is irritating, irresponsible, and
22562 idiotic behavior from a bunch of people who think the world owes them
22563 a favor. We hope the following sections will help you in fighting the
22564 spam plague.
22565
22566 @node Anti-Spam Basics
22567 @subsection Anti-Spam Basics
22568 @cindex email spam
22569 @cindex spam
22570 @cindex UCE
22571 @cindex unsolicited commercial email
22572
22573 One way of dealing with spam is having Gnus split out all spam into a
22574 @samp{spam} mail group (@pxref{Splitting Mail}).
22575
22576 First, pick one (1) valid mail address that you can be reached at, and
22577 put it in your @code{From} header of all your news articles. (I've
22578 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22579 @samp{larsi+usenet@@ifi.uio.no} will be a better choice. Ask your
22580 sysadmin whether your sendmail installation accepts keywords in the local
22581 part of the mail address.)
22582
22583 @lisp
22584 (setq message-default-news-headers
22585 "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22586 @end lisp
22587
22588 Then put the following split rule in @code{nnmail-split-fancy}
22589 (@pxref{Fancy Mail Splitting}):
22590
22591 @lisp
22592 (...
22593 (to "larsi@@trym.ifi.uio.no"
22594 (| ("subject" "re:.*" "misc")
22595 ("references" ".*@@.*" "misc")
22596 "spam"))
22597 ...)
22598 @end lisp
22599
22600 This says that all mail to this address is suspect, but if it has a
22601 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22602 header, it's probably ok. All the rest goes to the @samp{spam} group.
22603 (This idea probably comes from Tim Pierce.)
22604
22605 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22606 and do not include your email address explicitly in the @code{To}
22607 header. Why they do this is unknown---perhaps it's to thwart this
22608 thwarting scheme? In any case, this is trivial to deal with---you just
22609 put anything not addressed to you in the @samp{spam} group by ending
22610 your fancy split rule in this way:
22611
22612 @lisp
22613 (
22614 ...
22615 (to "larsi" "misc")
22616 "spam")
22617 @end lisp
22618
22619 In my experience, this will sort virtually everything into the right
22620 group. You still have to check the @samp{spam} group from time to time to
22621 check for legitimate mail, though. If you feel like being a good net
22622 citizen, you can even send off complaints to the proper authorities on
22623 each unsolicited commercial email---at your leisure.
22624
22625 This works for me. It allows people an easy way to contact me (they can
22626 just press @kbd{r} in the usual way), and I'm not bothered at all with
22627 spam. It's a win-win situation. Forging @code{From} headers to point
22628 to non-existent domains is yucky, in my opinion.
22629
22630 Be careful with this approach. Spammers are wise to it.
22631
22632
22633 @node SpamAssassin
22634 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22635 @cindex SpamAssassin
22636 @cindex Vipul's Razor
22637 @cindex DCC
22638
22639 The days where the hints in the previous section were sufficient in
22640 avoiding spam are coming to an end. There are many tools out there
22641 that claim to reduce the amount of spam you get. This section could
22642 easily become outdated fast, as new products replace old, but
22643 fortunately most of these tools seem to have similar interfaces. Even
22644 though this section will use SpamAssassin as an example, it should be
22645 easy to adapt it to most other tools.
22646
22647 Note that this section does not involve the @code{spam.el} package,
22648 which is discussed in the next section. If you don't care for all
22649 the features of @code{spam.el}, you can make do with these simple
22650 recipes.
22651
22652 If the tool you are using is not installed on the mail server, you
22653 need to invoke it yourself. Ideas on how to use the
22654 @code{:postscript} mail source parameter (@pxref{Mail Source
22655 Specifiers}) follow.
22656
22657 @lisp
22658 (setq mail-sources
22659 '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22660 (pop :user "jrl"
22661 :server "pophost"
22662 :postscript
22663 "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22664 @end lisp
22665
22666 Once you manage to process your incoming spool somehow, thus making
22667 the mail contain e.g.@: a header indicating it is spam, you are ready to
22668 filter it out. Using normal split methods (@pxref{Splitting Mail}):
22669
22670 @lisp
22671 (setq nnmail-split-methods '(("spam" "^X-Spam-Flag: YES")
22672 ...))
22673 @end lisp
22674
22675 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22676
22677 @lisp
22678 (setq nnmail-split-methods 'nnmail-split-fancy
22679 nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22680 ...))
22681 @end lisp
22682
22683 Some people might not like the idea of piping the mail through various
22684 programs using a @code{:prescript} (if some program is buggy, you
22685 might lose all mail). If you are one of them, another solution is to
22686 call the external tools during splitting. Example fancy split method:
22687
22688 @lisp
22689 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22690 ...))
22691 (defun kevin-spamassassin ()
22692 (save-excursion
22693 (save-restriction
22694 (widen)
22695 (if (eq 1 (call-process-region (point-min) (point-max)
22696 "spamc" nil nil nil "-c"))
22697 "spam"))))
22698 @end lisp
22699
22700 Note that with the nnimap backend, message bodies will not be
22701 downloaded by default. You need to set
22702 @code{nnimap-split-download-body} to @code{t} to do that
22703 (@pxref{Splitting in IMAP}).
22704
22705 That is about it. As some spam is likely to get through anyway, you
22706 might want to have a nifty function to call when you happen to read
22707 spam. And here is the nifty function:
22708
22709 @lisp
22710 (defun my-gnus-raze-spam ()
22711 "Submit SPAM to Vipul's Razor, then mark it as expirable."
22712 (interactive)
22713 (gnus-summary-show-raw-article)
22714 (gnus-summary-save-in-pipe "razor-report -f -d")
22715 (gnus-summary-mark-as-expirable 1))
22716 @end lisp
22717
22718 @node Hashcash
22719 @subsection Hashcash
22720 @cindex hashcash
22721
22722 A novel technique to fight spam is to require senders to do something
22723 costly for each message they send. This has the obvious drawback that
22724 you cannot rely on everyone in the world using this technique,
22725 since it is not part of the Internet standards, but it may be useful
22726 in smaller communities.
22727
22728 While the tools in the previous section work well in practice, they
22729 work only because the tools are constantly maintained and updated as
22730 new form of spam appears. This means that a small percentage of spam
22731 will always get through. It also means that somewhere, someone needs
22732 to read lots of spam to update these tools. Hashcash avoids that, but
22733 instead prefers that everyone you contact through e-mail supports the
22734 scheme. You can view the two approaches as pragmatic vs dogmatic.
22735 The approaches have their own advantages and disadvantages, but as
22736 often in the real world, a combination of them is stronger than either
22737 one of them separately.
22738
22739 @cindex X-Hashcash
22740 The ``something costly'' is to burn CPU time, more specifically to
22741 compute a hash collision up to a certain number of bits. The
22742 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22743 header. For more details, and for the external application
22744 @code{hashcash} you need to install to use this feature, see
22745 @uref{http://www.cypherspace.org/~adam/hashcash/}. Even more
22746 information can be found at @uref{http://www.camram.org/}.
22747
22748 If you wish to call hashcash for each message you send, say something
22749 like:
22750
22751 @lisp
22752 (require 'hashcash)
22753 (add-hook 'message-send-hook 'mail-add-payment)
22754 @end lisp
22755
22756 The @file{hashcash.el} library can be found in the Gnus development
22757 contrib directory or at
22758 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22759
22760 You will need to set up some additional variables as well:
22761
22762 @table @code
22763
22764 @item hashcash-default-payment
22765 @vindex hashcash-default-payment
22766 This variable indicates the default number of bits the hash collision
22767 should consist of. By default this is 0, meaning nothing will be
22768 done. Suggested useful values include 17 to 29.
22769
22770 @item hashcash-payment-alist
22771 @vindex hashcash-payment-alist
22772 Some receivers may require you to spend burn more CPU time than the
22773 default. This variable contains a list of @samp{(@var{addr}
22774 @var{amount})} cells, where @var{addr} is the receiver (email address
22775 or newsgroup) and @var{amount} is the number of bits in the collision
22776 that is needed. It can also contain @samp{(@var{addr} @var{string}
22777 @var{amount})} cells, where the @var{string} is the string to use
22778 (normally the email address or newsgroup name is used).
22779
22780 @item hashcash
22781 @vindex hashcash
22782 Where the @code{hashcash} binary is installed.
22783
22784 @end table
22785
22786 Currently there is no built in functionality in Gnus to verify
22787 hashcash cookies, it is expected that this is performed by your hand
22788 customized mail filtering scripts. Improvements in this area would be
22789 a useful contribution, however.
22790
22791 @node Spam Package
22792 @section Spam Package
22793 @cindex spam filtering
22794 @cindex spam
22795
22796 The Spam package provides Gnus with a centralized mechanism for
22797 detecting and filtering spam. It filters new mail, and processes
22798 messages according to whether they are spam or ham. (@dfn{Ham} is the
22799 name used throughout this manual to indicate non-spam messages.)
22800
22801 @menu
22802 * Spam Package Introduction::
22803 * Filtering Incoming Mail::
22804 * Detecting Spam in Groups::
22805 * Spam and Ham Processors::
22806 * Spam Package Configuration Examples::
22807 * Spam Back Ends::
22808 * Extending the Spam package::
22809 * Spam Statistics Package::
22810 @end menu
22811
22812 @node Spam Package Introduction
22813 @subsection Spam Package Introduction
22814 @cindex spam filtering
22815 @cindex spam filtering sequence of events
22816 @cindex spam
22817
22818 You must read this section to understand how the Spam package works.
22819 Do not skip, speed-read, or glance through this section.
22820
22821 @cindex spam-initialize
22822 @vindex spam-use-stat
22823 To use the Spam package, you @strong{must} first run the function
22824 @code{spam-initialize}:
22825
22826 @example
22827 (spam-initialize)
22828 @end example
22829
22830 This autoloads @code{spam.el} and installs the various hooks necessary
22831 to let the Spam package do its job. In order to make use of the Spam
22832 package, you have to set up certain group parameters and variables,
22833 which we will describe below. All of the variables controlling the
22834 Spam package can be found in the @samp{spam} customization group.
22835
22836 There are two ``contact points'' between the Spam package and the rest
22837 of Gnus: checking new mail for spam, and leaving a group.
22838
22839 Checking new mail for spam is done in one of two ways: while splitting
22840 incoming mail, or when you enter a group.
22841
22842 The first way, checking for spam while splitting incoming mail, is
22843 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
22844 new mail appears in a single spool file. The Spam package processes
22845 incoming mail, and sends mail considered to be spam to a designated
22846 ``spam'' group. @xref{Filtering Incoming Mail}.
22847
22848 The second way is suited to back ends such as @code{nntp}, which have
22849 no incoming mail spool, or back ends where the server is in charge of
22850 splitting incoming mail. In this case, when you enter a Gnus group,
22851 the unseen or unread messages in that group are checked for spam.
22852 Detected spam messages are marked as spam. @xref{Detecting Spam in
22853 Groups}.
22854
22855 @cindex spam back ends
22856 In either case, you have to tell the Spam package what method to use
22857 to detect spam messages. There are several methods, or @dfn{spam back
22858 ends} (not to be confused with Gnus back ends!) to choose from: spam
22859 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
22860 forth. @xref{Spam Back Ends}.
22861
22862 In the Gnus summary buffer, messages that have been identified as spam
22863 always appear with a @samp{$} symbol.
22864
22865 The Spam package divides Gnus groups into three categories: ham
22866 groups, spam groups, and unclassified groups. You should mark each of
22867 the groups you subscribe to as either a ham group or a spam group,
22868 using the @code{spam-contents} group parameter (@pxref{Group
22869 Parameters}). Spam groups have a special property: when you enter a
22870 spam group, all unseen articles are marked as spam. Thus, mail split
22871 into a spam group is automatically marked as spam.
22872
22873 Identifying spam messages is only half of the Spam package's job. The
22874 second half comes into play whenever you exit a group buffer. At this
22875 point, the Spam package does several things:
22876
22877 First, it calls @dfn{spam and ham processors} to process the articles
22878 according to whether they are spam or ham. There is a pair of spam
22879 and ham processors associated with each spam back end, and what the
22880 processors do depends on the back end. At present, the main role of
22881 spam and ham processors is for dictionary-based spam filters: they add
22882 the contents of the messages in the group to the filter's dictionary,
22883 to improve its ability to detect future spam. The @code{spam-process}
22884 group parameter specifies what spam processors to use. @xref{Spam and
22885 Ham Processors}.
22886
22887 If the spam filter failed to mark a spam message, you can mark it
22888 yourself, so that the message is processed as spam when you exit the
22889 group:
22890
22891 @table @kbd
22892 @item M-d
22893 @itemx M s x
22894 @itemx S x
22895 @kindex M-d
22896 @kindex S x
22897 @kindex M s x
22898 @findex gnus-summary-mark-as-spam
22899 @findex gnus-summary-mark-as-spam
22900 Mark current article as spam, showing it with the @samp{$} mark
22901 (@code{gnus-summary-mark-as-spam}).
22902 @end table
22903
22904 @noindent
22905 Similarly, you can unmark an article if it has been erroneously marked
22906 as spam. @xref{Setting Marks}.
22907
22908 Normally, a ham message found in a non-ham group is not processed as
22909 ham---the rationale is that it should be moved into a ham group for
22910 further processing (see below). However, you can force these articles
22911 to be processed as ham by setting
22912 @code{spam-process-ham-in-spam-groups} and
22913 @code{spam-process-ham-in-nonham-groups}.
22914
22915 @vindex gnus-ham-process-destinations
22916 @vindex gnus-spam-process-destinations
22917 The second thing that the Spam package does when you exit a group is
22918 to move ham articles out of spam groups, and spam articles out of ham
22919 groups. Ham in a spam group is moved to the group specified by the
22920 variable @code{gnus-ham-process-destinations}, or the group parameter
22921 @code{ham-process-destination}. Spam in a ham group is moved to the
22922 group specified by the variable @code{gnus-spam-process-destinations},
22923 or the group parameter @code{spam-process-destination}. If these
22924 variables are not set, the articles are left in their current group.
22925 If an article cannot not be moved (e.g., with a read-only backend such
22926 as @acronym{NNTP}), it is copied.
22927
22928 If an article is moved to another group, it is processed again when
22929 you visit the new group. Normally, this is not a problem, but if you
22930 want each article to be processed only once, load the
22931 @code{gnus-registry.el} package and set the variable
22932 @code{spam-log-to-registry} to @code{t}. @xref{Spam Package
22933 Configuration Examples}.
22934
22935 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
22936 However, if you set @code{spam-move-spam-nonspam-groups-only} to
22937 @code{nil}, spam will also be moved out of spam groups, depending on
22938 the @code{spam-process-destination} parameter.
22939
22940 The final thing the Spam package does is to mark spam articles as
22941 expired, which is usually the right thing to do.
22942
22943 If all this seems confusing, don't worry. Soon it will be as natural
22944 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
22945 50 years in the future yet. Just trust us, it's not so bad.
22946
22947 @node Filtering Incoming Mail
22948 @subsection Filtering Incoming Mail
22949 @cindex spam filtering
22950 @cindex spam filtering incoming mail
22951 @cindex spam
22952
22953 To use the Spam package to filter incoming mail, you must first set up
22954 fancy mail splitting. @xref{Fancy Mail Splitting}. The Spam package
22955 defines a special splitting function that you can add to your fancy
22956 split variable (either @code{nnmail-split-fancy} or
22957 @code{nnimap-split-fancy}, depending on your mail back end):
22958
22959 @example
22960 (: spam-split)
22961 @end example
22962
22963 @vindex spam-split-group
22964 @noindent
22965 The @code{spam-split} function scans incoming mail according to your
22966 chosen spam back end(s), and sends messages identified as spam to a
22967 spam group. By default, the spam group is a group named @samp{spam},
22968 but you can change this by customizing @code{spam-split-group}. Make
22969 sure the contents of @code{spam-split-group} are an unqualified group
22970 name. For instance, in an @code{nnimap} server @samp{your-server},
22971 the value @samp{spam} means @samp{nnimap+your-server:spam}. The value
22972 @samp{nnimap+server:spam} is therefore wrong---it gives the group
22973 @samp{nnimap+your-server:nnimap+server:spam}.
22974
22975 @code{spam-split} does not modify the contents of messages in any way.
22976
22977 @vindex nnimap-split-download-body
22978 Note for IMAP users: if you use the @code{spam-check-bogofilter},
22979 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
22980 you should also set set the variable @code{nnimap-split-download-body}
22981 to @code{t}. These spam back ends are most useful when they can
22982 ``scan'' the full message body. By default, the nnimap back end only
22983 retrieves the message headers; @code{nnimap-split-download-body} tells
22984 it to retrieve the message bodies as well. We don't set this by
22985 default because it will slow @acronym{IMAP} down, and that is not an
22986 appropriate decision to make on behalf of the user. @xref{Splitting
22987 in IMAP}.
22988
22989 You have to specify one or more spam back ends for @code{spam-split}
22990 to use, by setting the @code{spam-use-*} variables. @xref{Spam Back
22991 Ends}. Normally, @code{spam-split} simply uses all the spam back ends
22992 you enabled in this way. However, you can tell @code{spam-split} to
22993 use only some of them. Why this is useful? Suppose you are using the
22994 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
22995 ends, and the following split rule:
22996
22997 @example
22998 nnimap-split-fancy '(|
22999 (any "ding" "ding")
23000 (: spam-split)
23001 ;; @r{default mailbox}
23002 "mail")
23003 @end example
23004
23005 @noindent
23006 The problem is that you want all ding messages to make it to the ding
23007 folder. But that will let obvious spam (for example, spam detected by
23008 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
23009 sent to the ding list. On the other hand, some messages to the ding
23010 list are from a mail server in the blackhole list, so the invocation
23011 of @code{spam-split} can't be before the ding rule.
23012
23013 The solution is to let SpamAssassin headers supersede ding rules, and
23014 perform the other @code{spam-split} rules (including a second
23015 invocation of the regex-headers check) after the ding rule. This is
23016 done by passing a parameter to @code{spam-split}:
23017
23018 @example
23019 nnimap-split-fancy
23020 '(|
23021 ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
23022 (: spam-split "regex-spam" 'spam-use-regex-headers)
23023 (any "ding" "ding")
23024 ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
23025 (: spam-split)
23026 ;; @r{default mailbox}
23027 "mail")
23028 @end example
23029
23030 @noindent
23031 This lets you invoke specific @code{spam-split} checks depending on
23032 your particular needs, and target the results of those checks to a
23033 particular spam group. You don't have to throw all mail into all the
23034 spam tests. Another reason why this is nice is that messages to
23035 mailing lists you have rules for don't have to have resource-intensive
23036 blackhole checks performed on them. You could also specify different
23037 spam checks for your nnmail split vs. your nnimap split. Go crazy.
23038
23039 You should set the @code{spam-use-*} variables for whatever spam back
23040 ends you intend to use. The reason is that when loading
23041 @file{spam.el}, some conditional loading is done depending on what
23042 @code{spam-use-xyz} variables you have set. @xref{Spam Back Ends}.
23043
23044 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
23045 @c statistical databases. Some have that functionality built-in, others
23046 @c don't.}
23047
23048 @node Detecting Spam in Groups
23049 @subsection Detecting Spam in Groups
23050
23051 To detect spam when visiting a group, set the group's
23052 @code{spam-autodetect} and @code{spam-autodetect-methods} group
23053 parameters. These are accessible with @kbd{G c} or @kbd{G p}, as
23054 usual (@pxref{Group Parameters}).
23055
23056 You should set the @code{spam-use-*} variables for whatever spam back
23057 ends you intend to use. The reason is that when loading
23058 @file{spam.el}, some conditional loading is done depending on what
23059 @code{spam-use-xyz} variables you have set.
23060
23061 By default, only unseen articles are processed for spam. You can
23062 force Gnus to recheck all messages in the group by setting the
23063 variable @code{spam-autodetect-recheck-messages} to @code{t}.
23064
23065 If you use the @code{spam-autodetect} method of checking for spam, you
23066 can specify different spam detection methods for different groups.
23067 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
23068 the autodetection method, while the @samp{suspect} group may have the
23069 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
23070 enabled. Unlike with @code{spam-split}, you don't have any control
23071 over the @emph{sequence} of checks, but this is probably unimportant.
23072
23073 @node Spam and Ham Processors
23074 @subsection Spam and Ham Processors
23075 @cindex spam filtering
23076 @cindex spam filtering variables
23077 @cindex spam variables
23078 @cindex spam
23079
23080 @vindex gnus-spam-process-newsgroups
23081 Spam and ham processors specify special actions to take when you exit
23082 a group buffer. Spam processors act on spam messages, and ham
23083 processors on ham messages. At present, the main role of these
23084 processors is to update the dictionaries of dictionary-based spam back
23085 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
23086 package (@pxref{Spam Statistics Filtering}).
23087
23088 The spam and ham processors that apply to each group are determined by
23089 the group's@code{spam-process} group parameter. If this group
23090 parameter is not defined, they are determined by the variable
23091 @code{gnus-spam-process-newsgroups}.
23092
23093 @vindex gnus-spam-newsgroup-contents
23094 Gnus learns from the spam you get. You have to collect your spam in
23095 one or more spam groups, and set or customize the variable
23096 @code{spam-junk-mailgroups} as appropriate. You can also declare
23097 groups to contain spam by setting their group parameter
23098 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
23099 by customizing the corresponding variable
23100 @code{gnus-spam-newsgroup-contents}. The @code{spam-contents} group
23101 parameter and the @code{gnus-spam-newsgroup-contents} variable can
23102 also be used to declare groups as @emph{ham} groups if you set their
23103 classification to @code{gnus-group-spam-classification-ham}. If
23104 groups are not classified by means of @code{spam-junk-mailgroups},
23105 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
23106 considered @emph{unclassified}. All groups are unclassified by
23107 default.
23108
23109 @vindex gnus-spam-mark
23110 @cindex $
23111 In spam groups, all messages are considered to be spam by default:
23112 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
23113 group. If you have seen a message, had it marked as spam, then
23114 unmarked it, it won't be marked as spam when you enter the group
23115 thereafter. You can disable that behavior, so all unread messages
23116 will get the @samp{$} mark, if you set the
23117 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}. You
23118 should remove the @samp{$} mark when you are in the group summary
23119 buffer for every message that is not spam after all. To remove the
23120 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
23121 @kbd{d} for declaring it read the non-spam way. When you leave a
23122 group, all spam-marked (@samp{$}) articles are sent to a spam
23123 processor which will study them as spam samples.
23124
23125 Messages may also be deleted in various other ways, and unless
23126 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
23127 and @samp{r} for default read or explicit delete, marks @samp{X} and
23128 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
23129 low scores, are all considered to be associated with articles which
23130 are not spam. This assumption might be false, in particular if you
23131 use kill files or score files as means for detecting genuine spam, you
23132 should then adjust the @code{ham-marks} group parameter.
23133
23134 @defvar ham-marks
23135 You can customize this group or topic parameter to be the list of
23136 marks you want to consider ham. By default, the list contains the
23137 deleted, read, killed, kill-filed, and low-score marks (the idea is
23138 that these articles have been read, but are not spam). It can be
23139 useful to also include the tick mark in the ham marks. It is not
23140 recommended to make the unread mark a ham mark, because it normally
23141 indicates a lack of classification. But you can do it, and we'll be
23142 happy for you.
23143 @end defvar
23144
23145 @defvar spam-marks
23146 You can customize this group or topic parameter to be the list of
23147 marks you want to consider spam. By default, the list contains only
23148 the spam mark. It is not recommended to change that, but you can if
23149 you really want to.
23150 @end defvar
23151
23152 When you leave @emph{any} group, regardless of its
23153 @code{spam-contents} classification, all spam-marked articles are sent
23154 to a spam processor, which will study these as spam samples. If you
23155 explicit kill a lot, you might sometimes end up with articles marked
23156 @samp{K} which you never saw, and which might accidentally contain
23157 spam. Best is to make sure that real spam is marked with @samp{$},
23158 and nothing else.
23159
23160 @vindex gnus-ham-process-destinations
23161 When you leave a @emph{spam} group, all spam-marked articles are
23162 marked as expired after processing with the spam processor. This is
23163 not done for @emph{unclassified} or @emph{ham} groups. Also, any
23164 @strong{ham} articles in a spam group will be moved to a location
23165 determined by either the @code{ham-process-destination} group
23166 parameter or a match in the @code{gnus-ham-process-destinations}
23167 variable, which is a list of regular expressions matched with group
23168 names (it's easiest to customize this variable with @kbd{M-x
23169 customize-variable @key{RET} gnus-ham-process-destinations}). Each
23170 group name list is a standard Lisp list, if you prefer to customize
23171 the variable manually. If the @code{ham-process-destination}
23172 parameter is not set, ham articles are left in place. If the
23173 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
23174 set, the ham articles are marked as unread before being moved.
23175
23176 If ham can not be moved---because of a read-only backend such as
23177 @acronym{NNTP}, for example, it will be copied.
23178
23179 Note that you can use multiples destinations per group or regular
23180 expression! This enables you to send your ham to a regular mail
23181 group and to a @emph{ham training} group.
23182
23183 When you leave a @emph{ham} group, all ham-marked articles are sent to
23184 a ham processor, which will study these as non-spam samples.
23185
23186 @vindex spam-process-ham-in-spam-groups
23187 By default the variable @code{spam-process-ham-in-spam-groups} is
23188 @code{nil}. Set it to @code{t} if you want ham found in spam groups
23189 to be processed. Normally this is not done, you are expected instead
23190 to send your ham to a ham group and process it there.
23191
23192 @vindex spam-process-ham-in-nonham-groups
23193 By default the variable @code{spam-process-ham-in-nonham-groups} is
23194 @code{nil}. Set it to @code{t} if you want ham found in non-ham (spam
23195 or unclassified) groups to be processed. Normally this is not done,
23196 you are expected instead to send your ham to a ham group and process
23197 it there.
23198
23199 @vindex gnus-spam-process-destinations
23200 When you leave a @emph{ham} or @emph{unclassified} group, all
23201 @strong{spam} articles are moved to a location determined by either
23202 the @code{spam-process-destination} group parameter or a match in the
23203 @code{gnus-spam-process-destinations} variable, which is a list of
23204 regular expressions matched with group names (it's easiest to
23205 customize this variable with @kbd{M-x customize-variable @key{RET}
23206 gnus-spam-process-destinations}). Each group name list is a standard
23207 Lisp list, if you prefer to customize the variable manually. If the
23208 @code{spam-process-destination} parameter is not set, the spam
23209 articles are only expired. The group name is fully qualified, meaning
23210 that if you see @samp{nntp:servername} before the group name in the
23211 group buffer then you need it here as well.
23212
23213 If spam can not be moved---because of a read-only backend such as
23214 @acronym{NNTP}, for example, it will be copied.
23215
23216 Note that you can use multiples destinations per group or regular
23217 expression! This enables you to send your spam to multiple @emph{spam
23218 training} groups.
23219
23220 @vindex spam-log-to-registry
23221 The problem with processing ham and spam is that Gnus doesn't track
23222 this processing by default. Enable the @code{spam-log-to-registry}
23223 variable so @code{spam.el} will use @code{gnus-registry.el} to track
23224 what articles have been processed, and avoid processing articles
23225 multiple times. Keep in mind that if you limit the number of registry
23226 entries, this won't work as well as it does without a limit.
23227
23228 @vindex spam-mark-only-unseen-as-spam
23229 Set this variable if you want only unseen articles in spam groups to
23230 be marked as spam. By default, it is set. If you set it to
23231 @code{nil}, unread articles will also be marked as spam.
23232
23233 @vindex spam-mark-ham-unread-before-move-from-spam-group
23234 Set this variable if you want ham to be unmarked before it is moved
23235 out of the spam group. This is very useful when you use something
23236 like the tick mark @samp{!} to mark ham---the article will be placed
23237 in your @code{ham-process-destination}, unmarked as if it came fresh
23238 from the mail server.
23239
23240 @vindex spam-autodetect-recheck-messages
23241 When autodetecting spam, this variable tells @code{spam.el} whether
23242 only unseen articles or all unread articles should be checked for
23243 spam. It is recommended that you leave it off.
23244
23245 @node Spam Package Configuration Examples
23246 @subsection Spam Package Configuration Examples
23247 @cindex spam filtering
23248 @cindex spam filtering configuration examples
23249 @cindex spam configuration examples
23250 @cindex spam
23251
23252 @subsubheading Ted's setup
23253
23254 From Ted Zlatanov <tzz@@lifelogs.com>.
23255 @example
23256 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
23257 ;; @r{see @file{gnus-registry.el} for more information}
23258 (gnus-registry-initialize)
23259 (spam-initialize)
23260
23261 ;; @r{I like @kbd{C-s} for marking spam}
23262 (define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam)
23263
23264 (setq
23265 spam-log-to-registry t ; @r{for spam autodetection}
23266 spam-use-BBDB t
23267 spam-use-regex-headers t ; @r{catch X-Spam-Flag (SpamAssassin)}
23268 ;; @r{all groups with @samp{spam} in the name contain spam}
23269 gnus-spam-newsgroup-contents
23270 '(("spam" gnus-group-spam-classification-spam))
23271 ;; @r{see documentation for these}
23272 spam-move-spam-nonspam-groups-only nil
23273 spam-mark-only-unseen-as-spam t
23274 spam-mark-ham-unread-before-move-from-spam-group t
23275 nnimap-split-rule 'nnimap-split-fancy
23276 ;; @r{understand what this does before you copy it to your own setup!}
23277 nnimap-split-fancy '(|
23278 ;; @r{trace references to parents and put in their group}
23279 (: gnus-registry-split-fancy-with-parent)
23280 ;; @r{this will catch server-side SpamAssassin tags}
23281 (: spam-split 'spam-use-regex-headers)
23282 (any "ding" "ding")
23283 ;; @r{note that spam by default will go to @samp{spam}}
23284 (: spam-split)
23285 ;; @r{default mailbox}
23286 "mail"))
23287
23288 ;; @r{my parameters, set with @kbd{G p}}
23289
23290 ;; @r{all nnml groups, and all nnimap groups except}
23291 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
23292 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
23293 ;; @r{because it must have been detected manually}
23294
23295 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23296
23297 ;; @r{all @acronym{NNTP} groups}
23298 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
23299 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
23300 ;; @r{send all spam to the training group}
23301 (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23302
23303 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
23304 ((spam-autodetect . t))
23305
23306 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
23307
23308 ;; @r{this is a spam group}
23309 ((spam-contents gnus-group-spam-classification-spam)
23310
23311 ;; @r{any spam (which happens when I enter for all unseen messages,}
23312 ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
23313 ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
23314
23315 (spam-process-destination "nnimap+mail.lifelogs.com:train")
23316
23317 ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
23318 ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
23319
23320 (ham-process-destination "nnimap+mail.lifelogs.com:mail"
23321 "nnimap+mail.lifelogs.com:trainham")
23322 ;; @r{in this group, only @samp{!} marks are ham}
23323 (ham-marks
23324 (gnus-ticked-mark))
23325 ;; @r{remembers senders in the blacklist on the way out---this is}
23326 ;; @r{definitely not needed, it just makes me feel better}
23327 (spam-process (gnus-group-spam-exit-processor-blacklist)))
23328
23329 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
23330 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
23331 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
23332
23333 @end example
23334
23335 @subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server
23336 From Reiner Steib <reiner.steib@@gmx.de>.
23337
23338 My provider has set up bogofilter (in combination with @acronym{DCC}) on
23339 the mail server (@acronym{IMAP}). Recognized spam goes to
23340 @samp{spam.detected}, the rest goes through the normal filter rules,
23341 i.e. to @samp{some.folder} or to @samp{INBOX}. Training on false
23342 positives or negatives is done by copying or moving the article to
23343 @samp{training.ham} or @samp{training.spam} respectively. A cron job on
23344 the server feeds those to bogofilter with the suitable ham or spam
23345 options and deletes them from the @samp{training.ham} and
23346 @samp{training.spam} folders.
23347
23348 With the following entries in @code{gnus-parameters}, @code{spam.el}
23349 does most of the job for me:
23350
23351 @lisp
23352 ("nnimap:spam\\.detected"
23353 (gnus-article-sort-functions '(gnus-article-sort-by-chars))
23354 (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
23355 (spam-contents gnus-group-spam-classification-spam))
23356 ("nnimap:\\(INBOX\\|other-folders\\)"
23357 (spam-process-destination . "nnimap:training.spam")
23358 (spam-contents gnus-group-spam-classification-ham))
23359 @end lisp
23360
23361 @itemize
23362
23363 @item @b{The Spam folder:}
23364
23365 In the folder @samp{spam.detected}, I have to check for false positives
23366 (i.e. legitimate mails, that were wrongly judged as spam by
23367 bogofilter or DCC).
23368
23369 Because of the @code{gnus-group-spam-classification-spam} entry, all
23370 messages are marked as spam (with @code{$}). When I find a false
23371 positive, I mark the message with some other ham mark
23372 (@code{ham-marks}, @ref{Spam and Ham Processors}). On group exit,
23373 those messages are copied to both groups, @samp{INBOX} (where I want
23374 to have the article) and @samp{training.ham} (for training bogofilter)
23375 and deleted from the @samp{spam.detected} folder.
23376
23377 The @code{gnus-article-sort-by-chars} entry simplifies detection of
23378 false positives for me. I receive lots of worms (sweN, @dots{}), that all
23379 have a similar size. Grouping them by size (i.e. chars) makes finding
23380 other false positives easier. (Of course worms aren't @i{spam}
23381 (@acronym{UCE}, @acronym{UBE}) strictly speaking. Anyhow, bogofilter is
23382 an excellent tool for filtering those unwanted mails for me.)
23383
23384 @item @b{Ham folders:}
23385
23386 In my ham folders, I just hit @kbd{S x}
23387 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
23388 mail (false negative). On group exit, those messages are moved to
23389 @samp{training.ham}.
23390 @end itemize
23391
23392 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
23393
23394 From Reiner Steib <reiner.steib@@gmx.de>.
23395
23396 With following entry in @code{gnus-parameters}, @kbd{S x}
23397 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
23398 groups as spam and reports the to Gmane at group exit:
23399
23400 @lisp
23401 ("^gmane\\."
23402 (spam-process (gnus-group-spam-exit-processor-report-gmane)))
23403 @end lisp
23404
23405 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
23406 because I don't read the groups directly from news.gmane.org, but
23407 through my local news server (leafnode). I.e. the article numbers are
23408 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
23409 the @code{X-Report-Spam} header to find the correct number.
23410
23411 @node Spam Back Ends
23412 @subsection Spam Back Ends
23413 @cindex spam back ends
23414
23415 The spam package offers a variety of back ends for detecting spam.
23416 Each back end defines a set of methods for detecting spam
23417 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
23418 and a pair of spam and ham processors (@pxref{Spam and Ham
23419 Processors}).
23420
23421 @menu
23422 * Blacklists and Whitelists::
23423 * BBDB Whitelists::
23424 * Gmane Spam Reporting::
23425 * Anti-spam Hashcash Payments::
23426 * Blackholes::
23427 * Regular Expressions Header Matching::
23428 * Bogofilter::
23429 * ifile spam filtering::
23430 * Spam Statistics Filtering::
23431 * SpamOracle::
23432 @end menu
23433
23434 @node Blacklists and Whitelists
23435 @subsubsection Blacklists and Whitelists
23436 @cindex spam filtering
23437 @cindex whitelists, spam filtering
23438 @cindex blacklists, spam filtering
23439 @cindex spam
23440
23441 @defvar spam-use-blacklist
23442
23443 Set this variable to @code{t} if you want to use blacklists when
23444 splitting incoming mail. Messages whose senders are in the blacklist
23445 will be sent to the @code{spam-split-group}. This is an explicit
23446 filter, meaning that it acts only on mail senders @emph{declared} to
23447 be spammers.
23448
23449 @end defvar
23450
23451 @defvar spam-use-whitelist
23452
23453 Set this variable to @code{t} if you want to use whitelists when
23454 splitting incoming mail. Messages whose senders are not in the
23455 whitelist will be sent to the next spam-split rule. This is an
23456 explicit filter, meaning that unless someone is in the whitelist, their
23457 messages are not assumed to be spam or ham.
23458
23459 @end defvar
23460
23461 @defvar spam-use-whitelist-exclusive
23462
23463 Set this variable to @code{t} if you want to use whitelists as an
23464 implicit filter, meaning that every message will be considered spam
23465 unless the sender is in the whitelist. Use with care.
23466
23467 @end defvar
23468
23469 @defvar gnus-group-spam-exit-processor-blacklist
23470
23471 Add this symbol to a group's @code{spam-process} parameter by
23472 customizing the group parameters or the
23473 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23474 added to a group's @code{spam-process} parameter, the senders of
23475 spam-marked articles will be added to the blacklist.
23476
23477 @emph{WARNING}
23478
23479 Instead of the obsolete
23480 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
23481 that you use @code{'(spam spam-use-blacklist)}. Everything will work
23482 the same way, we promise.
23483
23484 @end defvar
23485
23486 @defvar gnus-group-ham-exit-processor-whitelist
23487
23488 Add this symbol to a group's @code{spam-process} parameter by
23489 customizing the group parameters or the
23490 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23491 added to a group's @code{spam-process} parameter, the senders of
23492 ham-marked articles in @emph{ham} groups will be added to the
23493 whitelist. Note that this ham processor has no effect in @emph{spam}
23494 or @emph{unclassified} groups.
23495
23496 @emph{WARNING}
23497
23498 Instead of the obsolete
23499 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
23500 that you use @code{'(ham spam-use-whitelist)}. Everything will work
23501 the same way, we promise.
23502
23503 @end defvar
23504
23505 Blacklists are lists of regular expressions matching addresses you
23506 consider to be spam senders. For instance, to block mail from any
23507 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
23508 blacklist. You start out with an empty blacklist. Blacklist entries
23509 use the Emacs regular expression syntax.
23510
23511 Conversely, whitelists tell Gnus what addresses are considered
23512 legitimate. All messages from whitelisted addresses are considered
23513 non-spam. Also see @ref{BBDB Whitelists}. Whitelist entries use the
23514 Emacs regular expression syntax.
23515
23516 The blacklist and whitelist file locations can be customized with the
23517 @code{spam-directory} variable (@file{~/News/spam} by default), or
23518 the @code{spam-whitelist} and @code{spam-blacklist} variables
23519 directly. The whitelist and blacklist files will by default be in the
23520 @code{spam-directory} directory, named @file{whitelist} and
23521 @file{blacklist} respectively.
23522
23523 @node BBDB Whitelists
23524 @subsubsection BBDB Whitelists
23525 @cindex spam filtering
23526 @cindex BBDB whitelists, spam filtering
23527 @cindex BBDB, spam filtering
23528 @cindex spam
23529
23530 @defvar spam-use-BBDB
23531
23532 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
23533 Whitelists}), but uses the BBDB as the source of whitelisted
23534 addresses, without regular expressions. You must have the BBDB loaded
23535 for @code{spam-use-BBDB} to work properly. Messages whose senders are
23536 not in the BBDB will be sent to the next spam-split rule. This is an
23537 explicit filter, meaning that unless someone is in the BBDB, their
23538 messages are not assumed to be spam or ham.
23539
23540 @end defvar
23541
23542 @defvar spam-use-BBDB-exclusive
23543
23544 Set this variable to @code{t} if you want to use the BBDB as an
23545 implicit filter, meaning that every message will be considered spam
23546 unless the sender is in the BBDB. Use with care. Only sender
23547 addresses in the BBDB will be allowed through; all others will be
23548 classified as spammers.
23549
23550 @end defvar
23551
23552 @defvar gnus-group-ham-exit-processor-BBDB
23553
23554 Add this symbol to a group's @code{spam-process} parameter by
23555 customizing the group parameters or the
23556 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23557 added to a group's @code{spam-process} parameter, the senders of
23558 ham-marked articles in @emph{ham} groups will be added to the
23559 BBDB. Note that this ham processor has no effect in @emph{spam}
23560 or @emph{unclassified} groups.
23561
23562 @emph{WARNING}
23563
23564 Instead of the obsolete
23565 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
23566 that you use @code{'(ham spam-use-BBDB)}. Everything will work
23567 the same way, we promise.
23568
23569 @end defvar
23570
23571 @node Gmane Spam Reporting
23572 @subsubsection Gmane Spam Reporting
23573 @cindex spam reporting
23574 @cindex Gmane, spam reporting
23575 @cindex Gmane, spam reporting
23576 @cindex spam
23577
23578 @defvar gnus-group-spam-exit-processor-report-gmane
23579
23580 Add this symbol to a group's @code{spam-process} parameter by
23581 customizing the group parameters or the
23582 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23583 added to a group's @code{spam-process} parameter, the spam-marked
23584 articles groups will be reported to the Gmane administrators via a
23585 HTTP request.
23586
23587 Gmane can be found at @uref{http://gmane.org}.
23588
23589 @emph{WARNING}
23590
23591 Instead of the obsolete
23592 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
23593 that you use @code{'(spam spam-use-gmane)}. Everything will work the
23594 same way, we promise.
23595
23596 @end defvar
23597
23598 @defvar spam-report-gmane-use-article-number
23599
23600 This variable is @code{t} by default. Set it to @code{nil} if you are
23601 running your own news server, for instance, and the local article
23602 numbers don't correspond to the Gmane article numbers. When
23603 @code{spam-report-gmane-use-article-number} is @code{nil},
23604 @code{spam-report.el} will use the @code{X-Report-Spam} header that
23605 Gmane provides.
23606
23607 @end defvar
23608
23609 @node Anti-spam Hashcash Payments
23610 @subsubsection Anti-spam Hashcash Payments
23611 @cindex spam filtering
23612 @cindex hashcash, spam filtering
23613 @cindex spam
23614
23615 @defvar spam-use-hashcash
23616
23617 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
23618 Whitelists}), but uses hashcash tokens for whitelisting messages
23619 instead of the sender address. You must have the @code{hashcash.el}
23620 package loaded for @code{spam-use-hashcash} to work properly.
23621 Messages without a hashcash payment token will be sent to the next
23622 spam-split rule. This is an explicit filter, meaning that unless a
23623 hashcash token is found, the messages are not assumed to be spam or
23624 ham.
23625
23626 @end defvar
23627
23628 @node Blackholes
23629 @subsubsection Blackholes
23630 @cindex spam filtering
23631 @cindex blackholes, spam filtering
23632 @cindex spam
23633
23634 @defvar spam-use-blackholes
23635
23636 This option is disabled by default. You can let Gnus consult the
23637 blackhole-type distributed spam processing systems (DCC, for instance)
23638 when you set this option. The variable @code{spam-blackhole-servers}
23639 holds the list of blackhole servers Gnus will consult. The current
23640 list is fairly comprehensive, but make sure to let us know if it
23641 contains outdated servers.
23642
23643 The blackhole check uses the @code{dig.el} package, but you can tell
23644 @file{spam.el} to use @code{dns.el} instead for better performance if
23645 you set @code{spam-use-dig} to @code{nil}. It is not recommended at
23646 this time to set @code{spam-use-dig} to @code{nil} despite the
23647 possible performance improvements, because some users may be unable to
23648 use it, but you can try it and see if it works for you.
23649
23650 @end defvar
23651
23652 @defvar spam-blackhole-servers
23653
23654 The list of servers to consult for blackhole checks.
23655
23656 @end defvar
23657
23658 @defvar spam-blackhole-good-server-regex
23659
23660 A regular expression for IPs that should not be checked against the
23661 blackhole server list. When set to @code{nil}, it has no effect.
23662
23663 @end defvar
23664
23665 @defvar spam-use-dig
23666
23667 Use the @code{dig.el} package instead of the @code{dns.el} package.
23668 The default setting of @code{t} is recommended.
23669
23670 @end defvar
23671
23672 Blackhole checks are done only on incoming mail. There is no spam or
23673 ham processor for blackholes.
23674
23675 @node Regular Expressions Header Matching
23676 @subsubsection Regular Expressions Header Matching
23677 @cindex spam filtering
23678 @cindex regular expressions header matching, spam filtering
23679 @cindex spam
23680
23681 @defvar spam-use-regex-headers
23682
23683 This option is disabled by default. You can let Gnus check the
23684 message headers against lists of regular expressions when you set this
23685 option. The variables @code{spam-regex-headers-spam} and
23686 @code{spam-regex-headers-ham} hold the list of regular expressions.
23687 Gnus will check against the message headers to determine if the
23688 message is spam or ham, respectively.
23689
23690 @end defvar
23691
23692 @defvar spam-regex-headers-spam
23693
23694 The list of regular expressions that, when matched in the headers of
23695 the message, positively identify it as spam.
23696
23697 @end defvar
23698
23699 @defvar spam-regex-headers-ham
23700
23701 The list of regular expressions that, when matched in the headers of
23702 the message, positively identify it as ham.
23703
23704 @end defvar
23705
23706 Regular expression header checks are done only on incoming mail.
23707 There is no specific spam or ham processor for regular expressions.
23708
23709 @node Bogofilter
23710 @subsubsection Bogofilter
23711 @cindex spam filtering
23712 @cindex bogofilter, spam filtering
23713 @cindex spam
23714
23715 @defvar spam-use-bogofilter
23716
23717 Set this variable if you want @code{spam-split} to use Eric Raymond's
23718 speedy Bogofilter.
23719
23720 With a minimum of care for associating the @samp{$} mark for spam
23721 articles only, Bogofilter training all gets fairly automatic. You
23722 should do this until you get a few hundreds of articles in each
23723 category, spam or not. The command @kbd{S t} in summary mode, either
23724 for debugging or for curiosity, shows the @emph{spamicity} score of
23725 the current article (between 0.0 and 1.0).
23726
23727 Bogofilter determines if a message is spam based on a specific
23728 threshold. That threshold can be customized, consult the Bogofilter
23729 documentation.
23730
23731 If the @code{bogofilter} executable is not in your path, Bogofilter
23732 processing will be turned off.
23733
23734 You should not enable this if you use @code{spam-use-bogofilter-headers}.
23735
23736 @end defvar
23737
23738 @table @kbd
23739 @item M s t
23740 @itemx S t
23741 @kindex M s t
23742 @kindex S t
23743 @findex spam-bogofilter-score
23744 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
23745 @end table
23746
23747 @defvar spam-use-bogofilter-headers
23748
23749 Set this variable if you want @code{spam-split} to use Eric Raymond's
23750 speedy Bogofilter, looking only at the message headers. It works
23751 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
23752 must be in the message already. Normally you would do this with a
23753 procmail recipe or something similar; consult the Bogofilter
23754 installation documents for details.
23755
23756 You should not enable this if you use @code{spam-use-bogofilter}.
23757
23758 @end defvar
23759
23760 @defvar gnus-group-spam-exit-processor-bogofilter
23761 Add this symbol to a group's @code{spam-process} parameter by
23762 customizing the group parameters or the
23763 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23764 added to a group's @code{spam-process} parameter, spam-marked articles
23765 will be added to the Bogofilter spam database.
23766
23767 @emph{WARNING}
23768
23769 Instead of the obsolete
23770 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
23771 that you use @code{'(spam spam-use-bogofilter)}. Everything will work
23772 the same way, we promise.
23773 @end defvar
23774
23775 @defvar gnus-group-ham-exit-processor-bogofilter
23776 Add this symbol to a group's @code{spam-process} parameter by
23777 customizing the group parameters or the
23778 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23779 added to a group's @code{spam-process} parameter, the ham-marked
23780 articles in @emph{ham} groups will be added to the Bogofilter database
23781 of non-spam messages. Note that this ham processor has no effect in
23782 @emph{spam} or @emph{unclassified} groups.
23783
23784 @emph{WARNING}
23785
23786 Instead of the obsolete
23787 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
23788 that you use @code{'(ham spam-use-bogofilter)}. Everything will work
23789 the same way, we promise.
23790 @end defvar
23791
23792 @defvar spam-bogofilter-database-directory
23793
23794 This is the directory where Bogofilter will store its databases. It
23795 is not specified by default, so Bogofilter will use its own default
23796 database directory.
23797
23798 @end defvar
23799
23800 The Bogofilter mail classifier is similar to @command{ifile} in intent and
23801 purpose. A ham and a spam processor are provided, plus the
23802 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
23803 variables to indicate to spam-split that Bogofilter should either be
23804 used, or has already been used on the article. The 0.9.2.1 version of
23805 Bogofilter was used to test this functionality.
23806
23807 @node ifile spam filtering
23808 @subsubsection ifile spam filtering
23809 @cindex spam filtering
23810 @cindex ifile, spam filtering
23811 @cindex spam
23812
23813 @defvar spam-use-ifile
23814
23815 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
23816 statistical analyzer similar to Bogofilter.
23817
23818 @end defvar
23819
23820 @defvar spam-ifile-all-categories
23821
23822 Enable this variable if you want @code{spam-use-ifile} to give you all
23823 the ifile categories, not just spam/non-spam. If you use this, make
23824 sure you train ifile as described in its documentation.
23825
23826 @end defvar
23827
23828 @defvar spam-ifile-spam-category
23829
23830 This is the category of spam messages as far as ifile is concerned.
23831 The actual string used is irrelevant, but you probably want to leave
23832 the default value of @samp{spam}.
23833 @end defvar
23834
23835 @defvar spam-ifile-database-path
23836
23837 This is the filename for the ifile database. It is not specified by
23838 default, so ifile will use its own default database name.
23839
23840 @end defvar
23841
23842 The ifile mail classifier is similar to Bogofilter in intent and
23843 purpose. A ham and a spam processor are provided, plus the
23844 @code{spam-use-ifile} variable to indicate to spam-split that ifile
23845 should be used. The 1.2.1 version of ifile was used to test this
23846 functionality.
23847
23848 @node Spam Statistics Filtering
23849 @subsubsection Spam Statistics Filtering
23850 @cindex spam filtering
23851 @cindex spam-stat, spam filtering
23852 @cindex spam-stat
23853 @cindex spam
23854
23855 This back end uses the Spam Statistics Emacs Lisp package to perform
23856 statistics-based filtering (@pxref{Spam Statistics Package}). Before
23857 using this, you may want to perform some additional steps to
23858 initialize your Spam Statistics dictionary. @xref{Creating a
23859 spam-stat dictionary}.
23860
23861 @defvar spam-use-stat
23862
23863 @end defvar
23864
23865 @defvar gnus-group-spam-exit-processor-stat
23866 Add this symbol to a group's @code{spam-process} parameter by
23867 customizing the group parameters or the
23868 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23869 added to a group's @code{spam-process} parameter, the spam-marked
23870 articles will be added to the spam-stat database of spam messages.
23871
23872 @emph{WARNING}
23873
23874 Instead of the obsolete
23875 @code{gnus-group-spam-exit-processor-stat}, it is recommended
23876 that you use @code{'(spam spam-use-stat)}. Everything will work
23877 the same way, we promise.
23878 @end defvar
23879
23880 @defvar gnus-group-ham-exit-processor-stat
23881 Add this symbol to a group's @code{spam-process} parameter by
23882 customizing the group parameters or the
23883 @code{gnus-spam-process-newsgroups} variable. When this symbol is
23884 added to a group's @code{spam-process} parameter, the ham-marked
23885 articles in @emph{ham} groups will be added to the spam-stat database
23886 of non-spam messages. Note that this ham processor has no effect in
23887 @emph{spam} or @emph{unclassified} groups.
23888
23889 @emph{WARNING}
23890
23891 Instead of the obsolete
23892 @code{gnus-group-ham-exit-processor-stat}, it is recommended
23893 that you use @code{'(ham spam-use-stat)}. Everything will work
23894 the same way, we promise.
23895 @end defvar
23896
23897 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23898 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23899 which unlike ifile or Bogofilter does not require external programs.
23900 A spam and a ham processor, and the @code{spam-use-stat} variable for
23901 @code{spam-split} are provided.
23902
23903 @node SpamOracle
23904 @subsubsection Using SpamOracle with Gnus
23905 @cindex spam filtering
23906 @cindex SpamOracle
23907 @cindex spam
23908
23909 An easy way to filter out spam is to use SpamOracle. SpamOracle is an
23910 statistical mail filtering tool written by Xavier Leroy and needs to be
23911 installed separately.
23912
23913 There are several ways to use SpamOracle with Gnus. In all cases, your
23914 mail is piped through SpamOracle in its @emph{mark} mode. SpamOracle will
23915 then enter an @samp{X-Spam} header indicating whether it regards the
23916 mail as a spam mail or not.
23917
23918 One possibility is to run SpamOracle as a @code{:prescript} from the
23919 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}). This method has
23920 the advantage that the user can see the @emph{X-Spam} headers.
23921
23922 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
23923 call SpamOracle.
23924
23925 @vindex spam-use-spamoracle
23926 To enable SpamOracle usage by @file{spam.el}, set the variable
23927 @code{spam-use-spamoracle} to @code{t} and configure the
23928 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}. @xref{Spam
23929 Package}. In this example the @samp{INBOX} of an nnimap server is
23930 filtered using SpamOracle. Mails recognized as spam mails will be
23931 moved to @code{spam-split-group}, @samp{Junk} in this case. Ham
23932 messages stay in @samp{INBOX}:
23933
23934 @example
23935 (setq spam-use-spamoracle t
23936 spam-split-group "Junk"
23937 nnimap-split-inbox '("INBOX")
23938 nnimap-split-rule 'nnimap-split-fancy
23939 nnimap-split-fancy '(| (: spam-split) "INBOX"))
23940 @end example
23941
23942 @defvar spam-use-spamoracle
23943 Set to @code{t} if you want Gnus to enable spam filtering using
23944 SpamOracle.
23945 @end defvar
23946
23947 @defvar spam-spamoracle-binary
23948 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23949 user's PATH. Using the variable @code{spam-spamoracle-binary}, this
23950 can be customized.
23951 @end defvar
23952
23953 @defvar spam-spamoracle-database
23954 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23955 store its analyses. This is controlled by the variable
23956 @code{spam-spamoracle-database} which defaults to @code{nil}. That means
23957 the default SpamOracle database will be used. In case you want your
23958 database to live somewhere special, set
23959 @code{spam-spamoracle-database} to this path.
23960 @end defvar
23961
23962 SpamOracle employs a statistical algorithm to determine whether a
23963 message is spam or ham. In order to get good results, meaning few
23964 false hits or misses, SpamOracle needs training. SpamOracle learns
23965 the characteristics of your spam mails. Using the @emph{add} mode
23966 (training mode) one has to feed good (ham) and spam mails to
23967 SpamOracle. This can be done by pressing @kbd{|} in the Summary
23968 buffer and pipe the mail to a SpamOracle process or using
23969 @file{spam.el}'s spam- and ham-processors, which is much more
23970 convenient. For a detailed description of spam- and ham-processors,
23971 @xref{Spam Package}.
23972
23973 @defvar gnus-group-spam-exit-processor-spamoracle
23974 Add this symbol to a group's @code{spam-process} parameter by
23975 customizing the group parameter or the
23976 @code{gnus-spam-process-newsgroups} variable. When this symbol is added
23977 to a group's @code{spam-process} parameter, spam-marked articles will be
23978 sent to SpamOracle as spam samples.
23979
23980 @emph{WARNING}
23981
23982 Instead of the obsolete
23983 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
23984 that you use @code{'(spam spam-use-spamoracle)}. Everything will work
23985 the same way, we promise.
23986 @end defvar
23987
23988 @defvar gnus-group-ham-exit-processor-spamoracle
23989 Add this symbol to a group's @code{spam-process} parameter by
23990 customizing the group parameter or the
23991 @code{gnus-spam-process-newsgroups} variable. When this symbol is added
23992 to a group's @code{spam-process} parameter, the ham-marked articles in
23993 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23994 messages. Note that this ham processor has no effect in @emph{spam} or
23995 @emph{unclassified} groups.
23996
23997 @emph{WARNING}
23998
23999 Instead of the obsolete
24000 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
24001 that you use @code{'(ham spam-use-spamoracle)}. Everything will work
24002 the same way, we promise.
24003 @end defvar
24004
24005 @emph{Example:} These are the Group Parameters of a group that has been
24006 classified as a ham group, meaning that it should only contain ham
24007 messages.
24008 @example
24009 ((spam-contents gnus-group-spam-classification-ham)
24010 (spam-process ((ham spam-use-spamoracle)
24011 (spam spam-use-spamoracle))))
24012 @end example
24013 For this group the @code{spam-use-spamoracle} is installed for both
24014 ham and spam processing. If the group contains spam message
24015 (e.g. because SpamOracle has not had enough sample messages yet) and
24016 the user marks some messages as spam messages, these messages will be
24017 processed by SpamOracle. The processor sends the messages to
24018 SpamOracle as new samples for spam.
24019
24020 @node Extending the Spam package
24021 @subsection Extending the Spam package
24022 @cindex spam filtering
24023 @cindex spam elisp package, extending
24024 @cindex extending the spam elisp package
24025
24026 Say you want to add a new back end called blackbox. For filtering
24027 incoming mail, provide the following:
24028
24029 @enumerate
24030
24031 @item
24032 Code
24033
24034 @lisp
24035 (defvar spam-use-blackbox nil
24036 "True if blackbox should be used.")
24037 @end lisp
24038
24039 Add
24040 @lisp
24041 (spam-use-blackbox . spam-check-blackbox)
24042 @end lisp
24043 to @code{spam-list-of-checks}.
24044
24045 Add
24046 @lisp
24047 (gnus-group-ham-exit-processor-blackbox ham spam-use-blackbox)
24048 (gnus-group-spam-exit-processor-blackbox spam spam-use-blackbox)
24049 @end lisp
24050
24051 to @code{spam-list-of-processors}.
24052
24053 Add
24054 @lisp
24055 (spam-use-blackbox spam-blackbox-register-routine
24056 nil
24057 spam-blackbox-unregister-routine
24058 nil)
24059 @end lisp
24060
24061 to @code{spam-registration-functions}. Write the register/unregister
24062 routines using the bogofilter register/unregister routines as a
24063 start, or other restister/unregister routines more appropriate to
24064 Blackbox.
24065
24066 @item
24067 Functionality
24068
24069 Write the @code{spam-check-blackbox} function. It should return
24070 @samp{nil} or @code{spam-split-group}, observing the other
24071 conventions. See the existing @code{spam-check-*} functions for
24072 examples of what you can do, and stick to the template unless you
24073 fully understand the reasons why you aren't.
24074
24075 Make sure to add @code{spam-use-blackbox} to
24076 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
24077 mail analyzer that needs the full message body to operate.
24078
24079 @end enumerate
24080
24081 For processing spam and ham messages, provide the following:
24082
24083 @enumerate
24084
24085 @item
24086 Code
24087
24088 Note you don't have to provide a spam or a ham processor. Only
24089 provide them if Blackbox supports spam or ham processing.
24090
24091 Also, ham and spam processors are being phased out as single
24092 variables. Instead the form @code{'(spam spam-use-blackbox)} or
24093 @code{'(ham spam-use-blackbox)} is favored. For now, spam/ham
24094 processor variables are still around but they won't be for long.
24095
24096 @lisp
24097 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
24098 "The Blackbox summary exit spam processor.
24099 Only applicable to spam groups.")
24100
24101 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
24102 "The whitelist summary exit ham processor.
24103 Only applicable to non-spam (unclassified and ham) groups.")
24104
24105 @end lisp
24106
24107 @item
24108 Gnus parameters
24109
24110 Add
24111 @lisp
24112 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
24113 (const :tag "Ham: Blackbox" (ham spam-use-blackbox))
24114 @end lisp
24115 to the @code{spam-process} group parameter in @code{gnus.el}. Make
24116 sure you do it twice, once for the parameter and once for the
24117 variable customization.
24118
24119 Add
24120 @lisp
24121 (variable-item spam-use-blackbox)
24122 @end lisp
24123 to the @code{spam-autodetect-methods} group parameter in
24124 @code{gnus.el}.
24125
24126 @end enumerate
24127
24128 @node Spam Statistics Package
24129 @subsection Spam Statistics Package
24130 @cindex Paul Graham
24131 @cindex Graham, Paul
24132 @cindex naive Bayesian spam filtering
24133 @cindex Bayesian spam filtering, naive
24134 @cindex spam filtering, naive Bayesian
24135
24136 Paul Graham has written an excellent essay about spam filtering using
24137 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
24138 Spam}. In it he describes the inherent deficiency of rule-based
24139 filtering as used by SpamAssassin, for example: Somebody has to write
24140 the rules, and everybody else has to install these rules. You are
24141 always late. It would be much better, he argues, to filter mail based
24142 on whether it somehow resembles spam or non-spam. One way to measure
24143 this is word distribution. He then goes on to describe a solution
24144 that checks whether a new mail resembles any of your other spam mails
24145 or not.
24146
24147 The basic idea is this: Create a two collections of your mail, one
24148 with spam, one with non-spam. Count how often each word appears in
24149 either collection, weight this by the total number of mails in the
24150 collections, and store this information in a dictionary. For every
24151 word in a new mail, determine its probability to belong to a spam or a
24152 non-spam mail. Use the 15 most conspicuous words, compute the total
24153 probability of the mail being spam. If this probability is higher
24154 than a certain threshold, the mail is considered to be spam.
24155
24156 The Spam Statistics package adds support to Gnus for this kind of
24157 filtering. It can be used as one of the back ends of the Spam package
24158 (@pxref{Spam Package}), or by itself.
24159
24160 Before using the Spam Statistics package, you need to set it up.
24161 First, you need two collections of your mail, one with spam, one with
24162 non-spam. Then you need to create a dictionary using these two
24163 collections, and save it. And last but not least, you need to use
24164 this dictionary in your fancy mail splitting rules.
24165
24166 @menu
24167 * Creating a spam-stat dictionary::
24168 * Splitting mail using spam-stat::
24169 * Low-level interface to the spam-stat dictionary::
24170 @end menu
24171
24172 @node Creating a spam-stat dictionary
24173 @subsubsection Creating a spam-stat dictionary
24174
24175 Before you can begin to filter spam based on statistics, you must
24176 create these statistics based on two mail collections, one with spam,
24177 one with non-spam. These statistics are then stored in a dictionary
24178 for later use. In order for these statistics to be meaningful, you
24179 need several hundred emails in both collections.
24180
24181 Gnus currently supports only the nnml back end for automated dictionary
24182 creation. The nnml back end stores all mails in a directory, one file
24183 per mail. Use the following:
24184
24185 @defun spam-stat-process-spam-directory
24186 Create spam statistics for every file in this directory. Every file
24187 is treated as one spam mail.
24188 @end defun
24189
24190 @defun spam-stat-process-non-spam-directory
24191 Create non-spam statistics for every file in this directory. Every
24192 file is treated as one non-spam mail.
24193 @end defun
24194
24195 Usually you would call @code{spam-stat-process-spam-directory} on a
24196 directory such as @file{~/Mail/mail/spam} (this usually corresponds
24197 the the group @samp{nnml:mail.spam}), and you would call
24198 @code{spam-stat-process-non-spam-directory} on a directory such as
24199 @file{~/Mail/mail/misc} (this usually corresponds the the group
24200 @samp{nnml:mail.misc}).
24201
24202 When you are using @acronym{IMAP}, you won't have the mails available
24203 locally, so that will not work. One solution is to use the Gnus Agent
24204 to cache the articles. Then you can use directories such as
24205 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
24206 @code{spam-stat-process-spam-directory}. @xref{Agent as Cache}.
24207
24208 @defvar spam-stat
24209 This variable holds the hash-table with all the statistics---the
24210 dictionary we have been talking about. For every word in either
24211 collection, this hash-table stores a vector describing how often the
24212 word appeared in spam and often it appeared in non-spam mails.
24213 @end defvar
24214
24215 If you want to regenerate the statistics from scratch, you need to
24216 reset the dictionary.
24217
24218 @defun spam-stat-reset
24219 Reset the @code{spam-stat} hash-table, deleting all the statistics.
24220 @end defun
24221
24222 When you are done, you must save the dictionary. The dictionary may
24223 be rather large. If you will not update the dictionary incrementally
24224 (instead, you will recreate it once a month, for example), then you
24225 can reduce the size of the dictionary by deleting all words that did
24226 not appear often enough or that do not clearly belong to only spam or
24227 only non-spam mails.
24228
24229 @defun spam-stat-reduce-size
24230 Reduce the size of the dictionary. Use this only if you do not want
24231 to update the dictionary incrementally.
24232 @end defun
24233
24234 @defun spam-stat-save
24235 Save the dictionary.
24236 @end defun
24237
24238 @defvar spam-stat-file
24239 The filename used to store the dictionary. This defaults to
24240 @file{~/.spam-stat.el}.
24241 @end defvar
24242
24243 @node Splitting mail using spam-stat
24244 @subsubsection Splitting mail using spam-stat
24245
24246 This section describes how to use the Spam statistics
24247 @emph{independently} of the @xref{Spam Package}.
24248
24249 First, add the following to your @file{~/.gnus.el} file:
24250
24251 @lisp
24252 (require 'spam-stat)
24253 (spam-stat-load)
24254 @end lisp
24255
24256 This will load the necessary Gnus code, and the dictionary you
24257 created.
24258
24259 Next, you need to adapt your fancy splitting rules: You need to
24260 determine how to use @code{spam-stat}. The following examples are for
24261 the nnml back end. Using the nnimap back end works just as well. Just
24262 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
24263
24264 In the simplest case, you only have two groups, @samp{mail.misc} and
24265 @samp{mail.spam}. The following expression says that mail is either
24266 spam or it should go into @samp{mail.misc}. If it is spam, then
24267 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
24268
24269 @lisp
24270 (setq nnmail-split-fancy
24271 `(| (: spam-stat-split-fancy)
24272 "mail.misc"))
24273 @end lisp
24274
24275 @defvar spam-stat-split-fancy-spam-group
24276 The group to use for spam. Default is @samp{mail.spam}.
24277 @end defvar
24278
24279 If you also filter mail with specific subjects into other groups, use
24280 the following expression. Only mails not matching the regular
24281 expression are considered potential spam.
24282
24283 @lisp
24284 (setq nnmail-split-fancy
24285 `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
24286 (: spam-stat-split-fancy)
24287 "mail.misc"))
24288 @end lisp
24289
24290 If you want to filter for spam first, then you must be careful when
24291 creating the dictionary. Note that @code{spam-stat-split-fancy} must
24292 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
24293 non-spam, therefore both should be in your collection of non-spam
24294 mails, when creating the dictionary!
24295
24296 @lisp
24297 (setq nnmail-split-fancy
24298 `(| (: spam-stat-split-fancy)
24299 ("Subject" "\\bspam-stat\\b" "mail.emacs")
24300 "mail.misc"))
24301 @end lisp
24302
24303 You can combine this with traditional filtering. Here, we move all
24304 HTML-only mails into the @samp{mail.spam.filtered} group. Note that since
24305 @code{spam-stat-split-fancy} will never see them, the mails in
24306 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
24307 nor in your collection of non-spam mails, when creating the
24308 dictionary!
24309
24310 @lisp
24311 (setq nnmail-split-fancy
24312 `(| ("Content-Type" "text/html" "mail.spam.filtered")
24313 (: spam-stat-split-fancy)
24314 ("Subject" "\\bspam-stat\\b" "mail.emacs")
24315 "mail.misc"))
24316 @end lisp
24317
24318
24319 @node Low-level interface to the spam-stat dictionary
24320 @subsubsection Low-level interface to the spam-stat dictionary
24321
24322 The main interface to using @code{spam-stat}, are the following functions:
24323
24324 @defun spam-stat-buffer-is-spam
24325 Called in a buffer, that buffer is considered to be a new spam mail.
24326 Use this for new mail that has not been processed before.
24327 @end defun
24328
24329 @defun spam-stat-buffer-is-no-spam
24330 Called in a buffer, that buffer is considered to be a new non-spam
24331 mail. Use this for new mail that has not been processed before.
24332 @end defun
24333
24334 @defun spam-stat-buffer-change-to-spam
24335 Called in a buffer, that buffer is no longer considered to be normal
24336 mail but spam. Use this to change the status of a mail that has
24337 already been processed as non-spam.
24338 @end defun
24339
24340 @defun spam-stat-buffer-change-to-non-spam
24341 Called in a buffer, that buffer is no longer considered to be spam but
24342 normal mail. Use this to change the status of a mail that has already
24343 been processed as spam.
24344 @end defun
24345
24346 @defun spam-stat-save
24347 Save the hash table to the file. The filename used is stored in the
24348 variable @code{spam-stat-file}.
24349 @end defun
24350
24351 @defun spam-stat-load
24352 Load the hash table from a file. The filename used is stored in the
24353 variable @code{spam-stat-file}.
24354 @end defun
24355
24356 @defun spam-stat-score-word
24357 Return the spam score for a word.
24358 @end defun
24359
24360 @defun spam-stat-score-buffer
24361 Return the spam score for a buffer.
24362 @end defun
24363
24364 @defun spam-stat-split-fancy
24365 Use this function for fancy mail splitting. Add the rule @samp{(:
24366 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
24367 @end defun
24368
24369 Make sure you load the dictionary before using it. This requires the
24370 following in your @file{~/.gnus.el} file:
24371
24372 @lisp
24373 (require 'spam-stat)
24374 (spam-stat-load)
24375 @end lisp
24376
24377 Typical test will involve calls to the following functions:
24378
24379 @smallexample
24380 Reset: (setq spam-stat (make-hash-table :test 'equal))
24381 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
24382 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
24383 Save table: (spam-stat-save)
24384 File size: (nth 7 (file-attributes spam-stat-file))
24385 Number of words: (hash-table-count spam-stat)
24386 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
24387 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
24388 Reduce table size: (spam-stat-reduce-size)
24389 Save table: (spam-stat-save)
24390 File size: (nth 7 (file-attributes spam-stat-file))
24391 Number of words: (hash-table-count spam-stat)
24392 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
24393 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
24394 @end smallexample
24395
24396 Here is how you would create your dictionary:
24397
24398 @smallexample
24399 Reset: (setq spam-stat (make-hash-table :test 'equal))
24400 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
24401 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
24402 Repeat for any other non-spam group you need...
24403 Reduce table size: (spam-stat-reduce-size)
24404 Save table: (spam-stat-save)
24405 @end smallexample
24406
24407 @node Other modes
24408 @section Interaction with other modes
24409
24410 @subsection Dired
24411 @cindex dired
24412
24413 @code{gnus-dired-minor-mode} provided some useful functions for dired
24414 buffers. It is enabled with
24415 @lisp
24416 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24417 @end lisp
24418
24419 @table @kbd
24420 @item C-c C-m C-a
24421 @findex gnus-dired-attach
24422 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
24423 You will be prompted for a message buffer.
24424
24425 @item C-c C-m C-l
24426 @findex gnus-dired-find-file-mailcap
24427 Visit a file according to the appropriate mailcap entry
24428 (@code{gnus-dired-find-file-mailcap}). With prefix, open file in a new
24429 buffer.
24430
24431 @item C-c C-m C-p
24432 @findex gnus-dired-print
24433 Print file according to the mailcap entry (@code{gnus-dired-print}). If
24434 there is no print command, print in a PostScript image.
24435 @end table
24436
24437 @node Various Various
24438 @section Various Various
24439 @cindex mode lines
24440 @cindex highlights
24441
24442 @table @code
24443
24444 @item gnus-home-directory
24445 @vindex gnus-home-directory
24446 All Gnus file and directory variables will be initialized from this
24447 variable, which defaults to @file{~/}.
24448
24449 @item gnus-directory
24450 @vindex gnus-directory
24451 Most Gnus storage file and directory variables will be initialized from
24452 this variable, which defaults to the @env{SAVEDIR} environment
24453 variable, or @file{~/News/} if that variable isn't set.
24454
24455 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
24456 This means that other directory variables that are initialized from this
24457 variable won't be set properly if you set this variable in
24458 @file{~/.gnus.el}. Set this variable in @file{.emacs} instead.
24459
24460 @item gnus-default-directory
24461 @vindex gnus-default-directory
24462 Not related to the above variable at all---this variable says what the
24463 default directory of all Gnus buffers should be. If you issue commands
24464 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
24465 default directory. If this variable is @code{nil} (which is the
24466 default), the default directory will be the default directory of the
24467 buffer you were in when you started Gnus.
24468
24469 @item gnus-verbose
24470 @vindex gnus-verbose
24471 This variable is an integer between zero and ten. The higher the value,
24472 the more messages will be displayed. If this variable is zero, Gnus
24473 will never flash any messages, if it is seven (which is the default),
24474 most important messages will be shown, and if it is ten, Gnus won't ever
24475 shut up, but will flash so many messages it will make your head swim.
24476
24477 @item gnus-verbose-backends
24478 @vindex gnus-verbose-backends
24479 This variable works the same way as @code{gnus-verbose}, but it applies
24480 to the Gnus back ends instead of Gnus proper.
24481
24482 @item nnheader-max-head-length
24483 @vindex nnheader-max-head-length
24484 When the back ends read straight heads of articles, they all try to read
24485 as little as possible. This variable (default 8192) specifies
24486 the absolute max length the back ends will try to read before giving up
24487 on finding a separator line between the head and the body. If this
24488 variable is @code{nil}, there is no upper read bound. If it is
24489 @code{t}, the back ends won't try to read the articles piece by piece,
24490 but read the entire articles. This makes sense with some versions of
24491 @code{ange-ftp} or @code{efs}.
24492
24493 @item nnheader-head-chop-length
24494 @vindex nnheader-head-chop-length
24495 This variable (default 2048) says how big a piece of each article to
24496 read when doing the operation described above.
24497
24498 @item nnheader-file-name-translation-alist
24499 @vindex nnheader-file-name-translation-alist
24500 @cindex file names
24501 @cindex invalid characters in file names
24502 @cindex characters in file names
24503 This is an alist that says how to translate characters in file names.
24504 For instance, if @samp{:} is invalid as a file character in file names
24505 on your system (you OS/2 user you), you could say something like:
24506
24507 @lisp
24508 @group
24509 (setq nnheader-file-name-translation-alist
24510 '((?: . ?_)))
24511 @end group
24512 @end lisp
24513
24514 In fact, this is the default value for this variable on OS/2 and MS
24515 Windows (phooey) systems.
24516
24517 @item gnus-hidden-properties
24518 @vindex gnus-hidden-properties
24519 This is a list of properties to use to hide ``invisible'' text. It is
24520 @code{(invisible t intangible t)} by default on most systems, which
24521 makes invisible text invisible and intangible.
24522
24523 @item gnus-parse-headers-hook
24524 @vindex gnus-parse-headers-hook
24525 A hook called before parsing headers. It can be used, for instance, to
24526 gather statistics on the headers fetched, or perhaps you'd like to prune
24527 some headers. I don't see why you'd want that, though.
24528
24529 @item gnus-shell-command-separator
24530 @vindex gnus-shell-command-separator
24531 String used to separate two shell commands. The default is @samp{;}.
24532
24533 @item gnus-invalid-group-regexp
24534 @vindex gnus-invalid-group-regexp
24535
24536 Regexp to match ``invalid'' group names when querying user for a group
24537 name. The default value catches some @strong{really} invalid group
24538 names who could possibly mess up Gnus internally (like allowing
24539 @samp{:} in a group name, which is normally used to delimit method and
24540 group).
24541
24542 @acronym{IMAP} users might want to allow @samp{/} in group names though.
24543
24544
24545 @end table
24546
24547 @node The End
24548 @chapter The End
24549
24550 Well, that's the manual---you can get on with your life now. Keep in
24551 touch. Say hello to your cats from me.
24552
24553 My @strong{ghod}---I just can't stand goodbyes. Sniffle.
24554
24555 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
24556
24557 @quotation
24558 @strong{Te Deum}
24559
24560 @sp 1
24561 Not because of victories @*
24562 I sing,@*
24563 having none,@*
24564 but for the common sunshine,@*
24565 the breeze,@*
24566 the largess of the spring.
24567
24568 @sp 1
24569 Not for victory@*
24570 but for the day's work done@*
24571 as well as I was able;@*
24572 not for a seat upon the dais@*
24573 but at the common table.@*
24574 @end quotation
24575
24576
24577 @node Appendices
24578 @chapter Appendices
24579
24580 @menu
24581 * XEmacs:: Requirements for installing under XEmacs.
24582 * History:: How Gnus got where it is today.
24583 * On Writing Manuals:: Why this is not a beginner's guide.
24584 * Terminology:: We use really difficult, like, words here.
24585 * Customization:: Tailoring Gnus to your needs.
24586 * Troubleshooting:: What you might try if things do not work.
24587 * Gnus Reference Guide:: Rilly, rilly technical stuff.
24588 * Emacs for Heathens:: A short introduction to Emacsian terms.
24589 * Frequently Asked Questions:: The Gnus FAQ
24590 @end menu
24591
24592
24593 @node XEmacs
24594 @section XEmacs
24595 @cindex XEmacs
24596 @cindex installing under XEmacs
24597
24598 XEmacs is distributed as a collection of packages. You should install
24599 whatever packages the Gnus XEmacs package requires. The current
24600 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
24601 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
24602 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
24603 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
24604
24605
24606 @node History
24607 @section History
24608
24609 @cindex history
24610 @sc{gnus} was written by Masanobu @sc{Umeda}. When autumn crept up in
24611 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
24612
24613 If you want to investigate the person responsible for this outrage,
24614 you can point your (feh!) web browser to
24615 @uref{http://quimby.gnus.org/}. This is also the primary
24616 distribution point for the new and spiffy versions of Gnus, and is
24617 known as The Site That Destroys Newsrcs And Drives People Mad.
24618
24619 During the first extended alpha period of development, the new Gnus was
24620 called ``(ding) Gnus''. @dfn{(ding)} is, of course, short for
24621 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
24622 (Besides, the ``Gnus'' in this abbreviation should probably be
24623 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
24624 appropriate name, don't you think?)
24625
24626 In any case, after spending all that energy on coming up with a new and
24627 spunky name, we decided that the name was @emph{too} spunky, so we
24628 renamed it back again to ``Gnus''. But in mixed case. ``Gnus'' vs.
24629 ``@sc{gnus}''. New vs. old.
24630
24631 @menu
24632 * Gnus Versions:: What Gnus versions have been released.
24633 * Other Gnus Versions:: Other Gnus versions that also have been released.
24634 * Why?:: What's the point of Gnus?
24635 * Compatibility:: Just how compatible is Gnus with @sc{gnus}?
24636 * Conformity:: Gnus tries to conform to all standards.
24637 * Emacsen:: Gnus can be run on a few modern Emacsen.
24638 * Gnus Development:: How Gnus is developed.
24639 * Contributors:: Oodles of people.
24640 * New Features:: Pointers to some of the new stuff in Gnus.
24641 @end menu
24642
24643
24644 @node Gnus Versions
24645 @subsection Gnus Versions
24646 @cindex ding Gnus
24647 @cindex September Gnus
24648 @cindex Red Gnus
24649 @cindex Quassia Gnus
24650 @cindex Pterodactyl Gnus
24651 @cindex Oort Gnus
24652 @cindex No Gnus
24653 @cindex Gnus versions
24654
24655 The first ``proper'' release of Gnus 5 was done in November 1995 when it
24656 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
24657 plus 15 Gnus 5.0 releases).
24658
24659 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
24660 releases)) was released under the name ``Gnus 5.2'' (40 releases).
24661
24662 On July 28th 1996 work on Red Gnus was begun, and it was released on
24663 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
24664
24665 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
24666 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
24667
24668 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
24669 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
24670 1999.
24671
24672 On the 26th of October 2000, Oort Gnus was begun and was released as
24673 Gnus 5.10 on May 1st 2003 (24 releases).
24674
24675 On the January 4th 2004, No Gnus was begun.
24676
24677 If you happen upon a version of Gnus that has a prefixed name --
24678 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
24679 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
24680 Don't let it know that you're frightened. Back away. Slowly. Whatever
24681 you do, don't run. Walk away, calmly, until you're out of its reach.
24682 Find a proper released version of Gnus and snuggle up to that instead.
24683
24684
24685 @node Other Gnus Versions
24686 @subsection Other Gnus Versions
24687 @cindex Semi-gnus
24688
24689 In addition to the versions of Gnus which have had their releases
24690 coordinated by Lars, one major development has been Semi-gnus from
24691 Japan. It's based on a library called @acronym{SEMI}, which provides
24692 @acronym{MIME} capabilities.
24693
24694 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
24695 Collectively, they are called ``Semi-gnus'', and different strains are
24696 called T-gnus, ET-gnus, Nana-gnus and Chaos. These provide powerful
24697 @acronym{MIME} and multilingualization things, especially important for
24698 Japanese users.
24699
24700
24701 @node Why?
24702 @subsection Why?
24703
24704 What's the point of Gnus?
24705
24706 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
24707 newsreader, that lets you do anything you can think of. That was my
24708 original motivation, but while working on Gnus, it has become clear to
24709 me that this generation of newsreaders really belong in the stone age.
24710 Newsreaders haven't developed much since the infancy of the net. If the
24711 volume continues to rise with the current rate of increase, all current
24712 newsreaders will be pretty much useless. How do you deal with
24713 newsgroups that have thousands of new articles each day? How do you
24714 keep track of millions of people who post?
24715
24716 Gnus offers no real solutions to these questions, but I would very much
24717 like to see Gnus being used as a testing ground for new methods of
24718 reading and fetching news. Expanding on @sc{Umeda}-san's wise decision
24719 to separate the newsreader from the back ends, Gnus now offers a simple
24720 interface for anybody who wants to write new back ends for fetching mail
24721 and news from different sources. I have added hooks for customizations
24722 everywhere I could imagine it being useful. By doing so, I'm inviting
24723 every one of you to explore and invent.
24724
24725 May Gnus never be complete. @kbd{C-u 100 M-x all-hail-emacs} and
24726 @kbd{C-u 100 M-x all-hail-xemacs}.
24727
24728
24729 @node Compatibility
24730 @subsection Compatibility
24731
24732 @cindex compatibility
24733 Gnus was designed to be fully compatible with @sc{gnus}. Almost all key
24734 bindings have been kept. More key bindings have been added, of course,
24735 but only in one or two obscure cases have old bindings been changed.
24736
24737 Our motto is:
24738 @quotation
24739 @cartouche
24740 @center In a cloud bones of steel.
24741 @end cartouche
24742 @end quotation
24743
24744 All commands have kept their names. Some internal functions have changed
24745 their names.
24746
24747 The @code{gnus-uu} package has changed drastically. @xref{Decoding
24748 Articles}.
24749
24750 One major compatibility question is the presence of several summary
24751 buffers. All variables relevant while reading a group are
24752 buffer-local to the summary buffer they belong in. Although many
24753 important variables have their values copied into their global
24754 counterparts whenever a command is executed in the summary buffer, this
24755 change might lead to incorrect values being used unless you are careful.
24756
24757 All code that relies on knowledge of @sc{gnus} internals will probably
24758 fail. To take two examples: Sorting @code{gnus-newsrc-alist} (or
24759 changing it in any way, as a matter of fact) is strictly verboten. Gnus
24760 maintains a hash table that points to the entries in this alist (which
24761 speeds up many functions), and changing the alist directly will lead to
24762 peculiar results.
24763
24764 @cindex hilit19
24765 @cindex highlighting
24766 Old hilit19 code does not work at all. In fact, you should probably
24767 remove all hilit code from all Gnus hooks
24768 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
24769 Gnus provides various integrated functions for highlighting. These are
24770 faster and more accurate. To make life easier for everybody, Gnus will
24771 by default remove all hilit calls from all hilit hooks. Uncleanliness!
24772 Away!
24773
24774 Packages like @code{expire-kill} will no longer work. As a matter of
24775 fact, you should probably remove all old @sc{gnus} packages (and other
24776 code) when you start using Gnus. More likely than not, Gnus already
24777 does what you have written code to make @sc{gnus} do. (Snicker.)
24778
24779 Even though old methods of doing things are still supported, only the
24780 new methods are documented in this manual. If you detect a new method of
24781 doing something while reading this manual, that does not mean you have
24782 to stop doing it the old way.
24783
24784 Gnus understands all @sc{gnus} startup files.
24785
24786 @kindex M-x gnus-bug
24787 @findex gnus-bug
24788 @cindex reporting bugs
24789 @cindex bugs
24790 Overall, a casual user who hasn't written much code that depends on
24791 @sc{gnus} internals should suffer no problems. If problems occur,
24792 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
24793
24794 @vindex gnus-bug-create-help-buffer
24795 If you are in the habit of sending bug reports @emph{very} often, you
24796 may find the helpful help buffer annoying after a while. If so, set
24797 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
24798 up at you.
24799
24800
24801 @node Conformity
24802 @subsection Conformity
24803
24804 No rebels without a clue here, ma'am. We conform to all standards known
24805 to (wo)man. Except for those standards and/or conventions we disagree
24806 with, of course.
24807
24808 @table @strong
24809
24810 @item RFC (2)822
24811 @cindex RFC 822
24812 @cindex RFC 2822
24813 There are no known breaches of this standard.
24814
24815 @item RFC 1036
24816 @cindex RFC 1036
24817 There are no known breaches of this standard, either.
24818
24819 @item Son-of-RFC 1036
24820 @cindex Son-of-RFC 1036
24821 We do have some breaches to this one.
24822
24823 @table @emph
24824
24825 @item X-Newsreader
24826 @itemx User-Agent
24827 These are considered to be ``vanity headers'', while I consider them
24828 to be consumer information. After seeing so many badly formatted
24829 articles coming from @code{tin} and @code{Netscape} I know not to use
24830 either of those for posting articles. I would not have known that if
24831 it wasn't for the @code{X-Newsreader} header.
24832 @end table
24833
24834 @item USEFOR
24835 @cindex USEFOR
24836 USEFOR is an IETF working group writing a successor to RFC 1036, based
24837 on Son-of-RFC 1036. They have produced a number of drafts proposing
24838 various changes to the format of news articles. The Gnus towers will
24839 look into implementing the changes when the draft is accepted as an RFC.
24840
24841 @item MIME - RFC 2045-2049 etc
24842 @cindex @acronym{MIME}
24843 All the various @acronym{MIME} RFCs are supported.
24844
24845 @item Disposition Notifications - RFC 2298
24846 Message Mode is able to request notifications from the receiver.
24847
24848 @item PGP - RFC 1991 and RFC 2440
24849 @cindex RFC 1991
24850 @cindex RFC 2440
24851 RFC 1991 is the original @acronym{PGP} message specification,
24852 published as an informational RFC. RFC 2440 was the follow-up, now
24853 called Open PGP, and put on the Standards Track. Both document a
24854 non-@acronym{MIME} aware @acronym{PGP} format. Gnus supports both
24855 encoding (signing and encryption) and decoding (verification and
24856 decryption).
24857
24858 @item PGP/MIME - RFC 2015/3156
24859 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
24860 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
24861 Gnus supports both encoding and decoding.
24862
24863 @item S/MIME - RFC 2633
24864 RFC 2633 describes the @acronym{S/MIME} format.
24865
24866 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
24867 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
24868 (@acronym{IMAP} 4 revision 1). RFC 2195 describes CRAM-MD5
24869 authentication for @acronym{IMAP}. RFC 2086 describes access control
24870 lists (ACLs) for @acronym{IMAP}. RFC 2359 describes a @acronym{IMAP}
24871 protocol enhancement. RFC 2595 describes the proper @acronym{TLS}
24872 integration (STARTTLS) with @acronym{IMAP}. RFC 1731 describes the
24873 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
24874
24875 @end table
24876
24877 If you ever notice Gnus acting non-compliant with regards to the texts
24878 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
24879 know.
24880
24881
24882 @node Emacsen
24883 @subsection Emacsen
24884 @cindex Emacsen
24885 @cindex XEmacs
24886 @cindex Mule
24887 @cindex Emacs
24888
24889 Gnus should work on:
24890
24891 @itemize @bullet
24892
24893 @item
24894 Emacs 21.1 and up.
24895
24896 @item
24897 XEmacs 21.4 and up.
24898
24899 @end itemize
24900
24901 This Gnus version will absolutely not work on any Emacsen older than
24902 that. Not reliably, at least. Older versions of Gnus may work on older
24903 Emacs versions. Particularly, Gnus 5.10.8 should also work on Emacs
24904 20.7 and XEmacs 21.1.
24905
24906 There are some vague differences between Gnus on the various
24907 platforms---XEmacs features more graphics (a logo and a toolbar)---but
24908 other than that, things should look pretty much the same under all
24909 Emacsen.
24910
24911
24912 @node Gnus Development
24913 @subsection Gnus Development
24914
24915 Gnus is developed in a two-phased cycle. The first phase involves much
24916 discussion on the @samp{ding@@gnus.org} mailing list, where people
24917 propose changes and new features, post patches and new back ends. This
24918 phase is called the @dfn{alpha} phase, since the Gnusae released in this
24919 phase are @dfn{alpha releases}, or (perhaps more commonly in other
24920 circles) @dfn{snapshots}. During this phase, Gnus is assumed to be
24921 unstable and should not be used by casual users. Gnus alpha releases
24922 have names like ``Red Gnus'' and ``Quassia Gnus''.
24923
24924 After futzing around for 50-100 alpha releases, Gnus is declared
24925 @dfn{frozen}, and only bug fixes are applied. Gnus loses the prefix,
24926 and is called things like ``Gnus 5.6.32'' instead. Normal people are
24927 supposed to be able to use these, and these are mostly discussed on the
24928 @samp{gnu.emacs.gnus} newsgroup.
24929
24930 @cindex Incoming*
24931 @vindex mail-source-delete-incoming
24932 Some variable defaults differ between alpha Gnusae and released Gnusae.
24933 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
24934 alpha Gnusae and @code{t} in released Gnusae. This is to prevent
24935 lossage of mail if an alpha release hiccups while handling the mail.
24936
24937 The division of discussion between the ding mailing list and the Gnus
24938 newsgroup is not purely based on publicity concerns. It's true that
24939 having people write about the horrible things that an alpha Gnus release
24940 can do (sometimes) in a public forum may scare people off, but more
24941 importantly, talking about new experimental features that have been
24942 introduced may confuse casual users. New features are frequently
24943 introduced, fiddled with, and judged to be found wanting, and then
24944 either discarded or totally rewritten. People reading the mailing list
24945 usually keep up with these rapid changes, while people on the newsgroup
24946 can't be assumed to do so.
24947
24948
24949
24950 @node Contributors
24951 @subsection Contributors
24952 @cindex contributors
24953
24954 The new Gnus version couldn't have been done without the help of all the
24955 people on the (ding) mailing list. Every day for over a year I have
24956 gotten billions of nice bug reports from them, filling me with joy,
24957 every single one of them. Smooches. The people on the list have been
24958 tried beyond endurance, what with my ``oh, that's a neat idea <type
24959 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24960 work at all <type type>, yup, I'll ship that one off right away <ship
24961 off> no, wait, that absolutely does not work'' policy for releases.
24962 Micro$oft---bah. Amateurs. I'm @emph{much} worse. (Or is that
24963 ``worser''? ``much worser''? ``worsest''?)
24964
24965 I would like to take this opportunity to thank the Academy for@dots{} oops,
24966 wrong show.
24967
24968 @itemize @bullet
24969
24970 @item
24971 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24972
24973 @item
24974 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24975 nnwarchive and many, many other things connected with @acronym{MIME} and
24976 other types of en/decoding, as well as general bug fixing, new
24977 functionality and stuff.
24978
24979 @item
24980 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24981 well as numerous other things).
24982
24983 @item
24984 Luis Fernandes---design and graphics.
24985
24986 @item
24987 Joe Reiss---creator of the smiley faces.
24988
24989 @item
24990 Justin Sheehy---the @acronym{FAQ} maintainer.
24991
24992 @item
24993 Erik Naggum---help, ideas, support, code and stuff.
24994
24995 @item
24996 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24997 @dfn{picons} (@pxref{Picons}).
24998
24999 @item
25000 Kim-Minh Kaplan---further work on the picon code.
25001
25002 @item
25003 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
25004 (@pxref{GroupLens}).
25005
25006 @item
25007 Sudish Joseph---innumerable bug fixes.
25008
25009 @item
25010 Ilja Weis---@file{gnus-topic.el}.
25011
25012 @item
25013 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
25014
25015 @item
25016 Vladimir Alexiev---the refcard and reference booklets.
25017
25018 @item
25019 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
25020 distribution by Felix Lee and JWZ.
25021
25022 @item
25023 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
25024
25025 @item
25026 Peter Mutsaers---orphan article scoring code.
25027
25028 @item
25029 Ken Raeburn---POP mail support.
25030
25031 @item
25032 Hallvard B Furuseth---various bits and pieces, especially dealing with
25033 .newsrc files.
25034
25035 @item
25036 Brian Edmonds---@file{gnus-bbdb.el}.
25037
25038 @item
25039 David Moore---rewrite of @file{nnvirtual.el} and many other things.
25040
25041 @item
25042 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
25043
25044 @item
25045 François Pinard---many, many interesting and thorough bug reports, as
25046 well as autoconf support.
25047
25048 @end itemize
25049
25050 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
25051 Borges, and Jost Krieger proof-reading parts of the manual.
25052
25053 The following people have contributed many patches and suggestions:
25054
25055 Christopher Davis,
25056 Andrew Eskilsson,
25057 Kai Grossjohann,
25058 Kevin Greiner,
25059 Jesper Harder,
25060 Paul Jarc,
25061 Simon Josefsson,
25062 David KÃ¥gedal,
25063 Richard Pieri,
25064 Fabrice Popineau,
25065 Daniel Quinlan,
25066 Michael Shields,
25067 Reiner Steib,
25068 Jason L. Tibbitts, III,
25069 Jack Vinson,
25070 Katsumi Yamaoka, @c Yamaoka
25071 and
25072 Teodor Zlatanov.
25073
25074 Also thanks to the following for patches and stuff:
25075
25076 Jari Aalto,
25077 Adrian Aichner,
25078 Vladimir Alexiev,
25079 Russ Allbery,
25080 Peter Arius,
25081 Matt Armstrong,
25082 Marc Auslander,
25083 Miles Bader,
25084 Alexei V. Barantsev,
25085 Frank Bennett,
25086 Robert Bihlmeyer,
25087 Chris Bone,
25088 Mark Borges,
25089 Mark Boyns,
25090 Lance A. Brown,
25091 Rob Browning,
25092 Kees de Bruin,
25093 Martin Buchholz,
25094 Joe Buehler,
25095 Kevin Buhr,
25096 Alastair Burt,
25097 Joao Cachopo,
25098 Zlatko Calusic,
25099 Massimo Campostrini,
25100 Castor,
25101 David Charlap,
25102 Dan Christensen,
25103 Kevin Christian,
25104 Jae-you Chung, @c ?
25105 James H. Cloos, Jr.,
25106 Laura Conrad,
25107 Michael R. Cook,
25108 Glenn Coombs,
25109 Andrew J. Cosgriff,
25110 Neil Crellin,
25111 Frank D. Cringle,
25112 Geoffrey T. Dairiki,
25113 Andre Deparade,
25114 Ulrik Dickow,
25115 Dave Disser,
25116 Rui-Tao Dong, @c ?
25117 Joev Dubach,
25118 Michael Welsh Duggan,
25119 Dave Edmondson,
25120 Paul Eggert,
25121 Mark W. Eichin,
25122 Karl Eichwalder,
25123 Enami Tsugutomo, @c Enami
25124 Michael Ernst,
25125 Luc Van Eycken,
25126 Sam Falkner,
25127 Nelson Jose dos Santos Ferreira,
25128 Sigbjorn Finne,
25129 Sven Fischer,
25130 Paul Fisher,
25131 Decklin Foster,
25132 Gary D. Foster,
25133 Paul Franklin,
25134 Guy Geens,
25135 Arne Georg Gleditsch,
25136 David S. Goldberg,
25137 Michelangelo Grigni,
25138 Dale Hagglund,
25139 D. Hall,
25140 Magnus Hammerin,
25141 Kenichi Handa, @c Handa
25142 Raja R. Harinath,
25143 Yoshiki Hayashi, @c Hayashi
25144 P. E. Jareth Hein,
25145 Hisashige Kenji, @c Hisashige
25146 Scott Hofmann,
25147 Marc Horowitz,
25148 Gunnar Horrigmo,
25149 Richard Hoskins,
25150 Brad Howes,
25151 Miguel de Icaza,
25152 François Felix Ingrand,
25153 Tatsuya Ichikawa, @c Ichikawa
25154 Ishikawa Ichiro, @c Ishikawa
25155 Lee Iverson,
25156 Iwamuro Motonori, @c Iwamuro
25157 Rajappa Iyer,
25158 Andreas Jaeger,
25159 Adam P. Jenkins,
25160 Randell Jesup,
25161 Fred Johansen,
25162 Gareth Jones,
25163 Greg Klanderman,
25164 Karl Kleinpaste,
25165 Michael Klingbeil,
25166 Peter Skov Knudsen,
25167 Shuhei Kobayashi, @c Kobayashi
25168 Petr Konecny,
25169 Koseki Yoshinori, @c Koseki
25170 Thor Kristoffersen,
25171 Jens Lautenbacher,
25172 Martin Larose,
25173 Seokchan Lee, @c Lee
25174 Joerg Lenneis,
25175 Carsten Leonhardt,
25176 James LewisMoss,
25177 Christian Limpach,
25178 Markus Linnala,
25179 Dave Love,
25180 Mike McEwan,
25181 Tonny Madsen,
25182 Shlomo Mahlab,
25183 Nat Makarevitch,
25184 Istvan Marko,
25185 David Martin,
25186 Jason R. Mastaler,
25187 Gordon Matzigkeit,
25188 Timo Metzemakers,
25189 Richard Mlynarik,
25190 Lantz Moore,
25191 Morioka Tomohiko, @c Morioka
25192 Erik Toubro Nielsen,
25193 Hrvoje Niksic,
25194 Andy Norman,
25195 Fred Oberhauser,
25196 C. R. Oldham,
25197 Alexandre Oliva,
25198 Ken Olstad,
25199 Masaharu Onishi, @c Onishi
25200 Hideki Ono, @c Ono
25201 Ettore Perazzoli,
25202 William Perry,
25203 Stephen Peters,
25204 Jens-Ulrik Holger Petersen,
25205 Ulrich Pfeifer,
25206 Matt Pharr,
25207 Andy Piper,
25208 John McClary Prevost,
25209 Bill Pringlemeir,
25210 Mike Pullen,
25211 Jim Radford,
25212 Colin Rafferty,
25213 Lasse Rasinen,
25214 Lars Balker Rasmussen,
25215 Joe Reiss,
25216 Renaud Rioboo,
25217 Roland B. Roberts,
25218 Bart Robinson,
25219 Christian von Roques,
25220 Markus Rost,
25221 Jason Rumney,
25222 Wolfgang Rupprecht,
25223 Jay Sachs,
25224 Dewey M. Sasser,
25225 Conrad Sauerwald,
25226 Loren Schall,
25227 Dan Schmidt,
25228 Ralph Schleicher,
25229 Philippe Schnoebelen,
25230 Andreas Schwab,
25231 Randal L. Schwartz,
25232 Danny Siu,
25233 Matt Simmons,
25234 Paul D. Smith,
25235 Jeff Sparkes,
25236 Toby Speight,
25237 Michael Sperber,
25238 Darren Stalder,
25239 Richard Stallman,
25240 Greg Stark,
25241 Sam Steingold,
25242 Paul Stevenson,
25243 Jonas Steverud,
25244 Paul Stodghill,
25245 Kiyokazu Suto, @c Suto
25246 Kurt Swanson,
25247 Samuel Tardieu,
25248 Teddy,
25249 Chuck Thompson,
25250 Tozawa Akihiko, @c Tozawa
25251 Philippe Troin,
25252 James Troup,
25253 Trung Tran-Duc,
25254 Jack Twilley,
25255 Aaron M. Ucko,
25256 Aki Vehtari,
25257 Didier Verna,
25258 Vladimir Volovich,
25259 Jan Vroonhof,
25260 Stefan Waldherr,
25261 Pete Ware,
25262 Barry A. Warsaw,
25263 Christoph Wedler,
25264 Joe Wells,
25265 Lee Willis,
25266 and
25267 Lloyd Zusman.
25268
25269
25270 For a full overview of what each person has done, the ChangeLogs
25271 included in the Gnus alpha distributions should give ample reading
25272 (550kB and counting).
25273
25274 Apologies to everybody that I've forgotten, of which there are many, I'm
25275 sure.
25276
25277 Gee, that's quite a list of people. I guess that must mean that there
25278 actually are people who are using Gnus. Who'd'a thunk it!
25279
25280
25281 @node New Features
25282 @subsection New Features
25283 @cindex new features
25284
25285 @menu
25286 * ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus.
25287 * September Gnus:: The Thing Formally Known As Gnus 5.2/5.3.
25288 * Red Gnus:: Third time best---Gnus 5.4/5.5.
25289 * Quassia Gnus:: Two times two is four, or Gnus 5.6/5.7.
25290 * Pterodactyl Gnus:: Pentad also starts with P, AKA Gnus 5.8/5.9.
25291 * Oort Gnus:: It's big. It's far out. Gnus 5.10/5.11.
25292 @end menu
25293
25294 These lists are, of course, just @emph{short} overviews of the
25295 @emph{most} important new features. No, really. There are tons more.
25296 Yes, we have feeping creaturism in full effect.
25297
25298 @node ding Gnus
25299 @subsubsection (ding) Gnus
25300
25301 New features in Gnus 5.0/5.1:
25302
25303 @itemize @bullet
25304
25305 @item
25306 The look of all buffers can be changed by setting format-like variables
25307 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
25308
25309 @item
25310 Local spool and several @acronym{NNTP} servers can be used at once
25311 (@pxref{Select Methods}).
25312
25313 @item
25314 You can combine groups into virtual groups (@pxref{Virtual Groups}).
25315
25316 @item
25317 You can read a number of different mail formats (@pxref{Getting Mail}).
25318 All the mail back ends implement a convenient mail expiry scheme
25319 (@pxref{Expiring Mail}).
25320
25321 @item
25322 Gnus can use various strategies for gathering threads that have lost
25323 their roots (thereby gathering loose sub-threads into one thread) or it
25324 can go back and retrieve enough headers to build a complete thread
25325 (@pxref{Customizing Threading}).
25326
25327 @item
25328 Killed groups can be displayed in the group buffer, and you can read
25329 them as well (@pxref{Listing Groups}).
25330
25331 @item
25332 Gnus can do partial group updates---you do not have to retrieve the
25333 entire active file just to check for new articles in a few groups
25334 (@pxref{The Active File}).
25335
25336 @item
25337 Gnus implements a sliding scale of subscribedness to groups
25338 (@pxref{Group Levels}).
25339
25340 @item
25341 You can score articles according to any number of criteria
25342 (@pxref{Scoring}). You can even get Gnus to find out how to score
25343 articles for you (@pxref{Adaptive Scoring}).
25344
25345 @item
25346 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
25347 manner, so it should be difficult to lose much data on what you have
25348 read if your machine should go down (@pxref{Auto Save}).
25349
25350 @item
25351 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
25352 cluttering up the @file{.emacs} file.
25353
25354 @item
25355 You can set the process mark on both groups and articles and perform
25356 operations on all the marked items (@pxref{Process/Prefix}).
25357
25358 @item
25359 You can grep through a subset of groups and create a group from the
25360 results (@pxref{Kibozed Groups}).
25361
25362 @item
25363 You can list subsets of groups according to, well, anything
25364 (@pxref{Listing Groups}).
25365
25366 @item
25367 You can browse foreign servers and subscribe to groups from those
25368 servers (@pxref{Browse Foreign Server}).
25369
25370 @item
25371 Gnus can fetch articles, asynchronously, on a second connection to the
25372 server (@pxref{Asynchronous Fetching}).
25373
25374 @item
25375 You can cache articles locally (@pxref{Article Caching}).
25376
25377 @item
25378 The uudecode functions have been expanded and generalized
25379 (@pxref{Decoding Articles}).
25380
25381 @item
25382 You can still post uuencoded articles, which was a little-known feature
25383 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
25384
25385 @item
25386 Fetching parents (and other articles) now actually works without
25387 glitches (@pxref{Finding the Parent}).
25388
25389 @item
25390 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
25391
25392 @item
25393 Digests (and other files) can be used as the basis for groups
25394 (@pxref{Document Groups}).
25395
25396 @item
25397 Articles can be highlighted and customized (@pxref{Customizing
25398 Articles}).
25399
25400 @item
25401 URLs and other external references can be buttonized (@pxref{Article
25402 Buttons}).
25403
25404 @item
25405 You can do lots of strange stuff with the Gnus window & frame
25406 configuration (@pxref{Window Layout}).
25407
25408 @item
25409 You can click on buttons instead of using the keyboard
25410 (@pxref{Buttons}).
25411
25412 @end itemize
25413
25414
25415 @node September Gnus
25416 @subsubsection September Gnus
25417
25418 @iftex
25419 @iflatex
25420 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
25421 @end iflatex
25422 @end iftex
25423
25424 New features in Gnus 5.2/5.3:
25425
25426 @itemize @bullet
25427
25428 @item
25429 A new message composition mode is used. All old customization variables
25430 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
25431 now obsolete.
25432
25433 @item
25434 Gnus is now able to generate @dfn{sparse} threads---threads where
25435 missing articles are represented by empty nodes (@pxref{Customizing
25436 Threading}).
25437
25438 @lisp
25439 (setq gnus-build-sparse-threads 'some)
25440 @end lisp
25441
25442 @item
25443 Outgoing articles are stored on a special archive server
25444 (@pxref{Archived Messages}).
25445
25446 @item
25447 Partial thread regeneration now happens when articles are
25448 referred.
25449
25450 @item
25451 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
25452
25453 @item
25454 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
25455
25456 @item
25457 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
25458
25459 @lisp
25460 (setq gnus-use-trees t)
25461 @end lisp
25462
25463 @item
25464 An @code{nn}-like pick-and-read minor mode is available for the summary
25465 buffers (@pxref{Pick and Read}).
25466
25467 @lisp
25468 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
25469 @end lisp
25470
25471 @item
25472 In binary groups you can use a special binary minor mode (@pxref{Binary
25473 Groups}).
25474
25475 @item
25476 Groups can be grouped in a folding topic hierarchy (@pxref{Group
25477 Topics}).
25478
25479 @lisp
25480 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
25481 @end lisp
25482
25483 @item
25484 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
25485
25486 @item
25487 Groups can now have a score, and bubbling based on entry frequency
25488 is possible (@pxref{Group Score}).
25489
25490 @lisp
25491 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
25492 @end lisp
25493
25494 @item
25495 Groups can be process-marked, and commands can be performed on
25496 groups of groups (@pxref{Marking Groups}).
25497
25498 @item
25499 Caching is possible in virtual groups.
25500
25501 @item
25502 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
25503 news batches, ClariNet briefs collections, and just about everything
25504 else (@pxref{Document Groups}).
25505
25506 @item
25507 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
25508 (@pxref{SOUP}).
25509
25510 @item
25511 The Gnus cache is much faster.
25512
25513 @item
25514 Groups can be sorted according to many criteria (@pxref{Sorting
25515 Groups}).
25516
25517 @item
25518 New group parameters have been introduced to set list-addresses and
25519 expiry times (@pxref{Group Parameters}).
25520
25521 @item
25522 All formatting specs allow specifying faces to be used
25523 (@pxref{Formatting Fonts}).
25524
25525 @item
25526 There are several more commands for setting/removing/acting on process
25527 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
25528
25529 @item
25530 The summary buffer can be limited to show parts of the available
25531 articles based on a wide range of criteria. These commands have been
25532 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
25533
25534 @item
25535 Articles can be made persistent with the @kbd{*} command
25536 (@pxref{Persistent Articles}).
25537
25538 @item
25539 All functions for hiding article elements are now toggles.
25540
25541 @item
25542 Article headers can be buttonized (@pxref{Article Washing}).
25543
25544 @item
25545 All mail back ends support fetching articles by @code{Message-ID}.
25546
25547 @item
25548 Duplicate mail can now be treated properly (@pxref{Duplicates}).
25549
25550 @item
25551 All summary mode commands are available directly from the article
25552 buffer (@pxref{Article Keymap}).
25553
25554 @item
25555 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
25556 Layout}).
25557
25558 @item
25559 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
25560 @iftex
25561 @iflatex
25562 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
25563 @end iflatex
25564 @end iftex
25565
25566 @item
25567 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
25568
25569 @lisp
25570 (setq gnus-use-nocem t)
25571 @end lisp
25572
25573 @item
25574 Groups can be made permanently visible (@pxref{Listing Groups}).
25575
25576 @lisp
25577 (setq gnus-permanently-visible-groups "^nnml:")
25578 @end lisp
25579
25580 @item
25581 Many new hooks have been introduced to make customizing easier.
25582
25583 @item
25584 Gnus respects the @code{Mail-Copies-To} header.
25585
25586 @item
25587 Threads can be gathered by looking at the @code{References} header
25588 (@pxref{Customizing Threading}).
25589
25590 @lisp
25591 (setq gnus-summary-thread-gathering-function
25592 'gnus-gather-threads-by-references)
25593 @end lisp
25594
25595 @item
25596 Read articles can be stored in a special backlog buffer to avoid
25597 refetching (@pxref{Article Backlog}).
25598
25599 @lisp
25600 (setq gnus-keep-backlog 50)
25601 @end lisp
25602
25603 @item
25604 A clean copy of the current article is always stored in a separate
25605 buffer to allow easier treatment.
25606
25607 @item
25608 Gnus can suggest where to save articles (@pxref{Saving Articles}).
25609
25610 @item
25611 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
25612 Articles}).
25613
25614 @lisp
25615 (setq gnus-prompt-before-saving t)
25616 @end lisp
25617
25618 @item
25619 @code{gnus-uu} can view decoded files asynchronously while fetching
25620 articles (@pxref{Other Decode Variables}).
25621
25622 @lisp
25623 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
25624 @end lisp
25625
25626 @item
25627 Filling in the article buffer now works properly on cited text
25628 (@pxref{Article Washing}).
25629
25630 @item
25631 Hiding cited text adds buttons to toggle hiding, and how much
25632 cited text to hide is now customizable (@pxref{Article Hiding}).
25633
25634 @lisp
25635 (setq gnus-cited-lines-visible 2)
25636 @end lisp
25637
25638 @item
25639 Boring headers can be hidden (@pxref{Article Hiding}).
25640
25641 @item
25642 Default scoring values can now be set from the menu bar.
25643
25644 @item
25645 Further syntax checking of outgoing articles have been added.
25646
25647 @end itemize
25648
25649
25650 @node Red Gnus
25651 @subsubsection Red Gnus
25652
25653 New features in Gnus 5.4/5.5:
25654
25655 @iftex
25656 @iflatex
25657 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
25658 @end iflatex
25659 @end iftex
25660
25661 @itemize @bullet
25662
25663 @item
25664 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
25665
25666 @item
25667 Article prefetching functionality has been moved up into
25668 Gnus (@pxref{Asynchronous Fetching}).
25669
25670 @item
25671 Scoring can now be performed with logical operators like @code{and},
25672 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
25673 Scoring}).
25674
25675 @item
25676 Article washing status can be displayed in the
25677 article mode line (@pxref{Misc Article}).
25678
25679 @item
25680 @file{gnus.el} has been split into many smaller files.
25681
25682 @item
25683 Suppression of duplicate articles based on Message-ID can be done
25684 (@pxref{Duplicate Suppression}).
25685
25686 @lisp
25687 (setq gnus-suppress-duplicates t)
25688 @end lisp
25689
25690 @item
25691 New variables for specifying what score and adapt files are to be
25692 considered home score and adapt files (@pxref{Home Score File}) have
25693 been added.
25694
25695 @item
25696 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
25697 Server Internals}).
25698
25699 @item
25700 Groups can inherit group parameters from parent topics (@pxref{Topic
25701 Parameters}).
25702
25703 @item
25704 Article editing has been revamped and is now actually usable.
25705
25706 @item
25707 Signatures can be recognized in more intelligent fashions
25708 (@pxref{Article Signature}).
25709
25710 @item
25711 Summary pick mode has been made to look more @code{nn}-like. Line
25712 numbers are displayed and the @kbd{.} command can be used to pick
25713 articles (@code{Pick and Read}).
25714
25715 @item
25716 Commands for moving the @file{.newsrc.eld} from one server to
25717 another have been added (@pxref{Changing Servers}).
25718
25719 @item
25720 There's a way now to specify that ``uninteresting'' fields be suppressed
25721 when generating lines in buffers (@pxref{Advanced Formatting}).
25722
25723 @item
25724 Several commands in the group buffer can be undone with @kbd{C-M-_}
25725 (@pxref{Undo}).
25726
25727 @item
25728 Scoring can be done on words using the new score type @code{w}
25729 (@pxref{Score File Format}).
25730
25731 @item
25732 Adaptive scoring can be done on a Subject word-by-word basis
25733 (@pxref{Adaptive Scoring}).
25734
25735 @lisp
25736 (setq gnus-use-adaptive-scoring '(word))
25737 @end lisp
25738
25739 @item
25740 Scores can be decayed (@pxref{Score Decays}).
25741
25742 @lisp
25743 (setq gnus-decay-scores t)
25744 @end lisp
25745
25746 @item
25747 Scoring can be performed using a regexp on the Date header. The Date is
25748 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
25749
25750 @item
25751 A new command has been added to remove all data on articles from
25752 the native server (@pxref{Changing Servers}).
25753
25754 @item
25755 A new command for reading collections of documents
25756 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
25757 (@pxref{Really Various Summary Commands}).
25758
25759 @item
25760 Process mark sets can be pushed and popped (@pxref{Setting Process
25761 Marks}).
25762
25763 @item
25764 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
25765 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
25766
25767 @item
25768 A new back end for reading searches from Web search engines
25769 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
25770 (@pxref{Web Searches}).
25771
25772 @item
25773 Groups inside topics can now be sorted using the standard sorting
25774 functions, and each topic can be sorted independently (@pxref{Topic
25775 Sorting}).
25776
25777 @item
25778 Subsets of the groups can be sorted independently (@code{Sorting
25779 Groups}).
25780
25781 @item
25782 Cached articles can be pulled into the groups (@pxref{Summary Generation
25783 Commands}).
25784 @iftex
25785 @iflatex
25786 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
25787 @end iflatex
25788 @end iftex
25789
25790 @item
25791 Score files are now applied in a more reliable order (@pxref{Score
25792 Variables}).
25793
25794 @item
25795 Reports on where mail messages end up can be generated (@pxref{Splitting
25796 Mail}).
25797
25798 @item
25799 More hooks and functions have been added to remove junk from incoming
25800 mail before saving the mail (@pxref{Washing Mail}).
25801
25802 @item
25803 Emphasized text can be properly fontisized:
25804
25805 @end itemize
25806
25807
25808 @node Quassia Gnus
25809 @subsubsection Quassia Gnus
25810
25811 New features in Gnus 5.6:
25812
25813 @itemize @bullet
25814
25815 @item
25816 New functionality for using Gnus as an offline newsreader has been
25817 added. A plethora of new commands and modes have been added.
25818 @xref{Gnus Unplugged}, for the full story.
25819
25820 @item
25821 The @code{nndraft} back end has returned, but works differently than
25822 before. All Message buffers are now also articles in the @code{nndraft}
25823 group, which is created automatically.
25824
25825 @item
25826 @code{gnus-alter-header-function} can now be used to alter header
25827 values.
25828
25829 @item
25830 @code{gnus-summary-goto-article} now accept Message-ID's.
25831
25832 @item
25833 A new Message command for deleting text in the body of a message
25834 outside the region: @kbd{C-c C-v}.
25835
25836 @item
25837 You can now post to component group in @code{nnvirtual} groups with
25838 @kbd{C-u C-c C-c}.
25839
25840 @item
25841 @code{nntp-rlogin-program}---new variable to ease customization.
25842
25843 @item
25844 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
25845 re-highlighting of the article buffer.
25846
25847 @item
25848 New element in @code{gnus-boring-article-headers}---@code{long-to}.
25849
25850 @item
25851 @kbd{M-i} symbolic prefix command. @xref{Symbolic Prefixes}, for
25852 details.
25853
25854 @item
25855 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
25856 @kbd{a} to add the score rule to the @file{all.SCORE} file.
25857
25858 @item
25859 @code{gnus-simplify-subject-functions} variable to allow greater
25860 control over simplification.
25861
25862 @item
25863 @kbd{A T}---new command for fetching the current thread.
25864
25865 @item
25866 @kbd{/ T}---new command for including the current thread in the
25867 limit.
25868
25869 @item
25870 @kbd{M-RET} is a new Message command for breaking cited text.
25871
25872 @item
25873 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
25874
25875 @item
25876 The @code{custom-face-lookup} function has been removed.
25877 If you used this function in your initialization files, you must
25878 rewrite them to use @code{face-spec-set} instead.
25879
25880 @item
25881 Canceling now uses the current select method. Symbolic prefix
25882 @kbd{a} forces normal posting method.
25883
25884 @item
25885 New command to translate M******** sm*rtq**t*s into proper
25886 text---@kbd{W d}.
25887
25888 @item
25889 For easier debugging of @code{nntp}, you can set
25890 @code{nntp-record-commands} to a non-@code{nil} value.
25891
25892 @item
25893 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
25894 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
25895
25896 @item
25897 A command for editing group parameters from the summary buffer
25898 has been added.
25899
25900 @item
25901 A history of where mails have been split is available.
25902
25903 @item
25904 A new article date command has been added---@code{article-date-iso8601}.
25905
25906 @item
25907 Subjects can be simplified when threading by setting
25908 @code{gnus-score-thread-simplify}.
25909
25910 @item
25911 A new function for citing in Message has been
25912 added---@code{message-cite-original-without-signature}.
25913
25914 @item
25915 @code{article-strip-all-blank-lines}---new article command.
25916
25917 @item
25918 A new Message command to kill to the end of the article has
25919 been added.
25920
25921 @item
25922 A minimum adaptive score can be specified by using the
25923 @code{gnus-adaptive-word-minimum} variable.
25924
25925 @item
25926 The ``lapsed date'' article header can be kept continually
25927 updated by the @code{gnus-start-date-timer} command.
25928
25929 @item
25930 Web listserv archives can be read with the @code{nnlistserv} back end.
25931
25932 @item
25933 Old dejanews archives can now be read by @code{nnweb}.
25934
25935 @end itemize
25936
25937 @node Pterodactyl Gnus
25938 @subsubsection Pterodactyl Gnus
25939
25940 New features in Gnus 5.8:
25941
25942 @itemize @bullet
25943
25944 @item
25945 The mail-fetching functions have changed. See the manual for the
25946 many details. In particular, all procmail fetching variables are gone.
25947
25948 If you used procmail like in
25949
25950 @lisp
25951 (setq nnmail-use-procmail t)
25952 (setq nnmail-spool-file 'procmail)
25953 (setq nnmail-procmail-directory "~/mail/incoming/")
25954 (setq nnmail-procmail-suffix "\\.in")
25955 @end lisp
25956
25957 this now has changed to
25958
25959 @lisp
25960 (setq mail-sources
25961 '((directory :path "~/mail/incoming/"
25962 :suffix ".in")))
25963 @end lisp
25964
25965 @xref{Mail Source Specifiers}.
25966
25967 @item
25968 Gnus is now a @acronym{MIME}-capable reader. This affects many parts of
25969 Gnus, and adds a slew of new commands. See the manual for details.
25970
25971 @item
25972 Gnus has also been multilingualized. This also affects too
25973 many parts of Gnus to summarize here, and adds many new variables.
25974
25975 @item
25976 @code{gnus-auto-select-first} can now be a function to be
25977 called to position point.
25978
25979 @item
25980 The user can now decide which extra headers should be included in
25981 summary buffers and @acronym{NOV} files.
25982
25983 @item
25984 @code{gnus-article-display-hook} has been removed. Instead, a number
25985 of variables starting with @code{gnus-treat-} have been added.
25986
25987 @item
25988 The Gnus posting styles have been redone again and now works in a
25989 subtly different manner.
25990
25991 @item
25992 New web-based back ends have been added: @code{nnslashdot},
25993 @code{nnwarchive} and @code{nnultimate}. nnweb has been revamped,
25994 again, to keep up with ever-changing layouts.
25995
25996 @item
25997 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25998
25999 @end itemize
26000
26001 @node Oort Gnus
26002 @subsubsection Oort Gnus
26003 @cindex Oort Gnus
26004
26005 New features in Gnus 5.10:
26006
26007 @itemize @bullet
26008
26009 @item
26010 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
26011 (@code{gnus-article-reply-with-original}) only yank the text in the
26012 region if the region is active.
26013
26014 @item
26015 @code{gnus-group-read-ephemeral-group} can be called interactively,
26016 using @kbd{G M}.
26017
26018 @item
26019 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
26020 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
26021
26022 @item
26023 The revised Gnus @acronym{FAQ} is included in the manual,
26024 @xref{Frequently Asked Questions}.
26025
26026 @item
26027 Upgrading from previous (stable) version if you have used Oort.
26028
26029 If you have tried Oort (the unstable Gnus branch leading to this
26030 release) but went back to a stable version, be careful when upgrading to
26031 this version. In particular, you will probably want to remove all
26032 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
26033 read from your @file{.newsrc.eld} instead of from the
26034 @file{.marks}/@file{.mrk} file where this release store flags. See a
26035 later entry for more information about marks. Note that downgrading
26036 isn't save in general.
26037
26038 @item
26039 Article Buttons
26040
26041 More buttons for URLs, mail addresses, Message-IDs, Info links, man
26042 pages and Emacs or Gnus related references. @xref{Article Buttons}. The
26043 variables @code{gnus-button-@var{*}-level} can be used to control the
26044 appearance of all article buttons. @xref{Article Button Levels}.
26045
26046 @item
26047 Dired integration
26048
26049 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
26050 bindings in dired buffers to send a file as an attachment, open a file
26051 using the appropriate mailcap entry, and print a file using the mailcap
26052 entry.
26053
26054 @item
26055 Gnus can display RSS newsfeeds as a newsgroup. @xref{RSS}.
26056
26057 @item
26058 Single-part yenc encoded attachments can be decoded.
26059
26060 @item
26061 Picons
26062
26063 The picons code has been reimplemented to work in GNU Emacs---some of
26064 the previous options have been removed or renamed.
26065
26066 Picons are small ``personal icons'' representing users, domain and
26067 newsgroups, which can be displayed in the Article buffer.
26068 @xref{Picons}.
26069
26070 @item
26071 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
26072 boundary line is drawn at the end of the headers.
26073
26074 @item
26075 Retrieval of charters and control messages
26076
26077 There are new commands for fetching newsgroup charters (@kbd{H c}) and
26078 control messages (@kbd{H C}).
26079
26080 @item
26081 Delayed articles
26082
26083 You can delay the sending of a message with @kbd{C-c C-j} in the Message
26084 buffer. The messages are delivered at specified time. This is useful
26085 for sending yourself reminders. @xref{Delayed Articles}.
26086
26087 @item
26088 If @code{auto-compression-mode} is enabled, attachments are automatically
26089 decompressed when activated.
26090
26091 @item
26092 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
26093 the nnml back end allows compressed message files.
26094
26095 @item
26096 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
26097
26098 @item
26099 The Summary Buffer uses an arrow in the fringe to indicate the current
26100 article. Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
26101
26102 @item
26103 Warn about email replies to news
26104
26105 Do you often find yourself replying to news by email by mistake? Then
26106 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
26107 you.
26108
26109 @item
26110 If the new option @code{gnus-summary-display-while-building} is
26111 non-@code{nil}, the summary buffer is shown and updated as it's being
26112 built.
26113
26114 @item
26115 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
26116 opposed to old but unread messages).
26117
26118 @item
26119 The new option @code{gnus-gcc-mark-as-read} automatically marks
26120 Gcc articles as read.
26121
26122 @item
26123 The nndoc back end now supports mailman digests and exim bounces.
26124
26125 @item
26126 Gnus supports RFC 2369 mailing list headers, and adds a number of
26127 related commands in mailing list groups. @xref{Mailing List}.
26128
26129 @item
26130 The Date header can be displayed in a format that can be read aloud
26131 in English. @xref{Article Date}.
26132
26133 @item
26134 The envelope sender address can be customized when using Sendmail.
26135 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
26136
26137 @item
26138 diffs are automatically highlighted in groups matching
26139 @code{mm-uu-diff-groups-regexp}
26140
26141 @item
26142 @acronym{TLS} wrapper shipped with Gnus
26143
26144 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
26145 @acronym{NNTP} via @file{tls.el} and GNUTLS. The old
26146 @acronym{TLS}/@acronym{SSL} support via (external third party)
26147 @file{ssl.el} and OpenSSL still works.
26148
26149 @item
26150 New @file{make.bat} for compiling and installing Gnus under MS Windows
26151
26152 Use @file{make.bat} if you want to install Gnus under MS Windows, the
26153 first argument to the batch-program should be the directory where
26154 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
26155 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
26156 the second parameter.
26157
26158 @file{make.bat} has been rewritten from scratch, it now features
26159 automatic recognition of XEmacs and GNU Emacs, generates
26160 @file{gnus-load.el}, checks if errors occur while compilation and
26161 generation of info files and reports them at the end of the build
26162 process. It now uses @code{makeinfo} if it is available and falls
26163 back to @file{infohack.el} otherwise. @file{make.bat} should now
26164 install all files which are necessary to run Gnus and be generally a
26165 complete replacement for the @code{configure; make; make install}
26166 cycle used under Unix systems.
26167
26168 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
26169 been removed.
26170
26171 @item
26172 Support for non-@acronym{ASCII} domain names
26173
26174 Message supports non-@acronym{ASCII} domain names in From:, To: and
26175 Cc: and will query you whether to perform encoding when you try to
26176 send a message. The variable @code{message-use-idna} controls this.
26177 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
26178 and Cc: when you view a message. The variable @code{gnus-use-idna}
26179 controls this.
26180
26181 @item
26182 Better handling of Microsoft citation styles
26183
26184 Gnus now tries to recognize the mangled header block that some Microsoft
26185 mailers use to indicate that the rest of the message is a citation, even
26186 though it is not quoted in any way. The variable
26187 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
26188 citations.
26189
26190 @item
26191 @code{gnus-article-skip-boring}
26192
26193 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
26194 not scroll down to show you a page that contains only boring text,
26195 which by default means cited text and signature. You can customize
26196 what is skippable using @code{gnus-article-boring-faces}.
26197
26198 This feature is especially useful if you read many articles that
26199 consist of a little new content at the top with a long, untrimmed
26200 message cited below.
26201
26202 @item
26203 The format spec @code{%C} for positioning point has changed to @code{%*}.
26204
26205 @item
26206 The new variable @code{gnus-parameters} can be used to set group parameters.
26207
26208 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
26209 the parameters in @file{~/.newsrc.eld}, but via this variable you can
26210 enjoy the powers of customize, and simplified backups since you set the
26211 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}. The
26212 variable maps regular expressions matching group names to group
26213 parameters, a'la:
26214 @lisp
26215 (setq gnus-parameters
26216 '(("mail\\..*"
26217 (gnus-show-threads nil)
26218 (gnus-use-scoring nil))
26219 ("^nnimap:\\(foo.bar\\)$"
26220 (to-group . "\\1"))))
26221 @end lisp
26222
26223 @item
26224 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
26225
26226 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
26227 disable it.
26228
26229 @item
26230 Gnus no longer generate the Sender: header automatically.
26231
26232 Earlier it was generated iff the user configurable email address was
26233 different from the Gnus guessed default user address. As the guessing
26234 algorithm is rarely correct these days, and (more controversially) the
26235 only use of the Sender: header was to check if you are entitled to
26236 cancel/supersede news (which is now solved by Cancel Locks instead,
26237 see another entry), generation of the header has been disabled by
26238 default. See the variables @code{message-required-headers},
26239 @code{message-required-news-headers}, and
26240 @code{message-required-mail-headers}.
26241
26242 @item
26243 Features from third party @file{message-utils.el} added to @file{message.el}.
26244
26245 Message now asks if you wish to remove @samp{(was: <old subject>)} from
26246 subject lines (see @code{message-subject-trailing-was-query}). @kbd{C-c
26247 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
26248 @kbd{C-c C-f a} adds a X-No-Archive: header. @kbd{C-c C-f x} inserts
26249 appropriate headers and a note in the body for cross-postings and
26250 followups (see the variables @code{message-cross-post-@var{*}}).
26251
26252 @item
26253 References and X-Draft-From headers are no longer generated when you
26254 start composing messages and @code{message-generate-headers-first} is
26255 @code{nil}.
26256
26257 @item
26258 Improved anti-spam features.
26259
26260 Gnus is now able to take out spam from your mail and news streams
26261 using a wide variety of programs and filter rules. Among the supported
26262 methods are RBL blocklists, bogofilter and white/blacklists. Hooks
26263 for easy use of external packages such as SpamAssassin and Hashcash
26264 are also new. @xref{Thwarting Email Spam}.
26265
26266 @item
26267 Easy inclusion of X-Faces headers.
26268
26269 @item
26270 Face headers handling.
26271
26272 @item
26273 In the summary buffer, the new command @kbd{/ N} inserts new messages
26274 and @kbd{/ o} inserts old messages.
26275
26276 @item
26277 Gnus decodes morse encoded messages if you press @kbd{W m}.
26278
26279 @item
26280 Unread count correct in nnimap groups.
26281
26282 The estimated number of unread articles in the group buffer should now
26283 be correct for nnimap groups. This is achieved by calling
26284 @code{nnimap-fixup-unread-after-getting-new-news} from the
26285 @code{gnus-setup-news-hook} (called on startup) and
26286 @code{gnus-after-getting-new-news-hook}. (called after getting new
26287 mail). If you have modified those variables from the default, you may
26288 want to add @code{nnimap-fixup-unread-after-getting-new-news} again. If
26289 you were happy with the estimate and want to save some (minimal) time
26290 when getting new mail, remove the function.
26291
26292 @item
26293 Group Carbon Copy (GCC) quoting
26294
26295 To support groups that contains SPC and other weird characters, groups
26296 are quoted before they are placed in the Gcc: header. This means
26297 variables such as @code{gnus-message-archive-group} should no longer
26298 contain quote characters to make groups containing SPC work. Also, if
26299 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
26300 into two groups) you must change it to return the list
26301 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
26302 incorrectly. Note that returning the string @samp{nnml:foo, nnml:bar}
26303 was incorrect earlier, it just didn't generate any problems since it
26304 was inserted directly.
26305
26306 @item
26307 @file{~/News/overview/} not used.
26308
26309 As a result of the following change, the @file{~/News/overview/}
26310 directory is not used any more. You can safely delete the entire
26311 hierarchy.
26312
26313 @item
26314 @code{gnus-agent}
26315
26316 The Gnus Agent has seen a major updated and is now enabled by default,
26317 and all nntp and nnimap servers from @code{gnus-select-method} and
26318 @code{gnus-secondary-select-method} are agentized by default. Earlier
26319 only the server in @code{gnus-select-method} was agentized by the
26320 default, and the agent was disabled by default. When the agent is
26321 enabled, headers are now also retrieved from the Agent cache instead
26322 of the back ends when possible. Earlier this only happened in the
26323 unplugged state. You can enroll or remove servers with @kbd{J a} and
26324 @kbd{J r} in the server buffer. Gnus will not download articles into
26325 the Agent cache, unless you instruct it to do so, though, by using
26326 @kbd{J u} or @kbd{J s} from the Group buffer. You revert to the old
26327 behavior of having the Agent disabled with @code{(setq gnus-agent
26328 nil)}. Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
26329 is not needed any more.
26330
26331 @item
26332 @code{gnus-summary-line-format}
26333
26334 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
26335 %s\n}. Moreover @code{gnus-extra-headers},
26336 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
26337 changed their default so that the users name will be replaced by the
26338 recipient's name or the group name posting to for @acronym{NNTP}
26339 groups.
26340
26341 @item
26342 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
26343
26344 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
26345 broken Outlook (Express) articles.
26346
26347 @c FIXME: `gnus-load' is mentioned in README, which is not included in
26348 @c CVS. We should find a better place for this item.
26349 @item
26350 @code{(require 'gnus-load)}
26351
26352 If you use a stand-alone Gnus distribution, you'd better add
26353 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
26354 lisp directory into load-path.
26355
26356 File @file{gnus-load.el} contains autoload commands, functions and variables,
26357 some of which may not be included in distributions of Emacsen.
26358
26359 @item
26360 @code{gnus-slave-unplugged}
26361
26362 A new command which starts Gnus offline in slave mode.
26363
26364 @item
26365 @code{message-insinuate-rmail}
26366
26367 Adding @code{(message-insinuate-rmail)} and @code{(setq
26368 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
26369 compose, reply and forward messages in message-mode, where you can
26370 enjoy the power of @acronym{MML}.
26371
26372 @item
26373 @code{message-minibuffer-local-map}
26374
26375 The line below enables BBDB in resending a message:
26376 @lisp
26377 (define-key message-minibuffer-local-map [(tab)]
26378 'bbdb-complete-name)
26379 @end lisp
26380
26381 @item
26382 Externalizing and deleting of attachments.
26383
26384 If @code{gnus-gcc-externalize-attachments} or
26385 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
26386 local files as external parts.
26387
26388 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
26389 on @acronym{MIME} buttons) saves a part and replaces the part with an
26390 external one. @code{gnus-mime-delete-part} (bound to @kbd{d} on
26391 @acronym{MIME} buttons) removes a part. It works only on back ends
26392 that support editing.
26393
26394 @item
26395 @code{gnus-default-charset}
26396
26397 The default value is determined from the
26398 @code{current-language-environment} variable, instead of
26399 @code{iso-8859-1}. Also the @samp{.*} item in
26400 @code{gnus-group-charset-alist} is removed.
26401
26402 @item
26403 @code{gnus-posting-styles}
26404
26405 Add a new format of match like
26406 @lisp
26407 ((header "to" "larsi.*org")
26408 (Organization "Somewhere, Inc."))
26409 @end lisp
26410 The old format like the lines below is obsolete, but still accepted.
26411 @lisp
26412 (header "to" "larsi.*org"
26413 (Organization "Somewhere, Inc."))
26414 @end lisp
26415
26416 @item
26417 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
26418
26419 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
26420 added into these two variables. If you customized those, perhaps you
26421 need add those two headers too.
26422
26423 @item
26424 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
26425
26426 If one reads an article while plugged, and the article already exists
26427 in the Agent, it won't get downloaded once more. @code{(setq
26428 gnus-agent-cache nil)} reverts to the old behavior.
26429
26430 @item
26431 Gnus supports the ``format=flowed'' (RFC 2646) parameter. On
26432 composing messages, it is enabled by @code{use-hard-newlines}.
26433 Decoding format=flowed was present but not documented in earlier
26434 versions.
26435
26436 @item
26437 The option @code{mm-fill-flowed} can be used to disable treatment of
26438 ``format=flowed'' messages. Also, flowed text is disabled when sending
26439 inline PGP signed messages. (New in Gnus 5.10.7)
26440
26441 @item
26442 Gnus supports the generation of RFC 2298 Disposition Notification requests.
26443
26444 This is invoked with the @kbd{C-c M-n} key binding from message mode.
26445
26446 @item
26447 Gnus supports Maildir groups.
26448
26449 Gnus includes a new back end @file{nnmaildir.el}. @xref{Maildir}.
26450
26451 @item
26452 Printing capabilities are enhanced.
26453
26454 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
26455 Article buffers. Also, each individual @acronym{MIME} part can be
26456 printed using @kbd{p} on the @acronym{MIME} button.
26457
26458 @item
26459 Message supports the Importance: (RFC 2156) header.
26460
26461 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
26462 the valid values.
26463
26464 @item
26465 Gnus supports Cancel Locks in News.
26466
26467 This means a header @samp{Cancel-Lock} is inserted in news posting. It is
26468 used to determine if you wrote an article or not (for canceling and
26469 superseding). Gnus generates a random password string the first time
26470 you post a message, and saves it in your @file{~/.emacs} using the Custom
26471 system. While the variable is called @code{canlock-password}, it is not
26472 security sensitive data. Publishing your canlock string on the web
26473 will not allow anyone to be able to anything she could not already do.
26474 The behavior can be changed by customizing @code{message-insert-canlock}.
26475
26476 @item
26477 Gnus supports server-side mail filtering using Sieve.
26478
26479 Sieve rules can be added as Group Parameters for groups, and the
26480 complete Sieve script is generated using @kbd{D g} from the Group
26481 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
26482 generated Sieve buffer. @xref{Sieve Commands}, and the new Sieve
26483 manual @ref{Top, , Top, sieve, Emacs Sieve}.
26484
26485 @item
26486 Extended format specs.
26487
26488 Format spec @samp{%&user-date;} is added into
26489 @code{gnus-summary-line-format-alist}. Also, user defined extended
26490 format specs are supported. The extended format specs look like
26491 @samp{%u&foo;}, which invokes function
26492 @code{gnus-user-format-function-@var{foo}}. Because @samp{&} is used as the
26493 escape character, old user defined format @samp{%u&} is no longer supported.
26494
26495 @item
26496 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
26497
26498 It was aliased to @kbd{Y c}
26499 (@code{gnus-summary-insert-cached-articles}). The new function filters
26500 out other articles.
26501
26502 @item
26503 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
26504
26505 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
26506 s}, @kbd{/ a}, and @kbd{/ x}
26507 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
26508 result will be to display all articles that do not match the expression.
26509
26510 @item
26511 Group names are treated as UTF-8 by default.
26512
26513 This is supposedly what USEFOR wanted to migrate to. See
26514 @code{gnus-group-name-charset-group-alist} and
26515 @code{gnus-group-name-charset-method-alist} for customization.
26516
26517 @item
26518 The nnml and nnfolder back ends store marks for each groups.
26519
26520 This makes it possible to take backup of nnml/nnfolder servers/groups
26521 separately of @file{~/.newsrc.eld}, while preserving marks. It also
26522 makes it possible to share articles and marks between users (without
26523 sharing the @file{~/.newsrc.eld} file) within e.g. a department. It
26524 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
26525 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
26526 nnfolder, named @var{groupname}). If the nnml/nnfolder is moved to
26527 another machine, Gnus will automatically use the @file{.marks} or
26528 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
26529 The new server variables @code{nnml-marks-is-evil} and
26530 @code{nnfolder-marks-is-evil} can be used to disable this feature.
26531
26532 @item
26533 The menu bar item (in Group and Summary buffer) named ``Misc'' has
26534 been renamed to ``Gnus''.
26535
26536 @item
26537 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
26538 renamed to ``Attachments''. Note that this menu also contains security
26539 related stuff, like signing and encryption (@pxref{Security, Security,,
26540 message, Message Manual}).
26541
26542 @item
26543 @code{gnus-group-charset-alist} and
26544 @code{gnus-group-ignored-charsets-alist}.
26545
26546 The regexps in these variables are compared with full group names
26547 instead of real group names in 5.8. Users who customize these
26548 variables should change those regexps accordingly. For example:
26549 @lisp
26550 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
26551 @end lisp
26552
26553 @item
26554 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
26555 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
26556
26557 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
26558 additional Lisp libraries. This add several menu items to the
26559 Attachments menu, and @kbd{C-c RET} key bindings, when composing
26560 messages. This also obsoletes @code{gnus-article-hide-pgp-hook}.
26561
26562 @item
26563 Gnus inlines external parts (message/external).
26564
26565 @item
26566 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
26567 C-m}.
26568
26569 This change was made to avoid conflict with the standard binding of
26570 @code{back-to-indentation}, which is also useful in message mode.
26571
26572 @item
26573 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
26574
26575 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
26576 convert to @acronym{MIME}) when appropriate. @acronym{MML} will not be
26577 used when forwarding signed or encrypted messages, as the conversion
26578 invalidate the digital signature.
26579 @end itemize
26580
26581 @iftex
26582
26583 @page
26584 @node The Manual
26585 @section The Manual
26586 @cindex colophon
26587 @cindex manual
26588
26589 This manual was generated from a TeXinfo file and then run through
26590 either @code{texi2dvi}
26591 @iflatex
26592 or my own home-brewed TeXinfo to \LaTeX\ transformer,
26593 and then run through @code{latex} and @code{dvips}
26594 @end iflatex
26595 to get what you hold in your hands now.
26596
26597 The following conventions have been used:
26598
26599 @enumerate
26600
26601 @item
26602 This is a @samp{string}
26603
26604 @item
26605 This is a @kbd{keystroke}
26606
26607 @item
26608 This is a @file{file}
26609
26610 @item
26611 This is a @code{symbol}
26612
26613 @end enumerate
26614
26615 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
26616 mean:
26617
26618 @lisp
26619 (setq flargnoze "yes")
26620 @end lisp
26621
26622 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
26623
26624 @lisp
26625 (setq flumphel 'yes)
26626 @end lisp
26627
26628 @samp{yes} and @code{yes} are two @emph{very} different things---don't
26629 ever get them confused.
26630
26631 @iflatex
26632 @c @head
26633 Of course, everything in this manual is of vital interest, so you should
26634 read it all. Several times. However, if you feel like skimming the
26635 manual, look for that gnu head you should see in the margin over
26636 there---it means that what's being discussed is of more importance than
26637 the rest of the stuff. (On the other hand, if everything is infinitely
26638 important, how can anything be more important than that? Just one more
26639 of the mysteries of this world, I guess.)
26640 @end iflatex
26641
26642 @end iftex
26643
26644
26645 @node On Writing Manuals
26646 @section On Writing Manuals
26647
26648 I guess most manuals are written after-the-fact; documenting a program
26649 that's already there. This is not how this manual is written. When
26650 implementing something, I write the manual entry for that something
26651 straight away. I then see that it's difficult to explain the
26652 functionality, so I write how it's supposed to be, and then I change the
26653 implementation. Writing the documentation and writing the code goes
26654 hand in hand.
26655
26656 This, of course, means that this manual has no, or little, flow. It
26657 documents absolutely everything in Gnus, but often not where you're
26658 looking for it. It is a reference manual, and not a guide to how to get
26659 started with Gnus.
26660
26661 That would be a totally different book, that should be written using the
26662 reference manual as source material. It would look quite differently.
26663
26664
26665 @page
26666 @node Terminology
26667 @section Terminology
26668
26669 @cindex terminology
26670 @table @dfn
26671
26672 @item news
26673 @cindex news
26674 This is what you are supposed to use this thing for---reading news.
26675 News is generally fetched from a nearby @acronym{NNTP} server, and is
26676 generally publicly available to everybody. If you post news, the entire
26677 world is likely to read just what you have written, and they'll all
26678 snigger mischievously. Behind your back.
26679
26680 @item mail
26681 @cindex mail
26682 Everything that's delivered to you personally is mail. Some news/mail
26683 readers (like Gnus) blur the distinction between mail and news, but
26684 there is a difference. Mail is private. News is public. Mailing is
26685 not posting, and replying is not following up.
26686
26687 @item reply
26688 @cindex reply
26689 Send a mail to the person who has written what you are reading.
26690
26691 @item follow up
26692 @cindex follow up
26693 Post an article to the current newsgroup responding to the article you
26694 are reading.
26695
26696 @item back end
26697 @cindex back end
26698 Gnus considers mail and news to be mostly the same, really. The only
26699 difference is how to access the actual articles. News articles are
26700 commonly fetched via the protocol @acronym{NNTP}, whereas mail
26701 messages could be read from a file on the local disk. The internal
26702 architecture of Gnus thus comprises a ``front end'' and a number of
26703 ``back ends''. Internally, when you enter a group (by hitting
26704 @key{RET}, say), you thereby invoke a function in the front end in
26705 Gnus. The front end then ``talks'' to a back end and says things like
26706 ``Give me the list of articles in the foo group'' or ``Show me article
26707 number 4711''.
26708
26709 So a back end mainly defines either a protocol (the @code{nntp} back
26710 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
26711 accesses mail via @acronym{IMAP}) or a file format and directory
26712 layout (the @code{nnspool} back end accesses news via the common
26713 ``spool directory'' format, the @code{nnml} back end access mail via a
26714 file format and directory layout that's quite similar).
26715
26716 Gnus does not handle the underlying media, so to speak---this is all
26717 done by the back ends. A back end is a collection of functions to
26718 access the articles.
26719
26720 However, sometimes the term ``back end'' is also used where ``server''
26721 would have been more appropriate. And then there is the term ``select
26722 method'' which can mean either. The Gnus terminology can be quite
26723 confusing.
26724
26725 @item native
26726 @cindex native
26727 Gnus will always use one method (and back end) as the @dfn{native}, or
26728 default, way of getting news.
26729
26730 @item foreign
26731 @cindex foreign
26732 You can also have any number of foreign groups active at the same time.
26733 These are groups that use non-native non-secondary back ends for getting
26734 news.
26735
26736 @item secondary
26737 @cindex secondary
26738 Secondary back ends are somewhere half-way between being native and being
26739 foreign, but they mostly act like they are native.
26740
26741 @item article
26742 @cindex article
26743 A message that has been posted as news.
26744
26745 @item mail message
26746 @cindex mail message
26747 A message that has been mailed.
26748
26749 @item message
26750 @cindex message
26751 A mail message or news article
26752
26753 @item head
26754 @cindex head
26755 The top part of a message, where administrative information (etc.) is
26756 put.
26757
26758 @item body
26759 @cindex body
26760 The rest of an article. Everything not in the head is in the
26761 body.
26762
26763 @item header
26764 @cindex header
26765 A line from the head of an article.
26766
26767 @item headers
26768 @cindex headers
26769 A collection of such lines, or a collection of heads. Or even a
26770 collection of @acronym{NOV} lines.
26771
26772 @item @acronym{NOV}
26773 @cindex @acronym{NOV}
26774 When Gnus enters a group, it asks the back end for the headers of all
26775 unread articles in the group. Most servers support the News OverView
26776 format, which is more compact and much faster to read and parse than the
26777 normal @sc{head} format.
26778
26779 @item level
26780 @cindex levels
26781 Each group is subscribed at some @dfn{level} or other (1-9). The ones
26782 that have a lower level are ``more'' subscribed than the groups with a
26783 higher level. In fact, groups on levels 1-5 are considered
26784 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
26785 are @dfn{killed}. Commands for listing groups and scanning for new
26786 articles will all use the numeric prefix as @dfn{working level}.
26787
26788 @item killed groups
26789 @cindex killed groups
26790 No information on killed groups is stored or updated, which makes killed
26791 groups much easier to handle than subscribed groups.
26792
26793 @item zombie groups
26794 @cindex zombie groups
26795 Just like killed groups, only slightly less dead.
26796
26797 @item active file
26798 @cindex active file
26799 The news server has to keep track of what articles it carries, and what
26800 groups exist. All this information in stored in the active file, which
26801 is rather large, as you might surmise.
26802
26803 @item bogus groups
26804 @cindex bogus groups
26805 A group that exists in the @file{.newsrc} file, but isn't known to the
26806 server (i.e., it isn't in the active file), is a @emph{bogus group}.
26807 This means that the group probably doesn't exist (any more).
26808
26809 @item activating
26810 @cindex activating groups
26811 The act of asking the server for info on a group and computing the
26812 number of unread articles is called @dfn{activating the group}.
26813 Un-activated groups are listed with @samp{*} in the group buffer.
26814
26815 @item spool
26816 @cindex spool
26817 News servers store their articles locally in one fashion or other.
26818 One old-fashioned storage method is to have just one file per
26819 article. That's called a ``traditional spool''.
26820
26821 @item server
26822 @cindex server
26823 A machine one can connect to and get news (or mail) from.
26824
26825 @item select method
26826 @cindex select method
26827 A structure that specifies the back end, the server and the virtual
26828 server settings.
26829
26830 @item virtual server
26831 @cindex virtual server
26832 A named select method. Since a select method defines all there is to
26833 know about connecting to a (physical) server, taking the thing as a
26834 whole is a virtual server.
26835
26836 @item washing
26837 @cindex washing
26838 Taking a buffer and running it through a filter of some sort. The
26839 result will (more often than not) be cleaner and more pleasing than the
26840 original.
26841
26842 @item ephemeral groups
26843 @cindex ephemeral groups
26844 @cindex temporary groups
26845 Most groups store data on what articles you have read. @dfn{Ephemeral}
26846 groups are groups that will have no data stored---when you exit the
26847 group, it'll disappear into the aether.
26848
26849 @item solid groups
26850 @cindex solid groups
26851 This is the opposite of ephemeral groups. All groups listed in the
26852 group buffer are solid groups.
26853
26854 @item sparse articles
26855 @cindex sparse articles
26856 These are article placeholders shown in the summary buffer when
26857 @code{gnus-build-sparse-threads} has been switched on.
26858
26859 @item threading
26860 @cindex threading
26861 To put responses to articles directly after the articles they respond
26862 to---in a hierarchical fashion.
26863
26864 @item root
26865 @cindex root
26866 @cindex thread root
26867 The first article in a thread is the root. It is the ancestor of all
26868 articles in the thread.
26869
26870 @item parent
26871 @cindex parent
26872 An article that has responses.
26873
26874 @item child
26875 @cindex child
26876 An article that responds to a different article---its parent.
26877
26878 @item digest
26879 @cindex digest
26880 A collection of messages in one file. The most common digest format is
26881 specified by RFC 1153.
26882
26883 @item splitting
26884 @cindex splitting, terminolgy
26885 @cindex mail sorting
26886 @cindex mail filtering (splitting)
26887 The action of sorting your emails according to certain rules. Sometimes
26888 incorrectly called mail filtering.
26889
26890 @end table
26891
26892
26893 @page
26894 @node Customization
26895 @section Customization
26896 @cindex general customization
26897
26898 All variables are properly documented elsewhere in this manual. This
26899 section is designed to give general pointers on how to customize Gnus
26900 for some quite common situations.
26901
26902 @menu
26903 * Slow/Expensive Connection:: You run a local Emacs and get the news elsewhere.
26904 * Slow Terminal Connection:: You run a remote Emacs.
26905 * Little Disk Space:: You feel that having large setup files is icky.
26906 * Slow Machine:: You feel like buying a faster machine.
26907 @end menu
26908
26909
26910 @node Slow/Expensive Connection
26911 @subsection Slow/Expensive NNTP Connection
26912
26913 If you run Emacs on a machine locally, and get your news from a machine
26914 over some very thin strings, you want to cut down on the amount of data
26915 Gnus has to get from the @acronym{NNTP} server.
26916
26917 @table @code
26918
26919 @item gnus-read-active-file
26920 Set this to @code{nil}, which will inhibit Gnus from requesting the
26921 entire active file from the server. This file is often very large. You
26922 also have to set @code{gnus-check-new-newsgroups} and
26923 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
26924 doesn't suddenly decide to fetch the active file anyway.
26925
26926 @item gnus-nov-is-evil
26927 This one has to be @code{nil}. If not, grabbing article headers from
26928 the @acronym{NNTP} server will not be very fast. Not all @acronym{NNTP} servers
26929 support @sc{xover}; Gnus will detect this by itself.
26930 @end table
26931
26932
26933 @node Slow Terminal Connection
26934 @subsection Slow Terminal Connection
26935
26936 Let's say you use your home computer for dialing up the system that runs
26937 Emacs and Gnus. If your modem is slow, you want to reduce (as much as
26938 possible) the amount of data sent over the wires.
26939
26940 @table @code
26941
26942 @item gnus-auto-center-summary
26943 Set this to @code{nil} to inhibit Gnus from re-centering the summary
26944 buffer all the time. If it is @code{vertical}, do only vertical
26945 re-centering. If it is neither @code{nil} nor @code{vertical}, do both
26946 horizontal and vertical recentering.
26947
26948 @item gnus-visible-headers
26949 Cut down on the headers included in the articles to the
26950 minimum. You can, in fact, make do without them altogether---most of the
26951 useful data is in the summary buffer, anyway. Set this variable to
26952 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
26953
26954 Use the following to enable all the available hiding features:
26955 @lisp
26956 (setq gnus-treat-hide-headers 'head
26957 gnus-treat-hide-signature t
26958 gnus-treat-hide-citation t)
26959 @end lisp
26960
26961 @item gnus-use-full-window
26962 By setting this to @code{nil}, you can make all the windows smaller.
26963 While this doesn't really cut down much generally, it means that you
26964 have to see smaller portions of articles before deciding that you didn't
26965 want to read them anyway.
26966
26967 @item gnus-thread-hide-subtree
26968 If this is non-@code{nil}, all threads in the summary buffer will be
26969 hidden initially.
26970
26971
26972 @item gnus-updated-mode-lines
26973 If this is @code{nil}, Gnus will not put information in the buffer mode
26974 lines, which might save some time.
26975 @end table
26976
26977
26978 @node Little Disk Space
26979 @subsection Little Disk Space
26980 @cindex disk space
26981
26982 The startup files can get rather large, so you may want to cut their
26983 sizes a bit if you are running out of space.
26984
26985 @table @code
26986
26987 @item gnus-save-newsrc-file
26988 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26989 only save @file{.newsrc.eld}. This means that you will not be able to
26990 use any other newsreaders than Gnus. This variable is @code{t} by
26991 default.
26992
26993 @item gnus-read-newsrc-file
26994 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26995 only read @file{.newsrc.eld}. This means that you will not be able to
26996 use any other newsreaders than Gnus. This variable is @code{t} by
26997 default.
26998
26999 @item gnus-save-killed-list
27000 If this is @code{nil}, Gnus will not save the list of dead groups. You
27001 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
27002 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
27003 variable to @code{nil}. This variable is @code{t} by default.
27004
27005 @end table
27006
27007
27008 @node Slow Machine
27009 @subsection Slow Machine
27010 @cindex slow machine
27011
27012 If you have a slow machine, or are just really impatient, there are a
27013 few things you can do to make Gnus run faster.
27014
27015 Set @code{gnus-check-new-newsgroups} and
27016 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
27017
27018 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
27019 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
27020 summary buffer faster.
27021
27022
27023 @page
27024 @node Troubleshooting
27025 @section Troubleshooting
27026 @cindex troubleshooting
27027
27028 Gnus works @emph{so} well straight out of the box---I can't imagine any
27029 problems, really.
27030
27031 Ahem.
27032
27033 @enumerate
27034
27035 @item
27036 Make sure your computer is switched on.
27037
27038 @item
27039 Make sure that you really load the current Gnus version. If you have
27040 been running @sc{gnus}, you need to exit Emacs and start it up again before
27041 Gnus will work.
27042
27043 @item
27044 Try doing an @kbd{M-x gnus-version}. If you get something that looks
27045 like @samp{Gnus v5.10.6} you have the right files loaded. Otherwise
27046 you have some old @file{.el} files lying around. Delete these.
27047
27048 @item
27049 Read the help group (@kbd{G h} in the group buffer) for a
27050 @acronym{FAQ} and a how-to.
27051
27052 @item
27053 @vindex max-lisp-eval-depth
27054 Gnus works on many recursive structures, and in some extreme (and very
27055 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
27056 you. If this happens to you, set @code{max-lisp-eval-depth} to 500 or
27057 something like that.
27058 @end enumerate
27059
27060 If all else fails, report the problem as a bug.
27061
27062 @cindex bugs
27063 @cindex reporting bugs
27064
27065 @kindex M-x gnus-bug
27066 @findex gnus-bug
27067 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
27068 command. @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
27069 me the backtrace. I will fix bugs, but I can only fix them if you send
27070 me a precise description as to how to reproduce the bug.
27071
27072 You really can never be too detailed in a bug report. Always use the
27073 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
27074 a 10Kb mail each time you use it, and even if you have sent me your
27075 environment 500 times before. I don't care. I want the full info each
27076 time.
27077
27078 It is also important to remember that I have no memory whatsoever. If
27079 you send a bug report, and I send you a reply, and then you just send
27080 back ``No, it's not! Moron!'', I will have no idea what you are
27081 insulting me about. Always over-explain everything. It's much easier
27082 for all of us---if I don't have all the information I need, I will just
27083 mail you and ask for more info, and everything takes more time.
27084
27085 If the problem you're seeing is very visual, and you can't quite explain
27086 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
27087 it somewhere it can be reached, and include the URL of the picture in
27088 the bug report.
27089
27090 @cindex patches
27091 If you would like to contribute a patch to fix bugs or make
27092 improvements, please produce the patch using @samp{diff -u}.
27093
27094 @cindex edebug
27095 If you want to debug your problem further before reporting, possibly
27096 in order to solve the problem yourself and send a patch, you can use
27097 edebug. Debugging Lisp code is documented in the Elisp manual
27098 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
27099 Lisp Reference Manual}). To get you started with edebug, consider if
27100 you discover some weird behavior when pressing @kbd{c}, the first
27101 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
27102 the documentation buffer that leads you to the function definition,
27103 then press @kbd{M-x edebug-defun RET} with point inside that function,
27104 return to Gnus and press @kbd{c} to invoke the code. You will be
27105 placed in the lisp buffer and can single step using @kbd{SPC} and
27106 evaluate expressions using @kbd{M-:} or inspect variables using
27107 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
27108 @kbd{c} or @kbd{g}.
27109
27110 @cindex elp
27111 @cindex profile
27112 @cindex slow
27113 Sometimes, a problem do not directly generate an elisp error but
27114 manifests itself by causing Gnus to be very slow. In these cases, you
27115 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
27116 slow, and then try to analyze the backtrace (repeating the procedure
27117 helps isolating the real problem areas).
27118
27119 A fancier approach is to use the elisp profiler, ELP. The profiler is
27120 (or should be) fully documented elsewhere, but to get you started
27121 there are a few steps that need to be followed. First, instrument the
27122 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
27123 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
27124 RET message}. Then perform the operation that is slow and press
27125 @kbd{M-x elp-results}. You will then see which operations that takes
27126 time, and can debug them further. If the entire operation takes much
27127 longer than the time spent in the slowest function in the profiler
27128 output, you probably profiled the wrong part of Gnus. To reset
27129 profiling statistics, use @kbd{M-x elp-reset-all}. @kbd{M-x
27130 elp-restore-all} is supposed to remove profiling, but given the
27131 complexities and dynamic code generation in Gnus, it might not always
27132 work perfectly.
27133
27134 @cindex gnu.emacs.gnus
27135 @cindex ding mailing list
27136 If you just need help, you are better off asking on
27137 @samp{gnu.emacs.gnus}. I'm not very helpful. You can also ask on
27138 @email{ding@@gnus.org, the ding mailing list}. Write to
27139 @email{ding-request@@gnus.org} to subscribe.
27140
27141
27142 @page
27143 @node Gnus Reference Guide
27144 @section Gnus Reference Guide
27145
27146 It is my hope that other people will figure out smart stuff that Gnus
27147 can do, and that other people will write those smart things as well. To
27148 facilitate that I thought it would be a good idea to describe the inner
27149 workings of Gnus. And some of the not-so-inner workings, while I'm at
27150 it.
27151
27152 You can never expect the internals of a program not to change, but I
27153 will be defining (in some details) the interface between Gnus and its
27154 back ends (this is written in stone), the format of the score files
27155 (ditto), data structures (some are less likely to change than others)
27156 and general methods of operation.
27157
27158 @menu
27159 * Gnus Utility Functions:: Common functions and variable to use.
27160 * Back End Interface:: How Gnus communicates with the servers.
27161 * Score File Syntax:: A BNF definition of the score file standard.
27162 * Headers:: How Gnus stores headers internally.
27163 * Ranges:: A handy format for storing mucho numbers.
27164 * Group Info:: The group info format.
27165 * Extended Interactive:: Symbolic prefixes and stuff.
27166 * Emacs/XEmacs Code:: Gnus can be run under all modern Emacsen.
27167 * Various File Formats:: Formats of files that Gnus use.
27168 @end menu
27169
27170
27171 @node Gnus Utility Functions
27172 @subsection Gnus Utility Functions
27173 @cindex Gnus utility functions
27174 @cindex utility functions
27175 @cindex functions
27176 @cindex internal variables
27177
27178 When writing small functions to be run from hooks (and stuff), it's
27179 vital to have access to the Gnus internal functions and variables.
27180 Below is a list of the most common ones.
27181
27182 @table @code
27183
27184 @item gnus-newsgroup-name
27185 @vindex gnus-newsgroup-name
27186 This variable holds the name of the current newsgroup.
27187
27188 @item gnus-find-method-for-group
27189 @findex gnus-find-method-for-group
27190 A function that returns the select method for @var{group}.
27191
27192 @item gnus-group-real-name
27193 @findex gnus-group-real-name
27194 Takes a full (prefixed) Gnus group name, and returns the unprefixed
27195 name.
27196
27197 @item gnus-group-prefixed-name
27198 @findex gnus-group-prefixed-name
27199 Takes an unprefixed group name and a select method, and returns the full
27200 (prefixed) Gnus group name.
27201
27202 @item gnus-get-info
27203 @findex gnus-get-info
27204 Returns the group info list for @var{group}.
27205
27206 @item gnus-group-unread
27207 @findex gnus-group-unread
27208 The number of unread articles in @var{group}, or @code{t} if that is
27209 unknown.
27210
27211 @item gnus-active
27212 @findex gnus-active
27213 The active entry for @var{group}.
27214
27215 @item gnus-set-active
27216 @findex gnus-set-active
27217 Set the active entry for @var{group}.
27218
27219 @item gnus-add-current-to-buffer-list
27220 @findex gnus-add-current-to-buffer-list
27221 Adds the current buffer to the list of buffers to be killed on Gnus
27222 exit.
27223
27224 @item gnus-continuum-version
27225 @findex gnus-continuum-version
27226 Takes a Gnus version string as a parameter and returns a floating point
27227 number. Earlier versions will always get a lower number than later
27228 versions.
27229
27230 @item gnus-group-read-only-p
27231 @findex gnus-group-read-only-p
27232 Says whether @var{group} is read-only or not.
27233
27234 @item gnus-news-group-p
27235 @findex gnus-news-group-p
27236 Says whether @var{group} came from a news back end.
27237
27238 @item gnus-ephemeral-group-p
27239 @findex gnus-ephemeral-group-p
27240 Says whether @var{group} is ephemeral or not.
27241
27242 @item gnus-server-to-method
27243 @findex gnus-server-to-method
27244 Returns the select method corresponding to @var{server}.
27245
27246 @item gnus-server-equal
27247 @findex gnus-server-equal
27248 Says whether two virtual servers are equal.
27249
27250 @item gnus-group-native-p
27251 @findex gnus-group-native-p
27252 Says whether @var{group} is native or not.
27253
27254 @item gnus-group-secondary-p
27255 @findex gnus-group-secondary-p
27256 Says whether @var{group} is secondary or not.
27257
27258 @item gnus-group-foreign-p
27259 @findex gnus-group-foreign-p
27260 Says whether @var{group} is foreign or not.
27261
27262 @item gnus-group-find-parameter
27263 @findex gnus-group-find-parameter
27264 Returns the parameter list of @var{group}. If given a second parameter,
27265 returns the value of that parameter for @var{group}.
27266
27267 @item gnus-group-set-parameter
27268 @findex gnus-group-set-parameter
27269 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
27270
27271 @item gnus-narrow-to-body
27272 @findex gnus-narrow-to-body
27273 Narrows the current buffer to the body of the article.
27274
27275 @item gnus-check-backend-function
27276 @findex gnus-check-backend-function
27277 Takes two parameters, @var{function} and @var{group}. If the back end
27278 @var{group} comes from supports @var{function}, return non-@code{nil}.
27279
27280 @lisp
27281 (gnus-check-backend-function "request-scan" "nnml:misc")
27282 @result{} t
27283 @end lisp
27284
27285 @item gnus-read-method
27286 @findex gnus-read-method
27287 Prompts the user for a select method.
27288
27289 @end table
27290
27291
27292 @node Back End Interface
27293 @subsection Back End Interface
27294
27295 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
27296 groups. It only knows how to talk to @dfn{virtual servers}. A virtual
27297 server is a @dfn{back end} and some @dfn{back end variables}. As examples
27298 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}. As
27299 examples of the latter we have @code{nntp-port-number} and
27300 @code{nnmbox-directory}.
27301
27302 When Gnus asks for information from a back end---say @code{nntp}---on
27303 something, it will normally include a virtual server name in the
27304 function parameters. (If not, the back end should use the ``current''
27305 virtual server.) For instance, @code{nntp-request-list} takes a virtual
27306 server as its only (optional) parameter. If this virtual server hasn't
27307 been opened, the function should fail.
27308
27309 Note that a virtual server name has no relation to some physical server
27310 name. Take this example:
27311
27312 @lisp
27313 (nntp "odd-one"
27314 (nntp-address "ifi.uio.no")
27315 (nntp-port-number 4324))
27316 @end lisp
27317
27318 Here the virtual server name is @samp{odd-one} while the name of
27319 the physical server is @samp{ifi.uio.no}.
27320
27321 The back ends should be able to switch between several virtual servers.
27322 The standard back ends implement this by keeping an alist of virtual
27323 server environments that they pull down/push up when needed.
27324
27325 There are two groups of interface functions: @dfn{required functions},
27326 which must be present, and @dfn{optional functions}, which Gnus will
27327 always check for presence before attempting to call 'em.
27328
27329 All these functions are expected to return data in the buffer
27330 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
27331 unfortunately named, but we'll have to live with it. When I talk about
27332 @dfn{resulting data}, I always refer to the data in that buffer. When I
27333 talk about @dfn{return value}, I talk about the function value returned by
27334 the function call. Functions that fail should return @code{nil} as the
27335 return value.
27336
27337 Some back ends could be said to be @dfn{server-forming} back ends, and
27338 some might be said not to be. The latter are back ends that generally
27339 only operate on one group at a time, and have no concept of ``server''
27340 ---they have a group, and they deliver info on that group and nothing
27341 more.
27342
27343 Gnus identifies each message by way of group name and article number. A
27344 few remarks about these article numbers might be useful. First of all,
27345 the numbers are positive integers. Secondly, it is normally not
27346 possible for later articles to ``re-use'' older article numbers without
27347 confusing Gnus. That is, if a group has ever contained a message
27348 numbered 42, then no other message may get that number, or Gnus will get
27349 mightily confused.@footnote{See the function
27350 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
27351 Third, article numbers must be assigned in order of arrival in the
27352 group; this is not necessarily the same as the date of the message.
27353
27354 The previous paragraph already mentions all the ``hard'' restrictions that
27355 article numbers must fulfill. But it seems that it might be useful to
27356 assign @emph{consecutive} article numbers, for Gnus gets quite confused
27357 if there are holes in the article numbering sequence. However, due to
27358 the ``no-reuse'' restriction, holes cannot be avoided altogether. It's
27359 also useful for the article numbers to start at 1 to avoid running out
27360 of numbers as long as possible.
27361
27362 Note that by convention, back ends are named @code{nnsomething}, but
27363 Gnus also comes with some @code{nnnotbackends}, such as
27364 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
27365
27366 In the examples and definitions I will refer to the imaginary back end
27367 @code{nnchoke}.
27368
27369 @cindex @code{nnchoke}
27370
27371 @menu
27372 * Required Back End Functions:: Functions that must be implemented.
27373 * Optional Back End Functions:: Functions that need not be implemented.
27374 * Error Messaging:: How to get messages and report errors.
27375 * Writing New Back Ends:: Extending old back ends.
27376 * Hooking New Back Ends Into Gnus:: What has to be done on the Gnus end.
27377 * Mail-like Back Ends:: Some tips on mail back ends.
27378 @end menu
27379
27380
27381 @node Required Back End Functions
27382 @subsubsection Required Back End Functions
27383
27384 @table @code
27385
27386 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
27387
27388 @var{articles} is either a range of article numbers or a list of
27389 @code{Message-ID}s. Current back ends do not fully support either---only
27390 sequences (lists) of article numbers, and most back ends do not support
27391 retrieval of @code{Message-ID}s. But they should try for both.
27392
27393 The result data should either be HEADs or @acronym{NOV} lines, and the result
27394 value should either be @code{headers} or @code{nov} to reflect this.
27395 This might later be expanded to @code{various}, which will be a mixture
27396 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
27397
27398 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
27399 headers'', in some meaning of the word. This is generally done by
27400 fetching (at most) @var{fetch-old} extra headers less than the smallest
27401 article number in @code{articles}, and filling the gaps as well. The
27402 presence of this parameter can be ignored if the back end finds it
27403 cumbersome to follow the request. If this is non-@code{nil} and not a
27404 number, do maximum fetches.
27405
27406 Here's an example HEAD:
27407
27408 @example
27409 221 1056 Article retrieved.
27410 Path: ifi.uio.no!sturles
27411 From: sturles@@ifi.uio.no (Sturle Sunde)
27412 Newsgroups: ifi.discussion
27413 Subject: Re: Something very droll
27414 Date: 27 Oct 1994 14:02:57 +0100
27415 Organization: Dept. of Informatics, University of Oslo, Norway
27416 Lines: 26
27417 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
27418 References: <38jdmq$4qu@@visbur.ifi.uio.no>
27419 NNTP-Posting-Host: holmenkollen.ifi.uio.no
27420 .
27421 @end example
27422
27423 So a @code{headers} return value would imply that there's a number of
27424 these in the data buffer.
27425
27426 Here's a BNF definition of such a buffer:
27427
27428 @example
27429 headers = *head
27430 head = error / valid-head
27431 error-message = [ "4" / "5" ] 2number " " <error message> eol
27432 valid-head = valid-message *header "." eol
27433 valid-message = "221 " <number> " Article retrieved." eol
27434 header = <text> eol
27435 @end example
27436
27437 @cindex BNF
27438 (The version of BNF used here is the one used in RFC822.)
27439
27440 If the return value is @code{nov}, the data buffer should contain
27441 @dfn{network overview database} lines. These are basically fields
27442 separated by tabs.
27443
27444 @example
27445 nov-buffer = *nov-line
27446 nov-line = field 7*8[ <TAB> field ] eol
27447 field = <text except TAB>
27448 @end example
27449
27450 For a closer look at what should be in those fields,
27451 @pxref{Headers}.
27452
27453
27454 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
27455
27456 @var{server} is here the virtual server name. @var{definitions} is a
27457 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
27458
27459 If the server can't be opened, no error should be signaled. The back end
27460 may then choose to refuse further attempts at connecting to this
27461 server. In fact, it should do so.
27462
27463 If the server is opened already, this function should return a
27464 non-@code{nil} value. There should be no data returned.
27465
27466
27467 @item (nnchoke-close-server &optional SERVER)
27468
27469 Close connection to @var{server} and free all resources connected
27470 to it. Return @code{nil} if the server couldn't be closed for some
27471 reason.
27472
27473 There should be no data returned.
27474
27475
27476 @item (nnchoke-request-close)
27477
27478 Close connection to all servers and free all resources that the back end
27479 have reserved. All buffers that have been created by that back end
27480 should be killed. (Not the @code{nntp-server-buffer}, though.) This
27481 function is generally only called when Gnus is shutting down.
27482
27483 There should be no data returned.
27484
27485
27486 @item (nnchoke-server-opened &optional SERVER)
27487
27488 If @var{server} is the current virtual server, and the connection to the
27489 physical server is alive, then this function should return a
27490 non-@code{nil} value. This function should under no circumstances
27491 attempt to reconnect to a server we have lost connection to.
27492
27493 There should be no data returned.
27494
27495
27496 @item (nnchoke-status-message &optional SERVER)
27497
27498 This function should return the last error message from @var{server}.
27499
27500 There should be no data returned.
27501
27502
27503 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
27504
27505 The result data from this function should be the article specified by
27506 @var{article}. This might either be a @code{Message-ID} or a number.
27507 It is optional whether to implement retrieval by @code{Message-ID}, but
27508 it would be nice if that were possible.
27509
27510 If @var{to-buffer} is non-@code{nil}, the result data should be returned
27511 in this buffer instead of the normal data buffer. This is to make it
27512 possible to avoid copying large amounts of data from one buffer to
27513 another, while Gnus mainly requests articles to be inserted directly
27514 into its article buffer.
27515
27516 If it is at all possible, this function should return a cons cell where
27517 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
27518 the article number. This will enable Gnus to find out what the real
27519 group and article numbers are when fetching articles by
27520 @code{Message-ID}. If this isn't possible, @code{t} should be returned
27521 on successful article retrieval.
27522
27523
27524 @item (nnchoke-request-group GROUP &optional SERVER FAST)
27525
27526 Get data on @var{group}. This function also has the side effect of
27527 making @var{group} the current group.
27528
27529 If @var{fast}, don't bother to return useful data, just make @var{group}
27530 the current group.
27531
27532 Here's an example of some result data and a definition of the same:
27533
27534 @example
27535 211 56 1000 1059 ifi.discussion
27536 @end example
27537
27538 The first number is the status, which should be 211. Next is the
27539 total number of articles in the group, the lowest article number, the
27540 highest article number, and finally the group name. Note that the total
27541 number of articles may be less than one might think while just
27542 considering the highest and lowest article numbers, but some articles
27543 may have been canceled. Gnus just discards the total-number, so
27544 whether one should take the bother to generate it properly (if that is a
27545 problem) is left as an exercise to the reader. If the group contains no
27546 articles, the lowest article number should be reported as 1 and the
27547 highest as 0.
27548
27549 @example
27550 group-status = [ error / info ] eol
27551 error = [ "4" / "5" ] 2<number> " " <Error message>
27552 info = "211 " 3* [ <number> " " ] <string>
27553 @end example
27554
27555
27556 @item (nnchoke-close-group GROUP &optional SERVER)
27557
27558 Close @var{group} and free any resources connected to it. This will be
27559 a no-op on most back ends.
27560
27561 There should be no data returned.
27562
27563
27564 @item (nnchoke-request-list &optional SERVER)
27565
27566 Return a list of all groups available on @var{server}. And that means
27567 @emph{all}.
27568
27569 Here's an example from a server that only carries two groups:
27570
27571 @example
27572 ifi.test 0000002200 0000002000 y
27573 ifi.discussion 3324 3300 n
27574 @end example
27575
27576 On each line we have a group name, then the highest article number in
27577 that group, the lowest article number, and finally a flag. If the group
27578 contains no articles, the lowest article number should be reported as 1
27579 and the highest as 0.
27580
27581 @example
27582 active-file = *active-line
27583 active-line = name " " <number> " " <number> " " flags eol
27584 name = <string>
27585 flags = "n" / "y" / "m" / "x" / "j" / "=" name
27586 @end example
27587
27588 The flag says whether the group is read-only (@samp{n}), is moderated
27589 (@samp{m}), is dead (@samp{x}), is aliased to some other group
27590 (@samp{=other-group}) or none of the above (@samp{y}).
27591
27592
27593 @item (nnchoke-request-post &optional SERVER)
27594
27595 This function should post the current buffer. It might return whether
27596 the posting was successful or not, but that's not required. If, for
27597 instance, the posting is done asynchronously, it has generally not been
27598 completed by the time this function concludes. In that case, this
27599 function should set up some kind of sentinel to beep the user loud and
27600 clear if the posting could not be completed.
27601
27602 There should be no result data from this function.
27603
27604 @end table
27605
27606
27607 @node Optional Back End Functions
27608 @subsubsection Optional Back End Functions
27609
27610 @table @code
27611
27612 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
27613
27614 @var{groups} is a list of groups, and this function should request data
27615 on all those groups. How it does it is of no concern to Gnus, but it
27616 should attempt to do this in a speedy fashion.
27617
27618 The return value of this function can be either @code{active} or
27619 @code{group}, which says what the format of the result data is. The
27620 former is in the same format as the data from
27621 @code{nnchoke-request-list}, while the latter is a buffer full of lines
27622 in the same format as @code{nnchoke-request-group} gives.
27623
27624 @example
27625 group-buffer = *active-line / *group-status
27626 @end example
27627
27628
27629 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
27630
27631 A Gnus group info (@pxref{Group Info}) is handed to the back end for
27632 alterations. This comes in handy if the back end really carries all
27633 the information (as is the case with virtual and imap groups). This
27634 function should destructively alter the info to suit its needs, and
27635 should return a non-@code{nil} value.
27636
27637 There should be no result data from this function.
27638
27639
27640 @item (nnchoke-request-type GROUP &optional ARTICLE)
27641
27642 When the user issues commands for ``sending news'' (@kbd{F} in the
27643 summary buffer, for instance), Gnus has to know whether the article the
27644 user is following up on is news or mail. This function should return
27645 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
27646 is mail and @code{unknown} if the type can't be decided. (The
27647 @var{article} parameter is necessary in @code{nnvirtual} groups which
27648 might very well combine mail groups and news groups.) Both @var{group}
27649 and @var{article} may be @code{nil}.
27650
27651 There should be no result data from this function.
27652
27653
27654 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
27655
27656 Set/remove/add marks on articles. Normally Gnus handles the article
27657 marks (such as read, ticked, expired etc) internally, and store them in
27658 @file{~/.newsrc.eld}. Some back ends (such as @acronym{IMAP}) however carry
27659 all information about the articles on the server, so Gnus need to
27660 propagate the mark information to the server.
27661
27662 @var{action} is a list of mark setting requests, having this format:
27663
27664 @example
27665 (RANGE ACTION MARK)
27666 @end example
27667
27668 @var{range} is a range of articles you wish to update marks on.
27669 @var{action} is @code{add} or @code{del}, used to add marks or remove
27670 marks (preserving all marks not mentioned). @var{mark} is a list of
27671 marks; where each mark is a symbol. Currently used marks are
27672 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
27673 @code{dormant}, @code{save}, @code{download}, @code{unsend},
27674 @code{forward} and @code{recent}, but your back end should, if
27675 possible, not limit itself to these.
27676
27677 Given contradictory actions, the last action in the list should be the
27678 effective one. That is, if your action contains a request to add the
27679 @code{tick} mark on article 1 and, later in the list, a request to
27680 remove the mark on the same article, the mark should in fact be removed.
27681
27682 An example action list:
27683
27684 @example
27685 (((5 12 30) 'del '(tick))
27686 ((10 . 90) 'add '(read expire))
27687 ((92 94) 'del '(read)))
27688 @end example
27689
27690 The function should return a range of articles it wasn't able to set the
27691 mark on (currently not used for anything).
27692
27693 There should be no result data from this function.
27694
27695 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
27696
27697 If the user tries to set a mark that the back end doesn't like, this
27698 function may change the mark. Gnus will use whatever this function
27699 returns as the mark for @var{article} instead of the original
27700 @var{mark}. If the back end doesn't care, it must return the original
27701 @var{mark}, and not @code{nil} or any other type of garbage.
27702
27703 The only use for this I can see is what @code{nnvirtual} does with
27704 it---if a component group is auto-expirable, marking an article as read
27705 in the virtual group should result in the article being marked as
27706 expirable.
27707
27708 There should be no result data from this function.
27709
27710
27711 @item (nnchoke-request-scan &optional GROUP SERVER)
27712
27713 This function may be called at any time (by Gnus or anything else) to
27714 request that the back end check for incoming articles, in one way or
27715 another. A mail back end will typically read the spool file or query
27716 the @acronym{POP} server when this function is invoked. The
27717 @var{group} doesn't have to be heeded---if the back end decides that
27718 it is too much work just scanning for a single group, it may do a
27719 total scan of all groups. It would be nice, however, to keep things
27720 local if that's practical.
27721
27722 There should be no result data from this function.
27723
27724
27725 @item (nnchoke-request-group-description GROUP &optional SERVER)
27726
27727 The result data from this function should be a description of
27728 @var{group}.
27729
27730 @example
27731 description-line = name <TAB> description eol
27732 name = <string>
27733 description = <text>
27734 @end example
27735
27736 @item (nnchoke-request-list-newsgroups &optional SERVER)
27737
27738 The result data from this function should be the description of all
27739 groups available on the server.
27740
27741 @example
27742 description-buffer = *description-line
27743 @end example
27744
27745
27746 @item (nnchoke-request-newgroups DATE &optional SERVER)
27747
27748 The result data from this function should be all groups that were
27749 created after @samp{date}, which is in normal human-readable date format
27750 (i.e., the date format used in mail and news headers, and returned by
27751 the function @code{message-make-date} by default). The data should be
27752 in the active buffer format.
27753
27754 It is okay for this function to return ``too many'' groups; some back ends
27755 might find it cheaper to return the full list of groups, rather than
27756 just the new groups. But don't do this for back ends with many groups.
27757 Normally, if the user creates the groups herself, there won't be too
27758 many groups, so @code{nnml} and the like are probably safe. But for
27759 back ends like @code{nntp}, where the groups have been created by the
27760 server, it is quite likely that there can be many groups.
27761
27762
27763 @item (nnchoke-request-create-group GROUP &optional SERVER)
27764
27765 This function should create an empty group with name @var{group}.
27766
27767 There should be no return data.
27768
27769
27770 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
27771
27772 This function should run the expiry process on all articles in the
27773 @var{articles} range (which is currently a simple list of article
27774 numbers.) It is left up to the back end to decide how old articles
27775 should be before they are removed by this function. If @var{force} is
27776 non-@code{nil}, all @var{articles} should be deleted, no matter how new
27777 they are.
27778
27779 This function should return a list of articles that it did not/was not
27780 able to delete.
27781
27782 There should be no result data returned.
27783
27784
27785 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
27786
27787 This function should move @var{article} (which is a number) from
27788 @var{group} by calling @var{accept-form}.
27789
27790 This function should ready the article in question for moving by
27791 removing any header lines it has added to the article, and generally
27792 should ``tidy up'' the article. Then it should @code{eval}
27793 @var{accept-form} in the buffer where the ``tidy'' article is. This
27794 will do the actual copying. If this @code{eval} returns a
27795 non-@code{nil} value, the article should be removed.
27796
27797 If @var{last} is @code{nil}, that means that there is a high likelihood
27798 that there will be more requests issued shortly, so that allows some
27799 optimizations.
27800
27801 The function should return a cons where the @code{car} is the group name and
27802 the @code{cdr} is the article number that the article was entered as.
27803
27804 There should be no data returned.
27805
27806
27807 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
27808
27809 This function takes the current buffer and inserts it into @var{group}.
27810 If @var{last} in @code{nil}, that means that there will be more calls to
27811 this function in short order.
27812
27813 The function should return a cons where the @code{car} is the group name and
27814 the @code{cdr} is the article number that the article was entered as.
27815
27816 The group should exist before the back end is asked to accept the
27817 article for that group.
27818
27819 There should be no data returned.
27820
27821
27822 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
27823
27824 This function should remove @var{article} (which is a number) from
27825 @var{group} and insert @var{buffer} there instead.
27826
27827 There should be no data returned.
27828
27829
27830 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
27831
27832 This function should delete @var{group}. If @var{force}, it should
27833 really delete all the articles in the group, and then delete the group
27834 itself. (If there is such a thing as ``the group itself''.)
27835
27836 There should be no data returned.
27837
27838
27839 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
27840
27841 This function should rename @var{group} into @var{new-name}. All
27842 articles in @var{group} should move to @var{new-name}.
27843
27844 There should be no data returned.
27845
27846 @end table
27847
27848
27849 @node Error Messaging
27850 @subsubsection Error Messaging
27851
27852 @findex nnheader-report
27853 @findex nnheader-get-report
27854 The back ends should use the function @code{nnheader-report} to report
27855 error conditions---they should not raise errors when they aren't able to
27856 perform a request. The first argument to this function is the back end
27857 symbol, and the rest are interpreted as arguments to @code{format} if
27858 there are multiple of them, or just a string if there is one of them.
27859 This function must always returns @code{nil}.
27860
27861 @lisp
27862 (nnheader-report 'nnchoke "You did something totally bogus")
27863
27864 (nnheader-report 'nnchoke "Could not request group %s" group)
27865 @end lisp
27866
27867 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
27868 @code{nil} back from a server, and this function returns the most
27869 recently reported message for the back end in question. This function
27870 takes one argument---the server symbol.
27871
27872 Internally, these functions access @var{back-end}@code{-status-string},
27873 so the @code{nnchoke} back end will have its error message stored in
27874 @code{nnchoke-status-string}.
27875
27876
27877 @node Writing New Back Ends
27878 @subsubsection Writing New Back Ends
27879
27880 Many back ends are quite similar. @code{nnml} is just like
27881 @code{nnspool}, but it allows you to edit the articles on the server.
27882 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
27883 and it doesn't maintain overview databases. @code{nndir} is just like
27884 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
27885 editing articles.
27886
27887 It would make sense if it were possible to ``inherit'' functions from
27888 back ends when writing new back ends. And, indeed, you can do that if you
27889 want to. (You don't have to if you don't want to, of course.)
27890
27891 All the back ends declare their public variables and functions by using a
27892 package called @code{nnoo}.
27893
27894 To inherit functions from other back ends (and allow other back ends to
27895 inherit functions from the current back end), you should use the
27896 following macros:
27897
27898 @table @code
27899
27900 @item nnoo-declare
27901 This macro declares the first parameter to be a child of the subsequent
27902 parameters. For instance:
27903
27904 @lisp
27905 (nnoo-declare nndir
27906 nnml nnmh)
27907 @end lisp
27908
27909 @code{nndir} has declared here that it intends to inherit functions from
27910 both @code{nnml} and @code{nnmh}.
27911
27912 @item defvoo
27913 This macro is equivalent to @code{defvar}, but registers the variable as
27914 a public server variable. Most state-oriented variables should be
27915 declared with @code{defvoo} instead of @code{defvar}.
27916
27917 In addition to the normal @code{defvar} parameters, it takes a list of
27918 variables in the parent back ends to map the variable to when executing
27919 a function in those back ends.
27920
27921 @lisp
27922 (defvoo nndir-directory nil
27923 "Where nndir will look for groups."
27924 nnml-current-directory nnmh-current-directory)
27925 @end lisp
27926
27927 This means that @code{nnml-current-directory} will be set to
27928 @code{nndir-directory} when an @code{nnml} function is called on behalf
27929 of @code{nndir}. (The same with @code{nnmh}.)
27930
27931 @item nnoo-define-basics
27932 This macro defines some common functions that almost all back ends should
27933 have.
27934
27935 @lisp
27936 (nnoo-define-basics nndir)
27937 @end lisp
27938
27939 @item deffoo
27940 This macro is just like @code{defun} and takes the same parameters. In
27941 addition to doing the normal @code{defun} things, it registers the
27942 function as being public so that other back ends can inherit it.
27943
27944 @item nnoo-map-functions
27945 This macro allows mapping of functions from the current back end to
27946 functions from the parent back ends.
27947
27948 @lisp
27949 (nnoo-map-functions nndir
27950 (nnml-retrieve-headers 0 nndir-current-group 0 0)
27951 (nnmh-request-article 0 nndir-current-group 0 0))
27952 @end lisp
27953
27954 This means that when @code{nndir-retrieve-headers} is called, the first,
27955 third, and fourth parameters will be passed on to
27956 @code{nnml-retrieve-headers}, while the second parameter is set to the
27957 value of @code{nndir-current-group}.
27958
27959 @item nnoo-import
27960 This macro allows importing functions from back ends. It should be the
27961 last thing in the source file, since it will only define functions that
27962 haven't already been defined.
27963
27964 @lisp
27965 (nnoo-import nndir
27966 (nnmh
27967 nnmh-request-list
27968 nnmh-request-newgroups)
27969 (nnml))
27970 @end lisp
27971
27972 This means that calls to @code{nndir-request-list} should just be passed
27973 on to @code{nnmh-request-list}, while all public functions from
27974 @code{nnml} that haven't been defined in @code{nndir} yet should be
27975 defined now.
27976
27977 @end table
27978
27979 Below is a slightly shortened version of the @code{nndir} back end.
27980
27981 @lisp
27982 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27983 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27984
27985 ;;; @r{Code:}
27986
27987 (require 'nnheader)
27988 (require 'nnmh)
27989 (require 'nnml)
27990 (require 'nnoo)
27991 (eval-when-compile (require 'cl))
27992
27993 (nnoo-declare nndir
27994 nnml nnmh)
27995
27996 (defvoo nndir-directory nil
27997 "Where nndir will look for groups."
27998 nnml-current-directory nnmh-current-directory)
27999
28000 (defvoo nndir-nov-is-evil nil
28001 "*Non-nil means that nndir will never retrieve NOV headers."
28002 nnml-nov-is-evil)
28003
28004 (defvoo nndir-current-group ""
28005 nil
28006 nnml-current-group nnmh-current-group)
28007 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
28008 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
28009
28010 (defvoo nndir-status-string "" nil nnmh-status-string)
28011 (defconst nndir-version "nndir 1.0")
28012
28013 ;;; @r{Interface functions.}
28014
28015 (nnoo-define-basics nndir)
28016
28017 (deffoo nndir-open-server (server &optional defs)
28018 (setq nndir-directory
28019 (or (cadr (assq 'nndir-directory defs))
28020 server))
28021 (unless (assq 'nndir-directory defs)
28022 (push `(nndir-directory ,server) defs))
28023 (push `(nndir-current-group
28024 ,(file-name-nondirectory
28025 (directory-file-name nndir-directory)))
28026 defs)
28027 (push `(nndir-top-directory
28028 ,(file-name-directory (directory-file-name nndir-directory)))
28029 defs)
28030 (nnoo-change-server 'nndir server defs))
28031
28032 (nnoo-map-functions nndir
28033 (nnml-retrieve-headers 0 nndir-current-group 0 0)
28034 (nnmh-request-article 0 nndir-current-group 0 0)
28035 (nnmh-request-group nndir-current-group 0 0)
28036 (nnmh-close-group nndir-current-group 0))
28037
28038 (nnoo-import nndir
28039 (nnmh
28040 nnmh-status-message
28041 nnmh-request-list
28042 nnmh-request-newgroups))
28043
28044 (provide 'nndir)
28045 @end lisp
28046
28047
28048 @node Hooking New Back Ends Into Gnus
28049 @subsubsection Hooking New Back Ends Into Gnus
28050
28051 @vindex gnus-valid-select-methods
28052 @findex gnus-declare-backend
28053 Having Gnus start using your new back end is rather easy---you just
28054 declare it with the @code{gnus-declare-backend} functions. This will
28055 enter the back end into the @code{gnus-valid-select-methods} variable.
28056
28057 @code{gnus-declare-backend} takes two parameters---the back end name and
28058 an arbitrary number of @dfn{abilities}.
28059
28060 Here's an example:
28061
28062 @lisp
28063 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
28064 @end lisp
28065
28066 The above line would then go in the @file{nnchoke.el} file.
28067
28068 The abilities can be:
28069
28070 @table @code
28071 @item mail
28072 This is a mailish back end---followups should (probably) go via mail.
28073 @item post
28074 This is a newsish back end---followups should (probably) go via news.
28075 @item post-mail
28076 This back end supports both mail and news.
28077 @item none
28078 This is neither a post nor mail back end---it's something completely
28079 different.
28080 @item respool
28081 It supports respooling---or rather, it is able to modify its source
28082 articles and groups.
28083 @item address
28084 The name of the server should be in the virtual server name. This is
28085 true for almost all back ends.
28086 @item prompt-address
28087 The user should be prompted for an address when doing commands like
28088 @kbd{B} in the group buffer. This is true for back ends like
28089 @code{nntp}, but not @code{nnmbox}, for instance.
28090 @end table
28091
28092
28093 @node Mail-like Back Ends
28094 @subsubsection Mail-like Back Ends
28095
28096 One of the things that separate the mail back ends from the rest of the
28097 back ends is the heavy dependence by most of the mail back ends on
28098 common functions in @file{nnmail.el}. For instance, here's the
28099 definition of @code{nnml-request-scan}:
28100
28101 @lisp
28102 (deffoo nnml-request-scan (&optional group server)
28103 (setq nnml-article-file-alist nil)
28104 (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
28105 @end lisp
28106
28107 It simply calls @code{nnmail-get-new-mail} with a few parameters,
28108 and @code{nnmail} takes care of all the moving and splitting of the
28109 mail.
28110
28111 This function takes four parameters.
28112
28113 @table @var
28114 @item method
28115 This should be a symbol to designate which back end is responsible for
28116 the call.
28117
28118 @item exit-function
28119 This function should be called after the splitting has been performed.
28120
28121 @item temp-directory
28122 Where the temporary files should be stored.
28123
28124 @item group
28125 This optional argument should be a group name if the splitting is to be
28126 performed for one group only.
28127 @end table
28128
28129 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
28130 save each article. @var{back-end}@code{-active-number} will be called to
28131 find the article number assigned to this article.
28132
28133 The function also uses the following variables:
28134 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
28135 this back end); and @var{back-end}@code{-group-alist} and
28136 @var{back-end}@code{-active-file} to generate the new active file.
28137 @var{back-end}@code{-group-alist} should be a group-active alist, like
28138 this:
28139
28140 @example
28141 (("a-group" (1 . 10))
28142 ("some-group" (34 . 39)))
28143 @end example
28144
28145
28146 @node Score File Syntax
28147 @subsection Score File Syntax
28148
28149 Score files are meant to be easily parseable, but yet extremely
28150 mallable. It was decided that something that had the same read syntax
28151 as an Emacs Lisp list would fit that spec.
28152
28153 Here's a typical score file:
28154
28155 @lisp
28156 (("summary"
28157 ("win95" -10000 nil s)
28158 ("Gnus"))
28159 ("from"
28160 ("Lars" -1000))
28161 (mark -100))
28162 @end lisp
28163
28164 BNF definition of a score file:
28165
28166 @example
28167 score-file = "" / "(" *element ")"
28168 element = rule / atom
28169 rule = string-rule / number-rule / date-rule
28170 string-rule = "(" quote string-header quote space *string-match ")"
28171 number-rule = "(" quote number-header quote space *number-match ")"
28172 date-rule = "(" quote date-header quote space *date-match ")"
28173 quote = <ascii 34>
28174 string-header = "subject" / "from" / "references" / "message-id" /
28175 "xref" / "body" / "head" / "all" / "followup"
28176 number-header = "lines" / "chars"
28177 date-header = "date"
28178 string-match = "(" quote <string> quote [ "" / [ space score [ "" /
28179 space date [ "" / [ space string-match-t ] ] ] ] ] ")"
28180 score = "nil" / <integer>
28181 date = "nil" / <natural number>
28182 string-match-t = "nil" / "s" / "substring" / "S" / "Substring" /
28183 "r" / "regex" / "R" / "Regex" /
28184 "e" / "exact" / "E" / "Exact" /
28185 "f" / "fuzzy" / "F" / "Fuzzy"
28186 number-match = "(" <integer> [ "" / [ space score [ "" /
28187 space date [ "" / [ space number-match-t ] ] ] ] ] ")"
28188 number-match-t = "nil" / "=" / "<" / ">" / ">=" / "<="
28189 date-match = "(" quote <string> quote [ "" / [ space score [ "" /
28190 space date [ "" / [ space date-match-t ] ] ] ] ")"
28191 date-match-t = "nil" / "at" / "before" / "after"
28192 atom = "(" [ required-atom / optional-atom ] ")"
28193 required-atom = mark / expunge / mark-and-expunge / files /
28194 exclude-files / read-only / touched
28195 optional-atom = adapt / local / eval
28196 mark = "mark" space nil-or-number
28197 nil-or-number = "nil" / <integer>
28198 expunge = "expunge" space nil-or-number
28199 mark-and-expunge = "mark-and-expunge" space nil-or-number
28200 files = "files" *[ space <string> ]
28201 exclude-files = "exclude-files" *[ space <string> ]
28202 read-only = "read-only" [ space "nil" / space "t" ]
28203 adapt = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
28204 adapt-rule = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
28205 local = "local" *[ space "(" <string> space <form> ")" ]
28206 eval = "eval" space <form>
28207 space = *[ " " / <TAB> / <NEWLINE> ]
28208 @end example
28209
28210 Any unrecognized elements in a score file should be ignored, but not
28211 discarded.
28212
28213 As you can see, white space is needed, but the type and amount of white
28214 space is irrelevant. This means that formatting of the score file is
28215 left up to the programmer---if it's simpler to just spew it all out on
28216 one looong line, then that's ok.
28217
28218 The meaning of the various atoms are explained elsewhere in this
28219 manual (@pxref{Score File Format}).
28220
28221
28222 @node Headers
28223 @subsection Headers
28224
28225 Internally Gnus uses a format for storing article headers that
28226 corresponds to the @acronym{NOV} format in a mysterious fashion. One could
28227 almost suspect that the author looked at the @acronym{NOV} specification and
28228 just shamelessly @emph{stole} the entire thing, and one would be right.
28229
28230 @dfn{Header} is a severely overloaded term. ``Header'' is used in
28231 RFC 1036 to talk about lines in the head of an article (e.g.,
28232 @code{From}). It is used by many people as a synonym for
28233 ``head''---``the header and the body''. (That should be avoided, in my
28234 opinion.) And Gnus uses a format internally that it calls ``header'',
28235 which is what I'm talking about here. This is a 9-element vector,
28236 basically, with each header (ouch) having one slot.
28237
28238 These slots are, in order: @code{number}, @code{subject}, @code{from},
28239 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
28240 @code{xref}, and @code{extra}. There are macros for accessing and
28241 setting these slots---they all have predictable names beginning with
28242 @code{mail-header-} and @code{mail-header-set-}, respectively.
28243
28244 All these slots contain strings, except the @code{extra} slot, which
28245 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
28246
28247
28248 @node Ranges
28249 @subsection Ranges
28250
28251 @sc{gnus} introduced a concept that I found so useful that I've started
28252 using it a lot and have elaborated on it greatly.
28253
28254 The question is simple: If you have a large amount of objects that are
28255 identified by numbers (say, articles, to take a @emph{wild} example)
28256 that you want to qualify as being ``included'', a normal sequence isn't
28257 very useful. (A 200,000 length sequence is a bit long-winded.)
28258
28259 The solution is as simple as the question: You just collapse the
28260 sequence.
28261
28262 @example
28263 (1 2 3 4 5 6 10 11 12)
28264 @end example
28265
28266 is transformed into
28267
28268 @example
28269 ((1 . 6) (10 . 12))
28270 @end example
28271
28272 To avoid having those nasty @samp{(13 . 13)} elements to denote a
28273 lonesome object, a @samp{13} is a valid element:
28274
28275 @example
28276 ((1 . 6) 7 (10 . 12))
28277 @end example
28278
28279 This means that comparing two ranges to find out whether they are equal
28280 is slightly tricky:
28281
28282 @example
28283 ((1 . 5) 7 8 (10 . 12))
28284 @end example
28285
28286 and
28287
28288 @example
28289 ((1 . 5) (7 . 8) (10 . 12))
28290 @end example
28291
28292 are equal. In fact, any non-descending list is a range:
28293
28294 @example
28295 (1 2 3 4 5)
28296 @end example
28297
28298 is a perfectly valid range, although a pretty long-winded one. This is
28299 also valid:
28300
28301 @example
28302 (1 . 5)
28303 @end example
28304
28305 and is equal to the previous range.
28306
28307 Here's a BNF definition of ranges. Of course, one must remember the
28308 semantic requirement that the numbers are non-descending. (Any number
28309 of repetition of the same number is allowed, but apt to disappear in
28310 range handling.)
28311
28312 @example
28313 range = simple-range / normal-range
28314 simple-range = "(" number " . " number ")"
28315 normal-range = "(" start-contents ")"
28316 contents = "" / simple-range *[ " " contents ] /
28317 number *[ " " contents ]
28318 @end example
28319
28320 Gnus currently uses ranges to keep track of read articles and article
28321 marks. I plan on implementing a number of range operators in C if The
28322 Powers That Be are willing to let me. (I haven't asked yet, because I
28323 need to do some more thinking on what operators I need to make life
28324 totally range-based without ever having to convert back to normal
28325 sequences.)
28326
28327
28328 @node Group Info
28329 @subsection Group Info
28330
28331 Gnus stores all permanent info on groups in a @dfn{group info} list.
28332 This list is from three to six elements (or more) long and exhaustively
28333 describes the group.
28334
28335 Here are two example group infos; one is a very simple group while the
28336 second is a more complex one:
28337
28338 @example
28339 ("no.group" 5 ((1 . 54324)))
28340
28341 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
28342 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
28343 (nnml "")
28344 ((auto-expire . t) (to-address . "ding@@gnus.org")))
28345 @end example
28346
28347 The first element is the @dfn{group name}---as Gnus knows the group,
28348 anyway. The second element is the @dfn{subscription level}, which
28349 normally is a small integer. (It can also be the @dfn{rank}, which is a
28350 cons cell where the @code{car} is the level and the @code{cdr} is the
28351 score.) The third element is a list of ranges of read articles. The
28352 fourth element is a list of lists of article marks of various kinds.
28353 The fifth element is the select method (or virtual server, if you like).
28354 The sixth element is a list of @dfn{group parameters}, which is what
28355 this section is about.
28356
28357 Any of the last three elements may be missing if they are not required.
28358 In fact, the vast majority of groups will normally only have the first
28359 three elements, which saves quite a lot of cons cells.
28360
28361 Here's a BNF definition of the group info format:
28362
28363 @example
28364 info = "(" group space ralevel space read
28365 [ "" / [ space marks-list [ "" / [ space method [ "" /
28366 space parameters ] ] ] ] ] ")"
28367 group = quote <string> quote
28368 ralevel = rank / level
28369 level = <integer in the range of 1 to inf>
28370 rank = "(" level "." score ")"
28371 score = <integer in the range of 1 to inf>
28372 read = range
28373 marks-lists = nil / "(" *marks ")"
28374 marks = "(" <string> range ")"
28375 method = "(" <string> *elisp-forms ")"
28376 parameters = "(" *elisp-forms ")"
28377 @end example
28378
28379 Actually that @samp{marks} rule is a fib. A @samp{marks} is a
28380 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
28381 in pseudo-BNF.
28382
28383 If you have a Gnus info and want to access the elements, Gnus offers a
28384 series of macros for getting/setting these elements.
28385
28386 @table @code
28387 @item gnus-info-group
28388 @itemx gnus-info-set-group
28389 @findex gnus-info-group
28390 @findex gnus-info-set-group
28391 Get/set the group name.
28392
28393 @item gnus-info-rank
28394 @itemx gnus-info-set-rank
28395 @findex gnus-info-rank
28396 @findex gnus-info-set-rank
28397 Get/set the group rank (@pxref{Group Score}).
28398
28399 @item gnus-info-level
28400 @itemx gnus-info-set-level
28401 @findex gnus-info-level
28402 @findex gnus-info-set-level
28403 Get/set the group level.
28404
28405 @item gnus-info-score
28406 @itemx gnus-info-set-score
28407 @findex gnus-info-score
28408 @findex gnus-info-set-score
28409 Get/set the group score (@pxref{Group Score}).
28410
28411 @item gnus-info-read
28412 @itemx gnus-info-set-read
28413 @findex gnus-info-read
28414 @findex gnus-info-set-read
28415 Get/set the ranges of read articles.
28416
28417 @item gnus-info-marks
28418 @itemx gnus-info-set-marks
28419 @findex gnus-info-marks
28420 @findex gnus-info-set-marks
28421 Get/set the lists of ranges of marked articles.
28422
28423 @item gnus-info-method
28424 @itemx gnus-info-set-method
28425 @findex gnus-info-method
28426 @findex gnus-info-set-method
28427 Get/set the group select method.
28428
28429 @item gnus-info-params
28430 @itemx gnus-info-set-params
28431 @findex gnus-info-params
28432 @findex gnus-info-set-params
28433 Get/set the group parameters.
28434 @end table
28435
28436 All the getter functions take one parameter---the info list. The setter
28437 functions take two parameters---the info list and the new value.
28438
28439 The last three elements in the group info aren't mandatory, so it may be
28440 necessary to extend the group info before setting the element. If this
28441 is necessary, you can just pass on a non-@code{nil} third parameter to
28442 the three final setter functions to have this happen automatically.
28443
28444
28445 @node Extended Interactive
28446 @subsection Extended Interactive
28447 @cindex interactive
28448 @findex gnus-interactive
28449
28450 Gnus extends the standard Emacs @code{interactive} specification
28451 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
28452 Prefixes}). Here's an example of how this is used:
28453
28454 @lisp
28455 (defun gnus-summary-increase-score (&optional score symp)
28456 (interactive (gnus-interactive "P\ny"))
28457 ...
28458 )
28459 @end lisp
28460
28461 The best thing to do would have been to implement
28462 @code{gnus-interactive} as a macro which would have returned an
28463 @code{interactive} form, but this isn't possible since Emacs checks
28464 whether a function is interactive or not by simply doing an @code{assq}
28465 on the lambda form. So, instead we have @code{gnus-interactive}
28466 function that takes a string and returns values that are usable to
28467 @code{interactive}.
28468
28469 This function accepts (almost) all normal @code{interactive} specs, but
28470 adds a few more.
28471
28472 @table @samp
28473 @item y
28474 @vindex gnus-current-prefix-symbol
28475 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
28476 variable.
28477
28478 @item Y
28479 @vindex gnus-current-prefix-symbols
28480 A list of the current symbolic prefixes---the
28481 @code{gnus-current-prefix-symbol} variable.
28482
28483 @item A
28484 The current article number---the @code{gnus-summary-article-number}
28485 function.
28486
28487 @item H
28488 The current article header---the @code{gnus-summary-article-header}
28489 function.
28490
28491 @item g
28492 The current group name---the @code{gnus-group-group-name}
28493 function.
28494
28495 @end table
28496
28497
28498 @node Emacs/XEmacs Code
28499 @subsection Emacs/XEmacs Code
28500 @cindex XEmacs
28501 @cindex Emacsen
28502
28503 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
28504 platforms must be the primary one. I chose Emacs. Not because I don't
28505 like XEmacs or Mule, but because it comes first alphabetically.
28506
28507 This means that Gnus will byte-compile under Emacs with nary a warning,
28508 while XEmacs will pump out gigabytes of warnings while byte-compiling.
28509 As I use byte-compilation warnings to help me root out trivial errors in
28510 Gnus, that's very useful.
28511
28512 I've also consistently used Emacs function interfaces, but have used
28513 Gnusey aliases for the functions. To take an example: Emacs defines a
28514 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
28515 function. I then define a function called @code{gnus-run-at-time} that
28516 takes the same parameters as the Emacs @code{run-at-time}. When running
28517 Gnus under Emacs, the former function is just an alias for the latter.
28518 However, when running under XEmacs, the former is an alias for the
28519 following function:
28520
28521 @lisp
28522 (defun gnus-xmas-run-at-time (time repeat function &rest args)
28523 (start-itimer
28524 "gnus-run-at-time"
28525 `(lambda ()
28526 (,function ,@@args))
28527 time repeat))
28528 @end lisp
28529
28530 This sort of thing has been done for bunches of functions. Gnus does
28531 not redefine any native Emacs functions while running under XEmacs---it
28532 does this @code{defalias} thing with Gnus equivalents instead. Cleaner
28533 all over.
28534
28535 In the cases where the XEmacs function interface was obviously cleaner,
28536 I used it instead. For example @code{gnus-region-active-p} is an alias
28537 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
28538
28539 Of course, I could have chosen XEmacs as my native platform and done
28540 mapping functions the other way around. But I didn't. The performance
28541 hit these indirections impose on Gnus under XEmacs should be slight.
28542
28543
28544 @node Various File Formats
28545 @subsection Various File Formats
28546
28547 @menu
28548 * Active File Format:: Information on articles and groups available.
28549 * Newsgroups File Format:: Group descriptions.
28550 @end menu
28551
28552
28553 @node Active File Format
28554 @subsubsection Active File Format
28555
28556 The active file lists all groups available on the server in
28557 question. It also lists the highest and lowest current article numbers
28558 in each group.
28559
28560 Here's an excerpt from a typical active file:
28561
28562 @example
28563 soc.motss 296030 293865 y
28564 alt.binaries.pictures.fractals 3922 3913 n
28565 comp.sources.unix 1605 1593 m
28566 comp.binaries.ibm.pc 5097 5089 y
28567 no.general 1000 900 y
28568 @end example
28569
28570 Here's a pseudo-BNF definition of this file:
28571
28572 @example
28573 active = *group-line
28574 group-line = group spc high-number spc low-number spc flag <NEWLINE>
28575 group = <non-white-space string>
28576 spc = " "
28577 high-number = <non-negative integer>
28578 low-number = <positive integer>
28579 flag = "y" / "n" / "m" / "j" / "x" / "=" group
28580 @end example
28581
28582 For a full description of this file, see the manual pages for
28583 @samp{innd}, in particular @samp{active(5)}.
28584
28585
28586 @node Newsgroups File Format
28587 @subsubsection Newsgroups File Format
28588
28589 The newsgroups file lists groups along with their descriptions. Not all
28590 groups on the server have to be listed, and not all groups in the file
28591 have to exist on the server. The file is meant purely as information to
28592 the user.
28593
28594 The format is quite simple; a group name, a tab, and the description.
28595 Here's the definition:
28596
28597 @example
28598 newsgroups = *line
28599 line = group tab description <NEWLINE>
28600 group = <non-white-space string>
28601 tab = <TAB>
28602 description = <string>
28603 @end example
28604
28605
28606 @page
28607 @node Emacs for Heathens
28608 @section Emacs for Heathens
28609
28610 Believe it or not, but some people who use Gnus haven't really used
28611 Emacs much before they embarked on their journey on the Gnus Love Boat.
28612 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
28613 region'', and ``set @code{gnus-flargblossen} to an alist where the key
28614 is a regexp that is used for matching on the group name'' are magical
28615 phrases with little or no meaning, then this appendix is for you. If
28616 you are already familiar with Emacs, just ignore this and go fondle your
28617 cat instead.
28618
28619 @menu
28620 * Keystrokes:: Entering text and executing commands.
28621 * Emacs Lisp:: The built-in Emacs programming language.
28622 @end menu
28623
28624
28625 @node Keystrokes
28626 @subsection Keystrokes
28627
28628 @itemize @bullet
28629 @item
28630 Q: What is an experienced Emacs user?
28631
28632 @item
28633 A: A person who wishes that the terminal had pedals.
28634 @end itemize
28635
28636 Yes, when you use Emacs, you are apt to use the control key, the shift
28637 key and the meta key a lot. This is very annoying to some people
28638 (notably @code{vi}le users), and the rest of us just love the hell out
28639 of it. Just give up and submit. Emacs really does stand for
28640 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
28641 may have heard from other disreputable sources (like the Emacs author).
28642
28643 The shift keys are normally located near your pinky fingers, and are
28644 normally used to get capital letters and stuff. You probably use it all
28645 the time. The control key is normally marked ``CTRL'' or something like
28646 that. The meta key is, funnily enough, never marked as such on any
28647 keyboard. The one I'm currently at has a key that's marked ``Alt'',
28648 which is the meta key on this keyboard. It's usually located somewhere
28649 to the left hand side of the keyboard, usually on the bottom row.
28650
28651 Now, us Emacs people don't say ``press the meta-control-m key'',
28652 because that's just too inconvenient. We say ``press the @kbd{C-M-m}
28653 key''. @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
28654 prefix that means ``control''. So ``press @kbd{C-k}'' means ``press
28655 down the control key, and hold it down while you press @kbd{k}''.
28656 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
28657 the control key and then press @kbd{k}''. Simple, ay?
28658
28659 This is somewhat complicated by the fact that not all keyboards have a
28660 meta key. In that case you can use the ``escape'' key. Then @kbd{M-k}
28661 means ``press escape, release escape, press @kbd{k}''. That's much more
28662 work than if you have a meta key, so if that's the case, I respectfully
28663 suggest you get a real keyboard with a meta key. You can't live without
28664 it.
28665
28666
28667
28668 @node Emacs Lisp
28669 @subsection Emacs Lisp
28670
28671 Emacs is the King of Editors because it's really a Lisp interpreter.
28672 Each and every key you tap runs some Emacs Lisp code snippet, and since
28673 Emacs Lisp is an interpreted language, that means that you can configure
28674 any key to run any arbitrary code. You just, like, do it.
28675
28676 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
28677 functions. (These are byte-compiled for speed, but it's still
28678 interpreted.) If you decide that you don't like the way Gnus does
28679 certain things, it's trivial to have it do something a different way.
28680 (Well, at least if you know how to write Lisp code.) However, that's
28681 beyond the scope of this manual, so we are simply going to talk about
28682 some common constructs that you normally use in your @file{~/.gnus.el}
28683 file to customize Gnus. (You can also use the @file{~/.emacs} file, but
28684 in order to set things of Gnus up, it is much better to use the
28685 @file{~/.gnus.el} file, @xref{Startup Files}.)
28686
28687 If you want to set the variable @code{gnus-florgbnize} to four (4), you
28688 write the following:
28689
28690 @lisp
28691 (setq gnus-florgbnize 4)
28692 @end lisp
28693
28694 This function (really ``special form'') @code{setq} is the one that can
28695 set a variable to some value. This is really all you need to know. Now
28696 you can go and fill your @file{~/.gnus.el} file with lots of these to
28697 change how Gnus works.
28698
28699 If you have put that thing in your @file{~/.gnus.el} file, it will be
28700 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
28701 start Gnus. If you want to change the variable right away, simply say
28702 @kbd{C-x C-e} after the closing parenthesis. That will @code{eval} the
28703 previous ``form'', which is a simple @code{setq} statement here.
28704
28705 Go ahead---just try it, if you're located at your Emacs. After you
28706 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
28707 is the return value of the form you @code{eval}ed.
28708
28709 Some pitfalls:
28710
28711 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
28712 that means:
28713
28714 @lisp
28715 (setq gnus-read-active-file 'some)
28716 @end lisp
28717
28718 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
28719 @samp{nntp.ifi.uio.no}'', that means:
28720
28721 @lisp
28722 (setq gnus-nntp-server "nntp.ifi.uio.no")
28723 @end lisp
28724
28725 So be careful not to mix up strings (the latter) with symbols (the
28726 former). The manual is unambiguous, but it can be confusing.
28727
28728 @page
28729 @include gnus-faq.texi
28730
28731 @node Index
28732 @chapter Index
28733 @printindex cp
28734
28735 @node Key Index
28736 @chapter Key Index
28737 @printindex ky
28738
28739 @summarycontents
28740 @contents
28741 @bye
28742
28743 @iftex
28744 @iflatex
28745 \end{document}
28746 @end iflatex
28747 @end iftex
28748
28749 @c Local Variables:
28750 @c mode: texinfo
28751 @c coding: iso-8859-1
28752 @c End:
28753
28754 @ignore
28755 arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
28756 @end ignore