Remove references to external license, since doclicense is included.
[emacs.git] / doc / misc / gnus.texi
blob1f354e387ae11f188cfb9ebfbe67c50be12415e3
1 \input texinfo
3 @setfilename ../../info/gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
9 @documentencoding ISO-8859-1
11 @copying
12 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
13 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
15 @quotation
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.2 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
20 and with the Back-Cover Texts as in (a) below.  A copy of the license
21 is included in the section entitled ``GNU Free Documentation License''.
23 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
24 modify this GNU manual.  Buying copies from the FSF supports it in
25 developing GNU and promoting software freedom.''
26 @end quotation
27 @end copying
29 @iftex
30 @iflatex
31 \documentclass[twoside,a4paper,openright,11pt]{book}
32 \usepackage[latin1]{inputenc}
33 \usepackage{pagestyle}
34 \usepackage{epsfig}
35 \usepackage{pixidx}
36 \input{gnusconfig.tex}
38 \ifx\pdfoutput\undefined
39 \else
40 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
41 \usepackage{thumbpdf}
42 \pdfcompresslevel=9
43 \fi
45 \makeindex
46 \begin{document}
48 % Adjust ../Makefile.in if you change the following line:
49 \newcommand{\gnusversionname}{Gnus v5.13}
50 \newcommand{\gnuschaptername}{}
51 \newcommand{\gnussectionname}{}
53 \newcommand{\gnusbackslash}{/}
55 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
56 \ifx\pdfoutput\undefined
57 \newcommand{\gnusuref}[1]{\gnustt{#1}}
58 \else
59 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
60 \fi
61 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
62 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
64 \newcommand{\gnuskindex}[1]{\index{#1}}
65 \newcommand{\gnusindex}[1]{\index{#1}}
67 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
68 \newcommand{\gnuscode}[1]{\gnustt{#1}}
69 \newcommand{\gnusasis}[1]{\gnustt{#1}}
70 \newcommand{\gnusurl}[1]{\gnustt{#1}}
71 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
72 \newcommand{\gnusenv}[1]{\gnustt{#1}}
73 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
74 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
75 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
76 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
77 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
78 \newcommand{\gnusdfn}[1]{\textit{#1}}
79 \newcommand{\gnusi}[1]{\textit{#1}}
80 \newcommand{\gnusr}[1]{\textrm{#1}}
81 \newcommand{\gnusstrong}[1]{\textbf{#1}}
82 \newcommand{\gnusemph}[1]{\textit{#1}}
83 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
84 \newcommand{\gnussc}[1]{\textsc{#1}}
85 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
86 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
87 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
88 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
89 \newcommand{\gnusacronym}[1]{\textsc{#1}}
90 \newcommand{\gnusemail}[1]{\textit{#1}}
92 \newcommand{\gnusbullet}{{${\bullet}$}}
93 \newcommand{\gnusdollar}{\$}
94 \newcommand{\gnusampersand}{\&}
95 \newcommand{\gnuspercent}{\%}
96 \newcommand{\gnushash}{\#}
97 \newcommand{\gnushat}{\symbol{"5E}}
98 \newcommand{\gnusunderline}{\symbol{"5F}}
99 \newcommand{\gnusnot}{$\neg$}
100 \newcommand{\gnustilde}{\symbol{"7E}}
101 \newcommand{\gnusless}{{$<$}}
102 \newcommand{\gnusgreater}{{$>$}}
103 \newcommand{\gnusbraceleft}{{$>$}}
104 \newcommand{\gnusbraceright}{{$>$}}
106 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
107 \newcommand{\gnusinteresting}{
108 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
111 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
113 \newcommand{\gnuspagechapter}[1]{
114 {\mbox{}}
117 \newdimen{\gnusdimen}
118 \gnusdimen 0pt
120 \newcommand{\gnuschapter}[2]{
121 \gnuscleardoublepage
122 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
123 \chapter{#2}
124 \renewcommand{\gnussectionname}{}
125 \renewcommand{\gnuschaptername}{#2}
126 \thispagestyle{empty}
127 \hspace*{-2cm}
128 \begin{picture}(500,500)(0,0)
129 \put(480,350){\makebox(0,0)[tr]{#1}}
130 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
131 \end{picture}
132 \clearpage
135 \newcommand{\gnusfigure}[3]{
136 \begin{figure}
137 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
139 \end{picture}
140 \caption{#1}
141 \end{figure}
144 \newcommand{\gnusicon}[1]{
145 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
148 \newcommand{\gnuspicon}[1]{
149 \margindex{\epsfig{figure=#1,width=2cm}}
152 \newcommand{\gnusxface}[2]{
153 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
156 \newcommand{\gnussmiley}[2]{
157 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
160 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
162 \newcommand{\gnussection}[1]{
163 \renewcommand{\gnussectionname}{#1}
164 \section{#1}
167 \newenvironment{codelist}%
168 {\begin{list}{}{
170 }{\end{list}}
172 \newenvironment{asislist}%
173 {\begin{list}{}{
175 }{\end{list}}
177 \newenvironment{kbdlist}%
178 {\begin{list}{}{
179 \labelwidth=0cm
181 }{\end{list}}
183 \newenvironment{dfnlist}%
184 {\begin{list}{}{
186 }{\end{list}}
188 \newenvironment{stronglist}%
189 {\begin{list}{}{
191 }{\end{list}}
193 \newenvironment{samplist}%
194 {\begin{list}{}{
196 }{\end{list}}
198 \newenvironment{varlist}%
199 {\begin{list}{}{
201 }{\end{list}}
203 \newenvironment{emphlist}%
204 {\begin{list}{}{
206 }{\end{list}}
208 \newlength\gnusheadtextwidth
209 \setlength{\gnusheadtextwidth}{\headtextwidth}
210 \addtolength{\gnusheadtextwidth}{1cm}
212 \newpagestyle{gnuspreamble}%
215 \ifodd\count0
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
219 \else
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
228 \ifodd\count0
229 \mbox{} \hfill
230 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
231 \else
232 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
233 \hfill \mbox{}
237 \newpagestyle{gnusindex}%
240 \ifodd\count0
242 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
244 \else
246 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
252 \ifodd\count0
253 \mbox{} \hfill
254 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
255 \else
256 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
257 \hfill \mbox{}
261 \newpagestyle{gnus}%
264 \ifodd\count0
266 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
268 \else
270 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
276 \ifodd\count0
277 \mbox{} \hfill
278 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
279 \else
280 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
281 \hfill \mbox{}
285 \pagenumbering{roman}
286 \pagestyle{gnuspreamble}
288 @end iflatex
289 @end iftex
291 @iftex
292 @iflatex
294 \begin{titlepage}
297 %\addtolength{\oddsidemargin}{-5cm}
298 %\addtolength{\evensidemargin}{-5cm}
299 \parindent=0cm
300 \addtolength{\textheight}{2cm}
302 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
303 \rule{15cm}{1mm}\\
304 \vfill
305 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
306 \vfill
307 \rule{15cm}{1mm}\\
308 \gnusauthor{by Lars Magne Ingebrigtsen}
309 \newpage
312 \mbox{}
313 \vfill
315 \thispagestyle{empty}
317 @c @insertcopying
318 \newpage
319 \end{titlepage}
320 @end iflatex
321 @end iftex
323 @ifnottex
324 @insertcopying
325 @end ifnottex
327 @dircategory Emacs
328 @direntry
329 * Gnus: (gnus).         The newsreader Gnus.
330 @end direntry
331 @iftex
332 @finalout
333 @end iftex
334 @setchapternewpage odd
338 @titlepage
339 @title Gnus Manual
341 @author by Lars Magne Ingebrigtsen
342 @page
343 @vskip 0pt plus 1filll
344 @insertcopying
345 @end titlepage
348 @node Top
349 @top The Gnus Newsreader
351 @ifinfo
353 You can read news (and mail) from within Emacs by using Gnus.  The news
354 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
355 spool or your mbox file.  All at the same time, if you want to push your
356 luck.
358 @c Adjust ../Makefile.in if you change the following line:
359 This manual corresponds to Gnus v5.13
361 @end ifinfo
363 @iftex
365 @iflatex
366 \tableofcontents
367 \gnuscleardoublepage
368 @end iflatex
370 Gnus is the advanced, self-documenting, customizable, extensible
371 unreal-time newsreader for GNU Emacs.
373 Oops.  That sounds oddly familiar, so let's start over again to avoid
374 being accused of plagiarism:
376 Gnus is a message-reading laboratory.  It will let you look at just
377 about anything as if it were a newsgroup.  You can read mail with it,
378 you can browse directories with it, you can @code{ftp} with it---you
379 can even read news with it!
381 Gnus tries to empower people who read news the same way Emacs empowers
382 people who edit text.  Gnus sets no limits to what the user should be
383 allowed to do.  Users are encouraged to extend Gnus to make it behave
384 like they want it to behave.  A program should not control people;
385 people should be empowered to do what they want by using (or abusing)
386 the program.
388 @c Adjust ../Makefile.in if you change the following line:
389 This manual corresponds to Gnus v5.13
391 @heading Other related manuals
392 @itemize
393 @item Message manual: Composing messages
394 @item Emacs-MIME:     Composing messages; @acronym{MIME}-specific parts.
395 @item Sieve:          Managing Sieve scripts in Emacs.
396 @item PGG:            @acronym{PGP/MIME} with Gnus.
397 @item SASL:           @acronym{SASL} authentication in Emacs.
398 @end itemize
400 @end iftex
402 @menu
403 * Starting Up::              Finding news can be a pain.
404 * Group Buffer::             Selecting, subscribing and killing groups.
405 * Summary Buffer::           Reading, saving and posting articles.
406 * Article Buffer::           Displaying and handling articles.
407 * Composing Messages::       Information on sending mail and news.
408 * Select Methods::           Gnus reads all messages from various select methods.
409 * Scoring::                  Assigning values to articles.
410 * Various::                  General purpose settings.
411 * The End::                  Farewell and goodbye.
412 * Appendices::               Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
413 * GNU Free Documentation License:: The license for this documentation.
414 * Index::                    Variable, function and concept index.
415 * Key Index::                Key Index.
417 Other related manuals
419 * Message:(message).         Composing messages.
420 * Emacs-MIME:(emacs-mime).   Composing messages; @acronym{MIME}-specific parts.
421 * Sieve:(sieve).             Managing Sieve scripts in Emacs.
422 * PGG:(pgg).                 @acronym{PGP/MIME} with Gnus.
423 * SASL:(sasl).               @acronym{SASL} authentication in Emacs.
425 @detailmenu
426  --- The Detailed Node Listing ---
428 Starting Gnus
430 * Finding the News::            Choosing a method for getting news.
431 * The First Time::              What does Gnus do the first time you start it?
432 * The Server is Down::          How can I read my mail then?
433 * Slave Gnusae::                You can have more than one Gnus active at a time.
434 * Fetching a Group::            Starting Gnus just to read a group.
435 * New Groups::                  What is Gnus supposed to do with new groups?
436 * Changing Servers::            You may want to move from one server to another.
437 * Startup Files::               Those pesky startup files---@file{.newsrc}.
438 * Auto Save::                   Recovering from a crash.
439 * The Active File::             Reading the active file over a slow line Takes Time.
440 * Startup Variables::           Other variables you might change.
442 New Groups
444 * Checking New Groups::         Determining what groups are new.
445 * Subscription Methods::        What Gnus should do with new groups.
446 * Filtering New Groups::        Making Gnus ignore certain new groups.
448 Group Buffer
450 * Group Buffer Format::         Information listed and how you can change it.
451 * Group Maneuvering::           Commands for moving in the group buffer.
452 * Selecting a Group::           Actually reading news.
453 * Subscription Commands::       Unsubscribing, killing, subscribing.
454 * Group Data::                  Changing the info for a group.
455 * Group Levels::                Levels? What are those, then?
456 * Group Score::                 A mechanism for finding out what groups you like.
457 * Marking Groups::              You can mark groups for later processing.
458 * Foreign Groups::              Creating and editing groups.
459 * Group Parameters::            Each group may have different parameters set.
460 * Listing Groups::              Gnus can list various subsets of the groups.
461 * Sorting Groups::              Re-arrange the group order.
462 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
463 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
464 * Exiting Gnus::                Stop reading news and get some work done.
465 * Group Topics::                A folding group mode divided into topics.
466 * Non-ASCII Group Names::       Accessing groups of non-English names.
467 * Misc Group Stuff::            Other stuff that you can to do.
469 Group Buffer Format
471 * Group Line Specification::    Deciding how the group buffer is to look.
472 * Group Mode Line Specification::  The group buffer mode line.
473 * Group Highlighting::          Having nice colors in the group buffer.
475 Group Topics
477 * Topic Commands::              Interactive E-Z commands.
478 * Topic Variables::             How to customize the topics the Lisp Way.
479 * Topic Sorting::               Sorting each topic individually.
480 * Topic Topology::              A map of the world.
481 * Topic Parameters::            Parameters that apply to all groups in a topic.
483 Misc Group Stuff
485 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
486 * Group Information::           Information and help on groups and Gnus.
487 * Group Timestamp::             Making Gnus keep track of when you last read a group.
488 * File Commands::               Reading and writing the Gnus files.
489 * Sieve Commands::              Managing Sieve scripts.
491 Summary Buffer
493 * Summary Buffer Format::       Deciding how the summary buffer is to look.
494 * Summary Maneuvering::         Moving around the summary buffer.
495 * Choosing Articles::           Reading articles.
496 * Paging the Article::          Scrolling the current article.
497 * Reply Followup and Post::     Posting articles.
498 * Delayed Articles::            Send articles at a later time.
499 * Marking Articles::            Marking articles as read, expirable, etc.
500 * Limiting::                    You can limit the summary buffer.
501 * Threading::                   How threads are made.
502 * Sorting the Summary Buffer::  How articles and threads are sorted.
503 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
504 * Article Caching::             You may store articles in a cache.
505 * Persistent Articles::         Making articles expiry-resistant.
506 * Sticky Articles::             Article buffers that are not reused.
507 * Article Backlog::             Having already read articles hang around.
508 * Saving Articles::             Ways of customizing article saving.
509 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
510 * Article Treatment::           The article buffer can be mangled at will.
511 * MIME Commands::               Doing MIMEy things with the articles.
512 * Charsets::                    Character set issues.
513 * Article Commands::            Doing various things with the article buffer.
514 * Summary Sorting::             Sorting the summary buffer in various ways.
515 * Finding the Parent::          No child support? Get the parent.
516 * Alternative Approaches::      Reading using non-default summaries.
517 * Tree Display::                A more visual display of threads.
518 * Mail Group Commands::         Some commands can only be used in mail groups.
519 * Various Summary Stuff::       What didn't fit anywhere else.
520 * Exiting the Summary Buffer::  Returning to the Group buffer,
521                                 or reselecting the current group.
522 * Crosspost Handling::          How crossposted articles are dealt with.
523 * Duplicate Suppression::       An alternative when crosspost handling fails.
524 * Security::                    Decrypt and Verify.
525 * Mailing List::                Mailing list minor mode.
527 Summary Buffer Format
529 * Summary Buffer Lines::        You can specify how summary lines should look.
530 * To From Newsgroups::          How to not display your own name.
531 * Summary Buffer Mode Line::    You can say how the mode line should look.
532 * Summary Highlighting::        Making the summary buffer all pretty and nice.
534 Choosing Articles
536 * Choosing Commands::           Commands for choosing articles.
537 * Choosing Variables::          Variables that influence these commands.
539 Reply, Followup and Post
541 * Summary Mail Commands::       Sending mail.
542 * Summary Post Commands::       Sending news.
543 * Summary Message Commands::    Other Message-related commands.
544 * Canceling and Superseding::
546 Marking Articles
548 * Unread Articles::             Marks for unread articles.
549 * Read Articles::               Marks for read articles.
550 * Other Marks::                 Marks that do not affect readedness.
551 * Setting Marks::               How to set and remove marks.
552 * Generic Marking Commands::    How to customize the marking.
553 * Setting Process Marks::       How to mark articles for later processing.
555 Threading
557 * Customizing Threading::       Variables you can change to affect the threading.
558 * Thread Commands::             Thread based commands in the summary buffer.
560 Customizing Threading
562 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
563 * Filling In Threads::          Making the threads displayed look fuller.
564 * More Threading::              Even more variables for fiddling with threads.
565 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
567 Decoding Articles
569 * Uuencoded Articles::          Uudecode articles.
570 * Shell Archives::              Unshar articles.
571 * PostScript Files::            Split PostScript.
572 * Other Files::                 Plain save and binhex.
573 * Decoding Variables::          Variables for a happy decoding.
574 * Viewing Files::               You want to look at the result of the decoding?
576 Decoding Variables
578 * Rule Variables::              Variables that say how a file is to be viewed.
579 * Other Decode Variables::      Other decode variables.
580 * Uuencoding and Posting::      Variables for customizing uuencoding.
582 Article Treatment
584 * Article Highlighting::        You want to make the article look like fruit salad.
585 * Article Fontisizing::         Making emphasized text look nice.
586 * Article Hiding::              You also want to make certain info go away.
587 * Article Washing::             Lots of way-neat functions to make life better.
588 * Article Header::              Doing various header transformations.
589 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
590 * Article Button Levels::       Controlling appearance of buttons.
591 * Article Date::                Grumble, UT!
592 * Article Display::             Display various stuff---X-Face, Picons, Smileys
593 * Article Signature::           What is a signature?
594 * Article Miscellanea::         Various other stuff.
596 Alternative Approaches
598 * Pick and Read::               First mark articles and then read them.
599 * Binary Groups::               Auto-decode all articles.
601 Various Summary Stuff
603 * Summary Group Information::   Information oriented commands.
604 * Searching for Articles::      Multiple article commands.
605 * Summary Generation Commands::
606 * Really Various Summary Commands::  Those pesky non-conformant commands.
608 Article Buffer
610 * Hiding Headers::              Deciding what headers should be displayed.
611 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
612 * Customizing Articles::        Tailoring the look of the articles.
613 * Article Keymap::              Keystrokes available in the article buffer.
614 * Misc Article::                Other stuff.
616 Composing Messages
618 * Mail::                        Mailing and replying.
619 * Posting Server::              What server should you post and mail via?
620 * POP before SMTP::             You cannot send a mail unless you read a mail.
621 * Mail and Post::               Mailing and posting at the same time.
622 * Archived Messages::           Where Gnus stores the messages you've sent.
623 * Posting Styles::              An easier way to specify who you are.
624 * Drafts::                      Postponing messages and rejected messages.
625 * Rejected Articles::           What happens if the server doesn't like your article?
626 * Signing and encrypting::      How to compose secure messages.
628 Select Methods
630 * Server Buffer::               Making and editing virtual servers.
631 * Getting News::                Reading USENET news with Gnus.
632 * Getting Mail::                Reading your personal mail with Gnus.
633 * Browsing the Web::            Getting messages from a plethora of Web sources.
634 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
635 * Other Sources::               Reading directories, files, SOUP packets.
636 * Combined Groups::             Combining groups into one group.
637 * Email Based Diary::           Using mails to manage diary events in Gnus.
638 * Gnus Unplugged::              Reading news and mail offline.
640 Server Buffer
642 * Server Buffer Format::        You can customize the look of this buffer.
643 * Server Commands::             Commands to manipulate servers.
644 * Example Methods::             Examples server specifications.
645 * Creating a Virtual Server::   An example session.
646 * Server Variables::            Which variables to set.
647 * Servers and Methods::         You can use server names as select methods.
648 * Unavailable Servers::         Some servers you try to contact may be down.
650 Getting News
652 * NNTP::                        Reading news from an @acronym{NNTP} server.
653 * News Spool::                  Reading news from the local spool.
655 @acronym{NNTP}
657 * Direct Functions::            Connecting directly to the server.
658 * Indirect Functions::          Connecting indirectly to the server.
659 * Common Variables::            Understood by several connection functions.
660 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
662 Getting Mail
664 * Mail in a Newsreader::        Important introductory notes.
665 * Getting Started Reading Mail::  A simple cookbook example.
666 * Splitting Mail::              How to create mail groups.
667 * Mail Sources::                How to tell Gnus where to get mail from.
668 * Mail Back End Variables::     Variables for customizing mail handling.
669 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
670 * Group Mail Splitting::        Use group customize to drive mail splitting.
671 * Incorporating Old Mail::      What about the old mail you have?
672 * Expiring Mail::               Getting rid of unwanted mail.
673 * Washing Mail::                Removing cruft from the mail you get.
674 * Duplicates::                  Dealing with duplicated mail.
675 * Not Reading Mail::            Using mail back ends for reading other files.
676 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
678 Mail Sources
680 * Mail Source Specifiers::      How to specify what a mail source is.
681 * Mail Source Customization::   Some variables that influence things.
682 * Fetching Mail::               Using the mail source specifiers.
684 Choosing a Mail Back End
686 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
687 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
688 * Mail Spool::                  Store your mail in a private spool?
689 * MH Spool::                    An mhspool-like back end.
690 * Maildir::                     Another one-file-per-message format.
691 * Mail Folders::                Having one file for each group.
692 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
694 Browsing the Web
696 * Archiving Mail::
697 * Web Searches::                Creating groups from articles that match a string.
698 * Slashdot::                    Reading the Slashdot comments.
699 * Ultimate::                    The Ultimate Bulletin Board systems.
700 * Web Archive::                 Reading mailing list archived on web.
701 * RSS::                         Reading RDF site summary.
702 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
704 @acronym{IMAP}
706 * Splitting in IMAP::           Splitting mail with nnimap.
707 * Expiring in IMAP::            Expiring mail with nnimap.
708 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
709 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
710 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
711 * Debugging IMAP::              What to do when things don't work.
713 Other Sources
715 * Directory Groups::            You can read a directory as if it was a newsgroup.
716 * Anything Groups::             Dired?  Who needs dired?
717 * Document Groups::             Single files can be the basis of a group.
718 * SOUP::                        Reading @sc{soup} packets ``offline''.
719 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
721 Document Groups
723 * Document Server Internals::   How to add your own document types.
725 SOUP
727 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
728 * SOUP Groups::                 A back end for reading @sc{soup} packets.
729 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
731 Combined Groups
733 * Virtual Groups::              Combining articles from many groups.
734 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
736 Email Based Diary
738 * The NNDiary Back End::        Basic setup and usage.
739 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
740 * Sending or Not Sending::      A final note on sending diary messages.
742 The NNDiary Back End
744 * Diary Messages::              What makes a message valid for nndiary.
745 * Running NNDiary::             NNDiary has two modes of operation.
746 * Customizing NNDiary::         Bells and whistles.
748 The Gnus Diary Library
750 * Diary Summary Line Format::           A nicer summary buffer line format.
751 * Diary Articles Sorting::              A nicer way to sort messages.
752 * Diary Headers Generation::            Not doing it manually.
753 * Diary Group Parameters::              Not handling them manually.
755 Gnus Unplugged
757 * Agent Basics::                How it all is supposed to work.
758 * Agent Categories::            How to tell the Gnus Agent what to download.
759 * Agent Commands::              New commands for all the buffers.
760 * Agent Visuals::               Ways that the agent may effect your summary buffer.
761 * Agent as Cache::              The Agent is a big cache too.
762 * Agent Expiry::                How to make old articles go away.
763 * Agent Regeneration::          How to recover from lost connections and other accidents.
764 * Agent and flags::             How the Agent maintains flags.
765 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
766 * Outgoing Messages::           What happens when you post/mail something?
767 * Agent Variables::             Customizing is fun.
768 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
769 * Batching Agents::             How to fetch news from a @code{cron} job.
770 * Agent Caveats::               What you think it'll do and what it does.
772 Agent Categories
774 * Category Syntax::             What a category looks like.
775 * Category Buffer::             A buffer for maintaining categories.
776 * Category Variables::          Customize'r'Us.
778 Agent Commands
780 * Group Agent Commands::        Configure groups and fetch their contents.
781 * Summary Agent Commands::      Manually select then fetch specific articles.
782 * Server Agent Commands::       Select the servers that are supported by the agent.
784 Scoring
786 * Summary Score Commands::      Adding score entries for the current group.
787 * Group Score Commands::        General score commands.
788 * Score Variables::             Customize your scoring.  (My, what terminology).
789 * Score File Format::           What a score file may contain.
790 * Score File Editing::          You can edit score files by hand as well.
791 * Adaptive Scoring::            Big Sister Gnus knows what you read.
792 * Home Score File::             How to say where new score entries are to go.
793 * Followups To Yourself::       Having Gnus notice when people answer you.
794 * Scoring On Other Headers::    Scoring on non-standard headers.
795 * Scoring Tips::                How to score effectively.
796 * Reverse Scoring::             That problem child of old is not problem.
797 * Global Score Files::          Earth-spanning, ear-splitting score files.
798 * Kill Files::                  They are still here, but they can be ignored.
799 * Converting Kill Files::       Translating kill files to score files.
800 * Advanced Scoring::            Using logical expressions to build score rules.
801 * Score Decays::                It can be useful to let scores wither away.
803 Advanced Scoring
805 * Advanced Scoring Syntax::     A definition.
806 * Advanced Scoring Examples::   What they look like.
807 * Advanced Scoring Tips::       Getting the most out of it.
809 Various
811 * Process/Prefix::              A convention used by many treatment commands.
812 * Interactive::                 Making Gnus ask you many questions.
813 * Symbolic Prefixes::           How to supply some Gnus functions with options.
814 * Formatting Variables::        You can specify what buffers should look like.
815 * Window Layout::               Configuring the Gnus buffer windows.
816 * Faces and Fonts::             How to change how faces look.
817 * Compilation::                 How to speed Gnus up.
818 * Mode Lines::                  Displaying information in the mode lines.
819 * Highlighting and Menus::      Making buffers look all nice and cozy.
820 * Buttons::                     Get tendinitis in ten easy steps!
821 * Daemons::                     Gnus can do things behind your back.
822 * NoCeM::                       How to avoid spam and other fatty foods.
823 * Undo::                        Some actions can be undone.
824 * Predicate Specifiers::        Specifying predicates.
825 * Moderation::                  What to do if you're a moderator.
826 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
827 * Fuzzy Matching::              What's the big fuzz?
828 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
829 * Spam Package::                A package for filtering and processing spam.
830 * Other modes::                 Interaction with other modes.
831 * Various Various::             Things that are really various.
833 Formatting Variables
835 * Formatting Basics::           A formatting variable is basically a format string.
836 * Mode Line Formatting::        Some rules about mode line formatting variables.
837 * Advanced Formatting::         Modifying output in various ways.
838 * User-Defined Specs::          Having Gnus call your own functions.
839 * Formatting Fonts::            Making the formatting look colorful and nice.
840 * Positioning Point::           Moving point to a position after an operation.
841 * Tabulation::                  Tabulating your output.
842 * Wide Characters::             Dealing with wide characters.
844 Image Enhancements
846 * X-Face::                      Display a funky, teensy black-and-white image.
847 * Face::                        Display a funkier, teensier colored image.
848 * Smileys::                     Show all those happy faces the way they were
849                                   meant to be shown.
850 * Picons::                      How to display pictures of what you're reading.
851 * XVarious::                    Other XEmacsy Gnusey variables.
853 Thwarting Email Spam
855 * The problem of spam::         Some background, and some solutions
856 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
857 * SpamAssassin::                How to use external anti-spam tools.
858 * Hashcash::                    Reduce spam by burning CPU time.
860 Spam Package
862 * Spam Package Introduction::
863 * Filtering Incoming Mail::
864 * Detecting Spam in Groups::
865 * Spam and Ham Processors::
866 * Spam Package Configuration Examples::
867 * Spam Back Ends::
868 * Extending the Spam package::
869 * Spam Statistics Package::
871 Spam Statistics Package
873 * Creating a spam-stat dictionary::
874 * Splitting mail using spam-stat::
875 * Low-level interface to the spam-stat dictionary::
877 Appendices
879 * XEmacs::                      Requirements for installing under XEmacs.
880 * History::                     How Gnus got where it is today.
881 * On Writing Manuals::          Why this is not a beginner's guide.
882 * Terminology::                 We use really difficult, like, words here.
883 * Customization::               Tailoring Gnus to your needs.
884 * Troubleshooting::             What you might try if things do not work.
885 * Gnus Reference Guide::        Rilly, rilly technical stuff.
886 * Emacs for Heathens::          A short introduction to Emacsian terms.
887 * Frequently Asked Questions::  The Gnus FAQ
889 History
891 * Gnus Versions::               What Gnus versions have been released.
892 * Other Gnus Versions::         Other Gnus versions that also have been released.
893 * Why?::                        What's the point of Gnus?
894 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
895 * Conformity::                  Gnus tries to conform to all standards.
896 * Emacsen::                     Gnus can be run on a few modern Emacsen.
897 * Gnus Development::            How Gnus is developed.
898 * Contributors::                Oodles of people.
899 * New Features::                Pointers to some of the new stuff in Gnus.
901 New Features
903 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
904 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
905 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
906 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
907 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
908 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
909 * No Gnus::                     Very punny.
911 Customization
913 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
914 * Slow Terminal Connection::    You run a remote Emacs.
915 * Little Disk Space::           You feel that having large setup files is icky.
916 * Slow Machine::                You feel like buying a faster machine.
918 Gnus Reference Guide
920 * Gnus Utility Functions::      Common functions and variable to use.
921 * Back End Interface::          How Gnus communicates with the servers.
922 * Score File Syntax::           A BNF definition of the score file standard.
923 * Headers::                     How Gnus stores headers internally.
924 * Ranges::                      A handy format for storing mucho numbers.
925 * Group Info::                  The group info format.
926 * Extended Interactive::        Symbolic prefixes and stuff.
927 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
928 * Various File Formats::        Formats of files that Gnus use.
930 Back End Interface
932 * Required Back End Functions::  Functions that must be implemented.
933 * Optional Back End Functions::  Functions that need not be implemented.
934 * Error Messaging::             How to get messages and report errors.
935 * Writing New Back Ends::       Extending old back ends.
936 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
937 * Mail-like Back Ends::         Some tips on mail back ends.
939 Various File Formats
941 * Active File Format::          Information on articles and groups available.
942 * Newsgroups File Format::      Group descriptions.
944 Emacs for Heathens
946 * Keystrokes::                  Entering text and executing commands.
947 * Emacs Lisp::                  The built-in Emacs programming language.
949 @end detailmenu
950 @end menu
952 @node Starting Up
953 @chapter Starting Gnus
954 @cindex starting up
956 If you haven't used Emacs much before using Gnus, read @ref{Emacs for
957 Heathens} first.
959 @kindex M-x gnus
960 @findex gnus
961 If your system administrator has set things up properly, starting Gnus
962 and reading news is extremely easy---you just type @kbd{M-x gnus} in
963 your Emacs.  If not, you should customize the variable
964 @code{gnus-select-method} as described in @ref{Finding the News}.  For a
965 minimal setup for posting should also customize the variables
966 @code{user-full-name} and @code{user-mail-address}.
968 @findex gnus-other-frame
969 @kindex M-x gnus-other-frame
970 If you want to start Gnus in a different frame, you can use the command
971 @kbd{M-x gnus-other-frame} instead.
973 If things do not go smoothly at startup, you have to twiddle some
974 variables in your @file{~/.gnus.el} file.  This file is similar to
975 @file{~/.emacs}, but is read when Gnus starts.
977 If you puzzle at any terms used in this manual, please refer to the
978 terminology section (@pxref{Terminology}).
980 @menu
981 * Finding the News::      Choosing a method for getting news.
982 * The First Time::        What does Gnus do the first time you start it?
983 * The Server is Down::    How can I read my mail then?
984 * Slave Gnusae::          You can have more than one Gnus active at a time.
985 * New Groups::            What is Gnus supposed to do with new groups?
986 * Changing Servers::      You may want to move from one server to another.
987 * Startup Files::         Those pesky startup files---@file{.newsrc}.
988 * Auto Save::             Recovering from a crash.
989 * The Active File::       Reading the active file over a slow line Takes Time.
990 * Startup Variables::     Other variables you might change.
991 @end menu
994 @node Finding the News
995 @section Finding the News
996 @cindex finding news
998 @vindex gnus-select-method
999 @c @head
1000 The @code{gnus-select-method} variable says where Gnus should look for
1001 news.  This variable should be a list where the first element says
1002 @dfn{how} and the second element says @dfn{where}.  This method is your
1003 native method.  All groups not fetched with this method are
1004 foreign groups.
1006 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1007 you want to get your daily dosage of news from, you'd say:
1009 @lisp
1010 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1011 @end lisp
1013 If you want to read directly from the local spool, say:
1015 @lisp
1016 (setq gnus-select-method '(nnspool ""))
1017 @end lisp
1019 If you can use a local spool, you probably should, as it will almost
1020 certainly be much faster.  But do not use the local spool if your
1021 server is running Leafnode (which is a simple, standalone private news
1022 server); in this case, use @code{(nntp "localhost")}.
1024 @vindex gnus-nntpserver-file
1025 @cindex NNTPSERVER
1026 @cindex @acronym{NNTP} server
1027 If this variable is not set, Gnus will take a look at the
1028 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1029 Gnus will see whether @code{gnus-nntpserver-file}
1030 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1031 If that fails as well, Gnus will try to use the machine running Emacs
1032 as an @acronym{NNTP} server.  That's a long shot, though.
1034 @vindex gnus-nntp-server
1035 If @code{gnus-nntp-server} is set, this variable will override
1036 @code{gnus-select-method}.  You should therefore set
1037 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1039 @vindex gnus-secondary-servers
1040 @vindex gnus-nntp-server
1041 You can also make Gnus prompt you interactively for the name of an
1042 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1043 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1044 in the @code{gnus-secondary-servers} list (if any).  You can also just
1045 type in the name of any server you feel like visiting.  (Note that this
1046 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1047 gnus} later in the same Emacs session, Gnus will contact the same
1048 server.)
1050 @findex gnus-group-browse-foreign-server
1051 @kindex B (Group)
1052 However, if you use one @acronym{NNTP} server regularly and are just
1053 interested in a couple of groups from a different server, you would be
1054 better served by using the @kbd{B} command in the group buffer.  It will
1055 let you have a look at what groups are available, and you can subscribe
1056 to any of the groups you want to.  This also makes @file{.newsrc}
1057 maintenance much tidier.  @xref{Foreign Groups}.
1059 @vindex gnus-secondary-select-methods
1060 @c @head
1061 A slightly different approach to foreign groups is to set the
1062 @code{gnus-secondary-select-methods} variable.  The select methods
1063 listed in this variable are in many ways just as native as the
1064 @code{gnus-select-method} server.  They will also be queried for active
1065 files during startup (if that's required), and new newsgroups that
1066 appear on these servers will be subscribed (or not) just as native
1067 groups are.
1069 For instance, if you use the @code{nnmbox} back end to read your mail,
1070 you would typically set this variable to
1072 @lisp
1073 (setq gnus-secondary-select-methods '((nnmbox "")))
1074 @end lisp
1076 Note: the @acronym{NNTP} back end stores marks in marks files
1077 (@pxref{NNTP marks}).  This feature makes it easy to share marks between
1078 several Gnus installations, but may slow down things a bit when fetching
1079 new articles.  @xref{NNTP marks}, for more information.
1082 @node The First Time
1083 @section The First Time
1084 @cindex first time usage
1086 If no startup files exist (@pxref{Startup Files}), Gnus will try to
1087 determine what groups should be subscribed by default.
1089 @vindex gnus-default-subscribed-newsgroups
1090 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1091 will subscribe you to just those groups in that list, leaving the rest
1092 killed.  Your system administrator should have set this variable to
1093 something useful.
1095 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1096 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1097 here as @dfn{whatever Lars thinks you should read}.)
1099 You'll also be subscribed to the Gnus documentation group, which should
1100 help you with most common problems.
1102 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1103 use the normal functions for handling new groups, and not do anything
1104 special.
1107 @node The Server is Down
1108 @section The Server is Down
1109 @cindex server errors
1111 If the default server is down, Gnus will understandably have some
1112 problems starting.  However, if you have some mail groups in addition to
1113 the news groups, you may want to start Gnus anyway.
1115 Gnus, being the trusting sort of program, will ask whether to proceed
1116 without a native select method if that server can't be contacted.  This
1117 will happen whether the server doesn't actually exist (i.e., you have
1118 given the wrong address) or the server has just momentarily taken ill
1119 for some reason or other.  If you decide to continue and have no foreign
1120 groups, you'll find it difficult to actually do anything in the group
1121 buffer.  But, hey, that's your problem.  Blllrph!
1123 @findex gnus-no-server
1124 @kindex M-x gnus-no-server
1125 @c @head
1126 If you know that the server is definitely down, or you just want to read
1127 your mail without bothering with the server at all, you can use the
1128 @code{gnus-no-server} command to start Gnus.  That might come in handy
1129 if you're in a hurry as well.  This command will not attempt to contact
1130 your primary server---instead, it will just activate all groups on level
1131 1 and 2.  (You should preferably keep no native groups on those two
1132 levels.) Also @pxref{Group Levels}.
1135 @node Slave Gnusae
1136 @section Slave Gnusae
1137 @cindex slave
1139 You might want to run more than one Emacs with more than one Gnus at the
1140 same time.  If you are using different @file{.newsrc} files (e.g., if you
1141 are using the two different Gnusae to read from two different servers),
1142 that is no problem whatsoever.  You just do it.
1144 The problem appears when you want to run two Gnusae that use the same
1145 @file{.newsrc} file.
1147 To work around that problem some, we here at the Think-Tank at the Gnus
1148 Towers have come up with a new concept: @dfn{Masters} and
1149 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1150 taken out a copyright on those words.  If you wish to use those words in
1151 conjunction with each other, you have to send $1 per usage instance to
1152 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1153 Applications}) will be much more expensive, of course.)
1155 @findex gnus-slave
1156 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1157 however you do it).  Each subsequent slave Gnusae should be started with
1158 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1159 files, but instead save @dfn{slave files} that contain information only
1160 on what groups have been read in the slave session.  When a master Gnus
1161 starts, it will read (and delete) these slave files, incorporating all
1162 information from them.  (The slave files will be read in the sequence
1163 they were created, so the latest changes will have precedence.)
1165 Information from the slave files has, of course, precedence over the
1166 information in the normal (i.e., master) @file{.newsrc} file.
1168 If the @file{.newsrc*} files have not been saved in the master when the
1169 slave starts, you may be prompted as to whether to read an auto-save
1170 file.  If you answer ``yes'', the unsaved changes to the master will be
1171 incorporated into the slave.  If you answer ``no'', the slave may see some
1172 messages as unread that have been read in the master.
1176 @node New Groups
1177 @section New Groups
1178 @cindex new groups
1179 @cindex subscription
1181 @vindex gnus-check-new-newsgroups
1182 If you are satisfied that you really never want to see any new groups,
1183 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1184 also save you some time at startup.  Even if this variable is
1185 @code{nil}, you can always subscribe to the new groups just by pressing
1186 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1187 is @code{ask-server} by default.  If you set this variable to
1188 @code{always}, then Gnus will query the back ends for new groups even
1189 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1191 @menu
1192 * Checking New Groups::         Determining what groups are new.
1193 * Subscription Methods::        What Gnus should do with new groups.
1194 * Filtering New Groups::        Making Gnus ignore certain new groups.
1195 @end menu
1198 @node Checking New Groups
1199 @subsection Checking New Groups
1201 Gnus normally determines whether a group is new or not by comparing the
1202 list of groups from the active file(s) with the lists of subscribed and
1203 dead groups.  This isn't a particularly fast method.  If
1204 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1205 server for new groups since the last time.  This is both faster and
1206 cheaper.  This also means that you can get rid of the list of killed
1207 groups altogether, so you may set @code{gnus-save-killed-list} to
1208 @code{nil}, which will save time both at startup, at exit, and all over.
1209 Saves disk space, too.  Why isn't this the default, then?
1210 Unfortunately, not all servers support this command.
1212 I bet I know what you're thinking now: How do I find out whether my
1213 server supports @code{ask-server}?  No?  Good, because I don't have a
1214 fail-safe answer.  I would suggest just setting this variable to
1215 @code{ask-server} and see whether any new groups appear within the next
1216 few days.  If any do, then it works.  If none do, then it doesn't
1217 work.  I could write a function to make Gnus guess whether the server
1218 supports @code{ask-server}, but it would just be a guess.  So I won't.
1219 You could @code{telnet} to the server and say @code{HELP} and see
1220 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1221 it does, then it might work.  (But there are servers that lists
1222 @samp{NEWGROUPS} without supporting the function properly.)
1224 This variable can also be a list of select methods.  If so, Gnus will
1225 issue an @code{ask-server} command to each of the select methods, and
1226 subscribe them (or not) using the normal methods.  This might be handy
1227 if you are monitoring a few servers for new groups.  A side effect is
1228 that startup will take much longer, so you can meditate while waiting.
1229 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1232 @node Subscription Methods
1233 @subsection Subscription Methods
1235 @vindex gnus-subscribe-newsgroup-method
1236 What Gnus does when it encounters a new group is determined by the
1237 @code{gnus-subscribe-newsgroup-method} variable.
1239 This variable should contain a function.  This function will be called
1240 with the name of the new group as the only parameter.
1242 Some handy pre-fab functions are:
1244 @table @code
1246 @item gnus-subscribe-zombies
1247 @vindex gnus-subscribe-zombies
1248 Make all new groups zombies.  This is the default.  You can browse the
1249 zombies later (with @kbd{A z}) and either kill them all off properly
1250 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1252 @item gnus-subscribe-randomly
1253 @vindex gnus-subscribe-randomly
1254 Subscribe all new groups in arbitrary order.  This really means that all
1255 new groups will be added at ``the top'' of the group buffer.
1257 @item gnus-subscribe-alphabetically
1258 @vindex gnus-subscribe-alphabetically
1259 Subscribe all new groups in alphabetical order.
1261 @item gnus-subscribe-hierarchically
1262 @vindex gnus-subscribe-hierarchically
1263 Subscribe all new groups hierarchically.  The difference between this
1264 function and @code{gnus-subscribe-alphabetically} is slight.
1265 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1266 alphabetical fashion, while this function will enter groups into its
1267 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1268 @samp{comp} hierarchy, this function will not mess that configuration
1269 up.  Or something like that.
1271 @item gnus-subscribe-interactively
1272 @vindex gnus-subscribe-interactively
1273 Subscribe new groups interactively.  This means that Gnus will ask
1274 you about @strong{all} new groups.  The groups you choose to subscribe
1275 to will be subscribed hierarchically.
1277 @item gnus-subscribe-killed
1278 @vindex gnus-subscribe-killed
1279 Kill all new groups.
1281 @item gnus-subscribe-topics
1282 @vindex gnus-subscribe-topics
1283 Put the groups into the topic that has a matching @code{subscribe} topic
1284 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1285 topic parameter that looks like
1287 @example
1288 "nnslashdot"
1289 @end example
1291 will mean that all groups that match that regex will be subscribed under
1292 that topic.
1294 If no topics match the groups, the groups will be subscribed in the
1295 top-level topic.
1297 @end table
1299 @vindex gnus-subscribe-hierarchical-interactive
1300 A closely related variable is
1301 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1302 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1303 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1304 will ask you for each sub-hierarchy whether you want to descend the
1305 hierarchy or not.
1307 One common mistake is to set the variable a few paragraphs above
1308 (@code{gnus-subscribe-newsgroup-method}) to
1309 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1310 will not work.  This is ga-ga.  So don't do it.
1313 @node Filtering New Groups
1314 @subsection Filtering New Groups
1316 A nice and portable way to control which new newsgroups should be
1317 subscribed (or ignored) is to put an @dfn{options} line at the start of
1318 the @file{.newsrc} file.  Here's an example:
1320 @example
1321 options -n !alt.all !rec.all sci.all
1322 @end example
1324 @vindex gnus-subscribe-options-newsgroup-method
1325 This line obviously belongs to a serious-minded intellectual scientific
1326 person (or she may just be plain old boring), because it says that all
1327 groups that have names beginning with @samp{alt} and @samp{rec} should
1328 be ignored, and all groups with names beginning with @samp{sci} should
1329 be subscribed.  Gnus will not use the normal subscription method for
1330 subscribing these groups.
1331 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1332 variable defaults to @code{gnus-subscribe-alphabetically}.
1334 @vindex gnus-options-not-subscribe
1335 @vindex gnus-options-subscribe
1336 If you don't want to mess with your @file{.newsrc} file, you can just
1337 set the two variables @code{gnus-options-subscribe} and
1338 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1339 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1340 and if the new group matches the former, it will be unconditionally
1341 subscribed, and if it matches the latter, it will be ignored.
1343 @vindex gnus-auto-subscribed-groups
1344 Yet another variable that meddles here is
1345 @code{gnus-auto-subscribed-groups}.  It works exactly like
1346 @code{gnus-options-subscribe}, and is therefore really superfluous,
1347 but I thought it would be nice to have two of these.  This variable is
1348 more meant for setting some ground rules, while the other variable is
1349 used more for user fiddling.  By default this variable makes all new
1350 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1351 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1352 subscribed.  If you don't like that, just set this variable to
1353 @code{nil}.
1355 New groups that match this regexp are subscribed using
1356 @code{gnus-subscribe-options-newsgroup-method}.
1359 @node Changing Servers
1360 @section Changing Servers
1361 @cindex changing servers
1363 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1364 This happens very rarely, but perhaps you change jobs, or one server is
1365 very flaky and you want to use another.
1367 Changing the server is pretty easy, right?  You just change
1368 @code{gnus-select-method} to point to the new server?
1370 @emph{Wrong!}
1372 Article numbers are not (in any way) kept synchronized between different
1373 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1374 you have read is by keeping track of article numbers.  So when you
1375 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1376 worthless.
1378 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1379 file from one server to another.  They all have one thing in
1380 common---they take a looong time to run.  You don't want to use these
1381 functions more than absolutely necessary.
1383 @kindex M-x gnus-change-server
1384 @findex gnus-change-server
1385 If you have access to both servers, Gnus can request the headers for all
1386 the articles you have read and compare @code{Message-ID}s and map the
1387 article numbers of the read articles and article marks.  The @kbd{M-x
1388 gnus-change-server} command will do this for all your native groups.  It
1389 will prompt for the method you want to move to.
1391 @kindex M-x gnus-group-move-group-to-server
1392 @findex gnus-group-move-group-to-server
1393 You can also move individual groups with the @kbd{M-x
1394 gnus-group-move-group-to-server} command.  This is useful if you want to
1395 move a (foreign) group from one server to another.
1397 @kindex M-x gnus-group-clear-data-on-native-groups
1398 @findex gnus-group-clear-data-on-native-groups
1399 If you don't have access to both the old and new server, all your marks
1400 and read ranges have become worthless.  You can use the @kbd{M-x
1401 gnus-group-clear-data-on-native-groups} command to clear out all data
1402 that you have on your native groups.  Use with caution.
1404 @kindex M-x gnus-group-clear-data
1405 @findex gnus-group-clear-data
1406 Clear the data from the current group only---nix out marks and the
1407 list of read articles (@code{gnus-group-clear-data}).
1409 After changing servers, you @strong{must} move the cache hierarchy away,
1410 since the cached articles will have wrong article numbers, which will
1411 affect which articles Gnus thinks are read.
1412 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1413 to have it done automatically; for @code{gnus-group-clear-data}, you
1414 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1415 cache for all groups).
1418 @node Startup Files
1419 @section Startup Files
1420 @cindex startup files
1421 @cindex .newsrc
1422 @cindex .newsrc.el
1423 @cindex .newsrc.eld
1425 Most common Unix news readers use a shared startup file called
1426 @file{.newsrc}.  This file contains all the information about what
1427 groups are subscribed, and which articles in these groups have been
1428 read.
1430 Things got a bit more complicated with @sc{gnus}.  In addition to
1431 keeping the @file{.newsrc} file updated, it also used a file called
1432 @file{.newsrc.el} for storing all the information that didn't fit into
1433 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1434 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1435 files was the most recently saved, which enabled people to swap between
1436 @sc{gnus} and other newsreaders.
1438 That was kinda silly, so Gnus went one better: In addition to the
1439 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1440 @file{.newsrc.eld}.  It will read whichever of these files that are most
1441 recent, but it will never write a @file{.newsrc.el} file.  You should
1442 never delete the @file{.newsrc.eld} file---it contains much information
1443 not stored in the @file{.newsrc} file.
1445 @vindex gnus-save-newsrc-file
1446 @vindex gnus-read-newsrc-file
1447 You can turn off writing the @file{.newsrc} file by setting
1448 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1449 the file and save some space, as well as exiting from Gnus faster.
1450 However, this will make it impossible to use other newsreaders than
1451 Gnus.  But hey, who would want to, right?  Similarly, setting
1452 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1453 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1454 convenient if you use a different news reader occasionally, and you
1455 want to read a different subset of the available groups with that
1456 news reader.
1458 @vindex gnus-save-killed-list
1459 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1460 will not save the list of killed groups to the startup file.  This will
1461 save both time (when starting and quitting) and space (on disk).  It
1462 will also mean that Gnus has no record of what groups are new or old,
1463 so the automatic new groups subscription methods become meaningless.
1464 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1465 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1466 Groups}).  This variable can also be a regular expression.  If that's
1467 the case, remove all groups that do not match this regexp before
1468 saving.  This can be useful in certain obscure situations that involve
1469 several servers where not all servers support @code{ask-server}.
1471 @vindex gnus-startup-file
1472 @vindex gnus-backup-startup-file
1473 @vindex version-control
1474 The @code{gnus-startup-file} variable says where the startup files are.
1475 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1476 file being whatever that one is, with a @samp{.eld} appended.
1477 If you want version control for this file, set
1478 @code{gnus-backup-startup-file}.  It respects the same values as the
1479 @code{version-control} variable.
1481 @vindex gnus-save-newsrc-hook
1482 @vindex gnus-save-quick-newsrc-hook
1483 @vindex gnus-save-standard-newsrc-hook
1484 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1485 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1486 saving the @file{.newsrc.eld} file, and
1487 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1488 @file{.newsrc} file.  The latter two are commonly used to turn version
1489 control on or off.  Version control is on by default when saving the
1490 startup files.  If you want to turn backup creation off, say something like:
1492 @lisp
1493 (defun turn-off-backup ()
1494   (set (make-local-variable 'backup-inhibited) t))
1496 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1497 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1498 @end lisp
1500 @vindex gnus-init-file
1501 @vindex gnus-site-init-file
1502 When Gnus starts, it will read the @code{gnus-site-init-file}
1503 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1504 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1505 and can be used to avoid cluttering your @file{~/.emacs} and
1506 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1507 with the same names as these, but with @file{.elc} and @file{.el}
1508 suffixes.  In other words, if you have set @code{gnus-init-file} to
1509 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1510 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1511 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1512 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1513 @code{gnus-init-file}.
1516 @node Auto Save
1517 @section Auto Save
1518 @cindex dribble file
1519 @cindex auto-save
1521 Whenever you do something that changes the Gnus data (reading articles,
1522 catching up, killing/subscribing groups), the change is added to a
1523 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1524 Emacs way.  If your Emacs should crash before you have saved the
1525 @file{.newsrc} files, all changes you have made can be recovered from
1526 this file.
1528 If Gnus detects this file at startup, it will ask the user whether to
1529 read it.  The auto save file is deleted whenever the real startup file is
1530 saved.
1532 @vindex gnus-use-dribble-file
1533 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1534 maintain a dribble buffer.  The default is @code{t}.
1536 @vindex gnus-dribble-directory
1537 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1538 this variable is @code{nil}, which it is by default, Gnus will dribble
1539 into the directory where the @file{.newsrc} file is located.  (This is
1540 normally the user's home directory.)  The dribble file will get the same
1541 file permissions as the @file{.newsrc} file.
1543 @vindex gnus-always-read-dribble-file
1544 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1545 read the dribble file on startup without querying the user.
1548 @node The Active File
1549 @section The Active File
1550 @cindex active file
1551 @cindex ignored groups
1553 When Gnus starts, or indeed whenever it tries to determine whether new
1554 articles have arrived, it reads the active file.  This is a very large
1555 file that lists all the active groups and articles on the server.
1557 @vindex gnus-ignored-newsgroups
1558 Before examining the active file, Gnus deletes all lines that match the
1559 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1560 any groups with bogus names, but you can use this variable to make Gnus
1561 ignore hierarchies you aren't ever interested in.  However, this is not
1562 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1563 Groups} for an overview of other variables that can be used instead.
1565 @c This variable is
1566 @c @code{nil} by default, and will slow down active file handling somewhat
1567 @c if you set it to anything else.
1569 @vindex gnus-read-active-file
1570 @c @head
1571 The active file can be rather Huge, so if you have a slow network, you
1572 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1573 reading the active file.  This variable is @code{some} by default.
1575 Gnus will try to make do by getting information just on the groups that
1576 you actually subscribe to.
1578 Note that if you subscribe to lots and lots of groups, setting this
1579 variable to @code{nil} will probably make Gnus slower, not faster.  At
1580 present, having this variable @code{nil} will slow Gnus down
1581 considerably, unless you read news over a 2400 baud modem.
1583 This variable can also have the value @code{some}.  Gnus will then
1584 attempt to read active info only on the subscribed groups.  On some
1585 servers this is quite fast (on sparkling, brand new INN servers that
1586 support the @code{LIST ACTIVE group} command), on others this isn't fast
1587 at all.  In any case, @code{some} should be faster than @code{nil}, and
1588 is certainly faster than @code{t} over slow lines.
1590 Some news servers (old versions of Leafnode and old versions of INN, for
1591 instance) do not support the @code{LIST ACTIVE group}.  For these
1592 servers, @code{nil} is probably the most efficient value for this
1593 variable.
1595 If this variable is @code{nil}, Gnus will ask for group info in total
1596 lock-step, which isn't very fast.  If it is @code{some} and you use an
1597 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1598 read all the replies in one swoop.  This will normally result in better
1599 performance, but if the server does not support the aforementioned
1600 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1602 If you think that starting up Gnus takes too long, try all the three
1603 different values for this variable and see what works best for you.
1605 In any case, if you use @code{some} or @code{nil}, you should definitely
1606 kill all groups that you aren't interested in to speed things up.
1608 Note that this variable also affects active file retrieval from
1609 secondary select methods.
1612 @node Startup Variables
1613 @section Startup Variables
1615 @table @code
1617 @item gnus-load-hook
1618 @vindex gnus-load-hook
1619 A hook run while Gnus is being loaded.  Note that this hook will
1620 normally be run just once in each Emacs session, no matter how many
1621 times you start Gnus.
1623 @item gnus-before-startup-hook
1624 @vindex gnus-before-startup-hook
1625 A hook run after starting up Gnus successfully.
1627 @item gnus-startup-hook
1628 @vindex gnus-startup-hook
1629 A hook run as the very last thing after starting up Gnus
1631 @item gnus-started-hook
1632 @vindex gnus-started-hook
1633 A hook that is run as the very last thing after starting up Gnus
1634 successfully.
1636 @item gnus-setup-news-hook
1637 @vindex gnus-setup-news-hook
1638 A hook that is run after reading the @file{.newsrc} file(s), but before
1639 generating the group buffer.
1641 @item gnus-check-bogus-newsgroups
1642 @vindex gnus-check-bogus-newsgroups
1643 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1644 startup.  A @dfn{bogus group} is a group that you have in your
1645 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1646 bogus groups can take quite a while, so to save time and resources it's
1647 best to leave this option off, and do the checking for bogus groups once
1648 in a while from the group buffer instead (@pxref{Group Maintenance}).
1650 @item gnus-inhibit-startup-message
1651 @vindex gnus-inhibit-startup-message
1652 If non-@code{nil}, the startup message won't be displayed.  That way,
1653 your boss might not notice as easily that you are reading news instead
1654 of doing your job.  Note that this variable is used before
1655 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1657 @item gnus-no-groups-message
1658 @vindex gnus-no-groups-message
1659 Message displayed by Gnus when no groups are available.
1661 @item gnus-play-startup-jingle
1662 @vindex gnus-play-startup-jingle
1663 If non-@code{nil}, play the Gnus jingle at startup.
1665 @item gnus-startup-jingle
1666 @vindex gnus-startup-jingle
1667 Jingle to be played if the above variable is non-@code{nil}.  The
1668 default is @samp{Tuxedomoon.Jingle4.au}.
1670 @end table
1673 @node Group Buffer
1674 @chapter Group Buffer
1675 @cindex group buffer
1677 @c Alex Schroeder suggests to rearrange this as follows:
1679 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1680 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1681 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1682 @c   7. Group Score, 8. Group Buffer Format
1683 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1684 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1685 @c <kensanata> First, "Gnus considers groups... (default 9)."
1686 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1687 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1688 @c <kensanata> Then expand the next paragraph or add some more to it.
1689 @c    This short one sentence explains levels 1 and 2, therefore I understand
1690 @c    that I should keep important news at 3 and boring news at 4.
1691 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1692 @c    Maybe keep those that you don't want to read temporarily at 6,
1693 @c    those that you never want to read at 8, those that offend your
1694 @c    human rights at 9...
1697 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1698 is the first buffer shown when Gnus starts, and will never be killed as
1699 long as Gnus is active.
1701 @iftex
1702 @iflatex
1703 \gnusfigure{The Group Buffer}{320}{
1704 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1705 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1706 \put(120,38){\vector(1,2){10}}
1707 \put(40,60){\makebox(0,0)[r]{Mode line}}
1708 \put(40,58){\vector(1,0){30}}
1709 \put(200,28){\makebox(0,0)[t]{Native select method}}
1710 \put(200,26){\vector(-1,2){15}}
1712 @end iflatex
1713 @end iftex
1715 @menu
1716 * Group Buffer Format::         Information listed and how you can change it.
1717 * Group Maneuvering::           Commands for moving in the group buffer.
1718 * Selecting a Group::           Actually reading news.
1719 * Subscription Commands::       Unsubscribing, killing, subscribing.
1720 * Group Data::                  Changing the info for a group.
1721 * Group Levels::                Levels? What are those, then?
1722 * Group Score::                 A mechanism for finding out what groups you like.
1723 * Marking Groups::              You can mark groups for later processing.
1724 * Foreign Groups::              Creating and editing groups.
1725 * Group Parameters::            Each group may have different parameters set.
1726 * Listing Groups::              Gnus can list various subsets of the groups.
1727 * Sorting Groups::              Re-arrange the group order.
1728 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1729 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1730 * Exiting Gnus::                Stop reading news and get some work done.
1731 * Group Topics::                A folding group mode divided into topics.
1732 * Non-ASCII Group Names::       Accessing groups of non-English names.
1733 * Searching::                   Mail search engines.
1734 * Misc Group Stuff::            Other stuff that you can to do.
1735 @end menu
1738 @node Group Buffer Format
1739 @section Group Buffer Format
1741 @menu
1742 * Group Line Specification::    Deciding how the group buffer is to look.
1743 * Group Mode Line Specification::  The group buffer mode line.
1744 * Group Highlighting::          Having nice colors in the group buffer.
1745 @end menu
1747 You can customize the Group Mode tool bar, see @kbd{M-x
1748 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1749 available in Emacs.
1751 The tool bar icons are now (de)activated correctly depending on the
1752 cursor position.  Therefore, moving around in the Group Buffer is
1753 slower.  You can disable this via the variable
1754 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1755 Emacs version.
1757 @node Group Line Specification
1758 @subsection Group Line Specification
1759 @cindex group buffer format
1761 The default format of the group buffer is nice and dull, but you can
1762 make it as exciting and ugly as you feel like.
1764 Here's a couple of example group lines:
1766 @example
1767      25: news.announce.newusers
1768  *    0: alt.fan.andrea-dworkin
1769 @end example
1771 Quite simple, huh?
1773 You can see that there are 25 unread articles in
1774 @samp{news.announce.newusers}.  There are no unread articles, but some
1775 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1776 asterisk at the beginning of the line?).
1778 @vindex gnus-group-line-format
1779 You can change that format to whatever you want by fiddling with the
1780 @code{gnus-group-line-format} variable.  This variable works along the
1781 lines of a @code{format} specification, which is pretty much the same as
1782 a @code{printf} specifications, for those of you who use (feh!) C.
1783 @xref{Formatting Variables}.
1785 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1787 There should always be a colon on the line; the cursor always moves to
1788 the colon after performing an operation.  @xref{Positioning
1789 Point}.  Nothing else is required---not even the group name.  All
1790 displayed text is just window dressing, and is never examined by Gnus.
1791 Gnus stores all real information it needs using text properties.
1793 (Note that if you make a really strange, wonderful, spreadsheet-like
1794 layout, everybody will believe you are hard at work with the accounting
1795 instead of wasting time reading news.)
1797 Here's a list of all available format characters:
1799 @table @samp
1801 @item M
1802 An asterisk if the group only has marked articles.
1804 @item S
1805 Whether the group is subscribed.
1807 @item L
1808 Level of subscribedness.
1810 @item N
1811 Number of unread articles.
1813 @item I
1814 Number of dormant articles.
1816 @item T
1817 Number of ticked articles.
1819 @item R
1820 Number of read articles.
1822 @item U
1823 Number of unseen articles.
1825 @item t
1826 Estimated total number of articles.  (This is really @var{max-number}
1827 minus @var{min-number} plus 1.)
1829 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1830 efficient access to @var{max-number} and @var{min-number} but getting
1831 the true unread message count is not possible efficiently.  For
1832 hysterical raisins, even the mail back ends, where the true number of
1833 unread messages might be available efficiently, use the same limited
1834 interface.  To remove this restriction from Gnus means that the back
1835 end interface has to be changed, which is not an easy job.
1837 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1838 compaction'' which circumvents this deficiency: the idea is to
1839 renumber all articles from 1, removing all gaps between numbers, hence
1840 getting a correct total count.  Other backends may support this in the
1841 future.  In order to keep your total article count relatively up to
1842 date, you might want to compact your groups (or even directly your
1843 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1845 @item y
1846 Number of unread, unticked, non-dormant articles.
1848 @item i
1849 Number of ticked and dormant articles.
1851 @item g
1852 Full group name.
1854 @item G
1855 Group name.
1857 @item C
1858 Group comment (@pxref{Group Parameters}) or group name if there is no
1859 comment element in the group parameters.
1861 @item D
1862 Newsgroup description.  You need to read the group descriptions
1863 before these will appear, and to do that, you either have to set
1864 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1865 command.
1867 @item o
1868 @samp{m} if moderated.
1870 @item O
1871 @samp{(m)} if moderated.
1873 @item s
1874 Select method.
1876 @item B
1877 If the summary buffer for the group is open or not.
1879 @item n
1880 Select from where.
1882 @item z
1883 A string that looks like @samp{<%s:%n>} if a foreign select method is
1884 used.
1886 @item P
1887 Indentation based on the level of the topic (@pxref{Group Topics}).
1889 @item c
1890 @vindex gnus-group-uncollapsed-levels
1891 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1892 variable says how many levels to leave at the end of the group name.
1893 The default is 1---this will mean that group names like
1894 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1896 @item m
1897 @vindex gnus-new-mail-mark
1898 @cindex %
1899 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1900 the group lately.
1902 @item p
1903 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1905 @item d
1906 A string that says when you last read the group (@pxref{Group
1907 Timestamp}).
1909 @item F
1910 The disk space used by the articles fetched by both the cache and
1911 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1912 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1913 of %7F is sufficient for a fixed-width column.
1915 @item u
1916 User defined specifier.  The next character in the format string should
1917 be a letter.  Gnus will call the function
1918 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1919 following @samp{%u}.  The function will be passed a single dummy
1920 parameter as argument.  The function should return a string, which will
1921 be inserted into the buffer just like information from any other
1922 specifier.
1923 @end table
1925 @cindex *
1926 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1927 if no info is available---for instance, if it is a non-activated foreign
1928 group, or a bogus native group.
1931 @node Group Mode Line Specification
1932 @subsection Group Mode Line Specification
1933 @cindex group mode line
1935 @vindex gnus-group-mode-line-format
1936 The mode line can be changed by setting
1937 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1938 doesn't understand that many format specifiers:
1940 @table @samp
1941 @item S
1942 The native news server.
1943 @item M
1944 The native select method.
1945 @end table
1948 @node Group Highlighting
1949 @subsection Group Highlighting
1950 @cindex highlighting
1951 @cindex group highlighting
1953 @vindex gnus-group-highlight
1954 Highlighting in the group buffer is controlled by the
1955 @code{gnus-group-highlight} variable.  This is an alist with elements
1956 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1957 something non-@code{nil}, the @var{face} will be used on the line.
1959 Here's an example value for this variable that might look nice if the
1960 background is dark:
1962 @lisp
1963 (cond (window-system
1964        (setq custom-background-mode 'light)
1965        (defface my-group-face-1
1966          '((t (:foreground "Red" :bold t))) "First group face")
1967        (defface my-group-face-2
1968          '((t (:foreground "DarkSeaGreen4" :bold t)))
1969          "Second group face")
1970        (defface my-group-face-3
1971          '((t (:foreground "Green4" :bold t))) "Third group face")
1972        (defface my-group-face-4
1973          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1974        (defface my-group-face-5
1975          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1977 (setq gnus-group-highlight
1978       '(((> unread 200) . my-group-face-1)
1979         ((and (< level 3) (zerop unread)) . my-group-face-2)
1980         ((< level 3) . my-group-face-3)
1981         ((zerop unread) . my-group-face-4)
1982         (t . my-group-face-5)))
1983 @end lisp
1985 Also @pxref{Faces and Fonts}.
1987 Variables that are dynamically bound when the forms are evaluated
1988 include:
1990 @table @code
1991 @item group
1992 The group name.
1993 @item unread
1994 The number of unread articles in the group.
1995 @item method
1996 The select method.
1997 @item mailp
1998 Whether the group is a mail group.
1999 @item level
2000 The level of the group.
2001 @item score
2002 The score of the group.
2003 @item ticked
2004 The number of ticked articles in the group.
2005 @item total
2006 The total number of articles in the group.  Or rather,
2007 @var{max-number} minus @var{min-number} plus one.
2008 @item topic
2009 When using the topic minor mode, this variable is bound to the current
2010 topic being inserted.
2011 @end table
2013 When the forms are @code{eval}ed, point is at the beginning of the line
2014 of the group in question, so you can use many of the normal Gnus
2015 functions for snarfing info on the group.
2017 @vindex gnus-group-update-hook
2018 @findex gnus-group-highlight-line
2019 @code{gnus-group-update-hook} is called when a group line is changed.
2020 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2021 calls @code{gnus-group-highlight-line} by default.
2024 @node Group Maneuvering
2025 @section Group Maneuvering
2026 @cindex group movement
2028 All movement commands understand the numeric prefix and will behave as
2029 expected, hopefully.
2031 @table @kbd
2033 @item n
2034 @kindex n (Group)
2035 @findex gnus-group-next-unread-group
2036 Go to the next group that has unread articles
2037 (@code{gnus-group-next-unread-group}).
2039 @item p
2040 @itemx DEL
2041 @kindex DEL (Group)
2042 @kindex p (Group)
2043 @findex gnus-group-prev-unread-group
2044 Go to the previous group that has unread articles
2045 (@code{gnus-group-prev-unread-group}).
2047 @item N
2048 @kindex N (Group)
2049 @findex gnus-group-next-group
2050 Go to the next group (@code{gnus-group-next-group}).
2052 @item P
2053 @kindex P (Group)
2054 @findex gnus-group-prev-group
2055 Go to the previous group (@code{gnus-group-prev-group}).
2057 @item M-n
2058 @kindex M-n (Group)
2059 @findex gnus-group-next-unread-group-same-level
2060 Go to the next unread group on the same (or lower) level
2061 (@code{gnus-group-next-unread-group-same-level}).
2063 @item M-p
2064 @kindex M-p (Group)
2065 @findex gnus-group-prev-unread-group-same-level
2066 Go to the previous unread group on the same (or lower) level
2067 (@code{gnus-group-prev-unread-group-same-level}).
2068 @end table
2070 Three commands for jumping to groups:
2072 @table @kbd
2074 @item j
2075 @kindex j (Group)
2076 @findex gnus-group-jump-to-group
2077 Jump to a group (and make it visible if it isn't already)
2078 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2079 like living groups.
2081 @item ,
2082 @kindex , (Group)
2083 @findex gnus-group-best-unread-group
2084 Jump to the unread group with the lowest level
2085 (@code{gnus-group-best-unread-group}).
2087 @item .
2088 @kindex . (Group)
2089 @findex gnus-group-first-unread-group
2090 Jump to the first group with unread articles
2091 (@code{gnus-group-first-unread-group}).
2092 @end table
2094 @vindex gnus-group-goto-unread
2095 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2096 commands will move to the next group, not the next unread group.  Even
2097 the commands that say they move to the next unread group.  The default
2098 is @code{t}.
2100 @vindex gnus-summary-next-group-on-exit
2101 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2102 exited, the point in the group buffer is moved to the next unread group.
2103 Otherwise, the point is set to the group just exited.  The default is
2104 @code{t}.
2106 @node Selecting a Group
2107 @section Selecting a Group
2108 @cindex group selection
2110 @table @kbd
2112 @item SPACE
2113 @kindex SPACE (Group)
2114 @findex gnus-group-read-group
2115 Select the current group, switch to the summary buffer and display the
2116 first unread article (@code{gnus-group-read-group}).  If there are no
2117 unread articles in the group, or if you give a non-numerical prefix to
2118 this command, Gnus will offer to fetch all the old articles in this
2119 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2120 determines the number of articles Gnus will fetch.  If @var{n} is
2121 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2122 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2124 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2125 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2126 - 4 2 SPC} fetches the 42 oldest ones.
2128 When you are in the group (in the Summary buffer), you can type
2129 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2130 ones.
2132 @item RET
2133 @kindex RET (Group)
2134 @findex gnus-group-select-group
2135 Select the current group and switch to the summary buffer
2136 (@code{gnus-group-select-group}).  Takes the same arguments as
2137 @code{gnus-group-read-group}---the only difference is that this command
2138 does not display the first unread article automatically upon group
2139 entry.
2141 @item M-RET
2142 @kindex M-RET (Group)
2143 @findex gnus-group-quick-select-group
2144 This does the same as the command above, but tries to do it with the
2145 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2146 scoring/killing will be performed, there will be no highlights and no
2147 expunging.  This might be useful if you're in a real hurry and have to
2148 enter some humongous group.  If you give a 0 prefix to this command
2149 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2150 which is useful if you want to toggle threading before generating the
2151 summary buffer (@pxref{Summary Generation Commands}).
2153 @item M-SPACE
2154 @kindex M-SPACE (Group)
2155 @findex gnus-group-visible-select-group
2156 This is yet one more command that does the same as the @kbd{RET}
2157 command, but this one does it without expunging and hiding dormants
2158 (@code{gnus-group-visible-select-group}).
2160 @item C-M-RET
2161 @kindex C-M-RET (Group)
2162 @findex gnus-group-select-group-ephemerally
2163 Finally, this command selects the current group ephemerally without
2164 doing any processing of its contents
2165 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2166 turned off.  Everything you do in the group after selecting it in this
2167 manner will have no permanent effects.
2169 @end table
2171 @vindex gnus-large-newsgroup
2172 The @code{gnus-large-newsgroup} variable says what Gnus should
2173 consider to be a big group.  If it is @code{nil}, no groups are
2174 considered big.  The default value is 200.  If the group has more
2175 (unread and/or ticked) articles than this, Gnus will query the user
2176 before entering the group.  The user can then specify how many
2177 articles should be fetched from the server.  If the user specifies a
2178 negative number (@var{-n}), the @var{n} oldest articles will be
2179 fetched.  If it is positive, the @var{n} articles that have arrived
2180 most recently will be fetched.
2182 @vindex gnus-large-ephemeral-newsgroup
2183 @code{gnus-large-ephemeral-newsgroup} is the same as
2184 @code{gnus-large-newsgroup}, but is only used for ephemeral
2185 newsgroups.
2187 @vindex gnus-newsgroup-maximum-articles
2188 In groups in some news servers, there might be a big gap between a few
2189 very old articles that will never be expired and the recent ones.  In
2190 such a case, the server will return the data like @code{(1 . 30000000)}
2191 for the @code{LIST ACTIVE group} command, for example.  Even if there
2192 are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
2193 know it at first and prepares for getting 30000000 articles.  However,
2194 it will consume hundreds megabytes of memories and might make Emacs get
2195 stuck as the case may be.  If you use such news servers, set the
2196 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2197 The value means that Gnus ignores articles other than this number of the
2198 latest ones in every group.  For instance, the value 10000 makes Gnus
2199 get only the articles 29990001-30000000 (if the latest article number is
2200 30000000 in a group).  Note that setting this variable to a number might
2201 prevent you from reading very old articles.  The default value of the
2202 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2203 means Gnus never ignores old articles.
2205 @vindex gnus-select-group-hook
2206 @vindex gnus-auto-select-first
2207 @vindex gnus-auto-select-subject
2208 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2209 automatically when entering a group with the @kbd{SPACE} command.
2210 Which article this is is controlled by the
2211 @code{gnus-auto-select-subject} variable.  Valid values for this
2212 variable are:
2214 @table @code
2216 @item unread
2217 Place point on the subject line of the first unread article.
2219 @item first
2220 Place point on the subject line of the first article.
2222 @item unseen
2223 Place point on the subject line of the first unseen article.
2225 @item unseen-or-unread
2226 Place point on the subject line of the first unseen article, and if
2227 there is no such article, place point on the subject line of the first
2228 unread article.
2230 @item best
2231 Place point on the subject line of the highest-scored unread article.
2233 @end table
2235 This variable can also be a function.  In that case, that function
2236 will be called to place point on a subject line.
2238 If you want to prevent automatic selection in some group (say, in a
2239 binary group with Huge articles) you can set the
2240 @code{gnus-auto-select-first} variable to @code{nil} in
2241 @code{gnus-select-group-hook}, which is called when a group is
2242 selected.
2245 @node Subscription Commands
2246 @section Subscription Commands
2247 @cindex subscription
2249 @table @kbd
2251 @item S t
2252 @itemx u
2253 @kindex S t (Group)
2254 @kindex u (Group)
2255 @findex gnus-group-unsubscribe-current-group
2256 @c @icon{gnus-group-unsubscribe}
2257 Toggle subscription to the current group
2258 (@code{gnus-group-unsubscribe-current-group}).
2260 @item S s
2261 @itemx U
2262 @kindex S s (Group)
2263 @kindex U (Group)
2264 @findex gnus-group-unsubscribe-group
2265 Prompt for a group to subscribe, and then subscribe it.  If it was
2266 subscribed already, unsubscribe it instead
2267 (@code{gnus-group-unsubscribe-group}).
2269 @item S k
2270 @itemx C-k
2271 @kindex S k (Group)
2272 @kindex C-k (Group)
2273 @findex gnus-group-kill-group
2274 @c @icon{gnus-group-kill-group}
2275 Kill the current group (@code{gnus-group-kill-group}).
2277 @item S y
2278 @itemx C-y
2279 @kindex S y (Group)
2280 @kindex C-y (Group)
2281 @findex gnus-group-yank-group
2282 Yank the last killed group (@code{gnus-group-yank-group}).
2284 @item C-x C-t
2285 @kindex C-x C-t (Group)
2286 @findex gnus-group-transpose-groups
2287 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2288 really a subscription command, but you can use it instead of a
2289 kill-and-yank sequence sometimes.
2291 @item S w
2292 @itemx C-w
2293 @kindex S w (Group)
2294 @kindex C-w (Group)
2295 @findex gnus-group-kill-region
2296 Kill all groups in the region (@code{gnus-group-kill-region}).
2298 @item S z
2299 @kindex S z (Group)
2300 @findex gnus-group-kill-all-zombies
2301 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2303 @item S C-k
2304 @kindex S C-k (Group)
2305 @findex gnus-group-kill-level
2306 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2307 These groups can't be yanked back after killing, so this command should
2308 be used with some caution.  The only time where this command comes in
2309 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2310 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2311 kill off all unsubscribed groups that do not have message numbers in the
2312 @file{.newsrc} file.
2314 @end table
2316 Also @pxref{Group Levels}.
2319 @node Group Data
2320 @section Group Data
2322 @table @kbd
2324 @item c
2325 @kindex c (Group)
2326 @findex gnus-group-catchup-current
2327 @vindex gnus-group-catchup-group-hook
2328 @c @icon{gnus-group-catchup-current}
2329 Mark all unticked articles in this group as read
2330 (@code{gnus-group-catchup-current}).
2331 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2332 the group buffer.
2334 @item C
2335 @kindex C (Group)
2336 @findex gnus-group-catchup-current-all
2337 Mark all articles in this group, even the ticked ones, as read
2338 (@code{gnus-group-catchup-current-all}).
2340 @item M-c
2341 @kindex M-c (Group)
2342 @findex gnus-group-clear-data
2343 Clear the data from the current group---nix out marks and the list of
2344 read articles (@code{gnus-group-clear-data}).
2346 @item M-x gnus-group-clear-data-on-native-groups
2347 @kindex M-x gnus-group-clear-data-on-native-groups
2348 @findex gnus-group-clear-data-on-native-groups
2349 If you have switched from one @acronym{NNTP} server to another, all your marks
2350 and read ranges have become worthless.  You can use this command to
2351 clear out all data that you have on your native groups.  Use with
2352 caution.
2354 @end table
2357 @node Group Levels
2358 @section Group Levels
2359 @cindex group level
2360 @cindex level
2362 All groups have a level of @dfn{subscribedness}.  For instance, if a
2363 group is on level 2, it is more subscribed than a group on level 5.  You
2364 can ask Gnus to just list groups on a given level or lower
2365 (@pxref{Listing Groups}), or to just check for new articles in groups on
2366 a given level or lower (@pxref{Scanning New Messages}).
2368 Remember:  The higher the level of the group, the less important it is.
2370 @table @kbd
2372 @item S l
2373 @kindex S l (Group)
2374 @findex gnus-group-set-current-level
2375 Set the level of the current group.  If a numeric prefix is given, the
2376 next @var{n} groups will have their levels set.  The user will be
2377 prompted for a level.
2378 @end table
2380 @vindex gnus-level-killed
2381 @vindex gnus-level-zombie
2382 @vindex gnus-level-unsubscribed
2383 @vindex gnus-level-subscribed
2384 Gnus considers groups from levels 1 to
2385 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2386 @code{gnus-level-subscribed} (exclusive) and
2387 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2388 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2389 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2390 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2391 same, but zombie and killed groups have no information on what articles
2392 you have read, etc, stored.  This distinction between dead and living
2393 groups isn't done because it is nice or clever, it is done purely for
2394 reasons of efficiency.
2396 It is recommended that you keep all your mail groups (if any) on quite
2397 low levels (e.g. 1 or 2).
2399 Maybe the following description of the default behavior of Gnus helps to
2400 understand what these levels are all about.  By default, Gnus shows you
2401 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2402 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2403 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2404 groups are hidden, in a way.
2406 Zombie and killed groups are similar to unsubscribed groups in that they
2407 are hidden by default.  But they are different from subscribed and
2408 unsubscribed groups in that Gnus doesn't ask the news server for
2409 information (number of messages, number of unread messages) on zombie
2410 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2411 aren't interested in.  If most groups are killed, Gnus is faster.
2413 Why does Gnus distinguish between zombie and killed groups?  Well, when
2414 a new group arrives on the server, Gnus by default makes it a zombie
2415 group.  This means that you are normally not bothered with new groups,
2416 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2417 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2418 list of killed groups.)
2420 If you want to play with the level variables, you should show some care.
2421 Set them once, and don't touch them ever again.  Better yet, don't touch
2422 them at all unless you know exactly what you're doing.
2424 @vindex gnus-level-default-unsubscribed
2425 @vindex gnus-level-default-subscribed
2426 Two closely related variables are @code{gnus-level-default-subscribed}
2427 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2428 which are the levels that new groups will be put on if they are
2429 (un)subscribed.  These two variables should, of course, be inside the
2430 relevant valid ranges.
2432 @vindex gnus-keep-same-level
2433 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2434 will only move to groups of the same level (or lower).  In
2435 particular, going from the last article in one group to the next group
2436 will go to the next group of the same level (or lower).  This might be
2437 handy if you want to read the most important groups before you read the
2438 rest.
2440 If this variable is @code{best}, Gnus will make the next newsgroup the
2441 one with the best level.
2443 @vindex gnus-group-default-list-level
2444 All groups with a level less than or equal to
2445 @code{gnus-group-default-list-level} will be listed in the group buffer
2446 by default.
2448 @vindex gnus-group-list-inactive-groups
2449 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2450 groups will be listed along with the unread groups.  This variable is
2451 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2452 listed.
2454 @vindex gnus-group-use-permanent-levels
2455 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2456 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2457 use this level as the ``work'' level.
2459 @vindex gnus-activate-level
2460 Gnus will normally just activate (i. e., query the server about) groups
2461 on level @code{gnus-activate-level} or less.  If you don't want to
2462 activate unsubscribed groups, for instance, you might set this variable
2463 to 5.  The default is 6.
2466 @node Group Score
2467 @section Group Score
2468 @cindex group score
2469 @cindex group rank
2470 @cindex rank
2472 You would normally keep important groups on high levels, but that scheme
2473 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2474 group buffer according to how often you read groups, perhaps?  Within
2475 reason?
2477 This is what @dfn{group score} is for.  You can have Gnus assign a score
2478 to each group through the mechanism described below.  You can then sort
2479 the group buffer based on this score.  Alternatively, you can sort on
2480 score and then level.  (Taken together, the level and the score is
2481 called the @dfn{rank} of the group.  A group that is on level 4 and has
2482 a score of 1 has a higher rank than a group on level 5 that has a score
2483 of 300.  (The level is the most significant part and the score is the
2484 least significant part.))
2486 @findex gnus-summary-bubble-group
2487 If you want groups you read often to get higher scores than groups you
2488 read seldom you can add the @code{gnus-summary-bubble-group} function to
2489 the @code{gnus-summary-exit-hook} hook.  This will result (after
2490 sorting) in a bubbling sort of action.  If you want to see that in
2491 action after each summary exit, you can add
2492 @code{gnus-group-sort-groups-by-rank} or
2493 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2494 slow things down somewhat.
2497 @node Marking Groups
2498 @section Marking Groups
2499 @cindex marking groups
2501 If you want to perform some command on several groups, and they appear
2502 subsequently in the group buffer, you would normally just give a
2503 numerical prefix to the command.  Most group commands will then do your
2504 bidding on those groups.
2506 However, if the groups are not in sequential order, you can still
2507 perform a command on several groups.  You simply mark the groups first
2508 with the process mark and then execute the command.
2510 @table @kbd
2512 @item #
2513 @kindex # (Group)
2514 @itemx M m
2515 @kindex M m (Group)
2516 @findex gnus-group-mark-group
2517 Set the mark on the current group (@code{gnus-group-mark-group}).
2519 @item M-#
2520 @kindex M-# (Group)
2521 @itemx M u
2522 @kindex M u (Group)
2523 @findex gnus-group-unmark-group
2524 Remove the mark from the current group
2525 (@code{gnus-group-unmark-group}).
2527 @item M U
2528 @kindex M U (Group)
2529 @findex gnus-group-unmark-all-groups
2530 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2532 @item M w
2533 @kindex M w (Group)
2534 @findex gnus-group-mark-region
2535 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2537 @item M b
2538 @kindex M b (Group)
2539 @findex gnus-group-mark-buffer
2540 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2542 @item M r
2543 @kindex M r (Group)
2544 @findex gnus-group-mark-regexp
2545 Mark all groups that match some regular expression
2546 (@code{gnus-group-mark-regexp}).
2547 @end table
2549 Also @pxref{Process/Prefix}.
2551 @findex gnus-group-universal-argument
2552 If you want to execute some command on all groups that have been marked
2553 with the process mark, you can use the @kbd{M-&}
2554 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2555 the command to be executed.
2558 @node Foreign Groups
2559 @section Foreign Groups
2560 @cindex foreign groups
2562 Below are some group mode commands for making and editing general foreign
2563 groups, as well as commands to ease the creation of a few
2564 special-purpose groups.  All these commands insert the newly created
2565 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2566 consulted.
2568 Changes from the group editing commands are stored in
2569 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2570 variable @code{gnus-parameters}, @xref{Group Parameters}.
2572 @table @kbd
2574 @item G m
2575 @kindex G m (Group)
2576 @findex gnus-group-make-group
2577 @cindex making groups
2578 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2579 for a name, a method and possibly an @dfn{address}.  For an easier way
2580 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2582 @item G M
2583 @kindex G M (Group)
2584 @findex gnus-group-read-ephemeral-group
2585 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2586 will prompt you for a name, a method and an @dfn{address}.
2588 @item G r
2589 @kindex G r (Group)
2590 @findex gnus-group-rename-group
2591 @cindex renaming groups
2592 Rename the current group to something else
2593 (@code{gnus-group-rename-group}).  This is valid only on some
2594 groups---mail groups mostly.  This command might very well be quite slow
2595 on some back ends.
2597 @item G c
2598 @kindex G c (Group)
2599 @cindex customizing
2600 @findex gnus-group-customize
2601 Customize the group parameters (@code{gnus-group-customize}).
2603 @item G e
2604 @kindex G e (Group)
2605 @findex gnus-group-edit-group-method
2606 @cindex renaming groups
2607 Enter a buffer where you can edit the select method of the current
2608 group (@code{gnus-group-edit-group-method}).
2610 @item G p
2611 @kindex G p (Group)
2612 @findex gnus-group-edit-group-parameters
2613 Enter a buffer where you can edit the group parameters
2614 (@code{gnus-group-edit-group-parameters}).
2616 @item G E
2617 @kindex G E (Group)
2618 @findex gnus-group-edit-group
2619 Enter a buffer where you can edit the group info
2620 (@code{gnus-group-edit-group}).
2622 @item G d
2623 @kindex G d (Group)
2624 @findex gnus-group-make-directory-group
2625 @cindex nndir
2626 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2627 for a directory name (@code{gnus-group-make-directory-group}).
2629 @item G h
2630 @kindex G h (Group)
2631 @cindex help group
2632 @findex gnus-group-make-help-group
2633 Make the Gnus help group (@code{gnus-group-make-help-group}).
2635 @item G a
2636 @kindex G a (Group)
2637 @cindex (ding) archive
2638 @cindex archive group
2639 @findex gnus-group-make-archive-group
2640 @vindex gnus-group-archive-directory
2641 @vindex gnus-group-recent-archive-directory
2642 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2643 default a group pointing to the most recent articles will be created
2644 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2645 group will be created from @code{gnus-group-archive-directory}.
2647 @item G k
2648 @kindex G k (Group)
2649 @findex gnus-group-make-kiboze-group
2650 @cindex nnkiboze
2651 Make a kiboze group.  You will be prompted for a name, for a regexp to
2652 match groups to be ``included'' in the kiboze group, and a series of
2653 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2654 @xref{Kibozed Groups}.
2656 @item G D
2657 @kindex G D (Group)
2658 @findex gnus-group-enter-directory
2659 @cindex nneething
2660 Read an arbitrary directory as if it were a newsgroup with the
2661 @code{nneething} back end (@code{gnus-group-enter-directory}).
2662 @xref{Anything Groups}.
2664 @item G f
2665 @kindex G f (Group)
2666 @findex gnus-group-make-doc-group
2667 @cindex ClariNet Briefs
2668 @cindex nndoc
2669 Make a group based on some file or other
2670 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2671 command, you will be prompted for a file name and a file type.
2672 Currently supported types are @code{mbox}, @code{babyl},
2673 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2674 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2675 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2676 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2677 you run this command without a prefix, Gnus will guess at the file
2678 type.  @xref{Document Groups}.
2680 @item G u
2681 @kindex G u (Group)
2682 @vindex gnus-useful-groups
2683 @findex gnus-group-make-useful-group
2684 Create one of the groups mentioned in @code{gnus-useful-groups}
2685 (@code{gnus-group-make-useful-group}).
2687 @item G w
2688 @kindex G w (Group)
2689 @findex gnus-group-make-web-group
2690 @cindex Google
2691 @cindex nnweb
2692 @cindex gmane
2693 Make an ephemeral group based on a web search
2694 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2695 command, make a solid group instead.  You will be prompted for the
2696 search engine type and the search string.  Valid search engine types
2697 include @code{google}, @code{dejanews}, and @code{gmane}.
2698 @xref{Web Searches}.
2700 If you use the @code{google} search engine, you can limit the search
2701 to a particular group by using a match string like
2702 @samp{shaving group:alt.sysadmin.recovery}.
2704 @item G R
2705 @kindex G R (Group)
2706 @findex gnus-group-make-rss-group
2707 Make a group based on an @acronym{RSS} feed
2708 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2709 @xref{RSS}.
2711 @item G DEL
2712 @kindex G DEL (Group)
2713 @findex gnus-group-delete-group
2714 This function will delete the current group
2715 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2716 actually delete all the articles in the group, and forcibly remove the
2717 group itself from the face of the Earth.  Use a prefix only if you are
2718 absolutely sure of what you are doing.  This command can't be used on
2719 read-only groups (like @code{nntp} groups), though.
2721 @item G V
2722 @kindex G V (Group)
2723 @findex gnus-group-make-empty-virtual
2724 Make a new, fresh, empty @code{nnvirtual} group
2725 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2727 @item G v
2728 @kindex G v (Group)
2729 @findex gnus-group-add-to-virtual
2730 Add the current group to an @code{nnvirtual} group
2731 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2732 @end table
2734 @xref{Select Methods}, for more information on the various select
2735 methods.
2737 @vindex gnus-activate-foreign-newsgroups
2738 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2739 Gnus will check all foreign groups with this level or lower at startup.
2740 This might take quite a while, especially if you subscribe to lots of
2741 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2742 @code{gnus-activate-level} also affects activation of foreign
2743 newsgroups.
2746 The following commands create ephemeral groups.  They can be called not
2747 only from the Group buffer, but in any Gnus buffer.
2749 @table @code
2750 @item gnus-read-ephemeral-gmane-group
2751 @findex gnus-read-ephemeral-gmane-group
2752 @vindex gnus-gmane-group-download-format
2753 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2754 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2755 Gnus will prompt you for a group name, the start article number and an
2756 the article range.
2758 @item gnus-read-ephemeral-gmane-group-url
2759 @findex gnus-read-ephemeral-gmane-group-url
2760 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2761 the group name and the article number and range are constructed from a
2762 given @acronym{URL}.  Supported @acronym{URL} formats include e.g.
2763 @url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2764 @url{http://thread.gmane.org/gmane.foo.bar/12345/},
2765 @url{http://article.gmane.org/gmane.foo.bar/12345/},
2766 @url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2767 @url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2769 @item gnus-read-ephemeral-emacs-bug-group
2770 @findex gnus-read-ephemeral-emacs-bug-group
2771 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2772 bug number.  The default is the number at point.  The @acronym{URL} is
2773 specified in @code{gnus-bug-group-download-format-alist}.
2775 @item gnus-read-ephemeral-debian-bug-group
2776 @findex gnus-read-ephemeral-debian-bug-group
2777 Read a Debian bug report in an ephemeral group.  Analog to
2778 @code{gnus-read-ephemeral-emacs-bug-group}.
2779 @end table
2781 Some of these command are also useful for article buttons, @xref{Article
2782 Buttons}.
2784 Here is an example:
2785 @lisp
2786 (require 'gnus-art)
2787 (add-to-list
2788  'gnus-button-alist
2789  '("#\\([0-9]+\\)\\>" 1
2790    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2791    gnus-read-ephemeral-emacs-bug-group 1))
2792 @end lisp
2795 @node Group Parameters
2796 @section Group Parameters
2797 @cindex group parameters
2799 The group parameters store information local to a particular group.
2801 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2802 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2803 presents you with a Customize-like interface.  The latter helps avoid
2804 silly Lisp errors.)  You might also be interested in reading about topic
2805 parameters (@pxref{Topic Parameters}).
2806 Additionally, you can set group parameters via the
2807 @code{gnus-parameters} variable, see below.
2809 Here's an example group parameter list:
2811 @example
2812 ((to-address . "ding@@gnus.org")
2813  (auto-expire . t))
2814 @end example
2816 We see that each element consists of a ``dotted pair''---the thing before
2817 the dot is the key, while the thing after the dot is the value.  All the
2818 parameters have this form @emph{except} local variable specs, which are
2819 not dotted pairs, but proper lists.
2821 Some parameters have correspondent customizable variables, each of which
2822 is an alist of regexps and values.
2824 The following group parameters can be used:
2826 @table @code
2827 @item to-address
2828 @cindex to-address
2829 Address used by when doing followups and new posts.
2831 @example
2832 (to-address . "some@@where.com")
2833 @end example
2835 This is primarily useful in mail groups that represent closed mailing
2836 lists---mailing lists where it's expected that everybody that writes to
2837 the mailing list is subscribed to it.  Since using this parameter
2838 ensures that the mail only goes to the mailing list itself, it means
2839 that members won't receive two copies of your followups.
2841 Using @code{to-address} will actually work whether the group is foreign
2842 or not.  Let's say there's a group on the server that is called
2843 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2844 the articles from a mail-to-news gateway.  Posting directly to this
2845 group is therefore impossible---you have to send mail to the mailing
2846 list address instead.
2848 See also @code{gnus-parameter-to-address-alist}.
2850 @item to-list
2851 @cindex to-list
2852 Address used when doing @kbd{a} in that group.
2854 @example
2855 (to-list . "some@@where.com")
2856 @end example
2858 It is totally ignored
2859 when doing a followup---except that if it is present in a news group,
2860 you'll get mail group semantics when doing @kbd{f}.
2862 If you do an @kbd{a} command in a mail group and you have neither a
2863 @code{to-list} group parameter nor a @code{to-address} group parameter,
2864 then a @code{to-list} group parameter will be added automatically upon
2865 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2866 @vindex gnus-add-to-list
2868 @findex gnus-mailing-list-mode
2869 @cindex mail list groups
2870 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2871 entering summary buffer.
2873 See also @code{gnus-parameter-to-list-alist}.
2875 @anchor{subscribed}
2876 @item subscribed
2877 @cindex subscribed
2878 @cindex Mail-Followup-To
2879 @findex gnus-find-subscribed-addresses
2880 If this parameter is set to @code{t}, Gnus will consider the
2881 to-address and to-list parameters for this group as addresses of
2882 mailing lists you are subscribed to.  Giving Gnus this information is
2883 (only) a first step in getting it to generate correct Mail-Followup-To
2884 headers for your posts to these lists.  The second step is to put the
2885 following in your @file{.gnus.el}
2887 @lisp
2888 (setq message-subscribed-address-functions
2889       '(gnus-find-subscribed-addresses))
2890 @end lisp
2892 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2893 a complete treatment of available MFT support.
2895 @item visible
2896 @cindex visible
2897 If the group parameter list has the element @code{(visible . t)},
2898 that group will always be visible in the Group buffer, regardless
2899 of whether it has any unread articles.
2901 This parameter cannot be set via @code{gnus-parameters}. See
2902 @code{gnus-permanently-visible-groups} as an alternative.
2904 @item broken-reply-to
2905 @cindex broken-reply-to
2906 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2907 headers in this group are to be ignored, and for the header to be hidden
2908 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2909 can be useful if you're reading a mailing list group where the listserv
2910 has inserted @code{Reply-To} headers that point back to the listserv
2911 itself.  That is broken behavior.  So there!
2913 @item to-group
2914 @cindex to-group
2915 Elements like @code{(to-group . "some.group.name")} means that all
2916 posts in that group will be sent to @code{some.group.name}.
2918 @item newsgroup
2919 @cindex newsgroup
2920 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2921 will treat all responses as if they were responses to news articles.
2922 This can be useful if you have a mail group that's really a mirror of a
2923 news group.
2925 @item gcc-self
2926 @cindex gcc-self
2927 If @code{(gcc-self . t)} is present in the group parameter list, newly
2928 composed messages will be @code{Gcc}'d to the current group.  If
2929 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2930 generated, if @code{(gcc-self . "string")} is present, this string will
2931 be inserted literally as a @code{gcc} header.  This parameter takes
2932 precedence over any default @code{Gcc} rules as described later
2933 (@pxref{Archived Messages}).
2935 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2936 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2937 doesn't accept articles.
2939 @item auto-expire
2940 @cindex auto-expire
2941 @cindex expiring mail
2942 If the group parameter has an element that looks like @code{(auto-expire
2943 . t)}, all articles read will be marked as expirable.  For an
2944 alternative approach, @pxref{Expiring Mail}.
2946 See also @code{gnus-auto-expirable-newsgroups}.
2948 @item total-expire
2949 @cindex total-expire
2950 @cindex expiring mail
2951 If the group parameter has an element that looks like
2952 @code{(total-expire . t)}, all read articles will be put through the
2953 expiry process, even if they are not marked as expirable.  Use with
2954 caution.  Unread, ticked and dormant articles are not eligible for
2955 expiry.
2957 See also @code{gnus-total-expirable-newsgroups}.
2959 @item expiry-wait
2960 @cindex expiry-wait
2961 @vindex nnmail-expiry-wait-function
2962 If the group parameter has an element that looks like
2963 @code{(expiry-wait . 10)}, this value will override any
2964 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2965 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2966 can either be a number of days (not necessarily an integer) or the
2967 symbols @code{never} or @code{immediate}.
2969 @item expiry-target
2970 @cindex expiry-target
2971 Where expired messages end up.  This parameter overrides
2972 @code{nnmail-expiry-target}.
2974 @item score-file
2975 @cindex score file group parameter
2976 Elements that look like @code{(score-file . "file")} will make
2977 @file{file} into the current score file for the group in question.  All
2978 interactive score entries will be put into this file.
2980 @item adapt-file
2981 @cindex adapt file group parameter
2982 Elements that look like @code{(adapt-file . "file")} will make
2983 @file{file} into the current adaptive file for the group in question.
2984 All adaptive score entries will be put into this file.
2986 @item admin-address
2987 @cindex admin-address
2988 When unsubscribing from a mailing list you should never send the
2989 unsubscription notice to the mailing list itself.  Instead, you'd send
2990 messages to the administrative address.  This parameter allows you to
2991 put the admin address somewhere convenient.
2993 @item display
2994 @cindex display
2995 Elements that look like @code{(display . MODE)} say which articles to
2996 display on entering the group.  Valid values are:
2998 @table @code
2999 @item all
3000 Display all articles, both read and unread.
3002 @item an integer
3003 Display the last @var{integer} articles in the group.  This is the same as
3004 entering the group with @kbd{C-u @var{integer}}.
3006 @item default
3007 Display the default visible articles, which normally includes unread and
3008 ticked articles.
3010 @item an array
3011 Display articles that satisfy a predicate.
3013 Here are some examples:
3015 @table @code
3016 @item [unread]
3017 Display only unread articles.
3019 @item [not expire]
3020 Display everything except expirable articles.
3022 @item [and (not reply) (not expire)]
3023 Display everything except expirable and articles you've already
3024 responded to.
3025 @end table
3027 The available operators are @code{not}, @code{and} and @code{or}.
3028 Predicates include @code{tick}, @code{unsend}, @code{undownload},
3029 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
3030 @code{killed}, @code{bookmark}, @code{score}, @code{save},
3031 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
3033 @end table
3035 The @code{display} parameter works by limiting the summary buffer to
3036 the subset specified.  You can pop the limit by using the @kbd{/ w}
3037 command (@pxref{Limiting}).
3039 @item comment
3040 @cindex comment
3041 Elements that look like @code{(comment . "This is a comment")} are
3042 arbitrary comments on the group.  You can display comments in the
3043 group line (@pxref{Group Line Specification}).
3045 @item charset
3046 @cindex charset
3047 Elements that look like @code{(charset . iso-8859-1)} will make
3048 @code{iso-8859-1} the default charset; that is, the charset that will be
3049 used for all articles that do not specify a charset.
3051 See also @code{gnus-group-charset-alist}.
3053 @item ignored-charsets
3054 @cindex ignored-charset
3055 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3056 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3057 default charset will be used for decoding articles.
3059 See also @code{gnus-group-ignored-charsets-alist}.
3061 @item posting-style
3062 @cindex posting-style
3063 You can store additional posting style information for this group
3064 here (@pxref{Posting Styles}).  The format is that of an entry in the
3065 @code{gnus-posting-styles} alist, except that there's no regexp matching
3066 the group name (of course).  Style elements in this group parameter will
3067 take precedence over the ones found in @code{gnus-posting-styles}.
3069 For instance, if you want a funky name and signature in this group only,
3070 instead of hacking @code{gnus-posting-styles}, you could put something
3071 like this in the group parameters:
3073 @example
3074 (posting-style
3075   (name "Funky Name")
3076   ("X-My-Header" "Funky Value")
3077   (signature "Funky Signature"))
3078 @end example
3080 If you're using topics to organize your group buffer
3081 (@pxref{Group Topics}), note that posting styles can also be set in
3082 the topics parameters. Posting styles in topic parameters apply to all
3083 groups in this topic. More precisely, the posting-style settings for a
3084 group result from the hierarchical merging of all posting-style
3085 entries in the parameters of this group and all the topics it belongs
3089 @item post-method
3090 @cindex post-method
3091 If it is set, the value is used as the method for posting message
3092 instead of @code{gnus-post-method}.
3094 @item mail-source
3095 @cindex mail-source
3096 If it is set, and the setting of @code{mail-sources} includes a
3097 @code{group} mail source (@pxref{Mail Sources}), the value is a
3098 mail source for this group.
3100 @item banner
3101 @cindex banner
3102 An item like @code{(banner . @var{regexp})} causes any part of an article
3103 that matches the regular expression @var{regexp} to be stripped.  Instead of
3104 @var{regexp}, you can also use the symbol @code{signature} which strips the
3105 last signature or any of the elements of the alist
3106 @code{gnus-article-banner-alist}.
3108 @item sieve
3109 @cindex sieve
3110 This parameter contains a Sieve test that should match incoming mail
3111 that should be placed in this group.  From this group parameter, a
3112 Sieve @samp{IF} control structure is generated, having the test as the
3113 condition and @samp{fileinto "group.name";} as the body.
3115 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3116 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3117 translating the group parameter into a Sieve script (@pxref{Sieve
3118 Commands}) the following Sieve code is generated:
3120 @example
3121 if address "sender" "sieve-admin@@extundo.com" @{
3122         fileinto "INBOX.list.sieve";
3124 @end example
3126 To generate tests for multiple email-addresses use a group parameter
3127 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3128 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3129 like the following is generated:
3131 @example
3132 if address "sender" ["name@@one.org", "else@@two.org"] @{
3133         fileinto "INBOX.list.sieve";
3135 @end example
3137 See @pxref{Sieve Commands} for commands and variables that might be of
3138 interest in relation to the sieve parameter.
3140 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3141 Top, sieve, Emacs Sieve}.
3143 @item (agent parameters)
3144 If the agent has been enabled, you can set any of the its parameters
3145 to control the behavior of the agent in individual groups. See Agent
3146 Parameters in @ref{Category Syntax}.  Most users will choose to set
3147 agent parameters in either an agent category or group topic to
3148 minimize the configuration effort.
3150 @item (@var{variable} @var{form})
3151 You can use the group parameters to set variables local to the group you
3152 are entering.  If you want to turn threading off in @samp{news.answers},
3153 you could put @code{(gnus-show-threads nil)} in the group parameters of
3154 that group.  @code{gnus-show-threads} will be made into a local variable
3155 in the summary buffer you enter, and the form @code{nil} will be
3156 @code{eval}ed there.
3158 Note that this feature sets the variable locally to the summary buffer.
3159 But some variables are evaluated in the article buffer, or in the
3160 message buffer (of a reply or followup or otherwise newly created
3161 message).  As a workaround, it might help to add the variable in
3162 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3163 Stuff}.  So if you want to set @code{message-from-style} via the group
3164 parameters, then you may need the following statement elsewhere in your
3165 @file{~/.gnus.el} file:
3167 @lisp
3168 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3169 @end lisp
3171 @vindex gnus-list-identifiers
3172 A use for this feature is to remove a mailing list identifier tag in
3173 the subject fields of articles.  E.g. if the news group
3175 @example
3176 nntp+news.gnus.org:gmane.text.docbook.apps
3177 @end example
3179 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3180 tag can be removed from the article subjects in the summary buffer for
3181 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3182 into the group parameters for the group.
3184 This can also be used as a group-specific hook function.  If you want to
3185 hear a beep when you enter a group, you could put something like
3186 @code{(dummy-variable (ding))} in the parameters of that group.
3187 @code{dummy-variable} will be set to the (meaningless) result of the
3188 @code{(ding)} form.
3190 Alternatively, since the VARIABLE becomes local to the group, this
3191 pattern can be used to temporarily change a hook.  For example, if the
3192 following is added to a group parameter
3194 @lisp
3195 (gnus-summary-prepared-hook
3196   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3197 @end lisp
3199 when the group is entered, the 'd' key will not mark the article as
3200 expired.
3202 @end table
3204 @vindex gnus-parameters
3205 Group parameters can be set via the @code{gnus-parameters} variable too.
3206 But some variables, such as @code{visible}, have no effect (For this
3207 case see @code{gnus-permanently-visible-groups} as an alternative.).
3208 For example:
3210 @lisp
3211 (setq gnus-parameters
3212       '(("mail\\..*"
3213          (gnus-show-threads nil)
3214          (gnus-use-scoring nil)
3215          (gnus-summary-line-format
3216           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3217          (gcc-self . t)
3218          (display . all))
3220         ("^nnimap:\\(foo.bar\\)$"
3221          (to-group . "\\1"))
3223         ("mail\\.me"
3224          (gnus-use-scoring  t))
3226         ("list\\..*"
3227          (total-expire . t)
3228          (broken-reply-to . t))))
3229 @end lisp
3231 String value of parameters will be subjected to regexp substitution, as
3232 the @code{to-group} example shows.
3234 @vindex gnus-parameters-case-fold-search
3235 By default, whether comparing the group name and one of those regexps
3236 specified in @code{gnus-parameters} is done in a case-sensitive manner
3237 or a case-insensitive manner depends on the value of
3238 @code{case-fold-search} at the time when the comparison is done.  The
3239 value of @code{case-fold-search} is typically @code{t}; it means, for
3240 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3241 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3242 group.  If you want to make those regexps always case-sensitive, set the
3243 value of the @code{gnus-parameters-case-fold-search} variable to
3244 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3245 always in a case-insensitive manner.
3247 You can define different sorting to different groups via
3248 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3249 group by reverse date to see the latest news at the top and an
3250 @acronym{RSS} group by subject.  In this example, the first group is the
3251 Debian daily news group @code{gmane.linux.debian.user.news} from
3252 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3253 weekly news RSS feed
3254 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3255 @xref{RSS}.
3257 @lisp
3258 (setq
3259  gnus-parameters
3260  '(("nntp.*gmane\\.debian\\.user\\.news"
3261     (gnus-show-threads nil)
3262     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3263     (gnus-use-adaptive-scoring nil)
3264     (gnus-use-scoring nil))
3265    ("nnrss.*debian"
3266     (gnus-show-threads nil)
3267     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3268     (gnus-use-adaptive-scoring nil)
3269     (gnus-use-scoring t)
3270     (gnus-score-find-score-files-function 'gnus-score-find-single)
3271     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3272 @end lisp
3275 @node Listing Groups
3276 @section Listing Groups
3277 @cindex group listing
3279 These commands all list various slices of the groups available.
3281 @table @kbd
3283 @item l
3284 @itemx A s
3285 @kindex A s (Group)
3286 @kindex l (Group)
3287 @findex gnus-group-list-groups
3288 List all groups that have unread articles
3289 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3290 command will list only groups of level ARG and lower.  By default, it
3291 only lists groups of level five (i.e.,
3292 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3293 groups).
3295 @item L
3296 @itemx A u
3297 @kindex A u (Group)
3298 @kindex L (Group)
3299 @findex gnus-group-list-all-groups
3300 List all groups, whether they have unread articles or not
3301 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3302 this command will list only groups of level ARG and lower.  By default,
3303 it lists groups of level seven or lower (i.e., just subscribed and
3304 unsubscribed groups).
3306 @item A l
3307 @kindex A l (Group)
3308 @findex gnus-group-list-level
3309 List all unread groups on a specific level
3310 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3311 with no unread articles.
3313 @item A k
3314 @kindex A k (Group)
3315 @findex gnus-group-list-killed
3316 List all killed groups (@code{gnus-group-list-killed}).  If given a
3317 prefix argument, really list all groups that are available, but aren't
3318 currently (un)subscribed.  This could entail reading the active file
3319 from the server.
3321 @item A z
3322 @kindex A z (Group)
3323 @findex gnus-group-list-zombies
3324 List all zombie groups (@code{gnus-group-list-zombies}).
3326 @item A m
3327 @kindex A m (Group)
3328 @findex gnus-group-list-matching
3329 List all unread, subscribed groups with names that match a regexp
3330 (@code{gnus-group-list-matching}).
3332 @item A M
3333 @kindex A M (Group)
3334 @findex gnus-group-list-all-matching
3335 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3337 @item A A
3338 @kindex A A (Group)
3339 @findex gnus-group-list-active
3340 List absolutely all groups in the active file(s) of the
3341 server(s) you are connected to (@code{gnus-group-list-active}).  This
3342 might very well take quite a while.  It might actually be a better idea
3343 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3344 thing to match on.  Also note that this command may list groups that
3345 don't exist (yet)---these will be listed as if they were killed groups.
3346 Take the output with some grains of salt.
3348 @item A a
3349 @kindex A a (Group)
3350 @findex gnus-group-apropos
3351 List all groups that have names that match a regexp
3352 (@code{gnus-group-apropos}).
3354 @item A d
3355 @kindex A d (Group)
3356 @findex gnus-group-description-apropos
3357 List all groups that have names or descriptions that match a regexp
3358 (@code{gnus-group-description-apropos}).
3360 @item A c
3361 @kindex A c (Group)
3362 @findex gnus-group-list-cached
3363 List all groups with cached articles (@code{gnus-group-list-cached}).
3365 @item A ?
3366 @kindex A ? (Group)
3367 @findex gnus-group-list-dormant
3368 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3370 @item A /
3371 @kindex A / (Group)
3372 @findex gnus-group-list-limit
3373 List groups limited within the current selection
3374 (@code{gnus-group-list-limit}).
3376 @item A f
3377 @kindex A f (Group)
3378 @findex gnus-group-list-flush
3379 Flush groups from the current selection (@code{gnus-group-list-flush}).
3381 @item A p
3382 @kindex A p (Group)
3383 @findex gnus-group-list-plus
3384 List groups plus the current selection (@code{gnus-group-list-plus}).
3386 @end table
3388 @vindex gnus-permanently-visible-groups
3389 @cindex visible group parameter
3390 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3391 always be shown, whether they have unread articles or not.  You can also
3392 add the @code{visible} element to the group parameters in question to
3393 get the same effect.
3395 @vindex gnus-list-groups-with-ticked-articles
3396 Groups that have just ticked articles in it are normally listed in the
3397 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3398 @code{nil}, these groups will be treated just like totally empty
3399 groups.  It is @code{t} by default.
3402 @node Sorting Groups
3403 @section Sorting Groups
3404 @cindex sorting groups
3406 @kindex C-c C-s (Group)
3407 @findex gnus-group-sort-groups
3408 @vindex gnus-group-sort-function
3409 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3410 group buffer according to the function(s) given by the
3411 @code{gnus-group-sort-function} variable.  Available sorting functions
3412 include:
3414 @table @code
3416 @item gnus-group-sort-by-alphabet
3417 @findex gnus-group-sort-by-alphabet
3418 Sort the group names alphabetically.  This is the default.
3420 @item gnus-group-sort-by-real-name
3421 @findex gnus-group-sort-by-real-name
3422 Sort the group alphabetically on the real (unprefixed) group names.
3424 @item gnus-group-sort-by-level
3425 @findex gnus-group-sort-by-level
3426 Sort by group level.
3428 @item gnus-group-sort-by-score
3429 @findex gnus-group-sort-by-score
3430 Sort by group score.  @xref{Group Score}.
3432 @item gnus-group-sort-by-rank
3433 @findex gnus-group-sort-by-rank
3434 Sort by group score and then the group level.  The level and the score
3435 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3437 @item gnus-group-sort-by-unread
3438 @findex gnus-group-sort-by-unread
3439 Sort by number of unread articles.
3441 @item gnus-group-sort-by-method
3442 @findex gnus-group-sort-by-method
3443 Sort alphabetically on the select method.
3445 @item gnus-group-sort-by-server
3446 @findex gnus-group-sort-by-server
3447 Sort alphabetically on the Gnus server name.
3450 @end table
3452 @code{gnus-group-sort-function} can also be a list of sorting
3453 functions.  In that case, the most significant sort key function must be
3454 the last one.
3457 There are also a number of commands for sorting directly according to
3458 some sorting criteria:
3460 @table @kbd
3461 @item G S a
3462 @kindex G S a (Group)
3463 @findex gnus-group-sort-groups-by-alphabet
3464 Sort the group buffer alphabetically by group name
3465 (@code{gnus-group-sort-groups-by-alphabet}).
3467 @item G S u
3468 @kindex G S u (Group)
3469 @findex gnus-group-sort-groups-by-unread
3470 Sort the group buffer by the number of unread articles
3471 (@code{gnus-group-sort-groups-by-unread}).
3473 @item G S l
3474 @kindex G S l (Group)
3475 @findex gnus-group-sort-groups-by-level
3476 Sort the group buffer by group level
3477 (@code{gnus-group-sort-groups-by-level}).
3479 @item G S v
3480 @kindex G S v (Group)
3481 @findex gnus-group-sort-groups-by-score
3482 Sort the group buffer by group score
3483 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3485 @item G S r
3486 @kindex G S r (Group)
3487 @findex gnus-group-sort-groups-by-rank
3488 Sort the group buffer by group rank
3489 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3491 @item G S m
3492 @kindex G S m (Group)
3493 @findex gnus-group-sort-groups-by-method
3494 Sort the group buffer alphabetically by back end name@*
3495 (@code{gnus-group-sort-groups-by-method}).
3497 @item G S n
3498 @kindex G S n (Group)
3499 @findex gnus-group-sort-groups-by-real-name
3500 Sort the group buffer alphabetically by real (unprefixed) group name
3501 (@code{gnus-group-sort-groups-by-real-name}).
3503 @end table
3505 All the commands below obey the process/prefix convention
3506 (@pxref{Process/Prefix}).
3508 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3509 commands will sort in reverse order.
3511 You can also sort a subset of the groups:
3513 @table @kbd
3514 @item G P a
3515 @kindex G P a (Group)
3516 @findex gnus-group-sort-selected-groups-by-alphabet
3517 Sort the groups alphabetically by group name
3518 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3520 @item G P u
3521 @kindex G P u (Group)
3522 @findex gnus-group-sort-selected-groups-by-unread
3523 Sort the groups by the number of unread articles
3524 (@code{gnus-group-sort-selected-groups-by-unread}).
3526 @item G P l
3527 @kindex G P l (Group)
3528 @findex gnus-group-sort-selected-groups-by-level
3529 Sort the groups by group level
3530 (@code{gnus-group-sort-selected-groups-by-level}).
3532 @item G P v
3533 @kindex G P v (Group)
3534 @findex gnus-group-sort-selected-groups-by-score
3535 Sort the groups by group score
3536 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3538 @item G P r
3539 @kindex G P r (Group)
3540 @findex gnus-group-sort-selected-groups-by-rank
3541 Sort the groups by group rank
3542 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3544 @item G P m
3545 @kindex G P m (Group)
3546 @findex gnus-group-sort-selected-groups-by-method
3547 Sort the groups alphabetically by back end name@*
3548 (@code{gnus-group-sort-selected-groups-by-method}).
3550 @item G P n
3551 @kindex G P n (Group)
3552 @findex gnus-group-sort-selected-groups-by-real-name
3553 Sort the groups alphabetically by real (unprefixed) group name
3554 (@code{gnus-group-sort-selected-groups-by-real-name}).
3556 @item G P s
3557 @kindex G P s (Group)
3558 @findex gnus-group-sort-selected-groups
3559 Sort the groups according to @code{gnus-group-sort-function}.
3561 @end table
3563 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3564 move groups around.
3567 @node Group Maintenance
3568 @section Group Maintenance
3569 @cindex bogus groups
3571 @table @kbd
3572 @item b
3573 @kindex b (Group)
3574 @findex gnus-group-check-bogus-groups
3575 Find bogus groups and delete them
3576 (@code{gnus-group-check-bogus-groups}).
3578 @item F
3579 @kindex F (Group)
3580 @findex gnus-group-find-new-groups
3581 Find new groups and process them (@code{gnus-group-find-new-groups}).
3582 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3583 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3584 to query the server for new groups, and subscribe the new groups as
3585 zombies.
3587 @item C-c C-x
3588 @kindex C-c C-x (Group)
3589 @findex gnus-group-expire-articles
3590 @cindex expiring mail
3591 Run all expirable articles in the current group through the expiry
3592 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3593 all expirable articles in the group that have been around for a while.
3594 (@pxref{Expiring Mail}).
3596 @item C-c C-M-x
3597 @kindex C-c C-M-x (Group)
3598 @findex gnus-group-expire-all-groups
3599 @cindex expiring mail
3600 Run all expirable articles in all groups through the expiry process
3601 (@code{gnus-group-expire-all-groups}).
3603 @end table
3606 @node Browse Foreign Server
3607 @section Browse Foreign Server
3608 @cindex foreign servers
3609 @cindex browsing servers
3611 @table @kbd
3612 @item B
3613 @kindex B (Group)
3614 @findex gnus-group-browse-foreign-server
3615 You will be queried for a select method and a server name.  Gnus will
3616 then attempt to contact this server and let you browse the groups there
3617 (@code{gnus-group-browse-foreign-server}).
3618 @end table
3620 @findex gnus-browse-mode
3621 A new buffer with a list of available groups will appear.  This buffer
3622 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3623 a lot) like a normal group buffer.
3625 Here's a list of keystrokes available in the browse mode:
3627 @table @kbd
3628 @item n
3629 @kindex n (Browse)
3630 @findex gnus-group-next-group
3631 Go to the next group (@code{gnus-group-next-group}).
3633 @item p
3634 @kindex p (Browse)
3635 @findex gnus-group-prev-group
3636 Go to the previous group (@code{gnus-group-prev-group}).
3638 @item SPACE
3639 @kindex SPACE (Browse)
3640 @findex gnus-browse-read-group
3641 Enter the current group and display the first article
3642 (@code{gnus-browse-read-group}).
3644 @item RET
3645 @kindex RET (Browse)
3646 @findex gnus-browse-select-group
3647 Enter the current group (@code{gnus-browse-select-group}).
3649 @item u
3650 @kindex u (Browse)
3651 @findex gnus-browse-unsubscribe-current-group
3652 Unsubscribe to the current group, or, as will be the case here,
3653 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3655 @item l
3656 @itemx q
3657 @kindex q (Browse)
3658 @kindex l (Browse)
3659 @findex gnus-browse-exit
3660 Exit browse mode (@code{gnus-browse-exit}).
3662 @item d
3663 @kindex d (Browse)
3664 @findex gnus-browse-describe-group
3665 Describe the current group (@code{gnus-browse-describe-group}).
3667 @item ?
3668 @kindex ? (Browse)
3669 @findex gnus-browse-describe-briefly
3670 Describe browse mode briefly (well, there's not much to describe, is
3671 there) (@code{gnus-browse-describe-briefly}).
3672 @end table
3675 @node Exiting Gnus
3676 @section Exiting Gnus
3677 @cindex exiting Gnus
3679 Yes, Gnus is ex(c)iting.
3681 @table @kbd
3682 @item z
3683 @kindex z (Group)
3684 @findex gnus-group-suspend
3685 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3686 but it kills all buffers except the Group buffer.  I'm not sure why this
3687 is a gain, but then who am I to judge?
3689 @item q
3690 @kindex q (Group)
3691 @findex gnus-group-exit
3692 @c @icon{gnus-group-exit}
3693 Quit Gnus (@code{gnus-group-exit}).
3695 @item Q
3696 @kindex Q (Group)
3697 @findex gnus-group-quit
3698 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3699 The dribble file will be saved, though (@pxref{Auto Save}).
3700 @end table
3702 @vindex gnus-exit-gnus-hook
3703 @vindex gnus-suspend-gnus-hook
3704 @vindex gnus-after-exiting-gnus-hook
3705 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3706 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3707 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3708 exiting Gnus.
3710 Note:
3712 @quotation
3713 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3714 numbly heavy and herself fall into a hazy trance as the boy sitting
3715 behind her drew repeated lines with his pencil across the back of her
3716 plastic chair.
3717 @end quotation
3720 @node Group Topics
3721 @section Group Topics
3722 @cindex topics
3724 If you read lots and lots of groups, it might be convenient to group
3725 them hierarchically according to topics.  You put your Emacs groups over
3726 here, your sex groups over there, and the rest (what, two groups or so?)
3727 you put in some misc section that you never bother with anyway.  You can
3728 even group the Emacs sex groups as a sub-topic to either the Emacs
3729 groups or the sex groups---or both!  Go wild!
3731 @iftex
3732 @iflatex
3733 \gnusfigure{Group Topics}{400}{
3734 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3736 @end iflatex
3737 @end iftex
3739 Here's an example:
3741 @example
3742 Gnus
3743   Emacs -- I wuw it!
3744      3: comp.emacs
3745      2: alt.religion.emacs
3746     Naughty Emacs
3747      452: alt.sex.emacs
3748        0: comp.talk.emacs.recovery
3749   Misc
3750      8: comp.binaries.fractals
3751     13: comp.sources.unix
3752 @end example
3754 @findex gnus-topic-mode
3755 @kindex t (Group)
3756 To get this @emph{fab} functionality you simply turn on (ooh!) the
3757 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3758 is a toggling command.)
3760 Go ahead, just try it.  I'll still be here when you get back.  La de
3761 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3762 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3763 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3764 Hot and bothered?
3766 If you want this permanently enabled, you should add that minor mode to
3767 the hook for the group mode.  Put the following line in your
3768 @file{~/.gnus.el} file:
3770 @lisp
3771 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3772 @end lisp
3774 @menu
3775 * Topic Commands::              Interactive E-Z commands.
3776 * Topic Variables::             How to customize the topics the Lisp Way.
3777 * Topic Sorting::               Sorting each topic individually.
3778 * Topic Topology::              A map of the world.
3779 * Topic Parameters::            Parameters that apply to all groups in a topic.
3780 @end menu
3783 @node Topic Commands
3784 @subsection Topic Commands
3785 @cindex topic commands
3787 When the topic minor mode is turned on, a new @kbd{T} submap will be
3788 available.  In addition, a few of the standard keys change their
3789 definitions slightly.
3791 In general, the following kinds of operations are possible on topics.
3792 First of all, you want to create topics.  Secondly, you want to put
3793 groups in topics and to move them around until you have an order you
3794 like.  The third kind of operation is to show/hide parts of the whole
3795 shebang.  You might want to hide a topic including its subtopics and
3796 groups, to get a better overview of the other groups.
3798 Here is a list of the basic keys that you might need to set up topics
3799 the way you like.
3801 @table @kbd
3803 @item T n
3804 @kindex T n (Topic)
3805 @findex gnus-topic-create-topic
3806 Prompt for a new topic name and create it
3807 (@code{gnus-topic-create-topic}).
3809 @item T TAB
3810 @itemx TAB
3811 @kindex T TAB (Topic)
3812 @kindex TAB (Topic)
3813 @findex gnus-topic-indent
3814 ``Indent'' the current topic so that it becomes a sub-topic of the
3815 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3816 ``un-indent'' the topic instead.
3818 @item M-TAB
3819 @kindex M-TAB (Topic)
3820 @findex gnus-topic-unindent
3821 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3822 parent of its current parent (@code{gnus-topic-unindent}).
3824 @end table
3826 The following two keys can be used to move groups and topics around.
3827 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3828 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3829 kill and yank rather than cut and paste.
3831 @table @kbd
3833 @item C-k
3834 @kindex C-k (Topic)
3835 @findex gnus-topic-kill-group
3836 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3837 topic will be removed along with the topic.
3839 @item C-y
3840 @kindex C-y (Topic)
3841 @findex gnus-topic-yank-group
3842 Yank the previously killed group or topic
3843 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3844 before all groups.
3846 So, to move a topic to the beginning of the list of topics, just hit
3847 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3848 move the cursor to the beginning of the buffer (just below the ``Gnus''
3849 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3850 paste.  Like I said -- E-Z.
3852 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3853 you can move topics around as well as groups.
3855 @end table
3857 After setting up the topics the way you like them, you might wish to
3858 hide a topic, or to show it again.  That's why we have the following
3859 key.
3861 @table @kbd
3863 @item RET
3864 @kindex RET (Topic)
3865 @findex gnus-topic-select-group
3866 @itemx SPACE
3867 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3868 When you perform this command on a group, you'll enter the group, as
3869 usual.  When done on a topic line, the topic will be folded (if it was
3870 visible) or unfolded (if it was folded already).  So it's basically a
3871 toggling command on topics.  In addition, if you give a numerical
3872 prefix, group on that level (and lower) will be displayed.
3874 @end table
3876 Now for a list of other commands, in no particular order.
3878 @table @kbd
3880 @item T m
3881 @kindex T m (Topic)
3882 @findex gnus-topic-move-group
3883 Move the current group to some other topic
3884 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3885 convention (@pxref{Process/Prefix}).
3887 @item T j
3888 @kindex T j (Topic)
3889 @findex gnus-topic-jump-to-topic
3890 Go to a topic (@code{gnus-topic-jump-to-topic}).
3892 @item T c
3893 @kindex T c (Topic)
3894 @findex gnus-topic-copy-group
3895 Copy the current group to some other topic
3896 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3897 convention (@pxref{Process/Prefix}).
3899 @item T h
3900 @kindex T h (Topic)
3901 @findex gnus-topic-hide-topic
3902 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3903 a prefix, hide the topic permanently.
3905 @item T s
3906 @kindex T s (Topic)
3907 @findex gnus-topic-show-topic
3908 Show the current topic (@code{gnus-topic-show-topic}).  If given
3909 a prefix, show the topic permanently.
3911 @item T D
3912 @kindex T D (Topic)
3913 @findex gnus-topic-remove-group
3914 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3915 This command is mainly useful if you have the same group in several
3916 topics and wish to remove it from one of the topics.  You may also
3917 remove a group from all topics, but in that case, Gnus will add it to
3918 the root topic the next time you start Gnus.  In fact, all new groups
3919 (which, naturally, don't belong to any topic) will show up in the root
3920 topic.
3922 This command uses the process/prefix convention
3923 (@pxref{Process/Prefix}).
3925 @item T M
3926 @kindex T M (Topic)
3927 @findex gnus-topic-move-matching
3928 Move all groups that match some regular expression to a topic
3929 (@code{gnus-topic-move-matching}).
3931 @item T C
3932 @kindex T C (Topic)
3933 @findex gnus-topic-copy-matching
3934 Copy all groups that match some regular expression to a topic
3935 (@code{gnus-topic-copy-matching}).
3937 @item T H
3938 @kindex T H (Topic)
3939 @findex gnus-topic-toggle-display-empty-topics
3940 Toggle hiding empty topics
3941 (@code{gnus-topic-toggle-display-empty-topics}).
3943 @item T #
3944 @kindex T # (Topic)
3945 @findex gnus-topic-mark-topic
3946 Mark all groups in the current topic with the process mark
3947 (@code{gnus-topic-mark-topic}).  This command works recursively on
3948 sub-topics unless given a prefix.
3950 @item T M-#
3951 @kindex T M-# (Topic)
3952 @findex gnus-topic-unmark-topic
3953 Remove the process mark from all groups in the current topic
3954 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3955 sub-topics unless given a prefix.
3957 @item C-c C-x
3958 @kindex C-c C-x (Topic)
3959 @findex gnus-topic-expire-articles
3960 @cindex expiring mail
3961 Run all expirable articles in the current group or topic through the
3962 expiry process (if any)
3963 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3965 @item T r
3966 @kindex T r (Topic)
3967 @findex gnus-topic-rename
3968 Rename a topic (@code{gnus-topic-rename}).
3970 @item T DEL
3971 @kindex T DEL (Topic)
3972 @findex gnus-topic-delete
3973 Delete an empty topic (@code{gnus-topic-delete}).
3975 @item A T
3976 @kindex A T (Topic)
3977 @findex gnus-topic-list-active
3978 List all groups that Gnus knows about in a topics-ified way
3979 (@code{gnus-topic-list-active}).
3981 @item T M-n
3982 @kindex T M-n (Topic)
3983 @findex gnus-topic-goto-next-topic
3984 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3986 @item T M-p
3987 @kindex T M-p (Topic)
3988 @findex gnus-topic-goto-previous-topic
3989 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
3991 @item G p
3992 @kindex G p (Topic)
3993 @findex gnus-topic-edit-parameters
3994 @cindex group parameters
3995 @cindex topic parameters
3996 @cindex parameters
3997 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3998 @xref{Topic Parameters}.
4000 @end table
4003 @node Topic Variables
4004 @subsection Topic Variables
4005 @cindex topic variables
4007 The previous section told you how to tell Gnus which topics to display.
4008 This section explains how to tell Gnus what to display about each topic.
4010 @vindex gnus-topic-line-format
4011 The topic lines themselves are created according to the
4012 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
4013 Valid elements are:
4015 @table @samp
4016 @item i
4017 Indentation.
4018 @item n
4019 Topic name.
4020 @item v
4021 Visibility.
4022 @item l
4023 Level.
4024 @item g
4025 Number of groups in the topic.
4026 @item a
4027 Number of unread articles in the topic.
4028 @item A
4029 Number of unread articles in the topic and all its subtopics.
4030 @end table
4032 @vindex gnus-topic-indent-level
4033 Each sub-topic (and the groups in the sub-topics) will be indented with
4034 @code{gnus-topic-indent-level} times the topic level number of spaces.
4035 The default is 2.
4037 @vindex gnus-topic-mode-hook
4038 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4040 @vindex gnus-topic-display-empty-topics
4041 The @code{gnus-topic-display-empty-topics} says whether to display even
4042 topics that have no unread articles in them.  The default is @code{t}.
4045 @node Topic Sorting
4046 @subsection Topic Sorting
4047 @cindex topic sorting
4049 You can sort the groups in each topic individually with the following
4050 commands:
4053 @table @kbd
4054 @item T S a
4055 @kindex T S a (Topic)
4056 @findex gnus-topic-sort-groups-by-alphabet
4057 Sort the current topic alphabetically by group name
4058 (@code{gnus-topic-sort-groups-by-alphabet}).
4060 @item T S u
4061 @kindex T S u (Topic)
4062 @findex gnus-topic-sort-groups-by-unread
4063 Sort the current topic by the number of unread articles
4064 (@code{gnus-topic-sort-groups-by-unread}).
4066 @item T S l
4067 @kindex T S l (Topic)
4068 @findex gnus-topic-sort-groups-by-level
4069 Sort the current topic by group level
4070 (@code{gnus-topic-sort-groups-by-level}).
4072 @item T S v
4073 @kindex T S v (Topic)
4074 @findex gnus-topic-sort-groups-by-score
4075 Sort the current topic by group score
4076 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4078 @item T S r
4079 @kindex T S r (Topic)
4080 @findex gnus-topic-sort-groups-by-rank
4081 Sort the current topic by group rank
4082 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4084 @item T S m
4085 @kindex T S m (Topic)
4086 @findex gnus-topic-sort-groups-by-method
4087 Sort the current topic alphabetically by back end name
4088 (@code{gnus-topic-sort-groups-by-method}).
4090 @item T S e
4091 @kindex T S e (Topic)
4092 @findex gnus-topic-sort-groups-by-server
4093 Sort the current topic alphabetically by server name
4094 (@code{gnus-topic-sort-groups-by-server}).
4096 @item T S s
4097 @kindex T S s (Topic)
4098 @findex gnus-topic-sort-groups
4099 Sort the current topic according to the function(s) given by the
4100 @code{gnus-group-sort-function} variable
4101 (@code{gnus-topic-sort-groups}).
4103 @end table
4105 When given a prefix argument, all these commands will sort in reverse
4106 order.  @xref{Sorting Groups}, for more information about group
4107 sorting.
4110 @node Topic Topology
4111 @subsection Topic Topology
4112 @cindex topic topology
4113 @cindex topology
4115 So, let's have a look at an example group buffer:
4117 @example
4118 @group
4119 Gnus
4120   Emacs -- I wuw it!
4121      3: comp.emacs
4122      2: alt.religion.emacs
4123     Naughty Emacs
4124      452: alt.sex.emacs
4125        0: comp.talk.emacs.recovery
4126   Misc
4127      8: comp.binaries.fractals
4128     13: comp.sources.unix
4129 @end group
4130 @end example
4132 So, here we have one top-level topic (@samp{Gnus}), two topics under
4133 that, and one sub-topic under one of the sub-topics.  (There is always
4134 just one (1) top-level topic).  This topology can be expressed as
4135 follows:
4137 @lisp
4138 (("Gnus" visible)
4139  (("Emacs -- I wuw it!" visible)
4140   (("Naughty Emacs" visible)))
4141  (("Misc" visible)))
4142 @end lisp
4144 @vindex gnus-topic-topology
4145 This is in fact how the variable @code{gnus-topic-topology} would look
4146 for the display above.  That variable is saved in the @file{.newsrc.eld}
4147 file, and shouldn't be messed with manually---unless you really want
4148 to.  Since this variable is read from the @file{.newsrc.eld} file,
4149 setting it in any other startup files will have no effect.
4151 This topology shows what topics are sub-topics of what topics (right),
4152 and which topics are visible.  Two settings are currently
4153 allowed---@code{visible} and @code{invisible}.
4156 @node Topic Parameters
4157 @subsection Topic Parameters
4158 @cindex topic parameters
4160 All groups in a topic will inherit group parameters from the parent
4161 (and ancestor) topic parameters.  All valid group parameters are valid
4162 topic parameters (@pxref{Group Parameters}).  When the agent is
4163 enabled, all agent parameters (See Agent Parameters in @ref{Category
4164 Syntax}) are also valid topic parameters.
4166 In addition, the following parameters are only valid as topic
4167 parameters:
4169 @table @code
4170 @item subscribe
4171 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4172 @code{subscribe} topic parameter says what groups go in what topic.  Its
4173 value should be a regexp to match the groups that should go in that
4174 topic.
4176 @item subscribe-level
4177 When subscribing new groups by topic (see the @code{subscribe} parameter),
4178 the group will be subscribed with the level specified in the
4179 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4181 @end table
4183 Group parameters (of course) override topic parameters, and topic
4184 parameters in sub-topics override topic parameters in super-topics.  You
4185 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4186 verb, although you may feel free to disagree with me here.)
4188 @example
4189 @group
4190 Gnus
4191   Emacs
4192      3: comp.emacs
4193      2: alt.religion.emacs
4194    452: alt.sex.emacs
4195     Relief
4196      452: alt.sex.emacs
4197        0: comp.talk.emacs.recovery
4198   Misc
4199      8: comp.binaries.fractals
4200     13: comp.sources.unix
4201    452: alt.sex.emacs
4202 @end group
4203 @end example
4205 The @samp{Emacs} topic has the topic parameter @code{(score-file
4206 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4207 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4208 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4209 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4210 . "religion.SCORE")}.
4212 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4213 will get the @file{relief.SCORE} home score file.  If you enter the same
4214 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4215 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4216 get the @file{religion.SCORE} home score file.
4218 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4219 there are some problems, especially with the @code{total-expiry}
4220 parameter.  Say you have a mail group in two topics; one with
4221 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4222 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4223 of these topics you mean to expire articles from, so anything may
4224 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4225 happens.  You just have to be careful if you do stuff like that.
4228 @node Non-ASCII Group Names
4229 @section Accessing groups of non-English names
4230 @cindex non-ascii group names
4232 There are some news servers that provide groups of which the names are
4233 expressed with their native languages in the world.  For instance, in a
4234 certain news server there are some newsgroups of which the names are
4235 spelled in Chinese, where people are talking in Chinese.  You can, of
4236 course, subscribe to such news groups using Gnus.  Currently Gnus
4237 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4238 back end but also with the @code{nnml} back end and the @code{nnrss}
4239 back end.
4241 Every such group name is encoded by a certain charset in the server
4242 side (in an @acronym{NNTP} server its administrator determines the
4243 charset, but for groups in the other back ends it is determined by you).
4244 Gnus has to display the decoded ones for you in the group buffer and the
4245 article buffer, and needs to use the encoded ones when communicating
4246 with servers.  However, Gnus doesn't know what charset is used for each
4247 non-@acronym{ASCII} group name.  The following two variables are just
4248 the ones for telling Gnus what charset should be used for each group:
4250 @table @code
4251 @item gnus-group-name-charset-method-alist
4252 @vindex gnus-group-name-charset-method-alist
4253 An alist of select methods and charsets.  The default value is
4254 @code{nil}.  The names of groups in the server specified by that select
4255 method are all supposed to use the corresponding charset.  For example:
4257 @lisp
4258 (setq gnus-group-name-charset-method-alist
4259       '(((nntp "news.com.cn") . cn-gb-2312)))
4260 @end lisp
4262 Charsets specified for groups with this variable are preferred to the
4263 ones specified for the same groups with the
4264 @code{gnus-group-name-charset-group-alist} variable (see below).
4266 A select method can be very long, like:
4268 @lisp
4269 (nntp "gmane"
4270       (nntp-address "news.gmane.org")
4271       (nntp-end-of-line "\n")
4272       (nntp-open-connection-function
4273        nntp-open-via-rlogin-and-telnet)
4274       (nntp-via-rlogin-command "ssh")
4275       (nntp-via-rlogin-command-switches
4276        ("-C" "-t" "-e" "none"))
4277       (nntp-via-address @dots{}))
4278 @end lisp
4280 In that case, you can truncate it into @code{(nntp "gmane")} in this
4281 variable.  That is, it is enough to contain only the back end name and
4282 the server name.
4284 @item gnus-group-name-charset-group-alist
4285 @cindex UTF-8 group names
4286 @vindex gnus-group-name-charset-group-alist
4287 An alist of regexp of group name and the charset for group names.
4288 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4289 otherwise the default is @code{nil}.  For example:
4291 @lisp
4292 (setq gnus-group-name-charset-group-alist
4293       '(("\\.com\\.cn:" . cn-gb-2312)
4294         (".*" . utf-8)))
4295 @end lisp
4297 Note that this variable is ignored if the match is made with
4298 @code{gnus-group-name-charset-method-alist}.
4299 @end table
4301 Those two variables are used also to determine the charset for encoding
4302 and decoding non-@acronym{ASCII} group names that are in the back ends
4303 other than @code{nntp}.  It means that it is you who determine it.  If
4304 you do nothing, the charset used for group names in those back ends will
4305 all be @code{utf-8} because of the last element of
4306 @code{gnus-group-name-charset-group-alist}.
4308 There is one more important variable for non-@acronym{ASCII} group
4309 names.  @emph{XEmacs users must set this}.  Emacs users necessarily need
4310 not do:
4312 @table @code
4313 @item nnmail-pathname-coding-system
4314 The value of this variable should be a coding system or @code{nil}
4315 (which is the default).  The @code{nnml} back end, the @code{nnrss} back
4316 end, the @acronym{NNTP} marks feature (@pxref{NNTP marks}), the agent,
4317 and the cache use non-@acronym{ASCII} group names in those files and
4318 directories.  This variable overrides the value of
4319 @code{file-name-coding-system} which specifies the coding system used
4320 when encoding and decoding those file names and directory names.
4322 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4323 is the only means to specify the coding system used to encode and decode
4324 file names.  Therefore, @emph{you, XEmacs users, have to set it} to the
4325 coding system that is suitable to encode and decode non-@acronym{ASCII}
4326 group names.  On the other hand, Emacs uses the value of
4327 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4328 is @code{nil}.  Normally the value of
4329 @code{default-file-name-coding-system} is initialized according to the
4330 locale, so you will need to do nothing if the value is suitable to
4331 encode and decode non-@acronym{ASCII} group names.
4333 The value of this variable (or @code{default-file-name-coding-system})
4334 does not necessarily need to be the same value that is determined by
4335 @code{gnus-group-name-charset-method-alist} and
4336 @code{gnus-group-name-charset-group-alist}.
4338 If you want to subscribe to the groups spelled in Chinese but
4339 @code{default-file-name-coding-system} is initialized by default to
4340 @code{iso-latin-1} for example, that is the most typical case where you
4341 have to set @code{nnmail-pathname-coding-system} even if you are an
4342 Emacs user.  The @code{utf-8} coding system is a good candidate for it.
4343 Otherwise, you may change the locale in your system so that
4344 @code{default-file-name-coding-system} may be initialized to an
4345 appropriate value, instead of specifying this variable.
4346 @end table
4348 Note that when you copy or move articles from a non-@acronym{ASCII}
4349 group to another group, the charset used to encode and decode group
4350 names should be the same in both groups.  Otherwise the Newsgroups
4351 header will be displayed incorrectly in the article buffer.
4354 @node Searching
4355 @section Searching
4357 @menu
4358 * nnir::                     Searching on IMAP, with swish, namazu, etc.
4359 * nnmairix::                 Searching maildir, MH or mbox with Mairix.
4360 @end menu
4362 @cindex Searching
4364 FIXME: This node is a stub.
4366 FIXME: Add a brief overview of Gnus search capabilities.  A brief
4367 comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4368 as well.
4370 FIXME: Explain difference to @ref{Searching for Articles}, add reference
4371 and back-reference.
4373 @node nnir
4374 @subsection nnir
4376 FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4377 @cindex nnir
4379 @node nnmairix
4380 @subsection nnmairix
4382 @cindex mairix 
4383 @cindex nnmairix
4384 This paragraph describes how to set up mairix and the back end
4385 @code{nnmairix} for indexing and searching your mail from within
4386 Gnus.  Additionally, you can create permanent ``smart'' groups which are
4387 bound to mairix searches and are automatically updated.
4389 @menu
4390 * About mairix::                About the mairix mail search engine
4391 * nnmairix requirements::       What you will need for using nnmairix
4392 * What nnmairix does::          What does nnmairix actually do?
4393 * Setting up mairix::           Set up your mairix installation
4394 * Configuring nnmairix::        Set up the nnmairix back end
4395 * nnmairix keyboard shortcuts:: List of available keyboard shortcuts
4396 * Propagating marks::           How to propagate marks from nnmairix groups
4397 * nnmairix tips and tricks::    Some tips, tricks and examples
4398 * nnmairix caveats::            Some more stuff you might want to know
4399 @end menu
4401 @c FIXME: The markup in this section needs improvement.  E.g. add
4402 @c @sample{...}, maybe remove some @strong{...}, convert ` - ' to `---`,
4403 @c ...
4405 @node About mairix
4406 @subsubsection About mairix
4408 Mairix is a tool for indexing and searching words in locally stored
4409 mail.  It was written by Richard Curnow and is licensed under the
4410 GPL.  Mairix comes with most popular GNU/Linux distributions, but it also
4411 runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
4412 be found at
4413 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
4415 Though mairix might not be as flexible as other search tools like
4416 swish++ or namazu, which you can use via the @code{nnir} back end, it
4417 has the prime advantage of being incredibly fast.  On current systems, it
4418 can easily search through headers and message bodies of thousands and
4419 thousands of mails in well under a second.  Building the database
4420 necessary for searching might take a minute or two, but only has to be
4421 done once fully.  Afterwards, the updates are done incrementally and
4422 therefore are really fast, too.  Additionally, mairix is very easy to set
4425 For maximum speed though, mairix should be used with mails stored in
4426 @code{Maildir} or @code{MH} format (this includes the @code{nnml} back
4427 end), although it also works with mbox.  Mairix presents the search
4428 results by populating a @emph{virtual} maildir/MH folder with symlinks
4429 which point to the ``real'' message files (if mbox is used, copies are
4430 made).  Since mairix already presents search results in such a virtual
4431 mail folder, it is very well suited for using it as an external program
4432 for creating @emph{smart} mail folders, which represent certain mail
4433 searches.  This is similar to a Kiboze group (@pxref{Kibozed Groups}),
4434 but much faster.
4436 @node nnmairix requirements
4437 @subsubsection nnmairix requirements
4439 Mairix searches local mail - that means, mairix absolutely must have
4440 direct access to your mail folders.  If your mail resides on another
4441 server (e.g. an @acronym{IMAP} server) and you happen to have shell
4442 access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4444 Additionally, @code{nnmairix} only supports the following Gnus back
4445 ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}.  You
4446 @strong{must} use one of these back ends for using
4447 @code{nnmairix}.  Other back ends, like @code{nnmbox}, @code{nnfolder} or
4448 @code{nnmh}, won't work.
4450 If you absolutely must use mbox and still want to use @code{nnmairix},
4451 you can set up a local @acronym{IMAP} server, which you then access via
4452 @code{nnimap}.  This is a rather massive setup for accessing some mbox
4453 files, so just change to MH or Maildir already...
4455 @node What nnmairix does
4456 @subsubsection What nnmairix does
4458 The back end @code{nnmairix} enables you to call mairix from within Gnus,
4459 either to query mairix with a search term or to update the
4460 database.  While visiting a message in the summary buffer, you can use
4461 several pre-defined shortcuts for calling mairix, e.g. to quickly
4462 search for all mails from the sender of the current message or to
4463 display the whole thread associated with the message, even if the
4464 mails are in different folders.
4466 Additionally, you can create permanent @code{nnmairix} groups which are bound
4467 to certain mairix searches.  This way, you can easily create a group
4468 containing mails from a certain sender, with a certain subject line or
4469 even for one specific thread based on the Message-ID.  If you check for
4470 new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
4471 automatically update themselves by calling mairix. 
4473 You might ask why you need @code{nnmairix} at all, since mairix already
4474 creates the group, populates it with links to the mails so that you can
4475 then access it with Gnus, right? Well, this @emph{might} work, but often
4476 does not - at least not without problems.  Most probably you will get
4477 strange article counts, and sometimes you might see mails which Gnus
4478 claims have already been canceled and are inaccessible.  This is due to
4479 the fact that Gnus isn't really amused when things are happening behind
4480 its back.  Another problem can be the mail back end itself, e.g. if you
4481 use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4482 about corrupt index files when mairix changed the contents of the search
4483 group).  Using @code{nnmairix} should circumvent these problems.
4485 @code{nnmairix} is not really a mail back end - it's actually more like a
4486 wrapper, sitting between a ``real'' mail back end where mairix stores the
4487 searches and the Gnus front end.  You can choose between three different
4488 mail back ends for the mairix folders: @code{nnml}, @code{nnmaildir} or
4489 @code{nnimap}.  @code{nnmairix} will call the mairix binary so that the
4490 search results are stored in folders named
4491 @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
4492 present these folders in the Gnus front end only with @code{<NAME>}.  You
4493 can use an existing mail back end where you already store your mail, but
4494 if you're uncomfortable with @code{nnmairix} creating new mail groups
4495 alongside your other mail, you can also create e.g. a new
4496 @code{nnmaildir} server exclusively for mairix.  However, a special case
4497 exists if you want to use mairix remotely on an IMAP server with
4498 @code{nnimap} - here the mairix folders and your other mail must be on
4499 the same @code{nnimap} back end.
4501 @node Setting up mairix
4502 @subsubsection Setting up mairix
4504 First: create a backup of your mail folders (@pxref{nnmairix caveats}).
4506 Setting up mairix is easy: simply create a @file{.mairixrc} file with
4507 (at least) the following entries:
4509 @example
4510 # Your Maildir/MH base folder
4511 base=~/Maildir
4512 @end example
4514 This is the base folder for your mails.  All the following paths are
4515 relative to this base folder.  If you want to use @code{nnmairix} with
4516 @code{nnimap}, this base path has to point to the mail path where the
4517 @acronym{IMAP} server stores the mail folders!
4519 @c FIXME: Add typical examples?
4520 @example
4521 maildir= ... your maildir folders which should be indexed ...
4522 mh= ... your nnml/mh folders which should be indexed ...
4523 mbox = ... your mbox files which should be indexed ...
4524 @end example
4526 Specify all your maildir/nnml folders and mbox files (relative to the
4527 base path!) you want to index with mairix.  See the man-page for
4528 mairixrc for details.
4530 @example
4531 omit=zz_mairix-*
4532 @end example
4534 @vindex nnmairix-group-prefix
4535 This should make sure that you don't accidentally index the mairix
4536 search results.  You can change the prefix of these folders with the
4537 variable @code{nnmairix-group-prefix}.
4539 @c FIXME: Add typical examples?
4540 @example
4541 mformat= ... 'maildir' or 'mh' ...
4542 database= ... location of database file ...
4543 @end example
4545 The @code{format} setting specifies the output format for the mairix
4546 search folder.  Set this to @code{mh} if you want to access search results
4547 with @code{nnml}.  Otherwise choose @code{maildir}.
4549 See the man pages for mairix and mairixrc for further options.  Now
4550 simply call @code{mairix} to create the index for the first time.
4552 @node Configuring nnmairix
4553 @subsubsection Configuring nnmairix
4555 In group mode, type @kbd{G b c}
4556 (@code{nnmairix-create-server-and-default-group}).  This will ask you for all
4557 necessary information and create a @code{nnmairix} server as a foreign
4558 server.  You will have to specify the following:
4560 @itemize @bullet
4562 @item
4563 The @strong{name} of the @code{nnmairix} server - choose whatever you
4564 want.
4566 @item
4567 The @strong{mail back end} where mairix should stores its
4568 searches.  Currently @code{nnmaildir}, @code{nnimap} and @code{nnml} are
4569 supported.  As explained above, for locally stored mails, this can be an
4570 existing mail back end where you store your mails.  However, you can also
4571 create e.g. a new @code{nnmaildir} server exclusively for
4572 @code{nnmairix} in your secondary select methods (@pxref{Finding the
4573 News}).  If you want to use mairix remotely on an @acronym{IMAP} server,
4574 you have to choose the corresponding @code{nnimap} back end here.
4576 @item
4577 @vindex nnmairix-mairix-search-options
4578 The @strong{command} to call the mairix binary.  This will usually just
4579 be @code{mairix}, but you can also choose something like @code{ssh
4580 SERVER mairix} if you want to call mairix remotely, e.g. on your
4581 @acronym{IMAP} server.  If you want to add some default options to
4582 mairix, you could do this here, but better use the variable
4583 @code{nnmairix-mairix-search-options} instead.
4585 @item
4586 The name of the @strong{default search group}.  This will be the group
4587 where all temporary mairix searches are stored, i.e. all searches which
4588 are not bound to permanent @code{nnmairix} groups.  Choose whatever you
4589 like.
4591 @item
4592 If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
4593 asked if you work with @strong{Maildir++}, i.e. with hidden maildir
4594 folders (=beginning with a dot).  For example, you have to answer
4595 @samp{yes} here if you work with the Dovecot @acronym{IMAP}
4596 server.  Otherwise, you should answer @samp{no} here.
4598 @end itemize
4600 @node nnmairix keyboard shortcuts
4601 @subsubsection nnmairix keyboard shortcuts
4603 In group mode:
4605 @table @kbd
4607 @item G b c
4608 @kindex G b c (Group)
4609 @findex nnmairix-create-server-and-default-group
4610 Creates @code{nnmairix} server and default search group for this server
4611 (@code{nnmairix-create-server-and-default-group}).  You should have done
4612 this by now (@pxref{Configuring nnmairix}).
4614 @item G b s
4615 @kindex G b s (Group)
4616 @findex nnmairix-search
4617 Prompts for query which is then sent to the mairix binary.  Search
4618 results are put into the default search group which is automatically
4619 displayed (@code{nnmairix-search}).
4621 @item G b m
4622 @kindex G b m (Group)
4623 @findex nnmairix-widget-search
4624 Allows you to create a mairix search or a permanent group more
4625 comfortably using graphical widgets, similar to a customization
4626 group.  Just try it to see how it works (@code{nnmairix-widget-search}).
4628 @item G b i
4629 @kindex G b i (Group)
4630 @findex nnmairix-search-interactive
4631 Another command for creating a mairix query more comfortably, but uses
4632 only the minibuffer (@code{nnmairix-search-interactive}).
4634 @item G b g
4635 @kindex G b g (Group)
4636 @findex nnmairix-create-search-group
4637 Creates a permanent group which is associated with a search query
4638 (@code{nnmairix-create-search-group}).  The @code{nnmairix} back end
4639 automatically calls mairix when you update this group with @kbd{g} or
4640 @kbd{M-g}.
4642 @item G b q
4643 @kindex G b q (Group)
4644 @findex nnmairix-group-change-query-this-group
4645 Changes the search query for the @code{nnmairix} group under cursor
4646 (@code{nnmairix-group-change-query-this-group}).
4648 @item G b t
4649 @kindex G b t (Group)
4650 @findex nnmairix-group-toggle-threads-this-group
4651 Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
4652 i.e.  if you want see the whole threads of the found messages
4653 (@code{nnmairix-group-toggle-threads-this-group}).
4655 @item G b u
4656 @kindex G b u (Group)
4657 @findex nnmairix-update-database
4658 @vindex nnmairix-mairix-update-options
4659 Calls mairix binary for updating the database
4660 (@code{nnmairix-update-database}).  The default parameters are @code{-F}
4661 and @code{-Q} for making this as fast as possible (see variable
4662 @code{nnmairix-mairix-update-options} for defining these default
4663 options).
4665 @item G b r
4666 @kindex G b r (Group)
4667 @findex nnmairix-group-toggle-readmarks-this-group
4668 Keep articles in this @code{nnmairix} group always read or unread, or leave the
4669 marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
4671 @item G b d
4672 @kindex G b d (Group)
4673 @findex nnmairix-group-delete-recreate-this-group
4674 Recreate @code{nnmairix} group on the ``real'' mail back end
4675 (@code{nnmairix-group-delete-recreate-this-group}).  You can do this if
4676 you always get wrong article counts with a @code{nnmairix} group.
4678 @item G b a
4679 @kindex G b a (Group)
4680 @findex nnmairix-group-toggle-allowfast-this-group
4681 Toggles the @code{allow-fast} parameters for group under cursor
4682 (@code{nnmairix-group-toggle-allowfast-this-group}).  The default
4683 behavior of @code{nnmairix} is to do a mairix search every time you
4684 update or enter the group.  With the @code{allow-fast} parameter set,
4685 mairix will only be called when you explicitly update the group, but not
4686 upon entering.  This makes entering the group faster, but it may also
4687 lead to dangling symlinks if something changed between updating and
4688 entering the group which is not yet in the mairix database.
4690 @item G b p
4691 @kindex G b p (Group)
4692 @findex nnmairix-group-toggle-propmarks-this-group
4693 Toggle marks propagation for this group
4694 (@code{nnmairix-group-toggle-propmarks-this-group}).  (@pxref{Propagating
4695 marks}).
4697 @item G b o
4698 @kindex G b o (Group)
4699 @findex nnmairix-propagate-marks
4700 Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
4701 @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
4703 @end table
4705 In summary mode:
4707 @table @kbd
4709 @item $ m
4710 @kindex $ m (Summary)
4711 @findex nnmairix-widget-search-from-this-article
4712 Allows you to create a mairix query or group based on the current
4713 message using graphical widgets (same as @code{nnmairix-widget-search})
4714 (@code{nnmairix-widget-search-from-this-article}).
4716 @item $ g
4717 @kindex $ g (Summary)
4718 @findex nnmairix-create-search-group-from-message
4719 Interactively creates a new search group with query based on the current
4720 message, but uses the minibuffer instead of graphical widgets
4721 (@code{nnmairix-create-search-group-from-message}).
4723 @item $ t
4724 @kindex $ t (Summary)
4725 @findex nnmairix-search-thread-this-article
4726 Searches thread for the current article
4727 (@code{nnmairix-search-thread-this-article}).  This is effectively a
4728 shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
4729 current article and enabled threads.
4731 @item $ f
4732 @kindex $ f (Summary)
4733 @findex nnmairix-search-from-this-article
4734 Searches all messages from sender of the current article
4735 (@code{nnmairix-search-from-this-article}).  This is a shortcut for
4736 calling @code{nnmairix-search} with @samp{f:From}.
4738 @item $ o
4739 @kindex $ o (Summary)
4740 @findex nnmairix-goto-original-article
4741 (Only in @code{nnmairix} groups!) Tries determine the group this article
4742 originally came from and displays the article in this group, so that
4743 e.g. replying to this article the correct posting styles/group
4744 parameters are applied (@code{nnmairix-goto-original-article}).  This
4745 function will use the registry if available, but can also parse the
4746 article file path as a fallback method.
4748 @item $ u
4749 @kindex $ u (Summary)
4750 @findex nnmairix-remove-tick-mark-original-article
4751 Remove possibly existing tick mark from original article
4752 (@code{nnmairix-remove-tick-mark-original-article}).  (@pxref{nnmairix
4753 tips and tricks}).
4755 @end table
4757 @node Propagating marks
4758 @subsubsection Propagating marks
4760 First of: you really need a patched mairix binary for using the marks
4761 propagation feature efficiently. Otherwise, you would have to update
4762 the mairix database all the time. You can get the patch at
4764 @uref{http://m61s02.vlinux.de/mairix-maildir-patch.tar}
4766 You need the mairix v0.21 source code for this patch; everything else
4767 is explained in the accompanied readme file. If you don't want to use
4768 marks propagation, you don't have to apply these patches, but they also
4769 fix some annoyances regarding changing maildir flags, so it might still
4770 be useful to you.
4772 With the patched mairix binary, you can use @code{nnmairix} as an
4773 alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
4774 example, instead of splitting all mails from @samp{david@@foobar.com}
4775 into a group, you can simply create a search group with the query
4776 @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
4777 all about: simply put everything in one mail folder and dynamically
4778 create searches instead of splitting. This is more flexible, since you
4779 can dynamically change your folders any time you want to. This also
4780 implies that you will usually read your mails in the @code{nnmairix}
4781 groups instead of your ``real'' mail groups.
4783 There is one problem, though: say you got a new mail from
4784 @samp{david@@foobar.com} - it will now show up in two groups, the
4785 ``real'' group (your INBOX, for example) and in the @code{nnmairix}
4786 search group (provided you have updated the mairix database). Now you
4787 enter the @code{nnmairix} group and read the mail. The mail will be
4788 marked as read, but only in the @code{nnmairix} group - in the ``real''
4789 mail group it will be still shown as unread.
4791 You could now catch up the mail group (@pxref{Group Data}), but this is
4792 tedious and error prone, since you may overlook mails you don't have
4793 created @code{nnmairix} groups for. Of course, you could first use
4794 @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
4795 shortcuts}) and then read the mail in the original group, but that's
4796 even more cumbersome.
4798 Clearly, the easiest way would be if marks could somehow be
4799 automatically set for the original article. This is exactly what
4800 @emph{marks propagation} is about.
4802 Marks propagation is deactivated by default. You can activate it for a
4803 certain @code{nnmairix} group with
4804 @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
4805 p}). This function will warn you if you try to use it with your default
4806 search group; the reason is that the default search group is used for
4807 temporary searches, and it's easy to accidentally propagate marks from
4808 this group. However, you can ignore this warning if you really want to.
4810 With marks propagation enabled, all the marks you set in a @code{nnmairix}
4811 group should now be propagated to the original article. For example,
4812 you can now tick an article (by default with @kbd{!}) and this mark should
4813 magically be set for the original article, too.
4815 A few more remarks which you may or may not want to know:
4817 @vindex nnmairix-propagate-marks-upon-close
4818 Marks will not be set immediately, but only upon closing a group. This
4819 not only makes marks propagation faster, it also avoids problems with
4820 dangling symlinks when dealing with maildir files (since changing flags
4821 will change the file name). You can also control when to propagate marks
4822 via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
4823 details).
4825 Obviously, @code{nnmairix} will have to look up the original group for every
4826 article you want to set marks for. If available, @code{nnmairix} will first use
4827 the registry for determining the original group. The registry is very
4828 fast, hence you should really, really enable the registry when using
4829 marks propagation. If you don't have to worry about RAM and disc space,
4830 set @code{gnus-registry-max-entries} to a large enough value; to be on
4831 the safe side, choose roughly the amount of mails you index with mairix.
4833 @vindex nnmairix-only-use-registry
4834 If you don't want to use the registry or the registry hasn't seen the
4835 original article yet, @code{nnmairix} will use an additional mairix search
4836 for determining the file path of the article. This, of course, is way
4837 slower than the registry - if you set hundreds or even thousands of
4838 marks this way, it might take some time. You can avoid this situation
4839 by setting @code{nnmairix-only-use-registry} to t.
4841 Maybe you also want to propagate marks the other way round, i.e. if you
4842 tick an article in a "real" mail group, you'd like to have the same
4843 article in a @code{nnmairix} group ticked, too. For several good
4844 reasons, this can only be done efficiently if you use maildir. To
4845 immediately contradict myself, let me mention that it WON'T work with
4846 @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
4847 not in the file name. Therefore, propagating marks to @code{nnmairix}
4848 groups will usually only work if you use an IMAP server which uses
4849 maildir as its file format.
4851 @vindex nnmairix-propagate-marks-to-nnmairix-groups
4852 If you work with this setup, just set
4853 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
4854 happens. If you don't like what you see, just set it to @code{nil} again. One
4855 problem might be that you get a wrong number of unread articles; this
4856 usually happens when you delete or expire articles in the original
4857 groups. When this happens, you can recreate the @code{nnmairix} group on the
4858 back end using @kbd{G b d}.
4860 @node nnmairix tips and tricks
4861 @subsubsection nnmairix tips and tricks
4863 @itemize
4864 @item
4865 Checking Mail
4867 @findex nnmairix-update-groups
4868 I put all my important mail groups at group level 1. The mairix groups
4869 have group level 5, so they do not get checked at start up (@pxref{Group
4870 Levels}).
4872 I use the following to check for mails:
4874 @lisp
4875 (defun my-check-mail-mairix-update (level)
4876   (interactive "P")
4877   ;; if no prefix given, set level=1
4878   (gnus-group-get-new-news (or level 1))
4879   (nnmairix-update-groups "mairixsearch" t t)
4880   (gnus-group-list-groups))
4882 (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
4883 @end lisp
4885 Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
4886 server. See the doc string for @code{nnmairix-update-groups} for
4887 details.
4889 @item
4890 Example: search group for ticked articles
4892 For example, you can create a group for all ticked articles, where the
4893 articles always stay unread:
4895 Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4896 @samp{F:f} as query and do not include threads.
4898 Now activate marks propagation for this group by using @kbd{G b p}. Then
4899 activate the always-unread feature by using @kbd{G b r} twice.
4901 So far so good - but how do you remove the tick marks in the @code{nnmairix}
4902 group?  There are two options: You may simply use
4903 @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4904 tick marks from the original article. The other possibility is to set
4905 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
4906 comments about this option.  If it works for you, the tick marks should
4907 also exist in the @code{nnmairix} group and you can remove them as usual,
4908 e.g. by marking an article as read.
4910 When you have removed a tick mark from the original article, this
4911 article should vanish from the @code{nnmairix} group after you have updated the
4912 mairix database and updated the group.  Fortunately, there is a function
4913 for doing exactly that: @code{nnmairix-update-groups}. See the previous code
4914 snippet and the doc string for details.
4916 @item
4917 Dealing with auto-subscription of mail groups
4919 As described before, all @code{nnmairix} groups are in fact stored on
4920 the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4921 see them when you enter the back end server in the server buffer. You
4922 should not subscribe these groups! Unfortunately, these groups will
4923 usually get @strong{auto-subscribed} when you use @code{nnmaildir} or
4924 @code{nnml}, i.e. you will suddenly see groups of the form
4925 @samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4926 simply kill these groups with C-k.  For avoiding this, turn off
4927 auto-subscription completely by setting the variable
4928 @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
4929 Groups}), or if you like to keep this feature use the following kludge
4930 for turning it off for all groups beginning with @samp{zz_}:
4932 @lisp
4933 (setq gnus-auto-subscribed-groups
4934       "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
4935 @end lisp
4937 @end itemize
4939 @node nnmairix caveats
4940 @subsubsection nnmairix caveats
4942 @itemize
4943 @item
4944 If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
4945 @code{nnmairix} groups (though I have no idea what happens if you do).
4947 @item
4948 If you use the Gnus registry: don't use the registry with
4949 @code{nnmairix} groups (put them in
4950 @code{gnus-registry-unfollowed-groups}).  Be @strong{extra careful} if
4951 you use @code{gnus-registry-split-fancy-with-parent} - mails which are
4952 split into @code{nnmairix} groups are usually gone for good as soon as
4953 you check the group for new mail (yes, it has happened to me...).
4955 @item
4956 Therefore: @strong{Never ever} put ``real'' mails into @code{nnmairix}
4957 groups (you shouldn't be able to, anyway).
4959 @item
4960 mairix does only support us-ascii characters.
4962 @item
4963 @code{nnmairix} uses a rather brute force method to force Gnus to
4964 completely reread the group on the mail back end after mairix was
4965 called - it simply deletes and re-creates the group on the mail
4966 back end. So far, this has worked for me without any problems, and I
4967 don't see how @code{nnmairix} could delete other mail groups than its
4968 own, but anyway: you really should have a backup of your mail
4969 folders.
4971 @item
4972 All necessary information is stored in the group parameters
4973 (@pxref{Group Parameters}). This has the advantage that no active file
4974 is needed, but also implies that when you kill a @code{nnmairix} group,
4975 it is gone for good.
4977 @item
4978 @findex nnmairix-purge-old-groups
4979 If you create and kill a lot of @code{nnmairix} groups, the
4980 ``zz_mairix-*'' groups will accumulate on the mail back end server. To
4981 delete old groups which are no longer needed, call
4982 @code{nnmairix-purge-old-groups}. Note that this assumes that you don't
4983 save any ``real'' mail in folders of the form
4984 @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
4985 @code{nnmairix} groups by changing the variable
4986 @code{nnmairix-group-prefix}.
4988 @item
4989 The following only applies if you @strong{don't} use the mentioned patch
4990 for mairix (@pxref{Propagating marks}):
4992 A problem can occur when using @code{nnmairix} with maildir folders and
4993 comes with the fact that maildir stores mail flags like @samp{Seen} or
4994 @samp{Replied} by appending chars @samp{S} and @samp{R} to the message
4995 file name, respectively. This implies that currently you would have to
4996 update the mairix database not only when new mail arrives, but also when
4997 mail flags are changing. The same applies to new mails which are indexed
4998 while they are still in the @samp{new} folder but then get moved to
4999 @samp{cur} when Gnus has seen the mail. If you don't update the database
5000 after this has happened, a mairix query can lead to symlinks pointing to
5001 non-existing files. In Gnus, these messages will usually appear with
5002 ``(none)'' entries in the header and can't be accessed. If this happens
5003 to you, using @kbd{G b u} and updating the group will usually fix this.
5005 @end itemize
5007 @node Misc Group Stuff
5008 @section Misc Group Stuff
5010 @menu
5011 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
5012 * Group Information::           Information and help on groups and Gnus.
5013 * Group Timestamp::             Making Gnus keep track of when you last read a group.
5014 * File Commands::               Reading and writing the Gnus files.
5015 * Sieve Commands::              Managing Sieve scripts.
5016 @end menu
5018 @table @kbd
5020 @item v
5021 @kindex v (Group)
5022 @cindex keys, reserved for users (Group)
5023 The key @kbd{v} is reserved for users.  You can bind it to some
5024 command or better use it as a prefix key.  For example:
5026 @lisp
5027 (define-key gnus-group-mode-map (kbd "v j d")
5028   (lambda ()
5029     (interactive)
5030     (gnus-group-jump-to-group "nndraft:drafts")))
5031 @end lisp
5033 On keys reserved for users in Emacs and on keybindings in general
5034 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
5036 @item ^
5037 @kindex ^ (Group)
5038 @findex gnus-group-enter-server-mode
5039 Enter the server buffer (@code{gnus-group-enter-server-mode}).
5040 @xref{Server Buffer}.
5042 @item a
5043 @kindex a (Group)
5044 @findex gnus-group-post-news
5045 Start composing a message (a news by default)
5046 (@code{gnus-group-post-news}).  If given a prefix, post to the group
5047 under the point.  If the prefix is 1, prompt for a group to post to.
5048 Contrary to what the name of this function suggests, the prepared
5049 article might be a mail instead of a news, if a mail group is specified
5050 with the prefix argument.  @xref{Composing Messages}.
5052 @item m
5053 @kindex m (Group)
5054 @findex gnus-group-mail
5055 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
5056 use the posting style of the group under the point.  If the prefix is 1,
5057 prompt for a group name to find the posting style.
5058 @xref{Composing Messages}.
5060 @item i
5061 @kindex i (Group)
5062 @findex gnus-group-news
5063 Start composing a news (@code{gnus-group-news}).  If given a prefix,
5064 post to the group under the point.  If the prefix is 1, prompt
5065 for group to post to.  @xref{Composing Messages}.
5067 This function actually prepares a news even when using mail groups.
5068 This is useful for ``posting'' messages to mail groups without actually
5069 sending them over the network: they're just saved directly to the group
5070 in question.  The corresponding back end must have a request-post method
5071 for this to work though.
5073 @item G z
5074 @kindex G z (Group)
5075 @findex gnus-group-compact-group
5077 Compact the group under point (@code{gnus-group-compact-group}).
5078 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
5079 gaps between article numbers, hence getting a correct total article
5080 count.
5082 @end table
5084 Variables for the group buffer:
5086 @table @code
5088 @item gnus-group-mode-hook
5089 @vindex gnus-group-mode-hook
5090 is called after the group buffer has been
5091 created.
5093 @item gnus-group-prepare-hook
5094 @vindex gnus-group-prepare-hook
5095 is called after the group buffer is
5096 generated.  It may be used to modify the buffer in some strange,
5097 unnatural way.
5099 @item gnus-group-prepared-hook
5100 @vindex gnus-group-prepare-hook
5101 is called as the very last thing after the group buffer has been
5102 generated.  It may be used to move point around, for instance.
5104 @item gnus-permanently-visible-groups
5105 @vindex gnus-permanently-visible-groups
5106 Groups matching this regexp will always be listed in the group buffer,
5107 whether they are empty or not.
5109 @end table
5111 @node Scanning New Messages
5112 @subsection Scanning New Messages
5113 @cindex new messages
5114 @cindex scanning new news
5116 @table @kbd
5118 @item g
5119 @kindex g (Group)
5120 @findex gnus-group-get-new-news
5121 @c @icon{gnus-group-get-new-news}
5122 Check the server(s) for new articles.  If the numerical prefix is used,
5123 this command will check only groups of level @var{arg} and lower
5124 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
5125 command will force a total re-reading of the active file(s) from the
5126 back end(s).
5128 @item M-g
5129 @kindex M-g (Group)
5130 @findex gnus-group-get-new-news-this-group
5131 @vindex gnus-goto-next-group-when-activating
5132 @c @icon{gnus-group-get-new-news-this-group}
5133 Check whether new articles have arrived in the current group
5134 (@code{gnus-group-get-new-news-this-group}).
5135 @code{gnus-goto-next-group-when-activating} says whether this command is
5136 to move point to the next group or not.  It is @code{t} by default.
5138 @findex gnus-activate-all-groups
5139 @cindex activating groups
5140 @item C-c M-g
5141 @kindex C-c M-g (Group)
5142 Activate absolutely all groups (@code{gnus-activate-all-groups}).
5144 @item R
5145 @kindex R (Group)
5146 @cindex restarting
5147 @findex gnus-group-restart
5148 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
5149 file(s), closes the connection to all servers, clears up all run-time
5150 Gnus variables, and then starts Gnus all over again.
5152 @end table
5154 @vindex gnus-get-new-news-hook
5155 @code{gnus-get-new-news-hook} is run just before checking for new news.
5157 @vindex gnus-after-getting-new-news-hook
5158 @code{gnus-after-getting-new-news-hook} is run after checking for new
5159 news.
5162 @node Group Information
5163 @subsection Group Information
5164 @cindex group information
5165 @cindex information on groups
5167 @table @kbd
5170 @item H f
5171 @kindex H f (Group)
5172 @findex gnus-group-fetch-faq
5173 @vindex gnus-group-faq-directory
5174 @cindex FAQ
5175 @cindex ange-ftp
5176 Try to fetch the @acronym{FAQ} for the current group
5177 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
5178 from @code{gnus-group-faq-directory}, which is usually a directory on
5179 a remote machine.  This variable can also be a list of directories.
5180 In that case, giving a prefix to this command will allow you to choose
5181 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
5182 used for fetching the file.
5184 If fetching from the first site is unsuccessful, Gnus will attempt to go
5185 through @code{gnus-group-faq-directory} and try to open them one by one.
5187 @item H c
5188 @kindex H c (Group)
5189 @findex gnus-group-fetch-charter
5190 @vindex gnus-group-charter-alist
5191 @cindex charter
5192 Try to open the charter for the current group in a web browser
5193 (@code{gnus-group-fetch-charter}).  Query for a group if given a
5194 prefix argument.
5196 Gnus will use @code{gnus-group-charter-alist} to find the location of
5197 the charter.  If no location is known, Gnus will fetch the control
5198 messages for the group, which in some cases includes the charter.
5200 @item H C
5201 @kindex H C (Group)
5202 @findex gnus-group-fetch-control
5203 @vindex gnus-group-fetch-control-use-browse-url
5204 @cindex control message
5205 Fetch the control messages for the group from the archive at
5206 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
5207 group if given a prefix argument.
5209 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
5210 Gnus will open the control messages in a browser using
5211 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
5212 and displayed in an ephemeral group.
5214 Note that the control messages are compressed.  To use this command
5215 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
5216 Files, ,Compressed Files, emacs, The Emacs Manual}).
5218 @item H d
5219 @itemx C-c C-d
5220 @c @icon{gnus-group-describe-group}
5221 @kindex H d (Group)
5222 @kindex C-c C-d (Group)
5223 @cindex describing groups
5224 @cindex group description
5225 @findex gnus-group-describe-group
5226 Describe the current group (@code{gnus-group-describe-group}).  If given
5227 a prefix, force Gnus to re-read the description from the server.
5229 @item M-d
5230 @kindex M-d (Group)
5231 @findex gnus-group-describe-all-groups
5232 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
5233 prefix, force Gnus to re-read the description file from the server.
5235 @item H v
5236 @itemx V
5237 @kindex V (Group)
5238 @kindex H v (Group)
5239 @cindex version
5240 @findex gnus-version
5241 Display current Gnus version numbers (@code{gnus-version}).
5243 @item ?
5244 @kindex ? (Group)
5245 @findex gnus-group-describe-briefly
5246 Give a very short help message (@code{gnus-group-describe-briefly}).
5248 @item C-c C-i
5249 @kindex C-c C-i (Group)
5250 @cindex info
5251 @cindex manual
5252 @findex gnus-info-find-node
5253 Go to the Gnus info node (@code{gnus-info-find-node}).
5254 @end table
5257 @node Group Timestamp
5258 @subsection Group Timestamp
5259 @cindex timestamps
5260 @cindex group timestamps
5262 It can be convenient to let Gnus keep track of when you last read a
5263 group.  To set the ball rolling, you should add
5264 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
5266 @lisp
5267 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
5268 @end lisp
5270 After doing this, each time you enter a group, it'll be recorded.
5272 This information can be displayed in various ways---the easiest is to
5273 use the @samp{%d} spec in the group line format:
5275 @lisp
5276 (setq gnus-group-line-format
5277       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
5278 @end lisp
5280 This will result in lines looking like:
5282 @example
5283 *        0: mail.ding                                19961002T012943
5284          0: custom                                   19961002T012713
5285 @end example
5287 As you can see, the date is displayed in compact ISO 8601 format.  This
5288 may be a bit too much, so to just display the date, you could say
5289 something like:
5291 @lisp
5292 (setq gnus-group-line-format
5293       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
5294 @end lisp
5296 If you would like greater control of the time format, you can use a
5297 user-defined format spec.  Something like the following should do the
5298 trick:
5300 @lisp
5301 (setq gnus-group-line-format
5302       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
5303 (defun gnus-user-format-function-d (headers)
5304   (let ((time (gnus-group-timestamp gnus-tmp-group)))
5305     (if time
5306         (format-time-string "%b %d  %H:%M" time)
5307       "")))
5308 @end lisp
5311 @node File Commands
5312 @subsection File Commands
5313 @cindex file commands
5315 @table @kbd
5317 @item r
5318 @kindex r (Group)
5319 @findex gnus-group-read-init-file
5320 @vindex gnus-init-file
5321 @cindex reading init file
5322 Re-read the init file (@code{gnus-init-file}, which defaults to
5323 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
5325 @item s
5326 @kindex s (Group)
5327 @findex gnus-group-save-newsrc
5328 @cindex saving .newsrc
5329 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
5330 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
5331 file(s) whether Gnus thinks it is necessary or not.
5333 @c @item Z
5334 @c @kindex Z (Group)
5335 @c @findex gnus-group-clear-dribble
5336 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
5338 @end table
5341 @node Sieve Commands
5342 @subsection Sieve Commands
5343 @cindex group sieve commands
5345 Sieve is a server-side mail filtering language.  In Gnus you can use
5346 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
5347 sieve rules that should apply to each group.  Gnus provides two
5348 commands to translate all these group parameters into a proper Sieve
5349 script that can be transfered to the server somehow.
5351 @vindex gnus-sieve-file
5352 @vindex gnus-sieve-region-start
5353 @vindex gnus-sieve-region-end
5354 The generated Sieve script is placed in @code{gnus-sieve-file} (by
5355 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
5356 between two delimiters, @code{gnus-sieve-region-start} and
5357 @code{gnus-sieve-region-end}, so you may write additional Sieve code
5358 outside these delimiters that will not be removed the next time you
5359 regenerate the Sieve script.
5361 @vindex gnus-sieve-crosspost
5362 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
5363 is generated.  If it is non-@code{nil} (the default) articles is
5364 placed in all groups that have matching rules, otherwise the article
5365 is only placed in the group with the first matching rule.  For
5366 example, the group parameter @samp{(sieve address "sender"
5367 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
5368 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
5369 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
5370 except that the line containing the call to @code{stop} is removed.)
5372 @example
5373 if address "sender" "owner-ding@@hpc.uh.edu" @{
5374         fileinto "INBOX.ding";
5375         stop;
5377 @end example
5379 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
5381 @table @kbd
5383 @item D g
5384 @kindex D g (Group)
5385 @findex gnus-sieve-generate
5386 @vindex gnus-sieve-file
5387 @cindex generating sieve script
5388 Regenerate a Sieve script from the @code{sieve} group parameters and
5389 put you into the @code{gnus-sieve-file} without saving it.
5391 @item D u
5392 @kindex D u (Group)
5393 @findex gnus-sieve-update
5394 @vindex gnus-sieve-file
5395 @cindex updating sieve script
5396 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
5397 @code{sieve} group parameters, save the file and upload it to the
5398 server using the @code{sieveshell} program.
5400 @end table
5403 @node Summary Buffer
5404 @chapter Summary Buffer
5405 @cindex summary buffer
5407 A line for each article is displayed in the summary buffer.  You can
5408 move around, read articles, post articles and reply to articles.
5410 The most common way to a summary buffer is to select a group from the
5411 group buffer (@pxref{Selecting a Group}).
5413 You can have as many summary buffers open as you wish.
5415 You can customize the Summary Mode tool bar, see @kbd{M-x
5416 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
5417 available in Emacs.
5419 @kindex v (Summary)
5420 @cindex keys, reserved for users (Summary)
5421 The key @kbd{v} is reserved for users.  You can bind it to some
5422 command or better use it as a prefix key.  For example:
5423 @lisp
5424 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
5425 @end lisp
5427 @menu
5428 * Summary Buffer Format::       Deciding how the summary buffer is to look.
5429 * Summary Maneuvering::         Moving around the summary buffer.
5430 * Choosing Articles::           Reading articles.
5431 * Paging the Article::          Scrolling the current article.
5432 * Reply Followup and Post::     Posting articles.
5433 * Delayed Articles::            Send articles at a later time.
5434 * Marking Articles::            Marking articles as read, expirable, etc.
5435 * Limiting::                    You can limit the summary buffer.
5436 * Threading::                   How threads are made.
5437 * Sorting the Summary Buffer::  How articles and threads are sorted.
5438 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
5439 * Article Caching::             You may store articles in a cache.
5440 * Persistent Articles::         Making articles expiry-resistant.
5441 * Sticky Articles::             Article buffers that are not reused.
5442 * Article Backlog::             Having already read articles hang around.
5443 * Saving Articles::             Ways of customizing article saving.
5444 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
5445 * Article Treatment::           The article buffer can be mangled at will.
5446 * MIME Commands::               Doing MIMEy things with the articles.
5447 * Charsets::                    Character set issues.
5448 * Article Commands::            Doing various things with the article buffer.
5449 * Summary Sorting::             Sorting the summary buffer in various ways.
5450 * Finding the Parent::          No child support? Get the parent.
5451 * Alternative Approaches::      Reading using non-default summaries.
5452 * Tree Display::                A more visual display of threads.
5453 * Mail Group Commands::         Some commands can only be used in mail groups.
5454 * Various Summary Stuff::       What didn't fit anywhere else.
5455 * Exiting the Summary Buffer::  Returning to the Group buffer,
5456                                 or reselecting the current group.
5457 * Crosspost Handling::          How crossposted articles are dealt with.
5458 * Duplicate Suppression::       An alternative when crosspost handling fails.
5459 * Security::                    Decrypt and Verify.
5460 * Mailing List::                Mailing list minor mode.
5461 @end menu
5464 @node Summary Buffer Format
5465 @section Summary Buffer Format
5466 @cindex summary buffer format
5468 @iftex
5469 @iflatex
5470 \gnusfigure{The Summary Buffer}{180}{
5471 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
5472 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
5474 @end iflatex
5475 @end iftex
5477 @menu
5478 * Summary Buffer Lines::        You can specify how summary lines should look.
5479 * To From Newsgroups::          How to not display your own name.
5480 * Summary Buffer Mode Line::    You can say how the mode line should look.
5481 * Summary Highlighting::        Making the summary buffer all pretty and nice.
5482 @end menu
5484 @findex mail-extract-address-components
5485 @findex gnus-extract-address-components
5486 @vindex gnus-extract-address-components
5487 Gnus will use the value of the @code{gnus-extract-address-components}
5488 variable as a function for getting the name and address parts of a
5489 @code{From} header.  Two pre-defined functions exist:
5490 @code{gnus-extract-address-components}, which is the default, quite
5491 fast, and too simplistic solution; and
5492 @code{mail-extract-address-components}, which works very nicely, but is
5493 slower.  The default function will return the wrong answer in 5% of the
5494 cases.  If this is unacceptable to you, use the other function instead:
5496 @lisp
5497 (setq gnus-extract-address-components
5498       'mail-extract-address-components)
5499 @end lisp
5501 @vindex gnus-summary-same-subject
5502 @code{gnus-summary-same-subject} is a string indicating that the current
5503 article has the same subject as the previous.  This string will be used
5504 with those specs that require it.  The default is @code{""}.
5507 @node Summary Buffer Lines
5508 @subsection Summary Buffer Lines
5510 @vindex gnus-summary-line-format
5511 You can change the format of the lines in the summary buffer by changing
5512 the @code{gnus-summary-line-format} variable.  It works along the same
5513 lines as a normal @code{format} string, with some extensions
5514 (@pxref{Formatting Variables}).
5516 There should always be a colon or a point position marker on the line;
5517 the cursor always moves to the point position marker or the colon after
5518 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
5519 possible to change this.  Just write a new function
5520 @code{gnus-goto-colon} which does whatever you like with the cursor.)
5521 @xref{Positioning Point}.
5523 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
5525 The following format specification characters and extended format
5526 specification(s) are understood:
5528 @table @samp
5529 @item N
5530 Article number.
5531 @item S
5532 Subject string.  List identifiers stripped,
5533 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
5534 @item s
5535 Subject if the article is the root of the thread or the previous article
5536 had a different subject, @code{gnus-summary-same-subject} otherwise.
5537 (@code{gnus-summary-same-subject} defaults to @code{""}.)
5538 @item F
5539 Full @code{From} header.
5540 @item n
5541 The name (from the @code{From} header).
5542 @item f
5543 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
5544 From Newsgroups}).
5545 @item a
5546 The name (from the @code{From} header).  This differs from the @code{n}
5547 spec in that it uses the function designated by the
5548 @code{gnus-extract-address-components} variable, which is slower, but
5549 may be more thorough.
5550 @item A
5551 The address (from the @code{From} header).  This works the same way as
5552 the @code{a} spec.
5553 @item L
5554 Number of lines in the article.
5555 @item c
5556 Number of characters in the article.  This specifier is not supported
5557 in some methods (like nnfolder).
5558 @item k
5559 Pretty-printed version of the number of characters in the article;
5560 for example, @samp{1.2k} or @samp{0.4M}.
5561 @item I
5562 Indentation based on thread level (@pxref{Customizing Threading}).
5563 @item B
5564 A complex trn-style thread tree, showing response-connecting trace
5565 lines.  A thread could be drawn like this:
5567 @example
5570 | +->
5571 | | \->
5572 | |   \->
5573 | \->
5576 @end example
5578 You can customize the appearance with the following options.  Note
5579 that it is possible to make the thread display look really neat by
5580 replacing the default @acronym{ASCII} characters with graphic
5581 line-drawing glyphs.
5582 @table @code
5583 @item gnus-sum-thread-tree-root
5584 @vindex gnus-sum-thread-tree-root
5585 Used for the root of a thread.  If @code{nil}, use subject
5586 instead.  The default is @samp{> }.
5588 @item gnus-sum-thread-tree-false-root
5589 @vindex gnus-sum-thread-tree-false-root
5590 Used for the false root of a thread (@pxref{Loose Threads}).  If
5591 @code{nil}, use subject instead.  The default is @samp{> }.
5593 @item gnus-sum-thread-tree-single-indent
5594 @vindex gnus-sum-thread-tree-single-indent
5595 Used for a thread with just one message.  If @code{nil}, use subject
5596 instead.  The default is @samp{}.
5598 @item gnus-sum-thread-tree-vertical
5599 @vindex gnus-sum-thread-tree-vertical
5600 Used for drawing a vertical line.  The default is @samp{| }.
5602 @item gnus-sum-thread-tree-indent
5603 @vindex gnus-sum-thread-tree-indent
5604 Used for indenting.  The default is @samp{  }.
5606 @item gnus-sum-thread-tree-leaf-with-other
5607 @vindex gnus-sum-thread-tree-leaf-with-other
5608 Used for a leaf with brothers.  The default is @samp{+-> }.
5610 @item gnus-sum-thread-tree-single-leaf
5611 @vindex gnus-sum-thread-tree-single-leaf
5612 Used for a leaf without brothers.  The default is @samp{\-> }
5614 @end table
5616 @item T
5617 Nothing if the article is a root and lots of spaces if it isn't (it
5618 pushes everything after it off the screen).
5619 @item [
5620 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
5621 for adopted articles (@pxref{Customizing Threading}).
5622 @item ]
5623 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
5624 for adopted articles.
5625 @item >
5626 One space for each thread level.
5627 @item <
5628 Twenty minus thread level spaces.
5629 @item U
5630 Unread.  @xref{Read Articles}.
5632 @item R
5633 This misleadingly named specifier is the @dfn{secondary mark}.  This
5634 mark will say whether the article has been replied to, has been cached,
5635 or has been saved.  @xref{Other Marks}.
5637 @item i
5638 Score as a number (@pxref{Scoring}).
5639 @item z
5640 @vindex gnus-summary-zcore-fuzz
5641 Zcore, @samp{+} if above the default level and @samp{-} if below the
5642 default level.  If the difference between
5643 @code{gnus-summary-default-score} and the score is less than
5644 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
5645 @item V
5646 Total thread score.
5647 @item x
5648 @code{Xref}.
5649 @item D
5650 @code{Date}.
5651 @item d
5652 The @code{Date} in @code{DD-MMM} format.
5653 @item o
5654 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
5655 @item M
5656 @code{Message-ID}.
5657 @item r
5658 @code{References}.
5659 @item t
5660 Number of articles in the current sub-thread.  Using this spec will slow
5661 down summary buffer generation somewhat.
5662 @item e
5663 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
5664 article has any children.
5665 @item P
5666 The line number.
5667 @item O
5668 Download mark.
5669 @item *
5670 Desired cursor position (instead of after first colon).
5671 @item &user-date;
5672 Age sensitive date format.  Various date format is defined in
5673 @code{gnus-user-date-format-alist}.
5674 @item u
5675 User defined specifier.  The next character in the format string should
5676 be a letter.  Gnus will call the function
5677 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
5678 following @samp{%u}.  The function will be passed the current header as
5679 argument.  The function should return a string, which will be inserted
5680 into the summary just like information from any other summary specifier.
5681 @end table
5683 Text between @samp{%(} and @samp{%)} will be highlighted with
5684 @code{gnus-mouse-face} when the mouse point is placed inside the area.
5685 There can only be one such area.
5687 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
5688 have to be handled with care.  For reasons of efficiency, Gnus will
5689 compute what column these characters will end up in, and ``hard-code''
5690 that.  This means that it is invalid to have these specs after a
5691 variable-length spec.  Well, you might not be arrested, but your summary
5692 buffer will look strange, which is bad enough.
5694 The smart choice is to have these specs as far to the left as possible.
5695 (Isn't that the case with everything, though?  But I digress.)
5697 This restriction may disappear in later versions of Gnus.
5700 @node To From Newsgroups
5701 @subsection To From Newsgroups
5702 @cindex To
5703 @cindex Newsgroups
5705 In some groups (particularly in archive groups), the @code{From} header
5706 isn't very interesting, since all the articles there are written by
5707 you.  To display the information in the @code{To} or @code{Newsgroups}
5708 headers instead, you need to decide three things: What information to
5709 gather; where to display it; and when to display it.
5711 @enumerate
5712 @item
5713 @vindex gnus-extra-headers
5714 The reading of extra header information is controlled by the
5715 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5716 instance:
5718 @lisp
5719 (setq gnus-extra-headers
5720       '(To Newsgroups X-Newsreader))
5721 @end lisp
5723 This will result in Gnus trying to obtain these three headers, and
5724 storing it in header structures for later easy retrieval.
5726 @item
5727 @findex gnus-extra-header
5728 The value of these extra headers can be accessed via the
5729 @code{gnus-extra-header} function.  Here's a format line spec that will
5730 access the @code{X-Newsreader} header:
5732 @example
5733 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5734 @end example
5736 @item
5737 @vindex gnus-ignored-from-addresses
5738 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5739 summary line spec returns the @code{To}, @code{Newsreader} or
5740 @code{From} header.  If this regexp matches the contents of the
5741 @code{From} header, the value of the @code{To} or @code{Newsreader}
5742 headers are used instead.
5744 To distinguish regular articles from those where the @code{From} field
5745 has been swapped, a string is prefixed to the @code{To} or
5746 @code{Newsgroups} header in the summary line.  By default the string is
5747 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5748 customize these strings with @code{gnus-summary-to-prefix} and
5749 @code{gnus-summary-newsgroup-prefix}.
5751 @end enumerate
5753 @vindex nnmail-extra-headers
5754 A related variable is @code{nnmail-extra-headers}, which controls when
5755 to include extra headers when generating overview (@acronym{NOV}) files.
5756 If you have old overview files, you should regenerate them after
5757 changing this variable, by entering the server buffer using @kbd{^},
5758 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
5759 regeneration.
5761 @vindex gnus-summary-line-format
5762 You also have to instruct Gnus to display the data by changing the
5763 @code{%n} spec to the @code{%f} spec in the
5764 @code{gnus-summary-line-format} variable.
5766 In summary, you'd typically put something like the following in
5767 @file{~/.gnus.el}:
5769 @lisp
5770 (setq gnus-extra-headers
5771       '(To Newsgroups))
5772 (setq nnmail-extra-headers gnus-extra-headers)
5773 (setq gnus-summary-line-format
5774       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5775 (setq gnus-ignored-from-addresses
5776       "Your Name Here")
5777 @end lisp
5779 (The values listed above are the default values in Gnus.  Alter them
5780 to fit your needs.)
5782 A note for news server administrators, or for users who wish to try to
5783 convince their news server administrator to provide some additional
5784 support:
5786 The above is mostly useful for mail groups, where you have control over
5787 the @acronym{NOV} files that are created.  However, if you can persuade your
5788 nntp admin to add (in the usual implementation, notably INN):
5790 @example
5791 Newsgroups:full
5792 @end example
5794 to the end of her @file{overview.fmt} file, then you can use that just
5795 as you would the extra headers from the mail groups.
5798 @node Summary Buffer Mode Line
5799 @subsection Summary Buffer Mode Line
5801 @vindex gnus-summary-mode-line-format
5802 You can also change the format of the summary mode bar (@pxref{Mode Line
5803 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5804 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5806 Here are the elements you can play with:
5808 @table @samp
5809 @item G
5810 Group name.
5811 @item p
5812 Unprefixed group name.
5813 @item A
5814 Current article number.
5815 @item z
5816 Current article score.
5817 @item V
5818 Gnus version.
5819 @item U
5820 Number of unread articles in this group.
5821 @item e
5822 Number of unread articles in this group that aren't displayed in the
5823 summary buffer.
5824 @item Z
5825 A string with the number of unread and unselected articles represented
5826 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5827 articles, and just as @samp{<%U more>} if there are just unread articles
5828 and no unselected ones.
5829 @item g
5830 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5831 shortened to @samp{r.a.anime}.
5832 @item S
5833 Subject of the current article.
5834 @item u
5835 User-defined spec (@pxref{User-Defined Specs}).
5836 @item s
5837 Name of the current score file (@pxref{Scoring}).
5838 @item d
5839 Number of dormant articles (@pxref{Unread Articles}).
5840 @item t
5841 Number of ticked articles (@pxref{Unread Articles}).
5842 @item r
5843 Number of articles that have been marked as read in this session.
5844 @item E
5845 Number of articles expunged by the score files.
5846 @end table
5849 @node Summary Highlighting
5850 @subsection Summary Highlighting
5852 @table @code
5854 @item gnus-visual-mark-article-hook
5855 @vindex gnus-visual-mark-article-hook
5856 This hook is run after selecting an article.  It is meant to be used for
5857 highlighting the article in some way.  It is not run if
5858 @code{gnus-visual} is @code{nil}.
5860 @item gnus-summary-update-hook
5861 @vindex gnus-summary-update-hook
5862 This hook is called when a summary line is changed.  It is not run if
5863 @code{gnus-visual} is @code{nil}.
5865 @item gnus-summary-selected-face
5866 @vindex gnus-summary-selected-face
5867 This is the face (or @dfn{font} as some people call it) used to
5868 highlight the current article in the summary buffer.
5870 @item gnus-summary-highlight
5871 @vindex gnus-summary-highlight
5872 Summary lines are highlighted according to this variable, which is a
5873 list where the elements are of the format @code{(@var{form}
5874 . @var{face})}.  If you would, for instance, like ticked articles to be
5875 italic and high-scored articles to be bold, you could set this variable
5876 to something like
5877 @lisp
5878 (((eq mark gnus-ticked-mark) . italic)
5879  ((> score default) . bold))
5880 @end lisp
5881 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5882 @var{face} will be applied to the line.
5883 @end table
5886 @node Summary Maneuvering
5887 @section Summary Maneuvering
5888 @cindex summary movement
5890 All the straight movement commands understand the numeric prefix and
5891 behave pretty much as you'd expect.
5893 None of these commands select articles.
5895 @table @kbd
5896 @item G M-n
5897 @itemx M-n
5898 @kindex M-n (Summary)
5899 @kindex G M-n (Summary)
5900 @findex gnus-summary-next-unread-subject
5901 Go to the next summary line of an unread article
5902 (@code{gnus-summary-next-unread-subject}).
5904 @item G M-p
5905 @itemx M-p
5906 @kindex M-p (Summary)
5907 @kindex G M-p (Summary)
5908 @findex gnus-summary-prev-unread-subject
5909 Go to the previous summary line of an unread article
5910 (@code{gnus-summary-prev-unread-subject}).
5912 @item G g
5913 @kindex G g (Summary)
5914 @findex gnus-summary-goto-subject
5915 Ask for an article number and then go to the summary line of that article
5916 without displaying the article (@code{gnus-summary-goto-subject}).
5917 @end table
5919 If Gnus asks you to press a key to confirm going to the next group, you
5920 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5921 buffer, searching for the next group to read without actually returning
5922 to the group buffer.
5924 Variables related to summary movement:
5926 @table @code
5928 @vindex gnus-auto-select-next
5929 @item gnus-auto-select-next
5930 If you issue one of the movement commands (like @kbd{n}) and there are
5931 no more unread articles after the current one, Gnus will offer to go to
5932 the next group.  If this variable is @code{t} and the next group is
5933 empty, Gnus will exit summary mode and return to the group buffer.  If
5934 this variable is neither @code{t} nor @code{nil}, Gnus will select the
5935 next group with unread articles.  As a special case, if this variable
5936 is @code{quietly}, Gnus will select the next group without asking for
5937 confirmation.  If this variable is @code{almost-quietly}, the same
5938 will happen only if you are located on the last article in the group.
5939 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
5940 command will go to the next group without confirmation.  Also
5941 @pxref{Group Levels}.
5943 @item gnus-auto-select-same
5944 @vindex gnus-auto-select-same
5945 If non-@code{nil}, all the movement commands will try to go to the next
5946 article with the same subject as the current.  (@dfn{Same} here might
5947 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
5948 for details (@pxref{Customizing Threading}).)  If there are no more
5949 articles with the same subject, go to the first unread article.
5951 This variable is not particularly useful if you use a threaded display.
5953 @item gnus-summary-check-current
5954 @vindex gnus-summary-check-current
5955 If non-@code{nil}, all the ``unread'' movement commands will not proceed
5956 to the next (or previous) article if the current article is unread.
5957 Instead, they will choose the current article.
5959 @item gnus-auto-center-summary
5960 @vindex gnus-auto-center-summary
5961 If non-@code{nil}, Gnus will keep the point in the summary buffer
5962 centered at all times.  This makes things quite tidy, but if you have a
5963 slow network connection, or simply do not like this un-Emacsism, you can
5964 set this variable to @code{nil} to get the normal Emacs scrolling
5965 action.  This will also inhibit horizontal re-centering of the summary
5966 buffer, which might make it more inconvenient to read extremely long
5967 threads.
5969 This variable can also be a number.  In that case, center the window at
5970 the given number of lines from the top.
5972 @end table
5975 @node Choosing Articles
5976 @section Choosing Articles
5977 @cindex selecting articles
5979 @menu
5980 * Choosing Commands::           Commands for choosing articles.
5981 * Choosing Variables::          Variables that influence these commands.
5982 @end menu
5985 @node Choosing Commands
5986 @subsection Choosing Commands
5988 None of the following movement commands understand the numeric prefix,
5989 and they all select and display an article.
5991 If you want to fetch new articles or redisplay the group, see
5992 @ref{Exiting the Summary Buffer}.
5994 @table @kbd
5995 @item SPACE
5996 @kindex SPACE (Summary)
5997 @findex gnus-summary-next-page
5998 Select the current article, or, if that one's read already, the next
5999 unread article (@code{gnus-summary-next-page}).
6001 If you have an article window open already and you press @kbd{SPACE}
6002 again, the article will be scrolled.  This lets you conveniently
6003 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
6005 @item G n
6006 @itemx n
6007 @kindex n (Summary)
6008 @kindex G n (Summary)
6009 @findex gnus-summary-next-unread-article
6010 @c @icon{gnus-summary-next-unread}
6011 Go to next unread article (@code{gnus-summary-next-unread-article}).
6013 @item G p
6014 @itemx p
6015 @kindex p (Summary)
6016 @findex gnus-summary-prev-unread-article
6017 @c @icon{gnus-summary-prev-unread}
6018 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
6020 @item G N
6021 @itemx N
6022 @kindex N (Summary)
6023 @kindex G N (Summary)
6024 @findex gnus-summary-next-article
6025 Go to the next article (@code{gnus-summary-next-article}).
6027 @item G P
6028 @itemx P
6029 @kindex P (Summary)
6030 @kindex G P (Summary)
6031 @findex gnus-summary-prev-article
6032 Go to the previous article (@code{gnus-summary-prev-article}).
6034 @item G C-n
6035 @kindex G C-n (Summary)
6036 @findex gnus-summary-next-same-subject
6037 Go to the next article with the same subject
6038 (@code{gnus-summary-next-same-subject}).
6040 @item G C-p
6041 @kindex G C-p (Summary)
6042 @findex gnus-summary-prev-same-subject
6043 Go to the previous article with the same subject
6044 (@code{gnus-summary-prev-same-subject}).
6046 @item G f
6047 @itemx .
6048 @kindex G f  (Summary)
6049 @kindex .  (Summary)
6050 @findex gnus-summary-first-unread-article
6051 Go to the first unread article
6052 (@code{gnus-summary-first-unread-article}).
6054 @item G b
6055 @itemx ,
6056 @kindex G b (Summary)
6057 @kindex , (Summary)
6058 @findex gnus-summary-best-unread-article
6059 Go to the unread article with the highest score
6060 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
6061 go to the first unread article that has a score over the default score.
6063 @item G l
6064 @itemx l
6065 @kindex l (Summary)
6066 @kindex G l (Summary)
6067 @findex gnus-summary-goto-last-article
6068 Go to the previous article read (@code{gnus-summary-goto-last-article}).
6070 @item G o
6071 @kindex G o (Summary)
6072 @findex gnus-summary-pop-article
6073 @cindex history
6074 @cindex article history
6075 Pop an article off the summary history and go to this article
6076 (@code{gnus-summary-pop-article}).  This command differs from the
6077 command above in that you can pop as many previous articles off the
6078 history as you like, while @kbd{l} toggles the two last read articles.
6079 For a somewhat related issue (if you use these commands a lot),
6080 @pxref{Article Backlog}.
6082 @item G j
6083 @itemx j
6084 @kindex j (Summary)
6085 @kindex G j (Summary)
6086 @findex gnus-summary-goto-article
6087 Ask for an article number or @code{Message-ID}, and then go to that
6088 article (@code{gnus-summary-goto-article}).
6090 @end table
6093 @node Choosing Variables
6094 @subsection Choosing Variables
6096 Some variables relevant for moving and selecting articles:
6098 @table @code
6099 @item gnus-auto-extend-newsgroup
6100 @vindex gnus-auto-extend-newsgroup
6101 All the movement commands will try to go to the previous (or next)
6102 article, even if that article isn't displayed in the Summary buffer if
6103 this variable is non-@code{nil}.  Gnus will then fetch the article from
6104 the server and display it in the article buffer.
6106 @item gnus-select-article-hook
6107 @vindex gnus-select-article-hook
6108 This hook is called whenever an article is selected.  The default is
6109 @code{nil}.  If you would like each article to be saved in the Agent as
6110 you read it, putting @code{gnus-agent-fetch-selected-article} on this
6111 hook will do so.
6113 @item gnus-mark-article-hook
6114 @vindex gnus-mark-article-hook
6115 @findex gnus-summary-mark-unread-as-read
6116 @findex gnus-summary-mark-read-and-unread-as-read
6117 @findex gnus-unread-mark
6118 This hook is called whenever an article is selected.  It is intended to
6119 be used for marking articles as read.  The default value is
6120 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
6121 mark of almost any article you read to @code{gnus-read-mark}.  The only
6122 articles not affected by this function are ticked, dormant, and
6123 expirable articles.  If you'd instead like to just have unread articles
6124 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
6125 instead.  It will leave marks like @code{gnus-low-score-mark},
6126 @code{gnus-del-mark} (and so on) alone.
6128 @end table
6131 @node Paging the Article
6132 @section Scrolling the Article
6133 @cindex article scrolling
6135 @table @kbd
6137 @item SPACE
6138 @kindex SPACE (Summary)
6139 @findex gnus-summary-next-page
6140 Pressing @kbd{SPACE} will scroll the current article forward one page,
6141 or, if you have come to the end of the current article, will choose the
6142 next article (@code{gnus-summary-next-page}).
6144 @vindex gnus-article-boring-faces
6145 @vindex gnus-article-skip-boring
6146 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
6147 the article consists only of citations and signature, then it will be
6148 skipped; the next article will be shown instead.  You can customize
6149 what is considered uninteresting with
6150 @code{gnus-article-boring-faces}.  You can manually view the article's
6151 pages, no matter how boring, using @kbd{C-M-v}.
6153 @item DEL
6154 @kindex DEL (Summary)
6155 @findex gnus-summary-prev-page
6156 Scroll the current article back one page (@code{gnus-summary-prev-page}).
6158 @item RET
6159 @kindex RET (Summary)
6160 @findex gnus-summary-scroll-up
6161 Scroll the current article one line forward
6162 (@code{gnus-summary-scroll-up}).
6164 @item M-RET
6165 @kindex M-RET (Summary)
6166 @findex gnus-summary-scroll-down
6167 Scroll the current article one line backward
6168 (@code{gnus-summary-scroll-down}).
6170 @item A g
6171 @itemx g
6172 @kindex A g (Summary)
6173 @kindex g (Summary)
6174 @findex gnus-summary-show-article
6175 @vindex gnus-summary-show-article-charset-alist
6176 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
6177 given a prefix, fetch the current article, but don't run any of the
6178 article treatment functions.  This will give you a ``raw'' article, just
6179 the way it came from the server.
6181 If given a numerical prefix, you can do semi-manual charset stuff.
6182 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
6183 encoded in the @code{cn-gb-2312} charset.  If you have
6185 @lisp
6186 (setq gnus-summary-show-article-charset-alist
6187       '((1 . cn-gb-2312)
6188         (2 . big5)))
6189 @end lisp
6191 then you can say @kbd{C-u 1 g} to get the same effect.
6193 @item A <
6194 @itemx <
6195 @kindex < (Summary)
6196 @kindex A < (Summary)
6197 @findex gnus-summary-beginning-of-article
6198 Scroll to the beginning of the article
6199 (@code{gnus-summary-beginning-of-article}).
6201 @item A >
6202 @itemx >
6203 @kindex > (Summary)
6204 @kindex A > (Summary)
6205 @findex gnus-summary-end-of-article
6206 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
6208 @item A s
6209 @itemx s
6210 @kindex A s (Summary)
6211 @kindex s (Summary)
6212 @findex gnus-summary-isearch-article
6213 Perform an isearch in the article buffer
6214 (@code{gnus-summary-isearch-article}).
6216 @item h
6217 @kindex h (Summary)
6218 @findex gnus-summary-select-article-buffer
6219 Select the article buffer (@code{gnus-summary-select-article-buffer}).
6221 @end table
6224 @node Reply Followup and Post
6225 @section Reply, Followup and Post
6227 @menu
6228 * Summary Mail Commands::       Sending mail.
6229 * Summary Post Commands::       Sending news.
6230 * Summary Message Commands::    Other Message-related commands.
6231 * Canceling and Superseding::
6232 @end menu
6235 @node Summary Mail Commands
6236 @subsection Summary Mail Commands
6237 @cindex mail
6238 @cindex composing mail
6240 Commands for composing a mail message:
6242 @table @kbd
6244 @item S r
6245 @itemx r
6246 @kindex S r (Summary)
6247 @kindex r (Summary)
6248 @findex gnus-summary-reply
6249 @c @icon{gnus-summary-mail-reply}
6250 @c @icon{gnus-summary-reply}
6251 Mail a reply to the author of the current article
6252 (@code{gnus-summary-reply}).
6254 @item S R
6255 @itemx R
6256 @kindex R (Summary)
6257 @kindex S R (Summary)
6258 @findex gnus-summary-reply-with-original
6259 @c @icon{gnus-summary-reply-with-original}
6260 Mail a reply to the author of the current article and include the
6261 original message (@code{gnus-summary-reply-with-original}).  This
6262 command uses the process/prefix convention.
6264 @item S w
6265 @kindex S w (Summary)
6266 @findex gnus-summary-wide-reply
6267 Mail a wide reply to the author of the current article
6268 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
6269 goes out to all people listed in the @code{To}, @code{From} (or
6270 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
6271 present, that's used instead.
6273 @item S W
6274 @kindex S W (Summary)
6275 @findex gnus-summary-wide-reply-with-original
6276 Mail a wide reply to the current article and include the original
6277 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
6278 the process/prefix convention.
6280 @item S v
6281 @kindex S v (Summary)
6282 @findex gnus-summary-very-wide-reply
6283 Mail a very wide reply to the author of the current article
6284 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
6285 that goes out to all people listed in the @code{To}, @code{From} (or
6286 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
6287 articles.  This command uses the process/prefix convention.
6289 @item S V
6290 @kindex S V (Summary)
6291 @findex gnus-summary-very-wide-reply-with-original
6292 Mail a very wide reply to the author of the current article and include the
6293 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
6294 command uses the process/prefix convention.
6296 @item S B r
6297 @kindex S B r (Summary)
6298 @findex gnus-summary-reply-broken-reply-to
6299 Mail a reply to the author of the current article but ignore the
6300 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
6301 If you need this because a mailing list incorrectly sets a
6302 @code{Reply-To} header pointing to the list, you probably want to set
6303 the @code{broken-reply-to} group parameter instead, so things will work
6304 correctly.  @xref{Group Parameters}.
6306 @item S B R
6307 @kindex S B R (Summary)
6308 @findex gnus-summary-reply-broken-reply-to-with-original
6309 Mail a reply to the author of the current article and include the
6310 original message but ignore the @code{Reply-To} field
6311 (@code{gnus-summary-reply-broken-reply-to-with-original}).
6313 @item S o m
6314 @itemx C-c C-f
6315 @kindex S o m (Summary)
6316 @kindex C-c C-f (Summary)
6317 @findex gnus-summary-mail-forward
6318 @c @icon{gnus-summary-mail-forward}
6319 Forward the current article to some other person
6320 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
6321 is forwarded according to the value of (@code{message-forward-as-mime})
6322 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
6323 message and forward directly inline; if the prefix is 2, forward message
6324 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6325 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6326 directly inline; otherwise, the message is forwarded as no prefix given
6327 but use the flipped value of (@code{message-forward-as-mime}).  By
6328 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
6329 section.
6331 @item S m
6332 @itemx m
6333 @kindex m (Summary)
6334 @kindex S m (Summary)
6335 @findex gnus-summary-mail-other-window
6336 @c @icon{gnus-summary-mail-originate}
6337 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
6338 the posting style of the current group.  If given a prefix, disable that.
6339 If the prefix is 1, prompt for a group name to find the posting style.
6341 @item S i
6342 @itemx i
6343 @kindex i (Summary)
6344 @kindex S i (Summary)
6345 @findex gnus-summary-news-other-window
6346 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
6347 post to the current group.  If given a prefix, disable that.  If the
6348 prefix is 1, prompt for a group to post to.
6350 This function actually prepares a news even when using mail groups.
6351 This is useful for ``posting'' messages to mail groups without actually
6352 sending them over the network: they're just saved directly to the group
6353 in question.  The corresponding back end must have a request-post method
6354 for this to work though.
6356 @item S D b
6357 @kindex S D b (Summary)
6358 @findex gnus-summary-resend-bounced-mail
6359 @cindex bouncing mail
6360 If you have sent a mail, but the mail was bounced back to you for some
6361 reason (wrong address, transient failure), you can use this command to
6362 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
6363 will be popped into a mail buffer where you can edit the headers before
6364 sending the mail off again.  If you give a prefix to this command, and
6365 the bounced mail is a reply to some other mail, Gnus will try to fetch
6366 that mail and display it for easy perusal of its headers.  This might
6367 very well fail, though.
6369 @item S D r
6370 @kindex S D r (Summary)
6371 @findex gnus-summary-resend-message
6372 Not to be confused with the previous command,
6373 @code{gnus-summary-resend-message} will prompt you for an address to
6374 send the current message off to, and then send it to that place.  The
6375 headers of the message won't be altered---but lots of headers that say
6376 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
6377 means that you actually send a mail to someone that has a @code{To}
6378 header that (probably) points to yourself.  This will confuse people.
6379 So, natcherly you'll only do that if you're really eVIl.
6381 This command is mainly used if you have several accounts and want to
6382 ship a mail to a different account of yours.  (If you're both
6383 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
6384 to the @code{root} account, you may want to resend it to
6385 @code{postmaster}.  Ordnung muss sein!
6387 This command understands the process/prefix convention
6388 (@pxref{Process/Prefix}).
6390 @item S D e
6391 @kindex S D e (Summary)
6392 @findex gnus-summary-resend-message-edit
6394 Like the previous command, but will allow you to edit the message as
6395 if it were a new message before resending.
6397 @item S O m
6398 @kindex S O m (Summary)
6399 @findex gnus-uu-digest-mail-forward
6400 Digest the current series (@pxref{Decoding Articles}) and forward the
6401 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
6402 uses the process/prefix convention (@pxref{Process/Prefix}).
6404 @item S M-c
6405 @kindex S M-c (Summary)
6406 @findex gnus-summary-mail-crosspost-complaint
6407 @cindex crossposting
6408 @cindex excessive crossposting
6409 Send a complaint about excessive crossposting to the author of the
6410 current article (@code{gnus-summary-mail-crosspost-complaint}).
6412 @findex gnus-crosspost-complaint
6413 This command is provided as a way to fight back against the current
6414 crossposting pandemic that's sweeping Usenet.  It will compose a reply
6415 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
6416 command understands the process/prefix convention
6417 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
6419 @end table
6421 Also @xref{Header Commands, ,Header Commands, message, The Message
6422 Manual}, for more information.
6425 @node Summary Post Commands
6426 @subsection Summary Post Commands
6427 @cindex post
6428 @cindex composing news
6430 Commands for posting a news article:
6432 @table @kbd
6433 @item S p
6434 @itemx a
6435 @kindex a (Summary)
6436 @kindex S p (Summary)
6437 @findex gnus-summary-post-news
6438 @c @icon{gnus-summary-post-news}
6439 Prepare for posting an article (@code{gnus-summary-post-news}).  By
6440 default, post to the current group.  If given a prefix, disable that.
6441 If the prefix is 1, prompt for another group instead.
6443 @item S f
6444 @itemx f
6445 @kindex f (Summary)
6446 @kindex S f (Summary)
6447 @findex gnus-summary-followup
6448 @c @icon{gnus-summary-followup}
6449 Post a followup to the current article (@code{gnus-summary-followup}).
6451 @item S F
6452 @itemx F
6453 @kindex S F (Summary)
6454 @kindex F (Summary)
6455 @c @icon{gnus-summary-followup-with-original}
6456 @findex gnus-summary-followup-with-original
6457 Post a followup to the current article and include the original message
6458 (@code{gnus-summary-followup-with-original}).  This command uses the
6459 process/prefix convention.
6461 @item S n
6462 @kindex S n (Summary)
6463 @findex gnus-summary-followup-to-mail
6464 Post a followup to the current article via news, even if you got the
6465 message through mail (@code{gnus-summary-followup-to-mail}).
6467 @item S N
6468 @kindex S N (Summary)
6469 @findex gnus-summary-followup-to-mail-with-original
6470 Post a followup to the current article via news, even if you got the
6471 message through mail and include the original message
6472 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
6473 the process/prefix convention.
6475 @item S o p
6476 @kindex S o p (Summary)
6477 @findex gnus-summary-post-forward
6478 Forward the current article to a newsgroup
6479 (@code{gnus-summary-post-forward}).
6480  If no prefix is given, the message is forwarded according to the value
6481 of (@code{message-forward-as-mime}) and
6482 (@code{message-forward-show-mml}); if the prefix is 1, decode the
6483 message and forward directly inline; if the prefix is 2, forward message
6484 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6485 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6486 directly inline; otherwise, the message is forwarded as no prefix given
6487 but use the flipped value of (@code{message-forward-as-mime}).  By
6488 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
6490 @item S O p
6491 @kindex S O p (Summary)
6492 @findex gnus-uu-digest-post-forward
6493 @cindex digests
6494 @cindex making digests
6495 Digest the current series and forward the result to a newsgroup
6496 (@code{gnus-uu-digest-post-forward}).  This command uses the
6497 process/prefix convention.
6499 @item S u
6500 @kindex S u (Summary)
6501 @findex gnus-uu-post-news
6502 @c @icon{gnus-uu-post-news}
6503 Uuencode a file, split it into parts, and post it as a series
6504 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
6505 @end table
6507 Also @xref{Header Commands, ,Header Commands, message, The Message
6508 Manual}, for more information.
6511 @node Summary Message Commands
6512 @subsection Summary Message Commands
6514 @table @kbd
6515 @item S y
6516 @kindex S y (Summary)
6517 @findex gnus-summary-yank-message
6518 Yank the current article into an already existing Message composition
6519 buffer (@code{gnus-summary-yank-message}).  This command prompts for
6520 what message buffer you want to yank into, and understands the
6521 process/prefix convention (@pxref{Process/Prefix}).
6523 @end table
6526 @node Canceling and Superseding
6527 @subsection Canceling Articles
6528 @cindex canceling articles
6529 @cindex superseding articles
6531 Have you ever written something, and then decided that you really,
6532 really, really wish you hadn't posted that?
6534 Well, you can't cancel mail, but you can cancel posts.
6536 @findex gnus-summary-cancel-article
6537 @kindex C (Summary)
6538 @c @icon{gnus-summary-cancel-article}
6539 Find the article you wish to cancel (you can only cancel your own
6540 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
6541 c} (@code{gnus-summary-cancel-article}).  Your article will be
6542 canceled---machines all over the world will be deleting your article.
6543 This command uses the process/prefix convention (@pxref{Process/Prefix}).
6545 Be aware, however, that not all sites honor cancels, so your article may
6546 live on here and there, while most sites will delete the article in
6547 question.
6549 Gnus will use the ``current'' select method when canceling.  If you
6550 want to use the standard posting method, use the @samp{a} symbolic
6551 prefix (@pxref{Symbolic Prefixes}).
6553 Gnus ensures that only you can cancel your own messages using a
6554 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
6555 message, Message Manual}).
6557 If you discover that you have made some mistakes and want to do some
6558 corrections, you can post a @dfn{superseding} article that will replace
6559 your original article.
6561 @findex gnus-summary-supersede-article
6562 @kindex S (Summary)
6563 Go to the original article and press @kbd{S s}
6564 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
6565 where you can edit the article all you want before sending it off the
6566 usual way.
6568 The same goes for superseding as for canceling, only more so: Some
6569 sites do not honor superseding.  On those sites, it will appear that you
6570 have posted almost the same article twice.
6572 If you have just posted the article, and change your mind right away,
6573 there is a trick you can use to cancel/supersede the article without
6574 waiting for the article to appear on your site first.  You simply return
6575 to the post buffer (which is called @code{*sent ...*}).  There you will
6576 find the article you just posted, with all the headers intact.  Change
6577 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
6578 header by substituting one of those words for the word
6579 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
6580 you would do normally.  The previous article will be
6581 canceled/superseded.
6583 Just remember, kids: There is no 'c' in 'supersede'.
6585 @node Delayed Articles
6586 @section Delayed Articles
6587 @cindex delayed sending
6588 @cindex send delayed
6590 Sometimes, you might wish to delay the sending of a message.  For
6591 example, you might wish to arrange for a message to turn up just in time
6592 to remind your about the birthday of your Significant Other.  For this,
6593 there is the @code{gnus-delay} package.  Setup is simple:
6595 @lisp
6596 (gnus-delay-initialize)
6597 @end lisp
6599 @findex gnus-delay-article
6600 Normally, to send a message you use the @kbd{C-c C-c} command from
6601 Message mode.  To delay a message, use @kbd{C-c C-j}
6602 (@code{gnus-delay-article}) instead.  This will ask you for how long the
6603 message should be delayed.  Possible answers are:
6605 @itemize @bullet
6606 @item
6607 A time span.  Consists of an integer and a letter.  For example,
6608 @code{42d} means to delay for 42 days.  Available letters are @code{m}
6609 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
6610 (months) and @code{Y} (years).
6612 @item
6613 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
6614 delayed until that day, at a specific time (eight o'clock by default).
6615 See also @code{gnus-delay-default-hour}.
6617 @item
6618 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
6619 stuff.  The deadline will be at that time today, except if that time has
6620 already passed, then it's at the given time tomorrow.  So if it's ten
6621 o'clock in the morning and you specify @code{11:15}, then the deadline
6622 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
6623 that means a time tomorrow.
6624 @end itemize
6626 The action of the @code{gnus-delay-article} command is influenced by a
6627 couple of variables:
6629 @table @code
6630 @item gnus-delay-default-hour
6631 @vindex gnus-delay-default-hour
6632 When you specify a specific date, the message will be due on that hour
6633 on the given date.  Possible values are integers 0 through 23.
6635 @item gnus-delay-default-delay
6636 @vindex gnus-delay-default-delay
6637 This is a string and gives the default delay.  It can be of any of the
6638 formats described above.
6640 @item gnus-delay-group
6641 @vindex gnus-delay-group
6642 Delayed articles will be kept in this group on the drafts server until
6643 they are due.  You probably don't need to change this.  The default
6644 value is @code{"delayed"}.
6646 @item gnus-delay-header
6647 @vindex gnus-delay-header
6648 The deadline for each article will be stored in a header.  This variable
6649 is a string and gives the header name.  You probably don't need to
6650 change this.  The default value is @code{"X-Gnus-Delayed"}.
6651 @end table
6653 The way delaying works is like this: when you use the
6654 @code{gnus-delay-article} command, you give a certain delay.  Gnus
6655 calculates the deadline of the message and stores it in the
6656 @code{X-Gnus-Delayed} header and puts the message in the
6657 @code{nndraft:delayed} group.
6659 @findex gnus-delay-send-queue
6660 And whenever you get new news, Gnus looks through the group for articles
6661 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
6662 function for this.  By default, this function is added to the hook
6663 @code{gnus-get-new-news-hook}.  But of course, you can change this.
6664 Maybe you want to use the demon to send drafts?  Just tell the demon to
6665 execute the @code{gnus-delay-send-queue} function.
6667 @table @code
6668 @item gnus-delay-initialize
6669 @findex gnus-delay-initialize
6670 By default, this function installs @code{gnus-delay-send-queue} in
6671 @code{gnus-get-new-news-hook}.  But it accepts the optional second
6672 argument @code{no-check}.  If it is non-@code{nil},
6673 @code{gnus-get-new-news-hook} is not changed.  The optional first
6674 argument is ignored.
6676 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
6677 Presumably, you want to use the demon for sending due delayed articles.
6678 Just don't forget to set that up :-)
6679 @end table
6682 @node Marking Articles
6683 @section Marking Articles
6684 @cindex article marking
6685 @cindex article ticking
6686 @cindex marks
6688 There are several marks you can set on an article.
6690 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6691 neologism ohoy!) of the article.  Alphabetic marks generally mean
6692 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6694 In addition, you also have marks that do not affect readedness.
6696 @ifinfo
6697 There's a plethora of commands for manipulating these marks.
6698 @end ifinfo
6700 @menu
6701 * Unread Articles::             Marks for unread articles.
6702 * Read Articles::               Marks for read articles.
6703 * Other Marks::                 Marks that do not affect readedness.
6704 * Setting Marks::               How to set and remove marks.
6705 * Generic Marking Commands::    How to customize the marking.
6706 * Setting Process Marks::       How to mark articles for later processing.
6707 @end menu
6710 @node Unread Articles
6711 @subsection Unread Articles
6713 The following marks mark articles as (kinda) unread, in one form or
6714 other.
6716 @table @samp
6717 @item !
6718 @vindex gnus-ticked-mark
6719 Marked as ticked (@code{gnus-ticked-mark}).
6721 @dfn{Ticked articles} are articles that will remain visible always.  If
6722 you see an article that you find interesting, or you want to put off
6723 reading it, or replying to it, until sometime later, you'd typically
6724 tick it.  However, articles can be expired (from news servers by the
6725 news server software, Gnus itself never expires ticked messages), so if
6726 you want to keep an article forever, you'll have to make it persistent
6727 (@pxref{Persistent Articles}).
6729 @item ?
6730 @vindex gnus-dormant-mark
6731 Marked as dormant (@code{gnus-dormant-mark}).
6733 @dfn{Dormant articles} will only appear in the summary buffer if there
6734 are followups to it.  If you want to see them even if they don't have
6735 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6736 Otherwise (except for the visibility issue), they are just like ticked
6737 messages.
6739 @item SPACE
6740 @vindex gnus-unread-mark
6741 Marked as unread (@code{gnus-unread-mark}).
6743 @dfn{Unread articles} are articles that haven't been read at all yet.
6744 @end table
6747 @node Read Articles
6748 @subsection Read Articles
6749 @cindex expirable mark
6751 All the following marks mark articles as read.
6753 @table @samp
6755 @item r
6756 @vindex gnus-del-mark
6757 These are articles that the user has marked as read with the @kbd{d}
6758 command manually, more or less (@code{gnus-del-mark}).
6760 @item R
6761 @vindex gnus-read-mark
6762 Articles that have actually been read (@code{gnus-read-mark}).
6764 @item O
6765 @vindex gnus-ancient-mark
6766 Articles that were marked as read in previous sessions and are now
6767 @dfn{old} (@code{gnus-ancient-mark}).
6769 @item K
6770 @vindex gnus-killed-mark
6771 Marked as killed (@code{gnus-killed-mark}).
6773 @item X
6774 @vindex gnus-kill-file-mark
6775 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6777 @item Y
6778 @vindex gnus-low-score-mark
6779 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6781 @item C
6782 @vindex gnus-catchup-mark
6783 Marked as read by a catchup (@code{gnus-catchup-mark}).
6785 @item G
6786 @vindex gnus-canceled-mark
6787 Canceled article (@code{gnus-canceled-mark})
6789 @item F
6790 @vindex gnus-souped-mark
6791 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
6793 @item Q
6794 @vindex gnus-sparse-mark
6795 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6796 Threading}.
6798 @item M
6799 @vindex gnus-duplicate-mark
6800 Article marked as read by duplicate suppression
6801 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6803 @end table
6805 All these marks just mean that the article is marked as read, really.
6806 They are interpreted differently when doing adaptive scoring, though.
6808 One more special mark, though:
6810 @table @samp
6811 @item E
6812 @vindex gnus-expirable-mark
6813 Marked as expirable (@code{gnus-expirable-mark}).
6815 Marking articles as @dfn{expirable} (or have them marked as such
6816 automatically) doesn't make much sense in normal groups---a user doesn't
6817 control expiring of news articles, but in mail groups, for instance,
6818 articles marked as @dfn{expirable} can be deleted by Gnus at
6819 any time.
6820 @end table
6823 @node Other Marks
6824 @subsection Other Marks
6825 @cindex process mark
6826 @cindex bookmarks
6828 There are some marks that have nothing to do with whether the article is
6829 read or not.
6831 @itemize @bullet
6833 @item
6834 You can set a bookmark in the current article.  Say you are reading a
6835 long thesis on cats' urinary tracts, and have to go home for dinner
6836 before you've finished reading the thesis.  You can then set a bookmark
6837 in the article, and Gnus will jump to this bookmark the next time it
6838 encounters the article.  @xref{Setting Marks}.
6840 @item
6841 @vindex gnus-replied-mark
6842 All articles that you have replied to or made a followup to (i.e., have
6843 answered) will be marked with an @samp{A} in the second column
6844 (@code{gnus-replied-mark}).
6846 @item
6847 @vindex gnus-forwarded-mark
6848 All articles that you have forwarded will be marked with an @samp{F} in
6849 the second column (@code{gnus-forwarded-mark}).
6851 @item
6852 @vindex gnus-cached-mark
6853 Articles stored in the article cache will be marked with an @samp{*} in
6854 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6856 @item
6857 @vindex gnus-saved-mark
6858 Articles ``saved'' (in some manner or other; not necessarily
6859 religiously) are marked with an @samp{S} in the second column
6860 (@code{gnus-saved-mark}).
6862 @item
6863 @vindex gnus-recent-mark
6864 Articles that according to the server haven't been shown to the user
6865 before are marked with a @samp{N} in the second column
6866 (@code{gnus-recent-mark}).  Note that not all servers support this
6867 mark, in which case it simply never appears.  Compare with
6868 @code{gnus-unseen-mark}.
6870 @item
6871 @vindex gnus-unseen-mark
6872 Articles that haven't been seen before in Gnus by the user are marked
6873 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6874 Compare with @code{gnus-recent-mark}.
6876 @item
6877 @vindex gnus-downloaded-mark
6878 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6879 downloaded for unplugged (offline) viewing.  If you are using the
6880 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6881 (The variable @code{gnus-downloaded-mark} controls which character to
6882 use.)
6884 @item
6885 @vindex gnus-undownloaded-mark
6886 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6887 not have been downloaded.  Such articles cannot be viewed while you
6888 are unplugged (offline).  If you are using the @samp{%O} spec, these
6889 articles get the @samp{-} mark in that spec.  (The variable
6890 @code{gnus-undownloaded-mark} controls which character to use.)
6892 @item
6893 @vindex gnus-downloadable-mark
6894 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6895 automatically, but it is also possible to explicitly mark articles for
6896 download, even if they would not be downloaded automatically.  Such
6897 explicitly-marked articles get the @samp{%} mark in the first column.
6898 (The variable @code{gnus-downloadable-mark} controls which character to
6899 use.)
6901 @item
6902 @vindex gnus-not-empty-thread-mark
6903 @vindex gnus-empty-thread-mark
6904 If the @samp{%e} spec is used, the presence of threads or not will be
6905 marked with @code{gnus-not-empty-thread-mark} and
6906 @code{gnus-empty-thread-mark} in the third column, respectively.
6908 @item
6909 @vindex gnus-process-mark
6910 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6911 variety of commands react to the presence of the process mark.  For
6912 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6913 all articles that have been marked with the process mark.  Articles
6914 marked with the process mark have a @samp{#} in the second column.
6916 @end itemize
6918 You might have noticed that most of these ``non-readedness'' marks
6919 appear in the second column by default.  So if you have a cached, saved,
6920 replied article that you have process-marked, what will that look like?
6922 Nothing much.  The precedence rules go as follows: process -> cache ->
6923 replied -> saved.  So if the article is in the cache and is replied,
6924 you'll only see the cache mark and not the replied mark.
6927 @node Setting Marks
6928 @subsection Setting Marks
6929 @cindex setting marks
6931 All the marking commands understand the numeric prefix.
6933 @table @kbd
6934 @item M c
6935 @itemx M-u
6936 @kindex M c (Summary)
6937 @kindex M-u (Summary)
6938 @findex gnus-summary-clear-mark-forward
6939 @cindex mark as unread
6940 Clear all readedness-marks from the current article
6941 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
6942 article as unread.
6944 @item M t
6945 @itemx !
6946 @kindex ! (Summary)
6947 @kindex M t (Summary)
6948 @findex gnus-summary-tick-article-forward
6949 Tick the current article (@code{gnus-summary-tick-article-forward}).
6950 @xref{Article Caching}.
6952 @item M ?
6953 @itemx ?
6954 @kindex ? (Summary)
6955 @kindex M ? (Summary)
6956 @findex gnus-summary-mark-as-dormant
6957 Mark the current article as dormant
6958 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
6960 @item M d
6961 @itemx d
6962 @kindex M d (Summary)
6963 @kindex d (Summary)
6964 @findex gnus-summary-mark-as-read-forward
6965 Mark the current article as read
6966 (@code{gnus-summary-mark-as-read-forward}).
6968 @item D
6969 @kindex D (Summary)
6970 @findex gnus-summary-mark-as-read-backward
6971 Mark the current article as read and move point to the previous line
6972 (@code{gnus-summary-mark-as-read-backward}).
6974 @item M k
6975 @itemx k
6976 @kindex k (Summary)
6977 @kindex M k (Summary)
6978 @findex gnus-summary-kill-same-subject-and-select
6979 Mark all articles that have the same subject as the current one as read,
6980 and then select the next unread article
6981 (@code{gnus-summary-kill-same-subject-and-select}).
6983 @item M K
6984 @itemx C-k
6985 @kindex M K (Summary)
6986 @kindex C-k (Summary)
6987 @findex gnus-summary-kill-same-subject
6988 Mark all articles that have the same subject as the current one as read
6989 (@code{gnus-summary-kill-same-subject}).
6991 @item M C
6992 @kindex M C (Summary)
6993 @findex gnus-summary-catchup
6994 @c @icon{gnus-summary-catchup}
6995 Mark all unread articles as read (@code{gnus-summary-catchup}).
6997 @item M C-c
6998 @kindex M C-c (Summary)
6999 @findex gnus-summary-catchup-all
7000 Mark all articles in the group as read---even the ticked and dormant
7001 articles (@code{gnus-summary-catchup-all}).
7003 @item M H
7004 @kindex M H (Summary)
7005 @findex gnus-summary-catchup-to-here
7006 Catchup the current group to point (before the point)
7007 (@code{gnus-summary-catchup-to-here}).
7009 @item M h
7010 @kindex M h (Summary)
7011 @findex gnus-summary-catchup-from-here
7012 Catchup the current group from point (after the point)
7013 (@code{gnus-summary-catchup-from-here}).
7015 @item C-w
7016 @kindex C-w (Summary)
7017 @findex gnus-summary-mark-region-as-read
7018 Mark all articles between point and mark as read
7019 (@code{gnus-summary-mark-region-as-read}).
7021 @item M V k
7022 @kindex M V k (Summary)
7023 @findex gnus-summary-kill-below
7024 Kill all articles with scores below the default score (or below the
7025 numeric prefix) (@code{gnus-summary-kill-below}).
7027 @item M e
7028 @itemx E
7029 @kindex M e (Summary)
7030 @kindex E (Summary)
7031 @findex gnus-summary-mark-as-expirable
7032 Mark the current article as expirable
7033 (@code{gnus-summary-mark-as-expirable}).
7035 @item M b
7036 @kindex M b (Summary)
7037 @findex gnus-summary-set-bookmark
7038 Set a bookmark in the current article
7039 (@code{gnus-summary-set-bookmark}).
7041 @item M B
7042 @kindex M B (Summary)
7043 @findex gnus-summary-remove-bookmark
7044 Remove the bookmark from the current article
7045 (@code{gnus-summary-remove-bookmark}).
7047 @item M V c
7048 @kindex M V c (Summary)
7049 @findex gnus-summary-clear-above
7050 Clear all marks from articles with scores over the default score (or
7051 over the numeric prefix) (@code{gnus-summary-clear-above}).
7053 @item M V u
7054 @kindex M V u (Summary)
7055 @findex gnus-summary-tick-above
7056 Tick all articles with scores over the default score (or over the
7057 numeric prefix) (@code{gnus-summary-tick-above}).
7059 @item M V m
7060 @kindex M V m (Summary)
7061 @findex gnus-summary-mark-above
7062 Prompt for a mark, and mark all articles with scores over the default
7063 score (or over the numeric prefix) with this mark
7064 (@code{gnus-summary-clear-above}).
7065 @end table
7067 @vindex gnus-summary-goto-unread
7068 The @code{gnus-summary-goto-unread} variable controls what action should
7069 be taken after setting a mark.  If non-@code{nil}, point will move to
7070 the next/previous unread article.  If @code{nil}, point will just move
7071 one line up or down.  As a special case, if this variable is
7072 @code{never}, all the marking commands as well as other commands (like
7073 @kbd{SPACE}) will move to the next article, whether it is unread or not.
7074 The default is @code{t}.
7077 @node Generic Marking Commands
7078 @subsection Generic Marking Commands
7080 Some people would like the command that ticks an article (@kbd{!}) go to
7081 the next article.  Others would like it to go to the next unread
7082 article.  Yet others would like it to stay on the current article.  And
7083 even though I haven't heard of anybody wanting it to go to the
7084 previous (unread) article, I'm sure there are people that want that as
7085 well.
7087 Multiply these five behaviors with five different marking commands, and
7088 you get a potentially complex set of variable to control what each
7089 command should do.
7091 To sidestep that mess, Gnus provides commands that do all these
7092 different things.  They can be found on the @kbd{M M} map in the summary
7093 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
7094 to list in this manual.
7096 While you can use these commands directly, most users would prefer
7097 altering the summary mode keymap.  For instance, if you would like the
7098 @kbd{!} command to go to the next article instead of the next unread
7099 article, you could say something like:
7101 @lisp
7102 @group
7103 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
7104 (defun my-alter-summary-map ()
7105   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
7106 @end group
7107 @end lisp
7109 @noindent
7112 @lisp
7113 (defun my-alter-summary-map ()
7114   (local-set-key "!" "MM!n"))
7115 @end lisp
7118 @node Setting Process Marks
7119 @subsection Setting Process Marks
7120 @cindex setting process marks
7122 Process marks are displayed as @code{#} in the summary buffer, and are
7123 used for marking articles in such a way that other commands will
7124 process these articles.  For instance, if you process mark four
7125 articles and then use the @kbd{*} command, Gnus will enter these four
7126 articles into the cache.  For more information,
7127 @pxref{Process/Prefix}.
7129 @table @kbd
7131 @item M P p
7132 @itemx #
7133 @kindex # (Summary)
7134 @kindex M P p (Summary)
7135 @findex gnus-summary-mark-as-processable
7136 Mark the current article with the process mark
7137 (@code{gnus-summary-mark-as-processable}).
7138 @findex gnus-summary-unmark-as-processable
7140 @item M P u
7141 @itemx M-#
7142 @kindex M P u (Summary)
7143 @kindex M-# (Summary)
7144 Remove the process mark, if any, from the current article
7145 (@code{gnus-summary-unmark-as-processable}).
7147 @item M P U
7148 @kindex M P U (Summary)
7149 @findex gnus-summary-unmark-all-processable
7150 Remove the process mark from all articles
7151 (@code{gnus-summary-unmark-all-processable}).
7153 @item M P i
7154 @kindex M P i (Summary)
7155 @findex gnus-uu-invert-processable
7156 Invert the list of process marked articles
7157 (@code{gnus-uu-invert-processable}).
7159 @item M P R
7160 @kindex M P R (Summary)
7161 @findex gnus-uu-mark-by-regexp
7162 Mark articles that have a @code{Subject} header that matches a regular
7163 expression (@code{gnus-uu-mark-by-regexp}).
7165 @item M P G
7166 @kindex M P G (Summary)
7167 @findex gnus-uu-unmark-by-regexp
7168 Unmark articles that have a @code{Subject} header that matches a regular
7169 expression (@code{gnus-uu-unmark-by-regexp}).
7171 @item M P r
7172 @kindex M P r (Summary)
7173 @findex gnus-uu-mark-region
7174 Mark articles in region (@code{gnus-uu-mark-region}).
7176 @item M P g
7177 @kindex M P g (Summary)
7178 @findex gnus-uu-unmark-region
7179 Unmark articles in region (@code{gnus-uu-unmark-region}).
7181 @item M P t
7182 @kindex M P t (Summary)
7183 @findex gnus-uu-mark-thread
7184 Mark all articles in the current (sub)thread
7185 (@code{gnus-uu-mark-thread}).
7187 @item M P T
7188 @kindex M P T (Summary)
7189 @findex gnus-uu-unmark-thread
7190 Unmark all articles in the current (sub)thread
7191 (@code{gnus-uu-unmark-thread}).
7193 @item M P v
7194 @kindex M P v (Summary)
7195 @findex gnus-uu-mark-over
7196 Mark all articles that have a score above the prefix argument
7197 (@code{gnus-uu-mark-over}).
7199 @item M P s
7200 @kindex M P s (Summary)
7201 @findex gnus-uu-mark-series
7202 Mark all articles in the current series (@code{gnus-uu-mark-series}).
7204 @item M P S
7205 @kindex M P S (Summary)
7206 @findex gnus-uu-mark-sparse
7207 Mark all series that have already had some articles marked
7208 (@code{gnus-uu-mark-sparse}).
7210 @item M P a
7211 @kindex M P a (Summary)
7212 @findex gnus-uu-mark-all
7213 Mark all articles in series order (@code{gnus-uu-mark-all}).
7215 @item M P b
7216 @kindex M P b (Summary)
7217 @findex gnus-uu-mark-buffer
7218 Mark all articles in the buffer in the order they appear
7219 (@code{gnus-uu-mark-buffer}).
7221 @item M P k
7222 @kindex M P k (Summary)
7223 @findex gnus-summary-kill-process-mark
7224 Push the current process mark set onto the stack and unmark all articles
7225 (@code{gnus-summary-kill-process-mark}).
7227 @item M P y
7228 @kindex M P y (Summary)
7229 @findex gnus-summary-yank-process-mark
7230 Pop the previous process mark set from the stack and restore it
7231 (@code{gnus-summary-yank-process-mark}).
7233 @item M P w
7234 @kindex M P w (Summary)
7235 @findex gnus-summary-save-process-mark
7236 Push the current process mark set onto the stack
7237 (@code{gnus-summary-save-process-mark}).
7239 @end table
7241 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
7242 set process marks based on article body contents.
7245 @node Limiting
7246 @section Limiting
7247 @cindex limiting
7249 It can be convenient to limit the summary buffer to just show some
7250 subset of the articles currently in the group.  The effect most limit
7251 commands have is to remove a few (or many) articles from the summary
7252 buffer.
7254 All limiting commands work on subsets of the articles already fetched
7255 from the servers.  None of these commands query the server for
7256 additional articles.
7258 @table @kbd
7260 @item / /
7261 @itemx / s
7262 @kindex / / (Summary)
7263 @findex gnus-summary-limit-to-subject
7264 Limit the summary buffer to articles that match some subject
7265 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
7266 matching articles.
7268 @item / a
7269 @kindex / a (Summary)
7270 @findex gnus-summary-limit-to-author
7271 Limit the summary buffer to articles that match some author
7272 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
7273 matching articles.
7275 @item / R
7276 @kindex / R (Summary)
7277 @findex gnus-summary-limit-to-recipient
7278 Limit the summary buffer to articles that match some recipient
7279 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
7280 matching articles.
7282 @item / A
7283 @kindex / A (Summary)
7284 @findex gnus-summary-limit-to-address
7285 Limit the summary buffer to articles in which contents of From, To or Cc
7286 header match a given address (@code{gnus-summary-limit-to-address}).  If
7287 given a prefix, exclude matching articles.
7289 @item / S
7290 @kindex / S (Summary)
7291 @findex gnus-summary-limit-to-singletons
7292 Limit the summary buffer to articles that aren't part of any displayed
7293 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
7294 limit to articles that are part of displayed threads.
7296 @item / x
7297 @kindex / x (Summary)
7298 @findex gnus-summary-limit-to-extra
7299 Limit the summary buffer to articles that match one of the ``extra''
7300 headers (@pxref{To From Newsgroups})
7301 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
7302 matching articles.
7304 @item / u
7305 @itemx x
7306 @kindex / u (Summary)
7307 @kindex x (Summary)
7308 @findex gnus-summary-limit-to-unread
7309 Limit the summary buffer to articles not marked as read
7310 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
7311 buffer to articles strictly unread.  This means that ticked and
7312 dormant articles will also be excluded.
7314 @item / m
7315 @kindex / m (Summary)
7316 @findex gnus-summary-limit-to-marks
7317 Ask for a mark and then limit to all articles that have been marked
7318 with that mark (@code{gnus-summary-limit-to-marks}).
7320 @item / t
7321 @kindex / t (Summary)
7322 @findex gnus-summary-limit-to-age
7323 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
7324 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
7325 articles younger than that number of days.
7327 @item / n
7328 @kindex / n (Summary)
7329 @findex gnus-summary-limit-to-articles
7330 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
7331 articles.  If not given a prefix, use the process marked articles
7332 instead.  (@code{gnus-summary-limit-to-articles}).
7334 @item / w
7335 @kindex / w (Summary)
7336 @findex gnus-summary-pop-limit
7337 Pop the previous limit off the stack and restore it
7338 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
7339 the stack.
7341 @item / .
7342 @kindex / . (Summary)
7343 @findex gnus-summary-limit-to-unseen
7344 Limit the summary buffer to the unseen articles
7345 (@code{gnus-summary-limit-to-unseen}).
7347 @item / v
7348 @kindex / v (Summary)
7349 @findex gnus-summary-limit-to-score
7350 Limit the summary buffer to articles that have a score at or above some
7351 score (@code{gnus-summary-limit-to-score}).
7353 @item / p
7354 @kindex / p (Summary)
7355 @findex gnus-summary-limit-to-display-predicate
7356 Limit the summary buffer to articles that satisfy the @code{display}
7357 group parameter predicate
7358 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
7359 Parameters}, for more on this predicate.
7361 @item / r
7362 @kindex / r (Summary)
7363 @findex gnus-summary-limit-to-replied
7364 Limit the summary buffer to replied articles
7365 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
7366 replied articles.
7368 @item / E
7369 @itemx M S
7370 @kindex M S (Summary)
7371 @kindex / E (Summary)
7372 @findex gnus-summary-limit-include-expunged
7373 Include all expunged articles in the limit
7374 (@code{gnus-summary-limit-include-expunged}).
7376 @item / D
7377 @kindex / D (Summary)
7378 @findex gnus-summary-limit-include-dormant
7379 Include all dormant articles in the limit
7380 (@code{gnus-summary-limit-include-dormant}).
7382 @item / *
7383 @kindex / * (Summary)
7384 @findex gnus-summary-limit-include-cached
7385 Include all cached articles in the limit
7386 (@code{gnus-summary-limit-include-cached}).
7388 @item / d
7389 @kindex / d (Summary)
7390 @findex gnus-summary-limit-exclude-dormant
7391 Exclude all dormant articles from the limit
7392 (@code{gnus-summary-limit-exclude-dormant}).
7394 @item / M
7395 @kindex / M (Summary)
7396 @findex gnus-summary-limit-exclude-marks
7397 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
7399 @item / T
7400 @kindex / T (Summary)
7401 @findex gnus-summary-limit-include-thread
7402 Include all the articles in the current thread in the limit.
7404 @item / c
7405 @kindex / c (Summary)
7406 @findex gnus-summary-limit-exclude-childless-dormant
7407 Exclude all dormant articles that have no children from the limit@*
7408 (@code{gnus-summary-limit-exclude-childless-dormant}).
7410 @item / C
7411 @kindex / C (Summary)
7412 @findex gnus-summary-limit-mark-excluded-as-read
7413 Mark all excluded unread articles as read
7414 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
7415 also mark excluded ticked and dormant articles as read.
7417 @item / N
7418 @kindex / N (Summary)
7419 @findex gnus-summary-insert-new-articles
7420 Insert all new articles in the summary buffer.  It scans for new emails
7421 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
7423 @item / o
7424 @kindex / o (Summary)
7425 @findex gnus-summary-insert-old-articles
7426 Insert all old articles in the summary buffer.  If given a numbered
7427 prefix, fetch this number of articles.
7429 @item / b
7430 @kindex / b (Summary)
7431 @findex gnus-summary-limit-to-bodies
7432 Limit the summary buffer to articles that have bodies that match a
7433 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
7434 prefix, reverse the limit.  This command is quite slow since it
7435 requires selecting each article to find the matches.
7437 @item / h
7438 @kindex / h (Summary)
7439 @findex gnus-summary-limit-to-headers
7440 Like the previous command, only limit to headers instead
7441 (@code{gnus-summary-limit-to-headers}).
7443 @end table
7446 @node Threading
7447 @section Threading
7448 @cindex threading
7449 @cindex article threading
7451 Gnus threads articles by default.  @dfn{To thread} is to put responses
7452 to articles directly after the articles they respond to---in a
7453 hierarchical fashion.
7455 Threading is done by looking at the @code{References} headers of the
7456 articles.  In a perfect world, this would be enough to build pretty
7457 trees, but unfortunately, the @code{References} header is often broken
7458 or simply missing.  Weird news propagation exacerbates the problem,
7459 so one has to employ other heuristics to get pleasing results.  A
7460 plethora of approaches exists, as detailed in horrible detail in
7461 @ref{Customizing Threading}.
7463 First, a quick overview of the concepts:
7465 @table @dfn
7466 @item root
7467 The top-most article in a thread; the first article in the thread.
7469 @item thread
7470 A tree-like article structure.
7472 @item sub-thread
7473 A small(er) section of this tree-like structure.
7475 @item loose threads
7476 Threads often lose their roots due to article expiry, or due to the root
7477 already having been read in a previous session, and not displayed in the
7478 summary buffer.  We then typically have many sub-threads that really
7479 belong to one thread, but are without connecting roots.  These are
7480 called loose threads.
7482 @item thread gathering
7483 An attempt to gather loose threads into bigger threads.
7485 @item sparse threads
7486 A thread where the missing articles have been ``guessed'' at, and are
7487 displayed as empty lines in the summary buffer.
7489 @end table
7492 @menu
7493 * Customizing Threading::       Variables you can change to affect the threading.
7494 * Thread Commands::             Thread based commands in the summary buffer.
7495 @end menu
7498 @node Customizing Threading
7499 @subsection Customizing Threading
7500 @cindex customizing threading
7502 @menu
7503 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
7504 * Filling In Threads::          Making the threads displayed look fuller.
7505 * More Threading::              Even more variables for fiddling with threads.
7506 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
7507 @end menu
7510 @node Loose Threads
7511 @subsubsection Loose Threads
7512 @cindex <
7513 @cindex >
7514 @cindex loose threads
7516 @table @code
7517 @item gnus-summary-make-false-root
7518 @vindex gnus-summary-make-false-root
7519 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
7520 and create a dummy root at the top.  (Wait a minute.  Root at the top?
7521 Yup.)  Loose subtrees occur when the real root has expired, or you've
7522 read or killed the root in a previous session.
7524 When there is no real root of a thread, Gnus will have to fudge
7525 something.  This variable says what fudging method Gnus should use.
7526 There are four possible values:
7528 @iftex
7529 @iflatex
7530 \gnusfigure{The Summary Buffer}{390}{
7531 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
7532 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
7533 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
7534 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
7536 @end iflatex
7537 @end iftex
7539 @cindex adopting articles
7541 @table @code
7543 @item adopt
7544 Gnus will make the first of the orphaned articles the parent.  This
7545 parent will adopt all the other articles.  The adopted articles will be
7546 marked as such by pointy brackets (@samp{<>}) instead of the standard
7547 square brackets (@samp{[]}).  This is the default method.
7549 @item dummy
7550 @vindex gnus-summary-dummy-line-format
7551 @vindex gnus-summary-make-false-root-always
7552 Gnus will create a dummy summary line that will pretend to be the
7553 parent.  This dummy line does not correspond to any real article, so
7554 selecting it will just select the first real article after the dummy
7555 article.  @code{gnus-summary-dummy-line-format} is used to specify the
7556 format of the dummy roots.  It accepts only one format spec:  @samp{S},
7557 which is the subject of the article.  @xref{Formatting Variables}.
7558 If you want all threads to have a dummy root, even the non-gathered
7559 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
7561 @item empty
7562 Gnus won't actually make any article the parent, but simply leave the
7563 subject field of all orphans except the first empty.  (Actually, it will
7564 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
7565 Buffer Format}).)
7567 @item none
7568 Don't make any article parent at all.  Just gather the threads and
7569 display them after one another.
7571 @item nil
7572 Don't gather loose threads.
7573 @end table
7575 @item gnus-summary-gather-subject-limit
7576 @vindex gnus-summary-gather-subject-limit
7577 Loose threads are gathered by comparing subjects of articles.  If this
7578 variable is @code{nil}, Gnus requires an exact match between the
7579 subjects of the loose threads before gathering them into one big
7580 super-thread.  This might be too strict a requirement, what with the
7581 presence of stupid newsreaders that chop off long subject lines.  If
7582 you think so, set this variable to, say, 20 to require that only the
7583 first 20 characters of the subjects have to match.  If you set this
7584 variable to a really low number, you'll find that Gnus will gather
7585 everything in sight into one thread, which isn't very helpful.
7587 @cindex fuzzy article gathering
7588 If you set this variable to the special value @code{fuzzy}, Gnus will
7589 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
7590 Matching}).
7592 @item gnus-simplify-subject-fuzzy-regexp
7593 @vindex gnus-simplify-subject-fuzzy-regexp
7594 This can either be a regular expression or list of regular expressions
7595 that match strings that will be removed from subjects if fuzzy subject
7596 simplification is used.
7598 @item gnus-simplify-ignored-prefixes
7599 @vindex gnus-simplify-ignored-prefixes
7600 If you set @code{gnus-summary-gather-subject-limit} to something as low
7601 as 10, you might consider setting this variable to something sensible:
7603 @c Written by Michael Ernst <mernst@cs.rice.edu>
7604 @lisp
7605 (setq gnus-simplify-ignored-prefixes
7606       (concat
7607        "\\`\\[?\\("
7608        (mapconcat
7609         'identity
7610         '("looking"
7611           "wanted" "followup" "summary\\( of\\)?"
7612           "help" "query" "problem" "question"
7613           "answer" "reference" "announce"
7614           "How can I" "How to" "Comparison of"
7615           ;; ...
7616           )
7617         "\\|")
7618        "\\)\\s *\\("
7619        (mapconcat 'identity
7620                   '("for" "for reference" "with" "about")
7621                   "\\|")
7622        "\\)?\\]?:?[ \t]*"))
7623 @end lisp
7625 All words that match this regexp will be removed before comparing two
7626 subjects.
7628 @item gnus-simplify-subject-functions
7629 @vindex gnus-simplify-subject-functions
7630 If non-@code{nil}, this variable overrides
7631 @code{gnus-summary-gather-subject-limit}.  This variable should be a
7632 list of functions to apply to the @code{Subject} string iteratively to
7633 arrive at the simplified version of the string.
7635 Useful functions to put in this list include:
7637 @table @code
7638 @item gnus-simplify-subject-re
7639 @findex gnus-simplify-subject-re
7640 Strip the leading @samp{Re:}.
7642 @item gnus-simplify-subject-fuzzy
7643 @findex gnus-simplify-subject-fuzzy
7644 Simplify fuzzily.
7646 @item gnus-simplify-whitespace
7647 @findex gnus-simplify-whitespace
7648 Remove excessive whitespace.
7650 @item gnus-simplify-all-whitespace
7651 @findex gnus-simplify-all-whitespace
7652 Remove all whitespace.
7653 @end table
7655 You may also write your own functions, of course.
7658 @item gnus-summary-gather-exclude-subject
7659 @vindex gnus-summary-gather-exclude-subject
7660 Since loose thread gathering is done on subjects only, that might lead
7661 to many false hits, especially with certain common subjects like
7662 @samp{} and @samp{(none)}.  To make the situation slightly better,
7663 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
7664 what subjects should be excluded from the gathering process.@*
7665 The default is @samp{^ *$\\|^(none)$}.
7667 @item gnus-summary-thread-gathering-function
7668 @vindex gnus-summary-thread-gathering-function
7669 Gnus gathers threads by looking at @code{Subject} headers.  This means
7670 that totally unrelated articles may end up in the same ``thread'', which
7671 is confusing.  An alternate approach is to look at all the
7672 @code{Message-ID}s in all the @code{References} headers to find matches.
7673 This will ensure that no gathered threads ever include unrelated
7674 articles, but it also means that people who have posted with broken
7675 newsreaders won't be gathered properly.  The choice is yours---plague or
7676 cholera:
7678 @table @code
7679 @item gnus-gather-threads-by-subject
7680 @findex gnus-gather-threads-by-subject
7681 This function is the default gathering function and looks at
7682 @code{Subject}s exclusively.
7684 @item gnus-gather-threads-by-references
7685 @findex gnus-gather-threads-by-references
7686 This function looks at @code{References} headers exclusively.
7687 @end table
7689 If you want to test gathering by @code{References}, you could say
7690 something like:
7692 @lisp
7693 (setq gnus-summary-thread-gathering-function
7694       'gnus-gather-threads-by-references)
7695 @end lisp
7697 @end table
7700 @node Filling In Threads
7701 @subsubsection Filling In Threads
7703 @table @code
7704 @item gnus-fetch-old-headers
7705 @vindex gnus-fetch-old-headers
7706 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7707 more old headers---headers to articles marked as read.  If you would
7708 like to display as few summary lines as possible, but still connect as
7709 many loose threads as possible, you should set this variable to
7710 @code{some} or a number.  If you set it to a number, no more than that
7711 number of extra old headers will be fetched.  In either case, fetching
7712 old headers only works if the back end you are using carries overview
7713 files---this would normally be @code{nntp}, @code{nnspool},
7714 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7715 the thread has been expired by the server, there's not much Gnus can
7716 do about that.
7718 This variable can also be set to @code{invisible}.  This won't have any
7719 visible effects, but is useful if you use the @kbd{A T} command a lot
7720 (@pxref{Finding the Parent}).
7722 The server has to support @acronym{NOV} for any of this to work.
7724 @cindex Gmane, gnus-fetch-old-headers
7725 This feature can seriously impact performance it ignores all locally
7726 cached header entries.  Setting it to @code{t} for groups for a server
7727 that doesn't expire articles (such as news.gmane.org), leads to very
7728 slow summary generation.
7730 @item gnus-fetch-old-ephemeral-headers
7731 @vindex gnus-fetch-old-ephemeral-headers
7732 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7733 newsgroups.
7735 @item gnus-build-sparse-threads
7736 @vindex gnus-build-sparse-threads
7737 Fetching old headers can be slow.  A low-rent similar effect can be
7738 gotten by setting this variable to @code{some}.  Gnus will then look at
7739 the complete @code{References} headers of all articles and try to string
7740 together articles that belong in the same thread.  This will leave
7741 @dfn{gaps} in the threading display where Gnus guesses that an article
7742 is missing from the thread.  (These gaps appear like normal summary
7743 lines.  If you select a gap, Gnus will try to fetch the article in
7744 question.)  If this variable is @code{t}, Gnus will display all these
7745 ``gaps'' without regard for whether they are useful for completing the
7746 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7747 off sparse leaf nodes that don't lead anywhere.  This variable is
7748 @code{nil} by default.
7750 @item gnus-read-all-available-headers
7751 @vindex gnus-read-all-available-headers
7752 This is a rather obscure variable that few will find useful.  It's
7753 intended for those non-news newsgroups where the back end has to fetch
7754 quite a lot to present the summary buffer, and where it's impossible to
7755 go back to parents of articles.  This is mostly the case in the
7756 web-based groups, like the @code{nnultimate} groups.
7758 If you don't use those, then it's safe to leave this as the default
7759 @code{nil}.  If you want to use this variable, it should be a regexp
7760 that matches the group name, or @code{t} for all groups.
7762 @end table
7765 @node More Threading
7766 @subsubsection More Threading
7768 @table @code
7769 @item gnus-show-threads
7770 @vindex gnus-show-threads
7771 If this variable is @code{nil}, no threading will be done, and all of
7772 the rest of the variables here will have no effect.  Turning threading
7773 off will speed group selection up a bit, but it is sure to make reading
7774 slower and more awkward.
7776 @item gnus-thread-hide-subtree
7777 @vindex gnus-thread-hide-subtree
7778 If non-@code{nil}, all threads will be hidden when the summary buffer is
7779 generated.
7781 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7782 Available predicates are @code{gnus-article-unread-p} and
7783 @code{gnus-article-unseen-p}.
7785 Here's an example:
7787 @lisp
7788 (setq gnus-thread-hide-subtree
7789       '(or gnus-article-unread-p
7790            gnus-article-unseen-p))
7791 @end lisp
7793 (It's a pretty nonsensical example, since all unseen articles are also
7794 unread, but you get my drift.)
7797 @item gnus-thread-expunge-below
7798 @vindex gnus-thread-expunge-below
7799 All threads that have a total score (as defined by
7800 @code{gnus-thread-score-function}) less than this number will be
7801 expunged.  This variable is @code{nil} by default, which means that no
7802 threads are expunged.
7804 @item gnus-thread-hide-killed
7805 @vindex gnus-thread-hide-killed
7806 if you kill a thread and this variable is non-@code{nil}, the subtree
7807 will be hidden.
7809 @item gnus-thread-ignore-subject
7810 @vindex gnus-thread-ignore-subject
7811 Sometimes somebody changes the subject in the middle of a thread.  If
7812 this variable is non-@code{nil}, which is the default, the subject
7813 change is ignored.  If it is @code{nil}, a change in the subject will
7814 result in a new thread.
7816 @item gnus-thread-indent-level
7817 @vindex gnus-thread-indent-level
7818 This is a number that says how much each sub-thread should be indented.
7819 The default is 4.
7821 @item gnus-sort-gathered-threads-function
7822 @vindex gnus-sort-gathered-threads-function
7823 Sometimes, particularly with mailing lists, the order in which mails
7824 arrive locally is not necessarily the same as the order in which they
7825 arrived on the mailing list.  Consequently, when sorting sub-threads
7826 using the default @code{gnus-thread-sort-by-number}, responses can end
7827 up appearing before the article to which they are responding to.
7828 Setting this variable to an alternate value
7829 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7830 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
7831 more logical sub-thread ordering in such instances.
7833 @end table
7836 @node Low-Level Threading
7837 @subsubsection Low-Level Threading
7839 @table @code
7841 @item gnus-parse-headers-hook
7842 @vindex gnus-parse-headers-hook
7843 Hook run before parsing any headers.
7845 @item gnus-alter-header-function
7846 @vindex gnus-alter-header-function
7847 If non-@code{nil}, this function will be called to allow alteration of
7848 article header structures.  The function is called with one parameter,
7849 the article header vector, which it may alter in any way.  For instance,
7850 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7851 in systematic ways (by adding prefixes and such), you can use this
7852 variable to un-scramble the @code{Message-ID}s so that they are more
7853 meaningful.  Here's one example:
7855 @lisp
7856 (setq gnus-alter-header-function 'my-alter-message-id)
7858 (defun my-alter-message-id (header)
7859   (let ((id (mail-header-id header)))
7860     (when (string-match
7861            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7862       (mail-header-set-id
7863        (concat (match-string 1 id) "@@" (match-string 2 id))
7864        header))))
7865 @end lisp
7867 @end table
7870 @node Thread Commands
7871 @subsection Thread Commands
7872 @cindex thread commands
7874 @table @kbd
7876 @item T k
7877 @itemx C-M-k
7878 @kindex T k (Summary)
7879 @kindex C-M-k (Summary)
7880 @findex gnus-summary-kill-thread
7881 Mark all articles in the current (sub-)thread as read
7882 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7883 remove all marks instead.  If the prefix argument is negative, tick
7884 articles instead.
7886 @item T l
7887 @itemx C-M-l
7888 @kindex T l (Summary)
7889 @kindex C-M-l (Summary)
7890 @findex gnus-summary-lower-thread
7891 Lower the score of the current (sub-)thread
7892 (@code{gnus-summary-lower-thread}).
7894 @item T i
7895 @kindex T i (Summary)
7896 @findex gnus-summary-raise-thread
7897 Increase the score of the current (sub-)thread
7898 (@code{gnus-summary-raise-thread}).
7900 @item T #
7901 @kindex T # (Summary)
7902 @findex gnus-uu-mark-thread
7903 Set the process mark on the current (sub-)thread
7904 (@code{gnus-uu-mark-thread}).
7906 @item T M-#
7907 @kindex T M-# (Summary)
7908 @findex gnus-uu-unmark-thread
7909 Remove the process mark from the current (sub-)thread
7910 (@code{gnus-uu-unmark-thread}).
7912 @item T T
7913 @kindex T T (Summary)
7914 @findex gnus-summary-toggle-threads
7915 Toggle threading (@code{gnus-summary-toggle-threads}).
7917 @item T s
7918 @kindex T s (Summary)
7919 @findex gnus-summary-show-thread
7920 Expose the (sub-)thread hidden under the current article, if any@*
7921 (@code{gnus-summary-show-thread}).
7923 @item T h
7924 @kindex T h (Summary)
7925 @findex gnus-summary-hide-thread
7926 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
7928 @item T S
7929 @kindex T S (Summary)
7930 @findex gnus-summary-show-all-threads
7931 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
7933 @item T H
7934 @kindex T H (Summary)
7935 @findex gnus-summary-hide-all-threads
7936 Hide all threads (@code{gnus-summary-hide-all-threads}).
7938 @item T t
7939 @kindex T t (Summary)
7940 @findex gnus-summary-rethread-current
7941 Re-thread the current article's thread
7942 (@code{gnus-summary-rethread-current}).  This works even when the
7943 summary buffer is otherwise unthreaded.
7945 @item T ^
7946 @kindex T ^ (Summary)
7947 @findex gnus-summary-reparent-thread
7948 Make the current article the child of the marked (or previous) article
7949 (@code{gnus-summary-reparent-thread}).
7951 @item T M-^
7952 @kindex T M-^ (Summary)
7953 @findex gnus-summary-reparent-children
7954 Make the current article the parent of the marked articles
7955 (@code{gnus-summary-reparent-children}).
7957 @end table
7959 The following commands are thread movement commands.  They all
7960 understand the numeric prefix.
7962 @table @kbd
7964 @item T n
7965 @kindex T n (Summary)
7966 @itemx C-M-f
7967 @kindex C-M-n (Summary)
7968 @itemx M-down
7969 @kindex M-down (Summary)
7970 @findex gnus-summary-next-thread
7971 Go to the next thread (@code{gnus-summary-next-thread}).
7973 @item T p
7974 @kindex T p (Summary)
7975 @itemx C-M-b
7976 @kindex C-M-p (Summary)
7977 @itemx M-up
7978 @kindex M-up (Summary)
7979 @findex gnus-summary-prev-thread
7980 Go to the previous thread (@code{gnus-summary-prev-thread}).
7982 @item T d
7983 @kindex T d (Summary)
7984 @findex gnus-summary-down-thread
7985 Descend the thread (@code{gnus-summary-down-thread}).
7987 @item T u
7988 @kindex T u (Summary)
7989 @findex gnus-summary-up-thread
7990 Ascend the thread (@code{gnus-summary-up-thread}).
7992 @item T o
7993 @kindex T o (Summary)
7994 @findex gnus-summary-top-thread
7995 Go to the top of the thread (@code{gnus-summary-top-thread}).
7996 @end table
7998 @vindex gnus-thread-operation-ignore-subject
7999 If you ignore subject while threading, you'll naturally end up with
8000 threads that have several different subjects in them.  If you then issue
8001 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
8002 wish to kill the entire thread, but just those parts of the thread that
8003 have the same subject as the current article.  If you like this idea,
8004 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
8005 is non-@code{nil} (which it is by default), subjects will be ignored
8006 when doing thread commands.  If this variable is @code{nil}, articles in
8007 the same thread with different subjects will not be included in the
8008 operation in question.  If this variable is @code{fuzzy}, only articles
8009 that have subjects fuzzily equal will be included (@pxref{Fuzzy
8010 Matching}).
8013 @node Sorting the Summary Buffer
8014 @section Sorting the Summary Buffer
8016 @findex gnus-thread-sort-by-total-score
8017 @findex gnus-thread-sort-by-date
8018 @findex gnus-thread-sort-by-score
8019 @findex gnus-thread-sort-by-subject
8020 @findex gnus-thread-sort-by-author
8021 @findex gnus-thread-sort-by-recipient
8022 @findex gnus-thread-sort-by-number
8023 @findex gnus-thread-sort-by-random
8024 @vindex gnus-thread-sort-functions
8025 @findex gnus-thread-sort-by-most-recent-number
8026 @findex gnus-thread-sort-by-most-recent-date
8027 If you are using a threaded summary display, you can sort the threads by
8028 setting @code{gnus-thread-sort-functions}, which can be either a single
8029 function, a list of functions, or a list containing functions and
8030 @code{(not some-function)} elements.
8032 By default, sorting is done on article numbers.  Ready-made sorting
8033 predicate functions include @code{gnus-thread-sort-by-number},
8034 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
8035 @code{gnus-thread-sort-by-subject},
8036 @code{gnus-thread-sort-by-date},
8037 @code{gnus-thread-sort-by-score},
8038 @code{gnus-thread-sort-by-most-recent-number},
8039 @code{gnus-thread-sort-by-most-recent-date},
8040 @code{gnus-thread-sort-by-random} and
8041 @code{gnus-thread-sort-by-total-score}.
8043 Each function takes two threads and returns non-@code{nil} if the first
8044 thread should be sorted before the other.  Note that sorting really is
8045 normally done by looking only at the roots of each thread.
8047 If you use more than one function, the primary sort key should be the
8048 last function in the list.  You should probably always include
8049 @code{gnus-thread-sort-by-number} in the list of sorting
8050 functions---preferably first.  This will ensure that threads that are
8051 equal with respect to the other sort criteria will be displayed in
8052 ascending article order.
8054 If you would like to sort by reverse score, then by subject, and finally
8055 by number, you could do something like:
8057 @lisp
8058 (setq gnus-thread-sort-functions
8059       '(gnus-thread-sort-by-number
8060         gnus-thread-sort-by-subject
8061         (not gnus-thread-sort-by-total-score)))
8062 @end lisp
8064 The threads that have highest score will be displayed first in the
8065 summary buffer.  When threads have the same score, they will be sorted
8066 alphabetically.  The threads that have the same score and the same
8067 subject will be sorted by number, which is (normally) the sequence in
8068 which the articles arrived.
8070 If you want to sort by score and then reverse arrival order, you could
8071 say something like:
8073 @lisp
8074 (setq gnus-thread-sort-functions
8075       '((not gnus-thread-sort-by-number)
8076         gnus-thread-sort-by-score))
8077 @end lisp
8079 @vindex gnus-thread-score-function
8080 The function in the @code{gnus-thread-score-function} variable (default
8081 @code{+}) is used for calculating the total score of a thread.  Useful
8082 functions might be @code{max}, @code{min}, or squared means, or whatever
8083 tickles your fancy.
8085 @findex gnus-article-sort-functions
8086 @findex gnus-article-sort-by-date
8087 @findex gnus-article-sort-by-score
8088 @findex gnus-article-sort-by-subject
8089 @findex gnus-article-sort-by-author
8090 @findex gnus-article-sort-by-random
8091 @findex gnus-article-sort-by-number
8092 If you are using an unthreaded display for some strange reason or
8093 other, you have to fiddle with the @code{gnus-article-sort-functions}
8094 variable.  It is very similar to the
8095 @code{gnus-thread-sort-functions}, except that it uses slightly
8096 different functions for article comparison.  Available sorting
8097 predicate functions are @code{gnus-article-sort-by-number},
8098 @code{gnus-article-sort-by-author},
8099 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
8100 @code{gnus-article-sort-by-random}, and
8101 @code{gnus-article-sort-by-score}.
8103 If you want to sort an unthreaded summary display by subject, you could
8104 say something like:
8106 @lisp
8107 (setq gnus-article-sort-functions
8108       '(gnus-article-sort-by-number
8109         gnus-article-sort-by-subject))
8110 @end lisp
8112 You can define group specific sorting via @code{gnus-parameters},
8113 @xref{Group Parameters}.
8116 @node Asynchronous Fetching
8117 @section Asynchronous Article Fetching
8118 @cindex asynchronous article fetching
8119 @cindex article pre-fetch
8120 @cindex pre-fetch
8122 If you read your news from an @acronym{NNTP} server that's far away, the
8123 network latencies may make reading articles a chore.  You have to wait
8124 for a while after pressing @kbd{n} to go to the next article before the
8125 article appears.  Why can't Gnus just go ahead and fetch the article
8126 while you are reading the previous one?  Why not, indeed.
8128 First, some caveats.  There are some pitfalls to using asynchronous
8129 article fetching, especially the way Gnus does it.
8131 Let's say you are reading article 1, which is short, and article 2 is
8132 quite long, and you are not interested in reading that.  Gnus does not
8133 know this, so it goes ahead and fetches article 2.  You decide to read
8134 article 3, but since Gnus is in the process of fetching article 2, the
8135 connection is blocked.
8137 To avoid these situations, Gnus will open two (count 'em two)
8138 connections to the server.  Some people may think this isn't a very nice
8139 thing to do, but I don't see any real alternatives.  Setting up that
8140 extra connection takes some time, so Gnus startup will be slower.
8142 Gnus will fetch more articles than you will read.  This will mean that
8143 the link between your machine and the @acronym{NNTP} server will become more
8144 loaded than if you didn't use article pre-fetch.  The server itself will
8145 also become more loaded---both with the extra article requests, and the
8146 extra connection.
8148 Ok, so now you know that you shouldn't really use this thing@dots{} unless
8149 you really want to.
8151 @vindex gnus-asynchronous
8152 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
8153 happen automatically.
8155 @vindex gnus-use-article-prefetch
8156 You can control how many articles are to be pre-fetched by setting
8157 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
8158 that when you read an article in the group, the back end will pre-fetch
8159 the next 30 articles.  If this variable is @code{t}, the back end will
8160 pre-fetch all the articles it can without bound.  If it is
8161 @code{nil}, no pre-fetching will be done.
8163 @vindex gnus-async-prefetch-article-p
8164 @findex gnus-async-unread-p
8165 There are probably some articles that you don't want to pre-fetch---read
8166 articles, for instance.  The @code{gnus-async-prefetch-article-p}
8167 variable controls whether an article is to be pre-fetched.  This
8168 function should return non-@code{nil} when the article in question is
8169 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
8170 returns @code{nil} on read articles.  The function is called with an
8171 article data structure as the only parameter.
8173 If, for instance, you wish to pre-fetch only unread articles shorter
8174 than 100 lines, you could say something like:
8176 @lisp
8177 (defun my-async-short-unread-p (data)
8178   "Return non-nil for short, unread articles."
8179   (and (gnus-data-unread-p data)
8180        (< (mail-header-lines (gnus-data-header data))
8181           100)))
8183 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
8184 @end lisp
8186 These functions will be called many, many times, so they should
8187 preferably be short and sweet to avoid slowing down Gnus too much.
8188 It's probably a good idea to byte-compile things like this.
8190 @vindex gnus-prefetched-article-deletion-strategy
8191 Articles have to be removed from the asynch buffer sooner or later.  The
8192 @code{gnus-prefetched-article-deletion-strategy} says when to remove
8193 articles.  This is a list that may contain the following elements:
8195 @table @code
8196 @item read
8197 Remove articles when they are read.
8199 @item exit
8200 Remove articles when exiting the group.
8201 @end table
8203 The default value is @code{(read exit)}.
8205 @c @vindex gnus-use-header-prefetch
8206 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
8207 @c from the next group.
8210 @node Article Caching
8211 @section Article Caching
8212 @cindex article caching
8213 @cindex caching
8215 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
8216 consider turning article caching on.  Each article will then be stored
8217 locally under your home directory.  As you may surmise, this could
8218 potentially use @emph{huge} amounts of disk space, as well as eat up all
8219 your inodes so fast it will make your head swim.  In vodka.
8221 Used carefully, though, it could be just an easier way to save articles.
8223 @vindex gnus-use-long-file-name
8224 @vindex gnus-cache-directory
8225 @vindex gnus-use-cache
8226 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
8227 all articles ticked or marked as dormant will then be copied
8228 over to your local cache (@code{gnus-cache-directory}).  Whether this
8229 cache is flat or hierarchical is controlled by the
8230 @code{gnus-use-long-file-name} variable, as usual.
8232 When re-selecting a ticked or dormant article, it will be fetched from the
8233 cache instead of from the server.  As articles in your cache will never
8234 expire, this might serve as a method of saving articles while still
8235 keeping them where they belong.  Just mark all articles you want to save
8236 as dormant, and don't worry.
8238 When an article is marked as read, is it removed from the cache.
8240 @vindex gnus-cache-remove-articles
8241 @vindex gnus-cache-enter-articles
8242 The entering/removal of articles from the cache is controlled by the
8243 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
8244 variables.  Both are lists of symbols.  The first is @code{(ticked
8245 dormant)} by default, meaning that ticked and dormant articles will be
8246 put in the cache.  The latter is @code{(read)} by default, meaning that
8247 articles marked as read are removed from the cache.  Possibly
8248 symbols in these two lists are @code{ticked}, @code{dormant},
8249 @code{unread} and @code{read}.
8251 @findex gnus-jog-cache
8252 So where does the massive article-fetching and storing come into the
8253 picture?  The @code{gnus-jog-cache} command will go through all
8254 subscribed newsgroups, request all unread articles, score them, and
8255 store them in the cache.  You should only ever, ever ever ever, use this
8256 command if 1) your connection to the @acronym{NNTP} server is really, really,
8257 really slow and 2) you have a really, really, really huge disk.
8258 Seriously.  One way to cut down on the number of articles downloaded is
8259 to score unwanted articles down and have them marked as read.  They will
8260 not then be downloaded by this command.
8262 @vindex gnus-uncacheable-groups
8263 @vindex gnus-cacheable-groups
8264 It is likely that you do not want caching on all groups.  For instance,
8265 if your @code{nnml} mail is located under your home directory, it makes no
8266 sense to cache it somewhere else under your home directory.  Unless you
8267 feel that it's neat to use twice as much space.
8269 To limit the caching, you could set @code{gnus-cacheable-groups} to a
8270 regexp of groups to cache, @samp{^nntp} for instance, or set the
8271 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
8272 Both variables are @code{nil} by default.  If a group matches both
8273 variables, the group is not cached.
8275 @findex gnus-cache-generate-nov-databases
8276 @findex gnus-cache-generate-active
8277 @vindex gnus-cache-active-file
8278 The cache stores information on what articles it contains in its active
8279 file (@code{gnus-cache-active-file}).  If this file (or any other parts
8280 of the cache) becomes all messed up for some reason or other, Gnus
8281 offers two functions that will try to set things right.  @kbd{M-x
8282 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
8283 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
8284 file.
8286 @findex gnus-cache-move-cache
8287 @code{gnus-cache-move-cache} will move your whole
8288 @code{gnus-cache-directory} to some other location.  You get asked to
8289 where, isn't that cool?
8291 @node Persistent Articles
8292 @section Persistent Articles
8293 @cindex persistent articles
8295 Closely related to article caching, we have @dfn{persistent articles}.
8296 In fact, it's just a different way of looking at caching, and much more
8297 useful in my opinion.
8299 Say you're reading a newsgroup, and you happen on to some valuable gem
8300 that you want to keep and treasure forever.  You'd normally just save it
8301 (using one of the many saving commands) in some file.  The problem with
8302 that is that it's just, well, yucky.  Ideally you'd prefer just having
8303 the article remain in the group where you found it forever; untouched by
8304 the expiry going on at the news server.
8306 This is what a @dfn{persistent article} is---an article that just won't
8307 be deleted.  It's implemented using the normal cache functions, but
8308 you use two explicit commands for managing persistent articles:
8310 @table @kbd
8312 @item *
8313 @kindex * (Summary)
8314 @findex gnus-cache-enter-article
8315 Make the current article persistent (@code{gnus-cache-enter-article}).
8317 @item M-*
8318 @kindex M-* (Summary)
8319 @findex gnus-cache-remove-article
8320 Remove the current article from the persistent articles
8321 (@code{gnus-cache-remove-article}).  This will normally delete the
8322 article.
8323 @end table
8325 Both these commands understand the process/prefix convention.
8327 To avoid having all ticked articles (and stuff) entered into the cache,
8328 you should set @code{gnus-use-cache} to @code{passive} if you're just
8329 interested in persistent articles:
8331 @lisp
8332 (setq gnus-use-cache 'passive)
8333 @end lisp
8335 @node Sticky Articles
8336 @section Sticky Articles
8337 @cindex sticky articles
8339 When you select an article the current article buffer will be reused
8340 according to the value of the variable
8341 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
8342 default) all articles reuse the same article buffer.  Else each group
8343 has its own article buffer.
8345 This implies that it's not possible to have more than one article buffer
8346 in a group at a time.  But sometimes you might want to display all the
8347 latest emails from your mother, your father, your aunt, your uncle and
8348 your 17 cousins to coordinate the next christmas party.
8350 That's where sticky articles come in handy.  A sticky article buffer
8351 basically is a normal article buffer, but it won't be reused when you
8352 select another article.  You can make an article sticky with:
8354 @table @kbd
8355 @item A S
8356 @kindex A S (Summary)
8357 @findex gnus-sticky-article
8358 Make the current article sticky.  If a prefix arg is given, ask for a
8359 name for this sticky article buffer.
8360 @end table
8362 To close a sticky article buffer you can use these commands:
8364 @table @kbd
8365 @item q
8366 @kindex q (Article)
8367 @findex bury-buffer
8368 Puts this sticky article buffer at the end of the list of all buffers.
8370 @item k
8371 @kindex k (Article)
8372 @findex gnus-kill-sticky-article-buffer
8373 Kills this sticky article buffer.
8374 @end table
8376 To kill all sticky article buffers you can use:
8378 @defun gnus-kill-sticky-article-buffers ARG
8379 Kill all sticky article buffers.
8380 If a prefix ARG is given, ask for confirmation.
8381 @end defun
8383 @node Article Backlog
8384 @section Article Backlog
8385 @cindex backlog
8386 @cindex article backlog
8388 If you have a slow connection, but the idea of using caching seems
8389 unappealing to you (and it is, really), you can help the situation some
8390 by switching on the @dfn{backlog}.  This is where Gnus will buffer
8391 already read articles so that it doesn't have to re-fetch articles
8392 you've already read.  This only helps if you are in the habit of
8393 re-selecting articles you've recently read, of course.  If you never do
8394 that, turning the backlog on will slow Gnus down a little bit, and
8395 increase memory usage some.
8397 @vindex gnus-keep-backlog
8398 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
8399 at most @var{n} old articles in a buffer for later re-fetching.  If this
8400 variable is non-@code{nil} and is not a number, Gnus will store
8401 @emph{all} read articles, which means that your Emacs will grow without
8402 bound before exploding and taking your machine down with you.  I put
8403 that in there just to keep y'all on your toes.
8405 The default value is 20.
8408 @node Saving Articles
8409 @section Saving Articles
8410 @cindex saving articles
8412 Gnus can save articles in a number of ways.  Below is the documentation
8413 for saving articles in a fairly straight-forward fashion (i.e., little
8414 processing of the article is done before it is saved).  For a different
8415 approach (uudecoding, unsharing) you should use @code{gnus-uu}
8416 (@pxref{Decoding Articles}).
8418 For the commands listed here, the target is a file.  If you want to
8419 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
8420 command (@pxref{Mail Group Commands}).
8422 @vindex gnus-save-all-headers
8423 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
8424 unwanted headers before saving the article.
8426 @vindex gnus-saved-headers
8427 If the preceding variable is @code{nil}, all headers that match the
8428 @code{gnus-saved-headers} regexp will be kept, while the rest will be
8429 deleted before saving.
8431 @table @kbd
8433 @item O o
8434 @itemx o
8435 @kindex O o (Summary)
8436 @kindex o (Summary)
8437 @findex gnus-summary-save-article
8438 @c @icon{gnus-summary-save-article}
8439 Save the current article using the default article saver
8440 (@code{gnus-summary-save-article}).
8442 @item O m
8443 @kindex O m (Summary)
8444 @findex gnus-summary-save-article-mail
8445 Save the current article in a Unix mail box (mbox) file
8446 (@code{gnus-summary-save-article-mail}).
8448 @item O r
8449 @kindex O r (Summary)
8450 @findex gnus-summary-save-article-rmail
8451 Save the current article in Rmail format
8452 (@code{gnus-summary-save-article-rmail}).
8454 @item O f
8455 @kindex O f (Summary)
8456 @findex gnus-summary-save-article-file
8457 @c @icon{gnus-summary-save-article-file}
8458 Save the current article in plain file format
8459 (@code{gnus-summary-save-article-file}).
8461 @item O F
8462 @kindex O F (Summary)
8463 @findex gnus-summary-write-article-file
8464 Write the current article in plain file format, overwriting any previous
8465 file contents (@code{gnus-summary-write-article-file}).
8467 @item O b
8468 @kindex O b (Summary)
8469 @findex gnus-summary-save-article-body-file
8470 Save the current article body in plain file format
8471 (@code{gnus-summary-save-article-body-file}).
8473 @item O h
8474 @kindex O h (Summary)
8475 @findex gnus-summary-save-article-folder
8476 Save the current article in mh folder format
8477 (@code{gnus-summary-save-article-folder}).
8479 @item O v
8480 @kindex O v (Summary)
8481 @findex gnus-summary-save-article-vm
8482 Save the current article in a VM folder
8483 (@code{gnus-summary-save-article-vm}).
8485 @item O p
8486 @itemx |
8487 @kindex O p (Summary)
8488 @kindex | (Summary)
8489 @findex gnus-summary-pipe-output
8490 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
8491 the current article to a process (@code{gnus-summary-pipe-output}).
8492 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
8493 complete headers in the piped output.
8495 @item O P
8496 @kindex O P (Summary)
8497 @findex gnus-summary-muttprint
8498 @vindex gnus-summary-muttprint-program
8499 Save the current article into muttprint.  That is, print it using the
8500 external program @uref{http://muttprint.sourceforge.net/,
8501 Muttprint}.  The program name and options to use is controlled by the
8502 variable @code{gnus-summary-muttprint-program}.
8503 (@code{gnus-summary-muttprint}).
8505 @end table
8507 @vindex gnus-prompt-before-saving
8508 All these commands use the process/prefix convention
8509 (@pxref{Process/Prefix}).  If you save bunches of articles using these
8510 functions, you might get tired of being prompted for files to save each
8511 and every article in.  The prompting action is controlled by
8512 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
8513 default, giving you that excessive prompting action you know and
8514 loathe.  If you set this variable to @code{t} instead, you'll be prompted
8515 just once for each series of articles you save.  If you like to really
8516 have Gnus do all your thinking for you, you can even set this variable
8517 to @code{nil}, which means that you will never be prompted for files to
8518 save articles in.  Gnus will simply save all the articles in the default
8519 files.
8522 @vindex gnus-default-article-saver
8523 You can customize the @code{gnus-default-article-saver} variable to make
8524 Gnus do what you want it to.  You can use any of the eight ready-made
8525 functions below, or you can create your own.
8527 @table @code
8529 @item gnus-summary-save-in-rmail
8530 @findex gnus-summary-save-in-rmail
8531 @vindex gnus-rmail-save-name
8532 @findex gnus-plain-save-name
8533 This is the default format, @dfn{Babyl}.  Uses the function in the
8534 @code{gnus-rmail-save-name} variable to get a file name to save the
8535 article in.  The default is @code{gnus-plain-save-name}.
8537 @item gnus-summary-save-in-mail
8538 @findex gnus-summary-save-in-mail
8539 @vindex gnus-mail-save-name
8540 Save in a Unix mail (mbox) file.  Uses the function in the
8541 @code{gnus-mail-save-name} variable to get a file name to save the
8542 article in.  The default is @code{gnus-plain-save-name}.
8544 @item gnus-summary-save-in-file
8545 @findex gnus-summary-save-in-file
8546 @vindex gnus-file-save-name
8547 @findex gnus-numeric-save-name
8548 Append the article straight to an ordinary file.  Uses the function in
8549 the @code{gnus-file-save-name} variable to get a file name to save the
8550 article in.  The default is @code{gnus-numeric-save-name}.
8552 @item gnus-summary-write-to-file
8553 @findex gnus-summary-write-to-file
8554 Write the article straight to an ordinary file.  The file is
8555 overwritten if it exists.  Uses the function in the
8556 @code{gnus-file-save-name} variable to get a file name to save the
8557 article in.  The default is @code{gnus-numeric-save-name}.
8559 @item gnus-summary-save-body-in-file
8560 @findex gnus-summary-save-body-in-file
8561 Append the article body to an ordinary file.  Uses the function in the
8562 @code{gnus-file-save-name} variable to get a file name to save the
8563 article in.  The default is @code{gnus-numeric-save-name}.
8565 @item gnus-summary-write-body-to-file
8566 @findex gnus-summary-write-body-to-file
8567 Write the article body straight to an ordinary file.  The file is
8568 overwritten if it exists.  Uses the function in the
8569 @code{gnus-file-save-name} variable to get a file name to save the
8570 article in.  The default is @code{gnus-numeric-save-name}.
8572 @item gnus-summary-save-in-folder
8573 @findex gnus-summary-save-in-folder
8574 @findex gnus-folder-save-name
8575 @findex gnus-Folder-save-name
8576 @vindex gnus-folder-save-name
8577 @cindex rcvstore
8578 @cindex MH folders
8579 Save the article to an MH folder using @code{rcvstore} from the MH
8580 library.  Uses the function in the @code{gnus-folder-save-name} variable
8581 to get a file name to save the article in.  The default is
8582 @code{gnus-folder-save-name}, but you can also use
8583 @code{gnus-Folder-save-name}, which creates capitalized names.
8585 @item gnus-summary-save-in-vm
8586 @findex gnus-summary-save-in-vm
8587 Save the article in a VM folder.  You have to have the VM mail
8588 reader to use this setting.
8589 @end table
8591 The symbol of each function may have the following properties:
8593 @table @code
8594 @item :decode
8595 The value non-@code{nil} means save decoded articles.  This is
8596 meaningful only with @code{gnus-summary-save-in-file},
8597 @code{gnus-summary-save-body-in-file},
8598 @code{gnus-summary-write-to-file}, and
8599 @code{gnus-summary-write-body-to-file}.
8601 @item :function
8602 The value specifies an alternative function which appends, not
8603 overwrites, articles to a file.  This implies that when saving many
8604 articles at a time, @code{gnus-prompt-before-saving} is bound to
8605 @code{t} and all articles are saved in a single file.  This is
8606 meaningful only with @code{gnus-summary-write-to-file} and
8607 @code{gnus-summary-write-body-to-file}.
8609 @item :headers
8610 The value specifies the symbol of a variable of which the value
8611 specifies headers to be saved.  If it is omitted,
8612 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
8613 headers should be saved.
8614 @end table
8616 @vindex gnus-article-save-directory
8617 All of these functions, except for the last one, will save the article
8618 in the @code{gnus-article-save-directory}, which is initialized from the
8619 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
8620 default.
8622 As you can see above, the functions use different functions to find a
8623 suitable name of a file to save the article in.  Below is a list of
8624 available functions that generate names:
8626 @table @code
8628 @item gnus-Numeric-save-name
8629 @findex gnus-Numeric-save-name
8630 File names like @file{~/News/Alt.andrea-dworkin/45}.
8632 @item gnus-numeric-save-name
8633 @findex gnus-numeric-save-name
8634 File names like @file{~/News/alt.andrea-dworkin/45}.
8636 @item gnus-Plain-save-name
8637 @findex gnus-Plain-save-name
8638 File names like @file{~/News/Alt.andrea-dworkin}.
8640 @item gnus-plain-save-name
8641 @findex gnus-plain-save-name
8642 File names like @file{~/News/alt.andrea-dworkin}.
8644 @item gnus-sender-save-name
8645 @findex gnus-sender-save-name
8646 File names like @file{~/News/larsi}.
8647 @end table
8649 @vindex gnus-split-methods
8650 You can have Gnus suggest where to save articles by plonking a regexp into
8651 the @code{gnus-split-methods} alist.  For instance, if you would like to
8652 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8653 related to VM in @file{vm-stuff}, you could set this variable to something
8654 like:
8656 @lisp
8657 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8658  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8659  (my-choosing-function "../other-dir/my-stuff")
8660  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8661 @end lisp
8663 We see that this is a list where each element is a list that has two
8664 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8665 a string (in which case it is used as a regexp to match on the article
8666 head); it can be a symbol (which will be called as a function with the
8667 group name as a parameter); or it can be a list (which will be
8668 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8669 the @dfn{file} will be used as a default prompt.  In addition, the
8670 result of the operation itself will be used if the function or form
8671 called returns a string or a list of strings.
8673 You basically end up with a list of file names that might be used when
8674 saving the current article.  (All ``matches'' will be used.)  You will
8675 then be prompted for what you really want to use as a name, with file
8676 name completion over the results from applying this variable.
8678 This variable is @code{((gnus-article-archive-name))} by default, which
8679 means that Gnus will look at the articles it saves for an
8680 @code{Archive-name} line and use that as a suggestion for the file
8681 name.
8683 Here's an example function to clean up file names somewhat.  If you have
8684 lots of mail groups called things like
8685 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8686 these group names before creating the file name to save to.  The
8687 following will do just that:
8689 @lisp
8690 (defun my-save-name (group)
8691   (when (string-match "^nnml:mail." group)
8692     (substring group (match-end 0))))
8694 (setq gnus-split-methods
8695       '((gnus-article-archive-name)
8696         (my-save-name)))
8697 @end lisp
8700 @vindex gnus-use-long-file-name
8701 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8702 @code{nil}, all the preceding functions will replace all periods
8703 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8704 the functions will generate hierarchies of directories instead of having
8705 all the files in the top level directory
8706 (@file{~/News/alt/andrea-dworkin} instead of
8707 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8708 on most systems.  However, for historical reasons, this is @code{nil} on
8709 Xenix and usg-unix-v machines by default.
8711 This function also affects kill and score file names.  If this variable
8712 is a list, and the list contains the element @code{not-score}, long file
8713 names will not be used for score files, if it contains the element
8714 @code{not-save}, long file names will not be used for saving, and if it
8715 contains the element @code{not-kill}, long file names will not be used
8716 for kill files.
8718 If you'd like to save articles in a hierarchy that looks something like
8719 a spool, you could
8721 @lisp
8722 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8723 (setq gnus-default-article-saver
8724       'gnus-summary-save-in-file)          ; @r{no encoding}
8725 @end lisp
8727 Then just save with @kbd{o}.  You'd then read this hierarchy with
8728 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8729 the top level directory as the argument (@file{~/News/}).  Then just walk
8730 around to the groups/directories with @code{nneething}.
8733 @node Decoding Articles
8734 @section Decoding Articles
8735 @cindex decoding articles
8737 Sometime users post articles (or series of articles) that have been
8738 encoded in some way or other.  Gnus can decode them for you.
8740 @menu
8741 * Uuencoded Articles::          Uudecode articles.
8742 * Shell Archives::              Unshar articles.
8743 * PostScript Files::            Split PostScript.
8744 * Other Files::                 Plain save and binhex.
8745 * Decoding Variables::          Variables for a happy decoding.
8746 * Viewing Files::               You want to look at the result of the decoding?
8747 @end menu
8749 @cindex series
8750 @cindex article series
8751 All these functions use the process/prefix convention
8752 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8753 the extension that a ``single article'' means ``a single series''.  Gnus
8754 can find out by itself what articles belong to a series, decode all the
8755 articles and unpack/view/save the resulting file(s).
8757 Gnus guesses what articles are in the series according to the following
8758 simplish rule: The subjects must be (nearly) identical, except for the
8759 last two numbers of the line.  (Spaces are largely ignored, however.)
8761 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8762 will find all the articles that match the regexp @samp{^cat.gif
8763 ([0-9]+/[0-9]+).*$}.
8765 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8766 series}, will not be properly recognized by any of the automatic viewing
8767 commands, and you have to mark the articles manually with @kbd{#}.
8770 @node Uuencoded Articles
8771 @subsection Uuencoded Articles
8772 @cindex uudecode
8773 @cindex uuencoded articles
8775 @table @kbd
8777 @item X u
8778 @kindex X u (Summary)
8779 @findex gnus-uu-decode-uu
8780 @c @icon{gnus-uu-decode-uu}
8781 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8783 @item X U
8784 @kindex X U (Summary)
8785 @findex gnus-uu-decode-uu-and-save
8786 Uudecodes and saves the current series
8787 (@code{gnus-uu-decode-uu-and-save}).
8789 @item X v u
8790 @kindex X v u (Summary)
8791 @findex gnus-uu-decode-uu-view
8792 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8794 @item X v U
8795 @kindex X v U (Summary)
8796 @findex gnus-uu-decode-uu-and-save-view
8797 Uudecodes, views and saves the current series
8798 (@code{gnus-uu-decode-uu-and-save-view}).
8800 @end table
8802 Remember that these all react to the presence of articles marked with
8803 the process mark.  If, for instance, you'd like to decode and save an
8804 entire newsgroup, you'd typically do @kbd{M P a}
8805 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8806 (@code{gnus-uu-decode-uu-and-save}).
8808 All this is very much different from how @code{gnus-uu} worked with
8809 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8810 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8811 articles in some way (@pxref{Setting Process Marks}) and then press
8812 @kbd{X u}.
8814 @vindex gnus-uu-notify-files
8815 Note: When trying to decode articles that have names matching
8816 @code{gnus-uu-notify-files}, which is hard-coded to
8817 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8818 automatically post an article on @samp{comp.unix.wizards} saying that
8819 you have just viewed the file in question.  This feature can't be turned
8820 off.
8823 @node Shell Archives
8824 @subsection Shell Archives
8825 @cindex unshar
8826 @cindex shell archives
8827 @cindex shared articles
8829 Shell archives (``shar files'') used to be a popular way to distribute
8830 sources, but it isn't used all that much today.  In any case, we have
8831 some commands to deal with these:
8833 @table @kbd
8835 @item X s
8836 @kindex X s (Summary)
8837 @findex gnus-uu-decode-unshar
8838 Unshars the current series (@code{gnus-uu-decode-unshar}).
8840 @item X S
8841 @kindex X S (Summary)
8842 @findex gnus-uu-decode-unshar-and-save
8843 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8845 @item X v s
8846 @kindex X v s (Summary)
8847 @findex gnus-uu-decode-unshar-view
8848 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8850 @item X v S
8851 @kindex X v S (Summary)
8852 @findex gnus-uu-decode-unshar-and-save-view
8853 Unshars, views and saves the current series
8854 (@code{gnus-uu-decode-unshar-and-save-view}).
8855 @end table
8858 @node PostScript Files
8859 @subsection PostScript Files
8860 @cindex PostScript
8862 @table @kbd
8864 @item X p
8865 @kindex X p (Summary)
8866 @findex gnus-uu-decode-postscript
8867 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
8869 @item X P
8870 @kindex X P (Summary)
8871 @findex gnus-uu-decode-postscript-and-save
8872 Unpack and save the current PostScript series
8873 (@code{gnus-uu-decode-postscript-and-save}).
8875 @item X v p
8876 @kindex X v p (Summary)
8877 @findex gnus-uu-decode-postscript-view
8878 View the current PostScript series
8879 (@code{gnus-uu-decode-postscript-view}).
8881 @item X v P
8882 @kindex X v P (Summary)
8883 @findex gnus-uu-decode-postscript-and-save-view
8884 View and save the current PostScript series
8885 (@code{gnus-uu-decode-postscript-and-save-view}).
8886 @end table
8889 @node Other Files
8890 @subsection Other Files
8892 @table @kbd
8893 @item X o
8894 @kindex X o (Summary)
8895 @findex gnus-uu-decode-save
8896 Save the current series
8897 (@code{gnus-uu-decode-save}).
8899 @item X b
8900 @kindex X b (Summary)
8901 @findex gnus-uu-decode-binhex
8902 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
8903 doesn't really work yet.
8905 @item X Y
8906 @kindex X Y (Summary)
8907 @findex gnus-uu-decode-yenc
8908 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
8909 @end table
8912 @node Decoding Variables
8913 @subsection Decoding Variables
8915 Adjective, not verb.
8917 @menu
8918 * Rule Variables::              Variables that say how a file is to be viewed.
8919 * Other Decode Variables::      Other decode variables.
8920 * Uuencoding and Posting::      Variables for customizing uuencoding.
8921 @end menu
8924 @node Rule Variables
8925 @subsubsection Rule Variables
8926 @cindex rule variables
8928 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
8929 variables are of the form
8931 @lisp
8932       (list '(regexp1 command2)
8933             '(regexp2 command2)
8934             ...)
8935 @end lisp
8937 @table @code
8939 @item gnus-uu-user-view-rules
8940 @vindex gnus-uu-user-view-rules
8941 @cindex sox
8942 This variable is consulted first when viewing files.  If you wish to use,
8943 for instance, @code{sox} to convert an @file{.au} sound file, you could
8944 say something like:
8945 @lisp
8946 (setq gnus-uu-user-view-rules
8947       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
8948 @end lisp
8950 @item gnus-uu-user-view-rules-end
8951 @vindex gnus-uu-user-view-rules-end
8952 This variable is consulted if Gnus couldn't make any matches from the
8953 user and default view rules.
8955 @item gnus-uu-user-archive-rules
8956 @vindex gnus-uu-user-archive-rules
8957 This variable can be used to say what commands should be used to unpack
8958 archives.
8959 @end table
8962 @node Other Decode Variables
8963 @subsubsection Other Decode Variables
8965 @table @code
8966 @vindex gnus-uu-grabbed-file-functions
8968 @item gnus-uu-grabbed-file-functions
8969 All functions in this list will be called right after each file has been
8970 successfully decoded---so that you can move or view files right away,
8971 and don't have to wait for all files to be decoded before you can do
8972 anything.  Ready-made functions you can put in this list are:
8974 @table @code
8976 @item gnus-uu-grab-view
8977 @findex gnus-uu-grab-view
8978 View the file.
8980 @item gnus-uu-grab-move
8981 @findex gnus-uu-grab-move
8982 Move the file (if you're using a saving function.)
8983 @end table
8985 @item gnus-uu-be-dangerous
8986 @vindex gnus-uu-be-dangerous
8987 Specifies what to do if unusual situations arise during decoding.  If
8988 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
8989 that didn't work, and overwrite existing files.  Otherwise, ask each
8990 time.
8992 @item gnus-uu-ignore-files-by-name
8993 @vindex gnus-uu-ignore-files-by-name
8994 Files with name matching this regular expression won't be viewed.
8996 @item gnus-uu-ignore-files-by-type
8997 @vindex gnus-uu-ignore-files-by-type
8998 Files with a @acronym{MIME} type matching this variable won't be viewed.
8999 Note that Gnus tries to guess what type the file is based on the name.
9000 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
9001 kludgey.
9003 @item gnus-uu-tmp-dir
9004 @vindex gnus-uu-tmp-dir
9005 Where @code{gnus-uu} does its work.
9007 @item gnus-uu-do-not-unpack-archives
9008 @vindex gnus-uu-do-not-unpack-archives
9009 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
9010 looking for files to display.
9012 @item gnus-uu-view-and-save
9013 @vindex gnus-uu-view-and-save
9014 Non-@code{nil} means that the user will always be asked to save a file
9015 after viewing it.
9017 @item gnus-uu-ignore-default-view-rules
9018 @vindex gnus-uu-ignore-default-view-rules
9019 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
9020 rules.
9022 @item gnus-uu-ignore-default-archive-rules
9023 @vindex gnus-uu-ignore-default-archive-rules
9024 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
9025 unpacking commands.
9027 @item gnus-uu-kill-carriage-return
9028 @vindex gnus-uu-kill-carriage-return
9029 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
9030 from articles.
9032 @item gnus-uu-unmark-articles-not-decoded
9033 @vindex gnus-uu-unmark-articles-not-decoded
9034 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
9035 decoded articles as unread.
9037 @item gnus-uu-correct-stripped-uucode
9038 @vindex gnus-uu-correct-stripped-uucode
9039 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
9040 uuencoded files that have had trailing spaces deleted.
9042 @item gnus-uu-pre-uudecode-hook
9043 @vindex gnus-uu-pre-uudecode-hook
9044 Hook run before sending a message to @code{uudecode}.
9046 @item gnus-uu-view-with-metamail
9047 @vindex gnus-uu-view-with-metamail
9048 @cindex metamail
9049 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
9050 commands defined by the rule variables and just fudge a @acronym{MIME}
9051 content type based on the file name.  The result will be fed to
9052 @code{metamail} for viewing.
9054 @item gnus-uu-save-in-digest
9055 @vindex gnus-uu-save-in-digest
9056 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
9057 decoding, will save in digests.  If this variable is @code{nil},
9058 @code{gnus-uu} will just save everything in a file without any
9059 embellishments.  The digesting almost conforms to RFC 1153---no easy way
9060 to specify any meaningful volume and issue numbers were found, so I
9061 simply dropped them.
9063 @end table
9066 @node Uuencoding and Posting
9067 @subsubsection Uuencoding and Posting
9069 @table @code
9071 @item gnus-uu-post-include-before-composing
9072 @vindex gnus-uu-post-include-before-composing
9073 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
9074 before you compose the article.  If this variable is @code{t}, you can
9075 either include an encoded file with @kbd{C-c C-i} or have one included
9076 for you when you post the article.
9078 @item gnus-uu-post-length
9079 @vindex gnus-uu-post-length
9080 Maximum length of an article.  The encoded file will be split into how
9081 many articles it takes to post the entire file.
9083 @item gnus-uu-post-threaded
9084 @vindex gnus-uu-post-threaded
9085 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
9086 thread.  This may not be smart, as no other decoder I have seen is able
9087 to follow threads when collecting uuencoded articles.  (Well, I have
9088 seen one package that does that---@code{gnus-uu}, but somehow, I don't
9089 think that counts@dots{}) Default is @code{nil}.
9091 @item gnus-uu-post-separate-description
9092 @vindex gnus-uu-post-separate-description
9093 Non-@code{nil} means that the description will be posted in a separate
9094 article.  The first article will typically be numbered (0/x).  If this
9095 variable is @code{nil}, the description the user enters will be included
9096 at the beginning of the first article, which will be numbered (1/x).
9097 Default is @code{t}.
9099 @end table
9102 @node Viewing Files
9103 @subsection Viewing Files
9104 @cindex viewing files
9105 @cindex pseudo-articles
9107 After decoding, if the file is some sort of archive, Gnus will attempt
9108 to unpack the archive and see if any of the files in the archive can be
9109 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
9110 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
9111 uncompress and de-tar the main file, and then view the two pictures.
9112 This unpacking process is recursive, so if the archive contains archives
9113 of archives, it'll all be unpacked.
9115 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
9116 extracted file into the summary buffer.  If you go to these
9117 ``articles'', you will be prompted for a command to run (usually Gnus
9118 will make a suggestion), and then the command will be run.
9120 @vindex gnus-view-pseudo-asynchronously
9121 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
9122 until the viewing is done before proceeding.
9124 @vindex gnus-view-pseudos
9125 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
9126 the pseudo-articles into the summary buffer, but view them
9127 immediately.  If this variable is @code{not-confirm}, the user won't even
9128 be asked for a confirmation before viewing is done.
9130 @vindex gnus-view-pseudos-separately
9131 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
9132 pseudo-article will be created for each file to be viewed.  If
9133 @code{nil}, all files that use the same viewing command will be given as
9134 a list of parameters to that command.
9136 @vindex gnus-insert-pseudo-articles
9137 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
9138 pseudo-articles when decoding.  It is @code{t} by default.
9140 So; there you are, reading your @emph{pseudo-articles} in your
9141 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
9142 Why isn't anything real anymore? How did we get here?
9145 @node Article Treatment
9146 @section Article Treatment
9148 Reading through this huge manual, you may have quite forgotten that the
9149 object of newsreaders is to actually, like, read what people have
9150 written.  Reading articles.  Unfortunately, people are quite bad at
9151 writing, so there are tons of functions and variables to make reading
9152 these articles easier.
9154 @menu
9155 * Article Highlighting::        You want to make the article look like fruit salad.
9156 * Article Fontisizing::         Making emphasized text look nice.
9157 * Article Hiding::              You also want to make certain info go away.
9158 * Article Washing::             Lots of way-neat functions to make life better.
9159 * Article Header::              Doing various header transformations.
9160 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
9161 * Article Button Levels::       Controlling appearance of buttons.
9162 * Article Date::                Grumble, UT!
9163 * Article Display::             Display various stuff---X-Face, Picons, Smileys
9164 * Article Signature::           What is a signature?
9165 * Article Miscellanea::         Various other stuff.
9166 @end menu
9169 @node Article Highlighting
9170 @subsection Article Highlighting
9171 @cindex highlighting
9173 Not only do you want your article buffer to look like fruit salad, but
9174 you want it to look like technicolor fruit salad.
9176 @table @kbd
9178 @item W H a
9179 @kindex W H a (Summary)
9180 @findex gnus-article-highlight
9181 @findex gnus-article-maybe-highlight
9182 Do much highlighting of the current article
9183 (@code{gnus-article-highlight}).  This function highlights header, cited
9184 text, the signature, and adds buttons to the body and the head.
9186 @item W H h
9187 @kindex W H h (Summary)
9188 @findex gnus-article-highlight-headers
9189 @vindex gnus-header-face-alist
9190 Highlight the headers (@code{gnus-article-highlight-headers}).  The
9191 highlighting will be done according to the @code{gnus-header-face-alist}
9192 variable, which is a list where each element has the form
9193 @code{(@var{regexp} @var{name} @var{content})}.
9194 @var{regexp} is a regular expression for matching the
9195 header, @var{name} is the face used for highlighting the header name
9196 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
9197 the header value.  The first match made will be used.  Note that
9198 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
9200 @item W H c
9201 @kindex W H c (Summary)
9202 @findex gnus-article-highlight-citation
9203 Highlight cited text (@code{gnus-article-highlight-citation}).
9205 Some variables to customize the citation highlights:
9207 @table @code
9208 @vindex gnus-cite-parse-max-size
9210 @item gnus-cite-parse-max-size
9211 If the article size in bytes is bigger than this variable (which is
9212 25000 by default), no citation highlighting will be performed.
9214 @item gnus-cite-max-prefix
9215 @vindex gnus-cite-max-prefix
9216 Maximum possible length for a citation prefix (default 20).
9218 @item gnus-cite-face-list
9219 @vindex gnus-cite-face-list
9220 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
9221 When there are citations from multiple articles in the same message,
9222 Gnus will try to give each citation from each article its own face.
9223 This should make it easier to see who wrote what.
9225 @item gnus-supercite-regexp
9226 @vindex gnus-supercite-regexp
9227 Regexp matching normal Supercite attribution lines.
9229 @item gnus-supercite-secondary-regexp
9230 @vindex gnus-supercite-secondary-regexp
9231 Regexp matching mangled Supercite attribution lines.
9233 @item gnus-cite-minimum-match-count
9234 @vindex gnus-cite-minimum-match-count
9235 Minimum number of identical prefixes we have to see before we believe
9236 that it's a citation.
9238 @item gnus-cite-attribution-prefix
9239 @vindex gnus-cite-attribution-prefix
9240 Regexp matching the beginning of an attribution line.
9242 @item gnus-cite-attribution-suffix
9243 @vindex gnus-cite-attribution-suffix
9244 Regexp matching the end of an attribution line.
9246 @item gnus-cite-attribution-face
9247 @vindex gnus-cite-attribution-face
9248 Face used for attribution lines.  It is merged with the face for the
9249 cited text belonging to the attribution.
9251 @item gnus-cite-ignore-quoted-from
9252 @vindex gnus-cite-ignore-quoted-from
9253 If non-@code{nil}, no citation highlighting will be performed on lines
9254 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
9255 in order not to mix up with the envelope From line.  The default value
9256 is @code{t}.
9258 @end table
9261 @item W H s
9262 @kindex W H s (Summary)
9263 @vindex gnus-signature-separator
9264 @vindex gnus-signature-face
9265 @findex gnus-article-highlight-signature
9266 Highlight the signature (@code{gnus-article-highlight-signature}).
9267 Everything after @code{gnus-signature-separator} (@pxref{Article
9268 Signature}) in an article will be considered a signature and will be
9269 highlighted with @code{gnus-signature-face}, which is @code{italic} by
9270 default.
9272 @end table
9274 @xref{Customizing Articles}, for how to highlight articles automatically.
9277 @node Article Fontisizing
9278 @subsection Article Fontisizing
9279 @cindex emphasis
9280 @cindex article emphasis
9282 @findex gnus-article-emphasize
9283 @kindex W e (Summary)
9284 People commonly add emphasis to words in news articles by writing things
9285 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
9286 this look nicer by running the article through the @kbd{W e}
9287 (@code{gnus-article-emphasize}) command.
9289 @vindex gnus-emphasis-alist
9290 How the emphasis is computed is controlled by the
9291 @code{gnus-emphasis-alist} variable.  This is an alist where the first
9292 element is a regular expression to be matched.  The second is a number
9293 that says what regular expression grouping is used to find the entire
9294 emphasized word.  The third is a number that says what regexp grouping
9295 should be displayed and highlighted.  (The text between these two
9296 groupings will be hidden.)  The fourth is the face used for
9297 highlighting.
9299 @lisp
9300 (setq gnus-emphasis-alist
9301       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
9302         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
9303 @end lisp
9305 @cindex slash
9306 @cindex asterisk
9307 @cindex underline
9308 @cindex /
9309 @cindex *
9311 @vindex gnus-emphasis-underline
9312 @vindex gnus-emphasis-bold
9313 @vindex gnus-emphasis-italic
9314 @vindex gnus-emphasis-underline-bold
9315 @vindex gnus-emphasis-underline-italic
9316 @vindex gnus-emphasis-bold-italic
9317 @vindex gnus-emphasis-underline-bold-italic
9318 By default, there are seven rules, and they use the following faces:
9319 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
9320 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
9321 @code{gnus-emphasis-underline-italic},
9322 @code{gnus-emphasis-underline-bold}, and
9323 @code{gnus-emphasis-underline-bold-italic}.
9325 If you want to change these faces, you can either use @kbd{M-x
9326 customize}, or you can use @code{copy-face}.  For instance, if you want
9327 to make @code{gnus-emphasis-italic} use a red face instead, you could
9328 say something like:
9330 @lisp
9331 (copy-face 'red 'gnus-emphasis-italic)
9332 @end lisp
9334 @vindex gnus-group-highlight-words-alist
9336 If you want to highlight arbitrary words, you can use the
9337 @code{gnus-group-highlight-words-alist} variable, which uses the same
9338 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
9339 parameter (@pxref{Group Parameters}) can also be used.
9341 @xref{Customizing Articles}, for how to fontize articles automatically.
9344 @node Article Hiding
9345 @subsection Article Hiding
9346 @cindex article hiding
9348 Or rather, hiding certain things in each article.  There usually is much
9349 too much cruft in most articles.
9351 @table @kbd
9353 @item W W a
9354 @kindex W W a (Summary)
9355 @findex gnus-article-hide
9356 Do quite a lot of hiding on the article buffer
9357 (@kbd{gnus-article-hide}).  In particular, this function will hide
9358 headers, @acronym{PGP}, cited text and the signature.
9360 @item W W h
9361 @kindex W W h (Summary)
9362 @findex gnus-article-hide-headers
9363 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
9364 Headers}.
9366 @item W W b
9367 @kindex W W b (Summary)
9368 @findex gnus-article-hide-boring-headers
9369 Hide headers that aren't particularly interesting
9370 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
9372 @item W W s
9373 @kindex W W s (Summary)
9374 @findex gnus-article-hide-signature
9375 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
9376 Signature}.
9378 @item W W l
9379 @kindex W W l (Summary)
9380 @findex gnus-article-hide-list-identifiers
9381 @vindex gnus-list-identifiers
9382 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
9383 are strings some mailing list servers add to the beginning of all
9384 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
9385 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
9386 may not contain @code{\\(..\\)}.
9388 @table @code
9390 @item gnus-list-identifiers
9391 @vindex gnus-list-identifiers
9392 A regular expression that matches list identifiers to be removed from
9393 subject.  This can also be a list of regular expressions.
9395 @end table
9397 @item W W P
9398 @kindex W W P (Summary)
9399 @findex gnus-article-hide-pem
9400 Hide @acronym{PEM} (privacy enhanced messages) cruft
9401 (@code{gnus-article-hide-pem}).
9403 @item W W B
9404 @kindex W W B (Summary)
9405 @findex gnus-article-strip-banner
9406 @vindex gnus-article-banner-alist
9407 @vindex gnus-article-address-banner-alist
9408 @cindex banner
9409 @cindex OneList
9410 @cindex stripping advertisements
9411 @cindex advertisements
9412 Strip the banner specified by the @code{banner} group parameter
9413 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
9414 annoying banners and/or signatures that some mailing lists and moderated
9415 groups adds to all the messages.  The way to use this function is to add
9416 the @code{banner} group parameter (@pxref{Group Parameters}) to the
9417 group you want banners stripped from.  The parameter either be a string,
9418 which will be interpreted as a regular expression matching text to be
9419 removed, or the symbol @code{signature}, meaning that the (last)
9420 signature should be removed, or other symbol, meaning that the
9421 corresponding regular expression in @code{gnus-article-banner-alist} is
9422 used.
9424 Regardless of a group, you can hide things like advertisements only when
9425 the sender of an article has a certain mail address specified in
9426 @code{gnus-article-address-banner-alist}.
9428 @table @code
9430 @item gnus-article-address-banner-alist
9431 @vindex gnus-article-address-banner-alist
9432 Alist of mail addresses and banners.  Each element has the form
9433 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
9434 matching a mail address in the From header, @var{banner} is one of a
9435 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
9436 a regexp and @code{nil}.  If @var{address} matches author's mail
9437 address, it will remove things like advertisements.  For example, if a
9438 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
9439 banner something like @samp{Do You Yoo-hoo!?} in all articles he
9440 sends, you can use the following element to remove them:
9442 @lisp
9443 ("@@yoo-hoo\\.co\\.jp\\'" .
9444  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
9445 @end lisp
9447 @end table
9449 @item W W c
9450 @kindex W W c (Summary)
9451 @findex gnus-article-hide-citation
9452 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
9453 customizing the hiding:
9455 @table @code
9457 @item gnus-cited-opened-text-button-line-format
9458 @itemx gnus-cited-closed-text-button-line-format
9459 @vindex gnus-cited-closed-text-button-line-format
9460 @vindex gnus-cited-opened-text-button-line-format
9461 Gnus adds buttons to show where the cited text has been hidden, and to
9462 allow toggle hiding the text.  The format of the variable is specified
9463 by these format-like variable (@pxref{Formatting Variables}).  These
9464 specs are valid:
9466 @table @samp
9467 @item b
9468 Starting point of the hidden text.
9469 @item e
9470 Ending point of the hidden text.
9471 @item l
9472 Number of characters in the hidden region.
9473 @item n
9474 Number of lines of hidden text.
9475 @end table
9477 @item gnus-cited-lines-visible
9478 @vindex gnus-cited-lines-visible
9479 The number of lines at the beginning of the cited text to leave
9480 shown.  This can also be a cons cell with the number of lines at the top
9481 and bottom of the text, respectively, to remain visible.
9483 @end table
9485 @item W W C-c
9486 @kindex W W C-c (Summary)
9487 @findex gnus-article-hide-citation-maybe
9489 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
9490 following two variables:
9492 @table @code
9493 @item gnus-cite-hide-percentage
9494 @vindex gnus-cite-hide-percentage
9495 If the cited text is of a bigger percentage than this variable (default
9496 50), hide the cited text.
9498 @item gnus-cite-hide-absolute
9499 @vindex gnus-cite-hide-absolute
9500 The cited text must have at least this length (default 10) before it
9501 is hidden.
9502 @end table
9504 @item W W C
9505 @kindex W W C (Summary)
9506 @findex gnus-article-hide-citation-in-followups
9507 Hide cited text in articles that aren't roots
9508 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
9509 useful as an interactive command, but might be a handy function to stick
9510 have happen automatically (@pxref{Customizing Articles}).
9512 @end table
9514 All these ``hiding'' commands are toggles, but if you give a negative
9515 prefix to these commands, they will show what they have previously
9516 hidden.  If you give a positive prefix, they will always hide.
9518 Also @pxref{Article Highlighting} for further variables for
9519 citation customization.
9521 @xref{Customizing Articles}, for how to hide article elements
9522 automatically.
9525 @node Article Washing
9526 @subsection Article Washing
9527 @cindex washing
9528 @cindex article washing
9530 We call this ``article washing'' for a really good reason.  Namely, the
9531 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
9533 @dfn{Washing} is defined by us as ``changing something from something to
9534 something else'', but normally results in something looking better.
9535 Cleaner, perhaps.
9537 @xref{Customizing Articles}, if you want to change how Gnus displays
9538 articles by default.
9540 @table @kbd
9542 @item C-u g
9543 This is not really washing, it's sort of the opposite of washing.  If
9544 you type this, you see the article exactly as it exists on disk or on
9545 the server.
9547 @item g
9548 Force redisplaying of the current article
9549 (@code{gnus-summary-show-article}).  This is also not really washing.
9550 If you type this, you see the article without any previously applied
9551 interactive Washing functions but with all default treatments
9552 (@pxref{Customizing Articles}).
9554 @item W l
9555 @kindex W l (Summary)
9556 @findex gnus-summary-stop-page-breaking
9557 Remove page breaks from the current article
9558 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
9559 delimiters.
9561 @item W r
9562 @kindex W r (Summary)
9563 @findex gnus-summary-caesar-message
9564 @c @icon{gnus-summary-caesar-message}
9565 Do a Caesar rotate (rot13) on the article buffer
9566 (@code{gnus-summary-caesar-message}).
9567 Unreadable articles that tell you to read them with Caesar rotate or rot13.
9568 (Typically offensive jokes and such.)
9570 It's commonly called ``rot13'' because each letter is rotated 13
9571 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
9572 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
9573 is rumored to have employed this form of, uh, somewhat weak encryption.
9575 @item W m
9576 @kindex W m (Summary)
9577 @findex gnus-summary-morse-message
9578 Morse decode the article buffer (@code{gnus-summary-morse-message}).
9580 @item W i
9581 @kindex W i (Summary)
9582 @findex gnus-summary-idna-message
9583 Decode IDNA encoded domain names in the current articles.  IDNA
9584 encoded domain names looks like @samp{xn--bar}.  If a string remain
9585 unencoded after running invoking this, it is likely an invalid IDNA
9586 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
9587 (@url{http://www.gnu.org/software/libidn/}) installed for this command
9588 to work.
9590 @item W t
9591 @item t
9592 @kindex W t (Summary)
9593 @kindex t (Summary)
9594 @findex gnus-summary-toggle-header
9595 Toggle whether to display all headers in the article buffer
9596 (@code{gnus-summary-toggle-header}).
9598 @item W v
9599 @kindex W v (Summary)
9600 @findex gnus-summary-verbose-headers
9601 Toggle whether to display all headers in the article buffer permanently
9602 (@code{gnus-summary-verbose-headers}).
9604 @item W o
9605 @kindex W o (Summary)
9606 @findex gnus-article-treat-overstrike
9607 Treat overstrike (@code{gnus-article-treat-overstrike}).
9609 @item W d
9610 @kindex W d (Summary)
9611 @findex gnus-article-treat-dumbquotes
9612 @vindex gnus-article-dumbquotes-map
9613 @cindex Smartquotes
9614 @cindex M****s*** sm*rtq**t*s
9615 @cindex Latin 1
9616 Treat M****s*** sm*rtq**t*s according to
9617 @code{gnus-article-dumbquotes-map}
9618 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
9619 whether a character is a sm*rtq**t* or not, so it should only be used
9620 interactively.
9622 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
9623 an attempt to provide more quoting characters.  If you see something
9624 like @code{\222} or @code{\264} where you're expecting some kind of
9625 apostrophe or quotation mark, then try this wash.
9627 @item W Y f
9628 @kindex W Y f (Summary)
9629 @findex gnus-article-outlook-deuglify-article
9630 @cindex Outlook Express
9631 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9632 unwrap lines, repair attribution and rearrange citation.
9633 (@code{gnus-article-outlook-deuglify-article}).
9635 @item W Y u
9636 @kindex W Y u (Summary)
9637 @findex gnus-article-outlook-unwrap-lines
9638 @vindex gnus-outlook-deuglify-unwrap-min
9639 @vindex gnus-outlook-deuglify-unwrap-max
9640 Unwrap lines that appear to be wrapped citation lines.  You can control
9641 what lines will be unwrapped by frobbing
9642 @code{gnus-outlook-deuglify-unwrap-min} and
9643 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9644 maximum length of an unwrapped citation line.
9645 (@code{gnus-article-outlook-unwrap-lines}).
9647 @item W Y a
9648 @kindex W Y a (Summary)
9649 @findex gnus-article-outlook-repair-attribution
9650 Repair a broken attribution line.@*
9651 (@code{gnus-article-outlook-repair-attribution}).
9653 @item W Y c
9654 @kindex W Y c (Summary)
9655 @findex gnus-article-outlook-rearrange-citation
9656 Repair broken citations by rearranging the text.
9657 (@code{gnus-article-outlook-rearrange-citation}).
9659 @item W w
9660 @kindex W w (Summary)
9661 @findex gnus-article-fill-cited-article
9662 Do word wrap (@code{gnus-article-fill-cited-article}).
9664 You can give the command a numerical prefix to specify the width to use
9665 when filling.
9667 @item W Q
9668 @kindex W Q (Summary)
9669 @findex gnus-article-fill-long-lines
9670 Fill long lines (@code{gnus-article-fill-long-lines}).
9672 @item W C
9673 @kindex W C (Summary)
9674 @findex gnus-article-capitalize-sentences
9675 Capitalize the first word in each sentence
9676 (@code{gnus-article-capitalize-sentences}).
9678 @item W c
9679 @kindex W c (Summary)
9680 @findex gnus-article-remove-cr
9681 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
9682 (this takes care of DOS line endings), and then translate any remaining
9683 CRs into LF (this takes care of Mac line endings)
9684 (@code{gnus-article-remove-cr}).
9686 @item W q
9687 @kindex W q (Summary)
9688 @findex gnus-article-de-quoted-unreadable
9689 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9690 Quoted-Printable is one common @acronym{MIME} encoding employed when
9691 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9692 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9693 which doesn't look very readable to me.  Note that this is usually
9694 done automatically by Gnus if the message in question has a
9695 @code{Content-Transfer-Encoding} header that says that this encoding
9696 has been done.  If a prefix is given, a charset will be asked for.
9698 @item W 6
9699 @kindex W 6 (Summary)
9700 @findex gnus-article-de-base64-unreadable
9701 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9702 one common @acronym{MIME} encoding employed when sending
9703 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9704 usually done automatically by Gnus if the message in question has a
9705 @code{Content-Transfer-Encoding} header that says that this encoding
9706 has been done.  If a prefix is given, a charset will be asked for.
9708 @item W Z
9709 @kindex W Z (Summary)
9710 @findex gnus-article-decode-HZ
9711 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9712 common encoding employed when sending Chinese articles.  It typically
9713 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9715 @item W A
9716 @kindex W A (Summary)
9717 @findex gnus-article-treat-ansi-sequences
9718 @cindex @acronym{ANSI} control sequences
9719 Translate @acronym{ANSI} SGR control sequences into overlays or
9720 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9721 sequences are used in some Chinese hierarchies for highlighting.
9723 @item W u
9724 @kindex W u (Summary)
9725 @findex gnus-article-unsplit-urls
9726 Remove newlines from within URLs.  Some mailers insert newlines into
9727 outgoing email messages to keep lines short.  This reformatting can
9728 split long URLs onto multiple lines.  Repair those URLs by removing
9729 the newlines (@code{gnus-article-unsplit-urls}).
9731 @item W h
9732 @kindex W h (Summary)
9733 @findex gnus-article-wash-html
9734 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9735 usually done automatically by Gnus if the message in question has a
9736 @code{Content-Type} header that says that the message is @acronym{HTML}.
9738 If a prefix is given, a charset will be asked for.  If it is a number,
9739 the charset defined in @code{gnus-summary-show-article-charset-alist}
9740 (@pxref{Paging the Article}) will be used.
9742 @vindex gnus-article-wash-function
9743 The default is to use the function specified by
9744 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9745 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9746 @acronym{HTML}, but this is controlled by the
9747 @code{gnus-article-wash-function} variable.  Pre-defined functions you
9748 can use include:
9750 @table @code
9751 @item w3
9752 Use Emacs/W3.
9754 @item w3m
9755 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9757 @item w3m-standalone
9758 Use @uref{http://w3m.sourceforge.net/, w3m}.
9760 @item links
9761 Use @uref{http://links.sf.net/, Links}.
9763 @item lynx
9764 Use @uref{http://lynx.isc.org/, Lynx}.
9766 @item html2text
9767 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9769 @end table
9771 @item W b
9772 @kindex W b (Summary)
9773 @findex gnus-article-add-buttons
9774 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9775 @xref{Article Buttons}.
9777 @item W B
9778 @kindex W B (Summary)
9779 @findex gnus-article-add-buttons-to-head
9780 Add clickable buttons to the article headers
9781 (@code{gnus-article-add-buttons-to-head}).
9783 @item W p
9784 @kindex W p (Summary)
9785 @findex gnus-article-verify-x-pgp-sig
9786 Verify a signed control message
9787 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9788 @code{newgroup} and @code{checkgroups} are usually signed by the
9789 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9790 the maintainer to your keyring to verify the
9791 message.@footnote{@acronym{PGP} keys for many hierarchies are
9792 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9794 @item W s
9795 @kindex W s (Summary)
9796 @findex gnus-summary-force-verify-and-decrypt
9797 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9798 @acronym{S/MIME}) message
9799 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9801 @item W a
9802 @kindex W a (Summary)
9803 @findex gnus-article-strip-headers-in-body
9804 Strip headers like the @code{X-No-Archive} header from the beginning of
9805 article bodies (@code{gnus-article-strip-headers-in-body}).
9807 @item W E l
9808 @kindex W E l (Summary)
9809 @findex gnus-article-strip-leading-blank-lines
9810 Remove all blank lines from the beginning of the article
9811 (@code{gnus-article-strip-leading-blank-lines}).
9813 @item W E m
9814 @kindex W E m (Summary)
9815 @findex gnus-article-strip-multiple-blank-lines
9816 Replace all blank lines with empty lines and then all multiple empty
9817 lines with a single empty line.
9818 (@code{gnus-article-strip-multiple-blank-lines}).
9820 @item W E t
9821 @kindex W E t (Summary)
9822 @findex gnus-article-remove-trailing-blank-lines
9823 Remove all blank lines at the end of the article
9824 (@code{gnus-article-remove-trailing-blank-lines}).
9826 @item W E a
9827 @kindex W E a (Summary)
9828 @findex gnus-article-strip-blank-lines
9829 Do all the three commands above
9830 (@code{gnus-article-strip-blank-lines}).
9832 @item W E A
9833 @kindex W E A (Summary)
9834 @findex gnus-article-strip-all-blank-lines
9835 Remove all blank lines
9836 (@code{gnus-article-strip-all-blank-lines}).
9838 @item W E s
9839 @kindex W E s (Summary)
9840 @findex gnus-article-strip-leading-space
9841 Remove all white space from the beginning of all lines of the article
9842 body (@code{gnus-article-strip-leading-space}).
9844 @item W E e
9845 @kindex W E e (Summary)
9846 @findex gnus-article-strip-trailing-space
9847 Remove all white space from the end of all lines of the article
9848 body (@code{gnus-article-strip-trailing-space}).
9850 @end table
9852 @xref{Customizing Articles}, for how to wash articles automatically.
9855 @node Article Header
9856 @subsection Article Header
9858 These commands perform various transformations of article header.
9860 @table @kbd
9862 @item W G u
9863 @kindex W G u (Summary)
9864 @findex gnus-article-treat-unfold-headers
9865 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
9867 @item W G n
9868 @kindex W G n (Summary)
9869 @findex gnus-article-treat-fold-newsgroups
9870 Fold the @code{Newsgroups} and @code{Followup-To} headers
9871 (@code{gnus-article-treat-fold-newsgroups}).
9873 @item W G f
9874 @kindex W G f (Summary)
9875 @findex gnus-article-treat-fold-headers
9876 Fold all the message headers
9877 (@code{gnus-article-treat-fold-headers}).
9879 @item W E w
9880 @kindex W E w (Summary)
9881 @findex gnus-article-remove-leading-whitespace
9882 Remove excessive whitespace from all headers
9883 (@code{gnus-article-remove-leading-whitespace}).
9885 @end table
9888 @node Article Buttons
9889 @subsection Article Buttons
9890 @cindex buttons
9892 People often include references to other stuff in articles, and it would
9893 be nice if Gnus could just fetch whatever it is that people talk about
9894 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
9895 button on these references.
9897 @vindex gnus-button-man-handler
9898 Gnus adds @dfn{buttons} to certain standard references by default:
9899 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
9900 Emacs or Gnus related references.  This is controlled by two variables,
9901 one that handles article bodies and one that handles article heads:
9903 @table @code
9905 @item gnus-button-alist
9906 @vindex gnus-button-alist
9907 This is an alist where each entry has this form:
9909 @lisp
9910 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9911 @end lisp
9913 @table @var
9915 @item regexp
9916 All text that match this regular expression (case insensitive) will be
9917 considered an external reference.  Here's a typical regexp that matches
9918 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
9919 variable containing a regexp, useful variables to use include
9920 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
9922 @item button-par
9923 Gnus has to know which parts of the matches is to be highlighted.  This
9924 is a number that says what sub-expression of the regexp is to be
9925 highlighted.  If you want it all highlighted, you use 0 here.
9927 @item use-p
9928 This form will be @code{eval}ed, and if the result is non-@code{nil},
9929 this is considered a match.  This is useful if you want extra sifting to
9930 avoid false matches.  Often variables named
9931 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
9932 Levels}, but any other form may be used too.
9934 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
9936 @item function
9937 This function will be called when you click on this button.
9939 @item data-par
9940 As with @var{button-par}, this is a sub-expression number, but this one
9941 says which part of the match is to be sent as data to @var{function}.
9943 @end table
9945 So the full entry for buttonizing URLs is then
9947 @lisp
9948 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
9949 @end lisp
9951 @item gnus-header-button-alist
9952 @vindex gnus-header-button-alist
9953 This is just like the other alist, except that it is applied to the
9954 article head only, and that each entry has an additional element that is
9955 used to say what headers to apply the buttonize coding to:
9957 @lisp
9958 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9959 @end lisp
9961 @var{header} is a regular expression.
9962 @end table
9964 @subsubsection Related variables and functions
9966 @table @code
9967 @item gnus-button-@var{*}-level
9968 @xref{Article Button Levels}.
9970 @c Stuff related to gnus-button-browse-level
9972 @item gnus-button-url-regexp
9973 @vindex gnus-button-url-regexp
9974 A regular expression that matches embedded URLs.  It is used in the
9975 default values of the variables above.
9977 @c Stuff related to gnus-button-man-level
9979 @item gnus-button-man-handler
9980 @vindex gnus-button-man-handler
9981 The function to use for displaying man pages.  It must take at least one
9982 argument with a string naming the man page.
9984 @c Stuff related to gnus-button-message-level
9986 @item gnus-button-mid-or-mail-regexp
9987 @vindex gnus-button-mid-or-mail-regexp
9988 Regular expression that matches a message ID or a mail address.
9990 @item gnus-button-prefer-mid-or-mail
9991 @vindex gnus-button-prefer-mid-or-mail
9992 This variable determines what to do when the button on a string as
9993 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
9994 message ID or a mail address.  If it is one of the symbols @code{mid} or
9995 @code{mail}, Gnus will always assume that the string is a message ID or
9996 a mail address, respectively.  If this variable is set to the symbol
9997 @code{ask}, always query the user what to do.  If it is a function, this
9998 function will be called with the string as its only argument.  The
9999 function must return @code{mid}, @code{mail}, @code{invalid} or
10000 @code{ask}.  The default value is the function
10001 @code{gnus-button-mid-or-mail-heuristic}.
10003 @item gnus-button-mid-or-mail-heuristic
10004 @findex gnus-button-mid-or-mail-heuristic
10005 Function that guesses whether its argument is a message ID or a mail
10006 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
10007 it's a mail address, @code{ask} if unsure and @code{invalid} if the
10008 string is invalid.
10010 @item gnus-button-mid-or-mail-heuristic-alist
10011 @vindex gnus-button-mid-or-mail-heuristic-alist
10012 An alist of @code{(RATE . REGEXP)} pairs used by the function
10013 @code{gnus-button-mid-or-mail-heuristic}.
10015 @c Stuff related to gnus-button-tex-level
10017 @item gnus-button-ctan-handler
10018 @findex gnus-button-ctan-handler
10019 The function to use for displaying CTAN links.  It must take one
10020 argument, the string naming the URL.
10022 @item gnus-ctan-url
10023 @vindex gnus-ctan-url
10024 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
10025 by @code{gnus-button-ctan-handler}.
10027 @c Misc stuff
10029 @item gnus-article-button-face
10030 @vindex gnus-article-button-face
10031 Face used on buttons.
10033 @item gnus-article-mouse-face
10034 @vindex gnus-article-mouse-face
10035 Face used when the mouse cursor is over a button.
10037 @end table
10039 @xref{Customizing Articles}, for how to buttonize articles automatically.
10042 @node Article Button Levels
10043 @subsection Article button levels
10044 @cindex button levels
10045 The higher the value of the variables @code{gnus-button-@var{*}-level},
10046 the more buttons will appear.  If the level is zero, no corresponding
10047 buttons are displayed.  With the default value (which is 5) you should
10048 already see quite a lot of buttons.  With higher levels, you will see
10049 more buttons, but you may also get more false positives.  To avoid them,
10050 you can set the variables @code{gnus-button-@var{*}-level} local to
10051 specific groups (@pxref{Group Parameters}).  Here's an example for the
10052 variable @code{gnus-parameters}:
10054 @lisp
10055 ;; @r{increase @code{gnus-button-*-level} in some groups:}
10056 (setq gnus-parameters
10057       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
10058         ("\\<unix\\>"               (gnus-button-man-level 10))
10059         ("\\<tex\\>"                (gnus-button-tex-level 10))))
10060 @end lisp
10062 @table @code
10064 @item gnus-button-browse-level
10065 @vindex gnus-button-browse-level
10066 Controls the display of references to message IDs, mail addresses and
10067 news URLs.  Related variables and functions include
10068 @code{gnus-button-url-regexp}, @code{browse-url}, and
10069 @code{browse-url-browser-function}.
10071 @item gnus-button-emacs-level
10072 @vindex gnus-button-emacs-level
10073 Controls the display of Emacs or Gnus references.  Related functions are
10074 @code{gnus-button-handle-custom},
10075 @code{gnus-button-handle-describe-function},
10076 @code{gnus-button-handle-describe-variable},
10077 @code{gnus-button-handle-symbol},
10078 @code{gnus-button-handle-describe-key},
10079 @code{gnus-button-handle-apropos},
10080 @code{gnus-button-handle-apropos-command},
10081 @code{gnus-button-handle-apropos-variable},
10082 @code{gnus-button-handle-apropos-documentation}, and
10083 @code{gnus-button-handle-library}.
10085 @item gnus-button-man-level
10086 @vindex gnus-button-man-level
10087 Controls the display of references to (Unix) man pages.
10088 See @code{gnus-button-man-handler}.
10090 @item gnus-button-message-level
10091 @vindex gnus-button-message-level
10092 Controls the display of message IDs, mail addresses and news URLs.
10093 Related variables and functions include
10094 @code{gnus-button-mid-or-mail-regexp},
10095 @code{gnus-button-prefer-mid-or-mail},
10096 @code{gnus-button-mid-or-mail-heuristic}, and
10097 @code{gnus-button-mid-or-mail-heuristic-alist}.
10099 @item gnus-button-tex-level
10100 @vindex gnus-button-tex-level
10101 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
10102 URLs.  See the variables @code{gnus-ctan-url},
10103 @code{gnus-button-ctan-handler},
10104 @code{gnus-button-ctan-directory-regexp}, and
10105 @code{gnus-button-handle-ctan-bogus-regexp}.
10107 @end table
10110 @node Article Date
10111 @subsection Article Date
10113 The date is most likely generated in some obscure timezone you've never
10114 heard of, so it's quite nice to be able to find out what the time was
10115 when the article was sent.
10117 @table @kbd
10119 @item W T u
10120 @kindex W T u (Summary)
10121 @findex gnus-article-date-ut
10122 Display the date in UT (aka. GMT, aka ZULU)
10123 (@code{gnus-article-date-ut}).
10125 @item W T i
10126 @kindex W T i (Summary)
10127 @findex gnus-article-date-iso8601
10128 @cindex ISO 8601
10129 Display the date in international format, aka. ISO 8601
10130 (@code{gnus-article-date-iso8601}).
10132 @item W T l
10133 @kindex W T l (Summary)
10134 @findex gnus-article-date-local
10135 Display the date in the local timezone (@code{gnus-article-date-local}).
10137 @item W T p
10138 @kindex W T p (Summary)
10139 @findex gnus-article-date-english
10140 Display the date in a format that's easily pronounceable in English
10141 (@code{gnus-article-date-english}).
10143 @item W T s
10144 @kindex W T s (Summary)
10145 @vindex gnus-article-time-format
10146 @findex gnus-article-date-user
10147 @findex format-time-string
10148 Display the date using a user-defined format
10149 (@code{gnus-article-date-user}).  The format is specified by the
10150 @code{gnus-article-time-format} variable, and is a string that's passed
10151 to @code{format-time-string}.  See the documentation of that variable
10152 for a list of possible format specs.
10154 @item W T e
10155 @kindex W T e (Summary)
10156 @findex gnus-article-date-lapsed
10157 @findex gnus-start-date-timer
10158 @findex gnus-stop-date-timer
10159 Say how much time has elapsed between the article was posted and now
10160 (@code{gnus-article-date-lapsed}).  It looks something like:
10162 @example
10163 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
10164 @end example
10166 @vindex gnus-article-date-lapsed-new-header
10167 The value of @code{gnus-article-date-lapsed-new-header} determines
10168 whether this header will just be added below the old Date one, or will
10169 replace it.
10171 An advantage of using Gnus to read mail is that it converts simple bugs
10172 into wonderful absurdities.
10174 If you want to have this line updated continually, you can put
10176 @lisp
10177 (gnus-start-date-timer)
10178 @end lisp
10180 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
10181 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
10182 command.
10184 @item W T o
10185 @kindex W T o (Summary)
10186 @findex gnus-article-date-original
10187 Display the original date (@code{gnus-article-date-original}).  This can
10188 be useful if you normally use some other conversion function and are
10189 worried that it might be doing something totally wrong.  Say, claiming
10190 that the article was posted in 1854.  Although something like that is
10191 @emph{totally} impossible.  Don't you trust me? *titter*
10193 @end table
10195 @xref{Customizing Articles}, for how to display the date in your
10196 preferred format automatically.
10199 @node Article Display
10200 @subsection Article Display
10201 @cindex picons
10202 @cindex x-face
10203 @cindex smileys
10205 These commands add various frivolous display gimmicks to the article
10206 buffer in Emacs versions that support them.
10208 @code{X-Face} headers are small black-and-white images supplied by the
10209 message headers (@pxref{X-Face}).
10211 @code{Face} headers are small colored images supplied by the message
10212 headers (@pxref{Face}).
10214 Smileys are those little @samp{:-)} symbols that people like to litter
10215 their messages with (@pxref{Smileys}).
10217 Picons, on the other hand, reside on your own system, and Gnus will
10218 try to match the headers to what you have (@pxref{Picons}).
10220 All these functions are toggles---if the elements already exist,
10221 they'll be removed.
10223 @table @kbd
10224 @item W D x
10225 @kindex W D x (Summary)
10226 @findex gnus-article-display-x-face
10227 Display an @code{X-Face} in the @code{From} header.
10228 (@code{gnus-article-display-x-face}).
10230 @item W D d
10231 @kindex W D d (Summary)
10232 @findex gnus-article-display-face
10233 Display a @code{Face} in the @code{From} header.
10234 (@code{gnus-article-display-face}).
10236 @item W D s
10237 @kindex W D s (Summary)
10238 @findex gnus-treat-smiley
10239 Display smileys (@code{gnus-treat-smiley}).
10241 @item W D f
10242 @kindex W D f (Summary)
10243 @findex gnus-treat-from-picon
10244 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
10246 @item W D m
10247 @kindex W D m (Summary)
10248 @findex gnus-treat-mail-picon
10249 Piconify all mail headers (i. e., @code{Cc}, @code{To})
10250 (@code{gnus-treat-mail-picon}).
10252 @item W D n
10253 @kindex W D n (Summary)
10254 @findex gnus-treat-newsgroups-picon
10255 Piconify all news headers (i. e., @code{Newsgroups} and
10256 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
10258 @item W D D
10259 @kindex W D D (Summary)
10260 @findex gnus-article-remove-images
10261 Remove all images from the article buffer
10262 (@code{gnus-article-remove-images}).
10264 @end table
10268 @node Article Signature
10269 @subsection Article Signature
10270 @cindex signatures
10271 @cindex article signature
10273 @vindex gnus-signature-separator
10274 Each article is divided into two parts---the head and the body.  The
10275 body can be divided into a signature part and a text part.  The variable
10276 that says what is to be considered a signature is
10277 @code{gnus-signature-separator}.  This is normally the standard
10278 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
10279 non-standard signature separators, so this variable can also be a list
10280 of regular expressions to be tested, one by one.  (Searches are done
10281 from the end of the body towards the beginning.)  One likely value is:
10283 @lisp
10284 (setq gnus-signature-separator
10285       '("^-- $"         ; @r{The standard}
10286         "^-- *$"        ; @r{A common mangling}
10287         "^-------*$"    ; @r{Many people just use a looong}
10288                         ; @r{line of dashes.  Shame!}
10289         "^ *--------*$" ; @r{Double-shame!}
10290         "^________*$"   ; @r{Underscores are also popular}
10291         "^========*$")) ; @r{Pervert!}
10292 @end lisp
10294 The more permissive you are, the more likely it is that you'll get false
10295 positives.
10297 @vindex gnus-signature-limit
10298 @code{gnus-signature-limit} provides a limit to what is considered a
10299 signature when displaying articles.
10301 @enumerate
10302 @item
10303 If it is an integer, no signature may be longer (in characters) than
10304 that integer.
10305 @item
10306 If it is a floating point number, no signature may be longer (in lines)
10307 than that number.
10308 @item
10309 If it is a function, the function will be called without any parameters,
10310 and if it returns @code{nil}, there is no signature in the buffer.
10311 @item
10312 If it is a string, it will be used as a regexp.  If it matches, the text
10313 in question is not a signature.
10314 @end enumerate
10316 This variable can also be a list where the elements may be of the types
10317 listed above.  Here's an example:
10319 @lisp
10320 (setq gnus-signature-limit
10321       '(200.0 "^---*Forwarded article"))
10322 @end lisp
10324 This means that if there are more than 200 lines after the signature
10325 separator, or the text after the signature separator is matched by
10326 the regular expression @samp{^---*Forwarded article}, then it isn't a
10327 signature after all.
10330 @node Article Miscellanea
10331 @subsection Article Miscellanea
10333 @table @kbd
10334 @item A t
10335 @kindex A t (Summary)
10336 @findex gnus-article-babel
10337 Translate the article from one language to another
10338 (@code{gnus-article-babel}).
10340 @end table
10343 @node MIME Commands
10344 @section MIME Commands
10345 @cindex MIME decoding
10346 @cindex attachments
10347 @cindex viewing attachments
10349 The following commands all understand the numerical prefix.  For
10350 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
10352 @table @kbd
10353 @item b
10354 @itemx K v
10355 @kindex b (Summary)
10356 @kindex K v (Summary)
10357 View the @acronym{MIME} part.
10359 @item K o
10360 @kindex K o (Summary)
10361 Save the @acronym{MIME} part.
10363 @item K O
10364 @kindex K O (Summary)
10365 Prompt for a file name, then save the @acronym{MIME} part and strip it
10366 from the article.  The stripped @acronym{MIME} object will be referred
10367 via the message/external-body @acronym{MIME} type.
10369 @item K r
10370 @kindex K r (Summary)
10371 Replace the @acronym{MIME} part with an external body.
10373 @item K d
10374 @kindex K d (Summary)
10375 Delete the @acronym{MIME} part and add some information about the
10376 removed part.
10378 @item K c
10379 @kindex K c (Summary)
10380 Copy the @acronym{MIME} part.
10382 @item K e
10383 @kindex K e (Summary)
10384 View the @acronym{MIME} part externally.
10386 @item K i
10387 @kindex K i (Summary)
10388 View the @acronym{MIME} part internally.
10390 @item K |
10391 @kindex K | (Summary)
10392 Pipe the @acronym{MIME} part to an external command.
10393 @end table
10395 The rest of these @acronym{MIME} commands do not use the numerical prefix in
10396 the same manner:
10398 @table @kbd
10399 @item K H
10400 @kindex K H (Summary)
10401 @findex gnus-article-browse-html-article
10402 View @samp{text/html} parts of the current article with a WWW browser.
10403 The message header is added to the beginning of every html part unless
10404 the prefix argument is given.
10406 Warning: Spammers use links to images in HTML articles to verify whether
10407 you have read the message.  As this command passes the @acronym{HTML}
10408 content to the browser without eliminating these ``web bugs'' you should
10409 only use it for mails from trusted senders.
10411 If you always want to display @acronym{HTML} parts in the browser, set
10412 @code{mm-text-html-renderer} to @code{nil}.
10414 @item K b
10415 @kindex K b (Summary)
10416 Make all the @acronym{MIME} parts have buttons in front of them.  This is
10417 mostly useful if you wish to save (or perform other actions) on inlined
10418 parts.
10420 @item K m
10421 @kindex K m (Summary)
10422 @findex gnus-summary-repair-multipart
10423 Some multipart messages are transmitted with missing or faulty headers.
10424 This command will attempt to ``repair'' these messages so that they can
10425 be viewed in a more pleasant manner
10426 (@code{gnus-summary-repair-multipart}).
10428 @item X m
10429 @kindex X m (Summary)
10430 @findex gnus-summary-save-parts
10431 Save all parts matching a @acronym{MIME} type to a directory
10432 (@code{gnus-summary-save-parts}).  Understands the process/prefix
10433 convention (@pxref{Process/Prefix}).
10435 @item M-t
10436 @kindex M-t (Summary)
10437 @findex gnus-summary-toggle-display-buttonized
10438 Toggle the buttonized display of the article buffer
10439 (@code{gnus-summary-toggle-display-buttonized}).
10441 @item W M w
10442 @kindex W M w (Summary)
10443 @findex gnus-article-decode-mime-words
10444 Decode RFC 2047-encoded words in the article headers
10445 (@code{gnus-article-decode-mime-words}).
10447 @item W M c
10448 @kindex W M c (Summary)
10449 @findex gnus-article-decode-charset
10450 Decode encoded article bodies as well as charsets
10451 (@code{gnus-article-decode-charset}).
10453 This command looks in the @code{Content-Type} header to determine the
10454 charset.  If there is no such header in the article, you can give it a
10455 prefix, which will prompt for the charset to decode as.  In regional
10456 groups where people post using some common encoding (but do not
10457 include @acronym{MIME} headers), you can set the @code{charset} group/topic
10458 parameter to the required charset (@pxref{Group Parameters}).
10460 @item W M v
10461 @kindex W M v (Summary)
10462 @findex gnus-mime-view-all-parts
10463 View all the @acronym{MIME} parts in the current article
10464 (@code{gnus-mime-view-all-parts}).
10466 @end table
10468 Relevant variables:
10470 @table @code
10471 @item gnus-ignored-mime-types
10472 @vindex gnus-ignored-mime-types
10473 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10474 this list will be completely ignored by Gnus.  The default value is
10475 @code{nil}.
10477 To have all Vcards be ignored, you'd say something like this:
10479 @lisp
10480 (setq gnus-ignored-mime-types
10481       '("text/x-vcard"))
10482 @end lisp
10484 @item gnus-article-loose-mime
10485 @vindex gnus-article-loose-mime
10486 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
10487 before interpreting the message as a @acronym{MIME} message.  This helps
10488 when reading messages from certain broken mail user agents.  The
10489 default is @code{t}.
10491 @item gnus-article-emulate-mime
10492 @vindex gnus-article-emulate-mime
10493 @cindex uuencode
10494 @cindex yEnc
10495 There are other, non-@acronym{MIME} encoding methods used.  The most common
10496 is @samp{uuencode}, but yEncode is also getting to be popular.  If
10497 this variable is non-@code{nil}, Gnus will look in message bodies to
10498 see if it finds these encodings, and if so, it'll run them through the
10499 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
10500 single-part yEnc encoded attachments can be decoded.  There's no support
10501 for encoding in Gnus.
10503 @item gnus-unbuttonized-mime-types
10504 @vindex gnus-unbuttonized-mime-types
10505 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10506 this list won't have @acronym{MIME} buttons inserted unless they aren't
10507 displayed or this variable is overridden by
10508 @code{gnus-buttonized-mime-types}.  The default value is
10509 @code{(".*/.*")}.  This variable is only used when
10510 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
10512 @item gnus-buttonized-mime-types
10513 @vindex gnus-buttonized-mime-types
10514 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10515 this list will have @acronym{MIME} buttons inserted unless they aren't
10516 displayed.  This variable overrides
10517 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
10518 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
10519 is @code{nil}.
10521 To see e.g. security buttons but no other buttons, you could set this
10522 variable to @code{("multipart/signed")} and leave
10523 @code{gnus-unbuttonized-mime-types} at the default value.
10525 You could also add @code{"multipart/alternative"} to this list to
10526 display radio buttons that allow you to choose one of two media types
10527 those mails include.  See also @code{mm-discouraged-alternatives}
10528 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
10529 Emacs MIME Manual}).
10531 @item gnus-inhibit-mime-unbuttonizing
10532 @vindex gnus-inhibit-mime-unbuttonizing
10533 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
10534 default value is @code{nil}.
10536 @item gnus-article-mime-part-function
10537 @vindex gnus-article-mime-part-function
10538 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
10539 handle as the parameter.  The function is meant to be used to allow
10540 users to gather information from the article (e. g., add Vcard info to
10541 the bbdb database) or to do actions based on parts (e. g., automatically
10542 save all jpegs into some directory).
10544 Here's an example function the does the latter:
10546 @lisp
10547 (defun my-save-all-jpeg-parts (handle)
10548   (when (equal (car (mm-handle-type handle)) "image/jpeg")
10549     (with-temp-buffer
10550       (insert (mm-get-part handle))
10551       (write-region (point-min) (point-max)
10552                     (read-file-name "Save jpeg to: ")))))
10553 (setq gnus-article-mime-part-function
10554       'my-save-all-jpeg-parts)
10555 @end lisp
10557 @vindex gnus-mime-multipart-functions
10558 @item gnus-mime-multipart-functions
10559 Alist of @acronym{MIME} multipart types and functions to handle them.
10561 @vindex gnus-mime-display-multipart-alternative-as-mixed
10562 @item gnus-mime-display-multipart-alternative-as-mixed
10563 Display "multipart/alternative" parts as "multipart/mixed".
10565 @vindex gnus-mime-display-multipart-related-as-mixed
10566 @item gnus-mime-display-multipart-related-as-mixed
10567 Display "multipart/related" parts as "multipart/mixed".
10569 If displaying @samp{text/html} is discouraged, see
10570 @code{mm-discouraged-alternatives}, images or other material inside a
10571 "multipart/related" part might be overlooked when this variable is
10572 @code{nil}.  @ref{Display Customization, Display Customization, ,
10573 emacs-mime, Emacs-Mime Manual}.
10575 @vindex gnus-mime-display-multipart-as-mixed
10576 @item gnus-mime-display-multipart-as-mixed
10577 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
10578 overrides @code{nil} values of
10579 @code{gnus-mime-display-multipart-alternative-as-mixed} and
10580 @code{gnus-mime-display-multipart-related-as-mixed}.
10582 @vindex mm-file-name-rewrite-functions
10583 @item mm-file-name-rewrite-functions
10584 List of functions used for rewriting file names of @acronym{MIME} parts.
10585 Each function takes a file name as input and returns a file name.
10587 Ready-made functions include@*
10588 @code{mm-file-name-delete-whitespace},
10589 @code{mm-file-name-trim-whitespace},
10590 @code{mm-file-name-collapse-whitespace}, and
10591 @code{mm-file-name-replace-whitespace}.  The later uses the value of
10592 the variable @code{mm-file-name-replace-whitespace} to replace each
10593 whitespace character in a file name with that string; default value
10594 is @code{"_"} (a single underscore).
10595 @findex mm-file-name-delete-whitespace
10596 @findex mm-file-name-trim-whitespace
10597 @findex mm-file-name-collapse-whitespace
10598 @findex mm-file-name-replace-whitespace
10599 @vindex mm-file-name-replace-whitespace
10601 The standard functions @code{capitalize}, @code{downcase},
10602 @code{upcase}, and @code{upcase-initials} may be useful, too.
10604 Everybody knows that whitespace characters in file names are evil,
10605 except those who don't know.  If you receive lots of attachments from
10606 such unenlightened users, you can make live easier by adding
10608 @lisp
10609 (setq mm-file-name-rewrite-functions
10610       '(mm-file-name-trim-whitespace
10611         mm-file-name-collapse-whitespace
10612         mm-file-name-replace-whitespace))
10613 @end lisp
10615 @noindent
10616 to your @file{~/.gnus.el} file.
10618 @end table
10621 @node Charsets
10622 @section Charsets
10623 @cindex charsets
10625 People use different charsets, and we have @acronym{MIME} to let us know what
10626 charsets they use.  Or rather, we wish we had.  Many people use
10627 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10628 just send out messages without saying what character sets they use.  To
10629 help a bit with this, some local news hierarchies have policies that say
10630 what character set is the default.  For instance, the @samp{fj}
10631 hierarchy uses @code{iso-2022-jp}.
10633 @vindex gnus-group-charset-alist
10634 This knowledge is encoded in the @code{gnus-group-charset-alist}
10635 variable, which is an alist of regexps (use the first item to match full
10636 group names) and default charsets to be used when reading these groups.
10638 @vindex gnus-newsgroup-ignored-charsets
10639 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10640 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10641 even if they really are in @code{koi-8}.  To help here, the
10642 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10643 charsets that are listed here will be ignored.  The variable can be
10644 set on a group-by-group basis using the group parameters (@pxref{Group
10645 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10646 which includes values some agents insist on having in there.
10648 @vindex gnus-group-posting-charset-alist
10649 When posting, @code{gnus-group-posting-charset-alist} is used to
10650 determine which charsets should not be encoded using the @acronym{MIME}
10651 encodings.  For instance, some hierarchies discourage using
10652 quoted-printable header encoding.
10654 This variable is an alist of regexps and permitted unencoded charsets
10655 for posting.  Each element of the alist has the form @code{(}@var{test
10656 header body-list}@code{)}, where:
10658 @table @var
10659 @item test
10660 is either a regular expression matching the newsgroup header or a
10661 variable to query,
10662 @item header
10663 is the charset which may be left unencoded in the header (@code{nil}
10664 means encode all charsets),
10665 @item body-list
10666 is a list of charsets which may be encoded using 8bit content-transfer
10667 encoding in the body, or one of the special values @code{nil} (always
10668 encode using quoted-printable) or @code{t} (always use 8bit).
10669 @end table
10671 @cindex Russian
10672 @cindex koi8-r
10673 @cindex koi8-u
10674 @cindex iso-8859-5
10675 @cindex coding system aliases
10676 @cindex preferred charset
10678 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10679 The Emacs MIME Manual}, for additional variables that control which
10680 MIME charsets are used when sending messages.
10682 Other charset tricks that may be useful, although not Gnus-specific:
10684 If there are several @acronym{MIME} charsets that encode the same Emacs
10685 charset, you can choose what charset to use by saying the following:
10687 @lisp
10688 (put-charset-property 'cyrillic-iso8859-5
10689                       'preferred-coding-system 'koi8-r)
10690 @end lisp
10692 This means that Russian will be encoded using @code{koi8-r} instead of
10693 the default @code{iso-8859-5} @acronym{MIME} charset.
10695 If you want to read messages in @code{koi8-u}, you can cheat and say
10697 @lisp
10698 (define-coding-system-alias 'koi8-u 'koi8-r)
10699 @end lisp
10701 This will almost do the right thing.
10703 And finally, to read charsets like @code{windows-1251}, you can say
10704 something like
10706 @lisp
10707 (codepage-setup 1251)
10708 (define-coding-system-alias 'windows-1251 'cp1251)
10709 @end lisp
10712 @node Article Commands
10713 @section Article Commands
10715 @table @kbd
10717 @item A P
10718 @cindex PostScript
10719 @cindex printing
10720 @kindex A P (Summary)
10721 @vindex gnus-ps-print-hook
10722 @findex gnus-summary-print-article
10723 Generate and print a PostScript image of the article buffer
10724 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10725 be run just before printing the buffer.  An alternative way to print
10726 article is to use Muttprint (@pxref{Saving Articles}).
10728 @end table
10731 @node Summary Sorting
10732 @section Summary Sorting
10733 @cindex summary sorting
10735 You can have the summary buffer sorted in various ways, even though I
10736 can't really see why you'd want that.
10738 @table @kbd
10740 @item C-c C-s C-n
10741 @kindex C-c C-s C-n (Summary)
10742 @findex gnus-summary-sort-by-number
10743 Sort by article number (@code{gnus-summary-sort-by-number}).
10745 @item C-c C-s C-a
10746 @kindex C-c C-s C-a (Summary)
10747 @findex gnus-summary-sort-by-author
10748 Sort by author (@code{gnus-summary-sort-by-author}).
10750 @item C-c C-s C-t
10751 @kindex C-c C-s C-t (Summary)
10752 @findex gnus-summary-sort-by-recipient
10753 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10755 @item C-c C-s C-s
10756 @kindex C-c C-s C-s (Summary)
10757 @findex gnus-summary-sort-by-subject
10758 Sort by subject (@code{gnus-summary-sort-by-subject}).
10760 @item C-c C-s C-d
10761 @kindex C-c C-s C-d (Summary)
10762 @findex gnus-summary-sort-by-date
10763 Sort by date (@code{gnus-summary-sort-by-date}).
10765 @item C-c C-s C-l
10766 @kindex C-c C-s C-l (Summary)
10767 @findex gnus-summary-sort-by-lines
10768 Sort by lines (@code{gnus-summary-sort-by-lines}).
10770 @item C-c C-s C-c
10771 @kindex C-c C-s C-c (Summary)
10772 @findex gnus-summary-sort-by-chars
10773 Sort by article length (@code{gnus-summary-sort-by-chars}).
10775 @item C-c C-s C-i
10776 @kindex C-c C-s C-i (Summary)
10777 @findex gnus-summary-sort-by-score
10778 Sort by score (@code{gnus-summary-sort-by-score}).
10780 @item C-c C-s C-r
10781 @kindex C-c C-s C-r (Summary)
10782 @findex gnus-summary-sort-by-random
10783 Randomize (@code{gnus-summary-sort-by-random}).
10785 @item C-c C-s C-o
10786 @kindex C-c C-s C-o (Summary)
10787 @findex gnus-summary-sort-by-original
10788 Sort using the default sorting method
10789 (@code{gnus-summary-sort-by-original}).
10790 @end table
10792 These functions will work both when you use threading and when you don't
10793 use threading.  In the latter case, all summary lines will be sorted,
10794 line by line.  In the former case, sorting will be done on a
10795 root-by-root basis, which might not be what you were looking for.  To
10796 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10797 Commands}).
10800 @node Finding the Parent
10801 @section Finding the Parent
10802 @cindex parent articles
10803 @cindex referring articles
10805 @table @kbd
10806 @item ^
10807 @kindex ^ (Summary)
10808 @findex gnus-summary-refer-parent-article
10809 If you'd like to read the parent of the current article, and it is not
10810 displayed in the summary buffer, you might still be able to.  That is,
10811 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10812 and the @code{References} in the current article are not mangled, you
10813 can just press @kbd{^} or @kbd{A r}
10814 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10815 you'll get the parent.  If the parent is already displayed in the
10816 summary buffer, point will just move to this article.
10818 If given a positive numerical prefix, fetch that many articles back into
10819 the ancestry.  If given a negative numerical prefix, fetch just that
10820 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10821 grandparent and the grandgrandparent of the current article.  If you say
10822 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10823 article.
10825 @item A R (Summary)
10826 @findex gnus-summary-refer-references
10827 @kindex A R (Summary)
10828 Fetch all articles mentioned in the @code{References} header of the
10829 article (@code{gnus-summary-refer-references}).
10831 @item A T (Summary)
10832 @findex gnus-summary-refer-thread
10833 @kindex A T (Summary)
10834 Display the full thread where the current article appears
10835 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10836 headers in the current group to work, so it usually takes a while.  If
10837 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10838 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10839 visible effects normally, but it'll make this command work a whole lot
10840 faster.  Of course, it'll make group entry somewhat slow.
10842 @vindex gnus-refer-thread-limit
10843 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
10844 articles before the first displayed in the current group) headers to
10845 fetch when doing this command.  The default is 200.  If @code{t}, all
10846 the available headers will be fetched.  This variable can be overridden
10847 by giving the @kbd{A T} command a numerical prefix.
10849 @item M-^ (Summary)
10850 @findex gnus-summary-refer-article
10851 @kindex M-^ (Summary)
10852 @cindex Message-ID
10853 @cindex fetching by Message-ID
10854 You can also ask Gnus for an arbitrary article, no matter what group it
10855 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
10856 for a @code{Message-ID}, which is one of those long, hard-to-read
10857 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
10858 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
10860 Gnus looks for the @code{Message-ID} in the headers that have already
10861 been fetched, but also tries all the select methods specified by
10862 @code{gnus-refer-article-method} if it is not found.
10863 @end table
10865 @vindex gnus-refer-article-method
10866 If the group you are reading is located on a back end that does not
10867 support fetching by @code{Message-ID} very well (like @code{nnspool}),
10868 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
10869 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
10870 updating the spool you are reading from, but that's not really
10871 necessary.
10873 It can also be a list of select methods, as well as the special symbol
10874 @code{current}, which means to use the current select method.  If it
10875 is a list, Gnus will try all the methods in the list until it finds a
10876 match.
10878 Here's an example setting that will first try the current method, and
10879 then ask Google if that fails:
10881 @lisp
10882 (setq gnus-refer-article-method
10883       '(current
10884         (nnweb "google" (nnweb-type google))))
10885 @end lisp
10887 Most of the mail back ends support fetching by @code{Message-ID}, but
10888 do not do a particularly excellent job at it.  That is, @code{nnmbox},
10889 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
10890 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
10891 only able to locate articles that have been posted to the current
10892 group.  (Anything else would be too time consuming.)  @code{nnmh} does
10893 not support this at all.
10896 @node Alternative Approaches
10897 @section Alternative Approaches
10899 Different people like to read news using different methods.  This being
10900 Gnus, we offer a small selection of minor modes for the summary buffers.
10902 @menu
10903 * Pick and Read::               First mark articles and then read them.
10904 * Binary Groups::               Auto-decode all articles.
10905 @end menu
10908 @node Pick and Read
10909 @subsection Pick and Read
10910 @cindex pick and read
10912 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
10913 a two-phased reading interface.  The user first marks in a summary
10914 buffer the articles she wants to read.  Then she starts reading the
10915 articles with just an article buffer displayed.
10917 @findex gnus-pick-mode
10918 @kindex M-x gnus-pick-mode
10919 Gnus provides a summary buffer minor mode that allows
10920 this---@code{gnus-pick-mode}.  This basically means that a few process
10921 mark commands become one-keystroke commands to allow easy marking, and
10922 it provides one additional command for switching to the summary buffer.
10924 Here are the available keystrokes when using pick mode:
10926 @table @kbd
10927 @item .
10928 @kindex . (Pick)
10929 @findex gnus-pick-article-or-thread
10930 Pick the article or thread on the current line
10931 (@code{gnus-pick-article-or-thread}).  If the variable
10932 @code{gnus-thread-hide-subtree} is true, then this key selects the
10933 entire thread when used at the first article of the thread.  Otherwise,
10934 it selects just the article.  If given a numerical prefix, go to that
10935 thread or article and pick it.  (The line number is normally displayed
10936 at the beginning of the summary pick lines.)
10938 @item SPACE
10939 @kindex SPACE (Pick)
10940 @findex gnus-pick-next-page
10941 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
10942 at the end of the buffer, start reading the picked articles.
10944 @item u
10945 @kindex u (Pick)
10946 @findex gnus-pick-unmark-article-or-thread.
10947 Unpick the thread or article
10948 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
10949 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
10950 thread if used at the first article of the thread.  Otherwise it unpicks
10951 just the article.  You can give this key a numerical prefix to unpick
10952 the thread or article at that line.
10954 @item RET
10955 @kindex RET (Pick)
10956 @findex gnus-pick-start-reading
10957 @vindex gnus-pick-display-summary
10958 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
10959 given a prefix, mark all unpicked articles as read first.  If
10960 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
10961 will still be visible when you are reading.
10963 @end table
10965 All the normal summary mode commands are still available in the
10966 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
10967 which is mapped to the same function
10968 @code{gnus-summary-tick-article-forward}.
10970 If this sounds like a good idea to you, you could say:
10972 @lisp
10973 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
10974 @end lisp
10976 @vindex gnus-pick-mode-hook
10977 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
10979 @vindex gnus-mark-unpicked-articles-as-read
10980 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
10981 all unpicked articles as read.  The default is @code{nil}.
10983 @vindex gnus-summary-pick-line-format
10984 The summary line format in pick mode is slightly different from the
10985 standard format.  At the beginning of each line the line number is
10986 displayed.  The pick mode line format is controlled by the
10987 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
10988 Variables}).  It accepts the same format specs that
10989 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
10992 @node Binary Groups
10993 @subsection Binary Groups
10994 @cindex binary groups
10996 @findex gnus-binary-mode
10997 @kindex M-x gnus-binary-mode
10998 If you spend much time in binary groups, you may grow tired of hitting
10999 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
11000 is a minor mode for summary buffers that makes all ordinary Gnus article
11001 selection functions uudecode series of articles and display the result
11002 instead of just displaying the articles the normal way.
11004 @kindex g (Binary)
11005 @findex gnus-binary-show-article
11006 The only way, in fact, to see the actual articles is the @kbd{g}
11007 command, when you have turned on this mode
11008 (@code{gnus-binary-show-article}).
11010 @vindex gnus-binary-mode-hook
11011 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
11014 @node Tree Display
11015 @section Tree Display
11016 @cindex trees
11018 @vindex gnus-use-trees
11019 If you don't like the normal Gnus summary display, you might try setting
11020 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
11021 additional @dfn{tree buffer}.  You can execute all summary mode commands
11022 in the tree buffer.
11024 There are a few variables to customize the tree display, of course:
11026 @table @code
11027 @item gnus-tree-mode-hook
11028 @vindex gnus-tree-mode-hook
11029 A hook called in all tree mode buffers.
11031 @item gnus-tree-mode-line-format
11032 @vindex gnus-tree-mode-line-format
11033 A format string for the mode bar in the tree mode buffers (@pxref{Mode
11034 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
11035 of valid specs, @pxref{Summary Buffer Mode Line}.
11037 @item gnus-selected-tree-face
11038 @vindex gnus-selected-tree-face
11039 Face used for highlighting the selected article in the tree buffer.  The
11040 default is @code{modeline}.
11042 @item gnus-tree-line-format
11043 @vindex gnus-tree-line-format
11044 A format string for the tree nodes.  The name is a bit of a misnomer,
11045 though---it doesn't define a line, but just the node.  The default value
11046 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
11047 the name of the poster.  It is vital that all nodes are of the same
11048 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
11050 Valid specs are:
11052 @table @samp
11053 @item n
11054 The name of the poster.
11055 @item f
11056 The @code{From} header.
11057 @item N
11058 The number of the article.
11059 @item [
11060 The opening bracket.
11061 @item ]
11062 The closing bracket.
11063 @item s
11064 The subject.
11065 @end table
11067 @xref{Formatting Variables}.
11069 Variables related to the display are:
11071 @table @code
11072 @item gnus-tree-brackets
11073 @vindex gnus-tree-brackets
11074 This is used for differentiating between ``real'' articles and
11075 ``sparse'' articles.  The format is
11076 @example
11077 ((@var{real-open} . @var{real-close})
11078  (@var{sparse-open} . @var{sparse-close})
11079  (@var{dummy-open} . @var{dummy-close}))
11080 @end example
11081 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
11083 @item gnus-tree-parent-child-edges
11084 @vindex gnus-tree-parent-child-edges
11085 This is a list that contains the characters used for connecting parent
11086 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
11088 @end table
11090 @item gnus-tree-minimize-window
11091 @vindex gnus-tree-minimize-window
11092 If this variable is non-@code{nil}, Gnus will try to keep the tree
11093 buffer as small as possible to allow more room for the other Gnus
11094 windows.  If this variable is a number, the tree buffer will never be
11095 higher than that number.  The default is @code{t}.  Note that if you
11096 have several windows displayed side-by-side in a frame and the tree
11097 buffer is one of these, minimizing the tree window will also resize all
11098 other windows displayed next to it.
11100 You may also wish to add the following hook to keep the window minimized
11101 at all times:
11103 @lisp
11104 (add-hook 'gnus-configure-windows-hook
11105           'gnus-tree-perhaps-minimize)
11106 @end lisp
11108 @item gnus-generate-tree-function
11109 @vindex gnus-generate-tree-function
11110 @findex gnus-generate-horizontal-tree
11111 @findex gnus-generate-vertical-tree
11112 The function that actually generates the thread tree.  Two predefined
11113 functions are available: @code{gnus-generate-horizontal-tree} and
11114 @code{gnus-generate-vertical-tree} (which is the default).
11116 @end table
11118 Here's an example from a horizontal tree buffer:
11120 @example
11121 @{***@}-(***)-[odd]-[Gun]
11122      |      \[Jan]
11123      |      \[odd]-[Eri]
11124      |      \(***)-[Eri]
11125      |            \[odd]-[Paa]
11126      \[Bjo]
11127      \[Gun]
11128      \[Gun]-[Jor]
11129 @end example
11131 Here's the same thread displayed in a vertical tree buffer:
11133 @example
11134 @group
11135 @{***@}
11136   |--------------------------\-----\-----\
11137 (***)                         [Bjo] [Gun] [Gun]
11138   |--\-----\-----\                          |
11139 [odd] [Jan] [odd] (***)                   [Jor]
11140   |           |     |--\
11141 [Gun]       [Eri] [Eri] [odd]
11142                           |
11143                         [Paa]
11144 @end group
11145 @end example
11147 If you're using horizontal trees, it might be nice to display the trees
11148 side-by-side with the summary buffer.  You could add something like the
11149 following to your @file{~/.gnus.el} file:
11151 @lisp
11152 (setq gnus-use-trees t
11153       gnus-generate-tree-function 'gnus-generate-horizontal-tree
11154       gnus-tree-minimize-window nil)
11155 (gnus-add-configuration
11156  '(article
11157    (vertical 1.0
11158              (horizontal 0.25
11159                          (summary 0.75 point)
11160                          (tree 1.0))
11161              (article 1.0))))
11162 @end lisp
11164 @xref{Window Layout}.
11167 @node Mail Group Commands
11168 @section Mail Group Commands
11169 @cindex mail group commands
11171 Some commands only make sense in mail groups.  If these commands are
11172 invalid in the current group, they will raise a hell and let you know.
11174 All these commands (except the expiry and edit commands) use the
11175 process/prefix convention (@pxref{Process/Prefix}).
11177 @table @kbd
11179 @item B e
11180 @kindex B e (Summary)
11181 @findex gnus-summary-expire-articles
11182 @cindex expiring mail
11183 Run all expirable articles in the current group through the expiry
11184 process (@code{gnus-summary-expire-articles}).  That is, delete all
11185 expirable articles in the group that have been around for a while.
11186 (@pxref{Expiring Mail}).
11188 @item B C-M-e
11189 @kindex B C-M-e (Summary)
11190 @findex gnus-summary-expire-articles-now
11191 @cindex expiring mail
11192 Delete all the expirable articles in the group
11193 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
11194 articles eligible for expiry in the current group will
11195 disappear forever into that big @file{/dev/null} in the sky.
11197 @item B DEL
11198 @kindex B DEL (Summary)
11199 @findex gnus-summary-delete-article
11200 @c @icon{gnus-summary-mail-delete}
11201 Delete the mail article.  This is ``delete'' as in ``delete it from your
11202 disk forever and ever, never to return again.'' Use with caution.
11203 (@code{gnus-summary-delete-article}).
11205 @item B m
11206 @kindex B m (Summary)
11207 @cindex move mail
11208 @findex gnus-summary-move-article
11209 @vindex gnus-preserve-marks
11210 Move the article from one mail group to another
11211 (@code{gnus-summary-move-article}).  Marks will be preserved if
11212 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11214 @item B c
11215 @kindex B c (Summary)
11216 @cindex copy mail
11217 @findex gnus-summary-copy-article
11218 @c @icon{gnus-summary-mail-copy}
11219 Copy the article from one group (mail group or not) to a mail group
11220 (@code{gnus-summary-copy-article}).  Marks will be preserved if
11221 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11223 @item B B
11224 @kindex B B (Summary)
11225 @cindex crosspost mail
11226 @findex gnus-summary-crosspost-article
11227 Crosspost the current article to some other group
11228 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
11229 the article in the other group, and the Xref headers of the article will
11230 be properly updated.
11232 @item B i
11233 @kindex B i (Summary)
11234 @findex gnus-summary-import-article
11235 Import an arbitrary file into the current mail newsgroup
11236 (@code{gnus-summary-import-article}).  You will be prompted for a file
11237 name, a @code{From} header and a @code{Subject} header.
11239 @item B I
11240 @kindex B I (Summary)
11241 @findex gnus-summary-create-article
11242 Create an empty article in the current mail newsgroups
11243 (@code{gnus-summary-create-article}).  You will be prompted for a
11244 @code{From} header and a @code{Subject} header.
11246 @item B r
11247 @kindex B r (Summary)
11248 @findex gnus-summary-respool-article
11249 @vindex gnus-summary-respool-default-method
11250 Respool the mail article (@code{gnus-summary-respool-article}).
11251 @code{gnus-summary-respool-default-method} will be used as the default
11252 select method when respooling.  This variable is @code{nil} by default,
11253 which means that the current group select method will be used instead.
11254 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
11255 (which is the default).
11257 @item B w
11258 @itemx e
11259 @kindex B w (Summary)
11260 @kindex e (Summary)
11261 @findex gnus-summary-edit-article
11262 @kindex C-c C-c (Article)
11263 @findex gnus-summary-edit-article-done
11264 Edit the current article (@code{gnus-summary-edit-article}).  To finish
11265 editing and make the changes permanent, type @kbd{C-c C-c}
11266 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
11267 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
11269 @item B q
11270 @kindex B q (Summary)
11271 @findex gnus-summary-respool-query
11272 If you want to re-spool an article, you might be curious as to what group
11273 the article will end up in before you do the re-spooling.  This command
11274 will tell you (@code{gnus-summary-respool-query}).
11276 @item B t
11277 @kindex B t (Summary)
11278 @findex gnus-summary-respool-trace
11279 Similarly, this command will display all fancy splitting patterns used
11280 when respooling, if any (@code{gnus-summary-respool-trace}).
11282 @item B p
11283 @kindex B p (Summary)
11284 @findex gnus-summary-article-posted-p
11285 Some people have a tendency to send you ``courtesy'' copies when they
11286 follow up to articles you have posted.  These usually have a
11287 @code{Newsgroups} header in them, but not always.  This command
11288 (@code{gnus-summary-article-posted-p}) will try to fetch the current
11289 article from your news server (or rather, from
11290 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
11291 report back whether it found the article or not.  Even if it says that
11292 it didn't find the article, it may have been posted anyway---mail
11293 propagation is much faster than news propagation, and the news copy may
11294 just not have arrived yet.
11296 @item K E
11297 @kindex K E (Summary)
11298 @findex gnus-article-encrypt-body
11299 @vindex gnus-article-encrypt-protocol
11300 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
11301 The body is encrypted with the encryption protocol specified by the
11302 variable @code{gnus-article-encrypt-protocol}.
11304 @end table
11306 @vindex gnus-move-split-methods
11307 @cindex moving articles
11308 If you move (or copy) articles regularly, you might wish to have Gnus
11309 suggest where to put the articles.  @code{gnus-move-split-methods} is a
11310 variable that uses the same syntax as @code{gnus-split-methods}
11311 (@pxref{Saving Articles}).  You may customize that variable to create
11312 suggestions you find reasonable.  (Note that
11313 @code{gnus-move-split-methods} uses group names where
11314 @code{gnus-split-methods} uses file names.)
11316 @lisp
11317 (setq gnus-move-split-methods
11318       '(("^From:.*Lars Magne" "nnml:junk")
11319         ("^Subject:.*gnus" "nnfolder:important")
11320         (".*" "nnml:misc")))
11321 @end lisp
11324 @node Various Summary Stuff
11325 @section Various Summary Stuff
11327 @menu
11328 * Summary Group Information::   Information oriented commands.
11329 * Searching for Articles::      Multiple article commands.
11330 * Summary Generation Commands::
11331 * Really Various Summary Commands::  Those pesky non-conformant commands.
11332 @end menu
11334 @table @code
11335 @vindex gnus-summary-display-while-building
11336 @item gnus-summary-display-while-building
11337 If non-@code{nil}, show and update the summary buffer as it's being
11338 built.  If @code{t}, update the buffer after every line is inserted.
11339 If the value is an integer, @var{n}, update the display every @var{n}
11340 lines.  The default is @code{nil}.
11342 @vindex gnus-summary-display-arrow
11343 @item gnus-summary-display-arrow
11344 If non-@code{nil}, display an arrow in the fringe to indicate the
11345 current article.
11347 @vindex gnus-summary-mode-hook
11348 @item gnus-summary-mode-hook
11349 This hook is called when creating a summary mode buffer.
11351 @vindex gnus-summary-generate-hook
11352 @item gnus-summary-generate-hook
11353 This is called as the last thing before doing the threading and the
11354 generation of the summary buffer.  It's quite convenient for customizing
11355 the threading variables based on what data the newsgroup has.  This hook
11356 is called from the summary buffer after most summary buffer variables
11357 have been set.
11359 @vindex gnus-summary-prepare-hook
11360 @item gnus-summary-prepare-hook
11361 It is called after the summary buffer has been generated.  You might use
11362 it to, for instance, highlight lines or modify the look of the buffer in
11363 some other ungodly manner.  I don't care.
11365 @vindex gnus-summary-prepared-hook
11366 @item gnus-summary-prepared-hook
11367 A hook called as the very last thing after the summary buffer has been
11368 generated.
11370 @vindex gnus-summary-ignore-duplicates
11371 @item gnus-summary-ignore-duplicates
11372 When Gnus discovers two articles that have the same @code{Message-ID},
11373 it has to do something drastic.  No articles are allowed to have the
11374 same @code{Message-ID}, but this may happen when reading mail from some
11375 sources.  Gnus allows you to customize what happens with this variable.
11376 If it is @code{nil} (which is the default), Gnus will rename the
11377 @code{Message-ID} (for display purposes only) and display the article as
11378 any other article.  If this variable is @code{t}, it won't display the
11379 article---it'll be as if it never existed.
11381 @vindex gnus-alter-articles-to-read-function
11382 @item gnus-alter-articles-to-read-function
11383 This function, which takes two parameters (the group name and the list
11384 of articles to be selected), is called to allow the user to alter the
11385 list of articles to be selected.
11387 For instance, the following function adds the list of cached articles to
11388 the list in one particular group:
11390 @lisp
11391 (defun my-add-cached-articles (group articles)
11392   (if (string= group "some.group")
11393       (append gnus-newsgroup-cached articles)
11394     articles))
11395 @end lisp
11397 @vindex gnus-newsgroup-variables
11398 @item gnus-newsgroup-variables
11399 A list of newsgroup (summary buffer) local variables, or cons of
11400 variables and their default expressions to be evalled (when the default
11401 values are not @code{nil}), that should be made global while the summary
11402 buffer is active.
11404 Note: The default expressions will be evaluated (using function
11405 @code{eval}) before assignment to the local variable rather than just
11406 assigned to it.  If the default expression is the symbol @code{global},
11407 that symbol will not be evaluated but the global value of the local
11408 variable will be used instead.
11410 These variables can be used to set variables in the group parameters
11411 while still allowing them to affect operations done in other
11412 buffers.  For example:
11414 @lisp
11415 (setq gnus-newsgroup-variables
11416       '(message-use-followup-to
11417         (gnus-visible-headers .
11418  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
11419 @end lisp
11421 Also @pxref{Group Parameters}.
11423 @vindex gnus-propagate-marks
11424 @item gnus-propagate-marks
11425 If non-@code{nil}, propagate marks to the backends for possible
11426 storing.  @xref{NNTP marks}, and friends, for a more fine-grained
11427 sieve.
11429 @end table
11432 @node Summary Group Information
11433 @subsection Summary Group Information
11435 @table @kbd
11437 @item H f
11438 @kindex H f (Summary)
11439 @findex gnus-summary-fetch-faq
11440 @vindex gnus-group-faq-directory
11441 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
11442 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
11443 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
11444 is usually a directory on a remote machine.  This variable can also be
11445 a list of directories.  In that case, giving a prefix to this command
11446 will allow you to choose between the various sites.  @code{ange-ftp}
11447 or @code{efs} will probably be used for fetching the file.
11449 @item H d
11450 @kindex H d (Summary)
11451 @findex gnus-summary-describe-group
11452 Give a brief description of the current group
11453 (@code{gnus-summary-describe-group}).  If given a prefix, force
11454 rereading the description from the server.
11456 @item H h
11457 @kindex H h (Summary)
11458 @findex gnus-summary-describe-briefly
11459 Give an extremely brief description of the most important summary
11460 keystrokes (@code{gnus-summary-describe-briefly}).
11462 @item H i
11463 @kindex H i (Summary)
11464 @findex gnus-info-find-node
11465 Go to the Gnus info node (@code{gnus-info-find-node}).
11466 @end table
11469 @node Searching for Articles
11470 @subsection Searching for Articles
11472 @table @kbd
11474 @item M-s
11475 @kindex M-s (Summary)
11476 @findex gnus-summary-search-article-forward
11477 Search through all subsequent (raw) articles for a regexp
11478 (@code{gnus-summary-search-article-forward}).
11480 @item M-r
11481 @kindex M-r (Summary)
11482 @findex gnus-summary-search-article-backward
11483 Search through all previous (raw) articles for a regexp
11484 (@code{gnus-summary-search-article-backward}).
11486 @item M-S
11487 @kindex M-S (Summary)
11488 @findex gnus-summary-repeat-search-article-forward
11489 Repeat the previous search forwards
11490 (@code{gnus-summary-repeat-search-article-forward}).
11492 @item M-R
11493 @kindex M-R (Summary)
11494 @findex gnus-summary-repeat-search-article-backward
11495 Repeat the previous search backwards
11496 (@code{gnus-summary-repeat-search-article-backward}).
11498 @item &
11499 @kindex & (Summary)
11500 @findex gnus-summary-execute-command
11501 This command will prompt you for a header, a regular expression to match
11502 on this field, and a command to be executed if the match is made
11503 (@code{gnus-summary-execute-command}).  If the header is an empty
11504 string, the match is done on the entire article.  If given a prefix,
11505 search backward instead.
11507 For instance, @kbd{& RET some.*string RET #} will put the process mark on
11508 all articles that have heads or bodies that match @samp{some.*string}.
11510 @item M-&
11511 @kindex M-& (Summary)
11512 @findex gnus-summary-universal-argument
11513 Perform any operation on all articles that have been marked with
11514 the process mark (@code{gnus-summary-universal-argument}).
11515 @end table
11517 @node Summary Generation Commands
11518 @subsection Summary Generation Commands
11520 @table @kbd
11522 @item Y g
11523 @kindex Y g (Summary)
11524 @findex gnus-summary-prepare
11525 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
11527 @item Y c
11528 @kindex Y c (Summary)
11529 @findex gnus-summary-insert-cached-articles
11530 Pull all cached articles (for the current group) into the summary buffer
11531 (@code{gnus-summary-insert-cached-articles}).
11533 @item Y d
11534 @kindex Y d (Summary)
11535 @findex gnus-summary-insert-dormant-articles
11536 Pull all dormant articles (for the current group) into the summary buffer
11537 (@code{gnus-summary-insert-dormant-articles}).
11539 @item Y t
11540 @kindex Y t (Summary)
11541 @findex gnus-summary-insert-ticked-articles
11542 Pull all ticked articles (for the current group) into the summary buffer
11543 (@code{gnus-summary-insert-ticked-articles}).
11545 @end table
11548 @node Really Various Summary Commands
11549 @subsection Really Various Summary Commands
11551 @table @kbd
11553 @item A D
11554 @itemx C-d
11555 @kindex C-d (Summary)
11556 @kindex A D (Summary)
11557 @findex gnus-summary-enter-digest-group
11558 If the current article is a collection of other articles (for instance,
11559 a digest), you might use this command to enter a group based on the that
11560 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
11561 guess what article type is currently displayed unless you give a prefix
11562 to this command, which forces a ``digest'' interpretation.  Basically,
11563 whenever you see a message that is a collection of other messages of
11564 some format, you @kbd{C-d} and read these messages in a more convenient
11565 fashion.
11567 @vindex gnus-auto-select-on-ephemeral-exit
11568 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
11569 article should be selected after exiting a digest group.  Valid values
11570 include:
11572 @table @code
11573 @item next
11574 Select the next article.
11576 @item next-unread
11577 Select the next unread article.
11579 @item next-noselect
11580 Move the cursor to the next article.  This is the default.
11582 @item next-unread-noselect
11583 Move the cursor to the next unread article.
11584 @end table
11586 If it has any other value or there is no next (unread) article, the
11587 article selected before entering to the digest group will appear.
11589 @item C-M-d
11590 @kindex C-M-d (Summary)
11591 @findex gnus-summary-read-document
11592 This command is very similar to the one above, but lets you gather
11593 several documents into one biiig group
11594 (@code{gnus-summary-read-document}).  It does this by opening several
11595 @code{nndoc} groups for each document, and then opening an
11596 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
11597 command understands the process/prefix convention
11598 (@pxref{Process/Prefix}).
11600 @item C-t
11601 @kindex C-t (Summary)
11602 @findex gnus-summary-toggle-truncation
11603 Toggle truncation of summary lines
11604 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
11605 line centering function in the summary buffer, so it's not a good idea
11606 to have truncation switched off while reading articles.
11608 @item =
11609 @kindex = (Summary)
11610 @findex gnus-summary-expand-window
11611 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11612 If given a prefix, force an @code{article} window configuration.
11614 @item C-M-e
11615 @kindex C-M-e (Summary)
11616 @findex gnus-summary-edit-parameters
11617 Edit the group parameters (@pxref{Group Parameters}) of the current
11618 group (@code{gnus-summary-edit-parameters}).
11620 @item C-M-a
11621 @kindex C-M-a (Summary)
11622 @findex gnus-summary-customize-parameters
11623 Customize the group parameters (@pxref{Group Parameters}) of the current
11624 group (@code{gnus-summary-customize-parameters}).
11626 @end table
11629 @node Exiting the Summary Buffer
11630 @section Exiting the Summary Buffer
11631 @cindex summary exit
11632 @cindex exiting groups
11634 Exiting from the summary buffer will normally update all info on the
11635 group and return you to the group buffer.
11637 @table @kbd
11639 @item Z Z
11640 @itemx Z Q
11641 @itemx q
11642 @kindex Z Z (Summary)
11643 @kindex Z Q (Summary)
11644 @kindex q (Summary)
11645 @findex gnus-summary-exit
11646 @vindex gnus-summary-exit-hook
11647 @vindex gnus-summary-prepare-exit-hook
11648 @vindex gnus-group-no-more-groups-hook
11649 @c @icon{gnus-summary-exit}
11650 Exit the current group and update all information on the group
11651 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11652 called before doing much of the exiting, which calls
11653 @code{gnus-summary-expire-articles} by default.
11654 @code{gnus-summary-exit-hook} is called after finishing the exit
11655 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11656 group mode having no more (unread) groups.
11658 @item Z E
11659 @itemx Q
11660 @kindex Z E (Summary)
11661 @kindex Q (Summary)
11662 @findex gnus-summary-exit-no-update
11663 Exit the current group without updating any information on the group
11664 (@code{gnus-summary-exit-no-update}).
11666 @item Z c
11667 @itemx c
11668 @kindex Z c (Summary)
11669 @kindex c (Summary)
11670 @findex gnus-summary-catchup-and-exit
11671 @c @icon{gnus-summary-catchup-and-exit}
11672 Mark all unticked articles in the group as read and then exit
11673 (@code{gnus-summary-catchup-and-exit}).
11675 @item Z C
11676 @kindex Z C (Summary)
11677 @findex gnus-summary-catchup-all-and-exit
11678 Mark all articles, even the ticked ones, as read and then exit
11679 (@code{gnus-summary-catchup-all-and-exit}).
11681 @item Z n
11682 @kindex Z n (Summary)
11683 @findex gnus-summary-catchup-and-goto-next-group
11684 Mark all articles as read and go to the next group
11685 (@code{gnus-summary-catchup-and-goto-next-group}).
11687 @item Z p
11688 @kindex Z p (Summary)
11689 @findex gnus-summary-catchup-and-goto-prev-group
11690 Mark all articles as read and go to the previous group
11691 (@code{gnus-summary-catchup-and-goto-prev-group}).
11693 @item Z R
11694 @itemx C-x C-s
11695 @kindex Z R (Summary)
11696 @kindex C-x C-s (Summary)
11697 @findex gnus-summary-reselect-current-group
11698 Exit this group, and then enter it again
11699 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11700 all articles, both read and unread.
11702 @item Z G
11703 @itemx M-g
11704 @kindex Z G (Summary)
11705 @kindex M-g (Summary)
11706 @findex gnus-summary-rescan-group
11707 @c @icon{gnus-summary-mail-get}
11708 Exit the group, check for new articles in the group, and select the
11709 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11710 articles, both read and unread.
11712 @item Z N
11713 @kindex Z N (Summary)
11714 @findex gnus-summary-next-group
11715 Exit the group and go to the next group
11716 (@code{gnus-summary-next-group}).
11718 @item Z P
11719 @kindex Z P (Summary)
11720 @findex gnus-summary-prev-group
11721 Exit the group and go to the previous group
11722 (@code{gnus-summary-prev-group}).
11724 @item Z s
11725 @kindex Z s (Summary)
11726 @findex gnus-summary-save-newsrc
11727 Save the current number of read/marked articles in the dribble buffer
11728 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11729 given a prefix, also save the @file{.newsrc} file(s).  Using this
11730 command will make exit without updating (the @kbd{Q} command) worthless.
11731 @end table
11733 @vindex gnus-exit-group-hook
11734 @code{gnus-exit-group-hook} is called when you exit the current group
11735 with an ``updating'' exit.  For instance @kbd{Q}
11736 (@code{gnus-summary-exit-no-update}) does not call this hook.
11738 @findex gnus-summary-wake-up-the-dead
11739 @findex gnus-dead-summary-mode
11740 @vindex gnus-kill-summary-on-exit
11741 If you're in the habit of exiting groups, and then changing your mind
11742 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11743 If you do that, Gnus won't kill the summary buffer when you exit it.
11744 (Quelle surprise!)  Instead it will change the name of the buffer to
11745 something like @samp{*Dead Summary ... *} and install a minor mode
11746 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11747 buffer, you'll find that all keys are mapped to a function called
11748 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11749 summary buffer will result in a live, normal summary buffer.
11751 There will never be more than one dead summary buffer at any one time.
11753 @vindex gnus-use-cross-reference
11754 The data on the current group will be updated (which articles you have
11755 read, which articles you have replied to, etc.) when you exit the
11756 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11757 @code{t} (which is the default), articles that are cross-referenced to
11758 this group and are marked as read, will also be marked as read in the
11759 other subscribed groups they were cross-posted to.  If this variable is
11760 neither @code{nil} nor @code{t}, the article will be marked as read in
11761 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11764 @node Crosspost Handling
11765 @section Crosspost Handling
11767 @cindex velveeta
11768 @cindex spamming
11769 Marking cross-posted articles as read ensures that you'll never have to
11770 read the same article more than once.  Unless, of course, somebody has
11771 posted it to several groups separately.  Posting the same article to
11772 several groups (not cross-posting) is called @dfn{spamming}, and you are
11773 by law required to send nasty-grams to anyone who perpetrates such a
11774 heinous crime.  You may want to try NoCeM handling to filter out spam
11775 (@pxref{NoCeM}).
11777 Remember: Cross-posting is kinda ok, but posting the same article
11778 separately to several groups is not.  Massive cross-posting (aka.
11779 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11780 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11781 excessive crossposting (@pxref{Summary Mail Commands}).
11783 @cindex cross-posting
11784 @cindex Xref
11785 @cindex @acronym{NOV}
11786 One thing that may cause Gnus to not do the cross-posting thing
11787 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11788 (which is very nice, because it speeds things up considerably) which
11789 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11790 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11791 even with @sc{xover} by registering the @code{Xref} lines of all
11792 articles you actually read, but if you kill the articles, or just mark
11793 them as read without reading them, Gnus will not get a chance to snoop
11794 the @code{Xref} lines out of these articles, and will be unable to use
11795 the cross reference mechanism.
11797 @cindex LIST overview.fmt
11798 @cindex overview.fmt
11799 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11800 in its overview files, try @samp{telnet your.nntp.server nntp},
11801 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11802 overview.fmt}.  This may not work, but if it does, and the last line you
11803 get does not read @samp{Xref:full}, then you should shout and whine at
11804 your news admin until she includes the @code{Xref} header in the
11805 overview files.
11807 If you want Gnus to get the @code{Xref}s right all the time, you have to
11808 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11809 considerably.  Also @pxref{Slow/Expensive Connection}.
11811 C'est la vie.
11813 For an alternative approach, @pxref{Duplicate Suppression}.
11816 @node Duplicate Suppression
11817 @section Duplicate Suppression
11819 By default, Gnus tries to make sure that you don't have to read the same
11820 article more than once by utilizing the crossposting mechanism
11821 (@pxref{Crosspost Handling}).  However, that simple and efficient
11822 approach may not work satisfactory for some users for various
11823 reasons.
11825 @enumerate
11826 @item
11827 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11828 is evil and not very common.
11830 @item
11831 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11832 @file{.overview} data bases.  This is evil and all too common, alas.
11834 @item
11835 You may be reading the same group (or several related groups) from
11836 different @acronym{NNTP} servers.
11838 @item
11839 You may be getting mail that duplicates articles posted to groups.
11840 @end enumerate
11842 I'm sure there are other situations where @code{Xref} handling fails as
11843 well, but these four are the most common situations.
11845 If, and only if, @code{Xref} handling fails for you, then you may
11846 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
11847 will remember the @code{Message-ID}s of all articles you have read or
11848 otherwise marked as read, and then, as if by magic, mark them as read
11849 all subsequent times you see them---in @emph{all} groups.  Using this
11850 mechanism is quite likely to be somewhat inefficient, but not overly
11851 so.  It's certainly preferable to reading the same articles more than
11852 once.
11854 Duplicate suppression is not a very subtle instrument.  It's more like a
11855 sledge hammer than anything else.  It works in a very simple
11856 fashion---if you have marked an article as read, it adds this Message-ID
11857 to a cache.  The next time it sees this Message-ID, it will mark the
11858 article as read with the @samp{M} mark.  It doesn't care what group it
11859 saw the article in.
11861 @table @code
11862 @item gnus-suppress-duplicates
11863 @vindex gnus-suppress-duplicates
11864 If non-@code{nil}, suppress duplicates.
11866 @item gnus-save-duplicate-list
11867 @vindex gnus-save-duplicate-list
11868 If non-@code{nil}, save the list of duplicates to a file.  This will
11869 make startup and shutdown take longer, so the default is @code{nil}.
11870 However, this means that only duplicate articles read in a single Gnus
11871 session are suppressed.
11873 @item gnus-duplicate-list-length
11874 @vindex gnus-duplicate-list-length
11875 This variable says how many @code{Message-ID}s to keep in the duplicate
11876 suppression list.  The default is 10000.
11878 @item gnus-duplicate-file
11879 @vindex gnus-duplicate-file
11880 The name of the file to store the duplicate suppression list in.  The
11881 default is @file{~/News/suppression}.
11882 @end table
11884 If you have a tendency to stop and start Gnus often, setting
11885 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
11886 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
11887 the other hand, saving the list makes startup and shutdown much slower,
11888 so that means that if you stop and start Gnus often, you should set
11889 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
11890 to you to figure out, I think.
11892 @node Security
11893 @section Security
11895 Gnus is able to verify signed messages or decrypt encrypted messages.
11896 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
11897 and @acronym{S/MIME}, however you need some external programs to get
11898 things to work:
11900 @enumerate
11901 @item
11902 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
11903 install an OpenPGP implementation such as GnuPG.  The Lisp interface
11904 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
11905 Manual}), but Mailcrypt and gpg.el are also supported.
11907 @item
11908 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
11909 or newer is recommended.
11911 @end enumerate
11913 The variables that control security functionality on reading messages
11914 include:
11916 @table @code
11917 @item mm-verify-option
11918 @vindex mm-verify-option
11919 Option of verifying signed parts.  @code{never}, not verify;
11920 @code{always}, always verify; @code{known}, only verify known
11921 protocols.  Otherwise, ask user.
11923 @item mm-decrypt-option
11924 @vindex mm-decrypt-option
11925 Option of decrypting encrypted parts.  @code{never}, no decryption;
11926 @code{always}, always decrypt; @code{known}, only decrypt known
11927 protocols.  Otherwise, ask user.
11929 @item mml1991-use
11930 @vindex mml1991-use
11931 Symbol indicating elisp interface to OpenPGP implementation for
11932 @acronym{PGP} messages.  The default is @code{pgg}, but
11933 @code{mailcrypt} and @code{gpg} are also supported although
11934 deprecated.
11936 @item mml2015-use
11937 @vindex mml2015-use
11938 Symbol indicating elisp interface to OpenPGP implementation for
11939 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
11940 @code{mailcrypt} and @code{gpg} are also supported although
11941 deprecated.
11943 @end table
11945 By default the buttons that display security information are not
11946 shown, because they clutter reading the actual e-mail.  You can type
11947 @kbd{K b} manually to display the information.  Use the
11948 @code{gnus-buttonized-mime-types} and
11949 @code{gnus-unbuttonized-mime-types} variables to control this
11950 permanently.  @ref{MIME Commands} for further details, and hints on
11951 how to customize these variables to always display security
11952 information.
11954 @cindex snarfing keys
11955 @cindex importing PGP keys
11956 @cindex PGP key ring import
11957 Snarfing OpenPGP keys (i.e., importing keys from articles into your
11958 key ring) is not supported explicitly through a menu item or command,
11959 rather Gnus do detect and label keys as @samp{application/pgp-keys},
11960 allowing you to specify whatever action you think is appropriate
11961 through the usual @acronym{MIME} infrastructure.  You can use a
11962 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
11963 Emacs MIME Manual}) such as the following to import keys using GNU
11964 Privacy Guard when you click on the @acronym{MIME} button
11965 (@pxref{Using MIME}).
11967 @example
11968 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
11969 @end example
11970 @noindent
11971 This happens to also be the default action defined in
11972 @code{mailcap-mime-data}.
11974 More information on how to set things for sending outgoing signed and
11975 encrypted messages up can be found in the message manual
11976 (@pxref{Security, ,Security, message, Message Manual}).
11978 @node Mailing List
11979 @section Mailing List
11980 @cindex mailing list
11981 @cindex RFC 2396
11983 @kindex A M (summary)
11984 @findex gnus-mailing-list-insinuate
11985 Gnus understands some mailing list fields of RFC 2369.  To enable it,
11986 add a @code{to-list} group parameter (@pxref{Group Parameters}),
11987 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
11988 summary buffer.
11990 That enables the following commands to the summary buffer:
11992 @table @kbd
11994 @item C-c C-n h
11995 @kindex C-c C-n h (Summary)
11996 @findex gnus-mailing-list-help
11997 Send a message to fetch mailing list help, if List-Help field exists.
11999 @item C-c C-n s
12000 @kindex C-c C-n s (Summary)
12001 @findex gnus-mailing-list-subscribe
12002 Send a message to subscribe the mailing list, if List-Subscribe field exists.
12004 @item C-c C-n u
12005 @kindex C-c C-n u (Summary)
12006 @findex gnus-mailing-list-unsubscribe
12007 Send a message to unsubscribe the mailing list, if List-Unsubscribe
12008 field exists.
12010 @item C-c C-n p
12011 @kindex C-c C-n p (Summary)
12012 @findex gnus-mailing-list-post
12013 Post to the mailing list, if List-Post field exists.
12015 @item C-c C-n o
12016 @kindex C-c C-n o (Summary)
12017 @findex gnus-mailing-list-owner
12018 Send a message to the mailing list owner, if List-Owner field exists.
12020 @item C-c C-n a
12021 @kindex C-c C-n a (Summary)
12022 @findex gnus-mailing-list-archive
12023 Browse the mailing list archive, if List-Archive field exists.
12025 @end table
12028 @node Article Buffer
12029 @chapter Article Buffer
12030 @cindex article buffer
12032 The articles are displayed in the article buffer, of which there is only
12033 one.  All the summary buffers share the same article buffer unless you
12034 tell Gnus otherwise.
12036 @menu
12037 * Hiding Headers::              Deciding what headers should be displayed.
12038 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
12039 * Customizing Articles::        Tailoring the look of the articles.
12040 * Article Keymap::              Keystrokes available in the article buffer.
12041 * Misc Article::                Other stuff.
12042 @end menu
12045 @node Hiding Headers
12046 @section Hiding Headers
12047 @cindex hiding headers
12048 @cindex deleting headers
12050 The top section of each article is the @dfn{head}.  (The rest is the
12051 @dfn{body}, but you may have guessed that already.)
12053 @vindex gnus-show-all-headers
12054 There is a lot of useful information in the head: the name of the person
12055 who wrote the article, the date it was written and the subject of the
12056 article.  That's well and nice, but there's also lots of information
12057 most people do not want to see---what systems the article has passed
12058 through before reaching you, the @code{Message-ID}, the
12059 @code{References}, etc. ad nauseam---and you'll probably want to get rid
12060 of some of those lines.  If you want to keep all those lines in the
12061 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
12063 Gnus provides you with two variables for sifting headers:
12065 @table @code
12067 @item gnus-visible-headers
12068 @vindex gnus-visible-headers
12069 If this variable is non-@code{nil}, it should be a regular expression
12070 that says what headers you wish to keep in the article buffer.  All
12071 headers that do not match this variable will be hidden.
12073 For instance, if you only want to see the name of the person who wrote
12074 the article and the subject, you'd say:
12076 @lisp
12077 (setq gnus-visible-headers "^From:\\|^Subject:")
12078 @end lisp
12080 This variable can also be a list of regexps to match headers to
12081 remain visible.
12083 @item gnus-ignored-headers
12084 @vindex gnus-ignored-headers
12085 This variable is the reverse of @code{gnus-visible-headers}.  If this
12086 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
12087 should be a regular expression that matches all lines that you want to
12088 hide.  All lines that do not match this variable will remain visible.
12090 For instance, if you just want to get rid of the @code{References} line
12091 and the @code{Xref} line, you might say:
12093 @lisp
12094 (setq gnus-ignored-headers "^References:\\|^Xref:")
12095 @end lisp
12097 This variable can also be a list of regexps to match headers to
12098 be removed.
12100 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
12101 variable will have no effect.
12103 @end table
12105 @vindex gnus-sorted-header-list
12106 Gnus can also sort the headers for you.  (It does this by default.)  You
12107 can control the sorting by setting the @code{gnus-sorted-header-list}
12108 variable.  It is a list of regular expressions that says in what order
12109 the headers are to be displayed.
12111 For instance, if you want the name of the author of the article first,
12112 and then the subject, you might say something like:
12114 @lisp
12115 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
12116 @end lisp
12118 Any headers that are to remain visible, but are not listed in this
12119 variable, will be displayed in random order after all the headers listed in this variable.
12121 @findex gnus-article-hide-boring-headers
12122 @vindex gnus-boring-article-headers
12123 You can hide further boring headers by setting
12124 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
12125 does depends on the @code{gnus-boring-article-headers} variable.  It's a
12126 list, but this list doesn't actually contain header names.  Instead it
12127 lists various @dfn{boring conditions} that Gnus can check and remove
12128 from sight.
12130 These conditions are:
12131 @table @code
12132 @item empty
12133 Remove all empty headers.
12134 @item followup-to
12135 Remove the @code{Followup-To} header if it is identical to the
12136 @code{Newsgroups} header.
12137 @item reply-to
12138 Remove the @code{Reply-To} header if it lists the same addresses as
12139 the @code{From} header, or if the @code{broken-reply-to} group
12140 parameter is set.
12141 @item newsgroups
12142 Remove the @code{Newsgroups} header if it only contains the current group
12143 name.
12144 @item to-address
12145 Remove the @code{To} header if it only contains the address identical to
12146 the current group's @code{to-address} parameter.
12147 @item to-list
12148 Remove the @code{To} header if it only contains the address identical to
12149 the current group's @code{to-list} parameter.
12150 @item cc-list
12151 Remove the @code{Cc} header if it only contains the address identical to
12152 the current group's @code{to-list} parameter.
12153 @item date
12154 Remove the @code{Date} header if the article is less than three days
12155 old.
12156 @item long-to
12157 Remove the @code{To} and/or @code{Cc} header if it is very long.
12158 @item many-to
12159 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
12160 @end table
12162 To include these three elements, you could say something like:
12164 @lisp
12165 (setq gnus-boring-article-headers
12166       '(empty followup-to reply-to))
12167 @end lisp
12169 This is also the default value for this variable.
12172 @node Using MIME
12173 @section Using MIME
12174 @cindex @acronym{MIME}
12176 Mime is a standard for waving your hands through the air, aimlessly,
12177 while people stand around yawning.
12179 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
12180 while all newsreaders die of fear.
12182 @acronym{MIME} may specify what character set the article uses, the encoding
12183 of the characters, and it also makes it possible to embed pictures and
12184 other naughty stuff in innocent-looking articles.
12186 @vindex gnus-display-mime-function
12187 @findex gnus-display-mime
12188 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
12189 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
12190 default, which creates a bundle of clickable buttons that can be used to
12191 display, save and manipulate the @acronym{MIME} objects.
12193 The following commands are available when you have placed point over a
12194 @acronym{MIME} button:
12196 @table @kbd
12197 @findex gnus-article-press-button
12198 @item RET (Article)
12199 @kindex RET (Article)
12200 @itemx BUTTON-2 (Article)
12201 Toggle displaying of the @acronym{MIME} object
12202 (@code{gnus-article-press-button}).  If built-in viewers can not display
12203 the object, Gnus resorts to external viewers in the @file{mailcap}
12204 files.  If a viewer has the @samp{copiousoutput} specification, the
12205 object is displayed inline.
12207 @findex gnus-mime-view-part
12208 @item M-RET (Article)
12209 @kindex M-RET (Article)
12210 @itemx v (Article)
12211 Prompt for a method, and then view the @acronym{MIME} object using this
12212 method (@code{gnus-mime-view-part}).
12214 @findex gnus-mime-view-part-as-type
12215 @item t (Article)
12216 @kindex t (Article)
12217 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
12218 (@code{gnus-mime-view-part-as-type}).
12220 @findex gnus-mime-view-part-as-charset
12221 @item C (Article)
12222 @kindex C (Article)
12223 Prompt for a charset, and then view the @acronym{MIME} object using this
12224 charset (@code{gnus-mime-view-part-as-charset}).
12226 @findex gnus-mime-save-part
12227 @item o (Article)
12228 @kindex o (Article)
12229 Prompt for a file name, and then save the @acronym{MIME} object
12230 (@code{gnus-mime-save-part}).
12232 @findex gnus-mime-save-part-and-strip
12233 @item C-o (Article)
12234 @kindex C-o (Article)
12235 Prompt for a file name, then save the @acronym{MIME} object and strip it from
12236 the article.  Then proceed to article editing, where a reasonable
12237 suggestion is being made on how the altered article should look
12238 like.  The stripped @acronym{MIME} object will be referred via the
12239 message/external-body @acronym{MIME} type.
12240 (@code{gnus-mime-save-part-and-strip}).
12242 @findex gnus-mime-replace-part
12243 @item r (Article)
12244 @kindex r (Article)
12245 Prompt for a file name, replace the @acronym{MIME} object with an
12246 external body refering to the file via the message/external-body
12247 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
12249 @findex gnus-mime-delete-part
12250 @item d (Article)
12251 @kindex d (Article)
12252 Delete the @acronym{MIME} object from the article and replace it with some
12253 information about the removed @acronym{MIME} object
12254 (@code{gnus-mime-delete-part}).
12256 @c FIXME: gnus-auto-select-part should be documented here
12258 @findex gnus-mime-copy-part
12259 @item c (Article)
12260 @kindex c (Article)
12261 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
12262 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
12263 without decoding.  If given a numerical prefix, you can do semi-manual
12264 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
12265 @ref{Paging the Article}).  Compressed files like @file{.gz} and
12266 @file{.bz2} are automatically decompressed if
12267 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
12268 Accessing Compressed Files, emacs, The Emacs Editor}).
12270 @findex gnus-mime-print-part
12271 @item p (Article)
12272 @kindex p (Article)
12273 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
12274 command respects the @samp{print=} specifications in the
12275 @file{.mailcap} file.
12277 @findex gnus-mime-inline-part
12278 @item i (Article)
12279 @kindex i (Article)
12280 Insert the contents of the @acronym{MIME} object into the buffer
12281 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
12282 the raw contents without decoding.  If given a numerical prefix, you can
12283 do semi-manual charset stuff (see
12284 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
12285 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
12286 automatically decompressed depending on @code{jka-compr} regardless of
12287 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
12288 Compressed Files, emacs, The Emacs Editor}).
12290 @findex gnus-mime-view-part-internally
12291 @item E (Article)
12292 @kindex E (Article)
12293 View the @acronym{MIME} object with an internal viewer.  If no internal
12294 viewer is available, use an external viewer
12295 (@code{gnus-mime-view-part-internally}).
12297 @findex gnus-mime-view-part-externally
12298 @item e (Article)
12299 @kindex e (Article)
12300 View the @acronym{MIME} object with an external viewer.
12301 (@code{gnus-mime-view-part-externally}).
12303 @findex gnus-mime-pipe-part
12304 @item | (Article)
12305 @kindex | (Article)
12306 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
12308 @findex gnus-mime-action-on-part
12309 @item . (Article)
12310 @kindex . (Article)
12311 Interactively run an action on the @acronym{MIME} object
12312 (@code{gnus-mime-action-on-part}).
12314 @end table
12316 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
12317 determines which parts to do this with is described in the Emacs
12318 @acronym{MIME} manual.
12320 It might be best to just use the toggling functions from the article
12321 buffer to avoid getting nasty surprises.  (For instance, you enter the
12322 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
12323 decoded the sound file in the article and some horrible sing-a-long song
12324 comes screaming out your speakers, and you can't find the volume button,
12325 because there isn't one, and people are starting to look at you, and you
12326 try to stop the program, but you can't, and you can't find the program
12327 to control the volume, and everybody else in the room suddenly decides
12328 to look at you disdainfully, and you'll feel rather stupid.)
12330 Any similarity to real events and people is purely coincidental.  Ahem.
12332 Also @pxref{MIME Commands}.
12335 @node Customizing Articles
12336 @section Customizing Articles
12337 @cindex article customization
12339 A slew of functions for customizing how the articles are to look like
12340 exist.  You can call these functions interactively
12341 (@pxref{Article Washing}), or you can have them
12342 called automatically when you select the articles.
12344 To have them called automatically, you should set the corresponding
12345 ``treatment'' variable.  For instance, to have headers hidden, you'd set
12346 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
12347 be set, but first we discuss the values these variables can have.
12349 Note: Some values, while valid, make little sense.  Check the list below
12350 for sensible values.
12352 @enumerate
12353 @item
12354 @code{nil}: Don't do this treatment.
12356 @item
12357 @code{t}: Do this treatment on all body parts.
12359 @item
12360 @code{head}: Do the treatment on the headers.
12362 @item
12363 @code{first}: Do this treatment on the first body part.
12365 @item
12366 @code{last}: Do this treatment on the last body part.
12368 @item
12369 An integer: Do this treatment on all body parts that have a length less
12370 than this number.
12372 @item
12373 A list of strings: Do this treatment on all body parts that are in
12374 articles that are read in groups that have names that match one of the
12375 regexps in the list.
12377 @item
12378 A list where the first element is not a string:
12380 The list is evaluated recursively.  The first element of the list is a
12381 predicate.  The following predicates are recognized: @code{or},
12382 @code{and}, @code{not} and @code{typep}.  Here's an example:
12384 @lisp
12385 (or last
12386     (typep "text/x-vcard"))
12387 @end lisp
12389 @end enumerate
12391 You may have noticed that the word @dfn{part} is used here.  This refers
12392 to the fact that some messages are @acronym{MIME} multipart articles that may
12393 be divided into several parts.  Articles that are not multiparts are
12394 considered to contain just a single part.
12396 @vindex gnus-article-treat-types
12397 Are the treatments applied to all sorts of multipart parts?  Yes, if you
12398 want to, but by default, only @samp{text/plain} parts are given the
12399 treatment.  This is controlled by the @code{gnus-article-treat-types}
12400 variable, which is a list of regular expressions that are matched to the
12401 type of the part.  This variable is ignored if the value of the
12402 controlling variable is a predicate list, as described above.
12404 @ifinfo
12405 @c Avoid sort of redundant entries in the same section for the printed
12406 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
12407 @c `i foo-bar'.
12408 @vindex gnus-treat-buttonize
12409 @vindex gnus-treat-buttonize-head
12410 @vindex gnus-treat-capitalize-sentences
12411 @vindex gnus-treat-overstrike
12412 @vindex gnus-treat-strip-cr
12413 @vindex gnus-treat-strip-headers-in-body
12414 @vindex gnus-treat-strip-leading-blank-lines
12415 @vindex gnus-treat-strip-multiple-blank-lines
12416 @vindex gnus-treat-strip-pem
12417 @vindex gnus-treat-strip-trailing-blank-lines
12418 @vindex gnus-treat-unsplit-urls
12419 @vindex gnus-treat-wash-html
12420 @vindex gnus-treat-date-english
12421 @vindex gnus-treat-date-iso8601
12422 @vindex gnus-treat-date-lapsed
12423 @vindex gnus-treat-date-local
12424 @vindex gnus-treat-date-original
12425 @vindex gnus-treat-date-user-defined
12426 @vindex gnus-treat-date-ut
12427 @vindex gnus-treat-from-picon
12428 @vindex gnus-treat-mail-picon
12429 @vindex gnus-treat-newsgroups-picon
12430 @vindex gnus-treat-display-smileys
12431 @vindex gnus-treat-body-boundary
12432 @vindex gnus-treat-display-x-face
12433 @vindex gnus-treat-display-face
12434 @vindex gnus-treat-emphasize
12435 @vindex gnus-treat-fill-article
12436 @vindex gnus-treat-fill-long-lines
12437 @vindex gnus-treat-hide-boring-headers
12438 @vindex gnus-treat-hide-citation
12439 @vindex gnus-treat-hide-citation-maybe
12440 @vindex gnus-treat-hide-headers
12441 @vindex gnus-treat-hide-signature
12442 @vindex gnus-treat-strip-banner
12443 @vindex gnus-treat-strip-list-identifiers
12444 @vindex gnus-treat-highlight-citation
12445 @vindex gnus-treat-highlight-headers
12446 @vindex gnus-treat-highlight-signature
12447 @vindex gnus-treat-play-sounds
12448 @vindex gnus-treat-translate
12449 @vindex gnus-treat-x-pgp-sig
12450 @vindex gnus-treat-unfold-headers
12451 @vindex gnus-treat-fold-headers
12452 @vindex gnus-treat-fold-newsgroups
12453 @vindex gnus-treat-leading-whitespace
12454 @end ifinfo
12456 The following treatment options are available.  The easiest way to
12457 customize this is to examine the @code{gnus-article-treat} customization
12458 group.  Values in parenthesis are suggested sensible values.  Others are
12459 possible but those listed are probably sufficient for most people.
12461 @table @code
12462 @item gnus-treat-buttonize (t, integer)
12463 @item gnus-treat-buttonize-head (head)
12465 @xref{Article Buttons}.
12467 @item gnus-treat-capitalize-sentences (t, integer)
12468 @item gnus-treat-overstrike (t, integer)
12469 @item gnus-treat-strip-cr (t, integer)
12470 @item gnus-treat-strip-headers-in-body (t, integer)
12471 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
12472 @item gnus-treat-strip-multiple-blank-lines (t, integer)
12473 @item gnus-treat-strip-pem (t, last, integer)
12474 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
12475 @item gnus-treat-unsplit-urls (t, integer)
12476 @item gnus-treat-wash-html (t, integer)
12478 @xref{Article Washing}.
12480 @item gnus-treat-date-english (head)
12481 @item gnus-treat-date-iso8601 (head)
12482 @item gnus-treat-date-lapsed (head)
12483 @item gnus-treat-date-local (head)
12484 @item gnus-treat-date-original (head)
12485 @item gnus-treat-date-user-defined (head)
12486 @item gnus-treat-date-ut (head)
12488 @xref{Article Date}.
12490 @item gnus-treat-from-picon (head)
12491 @item gnus-treat-mail-picon (head)
12492 @item gnus-treat-newsgroups-picon (head)
12494 @xref{Picons}.
12496 @item gnus-treat-display-smileys (t, integer)
12498 @item gnus-treat-body-boundary (head)
12500 @vindex gnus-body-boundary-delimiter
12501 Adds a delimiter between header and body, the string used as delimiter
12502 is controlled by @code{gnus-body-boundary-delimiter}.
12504 @xref{Smileys}.
12506 @vindex gnus-treat-display-x-face
12507 @item gnus-treat-display-x-face (head)
12509 @xref{X-Face}.
12511 @vindex gnus-treat-display-face
12512 @item gnus-treat-display-face (head)
12514 @xref{Face}.
12516 @vindex gnus-treat-emphasize
12517 @item gnus-treat-emphasize (t, head, integer)
12518 @vindex gnus-treat-fill-article
12519 @item gnus-treat-fill-article (t, integer)
12520 @vindex gnus-treat-fill-long-lines
12521 @item gnus-treat-fill-long-lines (t, integer)
12522 @vindex gnus-treat-hide-boring-headers
12523 @item gnus-treat-hide-boring-headers (head)
12524 @vindex gnus-treat-hide-citation
12525 @item gnus-treat-hide-citation (t, integer)
12526 @vindex gnus-treat-hide-citation-maybe
12527 @item gnus-treat-hide-citation-maybe (t, integer)
12528 @vindex gnus-treat-hide-headers
12529 @item gnus-treat-hide-headers (head)
12530 @vindex gnus-treat-hide-signature
12531 @item gnus-treat-hide-signature (t, last)
12532 @vindex gnus-treat-strip-banner
12533 @item gnus-treat-strip-banner (t, last)
12534 @vindex gnus-treat-strip-list-identifiers
12535 @item gnus-treat-strip-list-identifiers (head)
12537 @xref{Article Hiding}.
12539 @vindex gnus-treat-highlight-citation
12540 @item gnus-treat-highlight-citation (t, integer)
12541 @vindex gnus-treat-highlight-headers
12542 @item gnus-treat-highlight-headers (head)
12543 @vindex gnus-treat-highlight-signature
12544 @item gnus-treat-highlight-signature (t, last, integer)
12546 @xref{Article Highlighting}.
12548 @vindex gnus-treat-play-sounds
12549 @item gnus-treat-play-sounds
12550 @vindex gnus-treat-translate
12551 @item gnus-treat-translate
12552 @item gnus-treat-ansi-sequences (t)
12553 @vindex gnus-treat-x-pgp-sig
12554 @item gnus-treat-x-pgp-sig (head)
12556 @vindex gnus-treat-unfold-headers
12557 @item gnus-treat-unfold-headers (head)
12558 @vindex gnus-treat-fold-headers
12559 @item gnus-treat-fold-headers (head)
12560 @vindex gnus-treat-fold-newsgroups
12561 @item gnus-treat-fold-newsgroups (head)
12562 @vindex gnus-treat-leading-whitespace
12563 @item gnus-treat-leading-whitespace (head)
12565 @xref{Article Header}.
12568 @end table
12570 @vindex gnus-part-display-hook
12571 You can, of course, write your own functions to be called from
12572 @code{gnus-part-display-hook}.  The functions are called narrowed to the
12573 part, and you can do anything you like, pretty much.  There is no
12574 information that you have to keep in the buffer---you can change
12575 everything.
12578 @node Article Keymap
12579 @section Article Keymap
12581 Most of the keystrokes in the summary buffer can also be used in the
12582 article buffer.  They should behave as if you typed them in the summary
12583 buffer, which means that you don't actually have to have a summary
12584 buffer displayed while reading.  You can do it all from the article
12585 buffer.
12587 @kindex v (Article)
12588 @cindex keys, reserved for users (Article)
12589 The key @kbd{v} is reserved for users.  You can bind it to some
12590 command or better use it as a prefix key.
12592 A few additional keystrokes are available:
12594 @table @kbd
12596 @item SPACE
12597 @kindex SPACE (Article)
12598 @findex gnus-article-next-page
12599 Scroll forwards one page (@code{gnus-article-next-page}).
12600 This is exactly the same as @kbd{h SPACE h}.
12602 @item DEL
12603 @kindex DEL (Article)
12604 @findex gnus-article-prev-page
12605 Scroll backwards one page (@code{gnus-article-prev-page}).
12606 This is exactly the same as @kbd{h DEL h}.
12608 @item C-c ^
12609 @kindex C-c ^ (Article)
12610 @findex gnus-article-refer-article
12611 If point is in the neighborhood of a @code{Message-ID} and you press
12612 @kbd{C-c ^}, Gnus will try to get that article from the server
12613 (@code{gnus-article-refer-article}).
12615 @item C-c C-m
12616 @kindex C-c C-m (Article)
12617 @findex gnus-article-mail
12618 Send a reply to the address near point (@code{gnus-article-mail}).  If
12619 given a prefix, include the mail.
12621 @item s
12622 @kindex s (Article)
12623 @findex gnus-article-show-summary
12624 Reconfigure the buffers so that the summary buffer becomes visible
12625 (@code{gnus-article-show-summary}).
12627 @item ?
12628 @kindex ? (Article)
12629 @findex gnus-article-describe-briefly
12630 Give a very brief description of the available keystrokes
12631 (@code{gnus-article-describe-briefly}).
12633 @item TAB
12634 @kindex TAB (Article)
12635 @findex gnus-article-next-button
12636 Go to the next button, if any (@code{gnus-article-next-button}).  This
12637 only makes sense if you have buttonizing turned on.
12639 @item M-TAB
12640 @kindex M-TAB (Article)
12641 @findex gnus-article-prev-button
12642 Go to the previous button, if any (@code{gnus-article-prev-button}).
12644 @item R
12645 @kindex R (Article)
12646 @findex gnus-article-reply-with-original
12647 Send a reply to the current article and yank the current article
12648 (@code{gnus-article-reply-with-original}).  If the region is active,
12649 only yank the text in the region.
12651 @item S W
12652 @kindex S W (Article)
12653 @findex gnus-article-wide-reply-with-original
12654 Send a wide reply to the current article and yank the current article
12655 (@code{gnus-article-wide-reply-with-original}).  If the region is
12656 active, only yank the text in the region.
12658 @item F
12659 @kindex F (Article)
12660 @findex gnus-article-followup-with-original
12661 Send a followup to the current article and yank the current article
12662 (@code{gnus-article-followup-with-original}).  If the region is active,
12663 only yank the text in the region.
12666 @end table
12669 @node Misc Article
12670 @section Misc Article
12672 @table @code
12674 @item gnus-single-article-buffer
12675 @vindex gnus-single-article-buffer
12676 @cindex article buffers, several
12677 If non-@code{nil}, use the same article buffer for all the groups.
12678 (This is the default.)  If @code{nil}, each group will have its own
12679 article buffer.
12681 @vindex gnus-article-decode-hook
12682 @item gnus-article-decode-hook
12683 @cindex @acronym{MIME}
12684 Hook used to decode @acronym{MIME} articles.  The default value is
12685 @code{(article-decode-charset article-decode-encoded-words)}
12687 @vindex gnus-article-prepare-hook
12688 @item gnus-article-prepare-hook
12689 This hook is called right after the article has been inserted into the
12690 article buffer.  It is mainly intended for functions that do something
12691 depending on the contents; it should probably not be used for changing
12692 the contents of the article buffer.
12694 @item gnus-article-mode-hook
12695 @vindex gnus-article-mode-hook
12696 Hook called in article mode buffers.
12698 @item gnus-article-mode-syntax-table
12699 @vindex gnus-article-mode-syntax-table
12700 Syntax table used in article buffers.  It is initialized from
12701 @code{text-mode-syntax-table}.
12703 @vindex gnus-article-over-scroll
12704 @item gnus-article-over-scroll
12705 If non-@code{nil}, allow scrolling the article buffer even when there
12706 no more new text to scroll in.  The default is @code{nil}.
12708 @vindex gnus-article-mode-line-format
12709 @item gnus-article-mode-line-format
12710 This variable is a format string along the same lines as
12711 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12712 Line}).  It accepts the same format specifications as that variable,
12713 with two extensions:
12715 @table @samp
12717 @item w
12718 The @dfn{wash status} of the article.  This is a short string with one
12719 character for each possible article wash operation that may have been
12720 performed.  The characters and their meaning:
12722 @table @samp
12724 @item c
12725 Displayed when cited text may be hidden in the article buffer.
12727 @item h
12728 Displayed when headers are hidden in the article buffer.
12730 @item p
12731 Displayed when article is digitally signed or encrypted, and Gnus has
12732 hidden the security headers.  (N.B. does not tell anything about
12733 security status, i.e. good or bad signature.)
12735 @item s
12736 Displayed when the signature has been hidden in the Article buffer.
12738 @item o
12739 Displayed when Gnus has treated overstrike characters in the article buffer.
12741 @item e
12742 Displayed when Gnus has treated emphasised strings in the article buffer.
12744 @end table
12746 @item m
12747 The number of @acronym{MIME} parts in the article.
12749 @end table
12751 @vindex gnus-break-pages
12753 @item gnus-break-pages
12754 Controls whether @dfn{page breaking} is to take place.  If this variable
12755 is non-@code{nil}, the articles will be divided into pages whenever a
12756 page delimiter appears in the article.  If this variable is @code{nil},
12757 paging will not be done.
12759 @item gnus-page-delimiter
12760 @vindex gnus-page-delimiter
12761 This is the delimiter mentioned above.  By default, it is @samp{^L}
12762 (formfeed).
12764 @cindex IDNA
12765 @cindex internationalized domain names
12766 @vindex gnus-use-idna
12767 @item gnus-use-idna
12768 This variable controls whether Gnus performs IDNA decoding of
12769 internationalized domain names inside @samp{From}, @samp{To} and
12770 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12771 for how to compose such messages.  This requires
12772 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12773 variable is only enabled if you have installed it.
12775 @end table
12778 @node Composing Messages
12779 @chapter Composing Messages
12780 @cindex composing messages
12781 @cindex messages
12782 @cindex mail
12783 @cindex sending mail
12784 @cindex reply
12785 @cindex followup
12786 @cindex post
12787 @cindex using gpg
12788 @cindex using s/mime
12789 @cindex using smime
12791 @kindex C-c C-c (Post)
12792 All commands for posting and mailing will put you in a message buffer
12793 where you can edit the article all you like, before you send the
12794 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
12795 Message Manual}.  Where the message will be posted/mailed to depends
12796 on your setup (@pxref{Posting Server}).
12798 @menu
12799 * Mail::                        Mailing and replying.
12800 * Posting Server::              What server should you post and mail via?
12801 * POP before SMTP::             You cannot send a mail unless you read a mail.
12802 * Mail and Post::               Mailing and posting at the same time.
12803 * Archived Messages::           Where Gnus stores the messages you've sent.
12804 * Posting Styles::              An easier way to specify who you are.
12805 * Drafts::                      Postponing messages and rejected messages.
12806 * Rejected Articles::           What happens if the server doesn't like your article?
12807 * Signing and encrypting::      How to compose secure messages.
12808 @end menu
12810 Also @pxref{Canceling and Superseding} for information on how to
12811 remove articles you shouldn't have posted.
12814 @node Mail
12815 @section Mail
12817 Variables for customizing outgoing mail:
12819 @table @code
12820 @item gnus-uu-digest-headers
12821 @vindex gnus-uu-digest-headers
12822 List of regexps to match headers included in digested messages.  The
12823 headers will be included in the sequence they are matched.  If
12824 @code{nil} include all headers.
12826 @item gnus-add-to-list
12827 @vindex gnus-add-to-list
12828 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
12829 that have none when you do a @kbd{a}.
12831 @item gnus-confirm-mail-reply-to-news
12832 @vindex gnus-confirm-mail-reply-to-news
12833 If non-@code{nil}, Gnus will ask you for a confirmation when you are
12834 about to reply to news articles by mail.  If it is @code{nil}, nothing
12835 interferes in what you want to do.  This can also be a function
12836 receiving the group name as the only parameter which should return
12837 non-@code{nil} if a confirmation is needed, or a regular expression
12838 matching group names, where confirmation should be asked for.
12840 If you find yourself never wanting to reply to mail, but occasionally
12841 press @kbd{R} anyway, this variable might be for you.
12843 @item gnus-confirm-treat-mail-like-news
12844 @vindex gnus-confirm-treat-mail-like-news
12845 If non-@code{nil}, Gnus also requests confirmation according to
12846 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
12847 useful for treating mailing lists like newsgroups.
12849 @end table
12852 @node Posting Server
12853 @section Posting Server
12855 When you press those magical @kbd{C-c C-c} keys to ship off your latest
12856 (extremely intelligent, of course) article, where does it go?
12858 Thank you for asking.  I hate you.
12860 It can be quite complicated.
12862 @vindex gnus-post-method
12863 When posting news, Message usually invokes @code{message-send-news}
12864 (@pxref{News Variables, , News Variables, message, Message Manual}).
12865 Normally, Gnus will post using the same select method as you're
12866 reading from (which might be convenient if you're reading lots of
12867 groups from different private servers).  However.  If the server
12868 you're reading from doesn't allow posting, just reading, you probably
12869 want to use some other server to post your (extremely intelligent and
12870 fabulously interesting) articles.  You can then set the
12871 @code{gnus-post-method} to some other method:
12873 @lisp
12874 (setq gnus-post-method '(nnspool ""))
12875 @end lisp
12877 Now, if you've done this, and then this server rejects your article, or
12878 this server is down, what do you do then?  To override this variable you
12879 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
12880 the ``current'' server, to get back the default behavior, for posting.
12882 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
12883 Gnus will prompt you for what method to use for posting.
12885 You can also set @code{gnus-post-method} to a list of select methods.
12886 If that's the case, Gnus will always prompt you for what method to use
12887 for posting.
12889 Finally, if you want to always post using the native select method,
12890 you can set this variable to @code{native}.
12892 @vindex message-send-mail-function
12893 When sending mail, Message invokes the function specified by the
12894 variable @code{message-send-mail-function}.  Gnus tries to set it to a
12895 value suitable for your system.
12896 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
12897 information.
12899 @node POP before SMTP
12900 @section POP before SMTP
12901 @cindex pop before smtp
12902 @findex message-smtpmail-send-it
12903 @findex mail-source-touch-pop
12905 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
12906 authentication?  It is whether you need to connect to the @acronym{POP}
12907 mail server within a certain time before sending mails.  If so, there is
12908 a convenient way.  To do that, put the following lines in your
12909 @file{~/.gnus.el} file:
12911 @lisp
12912 (setq message-send-mail-function 'message-smtpmail-send-it)
12913 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
12914 @end lisp
12916 @noindent
12917 It means to let Gnus connect to the @acronym{POP} mail server in advance
12918 whenever you send a mail.  The @code{mail-source-touch-pop} function
12919 does only a @acronym{POP} authentication according to the value of
12920 @code{mail-sources} without fetching mails, just before sending a mail.
12921 Note that you have to use @code{message-smtpmail-send-it} which runs
12922 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
12923 set the value of @code{mail-sources} for a @acronym{POP} connection
12924 correctly.  @xref{Mail Sources}.
12926 If you have two or more @acronym{POP} mail servers set in
12927 @code{mail-sources}, you may want to specify one of them to
12928 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
12929 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
12930 is your primary @acronym{POP} mail server (i.e., you are fetching mails
12931 mainly from that server), you can set it permanently as follows:
12933 @lisp
12934 (setq mail-source-primary-source
12935       '(pop :server "pop3.mail.server"
12936             :password "secret"))
12937 @end lisp
12939 @noindent
12940 Otherwise, bind it dynamically only when performing the
12941 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
12943 @lisp
12944 (add-hook 'message-send-mail-hook
12945           (lambda ()
12946             (let ((mail-source-primary-source
12947                    '(pop :server "pop3.mail.server"
12948                          :password "secret")))
12949               (mail-source-touch-pop))))
12950 @end lisp
12952 @node Mail and Post
12953 @section Mail and Post
12955 Here's a list of variables relevant to both mailing and
12956 posting:
12958 @table @code
12959 @item gnus-mailing-list-groups
12960 @findex gnus-mailing-list-groups
12961 @cindex mailing lists
12963 If your news server offers groups that are really mailing lists
12964 gatewayed to the @acronym{NNTP} server, you can read those groups without
12965 problems, but you can't post/followup to them without some difficulty.
12966 One solution is to add a @code{to-address} to the group parameters
12967 (@pxref{Group Parameters}).  An easier thing to do is set the
12968 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
12969 really are mailing lists.  Then, at least, followups to the mailing
12970 lists will work most of the time.  Posting to these groups (@kbd{a}) is
12971 still a pain, though.
12973 @item gnus-user-agent
12974 @vindex gnus-user-agent
12975 @cindex User-Agent
12977 This variable controls which information should be exposed in the
12978 User-Agent header.  It can be a list of symbols or a string.  Valid
12979 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
12980 version).  In addition to the Emacs version, you can add @code{codename}
12981 (show (S)XEmacs codename) or either @code{config} (show system
12982 configuration) or @code{type} (show system type).  If you set it to a
12983 string, be sure to use a valid format, see RFC 2616.
12985 @end table
12987 You may want to do spell-checking on messages that you send out.  Or, if
12988 you don't want to spell-check by hand, you could add automatic
12989 spell-checking via the @code{ispell} package:
12991 @cindex ispell
12992 @findex ispell-message
12993 @lisp
12994 (add-hook 'message-send-hook 'ispell-message)
12995 @end lisp
12997 If you want to change the @code{ispell} dictionary based on what group
12998 you're in, you could say something like the following:
13000 @lisp
13001 (add-hook 'gnus-select-group-hook
13002           (lambda ()
13003             (cond
13004              ((string-match
13005                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
13006               (ispell-change-dictionary "deutsch"))
13007              (t
13008               (ispell-change-dictionary "english")))))
13009 @end lisp
13011 Modify to suit your needs.
13013 @vindex gnus-message-highlight-citation
13014 If @code{gnus-message-highlight-citation} is t, different levels of
13015 citations are highlighted like in Gnus article buffers also in message
13016 mode buffers.
13018 @node Archived Messages
13019 @section Archived Messages
13020 @cindex archived messages
13021 @cindex sent messages
13023 Gnus provides a few different methods for storing the mail and news you
13024 send.  The default method is to use the @dfn{archive virtual server} to
13025 store the messages.  If you want to disable this completely, the
13026 @code{gnus-message-archive-group} variable should be @code{nil}, which
13027 is the default.
13029 For archiving interesting messages in a group you read, see the
13030 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
13031 Group Commands}).
13033 @vindex gnus-message-archive-method
13034 @code{gnus-message-archive-method} says what virtual server Gnus is to
13035 use to store sent messages.  The default is @code{"archive"}, and when
13036 actually being used it is expanded into:
13038 @lisp
13039 (nnfolder "archive"
13040           (nnfolder-directory   "~/Mail/archive")
13041           (nnfolder-active-file "~/Mail/archive/active")
13042           (nnfolder-get-new-mail nil)
13043           (nnfolder-inhibit-expiry t))
13044 @end lisp
13046 @quotation
13047 @vindex gnus-update-message-archive-method
13048 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
13049 so that it may be used as a real method of the server which is named
13050 @code{"archive"} (that is, for the case where
13051 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
13052 since.  If it once has been saved, it will never be updated by default
13053 even if you change the value of @code{gnus-message-archive-method}
13054 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
13055 mean the @code{nnfolder} server like this at all times.  If you want the
13056 saved method to reflect always the value of
13057 @code{gnus-message-archive-method}, set the
13058 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
13059 value.  The default value of this variable is @code{nil}.
13060 @end quotation
13062 You can, however, use any mail select method (@code{nnml},
13063 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
13064 for doing this sort of thing, though.  If you don't like the default
13065 directory chosen, you could say something like:
13067 @lisp
13068 (setq gnus-message-archive-method
13069       '(nnfolder "archive"
13070                  (nnfolder-inhibit-expiry t)
13071                  (nnfolder-active-file "~/News/sent-mail/active")
13072                  (nnfolder-directory "~/News/sent-mail/")))
13073 @end lisp
13075 @vindex gnus-message-archive-group
13076 @cindex Gcc
13077 Gnus will insert @code{Gcc} headers in all outgoing messages that point
13078 to one or more group(s) on that server.  Which group to use is
13079 determined by the @code{gnus-message-archive-group} variable.
13081 This variable can be used to do the following:
13083 @table @asis
13084 @item a string
13085 Messages will be saved in that group.
13087 Note that you can include a select method in the group name, then the
13088 message will not be stored in the select method given by
13089 @code{gnus-message-archive-method}, but in the select method specified
13090 by the group name, instead.  Suppose @code{gnus-message-archive-method}
13091 has the default value shown above.  Then setting
13092 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
13093 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
13094 value @code{"nnml:foo"}, then outgoing messages will be stored in
13095 @samp{nnml:foo}.
13097 @item a list of strings
13098 Messages will be saved in all those groups.
13100 @item an alist of regexps, functions and forms
13101 When a key ``matches'', the result is used.
13103 @item @code{nil}
13104 No message archiving will take place.  This is the default.
13105 @end table
13107 Let's illustrate:
13109 Just saving to a single group called @samp{MisK}:
13110 @lisp
13111 (setq gnus-message-archive-group "MisK")
13112 @end lisp
13114 Saving to two groups, @samp{MisK} and @samp{safe}:
13115 @lisp
13116 (setq gnus-message-archive-group '("MisK" "safe"))
13117 @end lisp
13119 Save to different groups based on what group you are in:
13120 @lisp
13121 (setq gnus-message-archive-group
13122       '(("^alt" "sent-to-alt")
13123         ("mail" "sent-to-mail")
13124         (".*" "sent-to-misc")))
13125 @end lisp
13127 More complex stuff:
13128 @lisp
13129 (setq gnus-message-archive-group
13130       '((if (message-news-p)
13131             "misc-news"
13132           "misc-mail")))
13133 @end lisp
13135 How about storing all news messages in one file, but storing all mail
13136 messages in one file per month:
13138 @lisp
13139 (setq gnus-message-archive-group
13140       '((if (message-news-p)
13141             "misc-news"
13142           (concat "mail." (format-time-string "%Y-%m")))))
13143 @end lisp
13145 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
13146 @c use a different value for @code{gnus-message-archive-group} there.)
13148 Now, when you send a message off, it will be stored in the appropriate
13149 group.  (If you want to disable storing for just one particular message,
13150 you can just remove the @code{Gcc} header that has been inserted.)  The
13151 archive group will appear in the group buffer the next time you start
13152 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
13153 enter it and read the articles in it just like you'd read any other
13154 group.  If the group gets really big and annoying, you can simply rename
13155 if (using @kbd{G r} in the group buffer) to something
13156 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
13157 continue to be stored in the old (now empty) group.
13159 That's the default method of archiving sent messages.  Gnus offers a
13160 different way for the people who don't like the default method.  In that
13161 case you should set @code{gnus-message-archive-group} to @code{nil};
13162 this will disable archiving.
13164 @table @code
13165 @item gnus-outgoing-message-group
13166 @vindex gnus-outgoing-message-group
13167 All outgoing messages will be put in this group.  If you want to store
13168 all your outgoing mail and articles in the group @samp{nnml:archive},
13169 you set this variable to that value.  This variable can also be a list of
13170 group names.
13172 If you want to have greater control over what group to put each
13173 message in, you can set this variable to a function that checks the
13174 current newsgroup name and then returns a suitable group name (or list
13175 of names).
13177 This variable can be used instead of @code{gnus-message-archive-group},
13178 but the latter is the preferred method.
13180 @item gnus-gcc-mark-as-read
13181 @vindex gnus-gcc-mark-as-read
13182 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
13184 @item gnus-gcc-externalize-attachments
13185 @vindex gnus-gcc-externalize-attachments
13186 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
13187 and matches the Gcc group name, attach files as external parts; if it is
13188 @code{all}, attach local files as external parts; if it is other
13189 non-@code{nil}, the behavior is the same as @code{all}, but it may be
13190 changed in the future.
13192 @end table
13195 @node Posting Styles
13196 @section Posting Styles
13197 @cindex posting styles
13198 @cindex styles
13200 All them variables, they make my head swim.
13202 So what if you want a different @code{Organization} and signature based
13203 on what groups you post to?  And you post both from your home machine
13204 and your work machine, and you want different @code{From} lines, and so
13207 @vindex gnus-posting-styles
13208 One way to do stuff like that is to write clever hooks that change the
13209 variables you need to have changed.  That's a bit boring, so somebody
13210 came up with the bright idea of letting the user specify these things in
13211 a handy alist.  Here's an example of a @code{gnus-posting-styles}
13212 variable:
13214 @lisp
13215 ((".*"
13216   (signature "Peace and happiness")
13217   (organization "What me?"))
13218  ("^comp"
13219   (signature "Death to everybody"))
13220  ("comp.emacs.i-love-it"
13221   (organization "Emacs is it")))
13222 @end lisp
13224 As you might surmise from this example, this alist consists of several
13225 @dfn{styles}.  Each style will be applicable if the first element
13226 ``matches'', in some form or other.  The entire alist will be iterated
13227 over, from the beginning towards the end, and each match will be
13228 applied, which means that attributes in later styles that match override
13229 the same attributes in earlier matching styles.  So
13230 @samp{comp.programming.literate} will have the @samp{Death to everybody}
13231 signature and the @samp{What me?} @code{Organization} header.
13233 The first element in each style is called the @code{match}.  If it's a
13234 string, then Gnus will try to regexp match it against the group name.
13235 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
13236 will look in the original article for a header whose name is
13237 @var{match} and compare that @var{regexp}.  @var{match} and
13238 @var{regexp} are strings.  (The original article is the one you are
13239 replying or following up to.  If you are not composing a reply or a
13240 followup, then there is nothing to match against.)  If the
13241 @code{match} is a function symbol, that function will be called with
13242 no arguments.  If it's a variable symbol, then the variable will be
13243 referenced.  If it's a list, then that list will be @code{eval}ed.  In
13244 any case, if this returns a non-@code{nil} value, then the style is
13245 said to @dfn{match}.
13247 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
13248 attribute consists of a @code{(@var{name} @var{value})} pair.  In
13249 addition, you can also use the @code{(@var{name} :file @var{value})}
13250 form or the @code{(@var{name} :value @var{value})} form.  Where
13251 @code{:file} signifies @var{value} represents a file name and its
13252 contents should be used as the attribute value, @code{:value} signifies
13253 @var{value} does not represent a file name explicitly.  The attribute
13254 name can be one of:
13256 @itemize @bullet
13257 @item @code{signature}
13258 @item @code{signature-file}
13259 @item @code{x-face-file}
13260 @item @code{address}, overriding @code{user-mail-address}
13261 @item @code{name}, overriding @code{(user-full-name)}
13262 @item @code{body}
13263 @end itemize
13265 Note that the @code{signature-file} attribute honors the variable
13266 @code{message-signature-directory}.
13268 The attribute name can also be a string or a symbol.  In that case,
13269 this will be used as a header name, and the value will be inserted in
13270 the headers of the article; if the value is @code{nil}, the header
13271 name will be removed.  If the attribute name is @code{eval}, the form
13272 is evaluated, and the result is thrown away.
13274 The attribute value can be a string (used verbatim), a function with
13275 zero arguments (the return value will be used), a variable (its value
13276 will be used) or a list (it will be @code{eval}ed and the return value
13277 will be used).  The functions and sexps are called/@code{eval}ed in the
13278 message buffer that is being set up.  The headers of the current article
13279 are available through the @code{message-reply-headers} variable, which
13280 is a vector of the following headers: number subject from date id
13281 references chars lines xref extra.
13283 @vindex message-reply-headers
13285 If you wish to check whether the message you are about to compose is
13286 meant to be a news article or a mail message, you can check the values
13287 of the @code{message-news-p} and @code{message-mail-p} functions.
13289 @findex message-mail-p
13290 @findex message-news-p
13292 So here's a new example:
13294 @lisp
13295 (setq gnus-posting-styles
13296       '((".*"
13297          (signature-file "~/.signature")
13298          (name "User Name")
13299          (x-face-file "~/.xface")
13300          (x-url (getenv "WWW_HOME"))
13301          (organization "People's Front Against MWM"))
13302         ("^rec.humor"
13303          (signature my-funny-signature-randomizer))
13304         ((equal (system-name) "gnarly")  ;; @r{A form}
13305          (signature my-quote-randomizer))
13306         (message-news-p        ;; @r{A function symbol}
13307          (signature my-news-signature))
13308         (window-system         ;; @r{A value symbol}
13309          ("X-Window-System" (format "%s" window-system)))
13310         ;; @r{If I'm replying to Larsi, set the Organization header.}
13311         ((header "from" "larsi.*org")
13312          (Organization "Somewhere, Inc."))
13313         ((posting-from-work-p) ;; @r{A user defined function}
13314          (signature-file "~/.work-signature")
13315          (address "user@@bar.foo")
13316          (body "You are fired.\n\nSincerely, your boss.")
13317          (organization "Important Work, Inc"))
13318         ("nnml:.*"
13319          (From (save-excursion
13320                  (set-buffer gnus-article-buffer)
13321                  (message-fetch-field "to"))))
13322         ("^nn.+:"
13323          (signature-file "~/.mail-signature"))))
13324 @end lisp
13326 The @samp{nnml:.*} rule means that you use the @code{To} address as the
13327 @code{From} address in all your outgoing replies, which might be handy
13328 if you fill many roles.
13329 You may also use @code{message-alternative-emails} instead.
13330 @xref{Message Headers, ,Message Headers, message, Message Manual}.
13332 @node Drafts
13333 @section Drafts
13334 @cindex drafts
13336 If you are writing a message (mail or news) and suddenly remember that
13337 you have a steak in the oven (or some pesto in the food processor, you
13338 craaazy vegetarians), you'll probably wish there was a method to save
13339 the message you are writing so that you can continue editing it some
13340 other day, and send it when you feel its finished.
13342 Well, don't worry about it.  Whenever you start composing a message of
13343 some sort using the Gnus mail and post commands, the buffer you get will
13344 automatically associate to an article in a special @dfn{draft} group.
13345 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
13346 article will be saved there.  (Auto-save files also go to the draft
13347 group.)
13349 @cindex nndraft
13350 @vindex nndraft-directory
13351 The draft group is a special group (which is implemented as an
13352 @code{nndraft} group, if you absolutely have to know) called
13353 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
13354 @code{nndraft} is to store its files.  What makes this group special is
13355 that you can't tick any articles in it or mark any articles as
13356 read---all articles in the group are permanently unread.
13358 If the group doesn't exist, it will be created and you'll be subscribed
13359 to it.  The only way to make it disappear from the Group buffer is to
13360 unsubscribe it.  The special properties of the draft group comes from
13361 a group property (@pxref{Group Parameters}), and if lost the group
13362 behaves like any other group.  This means the commands below will not
13363 be available.  To restore the special properties of the group, the
13364 simplest way is to kill the group, using @kbd{C-k}, and restart
13365 Gnus.  The group is automatically created again with the
13366 correct parameters.  The content of the group is not lost.
13368 @c @findex gnus-dissociate-buffer-from-draft
13369 @c @kindex C-c M-d (Mail)
13370 @c @kindex C-c M-d (Post)
13371 @c @findex gnus-associate-buffer-with-draft
13372 @c @kindex C-c C-d (Mail)
13373 @c @kindex C-c C-d (Post)
13374 @c If you're writing some super-secret message that you later want to
13375 @c encode with PGP before sending, you may wish to turn the auto-saving
13376 @c (and association with the draft group) off.  You never know who might be
13377 @c interested in reading all your extremely valuable and terribly horrible
13378 @c and interesting secrets.  The @kbd{C-c M-d}
13379 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
13380 @c If you change your mind and want to turn the auto-saving back on again,
13381 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
13383 @c @vindex gnus-use-draft
13384 @c To leave association with the draft group off by default, set
13385 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
13387 @findex gnus-draft-edit-message
13388 @kindex D e (Draft)
13389 When you want to continue editing the article, you simply enter the
13390 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
13391 that.  You will be placed in a buffer where you left off.
13393 Rejected articles will also be put in this draft group (@pxref{Rejected
13394 Articles}).
13396 @findex gnus-draft-send-all-messages
13397 @kindex D s (Draft)
13398 @findex gnus-draft-send-message
13399 @kindex D S (Draft)
13400 If you have lots of rejected messages you want to post (or mail) without
13401 doing further editing, you can use the @kbd{D s} command
13402 (@code{gnus-draft-send-message}).  This command understands the
13403 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
13404 command (@code{gnus-draft-send-all-messages}) will ship off all messages
13405 in the buffer.
13407 @findex gnus-draft-toggle-sending
13408 @kindex D t (Draft)
13409 If you have some messages that you wish not to send, you can use the
13410 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
13411 as unsendable.  This is a toggling command.
13414 @node Rejected Articles
13415 @section Rejected Articles
13416 @cindex rejected articles
13418 Sometimes a news server will reject an article.  Perhaps the server
13419 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
13420 @emph{there be demons}.  Perhaps you have included too much cited text.
13421 Perhaps the disk is full.  Perhaps the server is down.
13423 These situations are, of course, totally beyond the control of Gnus.
13424 (Gnus, of course, loves the way you look, always feels great, has angels
13425 fluttering around inside of it, doesn't care about how much cited text
13426 you include, never runs full and never goes down.)  So Gnus saves these
13427 articles until some later time when the server feels better.
13429 The rejected articles will automatically be put in a special draft group
13430 (@pxref{Drafts}).  When the server comes back up again, you'd then
13431 typically enter that group and send all the articles off.
13433 @node Signing and encrypting
13434 @section Signing and encrypting
13435 @cindex using gpg
13436 @cindex using s/mime
13437 @cindex using smime
13439 Gnus can digitally sign and encrypt your messages, using vanilla
13440 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
13441 decoding such messages, see the @code{mm-verify-option} and
13442 @code{mm-decrypt-option} options (@pxref{Security}).
13444 @vindex gnus-message-replysign
13445 @vindex gnus-message-replyencrypt
13446 @vindex gnus-message-replysignencrypted
13447 Often, you would like to sign replies to people who send you signed
13448 messages.  Even more often, you might want to encrypt messages which
13449 are in reply to encrypted messages.  Gnus offers
13450 @code{gnus-message-replysign} to enable the former, and
13451 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
13452 @code{gnus-message-replysignencrypted} (on by default) will sign
13453 automatically encrypted messages.
13455 Instructing @acronym{MML} to perform security operations on a
13456 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
13457 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
13459 @table @kbd
13461 @item C-c C-m s s
13462 @kindex C-c C-m s s (Message)
13463 @findex mml-secure-message-sign-smime
13465 Digitally sign current message using @acronym{S/MIME}.
13467 @item C-c C-m s o
13468 @kindex C-c C-m s o (Message)
13469 @findex mml-secure-message-sign-pgp
13471 Digitally sign current message using @acronym{PGP}.
13473 @item C-c C-m s p
13474 @kindex C-c C-m s p (Message)
13475 @findex mml-secure-message-sign-pgp
13477 Digitally sign current message using @acronym{PGP/MIME}.
13479 @item C-c C-m c s
13480 @kindex C-c C-m c s (Message)
13481 @findex mml-secure-message-encrypt-smime
13483 Digitally encrypt current message using @acronym{S/MIME}.
13485 @item C-c C-m c o
13486 @kindex C-c C-m c o (Message)
13487 @findex mml-secure-message-encrypt-pgp
13489 Digitally encrypt current message using @acronym{PGP}.
13491 @item C-c C-m c p
13492 @kindex C-c C-m c p (Message)
13493 @findex mml-secure-message-encrypt-pgpmime
13495 Digitally encrypt current message using @acronym{PGP/MIME}.
13497 @item C-c C-m C-n
13498 @kindex C-c C-m C-n (Message)
13499 @findex mml-unsecure-message
13500 Remove security related @acronym{MML} tags from message.
13502 @end table
13504 @xref{Security, ,Security, message, Message Manual}, for more information.
13506 @node Select Methods
13507 @chapter Select Methods
13508 @cindex foreign groups
13509 @cindex select methods
13511 A @dfn{foreign group} is a group not read by the usual (or
13512 default) means.  It could be, for instance, a group from a different
13513 @acronym{NNTP} server, it could be a virtual group, or it could be your own
13514 personal mail group.
13516 A foreign group (or any group, really) is specified by a @dfn{name} and
13517 a @dfn{select method}.  To take the latter first, a select method is a
13518 list where the first element says what back end to use (e.g. @code{nntp},
13519 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
13520 name}.  There may be additional elements in the select method, where the
13521 value may have special meaning for the back end in question.
13523 One could say that a select method defines a @dfn{virtual server}---so
13524 we do just that (@pxref{Server Buffer}).
13526 The @dfn{name} of the group is the name the back end will recognize the
13527 group as.
13529 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
13530 @samp{some.where.edu} will have the name @samp{soc.motss} and select
13531 method @code{(nntp "some.where.edu")}.  Gnus will call this group
13532 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
13533 back end just knows this group as @samp{soc.motss}.
13535 The different methods all have their peculiarities, of course.
13537 @menu
13538 * Server Buffer::               Making and editing virtual servers.
13539 * Getting News::                Reading USENET news with Gnus.
13540 * Getting Mail::                Reading your personal mail with Gnus.
13541 * Browsing the Web::            Getting messages from a plethora of Web sources.
13542 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
13543 * Other Sources::               Reading directories, files, SOUP packets.
13544 * Combined Groups::             Combining groups into one group.
13545 * Email Based Diary::           Using mails to manage diary events in Gnus.
13546 * Gnus Unplugged::              Reading news and mail offline.
13547 @end menu
13550 @node Server Buffer
13551 @section Server Buffer
13553 Traditionally, a @dfn{server} is a machine or a piece of software that
13554 one connects to, and then requests information from.  Gnus does not
13555 connect directly to any real servers, but does all transactions through
13556 one back end or other.  But that's just putting one layer more between
13557 the actual media and Gnus, so we might just as well say that each
13558 back end represents a virtual server.
13560 For instance, the @code{nntp} back end may be used to connect to several
13561 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
13562 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
13563 use, and what parameters to set by specifying a @dfn{select method}.
13565 These select method specifications can sometimes become quite
13566 complicated---say, for instance, that you want to read from the
13567 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
13568 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
13569 Anyway, if you had to specify that for each group that used this
13570 server, that would be too much work, so Gnus offers a way of naming
13571 select methods, which is what you do in the server buffer.
13573 To enter the server buffer, use the @kbd{^}
13574 (@code{gnus-group-enter-server-mode}) command in the group buffer.
13576 @menu
13577 * Server Buffer Format::        You can customize the look of this buffer.
13578 * Server Commands::             Commands to manipulate servers.
13579 * Example Methods::             Examples server specifications.
13580 * Creating a Virtual Server::   An example session.
13581 * Server Variables::            Which variables to set.
13582 * Servers and Methods::         You can use server names as select methods.
13583 * Unavailable Servers::         Some servers you try to contact may be down.
13584 @end menu
13586 @vindex gnus-server-mode-hook
13587 @code{gnus-server-mode-hook} is run when creating the server buffer.
13590 @node Server Buffer Format
13591 @subsection Server Buffer Format
13592 @cindex server buffer format
13594 @vindex gnus-server-line-format
13595 You can change the look of the server buffer lines by changing the
13596 @code{gnus-server-line-format} variable.  This is a @code{format}-like
13597 variable, with some simple extensions:
13599 @table @samp
13601 @item h
13602 How the news is fetched---the back end name.
13604 @item n
13605 The name of this server.
13607 @item w
13608 Where the news is to be fetched from---the address.
13610 @item s
13611 The opened/closed/denied status of the server.
13613 @item a
13614 Whether this server is agentized.
13615 @end table
13617 @vindex gnus-server-mode-line-format
13618 The mode line can also be customized by using the
13619 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13620 Formatting}).  The following specs are understood:
13622 @table @samp
13623 @item S
13624 Server name.
13626 @item M
13627 Server method.
13628 @end table
13630 Also @pxref{Formatting Variables}.
13633 @node Server Commands
13634 @subsection Server Commands
13635 @cindex server commands
13637 @table @kbd
13639 @item v
13640 @kindex v (Server)
13641 @cindex keys, reserved for users (Server)
13642 The key @kbd{v} is reserved for users.  You can bind it to some
13643 command or better use it as a prefix key.
13645 @item a
13646 @kindex a (Server)
13647 @findex gnus-server-add-server
13648 Add a new server (@code{gnus-server-add-server}).
13650 @item e
13651 @kindex e (Server)
13652 @findex gnus-server-edit-server
13653 Edit a server (@code{gnus-server-edit-server}).
13655 @item SPACE
13656 @kindex SPACE (Server)
13657 @findex gnus-server-read-server
13658 Browse the current server (@code{gnus-server-read-server}).
13660 @item q
13661 @kindex q (Server)
13662 @findex gnus-server-exit
13663 Return to the group buffer (@code{gnus-server-exit}).
13665 @item k
13666 @kindex k (Server)
13667 @findex gnus-server-kill-server
13668 Kill the current server (@code{gnus-server-kill-server}).
13670 @item y
13671 @kindex y (Server)
13672 @findex gnus-server-yank-server
13673 Yank the previously killed server (@code{gnus-server-yank-server}).
13675 @item c
13676 @kindex c (Server)
13677 @findex gnus-server-copy-server
13678 Copy the current server (@code{gnus-server-copy-server}).
13680 @item l
13681 @kindex l (Server)
13682 @findex gnus-server-list-servers
13683 List all servers (@code{gnus-server-list-servers}).
13685 @item s
13686 @kindex s (Server)
13687 @findex gnus-server-scan-server
13688 Request that the server scan its sources for new articles
13689 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13690 servers.
13692 @item g
13693 @kindex g (Server)
13694 @findex gnus-server-regenerate-server
13695 Request that the server regenerate all its data structures
13696 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13697 a mail back end that has gotten out of sync.
13699 @item z
13700 @kindex z (Server)
13701 @findex gnus-server-compact-server
13703 Compact all groups in the server under point
13704 (@code{gnus-server-compact-server}).  Currently implemented only in
13705 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13706 hence getting a correct total article count.
13708 @end table
13711 @node Example Methods
13712 @subsection Example Methods
13714 Most select methods are pretty simple and self-explanatory:
13716 @lisp
13717 (nntp "news.funet.fi")
13718 @end lisp
13720 Reading directly from the spool is even simpler:
13722 @lisp
13723 (nnspool "")
13724 @end lisp
13726 As you can see, the first element in a select method is the name of the
13727 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13728 will.
13730 After these two elements, there may be an arbitrary number of
13731 @code{(@var{variable} @var{form})} pairs.
13733 To go back to the first example---imagine that you want to read from
13734 port 15 on that machine.  This is what the select method should
13735 look like then:
13737 @lisp
13738 (nntp "news.funet.fi" (nntp-port-number 15))
13739 @end lisp
13741 You should read the documentation to each back end to find out what
13742 variables are relevant, but here's an @code{nnmh} example:
13744 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13745 you have two structures that you wish to access: One is your private
13746 mail spool, and the other is a public one.  Here's the possible spec for
13747 your private mail:
13749 @lisp
13750 (nnmh "private" (nnmh-directory "~/private/mail/"))
13751 @end lisp
13753 (This server is then called @samp{private}, but you may have guessed
13754 that.)
13756 Here's the method for a public spool:
13758 @lisp
13759 (nnmh "public"
13760       (nnmh-directory "/usr/information/spool/")
13761       (nnmh-get-new-mail nil))
13762 @end lisp
13764 @cindex proxy
13765 @cindex firewall
13767 If you are behind a firewall and only have access to the @acronym{NNTP}
13768 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13769 on the firewall machine and connect with
13770 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13771 @acronym{NNTP} server.
13772 Doing this can be rather fiddly, but your virtual server definition
13773 should probably look something like this:
13775 @lisp
13776 (nntp "firewall"
13777       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13778       (nntp-via-address "the.firewall.machine")
13779       (nntp-address "the.real.nntp.host"))
13780 @end lisp
13782 If you want to use the wonderful @code{ssh} program to provide a
13783 compressed connection over the modem line, you could add the following
13784 configuration to the example above:
13786 @lisp
13787       (nntp-via-rlogin-command "ssh")
13788 @end lisp
13790 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
13791 an indirect connection:
13793 @lisp
13794 (setq gnus-select-method
13795       '(nntp "indirect"
13796              (nntp-address "news.server.example")
13797              (nntp-via-user-name "intermediate_user_name")
13798              (nntp-via-address "intermediate.host.example")
13799              (nntp-via-rlogin-command "ssh")
13800              (nntp-via-rlogin-command-switches ("-C"))
13801              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
13802 @end lisp
13804 This means that you have to have set up @code{ssh-agent} correctly to
13805 provide automatic authorization, of course.
13807 If you're behind a firewall, but have direct access to the outside world
13808 through a wrapper command like "runsocks", you could open a socksified
13809 netcat connection to the news server as follows:
13811 @lisp
13812 (nntp "outside"
13813       (nntp-pre-command "runsocks")
13814       (nntp-open-connection-function nntp-open-netcat-stream)
13815       (nntp-address "the.news.server"))
13816 @end lisp
13819 @node Creating a Virtual Server
13820 @subsection Creating a Virtual Server
13822 If you're saving lots of articles in the cache by using persistent
13823 articles, you may want to create a virtual server to read the cache.
13825 First you need to add a new server.  The @kbd{a} command does that.  It
13826 would probably be best to use @code{nnml} to read the cache.  You
13827 could also use @code{nnspool} or @code{nnmh}, though.
13829 Type @kbd{a nnml RET cache RET}.
13831 You should now have a brand new @code{nnml} virtual server called
13832 @samp{cache}.  You now need to edit it to have the right definitions.
13833 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
13834 will contain the following:
13836 @lisp
13837 (nnml "cache")
13838 @end lisp
13840 Change that to:
13842 @lisp
13843 (nnml "cache"
13844          (nnml-directory "~/News/cache/")
13845          (nnml-active-file "~/News/cache/active"))
13846 @end lisp
13848 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
13849 @kbd{RET} over this virtual server, you should be entered into a browse
13850 buffer, and you should be able to enter any of the groups displayed.
13853 @node Server Variables
13854 @subsection Server Variables
13855 @cindex server variables
13856 @cindex server parameters
13858 One sticky point when defining variables (both on back ends and in Emacs
13859 in general) is that some variables are typically initialized from other
13860 variables when the definition of the variables is being loaded.  If you
13861 change the ``base'' variable after the variables have been loaded, you
13862 won't change the ``derived'' variables.
13864 This typically affects directory and file variables.  For instance,
13865 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
13866 directory variables are initialized from that variable, so
13867 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
13868 new virtual @code{nnml} server, it will @emph{not} suffice to set just
13869 @code{nnml-directory}---you have to explicitly set all the file
13870 variables to be what you want them to be.  For a complete list of
13871 variables for each back end, see each back end's section later in this
13872 manual, but here's an example @code{nnml} definition:
13874 @lisp
13875 (nnml "public"
13876       (nnml-directory "~/my-mail/")
13877       (nnml-active-file "~/my-mail/active")
13878       (nnml-newsgroups-file "~/my-mail/newsgroups"))
13879 @end lisp
13881 Server variables are often called @dfn{server parameters}.
13883 @node Servers and Methods
13884 @subsection Servers and Methods
13886 Wherever you would normally use a select method
13887 (e.g. @code{gnus-secondary-select-method}, in the group select method,
13888 when browsing a foreign server) you can use a virtual server name
13889 instead.  This could potentially save lots of typing.  And it's nice all
13890 over.
13893 @node Unavailable Servers
13894 @subsection Unavailable Servers
13896 If a server seems to be unreachable, Gnus will mark that server as
13897 @code{denied}.  That means that any subsequent attempt to make contact
13898 with that server will just be ignored.  ``It can't be opened,'' Gnus
13899 will tell you, without making the least effort to see whether that is
13900 actually the case or not.
13902 That might seem quite naughty, but it does make sense most of the time.
13903 Let's say you have 10 groups subscribed to on server
13904 @samp{nephelococcygia.com}.  This server is located somewhere quite far
13905 away from you and the machine is quite slow, so it takes 1 minute just
13906 to find out that it refuses connection to you today.  If Gnus were to
13907 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
13908 attempt to do that.  Once it has gotten a single ``connection refused'',
13909 it will regard that server as ``down''.
13911 So, what happens if the machine was only feeling unwell temporarily?
13912 How do you test to see whether the machine has come up again?
13914 You jump to the server buffer (@pxref{Server Buffer}) and poke it
13915 with the following commands:
13917 @table @kbd
13919 @item O
13920 @kindex O (Server)
13921 @findex gnus-server-open-server
13922 Try to establish connection to the server on the current line
13923 (@code{gnus-server-open-server}).
13925 @item C
13926 @kindex C (Server)
13927 @findex gnus-server-close-server
13928 Close the connection (if any) to the server
13929 (@code{gnus-server-close-server}).
13931 @item D
13932 @kindex D (Server)
13933 @findex gnus-server-deny-server
13934 Mark the current server as unreachable
13935 (@code{gnus-server-deny-server}).
13937 @item M-o
13938 @kindex M-o (Server)
13939 @findex gnus-server-open-all-servers
13940 Open the connections to all servers in the buffer
13941 (@code{gnus-server-open-all-servers}).
13943 @item M-c
13944 @kindex M-c (Server)
13945 @findex gnus-server-close-all-servers
13946 Close the connections to all servers in the buffer
13947 (@code{gnus-server-close-all-servers}).
13949 @item R
13950 @kindex R (Server)
13951 @findex gnus-server-remove-denials
13952 Remove all marks to whether Gnus was denied connection from any servers
13953 (@code{gnus-server-remove-denials}).
13955 @item L
13956 @kindex L (Server)
13957 @findex gnus-server-offline-server
13958 Set server status to offline (@code{gnus-server-offline-server}).
13960 @end table
13963 @node Getting News
13964 @section Getting News
13965 @cindex reading news
13966 @cindex news back ends
13968 A newsreader is normally used for reading news.  Gnus currently provides
13969 only two methods of getting news---it can read from an @acronym{NNTP} server,
13970 or it can read from a local spool.
13972 @menu
13973 * NNTP::                        Reading news from an @acronym{NNTP} server.
13974 * News Spool::                  Reading news from the local spool.
13975 @end menu
13978 @node NNTP
13979 @subsection NNTP
13980 @cindex nntp
13982 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
13983 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
13984 server as the, uhm, address.
13986 If the @acronym{NNTP} server is located at a non-standard port, setting the
13987 third element of the select method to this port number should allow you
13988 to connect to the right port.  You'll have to edit the group info for
13989 that (@pxref{Foreign Groups}).
13991 The name of the foreign group can be the same as a native group.  In
13992 fact, you can subscribe to the same group from as many different servers
13993 you feel like.  There will be no name collisions.
13995 The following variables can be used to create a virtual @code{nntp}
13996 server:
13998 @table @code
14000 @item nntp-server-opened-hook
14001 @vindex nntp-server-opened-hook
14002 @cindex @sc{mode reader}
14003 @cindex authinfo
14004 @cindex authentication
14005 @cindex nntp authentication
14006 @findex nntp-send-authinfo
14007 @findex nntp-send-mode-reader
14008 is run after a connection has been made.  It can be used to send
14009 commands to the @acronym{NNTP} server after it has been contacted.  By
14010 default it sends the command @code{MODE READER} to the server with the
14011 @code{nntp-send-mode-reader} function.  This function should always be
14012 present in this hook.
14014 @item nntp-authinfo-function
14015 @vindex nntp-authinfo-function
14016 @findex nntp-send-authinfo
14017 @vindex nntp-authinfo-file
14018 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
14019 server.  The default function is @code{nntp-send-authinfo}, which looks
14020 through your @file{~/.authinfo} (or whatever you've set the
14021 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
14022 are found, it will prompt you for a login name and a password.  The
14023 format of the @file{~/.authinfo} file is (almost) the same as the
14024 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
14025 manual page, but here are the salient facts:
14027 @enumerate
14028 @item
14029 The file contains one or more line, each of which define one server.
14031 @item
14032 Each line may contain an arbitrary number of token/value pairs.
14034 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
14035 @samp{default}.  In addition Gnus introduces two new tokens, not present
14036 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
14037 @samp{force}.  (This is the only way the @file{.authinfo} file format
14038 deviates from the @file{.netrc} file format.)  @samp{port} is used to
14039 indicate what port on the server the credentials apply to and
14040 @samp{force} is explained below.
14042 @end enumerate
14044 Here's an example file:
14046 @example
14047 machine news.uio.no login larsi password geheimnis
14048 machine nntp.ifi.uio.no login larsi force yes
14049 @end example
14051 The token/value pairs may appear in any order; @samp{machine} doesn't
14052 have to be first, for instance.
14054 In this example, both login name and password have been supplied for the
14055 former server, while the latter has only the login name listed, and the
14056 user will be prompted for the password.  The latter also has the
14057 @samp{force} tag, which means that the authinfo will be sent to the
14058 @var{nntp} server upon connection; the default (i.e., when there is not
14059 @samp{force} tag) is to not send authinfo to the @var{nntp} server
14060 until the @var{nntp} server asks for it.
14062 You can also add @samp{default} lines that will apply to all servers
14063 that don't have matching @samp{machine} lines.
14065 @example
14066 default force yes
14067 @end example
14069 This will force sending @samp{AUTHINFO} commands to all servers not
14070 previously mentioned.
14072 Remember to not leave the @file{~/.authinfo} file world-readable.
14074 @item nntp-server-action-alist
14075 @vindex nntp-server-action-alist
14076 This is a list of regexps to match on server types and actions to be
14077 taken when matches are made.  For instance, if you want Gnus to beep
14078 every time you connect to innd, you could say something like:
14080 @lisp
14081 (setq nntp-server-action-alist
14082       '(("innd" (ding))))
14083 @end lisp
14085 You probably don't want to do that, though.
14087 The default value is
14089 @lisp
14090 '(("nntpd 1\\.5\\.11t"
14091    (remove-hook 'nntp-server-opened-hook
14092                 'nntp-send-mode-reader)))
14093 @end lisp
14095 This ensures that Gnus doesn't send the @code{MODE READER} command to
14096 nntpd 1.5.11t, since that command chokes that server, I've been told.
14098 @item nntp-maximum-request
14099 @vindex nntp-maximum-request
14100 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
14101 will collect headers by sending a series of @code{head} commands.  To
14102 speed things up, the back end sends lots of these commands without
14103 waiting for reply, and then reads all the replies.  This is controlled
14104 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
14105 your network is buggy, you should set this to 1.
14107 @item nntp-connection-timeout
14108 @vindex nntp-connection-timeout
14109 If you have lots of foreign @code{nntp} groups that you connect to
14110 regularly, you're sure to have problems with @acronym{NNTP} servers not
14111 responding properly, or being too loaded to reply within reasonable
14112 time.  This is can lead to awkward problems, which can be helped
14113 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
14114 that says how many seconds the @code{nntp} back end should wait for a
14115 connection before giving up.  If it is @code{nil}, which is the default,
14116 no timeouts are done.
14118 @item nntp-nov-is-evil
14119 @vindex nntp-nov-is-evil
14120 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
14121 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
14122 can be used.
14124 @item nntp-xover-commands
14125 @vindex nntp-xover-commands
14126 @cindex @acronym{NOV}
14127 @cindex XOVER
14128 List of strings used as commands to fetch @acronym{NOV} lines from a
14129 server.  The default value of this variable is @code{("XOVER"
14130 "XOVERVIEW")}.
14132 @item nntp-nov-gap
14133 @vindex nntp-nov-gap
14134 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
14135 the server.  The server responds with one huge list of lines.  However,
14136 if you have read articles 2-5000 in the group, and only want to read
14137 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
14138 lines that you will not need.  This variable says how
14139 big a gap between two consecutive articles is allowed to be before the
14140 @code{XOVER} request is split into several request.  Note that if your
14141 network is fast, setting this variable to a really small number means
14142 that fetching will probably be slower.  If this variable is @code{nil},
14143 @code{nntp} will never split requests.  The default is 5.
14145 @item nntp-xref-number-is-evil
14146 @vindex nntp-xref-number-is-evil
14147 When Gnus refers to an article having the @code{Message-ID} that a user
14148 specifies or having the @code{Message-ID} of the parent article of the
14149 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
14150 command to the @acronym{NNTP} server to know where it is, and the server
14151 returns the data containing the pairs of a group and an article number
14152 in the @code{Xref} header.  Gnus normally uses the article number to
14153 refer to the article if the data shows that that article is in the
14154 current group, while it uses the @code{Message-ID} otherwise.  However,
14155 some news servers, e.g., ones running Diablo, run multiple engines
14156 having the same articles but article numbers are not kept synchronized
14157 between them.  In that case, the article number that appears in the
14158 @code{Xref} header varies by which engine is chosen, so you cannot refer
14159 to the parent article that is in the current group, for instance.  If
14160 you connect to such a server, set this variable to a non-@code{nil}
14161 value, and Gnus never uses article numbers.  For example:
14163 @lisp
14164 (setq gnus-select-method
14165       '(nntp "newszilla"
14166              (nntp-address "newszilla.example.com")
14167              (nntp-xref-number-is-evil t)
14168              @dots{}))
14169 @end lisp
14171 The default value of this server variable is @code{nil}.
14173 @item nntp-prepare-server-hook
14174 @vindex nntp-prepare-server-hook
14175 A hook run before attempting to connect to an @acronym{NNTP} server.
14177 @item nntp-record-commands
14178 @vindex nntp-record-commands
14179 If non-@code{nil}, @code{nntp} will log all commands it sends to the
14180 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
14181 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
14182 that doesn't seem to work.
14184 @item nntp-open-connection-function
14185 @vindex nntp-open-connection-function
14186 It is possible to customize how the connection to the nntp server will
14187 be opened.  If you specify an @code{nntp-open-connection-function}
14188 parameter, Gnus will use that function to establish the connection.
14189 Seven pre-made functions are supplied.  These functions can be grouped
14190 in two categories: direct connection functions (four pre-made), and
14191 indirect ones (three pre-made).
14193 @item nntp-never-echoes-commands
14194 @vindex nntp-never-echoes-commands
14195 Non-@code{nil} means the nntp server never echoes commands.  It is
14196 reported that some nntps server doesn't echo commands.  So, you may want
14197 to set this to non-@code{nil} in the method for such a server setting
14198 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
14199 example.  The default value is @code{nil}.  Note that the
14200 @code{nntp-open-connection-functions-never-echo-commands} variable
14201 overrides the @code{nil} value of this variable.
14203 @item nntp-open-connection-functions-never-echo-commands
14204 @vindex nntp-open-connection-functions-never-echo-commands
14205 List of functions that never echo commands.  Add or set a function which
14206 you set to @code{nntp-open-connection-function} to this list if it does
14207 not echo commands.  Note that a non-@code{nil} value of the
14208 @code{nntp-never-echoes-commands} variable overrides this variable.  The
14209 default value is @code{(nntp-open-network-stream)}.
14211 @item nntp-prepare-post-hook
14212 @vindex nntp-prepare-post-hook
14213 A hook run just before posting an article.  If there is no
14214 @code{Message-ID} header in the article and the news server provides the
14215 recommended ID, it will be added to the article before running this
14216 hook.  It is useful to make @code{Cancel-Lock} headers even if you
14217 inhibit Gnus to add a @code{Message-ID} header, you could say:
14219 @lisp
14220 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
14221 @end lisp
14223 Note that not all servers support the recommended ID.  This works for
14224 INN versions 2.3.0 and later, for instance.
14226 @end table
14228 @menu
14229 * Direct Functions::            Connecting directly to the server.
14230 * Indirect Functions::          Connecting indirectly to the server.
14231 * Common Variables::            Understood by several connection functions.
14232 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
14233 @end menu
14236 @node Direct Functions
14237 @subsubsection Direct Functions
14238 @cindex direct connection functions
14240 These functions are called direct because they open a direct connection
14241 between your machine and the @acronym{NNTP} server.  The behavior of these
14242 functions is also affected by commonly understood variables
14243 (@pxref{Common Variables}).
14245 @table @code
14246 @findex nntp-open-network-stream
14247 @item nntp-open-network-stream
14248 This is the default, and simply connects to some port or other on the
14249 remote system.
14251 @findex nntp-open-tls-stream
14252 @item nntp-open-tls-stream
14253 Opens a connection to a server over a @dfn{secure} channel.  To use
14254 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
14255 installed.  You then define a server as follows:
14257 @lisp
14258 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
14259 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
14261 (nntp "snews.bar.com"
14262       (nntp-open-connection-function nntp-open-tls-stream)
14263       (nntp-port-number )
14264       (nntp-address "snews.bar.com"))
14265 @end lisp
14267 @findex nntp-open-ssl-stream
14268 @item nntp-open-ssl-stream
14269 Opens a connection to a server over a @dfn{secure} channel.  To use
14270 this you must have @uref{http://www.openssl.org, OpenSSL} or
14271 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
14272 then define a server as follows:
14274 @lisp
14275 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
14276 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
14278 (nntp "snews.bar.com"
14279       (nntp-open-connection-function nntp-open-ssl-stream)
14280       (nntp-port-number 563)
14281       (nntp-address "snews.bar.com"))
14282 @end lisp
14284 @findex nntp-open-netcat-stream
14285 @item nntp-open-netcat-stream
14286 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
14287 program.  You might wonder why this function exists, since we have
14288 the default @code{nntp-open-network-stream} which would do the job.  (One
14289 of) the reason(s) is that if you are behind a firewall but have direct
14290 connections to the outside world thanks to a command wrapper like
14291 @code{runsocks}, you can use it like this:
14293 @lisp
14294 (nntp "socksified"
14295       (nntp-pre-command "runsocks")
14296       (nntp-open-connection-function nntp-open-netcat-stream)
14297       (nntp-address "the.news.server"))
14298 @end lisp
14300 With the default method, you would need to wrap your whole Emacs
14301 session, which is not a good idea.
14303 @findex nntp-open-telnet-stream
14304 @item nntp-open-telnet-stream
14305 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
14306 @code{netcat}.  @code{telnet} is a bit less robust because of things
14307 like line-end-conversion, but sometimes netcat is simply
14308 not available.  The previous example would turn into:
14310 @lisp
14311 (nntp "socksified"
14312       (nntp-pre-command "runsocks")
14313       (nntp-open-connection-function nntp-open-telnet-stream)
14314       (nntp-address "the.news.server")
14315       (nntp-end-of-line "\n"))
14316 @end lisp
14317 @end table
14320 @node Indirect Functions
14321 @subsubsection Indirect Functions
14322 @cindex indirect connection functions
14324 These functions are called indirect because they connect to an
14325 intermediate host before actually connecting to the @acronym{NNTP} server.
14326 All of these functions and related variables are also said to belong to
14327 the ``via'' family of connection: they're all prefixed with ``via'' to make
14328 things cleaner.  The behavior of these functions is also affected by
14329 commonly understood variables (@pxref{Common Variables}).
14331 @table @code
14332 @item nntp-open-via-rlogin-and-netcat
14333 @findex nntp-open-via-rlogin-and-netcat
14334 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
14335 to the real @acronym{NNTP} server from there.  This is useful for instance if
14336 you need to connect to a firewall machine first.
14338 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
14340 @table @code
14341 @item nntp-via-rlogin-command
14342 @vindex nntp-via-rlogin-command
14343 Command used to log in on the intermediate host.  The default is
14344 @samp{rsh}, but @samp{ssh} is a popular alternative.
14346 @item nntp-via-rlogin-command-switches
14347 @vindex nntp-via-rlogin-command-switches
14348 List of strings to be used as the switches to
14349 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
14350 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
14351 @samp{("-C")} in order to compress all data connections.
14352 @end table
14354 @item nntp-open-via-rlogin-and-telnet
14355 @findex nntp-open-via-rlogin-and-telnet
14356 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
14357 to connect to the real @acronym{NNTP} server from the intermediate host.
14358 @code{telnet} is a bit less robust because of things like
14359 line-end-conversion, but sometimes @code{netcat} is simply not available.  
14361 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
14363 @table @code
14364 @item nntp-telnet-command
14365 @vindex nntp-telnet-command
14366 Command used to connect to the real @acronym{NNTP} server from the
14367 intermediate host.  The default is @samp{telnet}.
14369 @item nntp-telnet-switches
14370 @vindex nntp-telnet-switches
14371 List of strings to be used as the switches to the
14372 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
14374 @item nntp-via-rlogin-command
14375 @vindex nntp-via-rlogin-command
14376 Command used to log in on the intermediate host.  The default is
14377 @samp{rsh}, but @samp{ssh} is a popular alternative.
14379 @item nntp-via-rlogin-command-switches
14380 @vindex nntp-via-rlogin-command-switches
14381 List of strings to be used as the switches to
14382 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
14383 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
14384 the telnet command requires a pseudo-tty allocation on an intermediate
14385 host.  The default is @code{nil}.
14386 @end table
14388 Note that you may want to change the value for @code{nntp-end-of-line}
14389 to @samp{\n} (@pxref{Common Variables}).
14391 @item nntp-open-via-telnet-and-telnet
14392 @findex nntp-open-via-telnet-and-telnet
14393 Does essentially the same, but uses @samp{telnet} instead of
14394 @samp{rlogin} to connect to the intermediate host.
14396 @code{nntp-open-via-telnet-and-telnet}-specific variables:
14398 @table @code
14399 @item nntp-via-telnet-command
14400 @vindex nntp-via-telnet-command
14401 Command used to @code{telnet} the intermediate host.  The default is
14402 @samp{telnet}.
14404 @item nntp-via-telnet-switches
14405 @vindex nntp-via-telnet-switches
14406 List of strings to be used as the switches to the
14407 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
14409 @item nntp-via-user-password
14410 @vindex nntp-via-user-password
14411 Password to use when logging in on the intermediate host.
14413 @item nntp-via-envuser
14414 @vindex nntp-via-envuser
14415 If non-@code{nil}, the intermediate @code{telnet} session (client and
14416 server both) will support the @code{ENVIRON} option and not prompt for
14417 login name.  This works for Solaris @code{telnet}, for instance.
14419 @item nntp-via-shell-prompt
14420 @vindex nntp-via-shell-prompt
14421 Regexp matching the shell prompt on the intermediate host.  The default
14422 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
14424 @end table
14426 Note that you may want to change the value for @code{nntp-end-of-line}
14427 to @samp{\n} (@pxref{Common Variables}).
14428 @end table
14431 Here are some additional variables that are understood by all the above
14432 functions:
14434 @table @code
14436 @item nntp-via-user-name
14437 @vindex nntp-via-user-name
14438 User name to use when connecting to the intermediate host.
14440 @item nntp-via-address
14441 @vindex nntp-via-address
14442 Address of the intermediate host to connect to.
14444 @end table
14447 @node Common Variables
14448 @subsubsection Common Variables
14450 The following variables affect the behavior of all, or several of the
14451 pre-made connection functions.  When not specified, all functions are
14452 affected (the values of the following variables will be used as the
14453 default if each virtual @code{nntp} server doesn't specify those server
14454 variables individually).
14456 @table @code
14458 @item nntp-pre-command
14459 @vindex nntp-pre-command
14460 A command wrapper to use when connecting through a non native
14461 connection function (all except @code{nntp-open-network-stream},
14462 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
14463 where you would put a @samp{SOCKS} wrapper for instance.
14465 @item nntp-address
14466 @vindex nntp-address
14467 The address of the @acronym{NNTP} server.
14469 @item nntp-port-number
14470 @vindex nntp-port-number
14471 Port number to connect to the @acronym{NNTP} server.  The default is
14472 @samp{nntp}.  If you use @acronym{NNTP} over
14473 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
14474 than named ports (i.e, use @samp{563} instead of @samp{snews} or
14475 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
14476 not work with named ports.
14478 @item nntp-end-of-line
14479 @vindex nntp-end-of-line
14480 String to use as end-of-line marker when talking to the @acronym{NNTP}
14481 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
14482 using a non native telnet connection function.
14484 @item nntp-netcat-command
14485 @vindex nntp-netcat-command
14486 Command to use when connecting to the @acronym{NNTP} server through
14487 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
14488 just for the real @acronym{NNTP} server.  The default is
14489 @samp{nc}.
14491 @item nntp-netcat-switches
14492 @vindex nntp-netcat-switches
14493 A list of switches to pass to @code{nntp-netcat-command}.  The default
14494 is @samp{()}.
14496 @end table
14498 @node NNTP marks
14499 @subsubsection NNTP marks
14500 @cindex storing NNTP marks
14502 Gnus stores marks (@pxref{Marking Articles}) for @acronym{NNTP}
14503 servers in marks files.  A marks file records what marks you have set
14504 in a group and each file is specific to the corresponding server.
14505 Marks files are stored in @file{~/News/marks}
14506 (@code{nntp-marks-directory}) under a classic hierarchy resembling
14507 that of a news server, for example marks for the group
14508 @samp{gmane.discuss} on the news.gmane.org server will be stored in
14509 the file @file{~/News/marks/news.gmane.org/gmane/discuss/.marks}.
14511 Marks files are useful because you can copy the @file{~/News/marks}
14512 directory (using rsync, scp or whatever) to another Gnus installation,
14513 and it will realize what articles you have read and marked.  The data
14514 in @file{~/News/marks} has priority over the same data in
14515 @file{~/.newsrc.eld}.
14517 Note that marks files are very much server-specific: Gnus remembers
14518 the article numbers so if you don't use the same servers on both
14519 installations things are most likely to break (most @acronym{NNTP}
14520 servers do not use the same article numbers as any other server).
14521 However, if you use servers A, B, C on one installation and servers A,
14522 D, E on the other, you can sync the marks files for A and then you'll
14523 get synchronization for that server between the two installations.
14525 Using @acronym{NNTP} marks can possibly incur a performance penalty so
14526 if Gnus feels sluggish, try setting the @code{nntp-marks-is-evil}
14527 variable to @code{t}.  Marks will then be stored in @file{~/.newsrc.eld}.
14529 Related variables:
14531 @table @code
14533 @item nntp-marks-is-evil
14534 @vindex nntp-marks-is-evil
14535 If non-@code{nil}, this back end will ignore any marks files.  The
14536 default is @code{nil}.
14538 @item nntp-marks-directory
14539 @vindex nntp-marks-directory
14540 The directory where marks for nntp groups will be stored.
14542 @end table
14545 @node News Spool
14546 @subsection News Spool
14547 @cindex nnspool
14548 @cindex news spool
14550 Subscribing to a foreign group from the local spool is extremely easy,
14551 and might be useful, for instance, to speed up reading groups that
14552 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
14553 instance.
14555 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
14556 anything else) as the address.
14558 If you have access to a local spool, you should probably use that as the
14559 native select method (@pxref{Finding the News}).  It is normally faster
14560 than using an @code{nntp} select method, but might not be.  It depends.
14561 You just have to try to find out what's best at your site.
14563 @table @code
14565 @item nnspool-inews-program
14566 @vindex nnspool-inews-program
14567 Program used to post an article.
14569 @item nnspool-inews-switches
14570 @vindex nnspool-inews-switches
14571 Parameters given to the inews program when posting an article.
14573 @item nnspool-spool-directory
14574 @vindex nnspool-spool-directory
14575 Where @code{nnspool} looks for the articles.  This is normally
14576 @file{/usr/spool/news/}.
14578 @item nnspool-nov-directory
14579 @vindex nnspool-nov-directory
14580 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
14581 @file{/usr/spool/news/over.view/}.
14583 @item nnspool-lib-dir
14584 @vindex nnspool-lib-dir
14585 Where the news lib dir is (@file{/usr/lib/news/} by default).
14587 @item nnspool-active-file
14588 @vindex nnspool-active-file
14589 The name of the active file.
14591 @item nnspool-newsgroups-file
14592 @vindex nnspool-newsgroups-file
14593 The name of the group descriptions file.
14595 @item nnspool-history-file
14596 @vindex nnspool-history-file
14597 The name of the news history file.
14599 @item nnspool-active-times-file
14600 @vindex nnspool-active-times-file
14601 The name of the active date file.
14603 @item nnspool-nov-is-evil
14604 @vindex nnspool-nov-is-evil
14605 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
14606 that it finds.
14608 @item nnspool-sift-nov-with-sed
14609 @vindex nnspool-sift-nov-with-sed
14610 @cindex sed
14611 If non-@code{nil}, which is the default, use @code{sed} to get the
14612 relevant portion from the overview file.  If @code{nil},
14613 @code{nnspool} will load the entire file into a buffer and process it
14614 there.
14616 @end table
14619 @node Getting Mail
14620 @section Getting Mail
14621 @cindex reading mail
14622 @cindex mail
14624 Reading mail with a newsreader---isn't that just plain WeIrD? But of
14625 course.
14627 @menu
14628 * Mail in a Newsreader::        Important introductory notes.
14629 * Getting Started Reading Mail::  A simple cookbook example.
14630 * Splitting Mail::              How to create mail groups.
14631 * Mail Sources::                How to tell Gnus where to get mail from.
14632 * Mail Back End Variables::     Variables for customizing mail handling.
14633 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14634 * Group Mail Splitting::        Use group customize to drive mail splitting.
14635 * Incorporating Old Mail::      What about the old mail you have?
14636 * Expiring Mail::               Getting rid of unwanted mail.
14637 * Washing Mail::                Removing cruft from the mail you get.
14638 * Duplicates::                  Dealing with duplicated mail.
14639 * Not Reading Mail::            Using mail back ends for reading other files.
14640 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14641 @end menu
14644 @node Mail in a Newsreader
14645 @subsection Mail in a Newsreader
14647 If you are used to traditional mail readers, but have decided to switch
14648 to reading mail with Gnus, you may find yourself experiencing something
14649 of a culture shock.
14651 Gnus does not behave like traditional mail readers.  If you want to make
14652 it behave that way, you can, but it's an uphill battle.
14654 Gnus, by default, handles all its groups using the same approach.  This
14655 approach is very newsreaderly---you enter a group, see the new/unread
14656 messages, and when you read the messages, they get marked as read, and
14657 you don't see them any more.  (Unless you explicitly ask for them.)
14659 In particular, you do not do anything explicitly to delete messages.
14661 Does this mean that all the messages that have been marked as read are
14662 deleted?  How awful!
14664 But, no, it means that old messages are @dfn{expired} according to some
14665 scheme or other.  For news messages, the expire process is controlled by
14666 the news administrator; for mail, the expire process is controlled by
14667 you.  The expire process for mail is covered in depth in @ref{Expiring
14668 Mail}.
14670 What many Gnus users find, after using it a while for both news and
14671 mail, is that the transport mechanism has very little to do with how
14672 they want to treat a message.
14674 Many people subscribe to several mailing lists.  These are transported
14675 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14676 answering, or even reading these messages very carefully.  We may not
14677 need to save them because if we should need to read one again, they are
14678 archived somewhere else.
14680 Some people have local news groups which have only a handful of readers.
14681 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14682 to read and answer a large fraction of the messages very carefully in
14683 order to do our work.  And there may not be an archive, so we may need
14684 to save the interesting messages the same way we would personal mail.
14686 The important distinction turns out to be not the transport mechanism,
14687 but other factors such as how interested we are in the subject matter,
14688 or how easy it is to retrieve the message if we need to read it again.
14690 Gnus provides many options for sorting mail into ``groups'' which behave
14691 like newsgroups, and for treating each group (whether mail or news)
14692 differently.
14694 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14695 that Gnus should grow up and be a male, er, mail reader.  It is possible
14696 to whip Gnus into a more mailreaderly being, but, as said before, it's
14697 not easy.  People who prefer proper mail readers should try @sc{vm}
14698 instead, which is an excellent, and proper, mail reader.
14700 I don't mean to scare anybody off, but I want to make it clear that you
14701 may be required to learn a new way of thinking about messages.  After
14702 you've been subjected to The Gnus Way, you will come to love it.  I can
14703 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14704 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14705 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14706 You Do.)
14709 @node Getting Started Reading Mail
14710 @subsection Getting Started Reading Mail
14712 It's quite easy to use Gnus to read your new mail.  You just plonk the
14713 mail back end of your choice into @code{gnus-secondary-select-methods},
14714 and things will happen automatically.
14716 For instance, if you want to use @code{nnml} (which is a ``one file per
14717 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14719 @lisp
14720 (setq gnus-secondary-select-methods '((nnml "")))
14721 @end lisp
14723 Now, the next time you start Gnus, this back end will be queried for new
14724 articles, and it will move all the messages in your spool file to its
14725 directory, which is @file{~/Mail/} by default.  The new group that will
14726 be created (@samp{mail.misc}) will be subscribed, and you can read it
14727 like any other group.
14729 You will probably want to split the mail into several groups, though:
14731 @lisp
14732 (setq nnmail-split-methods
14733       '(("junk" "^From:.*Lars Ingebrigtsen")
14734         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14735         ("other" "")))
14736 @end lisp
14738 This will result in three new @code{nnml} mail groups being created:
14739 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14740 mail that doesn't fit into the first two groups will be placed in the
14741 last group.
14743 This should be sufficient for reading mail with Gnus.  You might want to
14744 give the other sections in this part of the manual a perusal, though.
14745 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14748 @node Splitting Mail
14749 @subsection Splitting Mail
14750 @cindex splitting mail
14751 @cindex mail splitting
14752 @cindex mail filtering (splitting)
14754 @vindex nnmail-split-methods
14755 The @code{nnmail-split-methods} variable says how the incoming mail is
14756 to be split into groups.
14758 @lisp
14759 (setq nnmail-split-methods
14760   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14761     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14762     ("mail.other" "")))
14763 @end lisp
14765 This variable is a list of lists, where the first element of each of
14766 these lists is the name of the mail group (they do not have to be called
14767 something beginning with @samp{mail}, by the way), and the second
14768 element is a regular expression used on the header of each mail to
14769 determine if it belongs in this mail group.  The first string may
14770 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14771 insert sub-expressions from the matched text.  For instance:
14773 @lisp
14774 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14775 @end lisp
14777 @noindent
14778 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14779 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14781 The second element can also be a function.  In that case, it will be
14782 called narrowed to the headers with the first element of the rule as the
14783 argument.  It should return a non-@code{nil} value if it thinks that the
14784 mail belongs in that group.
14786 @cindex @samp{bogus} group
14787 The last of these groups should always be a general one, and the regular
14788 expression should @emph{always} be @samp{""} so that it matches any mails
14789 that haven't been matched by any of the other regexps.  (These rules are
14790 processed from the beginning of the alist toward the end.  The first rule
14791 to make a match will ``win'', unless you have crossposting enabled.  In
14792 that case, all matching rules will ``win''.)  If no rule matched, the mail
14793 will end up in the @samp{bogus} group.  When new groups are created by
14794 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
14795 see the new groups.  This also applies to the @samp{bogus} group.
14797 If you like to tinker with this yourself, you can set this variable to a
14798 function of your choice.  This function will be called without any
14799 arguments in a buffer narrowed to the headers of an incoming mail
14800 message.  The function should return a list of group names that it
14801 thinks should carry this mail message.
14803 Note that the mail back ends are free to maul the poor, innocent,
14804 incoming headers all they want to.  They all add @code{Lines} headers;
14805 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
14806 @code{From<SPACE>} line to something else.
14808 @vindex nnmail-crosspost
14809 The mail back ends all support cross-posting.  If several regexps match,
14810 the mail will be ``cross-posted'' to all those groups.
14811 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
14812 that no articles are crossposted to the general (@samp{""}) group.
14814 @vindex nnmail-crosspost-link-function
14815 @cindex crosspost
14816 @cindex links
14817 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
14818 the crossposted articles.  However, not all file systems support hard
14819 links.  If that's the case for you, set
14820 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
14821 variable is @code{add-name-to-file} by default.)
14823 @kindex M-x nnmail-split-history
14824 @findex nnmail-split-history
14825 If you wish to see where the previous mail split put the messages, you
14826 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
14827 where re-spooling messages would put the messages, you can use
14828 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
14829 Group Commands}).
14831 @vindex nnmail-split-header-length-limit
14832 Header lines longer than the value of
14833 @code{nnmail-split-header-length-limit} are excluded from the split
14834 function.
14836 @vindex nnmail-mail-splitting-decodes
14837 @vindex nnmail-mail-splitting-charset
14838 By default, splitting does not decode headers, so you can not match on
14839 non-@acronym{ASCII} strings.  But it is useful if you want to match
14840 articles based on the raw header data.  To enable it, set the
14841 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
14842 In addition, the value of the @code{nnmail-mail-splitting-charset}
14843 variable is used for decoding non-@acronym{MIME} encoded string when
14844 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
14845 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
14846 string.  A suitable value for you will be @code{undecided} or be the
14847 charset used normally in mails you are interested in.
14849 @vindex nnmail-resplit-incoming
14850 By default, splitting is performed on all incoming messages.  If you
14851 specify a @code{directory} entry for the variable @code{mail-sources}
14852 (@pxref{Mail Source Specifiers}), however, then splitting does
14853 @emph{not} happen by default.  You can set the variable
14854 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
14855 splitting happen even in this case.  (This variable has no effect on
14856 other kinds of entries.)
14858 Gnus gives you all the opportunity you could possibly want for shooting
14859 yourself in the foot.  Let's say you create a group that will contain
14860 all the mail you get from your boss.  And then you accidentally
14861 unsubscribe from the group.  Gnus will still put all the mail from your
14862 boss in the unsubscribed group, and so, when your boss mails you ``Have
14863 that report ready by Monday or you're fired!'', you'll never see it and,
14864 come Tuesday, you'll still believe that you're gainfully employed while
14865 you really should be out collecting empty bottles to save up for next
14866 month's rent money.
14869 @node Mail Sources
14870 @subsection Mail Sources
14872 Mail can be gotten from many different sources---the mail spool, from
14873 a @acronym{POP} mail server, from a procmail directory, or from a
14874 maildir, for instance.
14876 @menu
14877 * Mail Source Specifiers::      How to specify what a mail source is.
14878 * Mail Source Customization::   Some variables that influence things.
14879 * Fetching Mail::               Using the mail source specifiers.
14880 @end menu
14883 @node Mail Source Specifiers
14884 @subsubsection Mail Source Specifiers
14885 @cindex POP
14886 @cindex mail server
14887 @cindex procmail
14888 @cindex mail spool
14889 @cindex mail source
14891 You tell Gnus how to fetch mail by setting @code{mail-sources}
14892 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
14894 Here's an example:
14896 @lisp
14897 (pop :server "pop3.mailserver.com" :user "myname")
14898 @end lisp
14900 As can be observed, a mail source specifier is a list where the first
14901 element is a @dfn{mail source type}, followed by an arbitrary number of
14902 @dfn{keywords}.  Keywords that are not explicitly specified are given
14903 default values.
14905 The @code{mail-sources} is global for all mail groups.  You can specify
14906 an additional mail source for a particular group by including the
14907 @code{group} mail specifier in @code{mail-sources}, and setting a
14908 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
14909 a single mail source.  When this is used, @code{mail-sources} is
14910 typically just @code{(group)}; the @code{mail-source} parameter for a
14911 group might look like this:
14913 @lisp
14914 (mail-source . (file :path "home/user/spools/foo.spool"))
14915 @end lisp
14917 This means that the group's (and only this group's) messages will be
14918 fetched from the spool file @samp{/user/spools/foo.spool}.
14920 The following mail source types are available:
14922 @table @code
14923 @item file
14924 Get mail from a single file; typically from the mail spool.
14926 Keywords:
14928 @table @code
14929 @item :path
14930 The file name.  Defaults to the value of the @env{MAIL}
14931 environment variable or the value of @code{rmail-spool-directory}
14932 (usually something like @file{/usr/mail/spool/user-name}).
14934 @item :prescript
14935 @itemx :postscript
14936 Script run before/after fetching mail.
14937 @end table
14939 An example file mail source:
14941 @lisp
14942 (file :path "/usr/spool/mail/user-name")
14943 @end lisp
14945 Or using the default file name:
14947 @lisp
14948 (file)
14949 @end lisp
14951 If the mail spool file is not located on the local machine, it's best
14952 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
14953 You can not use ange-ftp file names here---it has no way to lock the
14954 mail spool while moving the mail.
14956 If it's impossible to set up a proper server, you can use ssh instead.
14958 @lisp
14959 (setq mail-sources
14960       '((file :prescript "ssh host bin/getmail >%t")))
14961 @end lisp
14963 The @samp{getmail} script would look something like the following:
14965 @example
14966 #!/bin/sh
14967 #  getmail - move mail from spool to stdout
14968 #  flu@@iki.fi
14970 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
14971 TMP=$HOME/Mail/tmp
14972 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
14973 @end example
14975 Alter this script to fit the @samp{movemail} and temporary
14976 file you want to use.
14979 @item directory
14980 @vindex nnmail-scan-directory-mail-source-once
14981 Get mail from several files in a directory.  This is typically used
14982 when you have procmail split the incoming mail into several files.
14983 That is, there is a one-to-one correspondence between files in that
14984 directory and groups, so that mail from the file @file{foo.bar.spool}
14985 will be put in the group @code{foo.bar}.  (You can change the suffix
14986 to be used instead of @code{.spool}.)  Setting
14987 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
14988 Gnus to scan the mail source only once.  This is particularly useful
14989 if you want to scan mail groups at a specified level.
14991 @vindex nnmail-resplit-incoming
14992 There is also the variable @code{nnmail-resplit-incoming}, if you set
14993 that to a non-@code{nil} value, then the normal splitting process is
14994 applied to all the files from the directory, @ref{Splitting Mail}.
14996 Keywords:
14998 @table @code
14999 @item :path
15000 The name of the directory where the files are.  There is no default
15001 value.
15003 @item :suffix
15004 Only files ending with this suffix are used.  The default is
15005 @samp{.spool}.
15007 @item :predicate
15008 Only files that have this predicate return non-@code{nil} are returned.
15009 The default is @code{identity}.  This is used as an additional
15010 filter---only files that have the right suffix @emph{and} satisfy this
15011 predicate are considered.
15013 @item :prescript
15014 @itemx :postscript
15015 Script run before/after fetching mail.
15017 @end table
15019 An example directory mail source:
15021 @lisp
15022 (directory :path "/home/user-name/procmail-dir/"
15023            :suffix ".prcml")
15024 @end lisp
15026 @item pop
15027 Get mail from a @acronym{POP} server.
15029 Keywords:
15031 @table @code
15032 @item :server
15033 The name of the @acronym{POP} server.  The default is taken from the
15034 @env{MAILHOST} environment variable.
15036 @item :port
15037 The port number of the @acronym{POP} server.  This can be a number (eg,
15038 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
15039 string, it should be a service name as listed in @file{/etc/services} on
15040 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
15041 need to specify it as @samp{"pop-3"} instead.
15043 @item :user
15044 The user name to give to the @acronym{POP} server.  The default is the login
15045 name.
15047 @item :password
15048 The password to give to the @acronym{POP} server.  If not specified,
15049 the user is prompted.
15051 @item :program
15052 The program to use to fetch mail from the @acronym{POP} server.  This
15053 should be a @code{format}-like string.  Here's an example:
15055 @example
15056 fetchmail %u@@%s -P %p %t
15057 @end example
15059 The valid format specifier characters are:
15061 @table @samp
15062 @item t
15063 The name of the file the mail is to be moved to.  This must always be
15064 included in this string.
15066 @item s
15067 The name of the server.
15069 @item P
15070 The port number of the server.
15072 @item u
15073 The user name to use.
15075 @item p
15076 The password to use.
15077 @end table
15079 The values used for these specs are taken from the values you give the
15080 corresponding keywords.
15082 @item :prescript
15083 A script to be run before fetching the mail.  The syntax is the same as
15084 the @code{:program} keyword.  This can also be a function to be run.
15086 @item :postscript
15087 A script to be run after fetching the mail.  The syntax is the same as
15088 the @code{:program} keyword.  This can also be a function to be run.
15090 @item :function
15091 The function to use to fetch mail from the @acronym{POP} server.  The
15092 function is called with one parameter---the name of the file where the
15093 mail should be moved to.
15095 @item :authentication
15096 This can be either the symbol @code{password} or the symbol @code{apop}
15097 and says what authentication scheme to use.  The default is
15098 @code{password}.
15100 @end table
15102 @vindex pop3-movemail
15103 @vindex pop3-leave-mail-on-server
15104 If the @code{:program} and @code{:function} keywords aren't specified,
15105 @code{pop3-movemail} will be used.  If @code{pop3-leave-mail-on-server}
15106 is non-@code{nil} the mail is to be left on the @acronym{POP} server
15107 after fetching when using @code{pop3-movemail}.  Note that POP servers
15108 maintain no state information between sessions, so what the client
15109 believes is there and what is actually there may not match up.  If they
15110 do not, then you may get duplicate mails or the whole thing can fall
15111 apart and leave you with a corrupt mailbox.
15113 Here are some examples for getting mail from a @acronym{POP} server.
15114 Fetch from the default @acronym{POP} server, using the default user
15115 name, and default fetcher:
15117 @lisp
15118 (pop)
15119 @end lisp
15121 Fetch from a named server with a named user and password:
15123 @lisp
15124 (pop :server "my.pop.server"
15125      :user "user-name" :password "secret")
15126 @end lisp
15128 Use @samp{movemail} to move the mail:
15130 @lisp
15131 (pop :program "movemail po:%u %t %p")
15132 @end lisp
15134 @item maildir
15135 Get mail from a maildir.  This is a type of mailbox that is supported by
15136 at least qmail and postfix, where each file in a special directory
15137 contains exactly one mail.
15139 Keywords:
15141 @table @code
15142 @item :path
15143 The name of the directory where the mails are stored.  The default is
15144 taken from the @env{MAILDIR} environment variable or
15145 @file{~/Maildir/}.
15146 @item :subdirs
15147 The subdirectories of the Maildir.  The default is
15148 @samp{("new" "cur")}.
15150 @c If you sometimes look at your mail through a pop3 daemon before fetching
15151 @c them with Gnus, you may also have to fetch your mails from the
15152 @c @code{cur} directory inside the maildir, like in the first example
15153 @c below.
15155 You can also get mails from remote hosts (because maildirs don't suffer
15156 from locking problems).
15158 @end table
15160 Two example maildir mail sources:
15162 @lisp
15163 (maildir :path "/home/user-name/Maildir/"
15164          :subdirs ("cur" "new"))
15165 @end lisp
15167 @lisp
15168 (maildir :path "/user@@remotehost.org:~/Maildir/"
15169          :subdirs ("new"))
15170 @end lisp
15172 @item imap
15173 Get mail from a @acronym{IMAP} server.  If you don't want to use
15174 @acronym{IMAP} as intended, as a network mail reading protocol (ie
15175 with nnimap), for some reason or other, Gnus let you treat it similar
15176 to a @acronym{POP} server and fetches articles from a given
15177 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
15179 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
15180 may need external programs and libraries, @xref{IMAP}.
15182 Keywords:
15184 @table @code
15185 @item :server
15186 The name of the @acronym{IMAP} server.  The default is taken from the
15187 @env{MAILHOST} environment variable.
15189 @item :port
15190 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
15191 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
15193 @item :user
15194 The user name to give to the @acronym{IMAP} server.  The default is the login
15195 name.
15197 @item :password
15198 The password to give to the @acronym{IMAP} server.  If not specified, the user is
15199 prompted.
15201 @item :stream
15202 What stream to use for connecting to the server, this is one of the
15203 symbols in @code{imap-stream-alist}.  Right now, this means
15204 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
15205 @samp{ssl}, @samp{shell} or the default @samp{network}.
15207 @item :authentication
15208 Which authenticator to use for authenticating to the server, this is
15209 one of the symbols in @code{imap-authenticator-alist}.  Right now,
15210 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
15211 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
15213 @item :program
15214 When using the `shell' :stream, the contents of this variable is
15215 mapped into the @code{imap-shell-program} variable.  This should be a
15216 @code{format}-like string (or list of strings).  Here's an example:
15218 @example
15219 ssh %s imapd
15220 @end example
15222 Make sure nothing is interfering with the output of the program, e.g.,
15223 don't forget to redirect the error output to the void.  The valid format
15224 specifier characters are:
15226 @table @samp
15227 @item s
15228 The name of the server.
15230 @item l
15231 User name from @code{imap-default-user}.
15233 @item p
15234 The port number of the server.
15235 @end table
15237 The values used for these specs are taken from the values you give the
15238 corresponding keywords.
15240 @item :mailbox
15241 The name of the mailbox to get mail from.  The default is @samp{INBOX}
15242 which normally is the mailbox which receives incoming mail.
15244 @item :predicate
15245 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
15246 UNDELETED}, is probably the best choice for most people, but if you
15247 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
15248 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
15249 Then all articles in the mailbox is fetched, no matter what.  For a
15250 complete list of predicates, see RFC 2060 section 6.4.4.
15252 @item :fetchflag
15253 How to flag fetched articles on the server, the default @samp{\Deleted}
15254 will mark them as deleted, an alternative would be @samp{\Seen} which
15255 would simply mark them as read.  These are the two most likely choices,
15256 but more flags are defined in RFC 2060 section 2.3.2.
15258 @item :dontexpunge
15259 If non-@code{nil}, don't remove all articles marked as deleted in the
15260 mailbox after finishing the fetch.
15262 @end table
15264 An example @acronym{IMAP} mail source:
15266 @lisp
15267 (imap :server "mail.mycorp.com"
15268       :stream kerberos4
15269       :fetchflag "\\Seen")
15270 @end lisp
15272 @item webmail
15273 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
15274 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
15275 @uref{http://mail.yahoo.com/}.
15277 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
15278 required for url "4.0pre.46".
15280 WARNING: Mails may be lost.  NO WARRANTY.
15282 Keywords:
15284 @table @code
15285 @item :subtype
15286 The type of the webmail server.  The default is @code{hotmail}.  The
15287 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
15289 @item :user
15290 The user name to give to the webmail server.  The default is the login
15291 name.
15293 @item :password
15294 The password to give to the webmail server.  If not specified, the user is
15295 prompted.
15297 @item :dontexpunge
15298 If non-@code{nil}, only fetch unread articles and don't move them to
15299 trash folder after finishing the fetch.
15301 @end table
15303 An example webmail source:
15305 @lisp
15306 (webmail :subtype 'hotmail
15307          :user "user-name"
15308          :password "secret")
15309 @end lisp
15311 @item group
15312 Get the actual mail source from the @code{mail-source} group parameter,
15313 @xref{Group Parameters}.
15315 @end table
15317 @table @dfn
15318 @item Common Keywords
15319 Common keywords can be used in any type of mail source.
15321 Keywords:
15323 @table @code
15324 @item :plugged
15325 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
15326 use directory source to get mail, you can specify it as in this
15327 example:
15329 @lisp
15330 (setq mail-sources
15331       '((directory :path "/home/pavel/.Spool/"
15332                    :suffix ""
15333                    :plugged t)))
15334 @end lisp
15336 Gnus will then fetch your mail even when you are unplugged.  This is
15337 useful when you use local mail and news.
15339 @end table
15340 @end table
15342 @subsubsection Function Interface
15344 Some of the above keywords specify a Lisp function to be executed.
15345 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
15346 the value of the keyword while the function is executing.  For example,
15347 consider the following mail-source setting:
15349 @lisp
15350 (setq mail-sources '((pop :user "jrl"
15351                           :server "pophost" :function fetchfunc)))
15352 @end lisp
15354 While the function @code{fetchfunc} is executing, the symbol @code{user}
15355 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
15356 @code{"pophost"}.  The symbols @code{port}, @code{password},
15357 @code{program}, @code{prescript}, @code{postscript}, @code{function},
15358 and @code{authentication} are also bound (to their default values).
15360 See above for a list of keywords for each type of mail source.
15363 @node Mail Source Customization
15364 @subsubsection Mail Source Customization
15366 The following is a list of variables that influence how the mail is
15367 fetched.  You would normally not need to set or change any of these
15368 variables.
15370 @table @code
15371 @item mail-source-crash-box
15372 @vindex mail-source-crash-box
15373 File where mail will be stored while processing it.  The default is@*
15374 @file{~/.emacs-mail-crash-box}.
15376 @cindex Incoming*
15377 @item mail-source-delete-incoming
15378 @vindex mail-source-delete-incoming
15379 If non-@code{nil}, delete incoming files after handling them.  If
15380 @code{t}, delete the files immediately, if @code{nil}, never delete any
15381 files.  If a positive number, delete files older than number of days
15382 (the deletion will only happen when receiving new mail).  You may also
15383 set @code{mail-source-delete-incoming} to @code{nil} and call
15384 @code{mail-source-delete-old-incoming} from a hook or interactively.
15385 @code{mail-source-delete-incoming} defaults to @code{2} in alpha Gnusae
15386 and @code{10} in released Gnusae.  @xref{Gnus Development}.
15388 @item mail-source-delete-old-incoming-confirm
15389 @vindex mail-source-delete-old-incoming-confirm
15390 If non-@code{nil}, ask for confirmation before deleting old incoming
15391 files.  This variable only applies when
15392 @code{mail-source-delete-incoming} is a positive number.
15394 @item mail-source-ignore-errors
15395 @vindex mail-source-ignore-errors
15396 If non-@code{nil}, ignore errors when reading mail from a mail source.
15398 @item mail-source-directory
15399 @vindex mail-source-directory
15400 Directory where incoming mail source files (if any) will be stored.  The
15401 default is @file{~/Mail/}.  At present, the only thing this is used for
15402 is to say where the incoming files will be stored if the variable
15403 @code{mail-source-delete-incoming} is @code{nil} or a number.
15405 @item mail-source-incoming-file-prefix
15406 @vindex mail-source-incoming-file-prefix
15407 Prefix for file name for storing incoming mail.  The default is
15408 @file{Incoming}, in which case files will end up with names like
15409 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
15410 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
15411 number.
15413 @item mail-source-default-file-modes
15414 @vindex mail-source-default-file-modes
15415 All new mail files will get this file mode.  The default is 384.
15417 @item mail-source-movemail-program
15418 @vindex mail-source-movemail-program
15419 If non-@code{nil}, name of program for fetching new mail.  If
15420 @code{nil}, @code{movemail} in @var{exec-directory}.
15422 @end table
15425 @node Fetching Mail
15426 @subsubsection Fetching Mail
15428 @vindex mail-sources
15429 The way to actually tell Gnus where to get new mail from is to set
15430 @code{mail-sources} to a list of mail source specifiers
15431 (@pxref{Mail Source Specifiers}).
15433 If this variable is @code{nil}, the mail back ends will never attempt to
15434 fetch mail by themselves.
15436 If you want to fetch mail both from your local spool as well as a
15437 @acronym{POP} mail server, you'd say something like:
15439 @lisp
15440 (setq mail-sources
15441       '((file)
15442         (pop :server "pop3.mail.server"
15443              :password "secret")))
15444 @end lisp
15446 Or, if you don't want to use any of the keyword defaults:
15448 @lisp
15449 (setq mail-sources
15450       '((file :path "/var/spool/mail/user-name")
15451         (pop :server "pop3.mail.server"
15452              :user "user-name"
15453              :port "pop3"
15454              :password "secret")))
15455 @end lisp
15458 When you use a mail back end, Gnus will slurp all your mail from your
15459 inbox and plonk it down in your home directory.  Gnus doesn't move any
15460 mail if you're not using a mail back end---you have to do a lot of magic
15461 invocations first.  At the time when you have finished drawing the
15462 pentagram, lightened the candles, and sacrificed the goat, you really
15463 shouldn't be too surprised when Gnus moves your mail.
15467 @node Mail Back End Variables
15468 @subsection Mail Back End Variables
15470 These variables are (for the most part) pertinent to all the various
15471 mail back ends.
15473 @table @code
15474 @vindex nnmail-read-incoming-hook
15475 @item nnmail-read-incoming-hook
15476 The mail back ends all call this hook after reading new mail.  You can
15477 use this hook to notify any mail watch programs, if you want to.
15479 @vindex nnmail-split-hook
15480 @item nnmail-split-hook
15481 @findex gnus-article-decode-encoded-words
15482 @cindex RFC 1522 decoding
15483 @cindex RFC 2047 decoding
15484 Hook run in the buffer where the mail headers of each message is kept
15485 just before the splitting based on these headers is done.  The hook is
15486 free to modify the buffer contents in any way it sees fit---the buffer
15487 is discarded after the splitting has been done, and no changes performed
15488 in the buffer will show up in any files.
15489 @code{gnus-article-decode-encoded-words} is one likely function to add
15490 to this hook.
15492 @vindex nnmail-pre-get-new-mail-hook
15493 @vindex nnmail-post-get-new-mail-hook
15494 @item nnmail-pre-get-new-mail-hook
15495 @itemx nnmail-post-get-new-mail-hook
15496 These are two useful hooks executed when treating new incoming
15497 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
15498 starting to handle the new mail) and
15499 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
15500 is done).  Here's and example of using these two hooks to change the
15501 default file modes the new mail files get:
15503 @lisp
15504 (add-hook 'nnmail-pre-get-new-mail-hook
15505           (lambda () (set-default-file-modes 511)))
15507 (add-hook 'nnmail-post-get-new-mail-hook
15508           (lambda () (set-default-file-modes 551)))
15509 @end lisp
15511 @item nnmail-use-long-file-names
15512 @vindex nnmail-use-long-file-names
15513 If non-@code{nil}, the mail back ends will use long file and directory
15514 names.  Groups like @samp{mail.misc} will end up in directories
15515 (assuming use of @code{nnml} back end) or files (assuming use of
15516 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
15517 the same group will end up in @file{mail/misc}.
15519 @item nnmail-delete-file-function
15520 @vindex nnmail-delete-file-function
15521 @findex delete-file
15522 Function called to delete files.  It is @code{delete-file} by default.
15524 @item nnmail-cache-accepted-message-ids
15525 @vindex nnmail-cache-accepted-message-ids
15526 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
15527 the back end (via @code{Gcc}, for instance) into the mail duplication
15528 discovery cache.  The default is @code{nil}.
15530 @item nnmail-cache-ignore-groups
15531 @vindex nnmail-cache-ignore-groups
15532 This can be a regular expression or a list of regular expressions.
15533 Group names that match any of the regular expressions will never be
15534 recorded in the @code{Message-ID} cache.
15536 This can be useful, for example, when using Fancy Splitting
15537 (@pxref{Fancy Mail Splitting}) together with the function
15538 @code{nnmail-split-fancy-with-parent}.
15540 @end table
15543 @node Fancy Mail Splitting
15544 @subsection Fancy Mail Splitting
15545 @cindex mail splitting
15546 @cindex fancy mail splitting
15548 @vindex nnmail-split-fancy
15549 @findex nnmail-split-fancy
15550 If the rather simple, standard method for specifying how to split mail
15551 doesn't allow you to do what you want, you can set
15552 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
15553 play with the @code{nnmail-split-fancy} variable.
15555 Let's look at an example value of this variable first:
15557 @lisp
15558 ;; @r{Messages from the mailer daemon are not crossposted to any of}
15559 ;; @r{the ordinary groups.  Warnings are put in a separate group}
15560 ;; @r{from real errors.}
15561 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
15562                    "mail.misc"))
15563    ;; @r{Non-error messages are crossposted to all relevant}
15564    ;; @r{groups, but we don't crosspost between the group for the}
15565    ;; @r{(ding) list and the group for other (ding) related mail.}
15566    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
15567          ("subject" "ding" "ding.misc"))
15568       ;; @r{Other mailing lists@dots{}}
15569       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
15570       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
15571       ;; @r{Both lists below have the same suffix, so prevent}
15572       ;; @r{cross-posting to mkpkg.list of messages posted only to}
15573       ;; @r{the bugs- list, but allow cross-posting when the}
15574       ;; @r{message was really cross-posted.}
15575       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
15576       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
15577       ;; @r{People@dots{}}
15578       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
15579    ;; @r{Unmatched mail goes to the catch all group.}
15580    "misc.misc")
15581 @end lisp
15583 This variable has the format of a @dfn{split}.  A split is a
15584 (possibly) recursive structure where each split may contain other
15585 splits.  Here are the possible split syntaxes:
15587 @table @code
15589 @item group
15590 If the split is a string, that will be taken as a group name.  Normal
15591 regexp match expansion will be done.  See below for examples.
15593 @c Don't fold this line.
15594 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
15595 The split can be a list containing at least three elements.  If the
15596 first element @var{field} (a regexp matching a header) contains
15597 @var{value} (also a regexp) then store the message as specified by
15598 @var{split}.
15600 If @var{restrict} (yet another regexp) matches some string after
15601 @var{field} and before the end of the matched @var{value}, the
15602 @var{split} is ignored.  If none of the @var{restrict} clauses match,
15603 @var{split} is processed.
15605 The last element @var{invert-partial} is optional.  If it is
15606 non-@code{nil}, the match-partial-words behavior controlled by the
15607 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
15608 be inverted.  (New in Gnus 5.10.7)
15610 @item (| @var{split} @dots{})
15611 If the split is a list, and the first element is @code{|} (vertical
15612 bar), then process each @var{split} until one of them matches.  A
15613 @var{split} is said to match if it will cause the mail message to be
15614 stored in one or more groups.
15616 @item (& @var{split} @dots{})
15617 If the split is a list, and the first element is @code{&}, then
15618 process all @var{split}s in the list.
15620 @item junk
15621 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15622 this message.  Use with extreme caution.
15624 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15625 If the split is a list, and the first element is @samp{:}, then the
15626 second element will be called as a function with @var{args} given as
15627 arguments.  The function should return a @var{split}.
15629 @cindex body split
15630 For instance, the following function could be used to split based on the
15631 body of the messages:
15633 @lisp
15634 (defun split-on-body ()
15635   (save-excursion
15636     (save-restriction
15637       (widen)
15638       (goto-char (point-min))
15639       (when (re-search-forward "Some.*string" nil t)
15640         "string.group"))))
15641 @end lisp
15643 The buffer is narrowed to the header of the message in question when
15644 @var{function} is run.  That's why @code{(widen)} needs to be called
15645 after @code{save-excursion} and @code{save-restriction} in the example
15646 above.  Also note that with the nnimap backend, message bodies will
15647 not be downloaded by default.  You need to set
15648 @code{nnimap-split-download-body} to @code{t} to do that
15649 (@pxref{Splitting in IMAP}).
15651 @item (! @var{func} @var{split})
15652 If the split is a list, and the first element is @code{!}, then
15653 @var{split} will be processed, and @var{func} will be called as a
15654 function with the result of @var{split} as argument.  @var{func}
15655 should return a split.
15657 @item nil
15658 If the split is @code{nil}, it is ignored.
15660 @end table
15662 In these splits, @var{field} must match a complete field name.
15664 Normally, @var{value} in these splits must match a complete @emph{word}
15665 according to the fundamental mode syntax table.  In other words, all
15666 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15667 which are word delimiters.  Therefore, if you use the following split,
15668 for example,
15670 @example
15671 (any "joe" "joemail")
15672 @end example
15674 @noindent
15675 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15676 in @samp{joemail}.  If you want to alter this behavior, you can use any
15677 of the following three ways:
15679 @enumerate
15680 @item
15681 @vindex nnmail-split-fancy-match-partial-words
15682 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15683 to non-@code{nil} in order to ignore word boundaries and instead the
15684 match becomes more like a grep.  This variable controls whether partial
15685 words are matched during fancy splitting.  The default value is
15686 @code{nil}.
15688 Note that it influences all @var{value}'s in your split rules.
15690 @item
15691 @var{value} beginning with @code{.*} ignores word boundaries in front of
15692 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15693 in the rear of a word will be ignored.  For example, the @var{value}
15694 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15695 @code{".*@@example\\.com"} does.
15697 @item
15698 You can set the @var{invert-partial} flag in your split rules of the
15699 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15700 section.  If the flag is set, word boundaries on both sides of a word
15701 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15702 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15703 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15704 non-@code{nil}.  (New in Gnus 5.10.7)
15705 @end enumerate
15707 @vindex nnmail-split-abbrev-alist
15708 @var{field} and @var{value} can also be Lisp symbols, in that case
15709 they are expanded as specified by the variable
15710 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15711 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15712 contains the associated value.  Predefined entries in
15713 @code{nnmail-split-abbrev-alist} include:
15715 @table @code
15716 @item from
15717 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15718 @item to
15719 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15720 @samp{Resent-To} and @samp{Resent-Cc} fields.
15721 @item any
15722 Is the union of the @code{from} and @code{to} entries.
15723 @end table
15725 @vindex nnmail-split-fancy-syntax-table
15726 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15727 when all this splitting is performed.
15729 If you want to have Gnus create groups dynamically based on some
15730 information in the headers (i.e., do @code{replace-match}-like
15731 substitutions in the group names), you can say things like:
15733 @example
15734 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15735 @end example
15737 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15738 will be filed in @samp{mail.debian.foo}.
15740 If the string contains the element @samp{\&}, then the previously
15741 matched string will be substituted.  Similarly, the elements @samp{\\1}
15742 up to @samp{\\9} will be substituted with the text matched by the
15743 groupings 1 through 9.
15745 @vindex nnmail-split-lowercase-expanded
15746 Where @code{nnmail-split-lowercase-expanded} controls whether the
15747 lowercase of the matched string should be used for the substitution.
15748 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15749 groups when users send to an address using different case
15750 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
15751 is @code{t}.
15753 @findex nnmail-split-fancy-with-parent
15754 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15755 split followups into the same groups their parents are in.  Sometimes
15756 you can't make splitting rules for all your mail.  For example, your
15757 boss might send you personal mail regarding different projects you are
15758 working on, and as you can't tell your boss to put a distinguishing
15759 string into the subject line, you have to resort to manually moving the
15760 messages into the right group.  With this function, you only have to do
15761 it once per thread.
15763 To use this feature, you have to set @code{nnmail-treat-duplicates}
15764 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15765 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15766 using the colon feature, like so:
15767 @lisp
15768 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15769       nnmail-cache-accepted-message-ids t
15770       nnmail-split-fancy
15771       '(| (: nnmail-split-fancy-with-parent)
15772           ;; @r{other splits go here}
15773         ))
15774 @end lisp
15776 This feature works as follows: when @code{nnmail-treat-duplicates} is
15777 non-@code{nil}, Gnus records the message id of every message it sees
15778 in the file specified by the variable
15779 @code{nnmail-message-id-cache-file}, together with the group it is in
15780 (the group is omitted for non-mail messages).  When mail splitting is
15781 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15782 at the References (and In-Reply-To) header of each message to split
15783 and searches the file specified by @code{nnmail-message-id-cache-file}
15784 for the message ids.  When it has found a parent, it returns the
15785 corresponding group name unless the group name matches the regexp
15786 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
15787 recommended that you set @code{nnmail-message-id-cache-length} to a
15788 somewhat higher number than the default so that the message ids are
15789 still in the cache.  (A value of 5000 appears to create a file some
15790 300 kBytes in size.)
15791 @vindex nnmail-cache-accepted-message-ids
15792 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
15793 also records the message ids of moved articles, so that the followup
15794 messages goes into the new group.
15796 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
15797 want certain groups to be recorded in the cache.  For example, if all
15798 outgoing messages are written to an ``outgoing'' group, you could set
15799 @code{nnmail-cache-ignore-groups} to match that group name.
15800 Otherwise, answers to all your messages would end up in the
15801 ``outgoing'' group.
15804 @node Group Mail Splitting
15805 @subsection Group Mail Splitting
15806 @cindex mail splitting
15807 @cindex group mail splitting
15809 @findex gnus-group-split
15810 If you subscribe to dozens of mailing lists but you don't want to
15811 maintain mail splitting rules manually, group mail splitting is for you.
15812 You just have to set @code{to-list} and/or @code{to-address} in group
15813 parameters or group customization and set @code{nnmail-split-methods} to
15814 @code{gnus-group-split}.  This splitting function will scan all groups
15815 for those parameters and split mail accordingly, i.e., messages posted
15816 from or to the addresses specified in the parameters @code{to-list} or
15817 @code{to-address} of a mail group will be stored in that group.
15819 Sometimes, mailing lists have multiple addresses, and you may want mail
15820 splitting to recognize them all: just set the @code{extra-aliases} group
15821 parameter to the list of additional addresses and it's done.  If you'd
15822 rather use a regular expression, set @code{split-regexp}.
15824 All these parameters in a group will be used to create an
15825 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
15826 the @var{value} is a single regular expression that matches
15827 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
15828 matches of @code{split-regexp}, and the @var{split} is the name of the
15829 group.  @var{restrict}s are also supported: just set the
15830 @code{split-exclude} parameter to a list of regular expressions.
15832 If you can't get the right split to be generated using all these
15833 parameters, or you just need something fancier, you can set the
15834 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
15835 this case, all other aforementioned parameters will be ignored by
15836 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
15837 @code{nil}, in which case the group will be ignored by
15838 @code{gnus-group-split}.
15840 @vindex gnus-group-split-default-catch-all-group
15841 @code{gnus-group-split} will do cross-posting on all groups that match,
15842 by defining a single @code{&} fancy split containing one split for each
15843 group.  If a message doesn't match any split, it will be stored in the
15844 group named in @code{gnus-group-split-default-catch-all-group}, unless
15845 some group has @code{split-spec} set to @code{catch-all}, in which case
15846 that group is used as the catch-all group.  Even though this variable is
15847 often used just to name a group, it may also be set to an arbitrarily
15848 complex fancy split (after all, a group name is a fancy split), and this
15849 may be useful to split mail that doesn't go to any mailing list to
15850 personal mail folders.  Note that this fancy split is added as the last
15851 element of a @code{|} split list that also contains a @code{&} split
15852 with the rules extracted from group parameters.
15854 It's time for an example.  Assume the following group parameters have
15855 been defined:
15857 @example
15858 nnml:mail.bar:
15859 ((to-address . "bar@@femail.com")
15860  (split-regexp . ".*@@femail\\.com"))
15861 nnml:mail.foo:
15862 ((to-list . "foo@@nowhere.gov")
15863  (extra-aliases "foo@@localhost" "foo-redist@@home")
15864  (split-exclude "bugs-foo" "rambling-foo")
15865  (admin-address . "foo-request@@nowhere.gov"))
15866 nnml:mail.others:
15867 ((split-spec . catch-all))
15868 @end example
15870 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
15871 behave as if @code{nnmail-split-fancy} had been selected and variable
15872 @code{nnmail-split-fancy} had been set as follows:
15874 @lisp
15875 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
15876       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
15877            - "bugs-foo" - "rambling-foo" "mail.foo"))
15878    "mail.others")
15879 @end lisp
15881 @findex gnus-group-split-fancy
15882 If you'd rather not use group splitting for all your mail groups, you
15883 may use it for only some of them, by using @code{nnmail-split-fancy}
15884 splits like this:
15886 @lisp
15887 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
15888 @end lisp
15890 @var{groups} may be a regular expression or a list of group names whose
15891 parameters will be scanned to generate the output split.
15892 @var{no-crosspost} can be used to disable cross-posting; in this case, a
15893 single @code{|} split will be output.  @var{catch-all} is the fall back
15894 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
15895 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
15896 empty string in any selected group, no catch-all split will be issued.
15897 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
15898 this group will override the value of the @var{catch-all} argument.
15900 @findex gnus-group-split-setup
15901 Unfortunately, scanning all groups and their parameters can be quite
15902 slow, especially considering that it has to be done for every message.
15903 But don't despair!  The function @code{gnus-group-split-setup} can be
15904 used to enable @code{gnus-group-split} in a much more efficient way.  It
15905 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
15906 @code{nnmail-split-fancy} to the split produced by
15907 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
15908 scanned once, no matter how many messages are split.
15910 @findex gnus-group-split-update
15911 However, if you change group parameters, you'd have to update
15912 @code{nnmail-split-fancy} manually.  You can do it by running
15913 @code{gnus-group-split-update}.  If you'd rather have it updated
15914 automatically, just tell @code{gnus-group-split-setup} to do it for
15915 you.  For example, add to your @file{~/.gnus.el}:
15917 @lisp
15918 (gnus-group-split-setup @var{auto-update} @var{catch-all})
15919 @end lisp
15921 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
15922 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
15923 have to worry about updating @code{nnmail-split-fancy} again.  If you
15924 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
15925 @code{gnus-group-split-default-catch-all-group} will be set to its
15926 value.
15928 @vindex gnus-group-split-updated-hook
15929 Because you may want to change @code{nnmail-split-fancy} after it is set
15930 by @code{gnus-group-split-update}, this function will run
15931 @code{gnus-group-split-updated-hook} just before finishing.
15933 @node Incorporating Old Mail
15934 @subsection Incorporating Old Mail
15935 @cindex incorporating old mail
15936 @cindex import old mail
15938 Most people have lots of old mail stored in various file formats.  If
15939 you have set up Gnus to read mail using one of the spiffy Gnus mail
15940 back ends, you'll probably wish to have that old mail incorporated into
15941 your mail groups.
15943 Doing so can be quite easy.
15945 To take an example: You're reading mail using @code{nnml}
15946 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
15947 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
15948 file filled with important, but old, mail.  You want to move it into
15949 your @code{nnml} groups.
15951 Here's how:
15953 @enumerate
15954 @item
15955 Go to the group buffer.
15957 @item
15958 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
15959 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
15961 @item
15962 Type @kbd{SPACE} to enter the newly created group.
15964 @item
15965 Type @kbd{M P b} to process-mark all articles in this group's buffer
15966 (@pxref{Setting Process Marks}).
15968 @item
15969 Type @kbd{B r} to respool all the process-marked articles, and answer
15970 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
15971 @end enumerate
15973 All the mail messages in the mbox file will now also be spread out over
15974 all your @code{nnml} groups.  Try entering them and check whether things
15975 have gone without a glitch.  If things look ok, you may consider
15976 deleting the mbox file, but I wouldn't do that unless I was absolutely
15977 sure that all the mail has ended up where it should be.
15979 Respooling is also a handy thing to do if you're switching from one mail
15980 back end to another.  Just respool all the mail in the old mail groups
15981 using the new mail back end.
15984 @node Expiring Mail
15985 @subsection Expiring Mail
15986 @cindex article expiry
15987 @cindex expiring mail
15989 Traditional mail readers have a tendency to remove mail articles when
15990 you mark them as read, in some way.  Gnus takes a fundamentally
15991 different approach to mail reading.
15993 Gnus basically considers mail just to be news that has been received in
15994 a rather peculiar manner.  It does not think that it has the power to
15995 actually change the mail, or delete any mail messages.  If you enter a
15996 mail group, and mark articles as ``read'', or kill them in some other
15997 fashion, the mail articles will still exist on the system.  I repeat:
15998 Gnus will not delete your old, read mail.  Unless you ask it to, of
15999 course.
16001 To make Gnus get rid of your unwanted mail, you have to mark the
16002 articles as @dfn{expirable}.  (With the default key bindings, this means
16003 that you have to type @kbd{E}.)  This does not mean that the articles
16004 will disappear right away, however.  In general, a mail article will be
16005 deleted from your system if, 1) it is marked as expirable, AND 2) it is
16006 more than one week old.  If you do not mark an article as expirable, it
16007 will remain on your system until hell freezes over.  This bears
16008 repeating one more time, with some spurious capitalizations: IF you do
16009 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
16011 You do not have to mark articles as expirable by hand.  Gnus provides
16012 two features, called ``auto-expire'' and ``total-expire'', that can help you
16013 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
16014 for you when you select an article.  And ``total-expire'' means that Gnus
16015 considers all articles as expirable that are read.  So, in addition to
16016 the articles marked @samp{E}, also the articles marked @samp{r},
16017 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
16018 expirable.
16020 When should either auto-expire or total-expire be used?  Most people
16021 who are subscribed to mailing lists split each list into its own group
16022 and then turn on auto-expire or total-expire for those groups.
16023 (@xref{Splitting Mail}, for more information on splitting each list
16024 into its own group.)
16026 Which one is better, auto-expire or total-expire?  It's not easy to
16027 answer.  Generally speaking, auto-expire is probably faster.  Another
16028 advantage of auto-expire is that you get more marks to work with: for
16029 the articles that are supposed to stick around, you can still choose
16030 between tick and dormant and read marks.  But with total-expire, you
16031 only have dormant and ticked to choose from.  The advantage of
16032 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
16033 Scoring}).  Auto-expire works with normal scoring but not with adaptive
16034 scoring.
16036 @vindex gnus-auto-expirable-newsgroups
16037 Groups that match the regular expression
16038 @code{gnus-auto-expirable-newsgroups} will have all articles that you
16039 read marked as expirable automatically.  All articles marked as
16040 expirable have an @samp{E} in the first column in the summary buffer.
16042 By default, if you have auto expiry switched on, Gnus will mark all the
16043 articles you read as expirable, no matter if they were read or unread
16044 before.  To avoid having articles marked as read marked as expirable
16045 automatically, you can put something like the following in your
16046 @file{~/.gnus.el} file:
16048 @vindex gnus-mark-article-hook
16049 @lisp
16050 (remove-hook 'gnus-mark-article-hook
16051              'gnus-summary-mark-read-and-unread-as-read)
16052 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
16053 @end lisp
16055 Note that making a group auto-expirable doesn't mean that all read
16056 articles are expired---only the articles marked as expirable
16057 will be expired.  Also note that using the @kbd{d} command won't make
16058 articles expirable---only semi-automatic marking of articles as read will
16059 mark the articles as expirable in auto-expirable groups.
16061 Let's say you subscribe to a couple of mailing lists, and you want the
16062 articles you have read to disappear after a while:
16064 @lisp
16065 (setq gnus-auto-expirable-newsgroups
16066       "mail.nonsense-list\\|mail.nice-list")
16067 @end lisp
16069 Another way to have auto-expiry happen is to have the element
16070 @code{auto-expire} in the group parameters of the group.
16072 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
16073 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
16074 don't really mix very well.
16076 @vindex nnmail-expiry-wait
16077 The @code{nnmail-expiry-wait} variable supplies the default time an
16078 expirable article has to live.  Gnus starts counting days from when the
16079 message @emph{arrived}, not from when it was sent.  The default is seven
16080 days.
16082 Gnus also supplies a function that lets you fine-tune how long articles
16083 are to live, based on what group they are in.  Let's say you want to
16084 have one month expiry period in the @samp{mail.private} group, a one day
16085 expiry period in the @samp{mail.junk} group, and a six day expiry period
16086 everywhere else:
16088 @vindex nnmail-expiry-wait-function
16089 @lisp
16090 (setq nnmail-expiry-wait-function
16091       (lambda (group)
16092        (cond ((string= group "mail.private")
16093                31)
16094              ((string= group "mail.junk")
16095                1)
16096              ((string= group "important")
16097                'never)
16098              (t
16099                6))))
16100 @end lisp
16102 The group names this function is fed are ``unadorned'' group
16103 names---no @samp{nnml:} prefixes and the like.
16105 The @code{nnmail-expiry-wait} variable and
16106 @code{nnmail-expiry-wait-function} function can either be a number (not
16107 necessarily an integer) or one of the symbols @code{immediate} or
16108 @code{never}.
16110 You can also use the @code{expiry-wait} group parameter to selectively
16111 change the expiry period (@pxref{Group Parameters}).
16113 @vindex nnmail-expiry-target
16114 The normal action taken when expiring articles is to delete them.
16115 However, in some circumstances it might make more sense to move them
16116 to other groups instead of deleting them.  The variable
16117 @code{nnmail-expiry-target} (and the @code{expiry-target} group
16118 parameter) controls this.  The variable supplies a default value for
16119 all groups, which can be overridden for specific groups by the group
16120 parameter.  default value is @code{delete}, but this can also be a
16121 string (which should be the name of the group the message should be
16122 moved to), or a function (which will be called in a buffer narrowed to
16123 the message in question, and with the name of the group being moved
16124 from as its parameter) which should return a target---either a group
16125 name or @code{delete}.
16127 Here's an example for specifying a group name:
16128 @lisp
16129 (setq nnmail-expiry-target "nnml:expired")
16130 @end lisp
16132 @findex nnmail-fancy-expiry-target
16133 @vindex nnmail-fancy-expiry-targets
16134 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
16135 expire mail to groups according to the variable
16136 @code{nnmail-fancy-expiry-targets}.  Here's an example:
16138 @lisp
16139  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
16140        nnmail-fancy-expiry-targets
16141        '((to-from "boss" "nnfolder:Work")
16142          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
16143          ("from" ".*" "nnfolder:Archive-%Y")))
16144 @end lisp
16146 With this setup, any mail that has @code{IMPORTANT} in its Subject
16147 header and was sent in the year @code{YYYY} and month @code{MMM}, will
16148 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
16149 From or To header contains the string @code{boss}, it will get expired
16150 to @code{nnfolder:Work}.  All other mail will get expired to
16151 @code{nnfolder:Archive-YYYY}.
16153 @vindex nnmail-keep-last-article
16154 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
16155 expire the final article in a mail newsgroup.  This is to make life
16156 easier for procmail users.
16158 @vindex gnus-total-expirable-newsgroups
16159 By the way: That line up there, about Gnus never expiring non-expirable
16160 articles, is a lie.  If you put @code{total-expire} in the group
16161 parameters, articles will not be marked as expirable, but all read
16162 articles will be put through the expiry process.  Use with extreme
16163 caution.  Even more dangerous is the
16164 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
16165 this regexp will have all read articles put through the expiry process,
16166 which means that @emph{all} old mail articles in the groups in question
16167 will be deleted after a while.  Use with extreme caution, and don't come
16168 crying to me when you discover that the regexp you used matched the
16169 wrong group and all your important mail has disappeared.  Be a
16170 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
16171 with!  So there!
16173 Most people make most of their mail groups total-expirable, though.
16175 @vindex gnus-inhibit-user-auto-expire
16176 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
16177 commands will not mark an article as expirable, even if the group has
16178 auto-expire turned on.
16181 @node Washing Mail
16182 @subsection Washing Mail
16183 @cindex mail washing
16184 @cindex list server brain damage
16185 @cindex incoming mail treatment
16187 Mailers and list servers are notorious for doing all sorts of really,
16188 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
16189 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
16190 end of all lines passing through our server, so let's do that!!!!1!''
16191 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
16192 considered to be self-evident were not discussed.  So.  Here we are.
16194 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
16195 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
16196 be shocked and dismayed by this, but I haven't got the energy.  It is to
16197 laugh.
16199 Gnus provides a plethora of functions for washing articles while
16200 displaying them, but it might be nicer to do the filtering before
16201 storing the mail to disk.  For that purpose, we have three hooks and
16202 various functions that can be put in these hooks.
16204 @table @code
16205 @item nnmail-prepare-incoming-hook
16206 @vindex nnmail-prepare-incoming-hook
16207 This hook is called before doing anything with the mail and is meant for
16208 grand, sweeping gestures.  It is called in a buffer that contains all
16209 the new, incoming mail.  Functions to be used include:
16211 @table @code
16212 @item nnheader-ms-strip-cr
16213 @findex nnheader-ms-strip-cr
16214 Remove trailing carriage returns from each line.  This is default on
16215 Emacs running on MS machines.
16217 @end table
16219 @item nnmail-prepare-incoming-header-hook
16220 @vindex nnmail-prepare-incoming-header-hook
16221 This hook is called narrowed to each header.  It can be used when
16222 cleaning up the headers.  Functions that can be used include:
16224 @table @code
16225 @item nnmail-remove-leading-whitespace
16226 @findex nnmail-remove-leading-whitespace
16227 Clear leading white space that ``helpful'' listservs have added to the
16228 headers to make them look nice.  Aaah.
16230 (Note that this function works on both the header on the body of all
16231 messages, so it is a potentially dangerous function to use (if a body
16232 of a message contains something that looks like a header line).  So
16233 rather than fix the bug, it is of course the right solution to make it
16234 into a feature by documenting it.)
16236 @item nnmail-remove-list-identifiers
16237 @findex nnmail-remove-list-identifiers
16238 Some list servers add an identifier---for example, @samp{(idm)}---to the
16239 beginning of all @code{Subject} headers.  I'm sure that's nice for
16240 people who use stone age mail readers.  This function will remove
16241 strings that match the @code{nnmail-list-identifiers} regexp, which can
16242 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
16243 @code{\\(..\\)}.
16245 For instance, if you want to remove the @samp{(idm)} and the
16246 @samp{nagnagnag} identifiers:
16248 @lisp
16249 (setq nnmail-list-identifiers
16250       '("(idm)" "nagnagnag"))
16251 @end lisp
16253 This can also be done non-destructively with
16254 @code{gnus-list-identifiers}, @xref{Article Hiding}.
16256 @item nnmail-remove-tabs
16257 @findex nnmail-remove-tabs
16258 Translate all @samp{TAB} characters into @samp{SPACE} characters.
16260 @item nnmail-ignore-broken-references
16261 @findex nnmail-ignore-broken-references
16262 @c @findex nnmail-fix-eudora-headers
16263 @cindex Eudora
16264 @cindex Pegasus
16265 Some mail user agents (e.g. Eudora and Pegasus) produce broken
16266 @code{References} headers, but correct @code{In-Reply-To} headers.  This
16267 function will get rid of the @code{References} header if the headers
16268 contain a line matching the regular expression
16269 @code{nnmail-broken-references-mailers}.
16271 @end table
16273 @item nnmail-prepare-incoming-message-hook
16274 @vindex nnmail-prepare-incoming-message-hook
16275 This hook is called narrowed to each message.  Functions to be used
16276 include:
16278 @table @code
16279 @item article-de-quoted-unreadable
16280 @findex article-de-quoted-unreadable
16281 Decode Quoted Readable encoding.
16283 @end table
16284 @end table
16287 @node Duplicates
16288 @subsection Duplicates
16290 @vindex nnmail-treat-duplicates
16291 @vindex nnmail-message-id-cache-length
16292 @vindex nnmail-message-id-cache-file
16293 @cindex duplicate mails
16294 If you are a member of a couple of mailing lists, you will sometimes
16295 receive two copies of the same mail.  This can be quite annoying, so
16296 @code{nnmail} checks for and treats any duplicates it might find.  To do
16297 this, it keeps a cache of old @code{Message-ID}s---
16298 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
16299 default.  The approximate maximum number of @code{Message-ID}s stored
16300 there is controlled by the @code{nnmail-message-id-cache-length}
16301 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
16302 stored.) If all this sounds scary to you, you can set
16303 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
16304 default), and @code{nnmail} won't delete duplicate mails.  Instead it
16305 will insert a warning into the head of the mail saying that it thinks
16306 that this is a duplicate of a different message.
16308 This variable can also be a function.  If that's the case, the function
16309 will be called from a buffer narrowed to the message in question with
16310 the @code{Message-ID} as a parameter.  The function must return either
16311 @code{nil}, @code{warn}, or @code{delete}.
16313 You can turn this feature off completely by setting the variable to
16314 @code{nil}.
16316 If you want all the duplicate mails to be put into a special
16317 @dfn{duplicates} group, you could do that using the normal mail split
16318 methods:
16320 @lisp
16321 (setq nnmail-split-fancy
16322       '(| ;; @r{Messages duplicates go to a separate group.}
16323         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
16324         ;; @r{Message from daemons, postmaster, and the like to another.}
16325         (any mail "mail.misc")
16326         ;; @r{Other rules.}
16327         [...] ))
16328 @end lisp
16329 @noindent
16330 Or something like:
16331 @lisp
16332 (setq nnmail-split-methods
16333       '(("duplicates" "^Gnus-Warning:.*duplicate")
16334         ;; @r{Other rules.}
16335         [...]))
16336 @end lisp
16338 Here's a neat feature: If you know that the recipient reads her mail
16339 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
16340 @code{delete}, you can send her as many insults as you like, just by
16341 using a @code{Message-ID} of a mail that you know that she's already
16342 received.  Think of all the fun!  She'll never see any of it!  Whee!
16345 @node Not Reading Mail
16346 @subsection Not Reading Mail
16348 If you start using any of the mail back ends, they have the annoying
16349 habit of assuming that you want to read mail with them.  This might not
16350 be unreasonable, but it might not be what you want.
16352 If you set @code{mail-sources} and @code{nnmail-spool-file} to
16353 @code{nil}, none of the back ends will ever attempt to read incoming
16354 mail, which should help.
16356 @vindex nnbabyl-get-new-mail
16357 @vindex nnmbox-get-new-mail
16358 @vindex nnml-get-new-mail
16359 @vindex nnmh-get-new-mail
16360 @vindex nnfolder-get-new-mail
16361 This might be too much, if, for instance, you are reading mail quite
16362 happily with @code{nnml} and just want to peek at some old Rmail
16363 file you have stashed away with @code{nnbabyl}.  All back ends have
16364 variables called back-end-@code{get-new-mail}.  If you want to disable
16365 the @code{nnbabyl} mail reading, you edit the virtual server for the
16366 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
16368 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
16369 narrowed to the article to be saved before saving it when reading
16370 incoming mail.
16373 @node Choosing a Mail Back End
16374 @subsection Choosing a Mail Back End
16376 Gnus will read the mail spool when you activate a mail group.  The mail
16377 file is first copied to your home directory.  What happens after that
16378 depends on what format you want to store your mail in.
16380 There are six different mail back ends in the standard Gnus, and more
16381 back ends are available separately.  The mail back end most people use
16382 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
16383 Spool}).
16385 @menu
16386 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
16387 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
16388 * Mail Spool::                  Store your mail in a private spool?
16389 * MH Spool::                    An mhspool-like back end.
16390 * Maildir::                     Another one-file-per-message format.
16391 * Mail Folders::                Having one file for each group.
16392 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
16393 @end menu
16396 @node Unix Mail Box
16397 @subsubsection Unix Mail Box
16398 @cindex nnmbox
16399 @cindex unix mail box
16401 @vindex nnmbox-active-file
16402 @vindex nnmbox-mbox-file
16403 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
16404 mail.  @code{nnmbox} will add extra headers to each mail article to say
16405 which group it belongs in.
16407 Virtual server settings:
16409 @table @code
16410 @item nnmbox-mbox-file
16411 @vindex nnmbox-mbox-file
16412 The name of the mail box in the user's home directory.  Default is
16413 @file{~/mbox}.
16415 @item nnmbox-active-file
16416 @vindex nnmbox-active-file
16417 The name of the active file for the mail box.  Default is
16418 @file{~/.mbox-active}.
16420 @item nnmbox-get-new-mail
16421 @vindex nnmbox-get-new-mail
16422 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
16423 into groups.  Default is @code{t}.
16424 @end table
16427 @node Rmail Babyl
16428 @subsubsection Rmail Babyl
16429 @cindex nnbabyl
16430 @cindex Rmail mbox
16432 @vindex nnbabyl-active-file
16433 @vindex nnbabyl-mbox-file
16434 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
16435 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
16436 mail article to say which group it belongs in.
16438 Virtual server settings:
16440 @table @code
16441 @item nnbabyl-mbox-file
16442 @vindex nnbabyl-mbox-file
16443 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
16445 @item nnbabyl-active-file
16446 @vindex nnbabyl-active-file
16447 The name of the active file for the rmail box.  The default is
16448 @file{~/.rmail-active}
16450 @item nnbabyl-get-new-mail
16451 @vindex nnbabyl-get-new-mail
16452 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
16453 @code{t}
16454 @end table
16457 @node Mail Spool
16458 @subsubsection Mail Spool
16459 @cindex nnml
16460 @cindex mail @acronym{NOV} spool
16462 The @dfn{nnml} spool mail format isn't compatible with any other known
16463 format.  It should be used with some caution.
16465 @vindex nnml-directory
16466 If you use this back end, Gnus will split all incoming mail into files,
16467 one file for each mail, and put the articles into the corresponding
16468 directories under the directory specified by the @code{nnml-directory}
16469 variable.  The default value is @file{~/Mail/}.
16471 You do not have to create any directories beforehand; Gnus will take
16472 care of all that.
16474 If you have a strict limit as to how many files you are allowed to store
16475 in your account, you should not use this back end.  As each mail gets its
16476 own file, you might very well occupy thousands of inodes within a few
16477 weeks.  If this is no problem for you, and it isn't a problem for you
16478 having your friendly systems administrator walking around, madly,
16479 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
16480 know that this is probably the fastest format to use.  You do not have
16481 to trudge through a big mbox file just to read your new mail.
16483 @code{nnml} is probably the slowest back end when it comes to article
16484 splitting.  It has to create lots of files, and it also generates
16485 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
16486 fastest back end when it comes to reading mail.
16488 @cindex self contained nnml servers
16489 @cindex marks
16490 When the marks file is used (which it is by default), @code{nnml}
16491 servers have the property that you may backup them using @code{tar} or
16492 similar, and later be able to restore them into Gnus (by adding the
16493 proper @code{nnml} server) and have all your marks be preserved.  Marks
16494 for a group are usually stored in the @code{.marks} file (but see
16495 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
16496 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
16497 to restore the group (after restoring the backup into the nnml
16498 directory).
16500 If for some reason you believe your @file{.marks} files are screwed
16501 up, you can just delete them all.  Gnus will then correctly regenerate
16502 them next time it starts.
16504 Virtual server settings:
16506 @table @code
16507 @item nnml-directory
16508 @vindex nnml-directory
16509 All @code{nnml} directories will be placed under this directory.  The
16510 default is the value of @code{message-directory} (whose default value
16511 is @file{~/Mail}).
16513 @item nnml-active-file
16514 @vindex nnml-active-file
16515 The active file for the @code{nnml} server.  The default is
16516 @file{~/Mail/active}.
16518 @item nnml-newsgroups-file
16519 @vindex nnml-newsgroups-file
16520 The @code{nnml} group descriptions file.  @xref{Newsgroups File
16521 Format}.  The default is @file{~/Mail/newsgroups}.
16523 @item nnml-get-new-mail
16524 @vindex nnml-get-new-mail
16525 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
16526 @code{t}.
16528 @item nnml-nov-is-evil
16529 @vindex nnml-nov-is-evil
16530 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16531 default is @code{nil}.
16533 @item nnml-nov-file-name
16534 @vindex nnml-nov-file-name
16535 The name of the @acronym{NOV} files.  The default is @file{.overview}.
16537 @item nnml-prepare-save-mail-hook
16538 @vindex nnml-prepare-save-mail-hook
16539 Hook run narrowed to an article before saving.
16541 @item nnml-marks-is-evil
16542 @vindex nnml-marks-is-evil
16543 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16544 default is @code{nil}.
16546 @item nnml-marks-file-name
16547 @vindex nnml-marks-file-name
16548 The name of the @dfn{marks} files.  The default is @file{.marks}.
16550 @item nnml-use-compressed-files
16551 @vindex nnml-use-compressed-files
16552 If non-@code{nil}, @code{nnml} will allow using compressed message
16553 files.  This requires @code{auto-compression-mode} to be enabled
16554 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
16555 If the value of @code{nnml-use-compressed-files} is a string, it is used
16556 as the file extension specifying the compression program.  You can set it
16557 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
16558 equivalent to @samp{.gz}.
16560 @item nnml-compressed-files-size-threshold
16561 @vindex nnml-compressed-files-size-threshold
16562 Default size threshold for compressed message files.  Message files with
16563 bodies larger than that many characters will be automatically compressed
16564 if @code{nnml-use-compressed-files} is non-@code{nil}.
16566 @end table
16568 @findex nnml-generate-nov-databases
16569 If your @code{nnml} groups and @acronym{NOV} files get totally out of
16570 whack, you can do a complete update by typing @kbd{M-x
16571 nnml-generate-nov-databases}.  This command will trawl through the
16572 entire @code{nnml} hierarchy, looking at each and every article, so it
16573 might take a while to complete.  A better interface to this
16574 functionality can be found in the server buffer (@pxref{Server
16575 Commands}).
16578 @node MH Spool
16579 @subsubsection MH Spool
16580 @cindex nnmh
16581 @cindex mh-e mail spool
16583 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
16584 @acronym{NOV} databases and it doesn't keep an active file or marks
16585 file.  This makes @code{nnmh} a @emph{much} slower back end than
16586 @code{nnml}, but it also makes it easier to write procmail scripts
16587 for.
16589 Virtual server settings:
16591 @table @code
16592 @item nnmh-directory
16593 @vindex nnmh-directory
16594 All @code{nnmh} directories will be located under this directory.  The
16595 default is the value of @code{message-directory} (whose default is
16596 @file{~/Mail})
16598 @item nnmh-get-new-mail
16599 @vindex nnmh-get-new-mail
16600 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
16601 @code{t}.
16603 @item nnmh-be-safe
16604 @vindex nnmh-be-safe
16605 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
16606 sure that the articles in the folder are actually what Gnus thinks
16607 they are.  It will check date stamps and stat everything in sight, so
16608 setting this to @code{t} will mean a serious slow-down.  If you never
16609 use anything but Gnus to read the @code{nnmh} articles, you do not
16610 have to set this variable to @code{t}.  The default is @code{nil}.
16611 @end table
16614 @node Maildir
16615 @subsubsection Maildir
16616 @cindex nnmaildir
16617 @cindex maildir
16619 @code{nnmaildir} stores mail in the maildir format, with each maildir
16620 corresponding to a group in Gnus.  This format is documented here:
16621 @uref{http://cr.yp.to/proto/maildir.html} and here:
16622 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16623 also stores extra information in the @file{.nnmaildir/} directory
16624 within a maildir.
16626 Maildir format was designed to allow concurrent deliveries and
16627 reading, without needing locks.  With other back ends, you would have
16628 your mail delivered to a spool of some kind, and then you would
16629 configure Gnus to split mail from that spool into your groups.  You
16630 can still do that with @code{nnmaildir}, but the more common
16631 configuration is to have your mail delivered directly to the maildirs
16632 that appear as group in Gnus.
16634 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16635 never corrupt its data in memory, and @code{SIGKILL} will never
16636 corrupt its data in the filesystem.
16638 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16639 maildir.  So you can copy a whole maildir from one Gnus setup to
16640 another, and you will keep your marks.
16642 Virtual server settings:
16644 @table @code
16645 @item directory
16646 For each of your @code{nnmaildir} servers (it's very unlikely that
16647 you'd need more than one), you need to create a directory and populate
16648 it with maildirs or symlinks to maildirs (and nothing else; do not
16649 choose a directory already used for other purposes).  Each maildir
16650 will be represented in Gnus as a newsgroup on that server; the
16651 filename of the symlink will be the name of the group.  Any filenames
16652 in the directory starting with @samp{.} are ignored.  The directory is
16653 scanned when you first start Gnus, and each time you type @kbd{g} in
16654 the group buffer; if any maildirs have been removed or added,
16655 @code{nnmaildir} notices at these times.
16657 The value of the @code{directory} parameter should be a Lisp form
16658 which is processed by @code{eval} and @code{expand-file-name} to get
16659 the path of the directory for this server.  The form is @code{eval}ed
16660 only when the server is opened; the resulting string is used until the
16661 server is closed.  (If you don't know about forms and @code{eval},
16662 don't worry---a simple string will work.)  This parameter is not
16663 optional; you must specify it.  I don't recommend using
16664 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16665 use that directory by default for various things, and may get confused
16666 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16667 value.
16669 @item target-prefix
16670 This should be a Lisp form which is processed by @code{eval} and
16671 @code{expand-file-name}.  The form is @code{eval}ed only when the
16672 server is opened; the resulting string is used until the server is
16673 closed.
16675 When you create a group on an @code{nnmaildir} server, the maildir is
16676 created with @code{target-prefix} prepended to its name, and a symlink
16677 pointing to that maildir is created, named with the plain group name.
16678 So if @code{directory} is @code{"~/.nnmaildir"} and
16679 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16680 the group @code{foo}, @code{nnmaildir} will create
16681 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16682 @file{~/.nnmaildir/foo} as a symlink pointing to
16683 @file{../maildirs/foo}.
16685 You can set @code{target-prefix} to a string without any slashes to
16686 create both maildirs and symlinks in the same @code{directory}; in
16687 this case, any maildirs found in @code{directory} whose names start
16688 with @code{target-prefix} will not be listed as groups (but the
16689 symlinks pointing to them will be).
16691 As a special case, if @code{target-prefix} is @code{""} (the default),
16692 then when you create a group, the maildir will be created in
16693 @code{directory} without a corresponding symlink.  Beware that you
16694 cannot use @code{gnus-group-delete-group} on such groups without the
16695 @code{force} argument.
16697 @item directory-files
16698 This should be a function with the same interface as
16699 @code{directory-files} (such as @code{directory-files} itself).  It is
16700 used to scan the server's @code{directory} for maildirs.  This
16701 parameter is optional; the default is
16702 @code{nnheader-directory-files-safe} if
16703 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16704 @code{directory-files} otherwise.
16705 (@code{nnheader-directory-files-is-safe} is checked only once when the
16706 server is opened; if you want to check it each time the directory is
16707 scanned, you'll have to provide your own function that does that.)
16709 @item get-new-mail
16710 If non-@code{nil}, then after scanning for new mail in the group
16711 maildirs themselves as usual, this server will also incorporate mail
16712 the conventional Gnus way, from @code{mail-sources} according to
16713 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16714 value is @code{nil}.
16716 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16717 an @code{nnmaildir} group.  The results might happen to be useful, but
16718 that would be by chance, not by design, and the results might be
16719 different in the future.  If your split rules create new groups,
16720 remember to supply a @code{create-directory} server parameter.
16721 @end table
16723 @subsubsection Group parameters
16725 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16726 all this; the default behavior for @code{nnmaildir} is the same as the
16727 default behavior for other mail back ends: articles are deleted after
16728 one week, etc.  Except for the expiry parameters, all this
16729 functionality is unique to @code{nnmaildir}, so you can ignore it if
16730 you're just trying to duplicate the behavior you already have with
16731 another back end.
16733 If the value of any of these parameters is a vector, the first element
16734 is evaluated as a Lisp form and the result is used, rather than the
16735 original value.  If the value is not a vector, the value itself is
16736 evaluated as a Lisp form.  (This is why these parameters use names
16737 different from those of other, similar parameters supported by other
16738 back ends: they have different, though similar, meanings.)  (For
16739 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16740 @code{eval} business again; for other values, remember to use an extra
16741 quote and wrap the value in a vector when appropriate.)
16743 @table @code
16744 @item expire-age
16745 An integer specifying the minimum age, in seconds, of an article
16746 before it will be expired, or the symbol @code{never} to specify that
16747 articles should never be expired.  If this parameter is not set,
16748 @code{nnmaildir} falls back to the usual
16749 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16750 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16751 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16752 wanted a value of 3 days, you could use something like @code{[(* 3 24
16753 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16754 An article's age is measured starting from the article file's
16755 modification time.  Normally, this is the same as the article's
16756 delivery time, but editing an article makes it younger.  Moving an
16757 article (other than via expiry) may also make an article younger.
16759 @item expire-group
16760 If this is set to a string such as a full Gnus group name, like
16761 @example
16762 "backend+server.address.string:group.name"
16763 @end example
16764 and if it is not the name of the same group that the parameter belongs
16765 to, then articles will be moved to the specified group during expiry
16766 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16767 group, the article will be just as old in the destination group as it
16768 was in the source group.}  So be careful with @code{expire-age} in the
16769 destination group.  If this is set to the name of the same group that
16770 the parameter belongs to, then the article is not expired at all.  If
16771 you use the vector form, the first element is evaluated once for each
16772 article.  So that form can refer to
16773 @code{nnmaildir-article-file-name}, etc., to decide where to put the
16774 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
16775 does not fall back to the @code{expiry-target} group parameter or the
16776 @code{nnmail-expiry-target} variable.}
16778 @item read-only
16779 If this is set to @code{t}, @code{nnmaildir} will treat the articles
16780 in this maildir as read-only.  This means: articles are not renamed
16781 from @file{new/} into @file{cur/}; articles are only found in
16782 @file{new/}, not @file{cur/}; articles are never deleted; articles
16783 cannot be edited.  @file{new/} is expected to be a symlink to the
16784 @file{new/} directory of another maildir---e.g., a system-wide mailbox
16785 containing a mailing list of common interest.  Everything in the
16786 maildir outside @file{new/} is @emph{not} treated as read-only, so for
16787 a shared mailbox, you do still need to set up your own maildir (or
16788 have write permission to the shared mailbox); your maildir just won't
16789 contain extra copies of the articles.
16791 @item directory-files
16792 A function with the same interface as @code{directory-files}.  It is
16793 used to scan the directories in the maildir corresponding to this
16794 group to find articles.  The default is the function specified by the
16795 server's @code{directory-files} parameter.
16797 @item distrust-Lines:
16798 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
16799 article, rather than use the @code{Lines:} header field.  If
16800 @code{nil}, the header field will be used if present.
16802 @item always-marks
16803 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
16804 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16805 say that all articles have these marks, regardless of whether the
16806 marks stored in the filesystem say so.  This is a proof-of-concept
16807 feature that will probably be removed eventually; it ought to be done
16808 in Gnus proper, or abandoned if it's not worthwhile.
16810 @item never-marks
16811 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
16812 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16813 say that no articles have these marks, regardless of whether the marks
16814 stored in the filesystem say so.  @code{never-marks} overrides
16815 @code{always-marks}.  This is a proof-of-concept feature that will
16816 probably be removed eventually; it ought to be done in Gnus proper, or
16817 abandoned if it's not worthwhile.
16819 @item nov-cache-size
16820 An integer specifying the size of the @acronym{NOV} memory cache.  To
16821 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
16822 for a limited number of articles in each group.  (This is probably not
16823 worthwhile, and will probably be removed in the future.)  This
16824 parameter's value is noticed only the first time a group is seen after
16825 the server is opened---i.e., when you first start Gnus, typically.
16826 The @acronym{NOV} cache is never resized until the server is closed
16827 and reopened.  The default is an estimate of the number of articles
16828 that would be displayed in the summary buffer: a count of articles
16829 that are either marked with @code{tick} or not marked with
16830 @code{read}, plus a little extra.
16831 @end table
16833 @subsubsection Article identification
16834 Articles are stored in the @file{cur/} subdirectory of each maildir.
16835 Each article file is named like @code{uniq:info}, where @code{uniq}
16836 contains no colons.  @code{nnmaildir} ignores, but preserves, the
16837 @code{:info} part.  (Other maildir readers typically use this part of
16838 the filename to store marks.)  The @code{uniq} part uniquely
16839 identifies the article, and is used in various places in the
16840 @file{.nnmaildir/} subdirectory of the maildir to store information
16841 about the corresponding article.  The full pathname of an article is
16842 available in the variable @code{nnmaildir-article-file-name} after you
16843 request the article in the summary buffer.
16845 @subsubsection NOV data
16846 An article identified by @code{uniq} has its @acronym{NOV} data (used
16847 to generate lines in the summary buffer) stored in
16848 @code{.nnmaildir/nov/uniq}.  There is no
16849 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
16850 need for it---an article's @acronym{NOV} data is updated automatically
16851 when the article or @code{nnmail-extra-headers} has changed.)  You can
16852 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
16853 single article simply by deleting the corresponding @acronym{NOV}
16854 file, but @emph{beware}: this will also cause @code{nnmaildir} to
16855 assign a new article number for this article, which may cause trouble
16856 with @code{seen} marks, the Agent, and the cache.
16858 @subsubsection Article marks
16859 An article identified by @code{uniq} is considered to have the mark
16860 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
16861 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
16862 looks for such files and reports the set of marks it finds.  When Gnus
16863 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
16864 creates and deletes the corresponding files as needed.  (Actually,
16865 rather than create a new file for each mark, it just creates hard
16866 links to @file{.nnmaildir/markfile}, to save inodes.)
16868 You can invent new marks by creating a new directory in
16869 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
16870 your server, untar it later, and keep your marks.  You can add and
16871 remove marks yourself by creating and deleting mark files.  If you do
16872 this while Gnus is running and your @code{nnmaildir} server is open,
16873 it's best to exit all summary buffers for @code{nnmaildir} groups and
16874 type @kbd{s} in the group buffer first, and to type @kbd{g} or
16875 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
16876 pick up the changes, and might undo them.
16879 @node Mail Folders
16880 @subsubsection Mail Folders
16881 @cindex nnfolder
16882 @cindex mbox folders
16883 @cindex mail folders
16885 @code{nnfolder} is a back end for storing each mail group in a
16886 separate file.  Each file is in the standard Un*x mbox format.
16887 @code{nnfolder} will add extra headers to keep track of article
16888 numbers and arrival dates.
16890 @cindex self contained nnfolder servers
16891 @cindex marks
16892 When the marks file is used (which it is by default), @code{nnfolder}
16893 servers have the property that you may backup them using @code{tar} or
16894 similar, and later be able to restore them into Gnus (by adding the
16895 proper @code{nnfolder} server) and have all your marks be preserved.
16896 Marks for a group are usually stored in a file named as the mbox file
16897 with @code{.mrk} concatenated to it (but see
16898 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
16899 directory.  Individual @code{nnfolder} groups are also possible to
16900 backup, use @kbd{G m} to restore the group (after restoring the backup
16901 into the @code{nnfolder} directory).
16903 Virtual server settings:
16905 @table @code
16906 @item nnfolder-directory
16907 @vindex nnfolder-directory
16908 All the @code{nnfolder} mail boxes will be stored under this
16909 directory.  The default is the value of @code{message-directory}
16910 (whose default is @file{~/Mail})
16912 @item nnfolder-active-file
16913 @vindex nnfolder-active-file
16914 The name of the active file.  The default is @file{~/Mail/active}.
16916 @item nnfolder-newsgroups-file
16917 @vindex nnfolder-newsgroups-file
16918 The name of the group descriptions file.  @xref{Newsgroups File
16919 Format}.  The default is @file{~/Mail/newsgroups}
16921 @item nnfolder-get-new-mail
16922 @vindex nnfolder-get-new-mail
16923 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
16924 default is @code{t}
16926 @item nnfolder-save-buffer-hook
16927 @vindex nnfolder-save-buffer-hook
16928 @cindex backup files
16929 Hook run before saving the folders.  Note that Emacs does the normal
16930 backup renaming of files even with the @code{nnfolder} buffers.  If
16931 you wish to switch this off, you could say something like the
16932 following in your @file{.emacs} file:
16934 @lisp
16935 (defun turn-off-backup ()
16936   (set (make-local-variable 'backup-inhibited) t))
16938 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
16939 @end lisp
16941 @item nnfolder-delete-mail-hook
16942 @vindex nnfolder-delete-mail-hook
16943 Hook run in a buffer narrowed to the message that is to be deleted.
16944 This function can be used to copy the message to somewhere else, or to
16945 extract some information from it before removing it.
16947 @item nnfolder-nov-is-evil
16948 @vindex nnfolder-nov-is-evil
16949 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16950 default is @code{nil}.
16952 @item nnfolder-nov-file-suffix
16953 @vindex nnfolder-nov-file-suffix
16954 The extension for @acronym{NOV} files.  The default is @file{.nov}.
16956 @item nnfolder-nov-directory
16957 @vindex nnfolder-nov-directory
16958 The directory where the @acronym{NOV} files should be stored.  If
16959 @code{nil}, @code{nnfolder-directory} is used.
16961 @item nnfolder-marks-is-evil
16962 @vindex nnfolder-marks-is-evil
16963 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16964 default is @code{nil}.
16966 @item nnfolder-marks-file-suffix
16967 @vindex nnfolder-marks-file-suffix
16968 The extension for @sc{marks} files.  The default is @file{.mrk}.
16970 @item nnfolder-marks-directory
16971 @vindex nnfolder-marks-directory
16972 The directory where the @sc{marks} files should be stored.  If
16973 @code{nil}, @code{nnfolder-directory} is used.
16975 @end table
16978 @findex nnfolder-generate-active-file
16979 @kindex M-x nnfolder-generate-active-file
16980 If you have lots of @code{nnfolder}-like files you'd like to read with
16981 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
16982 command to make @code{nnfolder} aware of all likely files in
16983 @code{nnfolder-directory}.  This only works if you use long file names,
16984 though.
16986 @node Comparing Mail Back Ends
16987 @subsubsection Comparing Mail Back Ends
16989 First, just for terminology, the @dfn{back end} is the common word for a
16990 low-level access method---a transport, if you will, by which something
16991 is acquired.  The sense is that one's mail has to come from somewhere,
16992 and so selection of a suitable back end is required in order to get that
16993 mail within spitting distance of Gnus.
16995 The same concept exists for Usenet itself: Though access to articles is
16996 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
16997 in the world got at Usenet by running a reader on the machine where the
16998 articles lay (the machine which today we call an @acronym{NNTP} server), and
16999 access was by the reader stepping into the articles' directory spool
17000 area directly.  One can still select between either the @code{nntp} or
17001 @code{nnspool} back ends, to select between these methods, if one happens
17002 actually to live on the server (or can see its spool directly, anyway,
17003 via NFS).
17005 The goal in selecting a mail back end is to pick one which
17006 simultaneously represents a suitable way of dealing with the original
17007 format plus leaving mail in a form that is convenient to use in the
17008 future.  Here are some high and low points on each:
17010 @table @code
17011 @item nnmbox
17013 UNIX systems have historically had a single, very common, and well-
17014 defined format.  All messages arrive in a single @dfn{spool file}, and
17015 they are delineated by a line whose regular expression matches
17016 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
17017 to make it clear in this instance that this is not the RFC-specified
17018 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
17019 historically from the Unix environment, it is simplest if one does not
17020 mess a great deal with the original mailbox format, so if one chooses
17021 this back end, Gnus' primary activity in getting mail from the real spool
17022 area to Gnus' preferred directory is simply to copy it, with no
17023 (appreciable) format change in the process.  It is the ``dumbest'' way
17024 to move mail into availability in the Gnus environment.  This makes it
17025 fast to move into place, but slow to parse, when Gnus has to look at
17026 what's where.
17028 @item nnbabyl
17030 Once upon a time, there was the DEC-10 and DEC-20, running operating
17031 systems called TOPS and related things, and the usual (only?) mail
17032 reading environment was a thing called Babyl.  I don't know what format
17033 was used for mail landing on the system, but Babyl had its own internal
17034 format to which mail was converted, primarily involving creating a
17035 spool-file-like entity with a scheme for inserting Babyl-specific
17036 headers and status bits above the top of each message in the file.
17037 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
17038 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
17039 to understand the mail files folks already had in existence.  Gnus (and
17040 VM, for that matter) continue to support this format because it's
17041 perceived as having some good qualities in those mailer-specific
17042 headers/status bits stuff.  Rmail itself still exists as well, of
17043 course, and is still maintained by Stallman.
17045 Both of the above forms leave your mail in a single file on your
17046 file system, and they must parse that entire file each time you take a
17047 look at your mail.
17049 @item nnml
17051 @code{nnml} is the back end which smells the most as though you were
17052 actually operating with an @code{nnspool}-accessed Usenet system.  (In
17053 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
17054 lo these years ago.)  One's mail is taken from the original spool file,
17055 and is then cut up into individual message files, 1:1.  It maintains a
17056 Usenet-style active file (analogous to what one finds in an INN- or
17057 CNews-based news system in (for instance) @file{/var/lib/news/active},
17058 or what is returned via the @samp{NNTP LIST} verb) and also creates
17059 @dfn{overview} files for efficient group entry, as has been defined for
17060 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
17061 due to the creation of lots of files, updates to the @code{nnml} active
17062 file, and additions to overview files on a per-message basis, but it is
17063 extremely fast on access because of what amounts to the indexing support
17064 provided by the active file and overviews.
17066 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
17067 resource which defines available places in the file system to put new
17068 files.  Sysadmins take a dim view of heavy inode occupation within
17069 tight, shared file systems.  But if you live on a personal machine where
17070 the file system is your own and space is not at a premium, @code{nnml}
17071 wins big.
17073 It is also problematic using this back end if you are living in a
17074 FAT16-based Windows world, since much space will be wasted on all these
17075 tiny files.
17077 @item nnmh
17079 The Rand MH mail-reading system has been around UNIX systems for a very
17080 long time; it operates by splitting one's spool file of messages into
17081 individual files, but with little or no indexing support---@code{nnmh}
17082 is considered to be semantically equivalent to ``@code{nnml} without
17083 active file or overviews''.  This is arguably the worst choice, because
17084 one gets the slowness of individual file creation married to the
17085 slowness of access parsing when learning what's new in one's groups.
17087 @item nnfolder
17089 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
17090 method described above) on a per-group basis.  That is, @code{nnmbox}
17091 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
17092 little bit of optimization to this so that each of one's mail groups has
17093 a Unix mail box file.  It's faster than @code{nnmbox} because each group
17094 can be parsed separately, and still provides the simple Unix mail box
17095 format requiring minimal effort in moving the mail around.  In addition,
17096 it maintains an ``active'' file making it much faster for Gnus to figure
17097 out how many messages there are in each separate group.
17099 If you have groups that are expected to have a massive amount of
17100 messages, @code{nnfolder} is not the best choice, but if you receive
17101 only a moderate amount of mail, @code{nnfolder} is probably the most
17102 friendly mail back end all over.
17104 @item nnmaildir
17106 For configuring expiry and other things, @code{nnmaildir} uses
17107 incompatible group parameters, slightly different from those of other
17108 mail back ends.
17110 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
17111 differences.  Each message is stored in a separate file, but the
17112 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
17113 also stores the equivalent of @code{nnml}'s overview files in one file
17114 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
17115 @code{df -i} to see how plentiful your inode supply is.)  If this slows
17116 you down or takes up very much space, consider switching to
17117 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
17118 file system.
17120 Since maildirs don't require locking for delivery, the maildirs you use
17121 as groups can also be the maildirs your mail is directly delivered to.
17122 This means you can skip Gnus' mail splitting if your mail is already
17123 organized into different mailboxes during delivery.  A @code{directory}
17124 entry in @code{mail-sources} would have a similar effect, but would
17125 require one set of mailboxes for spooling deliveries (in mbox format,
17126 thus damaging message bodies), and another set to be used as groups (in
17127 whatever format you like).  A maildir has a built-in spool, in the
17128 @code{new/} subdirectory.  Beware that currently, mail moved from
17129 @code{new/} to @code{cur/} instead of via mail splitting will not
17130 undergo treatment such as duplicate checking.
17132 @code{nnmaildir} stores article marks for a given group in the
17133 corresponding maildir, in a way designed so that it's easy to manipulate
17134 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
17135 else, and still have your marks.  @code{nnml} also stores marks, but
17136 it's not as easy to work with them from outside Gnus as with
17137 @code{nnmaildir}.
17139 @code{nnmaildir} uses a significant amount of memory to speed things up.
17140 (It keeps in memory some of the things that @code{nnml} stores in files
17141 and that @code{nnmh} repeatedly parses out of message files.)  If this
17142 is a problem for you, you can set the @code{nov-cache-size} group
17143 parameter to something small (0 would probably not work, but 1 probably
17144 would) to make it use less memory.  This caching will probably be
17145 removed in the future.
17147 Startup is likely to be slower with @code{nnmaildir} than with other
17148 back ends.  Everything else is likely to be faster, depending in part
17149 on your file system.
17151 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
17152 to write an @code{nnmaildir}-derived back end.
17154 @end table
17157 @node Browsing the Web
17158 @section Browsing the Web
17159 @cindex web
17160 @cindex browsing the web
17161 @cindex www
17162 @cindex http
17164 Web-based discussion forums are getting more and more popular.  On many
17165 subjects, the web-based forums have become the most important forums,
17166 eclipsing the importance of mailing lists and news groups.  The reason
17167 is easy to understand---they are friendly to new users; you just point
17168 and click, and there's the discussion.  With mailing lists, you have to
17169 go through a cumbersome subscription procedure, and most people don't
17170 even know what a news group is.
17172 The problem with this scenario is that web browsers are not very good at
17173 being newsreaders.  They do not keep track of what articles you've read;
17174 they do not allow you to score on subjects you're interested in; they do
17175 not allow off-line browsing; they require you to click around and drive
17176 you mad in the end.
17178 So---if web browsers suck at reading discussion forums, why not use Gnus
17179 to do it instead?
17181 Gnus has been getting a bit of a collection of back ends for providing
17182 interfaces to these sources.
17184 @menu
17185 * Archiving Mail::
17186 * Web Searches::                Creating groups from articles that match a string.
17187 * Slashdot::                    Reading the Slashdot comments.
17188 * Ultimate::                    The Ultimate Bulletin Board systems.
17189 * Web Archive::                 Reading mailing list archived on web.
17190 * RSS::                         Reading RDF site summary.
17191 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
17192 @end menu
17194 All the web sources require Emacs/W3 and the url library or those
17195 alternatives to work.
17197 The main caveat with all these web sources is that they probably won't
17198 work for a very long time.  Gleaning information from the @acronym{HTML} data
17199 is guesswork at best, and when the layout is altered, the Gnus back end
17200 will fail.  If you have reasonably new versions of these back ends,
17201 though, you should be ok.
17203 One thing all these Web methods have in common is that the Web sources
17204 are often down, unavailable or just plain too slow to be fun.  In those
17205 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
17206 Unplugged}) handle downloading articles, and then you can read them at
17207 leisure from your local disk.  No more World Wide Wait for you.
17209 @node Archiving Mail
17210 @subsection Archiving Mail
17211 @cindex archiving mail
17212 @cindex backup of mail
17214 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
17215 @code{nnmaildir}, now actually store the article marks with each group.
17216 For these servers, archiving and restoring a group while preserving
17217 marks is fairly simple.
17219 (Preserving the group level and group parameters as well still
17220 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
17221 though.)
17223 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
17224 server, take a recursive copy of the server directory.  There is no need
17225 to shut down Gnus, so archiving may be invoked by @code{cron} or
17226 similar.  You restore the data by restoring the directory tree, and
17227 adding a server definition pointing to that directory in Gnus.  The
17228 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
17229 might interfere with overwriting data, so you may want to shut down Gnus
17230 before you restore the data.
17232 It is also possible to archive individual @code{nnml},
17233 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
17234 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
17235 directory.  For @code{nnfolder} you need to copy both the base folder
17236 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
17237 this example).  Restoring the group is done with @kbd{G m} from the Group
17238 buffer.  The last step makes Gnus notice the new directory.
17239 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
17240 is unnecessary in that case.
17242 @node Web Searches
17243 @subsection Web Searches
17244 @cindex nnweb
17245 @cindex Google
17246 @cindex dejanews
17247 @cindex gmane
17248 @cindex Usenet searches
17249 @cindex searching the Usenet
17251 It's, like, too neat to search the Usenet for articles that match a
17252 string, but it, like, totally @emph{sucks}, like, totally, to use one of
17253 those, like, Web browsers, and you, like, have to, rilly, like, look at
17254 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
17255 searches without having to use a browser.
17257 The @code{nnweb} back end allows an easy interface to the mighty search
17258 engine.  You create an @code{nnweb} group, enter a search pattern, and
17259 then enter the group and read the articles like you would any normal
17260 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
17261 Groups}) will do this in an easy-to-use fashion.
17263 @code{nnweb} groups don't really lend themselves to being solid
17264 groups---they have a very fleeting idea of article numbers.  In fact,
17265 each time you enter an @code{nnweb} group (not even changing the search
17266 pattern), you are likely to get the articles ordered in a different
17267 manner.  Not even using duplicate suppression (@pxref{Duplicate
17268 Suppression}) will help, since @code{nnweb} doesn't even know the
17269 @code{Message-ID} of the articles before reading them using some search
17270 engines (Google, for instance).  The only possible way to keep track
17271 of which articles you've read is by scoring on the @code{Date}
17272 header---mark all articles posted before the last date you read the
17273 group as read.
17275 If the search engine changes its output substantially, @code{nnweb}
17276 won't be able to parse it and will fail.  One could hardly fault the Web
17277 providers if they were to do this---their @emph{raison d'@^etre} is to
17278 make money off of advertisements, not to provide services to the
17279 community.  Since @code{nnweb} washes the ads off all the articles, one
17280 might think that the providers might be somewhat miffed.  We'll see.
17282 You must have the @code{url} and @code{W3} package or those alternatives
17283 (try @code{customize-group} on the @samp{mm-url} variable group)
17284 installed to be able to use @code{nnweb}.
17286 Virtual server variables:
17288 @table @code
17289 @item nnweb-type
17290 @vindex nnweb-type
17291 What search engine type is being used.  The currently supported types
17292 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
17293 @code{dejanews} is an alias to @code{google}.
17295 @item nnweb-search
17296 @vindex nnweb-search
17297 The search string to feed to the search engine.
17299 @item nnweb-max-hits
17300 @vindex nnweb-max-hits
17301 Advisory maximum number of hits per search to display.  The default is
17302 999.
17304 @item nnweb-type-definition
17305 @vindex nnweb-type-definition
17306 Type-to-definition alist.  This alist says what @code{nnweb} should do
17307 with the various search engine types.  The following elements must be
17308 present:
17310 @table @code
17311 @item article
17312 Function to decode the article and provide something that Gnus
17313 understands.
17315 @item map
17316 Function to create an article number to message header and URL alist.
17318 @item search
17319 Function to send the search string to the search engine.
17321 @item address
17322 The address the aforementioned function should send the search string
17325 @item id
17326 Format string URL to fetch an article by @code{Message-ID}.
17327 @end table
17329 @end table
17332 @node Slashdot
17333 @subsection Slashdot
17334 @cindex Slashdot
17335 @cindex nnslashdot
17337 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
17338 lively discussion following the news articles.  @code{nnslashdot} will
17339 let you read this forum in a convenient manner.
17341 The easiest way to read this source is to put something like the
17342 following in your @file{~/.gnus.el} file:
17344 @lisp
17345 (setq gnus-secondary-select-methods
17346       '((nnslashdot "")))
17347 @end lisp
17349 This will make Gnus query the @code{nnslashdot} back end for new comments
17350 and groups.  The @kbd{F} command will subscribe each new news article as
17351 a new Gnus group, and you can read the comments by entering these
17352 groups.  (Note that the default subscription method is to subscribe new
17353 groups as zombies.  Other methods are available (@pxref{Subscription
17354 Methods}).
17356 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
17357 command is the most handy tool (@pxref{Foreign Groups}).
17359 When following up to @code{nnslashdot} comments (or posting new
17360 comments), some light @acronym{HTML}izations will be performed.  In
17361 particular, text quoted with @samp{> } will be quoted with
17362 @samp{blockquote} instead, and signatures will have @samp{br} added to
17363 the end of each line.  Other than that, you can just write @acronym{HTML}
17364 directly into the message buffer.  Note that Slashdot filters out some
17365 @acronym{HTML} forms.
17367 The following variables can be altered to change its behavior:
17369 @table @code
17370 @item nnslashdot-threaded
17371 Whether @code{nnslashdot} should display threaded groups or not.  The
17372 default is @code{t}.  To be able to display threads, @code{nnslashdot}
17373 has to retrieve absolutely all comments in a group upon entry.  If a
17374 threaded display is not required, @code{nnslashdot} will only retrieve
17375 the comments that are actually wanted by the user.  Threading is nicer,
17376 but much, much slower than unthreaded.
17378 @item nnslashdot-login-name
17379 @vindex nnslashdot-login-name
17380 The login name to use when posting.
17382 @item nnslashdot-password
17383 @vindex nnslashdot-password
17384 The password to use when posting.
17386 @item nnslashdot-directory
17387 @vindex nnslashdot-directory
17388 Where @code{nnslashdot} will store its files.  The default is
17389 @file{~/News/slashdot/}.
17391 @item nnslashdot-active-url
17392 @vindex nnslashdot-active-url
17393 The @acronym{URL} format string that will be used to fetch the
17394 information on news articles and comments.  The default is@*
17395 @samp{http://slashdot.org/search.pl?section=&min=%d}.
17397 @item nnslashdot-comments-url
17398 @vindex nnslashdot-comments-url
17399 The @acronym{URL} format string that will be used to fetch comments.
17401 @item nnslashdot-article-url
17402 @vindex nnslashdot-article-url
17403 The @acronym{URL} format string that will be used to fetch the news
17404 article.  The default is
17405 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
17407 @item nnslashdot-threshold
17408 @vindex nnslashdot-threshold
17409 The score threshold.  The default is -1.
17411 @item nnslashdot-group-number
17412 @vindex nnslashdot-group-number
17413 The number of old groups, in addition to the ten latest, to keep
17414 updated.  The default is 0.
17416 @end table
17420 @node Ultimate
17421 @subsection Ultimate
17422 @cindex nnultimate
17423 @cindex Ultimate Bulletin Board
17425 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
17426 probably the most popular Web bulletin board system used.  It has a
17427 quite regular and nice interface, and it's possible to get the
17428 information Gnus needs to keep groups updated.
17430 The easiest way to get started with @code{nnultimate} is to say
17431 something like the following in the group buffer:  @kbd{B nnultimate RET
17432 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
17433 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
17434 you're interested in; there's quite a list of them on the Ultimate web
17435 site.)  Then subscribe to the groups you're interested in from the
17436 server buffer, and read them from the group buffer.
17438 The following @code{nnultimate} variables can be altered:
17440 @table @code
17441 @item nnultimate-directory
17442 @vindex nnultimate-directory
17443 The directory where @code{nnultimate} stores its files.  The default is@*
17444 @file{~/News/ultimate/}.
17445 @end table
17448 @node Web Archive
17449 @subsection Web Archive
17450 @cindex nnwarchive
17451 @cindex Web Archive
17453 Some mailing lists only have archives on Web servers, such as
17454 @uref{http://www.egroups.com/} and
17455 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
17456 interface, and it's possible to get the information Gnus needs to keep
17457 groups updated.
17459 @findex gnus-group-make-warchive-group
17460 The easiest way to get started with @code{nnwarchive} is to say
17461 something like the following in the group buffer: @kbd{M-x
17462 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
17463 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
17464 @var{an_egroup} with the mailing list you subscribed, the
17465 @var{your@@email.address} with your email address.), or to browse the
17466 back end by @kbd{B nnwarchive RET mail-archive RET}.
17468 The following @code{nnwarchive} variables can be altered:
17470 @table @code
17471 @item nnwarchive-directory
17472 @vindex nnwarchive-directory
17473 The directory where @code{nnwarchive} stores its files.  The default is@*
17474 @file{~/News/warchive/}.
17476 @item nnwarchive-login
17477 @vindex nnwarchive-login
17478 The account name on the web server.
17480 @item nnwarchive-passwd
17481 @vindex nnwarchive-passwd
17482 The password for your account on the web server.
17483 @end table
17485 @node RSS
17486 @subsection RSS
17487 @cindex nnrss
17488 @cindex RSS
17490 Some web sites have an RDF Site Summary (@acronym{RSS}).
17491 @acronym{RSS} is a format for summarizing headlines from news related
17492 sites (such as BBC or CNN).  But basically anything list-like can be
17493 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
17494 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
17496 @acronym{RSS} has a quite regular and nice interface, and it's
17497 possible to get the information Gnus needs to keep groups updated.
17499 Note: you had better use Emacs which supports the @code{utf-8} coding
17500 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
17501 text by default.  It is also used by default for non-@acronym{ASCII}
17502 group names.
17504 @kindex G R (Group)
17505 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
17506 prompted for the location, the title and the description of the feed.
17507 The title, which allows any characters, will be used for the group name
17508 and the name of the group data file.  The description can be omitted.
17510 An easy way to get started with @code{nnrss} is to say something like
17511 the following in the group buffer: @kbd{B nnrss RET RET y}, then
17512 subscribe to groups.
17514 The @code{nnrss} back end saves the group data file in
17515 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
17516 names containing non-@acronym{ASCII} characters will be encoded by the
17517 coding system specified with the @code{nnmail-pathname-coding-system}
17518 variable.  If it is @code{nil}, in Emacs the coding system defaults to
17519 the value of @code{default-file-name-coding-system}.  If you are using
17520 XEmacs and want to use non-@acronym{ASCII} group names, you should set
17521 the value for the @code{nnmail-pathname-coding-system} variable properly.
17523 The @code{nnrss} back end generates @samp{multipart/alternative}
17524 @acronym{MIME} articles in which each contains a @samp{text/plain} part
17525 and a @samp{text/html} part.
17527 @cindex OPML
17528 You can also use the following commands to import and export your
17529 subscriptions from a file in @acronym{OPML} format (Outline Processor
17530 Markup Language).
17532 @defun nnrss-opml-import file
17533 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
17534 file.
17535 @end defun
17537 @defun nnrss-opml-export
17538 Write your current @acronym{RSS} subscriptions to a buffer in
17539 @acronym{OPML} format.
17540 @end defun
17542 The following @code{nnrss} variables can be altered:
17544 @table @code
17545 @item nnrss-directory
17546 @vindex nnrss-directory
17547 The directory where @code{nnrss} stores its files.  The default is
17548 @file{~/News/rss/}.
17550 @item nnrss-file-coding-system
17551 @vindex nnrss-file-coding-system
17552 The coding system used when reading and writing the @code{nnrss} groups
17553 data files.  The default is the value of
17554 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
17555 in Emacs or @code{escape-quoted} in XEmacs).
17557 @item nnrss-ignore-article-fields
17558 @vindex nnrss-ignore-article-fields
17559 Some feeds update constantly article fields during their publications,
17560 e.g. to indicate the number of comments.  However, if there is
17561 a difference between the local article and the distant one, the latter
17562 is considered to be new.  To avoid this and discard some fields, set this
17563 variable to the list of fields to be ignored.  The default is
17564 @code{'(slash:comments)}.
17566 @item nnrss-use-local
17567 @vindex nnrss-use-local
17568 @findex nnrss-generate-download-script
17569 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
17570 the feeds from local files in @code{nnrss-directory}.  You can use
17571 the command @code{nnrss-generate-download-script} to generate a
17572 download script using @command{wget}.
17574 @item nnrss-wash-html-in-text-plain-parts
17575 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
17576 parts as @acronym{HTML}.  The function specified by the
17577 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
17578 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
17579 to render text.  If it is @code{nil}, which is the default, text will
17580 simply be folded.  Leave it @code{nil} if you prefer to see
17581 @samp{text/html} parts.
17582 @end table
17584 The following code may be helpful, if you want to show the description in
17585 the summary buffer.
17587 @lisp
17588 (add-to-list 'nnmail-extra-headers nnrss-description-field)
17589 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
17591 (defun gnus-user-format-function-X (header)
17592   (let ((descr
17593          (assq nnrss-description-field (mail-header-extra header))))
17594     (if descr (concat "\n\t" (cdr descr)) "")))
17595 @end lisp
17597 The following code may be useful to open an nnrss url directly from the
17598 summary buffer.
17600 @lisp
17601 (require 'browse-url)
17603 (defun browse-nnrss-url (arg)
17604   (interactive "p")
17605   (let ((url (assq nnrss-url-field
17606                    (mail-header-extra
17607                     (gnus-data-header
17608                      (assq (gnus-summary-article-number)
17609                            gnus-newsgroup-data))))))
17610     (if url
17611         (progn
17612           (browse-url (cdr url))
17613           (gnus-summary-mark-as-read-forward 1))
17614       (gnus-summary-scroll-up arg))))
17616 (eval-after-load "gnus"
17617   #'(define-key gnus-summary-mode-map
17618       (kbd "<RET>") 'browse-nnrss-url))
17619 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17620 @end lisp
17622 Even if you have added @samp{text/html} to the
17623 @code{mm-discouraged-alternatives} variable (@pxref{Display
17624 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17625 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17626 more useful especially in @code{nnrss} groups to display
17627 @samp{text/html} parts.  Here's an example of setting
17628 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17629 Parameters}) in order to display @samp{text/html} parts only in
17630 @code{nnrss} groups:
17632 @lisp
17633 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17634 (eval-after-load "gnus-sum"
17635   '(add-to-list
17636     'gnus-newsgroup-variables
17637     '(mm-discouraged-alternatives
17638       . '("text/html" "image/.*"))))
17640 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17641 (add-to-list
17642  'gnus-parameters
17643  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17644 @end lisp
17647 @node Customizing W3
17648 @subsection Customizing W3
17649 @cindex W3
17650 @cindex html
17651 @cindex url
17652 @cindex Netscape
17654 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17655 alternatives) to display web pages.  Emacs/W3 is documented in its own
17656 manual, but there are some things that may be more relevant for Gnus
17657 users.
17659 For instance, a common question is how to make Emacs/W3 follow links
17660 using the @code{browse-url} functions (which will call some external web
17661 browser like Netscape).  Here's one way:
17663 @lisp
17664 (eval-after-load "w3"
17665   '(progn
17666     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17667     (defun w3-fetch (&optional url target)
17668       (interactive (list (w3-read-url-with-default)))
17669       (if (eq major-mode 'gnus-article-mode)
17670           (browse-url url)
17671         (w3-fetch-orig url target)))))
17672 @end lisp
17674 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17675 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17676 follow the link.
17679 @node IMAP
17680 @section IMAP
17681 @cindex nnimap
17682 @cindex @acronym{IMAP}
17684 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
17685 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
17686 server is much similar to connecting to a news server, you just
17687 specify the network address of the server.
17689 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
17690 everything that @acronym{POP} can, it can hence be viewed as a
17691 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
17692 similar to @acronym{NNTP} being a news storage protocol---however,
17693 @acronym{IMAP} offers more features than @acronym{NNTP} because news
17694 is more or less read-only whereas mail is read-write.
17696 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
17697 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
17698 the @acronym{IMAP} server and store them on the local disk.  This is
17699 not the usage described in this section---@xref{Mail Sources}.
17701 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
17702 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
17703 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
17704 usage explained in this section.
17706 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
17707 servers might look something like the following.  (Note that for
17708 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
17709 see below.)
17711 @lisp
17712 (setq gnus-secondary-select-methods
17713       '((nnimap "simpleserver") ; @r{no special configuration}
17714         ; @r{perhaps a ssh port forwarded server:}
17715         (nnimap "dolk"
17716                 (nnimap-address "localhost")
17717                 (nnimap-server-port 1430))
17718         ; @r{a UW server running on localhost}
17719         (nnimap "barbar"
17720                 (nnimap-server-port 143)
17721                 (nnimap-address "localhost")
17722                 (nnimap-list-pattern ("INBOX" "mail/*")))
17723         ; @r{anonymous public cyrus server:}
17724         (nnimap "cyrus.andrew.cmu.edu"
17725                 (nnimap-authenticator anonymous)
17726                 (nnimap-list-pattern "archive.*")
17727                 (nnimap-stream network))
17728         ; @r{a ssl server on a non-standard port:}
17729         (nnimap "vic20"
17730                 (nnimap-address "vic20.somewhere.com")
17731                 (nnimap-server-port 9930)
17732                 (nnimap-stream ssl))))
17733 @end lisp
17735 After defining the new server, you can subscribe to groups on the
17736 server using normal Gnus commands such as @kbd{U} in the Group Buffer
17737 (@pxref{Subscription Commands}) or via the Server Buffer
17738 (@pxref{Server Buffer}).
17740 The following variables can be used to create a virtual @code{nnimap}
17741 server:
17743 @table @code
17745 @item nnimap-address
17746 @vindex nnimap-address
17748 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
17749 server name if not specified.
17751 @item nnimap-server-port
17752 @vindex nnimap-server-port
17753 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
17755 Note that this should be an integer, example server specification:
17757 @lisp
17758 (nnimap "mail.server.com"
17759         (nnimap-server-port 4711))
17760 @end lisp
17762 @item nnimap-list-pattern
17763 @vindex nnimap-list-pattern
17764 String or list of strings of mailboxes to limit available groups to.
17765 This is used when the server has very many mailboxes and you're only
17766 interested in a few---some servers export your home directory via
17767 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
17768 @file{~/Mail/*} then.
17770 The string can also be a cons of REFERENCE and the string as above, what
17771 REFERENCE is used for is server specific, but on the University of
17772 Washington server it's a directory that will be concatenated with the
17773 mailbox.
17775 Example server specification:
17777 @lisp
17778 (nnimap "mail.server.com"
17779         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
17780                                ("~friend/Mail/" . "list/*"))))
17781 @end lisp
17783 @item nnimap-stream
17784 @vindex nnimap-stream
17785 The type of stream used to connect to your server.  By default, nnimap
17786 will detect and automatically use all of the below, with the exception
17787 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
17788 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
17789 be automatically detected, but it's not widely deployed yet.)
17791 Example server specification:
17793 @lisp
17794 (nnimap "mail.server.com"
17795         (nnimap-stream ssl))
17796 @end lisp
17798 Please note that the value of @code{nnimap-stream} is a symbol!
17800 @itemize @bullet
17801 @item
17802 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
17803 @samp{gsasl} or @samp{imtest} program.
17804 @item
17805 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
17806 @item
17807 @dfn{starttls:} Connect via the STARTTLS extension (similar to
17808 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
17809 @samp{starttls}.
17810 @item
17811 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
17812 @samp{gnutls-cli}).
17813 @item
17814 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
17815 @samp{openssl}) or SSLeay (@samp{s_client}).
17816 @item
17817 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
17818 @item
17819 @dfn{network:} Plain, TCP/IP network connection.
17820 @end itemize
17822 @vindex imap-kerberos4-program
17823 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
17824 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
17825 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
17826 to make @code{imap.el} use a pty instead of a pipe when communicating
17827 with @samp{imtest}.  You will then suffer from a line length
17828 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
17829 indefinitely if you have many articles in a mailbox.  The variable
17830 @code{imap-kerberos4-program} contain parameters to pass to the imtest
17831 program.
17833 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
17834 needed.  It is available from
17835 @uref{http://www.gnu.org/software/gnutls/}.
17837 @vindex imap-gssapi-program
17838 This parameter specifies a list of command lines that invoke a GSSAPI
17839 authenticated @acronym{IMAP} stream in a subshell.  They are tried
17840 sequentially until a connection is made, or the list has been
17841 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
17842 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
17843 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
17844 tried.
17846 @vindex imap-ssl-program
17847 For @acronym{SSL} connections, the OpenSSL program is available from
17848 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
17849 and nnimap support it too---although the most recent versions of
17850 SSLeay, 0.9.x, are known to have serious bugs making it
17851 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
17852 work.  The variable @code{imap-ssl-program} contain parameters to pass
17853 to OpenSSL/SSLeay.
17855 @vindex imap-shell-program
17856 @vindex imap-shell-host
17857 For @acronym{IMAP} connections using the @code{shell} stream, the
17858 variable @code{imap-shell-program} specify what program to call.  Make
17859 sure nothing is interfering with the output of the program, e.g., don't
17860 forget to redirect the error output to the void.
17862 @item nnimap-authenticator
17863 @vindex nnimap-authenticator
17865 The authenticator used to connect to the server.  By default, nnimap
17866 will use the most secure authenticator your server is capable of.
17868 Example server specification:
17870 @lisp
17871 (nnimap "mail.server.com"
17872         (nnimap-authenticator anonymous))
17873 @end lisp
17875 Please note that the value of @code{nnimap-authenticator} is a symbol!
17877 @itemize @bullet
17878 @item
17879 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
17880 external program @code{gsasl} or @code{imtest}.
17881 @item
17882 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
17883 @code{imtest}.
17884 @item
17885 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
17886 external library @code{digest-md5.el}.
17887 @item
17888 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
17889 @item
17890 @dfn{login:} Plain-text username/password via LOGIN.
17891 @item
17892 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
17893 @end itemize
17895 @item nnimap-expunge-on-close
17896 @cindex expunging
17897 @vindex nnimap-expunge-on-close
17898 Unlike Parmenides the @acronym{IMAP} designers have decided things that
17899 don't exist actually do exist.  More specifically, @acronym{IMAP} has
17900 this concept of marking articles @code{Deleted} which doesn't actually
17901 delete them, and this (marking them @code{Deleted}, that is) is what
17902 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
17903 similar).
17905 Since the articles aren't really removed when we mark them with the
17906 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
17907 running in circles yet?
17909 Traditionally, nnimap has removed all articles marked as @code{Deleted}
17910 when closing a mailbox but this is now configurable by this server
17911 variable.
17913 The possible options are:
17915 @table @code
17917 @item always
17918 The default behavior, delete all articles marked as ``Deleted'' when
17919 closing a mailbox.
17920 @item never
17921 Never actually delete articles.  Currently there is no way of showing
17922 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
17923 may allow you to do this.  If you ever want to run the EXPUNGE command
17924 manually, @xref{Expunging mailboxes}.
17925 @item ask
17926 When closing mailboxes, nnimap will ask if you wish to expunge deleted
17927 articles or not.
17929 @end table
17931 @item nnimap-importantize-dormant
17932 @vindex nnimap-importantize-dormant
17934 If non-@code{nil} (the default), marks dormant articles as ticked (as
17935 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
17936 naturally still (only) be marked as dormant.  This is to make dormant
17937 articles stand out, just like ticked articles, in other @acronym{IMAP}
17938 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
17939 has only one.)
17941 Probably the only reason for frobbing this would be if you're trying
17942 enable per-user persistent dormant flags, using something like:
17944 @lisp
17945 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
17946         (format "gnus-dormant-%s" (user-login-name)))
17947 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
17948         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
17949 @end lisp
17951 In this case, you would not want the per-user dormant flag showing up
17952 as ticked for other users.
17954 @item nnimap-expunge-search-string
17955 @cindex expunging
17956 @vindex nnimap-expunge-search-string
17957 @cindex expiring @acronym{IMAP} mail
17959 This variable contain the @acronym{IMAP} search command sent to server when
17960 searching for articles eligible for expiring.  The default is
17961 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
17962 UID set and the second @code{%s} is replaced by a date.
17964 Probably the only useful value to change this to is
17965 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
17966 messages instead of the internal article date.  See section 6.4.4 of
17967 RFC 2060 for more information on valid strings.
17969 However, if @code{nnimap-search-uids-not-since-is-evil}
17970 is true, this variable has no effect since the search logic
17971 is reversed, as described below.
17973 @item nnimap-authinfo-file
17974 @vindex nnimap-authinfo-file
17976 A file containing credentials used to log in on servers.  The format is
17977 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
17978 variable @code{nntp-authinfo-file} for exact syntax; also see
17979 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is:
17981 @example
17982 machine students.uio.no login larsi password geheimnis port imap
17983 @end example
17985 Note that it should be @code{port imap}, or @code{port 143}, if you
17986 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
17987 actual port number used is port 993 for secured IMAP.  For
17988 convenience, Gnus will accept @code{port imaps} as a synonym of
17989 @code{port imap}.
17991 @item nnimap-need-unselect-to-notice-new-mail
17992 @vindex nnimap-need-unselect-to-notice-new-mail
17994 Unselect mailboxes before looking for new mail in them.  Some servers
17995 seem to need this under some circumstances; it was reported that
17996 Courier 1.7.1 did.
17998 @item nnimap-nov-is-evil
17999 @vindex nnimap-nov-is-evil
18000 @cindex Courier @acronym{IMAP} server
18001 @cindex @acronym{NOV}
18003 Never generate or use a local @acronym{NOV} database. Defaults to the
18004 value of @code{gnus-agent}.
18006 Using a @acronym{NOV} database usually makes header fetching much
18007 faster, but it uses the @code{UID SEARCH UID} command, which is very
18008 slow on some servers (notably some versions of Courier). Since the Gnus
18009 Agent caches the information in the @acronym{NOV} database without using
18010 the slow command, this variable defaults to true if the Agent is in use,
18011 and false otherwise.
18013 @item nnimap-search-uids-not-since-is-evil
18014 @vindex nnimap-search-uids-not-since-is-evil
18015 @cindex Courier @acronym{IMAP} server
18016 @cindex expiring @acronym{IMAP} mail
18018 Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE
18019 @var{date}} command, which is slow on some @acronym{IMAP} servers
18020 (notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE
18021 @var{date}} and prune the list of expirable articles within Gnus.
18023 When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a
18024 list of expirable articles and asks the IMAP server questions like ``Of
18025 these articles, which ones are older than a week?'' While this seems
18026 like a perfectly reasonable question, some IMAP servers take a long time
18027 to answer it, since they seemingly go looking into every old article to
18028 see if it is one of the expirable ones. Curiously, the question ``Of
18029 @emph{all} articles, which ones are newer than a week?'' seems to be
18030 much faster to answer, so setting this variable causes Gnus to ask this
18031 question and figure out the answer to the real question itself.
18033 This problem can really sneak up on you: when you first configure Gnus,
18034 everything works fine, but once you accumulate a couple thousand
18035 messages, you start cursing Gnus for being so slow. On the other hand,
18036 if you get a lot of email within a week, setting this variable will
18037 cause a lot of network traffic between Gnus and the IMAP server.
18039 @item nnimap-logout-timeout
18040 @vindex nnimap-logout-timeout
18042 There is a case where a connection to a @acronym{IMAP} server is unable
18043 to close, when connecting to the server via a certain kind of network,
18044 e.g. @acronym{VPN}.  In that case, it will be observed that a connection
18045 between Emacs and the local network looks alive even if the server has
18046 closed a connection for some reason (typically, a timeout).
18047 Consequently, Emacs continues waiting for a response from the server for
18048 the @code{LOGOUT} command that Emacs sent, or hangs in other words.  If
18049 you are in such a network, setting this variable to a number of seconds
18050 will be helpful.  If it is set, a hung connection will be closed
18051 forcibly, after this number of seconds from the time Emacs sends the
18052 @code{LOGOUT} command.  It should not be too small value but too large
18053 value will be inconvenient too.  Perhaps the value 1.0 will be a good
18054 candidate but it might be worth trying some other values.
18056 Example server specification:
18058 @lisp
18059 (nnimap "mail.server.com"
18060         (nnimap-logout-timeout 1.0))
18061 @end lisp
18063 @end table
18065 @menu
18066 * Splitting in IMAP::           Splitting mail with nnimap.
18067 * Expiring in IMAP::            Expiring mail with nnimap.
18068 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
18069 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
18070 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
18071 * Debugging IMAP::              What to do when things don't work.
18072 @end menu
18076 @node Splitting in IMAP
18077 @subsection Splitting in IMAP
18078 @cindex splitting imap mail
18080 Splitting is something Gnus users have loved and used for years, and now
18081 the rest of the world is catching up.  Yeah, dream on, not many
18082 @acronym{IMAP} servers have server side splitting and those that have
18083 splitting seem to use some non-standard protocol.  This means that
18084 @acronym{IMAP} support for Gnus has to do its own splitting.
18086 And it does.
18088 (Incidentally, people seem to have been dreaming on, and Sieve has
18089 gaining a market share and is supported by several IMAP servers.
18090 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
18092 Here are the variables of interest:
18094 @table @code
18096 @item nnimap-split-crosspost
18097 @cindex splitting, crosspost
18098 @cindex crosspost
18099 @vindex nnimap-split-crosspost
18101 If non-@code{nil}, do crossposting if several split methods match the
18102 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
18103 found will be used.
18105 Nnmail equivalent: @code{nnmail-crosspost}.
18107 @item nnimap-split-inbox
18108 @cindex splitting, inbox
18109 @cindex inbox
18110 @vindex nnimap-split-inbox
18112 A string or a list of strings that gives the name(s) of @acronym{IMAP}
18113 mailboxes to split from.  Defaults to @code{nil}, which means that
18114 splitting is disabled!
18116 @lisp
18117 (setq nnimap-split-inbox
18118       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
18119 @end lisp
18121 No nnmail equivalent.
18123 @item nnimap-split-rule
18124 @cindex splitting, rules
18125 @vindex nnimap-split-rule
18127 New mail found in @code{nnimap-split-inbox} will be split according to
18128 this variable.
18130 This variable contains a list of lists, where the first element in the
18131 sublist gives the name of the @acronym{IMAP} mailbox to move articles
18132 matching the regexp in the second element in the sublist.  Got that?
18133 Neither did I, we need examples.
18135 @lisp
18136 (setq nnimap-split-rule
18137       '(("INBOX.nnimap"
18138          "^Sender: owner-nnimap@@vic20.globalcom.se")
18139         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
18140         ("INBOX.private" "")))
18141 @end lisp
18143 This will put all articles from the nnimap mailing list into mailbox
18144 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
18145 into INBOX.junk and everything else in INBOX.private.
18147 The first string may contain @samp{\\1} forms, like the ones used by
18148 replace-match to insert sub-expressions from the matched text.  For
18149 instance:
18151 @lisp
18152 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
18153 @end lisp
18155 The first element can also be the symbol @code{junk} to indicate that
18156 matching messages should simply be deleted.  Use with care.
18158 The second element can also be a function.  In that case, it will be
18159 called with the first element of the rule as the argument, in a buffer
18160 containing the headers of the article.  It should return a
18161 non-@code{nil} value if it thinks that the mail belongs in that group.
18163 Nnmail users might recollect that the last regexp had to be empty to
18164 match all articles (like in the example above).  This is not required in
18165 nnimap.  Articles not matching any of the regexps will not be moved out
18166 of your inbox.  (This might affect performance if you keep lots of
18167 unread articles in your inbox, since the splitting code would go over
18168 them every time you fetch new mail.)
18170 These rules are processed from the beginning of the alist toward the
18171 end.  The first rule to make a match will ``win'', unless you have
18172 crossposting enabled.  In that case, all matching rules will ``win''.
18174 This variable can also have a function as its value, the function will
18175 be called with the headers narrowed and should return a group where it
18176 thinks the article should be split to.  See @code{nnimap-split-fancy}.
18178 The splitting code tries to create mailboxes if it needs to.
18180 To allow for different split rules on different virtual servers, and
18181 even different split rules in different inboxes on the same server,
18182 the syntax of this variable have been extended along the lines of:
18184 @lisp
18185 (setq nnimap-split-rule
18186       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
18187                                ("junk"    "From:.*Simon"))))
18188         ("my2server"    ("INBOX" nnimap-split-fancy))
18189         ("my[34]server" (".*" (("private" "To:.*Simon")
18190                                ("junk"    my-junk-func))))))
18191 @end lisp
18193 The virtual server name is in fact a regexp, so that the same rules
18194 may apply to several servers.  In the example, the servers
18195 @code{my3server} and @code{my4server} both use the same rules.
18196 Similarly, the inbox string is also a regexp.  The actual splitting
18197 rules are as before, either a function, or a list with group/regexp or
18198 group/function elements.
18200 Nnmail equivalent: @code{nnmail-split-methods}.
18202 @item nnimap-split-predicate
18203 @cindex splitting
18204 @vindex nnimap-split-predicate
18206 Mail matching this predicate in @code{nnimap-split-inbox} will be
18207 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
18209 This might be useful if you use another @acronym{IMAP} client to read mail in
18210 your inbox but would like Gnus to split all articles in the inbox
18211 regardless of readedness.  Then you might change this to
18212 @samp{UNDELETED}.
18214 @item nnimap-split-fancy
18215 @cindex splitting, fancy
18216 @findex nnimap-split-fancy
18217 @vindex nnimap-split-fancy
18219 It's possible to set @code{nnimap-split-rule} to
18220 @code{nnmail-split-fancy} if you want to use fancy
18221 splitting.  @xref{Fancy Mail Splitting}.
18223 However, to be able to have different fancy split rules for nnmail and
18224 nnimap back ends you can set @code{nnimap-split-rule} to
18225 @code{nnimap-split-fancy} and define the nnimap specific fancy split
18226 rule in @code{nnimap-split-fancy}.
18228 Example:
18230 @lisp
18231 (setq nnimap-split-rule 'nnimap-split-fancy
18232       nnimap-split-fancy ...)
18233 @end lisp
18235 Nnmail equivalent: @code{nnmail-split-fancy}.
18237 @item nnimap-split-download-body
18238 @findex nnimap-split-download-body
18239 @vindex nnimap-split-download-body
18241 Set to non-@code{nil} to download entire articles during splitting.
18242 This is generally not required, and will slow things down
18243 considerably.  You may need it if you want to use an advanced
18244 splitting function that analyzes the body to split the article.
18246 @end table
18248 @node Expiring in IMAP
18249 @subsection Expiring in IMAP
18250 @cindex expiring @acronym{IMAP} mail
18252 Even though @code{nnimap} is not a proper @code{nnmail} derived back
18253 end, it supports most features in regular expiring (@pxref{Expiring
18254 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
18255 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
18256 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
18257 follows below are the variables used by the @code{nnimap} expiry
18258 process.
18260 A note on how the expire mark is stored on the @acronym{IMAP} server is
18261 appropriate here as well.  The expire mark is translated into a
18262 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
18263 message.  This means that likely only Gnus will understand and treat
18264 the @code{gnus-expire} mark properly, although other clients may allow
18265 you to view client specific flags on the message.  It also means that
18266 your server must support permanent storage of client specific flags on
18267 messages.  Most do, fortunately.
18269 If expiring @acronym{IMAP} mail seems very slow, try setting the server
18270 variable @code{nnimap-search-uids-not-since-is-evil}.
18272 @table @code
18274 @item nnmail-expiry-wait
18275 @item nnmail-expiry-wait-function
18277 These variables are fully supported.  The expire value can be a
18278 number, the symbol @code{immediate} or @code{never}.
18280 @item nnmail-expiry-target
18282 This variable is supported, and internally implemented by calling the
18283 @code{nnmail} functions that handle this.  It contains an optimization
18284 that if the destination is a @acronym{IMAP} group on the same server, the
18285 article is copied instead of appended (that is, uploaded again).
18287 @end table
18289 @node Editing IMAP ACLs
18290 @subsection Editing IMAP ACLs
18291 @cindex editing imap acls
18292 @cindex Access Control Lists
18293 @cindex Editing @acronym{IMAP} ACLs
18294 @kindex G l (Group)
18295 @findex gnus-group-nnimap-edit-acl
18297 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
18298 limiting (or enabling) other users access to your mail boxes.  Not all
18299 @acronym{IMAP} servers support this, this function will give an error if it
18300 doesn't.
18302 To edit an ACL for a mailbox, type @kbd{G l}
18303 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
18304 editing window with detailed instructions.
18306 Some possible uses:
18308 @itemize @bullet
18309 @item
18310 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
18311 on your mailing list mailboxes enables other users on the same server to
18312 follow the list without subscribing to it.
18313 @item
18314 At least with the Cyrus server, you are required to give the user
18315 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
18316 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
18317 INBOX.mailbox).
18318 @end itemize
18320 @node Expunging mailboxes
18321 @subsection Expunging mailboxes
18322 @cindex expunging
18324 @cindex expunge
18325 @cindex manual expunging
18326 @kindex G x (Group)
18327 @findex gnus-group-nnimap-expunge
18329 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
18330 you may want the option of expunging all deleted articles in a mailbox
18331 manually.  This is exactly what @kbd{G x} does.
18333 Currently there is no way of showing deleted articles, you can just
18334 delete them.
18336 @node A note on namespaces
18337 @subsection A note on namespaces
18338 @cindex IMAP namespace
18339 @cindex namespaces
18341 The @acronym{IMAP} protocol has a concept called namespaces, described
18342 by the following text in the RFC2060:
18344 @display
18345 5.1.2.  Mailbox Namespace Naming Convention
18347    By convention, the first hierarchical element of any mailbox name
18348    which begins with "#" identifies the "namespace" of the remainder of
18349    the name.  This makes it possible to disambiguate between different
18350    types of mailbox stores, each of which have their own namespaces.
18352       For example, implementations which offer access to USENET
18353       newsgroups MAY use the "#news" namespace to partition the USENET
18354       newsgroup namespace from that of other mailboxes.  Thus, the
18355       comp.mail.misc newsgroup would have an mailbox name of
18356       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
18357       to a different object (e.g. a user's private mailbox).
18358 @end display
18360 While there is nothing in this text that warrants concern for the
18361 @acronym{IMAP} implementation in Gnus, some servers use namespace
18362 prefixes in a way that does not work with how Gnus uses mailbox names.
18364 Specifically, University of Washington's @acronym{IMAP} server uses
18365 mailbox names like @code{#driver.mbx/read-mail} which are valid only
18366 in the @sc{create} and @sc{append} commands.  After the mailbox is
18367 created (or a messages is appended to a mailbox), it must be accessed
18368 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
18369 not make it possible for the user to guarantee that user entered
18370 mailbox names will only be used with the CREATE and APPEND commands,
18371 you should simply not use the namespace prefixed mailbox names in
18372 Gnus.
18374 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
18375 for more information on how to use the prefixes.  They are a power
18376 tool and should be used only if you are sure what the effects are.
18378 @node Debugging IMAP
18379 @subsection Debugging IMAP
18380 @cindex IMAP debugging
18381 @cindex protocol dump (IMAP)
18383 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
18384 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
18385 best to fix them right away.  If you encounter odd behavior, chances
18386 are that either the server or Gnus is buggy.
18388 If you are familiar with network protocols in general, you will
18389 probably be able to extract some clues from the protocol dump of the
18390 exchanges between Gnus and the server.  Even if you are not familiar
18391 with network protocols, when you include the protocol dump in
18392 @acronym{IMAP}-related bug reports you are helping us with data
18393 critical to solving the problem.  Therefore, we strongly encourage you
18394 to include the protocol dump when reporting IMAP bugs in Gnus.
18397 @vindex imap-log
18398 Because the protocol dump, when enabled, generates lots of data, it is
18399 disabled by default.  You can enable it by setting @code{imap-log} as
18400 follows:
18402 @lisp
18403 (setq imap-log t)
18404 @end lisp
18406 This instructs the @code{imap.el} package to log any exchanges with
18407 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
18408 for error messages, which sometimes are tagged with the keyword
18409 @code{BAD}---but when submitting a bug, make sure to include all the
18410 data.
18412 @node Other Sources
18413 @section Other Sources
18415 Gnus can do more than just read news or mail.  The methods described
18416 below allow Gnus to view directories and files as if they were
18417 newsgroups.
18419 @menu
18420 * Directory Groups::            You can read a directory as if it was a newsgroup.
18421 * Anything Groups::             Dired?  Who needs dired?
18422 * Document Groups::             Single files can be the basis of a group.
18423 * SOUP::                        Reading @sc{soup} packets ``offline''.
18424 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
18425 @end menu
18428 @node Directory Groups
18429 @subsection Directory Groups
18430 @cindex nndir
18431 @cindex directory groups
18433 If you have a directory that has lots of articles in separate files in
18434 it, you might treat it as a newsgroup.  The files have to have numerical
18435 names, of course.
18437 This might be an opportune moment to mention @code{ange-ftp} (and its
18438 successor @code{efs}), that most wonderful of all wonderful Emacs
18439 packages.  When I wrote @code{nndir}, I didn't think much about it---a
18440 back end to read directories.  Big deal.
18442 @code{ange-ftp} changes that picture dramatically.  For instance, if you
18443 enter the @code{ange-ftp} file name
18444 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
18445 @code{ange-ftp} or @code{efs} will actually allow you to read this
18446 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
18448 @code{nndir} will use @acronym{NOV} files if they are present.
18450 @code{nndir} is a ``read-only'' back end---you can't delete or expire
18451 articles with this method.  You can use @code{nnmh} or @code{nnml} for
18452 whatever you use @code{nndir} for, so you could switch to any of those
18453 methods if you feel the need to have a non-read-only @code{nndir}.
18456 @node Anything Groups
18457 @subsection Anything Groups
18458 @cindex nneething
18460 From the @code{nndir} back end (which reads a single spool-like
18461 directory), it's just a hop and a skip to @code{nneething}, which
18462 pretends that any arbitrary directory is a newsgroup.  Strange, but
18463 true.
18465 When @code{nneething} is presented with a directory, it will scan this
18466 directory and assign article numbers to each file.  When you enter such
18467 a group, @code{nneething} must create ``headers'' that Gnus can use.
18468 After all, Gnus is a newsreader, in case you're forgetting.
18469 @code{nneething} does this in a two-step process.  First, it snoops each
18470 file in question.  If the file looks like an article (i.e., the first
18471 few lines look like headers), it will use this as the head.  If this is
18472 just some arbitrary file without a head (e.g. a C source file),
18473 @code{nneething} will cobble up a header out of thin air.  It will use
18474 file ownership, name and date and do whatever it can with these
18475 elements.
18477 All this should happen automatically for you, and you will be presented
18478 with something that looks very much like a newsgroup.  Totally like a
18479 newsgroup, to be precise.  If you select an article, it will be displayed
18480 in the article buffer, just as usual.
18482 If you select a line that represents a directory, Gnus will pop you into
18483 a new summary buffer for this @code{nneething} group.  And so on.  You can
18484 traverse the entire disk this way, if you feel like, but remember that
18485 Gnus is not dired, really, and does not intend to be, either.
18487 There are two overall modes to this action---ephemeral or solid.  When
18488 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
18489 will not store information on what files you have read, and what files
18490 are new, and so on.  If you create a solid @code{nneething} group the
18491 normal way with @kbd{G m}, Gnus will store a mapping table between
18492 article numbers and file names, and you can treat this group like any
18493 other groups.  When you activate a solid @code{nneething} group, you will
18494 be told how many unread articles it contains, etc., etc.
18496 Some variables:
18498 @table @code
18499 @item nneething-map-file-directory
18500 @vindex nneething-map-file-directory
18501 All the mapping files for solid @code{nneething} groups will be stored
18502 in this directory, which defaults to @file{~/.nneething/}.
18504 @item nneething-exclude-files
18505 @vindex nneething-exclude-files
18506 All files that match this regexp will be ignored.  Nice to use to exclude
18507 auto-save files and the like, which is what it does by default.
18509 @item nneething-include-files
18510 @vindex nneething-include-files
18511 Regexp saying what files to include in the group.  If this variable is
18512 non-@code{nil}, only files matching this regexp will be included.
18514 @item nneething-map-file
18515 @vindex nneething-map-file
18516 Name of the map files.
18517 @end table
18520 @node Document Groups
18521 @subsection Document Groups
18522 @cindex nndoc
18523 @cindex documentation group
18524 @cindex help group
18526 @code{nndoc} is a cute little thing that will let you read a single file
18527 as a newsgroup.  Several files types are supported:
18529 @table @code
18530 @cindex Babyl
18531 @cindex Rmail mbox
18532 @item babyl
18533 The Babyl (Rmail) mail box.
18535 @cindex mbox
18536 @cindex Unix mbox
18537 @item mbox
18538 The standard Unix mbox file.
18540 @cindex MMDF mail box
18541 @item mmdf
18542 The MMDF mail box format.
18544 @item news
18545 Several news articles appended into a file.
18547 @cindex rnews batch files
18548 @item rnews
18549 The rnews batch transport format.
18551 @item nsmail
18552 Netscape mail boxes.
18554 @item mime-parts
18555 @acronym{MIME} multipart messages.
18557 @item standard-digest
18558 The standard (RFC 1153) digest format.
18560 @item mime-digest
18561 A @acronym{MIME} digest of messages.
18563 @item lanl-gov-announce
18564 Announcement messages from LANL Gov Announce.
18566 @cindex forwarded messages
18567 @item rfc822-forward
18568 A message forwarded according to RFC822.
18570 @item outlook
18571 The Outlook mail box.
18573 @item oe-dbx
18574 The Outlook Express dbx mail box.
18576 @item exim-bounce
18577 A bounce message from the Exim MTA.
18579 @item forward
18580 A message forwarded according to informal rules.
18582 @item rfc934
18583 An RFC934-forwarded message.
18585 @item mailman
18586 A mailman digest.
18588 @item clari-briefs
18589 A digest of Clarinet brief news items.
18591 @item slack-digest
18592 Non-standard digest format---matches most things, but does it badly.
18594 @item mail-in-mail
18595 The last resort.
18596 @end table
18598 You can also use the special ``file type'' @code{guess}, which means
18599 that @code{nndoc} will try to guess what file type it is looking at.
18600 @code{digest} means that @code{nndoc} should guess what digest type the
18601 file is.
18603 @code{nndoc} will not try to change the file or insert any extra headers into
18604 it---it will simply, like, let you use the file as the basis for a
18605 group.  And that's it.
18607 If you have some old archived articles that you want to insert into your
18608 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
18609 that.  Say you have an old @file{RMAIL} file with mail that you now want
18610 to split into your new @code{nnml} groups.  You look at that file using
18611 @code{nndoc} (using the @kbd{G f} command in the group buffer
18612 (@pxref{Foreign Groups})), set the process mark on all the articles in
18613 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
18614 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
18615 file is now also stored in lots of @code{nnml} directories, and you can
18616 delete that pesky @file{RMAIL} file.  If you have the guts!
18618 Virtual server variables:
18620 @table @code
18621 @item nndoc-article-type
18622 @vindex nndoc-article-type
18623 This should be one of @code{mbox}, @code{babyl}, @code{digest},
18624 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
18625 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
18626 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
18627 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
18629 @item nndoc-post-type
18630 @vindex nndoc-post-type
18631 This variable says whether Gnus is to consider the group a news group or
18632 a mail group.  There are two valid values:  @code{mail} (the default)
18633 and @code{news}.
18634 @end table
18636 @menu
18637 * Document Server Internals::   How to add your own document types.
18638 @end menu
18641 @node Document Server Internals
18642 @subsubsection Document Server Internals
18644 Adding new document types to be recognized by @code{nndoc} isn't
18645 difficult.  You just have to whip up a definition of what the document
18646 looks like, write a predicate function to recognize that document type,
18647 and then hook into @code{nndoc}.
18649 First, here's an example document type definition:
18651 @example
18652 (mmdf
18653  (article-begin .  "^\^A\^A\^A\^A\n")
18654  (body-end .  "^\^A\^A\^A\^A\n"))
18655 @end example
18657 The definition is simply a unique @dfn{name} followed by a series of
18658 regexp pseudo-variable settings.  Below are the possible
18659 variables---don't be daunted by the number of variables; most document
18660 types can be defined with very few settings:
18662 @table @code
18663 @item first-article
18664 If present, @code{nndoc} will skip past all text until it finds
18665 something that match this regexp.  All text before this will be
18666 totally ignored.
18668 @item article-begin
18669 This setting has to be present in all document type definitions.  It
18670 says what the beginning of each article looks like.  To do more
18671 complicated things that cannot be dealt with a simple regexp, you can
18672 use @code{article-begin-function} instead of this.
18674 @item article-begin-function
18675 If present, this should be a function that moves point to the beginning
18676 of each article.  This setting overrides @code{article-begin}.
18678 @item head-begin
18679 If present, this should be a regexp that matches the head of the
18680 article.  To do more complicated things that cannot be dealt with a
18681 simple regexp, you can use @code{head-begin-function} instead of this.
18683 @item head-begin-function
18684 If present, this should be a function that moves point to the head of
18685 the article.  This setting overrides @code{head-begin}.
18687 @item head-end
18688 This should match the end of the head of the article.  It defaults to
18689 @samp{^$}---the empty line.
18691 @item body-begin
18692 This should match the beginning of the body of the article.  It defaults
18693 to @samp{^\n}.  To do more complicated things that cannot be dealt with
18694 a simple regexp, you can use @code{body-begin-function} instead of this.
18696 @item body-begin-function
18697 If present, this function should move point to the beginning of the body
18698 of the article.  This setting overrides @code{body-begin}.
18700 @item body-end
18701 If present, this should match the end of the body of the article.  To do
18702 more complicated things that cannot be dealt with a simple regexp, you
18703 can use @code{body-end-function} instead of this.
18705 @item body-end-function
18706 If present, this function should move point to the end of the body of
18707 the article.  This setting overrides @code{body-end}.
18709 @item file-begin
18710 If present, this should match the beginning of the file.  All text
18711 before this regexp will be totally ignored.
18713 @item file-end
18714 If present, this should match the end of the file.  All text after this
18715 regexp will be totally ignored.
18717 @end table
18719 So, using these variables @code{nndoc} is able to dissect a document
18720 file into a series of articles, each with a head and a body.  However, a
18721 few more variables are needed since not all document types are all that
18722 news-like---variables needed to transform the head or the body into
18723 something that's palatable for Gnus:
18725 @table @code
18726 @item prepare-body-function
18727 If present, this function will be called when requesting an article.  It
18728 will be called with point at the start of the body, and is useful if the
18729 document has encoded some parts of its contents.
18731 @item article-transform-function
18732 If present, this function is called when requesting an article.  It's
18733 meant to be used for more wide-ranging transformation of both head and
18734 body of the article.
18736 @item generate-head-function
18737 If present, this function is called to generate a head that Gnus can
18738 understand.  It is called with the article number as a parameter, and is
18739 expected to generate a nice head for the article in question.  It is
18740 called when requesting the headers of all articles.
18742 @item generate-article-function
18743 If present, this function is called to generate an entire article that
18744 Gnus can understand.  It is called with the article number as a
18745 parameter when requesting all articles.
18747 @item dissection-function
18748 If present, this function is called to dissect a document by itself,
18749 overriding @code{first-article}, @code{article-begin},
18750 @code{article-begin-function}, @code{head-begin},
18751 @code{head-begin-function}, @code{head-end}, @code{body-begin},
18752 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
18753 @code{file-begin}, and @code{file-end}.
18755 @end table
18757 Let's look at the most complicated example I can come up with---standard
18758 digests:
18760 @example
18761 (standard-digest
18762  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
18763  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
18764  (prepare-body-function . nndoc-unquote-dashes)
18765  (body-end-function . nndoc-digest-body-end)
18766  (head-end . "^ ?$")
18767  (body-begin . "^ ?\n")
18768  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
18769  (subtype digest guess))
18770 @end example
18772 We see that all text before a 70-width line of dashes is ignored; all
18773 text after a line that starts with that @samp{^End of} is also ignored;
18774 each article begins with a 30-width line of dashes; the line separating
18775 the head from the body may contain a single space; and that the body is
18776 run through @code{nndoc-unquote-dashes} before being delivered.
18778 To hook your own document definition into @code{nndoc}, use the
18779 @code{nndoc-add-type} function.  It takes two parameters---the first
18780 is the definition itself and the second (optional) parameter says
18781 where in the document type definition alist to put this definition.
18782 The alist is traversed sequentially, and
18783 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
18784 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
18785 @code{mmdf} type, and so on.  These type predicates should return
18786 @code{nil} if the document is not of the correct type; @code{t} if it
18787 is of the correct type; and a number if the document might be of the
18788 correct type.  A high number means high probability; a low number
18789 means low probability with @samp{0} being the lowest valid number.
18792 @node SOUP
18793 @subsection SOUP
18794 @cindex SOUP
18795 @cindex offline
18797 In the PC world people often talk about ``offline'' newsreaders.  These
18798 are thingies that are combined reader/news transport monstrosities.
18799 With built-in modem programs.  Yecchh!
18801 Of course, us Unix Weenie types of human beans use things like
18802 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
18803 transport things like Ghod intended.  And then we just use normal
18804 newsreaders.
18806 However, it can sometimes be convenient to do something that's a bit
18807 easier on the brain if you have a very slow modem, and you're not really
18808 that interested in doing things properly.
18810 A file format called @sc{soup} has been developed for transporting news
18811 and mail from servers to home machines and back again.  It can be a bit
18812 fiddly.
18814 First some terminology:
18816 @table @dfn
18818 @item server
18819 This is the machine that is connected to the outside world and where you
18820 get news and/or mail from.
18822 @item home machine
18823 This is the machine that you want to do the actual reading and responding
18824 on.  It is typically not connected to the rest of the world in any way.
18826 @item packet
18827 Something that contains messages and/or commands.  There are two kinds
18828 of packets:
18830 @table @dfn
18831 @item message packets
18832 These are packets made at the server, and typically contain lots of
18833 messages for you to read.  These are called @file{SoupoutX.tgz} by
18834 default, where @var{x} is a number.
18836 @item response packets
18837 These are packets made at the home machine, and typically contains
18838 replies that you've written.  These are called @file{SoupinX.tgz} by
18839 default, where @var{x} is a number.
18841 @end table
18843 @end table
18846 @enumerate
18848 @item
18849 You log in on the server and create a @sc{soup} packet.  You can either
18850 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
18851 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
18852 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
18854 @item
18855 You transfer the packet home.  Rail, boat, car or modem will do fine.
18857 @item
18858 You put the packet in your home directory.
18860 @item
18861 You fire up Gnus on your home machine using the @code{nnsoup} back end as
18862 the native or secondary server.
18864 @item
18865 You read articles and mail and answer and followup to the things you
18866 want (@pxref{SOUP Replies}).
18868 @item
18869 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
18870 packet.
18872 @item
18873 You transfer this packet to the server.
18875 @item
18876 You use Gnus to mail this packet out with the @kbd{G s s} command.
18878 @item
18879 You then repeat until you die.
18881 @end enumerate
18883 So you basically have a bipartite system---you use @code{nnsoup} for
18884 reading and Gnus for packing/sending these @sc{soup} packets.
18886 @menu
18887 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
18888 * SOUP Groups::                 A back end for reading @sc{soup} packets.
18889 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
18890 @end menu
18893 @node SOUP Commands
18894 @subsubsection SOUP Commands
18896 These are commands for creating and manipulating @sc{soup} packets.
18898 @table @kbd
18899 @item G s b
18900 @kindex G s b (Group)
18901 @findex gnus-group-brew-soup
18902 Pack all unread articles in the current group
18903 (@code{gnus-group-brew-soup}).  This command understands the
18904 process/prefix convention.
18906 @item G s w
18907 @kindex G s w (Group)
18908 @findex gnus-soup-save-areas
18909 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
18911 @item G s s
18912 @kindex G s s (Group)
18913 @findex gnus-soup-send-replies
18914 Send all replies from the replies packet
18915 (@code{gnus-soup-send-replies}).
18917 @item G s p
18918 @kindex G s p (Group)
18919 @findex gnus-soup-pack-packet
18920 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
18922 @item G s r
18923 @kindex G s r (Group)
18924 @findex nnsoup-pack-replies
18925 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
18927 @item O s
18928 @kindex O s (Summary)
18929 @findex gnus-soup-add-article
18930 This summary-mode command adds the current article to a @sc{soup} packet
18931 (@code{gnus-soup-add-article}).  It understands the process/prefix
18932 convention (@pxref{Process/Prefix}).
18934 @end table
18937 There are a few variables to customize where Gnus will put all these
18938 thingies:
18940 @table @code
18942 @item gnus-soup-directory
18943 @vindex gnus-soup-directory
18944 Directory where Gnus will save intermediate files while composing
18945 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
18947 @item gnus-soup-replies-directory
18948 @vindex gnus-soup-replies-directory
18949 This is what Gnus will use as a temporary directory while sending our
18950 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
18952 @item gnus-soup-prefix-file
18953 @vindex gnus-soup-prefix-file
18954 Name of the file where Gnus stores the last used prefix.  The default is
18955 @samp{gnus-prefix}.
18957 @item gnus-soup-packer
18958 @vindex gnus-soup-packer
18959 A format string command for packing a @sc{soup} packet.  The default is
18960 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
18962 @item gnus-soup-unpacker
18963 @vindex gnus-soup-unpacker
18964 Format string command for unpacking a @sc{soup} packet.  The default is
18965 @samp{gunzip -c %s | tar xvf -}.
18967 @item gnus-soup-packet-directory
18968 @vindex gnus-soup-packet-directory
18969 Where Gnus will look for reply packets.  The default is @file{~/}.
18971 @item gnus-soup-packet-regexp
18972 @vindex gnus-soup-packet-regexp
18973 Regular expression matching @sc{soup} reply packets in
18974 @code{gnus-soup-packet-directory}.
18976 @end table
18979 @node SOUP Groups
18980 @subsubsection SOUP Groups
18981 @cindex nnsoup
18983 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
18984 read incoming packets, unpack them, and put them in a directory where
18985 you can read them at leisure.
18987 These are the variables you can use to customize its behavior:
18989 @table @code
18991 @item nnsoup-tmp-directory
18992 @vindex nnsoup-tmp-directory
18993 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
18994 directory.  (@file{/tmp/} by default.)
18996 @item nnsoup-directory
18997 @vindex nnsoup-directory
18998 @code{nnsoup} then moves each message and index file to this directory.
18999 The default is @file{~/SOUP/}.
19001 @item nnsoup-replies-directory
19002 @vindex nnsoup-replies-directory
19003 All replies will be stored in this directory before being packed into a
19004 reply packet.  The default is @file{~/SOUP/replies/}.
19006 @item nnsoup-replies-format-type
19007 @vindex nnsoup-replies-format-type
19008 The @sc{soup} format of the replies packets.  The default is @samp{?n}
19009 (rnews), and I don't think you should touch that variable.  I probably
19010 shouldn't even have documented it.  Drats!  Too late!
19012 @item nnsoup-replies-index-type
19013 @vindex nnsoup-replies-index-type
19014 The index type of the replies packet.  The default is @samp{?n}, which
19015 means ``none''.  Don't fiddle with this one either!
19017 @item nnsoup-active-file
19018 @vindex nnsoup-active-file
19019 Where @code{nnsoup} stores lots of information.  This is not an ``active
19020 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
19021 this file or mess it up in any way, you're dead.  The default is
19022 @file{~/SOUP/active}.
19024 @item nnsoup-packer
19025 @vindex nnsoup-packer
19026 Format string command for packing a reply @sc{soup} packet.  The default
19027 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
19029 @item nnsoup-unpacker
19030 @vindex nnsoup-unpacker
19031 Format string command for unpacking incoming @sc{soup} packets.  The
19032 default is @samp{gunzip -c %s | tar xvf -}.
19034 @item nnsoup-packet-directory
19035 @vindex nnsoup-packet-directory
19036 Where @code{nnsoup} will look for incoming packets.  The default is
19037 @file{~/}.
19039 @item nnsoup-packet-regexp
19040 @vindex nnsoup-packet-regexp
19041 Regular expression matching incoming @sc{soup} packets.  The default is
19042 @samp{Soupout}.
19044 @item nnsoup-always-save
19045 @vindex nnsoup-always-save
19046 If non-@code{nil}, save the replies buffer after each posted message.
19048 @end table
19051 @node SOUP Replies
19052 @subsubsection SOUP Replies
19054 Just using @code{nnsoup} won't mean that your postings and mailings end
19055 up in @sc{soup} reply packets automagically.  You have to work a bit
19056 more for that to happen.
19058 @findex nnsoup-set-variables
19059 The @code{nnsoup-set-variables} command will set the appropriate
19060 variables to ensure that all your followups and replies end up in the
19061 @sc{soup} system.
19063 In specific, this is what it does:
19065 @lisp
19066 (setq message-send-news-function 'nnsoup-request-post)
19067 (setq message-send-mail-function 'nnsoup-request-mail)
19068 @end lisp
19070 And that's it, really.  If you only want news to go into the @sc{soup}
19071 system you just use the first line.  If you only want mail to be
19072 @sc{soup}ed you use the second.
19075 @node Mail-To-News Gateways
19076 @subsection Mail-To-News Gateways
19077 @cindex mail-to-news gateways
19078 @cindex gateways
19080 If your local @code{nntp} server doesn't allow posting, for some reason
19081 or other, you can post using one of the numerous mail-to-news gateways.
19082 The @code{nngateway} back end provides the interface.
19084 Note that you can't read anything from this back end---it can only be
19085 used to post with.
19087 Server variables:
19089 @table @code
19090 @item nngateway-address
19091 @vindex nngateway-address
19092 This is the address of the mail-to-news gateway.
19094 @item nngateway-header-transformation
19095 @vindex nngateway-header-transformation
19096 News headers often have to be transformed in some odd way or other
19097 for the mail-to-news gateway to accept it.  This variable says what
19098 transformation should be called, and defaults to
19099 @code{nngateway-simple-header-transformation}.  The function is called
19100 narrowed to the headers to be transformed and with one parameter---the
19101 gateway address.
19103 This default function just inserts a new @code{To} header based on the
19104 @code{Newsgroups} header and the gateway address.
19105 For instance, an article with this @code{Newsgroups} header:
19107 @example
19108 Newsgroups: alt.religion.emacs
19109 @end example
19111 will get this @code{To} header inserted:
19113 @example
19114 To: alt-religion-emacs@@GATEWAY
19115 @end example
19117 The following pre-defined functions exist:
19119 @findex nngateway-simple-header-transformation
19120 @table @code
19122 @item nngateway-simple-header-transformation
19123 Creates a @code{To} header that looks like
19124 @var{newsgroup}@@@code{nngateway-address}.
19126 @findex nngateway-mail2news-header-transformation
19128 @item nngateway-mail2news-header-transformation
19129 Creates a @code{To} header that looks like
19130 @code{nngateway-address}.
19131 @end table
19133 @end table
19135 Here's an example:
19137 @lisp
19138 (setq gnus-post-method
19139       '(nngateway
19140         "mail2news@@replay.com"
19141         (nngateway-header-transformation
19142          nngateway-mail2news-header-transformation)))
19143 @end lisp
19145 So, to use this, simply say something like:
19147 @lisp
19148 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
19149 @end lisp
19153 @node Combined Groups
19154 @section Combined Groups
19156 Gnus allows combining a mixture of all the other group types into bigger
19157 groups.
19159 @menu
19160 * Virtual Groups::              Combining articles from many groups.
19161 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
19162 @end menu
19165 @node Virtual Groups
19166 @subsection Virtual Groups
19167 @cindex nnvirtual
19168 @cindex virtual groups
19169 @cindex merging groups
19171 An @dfn{nnvirtual group} is really nothing more than a collection of
19172 other groups.
19174 For instance, if you are tired of reading many small groups, you can
19175 put them all in one big group, and then grow tired of reading one
19176 big, unwieldy group.  The joys of computing!
19178 You specify @code{nnvirtual} as the method.  The address should be a
19179 regexp to match component groups.
19181 All marks in the virtual group will stick to the articles in the
19182 component groups.  So if you tick an article in a virtual group, the
19183 article will also be ticked in the component group from whence it
19184 came.  (And vice versa---marks from the component groups will also be
19185 shown in the virtual group.).  To create an empty virtual group, run
19186 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
19187 and edit the method regexp with @kbd{M-e}
19188 (@code{gnus-group-edit-group-method})
19190 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
19191 newsgroups into one, big, happy newsgroup:
19193 @lisp
19194 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
19195 @end lisp
19197 The component groups can be native or foreign; everything should work
19198 smoothly, but if your computer explodes, it was probably my fault.
19200 Collecting the same group from several servers might actually be a good
19201 idea if users have set the Distribution header to limit distribution.
19202 If you would like to read @samp{soc.motss} both from a server in Japan
19203 and a server in Norway, you could use the following as the group regexp:
19205 @example
19206 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
19207 @end example
19209 (Remember, though, that if you're creating the group with @kbd{G m}, you
19210 shouldn't double the backslashes, and you should leave off the quote
19211 characters at the beginning and the end of the string.)
19213 This should work kinda smoothly---all articles from both groups should
19214 end up in this one, and there should be no duplicates.  Threading (and
19215 the rest) will still work as usual, but there might be problems with the
19216 sequence of articles.  Sorting on date might be an option here
19217 (@pxref{Selecting a Group}).
19219 One limitation, however---all groups included in a virtual
19220 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
19221 zombie groups can't be component groups for @code{nnvirtual} groups.
19223 @vindex nnvirtual-always-rescan
19224 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
19225 is the default), @code{nnvirtual} will always scan groups for unread
19226 articles when entering a virtual group.  If this variable is @code{nil}
19227 and you read articles in a component group after the virtual group has
19228 been activated, the read articles from the component group will show up
19229 when you enter the virtual group.  You'll also see this effect if you
19230 have two virtual groups that have a component group in common.  If
19231 that's the case, you should set this variable to @code{t}.  Or you can
19232 just tap @code{M-g} on the virtual group every time before you enter
19233 it---it'll have much the same effect.
19235 @code{nnvirtual} can have both mail and news groups as component groups.
19236 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
19237 has to ask the back end of the component group the article comes from
19238 whether it is a news or mail back end.  However, when you do a @kbd{^},
19239 there is typically no sure way for the component back end to know this,
19240 and in that case @code{nnvirtual} tells Gnus that the article came from a
19241 not-news back end.  (Just to be on the safe side.)
19243 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
19244 line from the article you respond to in these cases.
19246 @code{nnvirtual} groups do not inherit anything but articles and marks
19247 from component groups---group parameters, for instance, are not
19248 inherited.
19251 @node Kibozed Groups
19252 @subsection Kibozed Groups
19253 @cindex nnkiboze
19254 @cindex kibozing
19256 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
19257 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
19258 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
19259 down to a halt with useless requests!  Oh happiness!
19261 @kindex G k (Group)
19262 To create a kibozed group, use the @kbd{G k} command in the group
19263 buffer.
19265 The address field of the @code{nnkiboze} method is, as with
19266 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
19267 @code{nnkiboze} group.  That's where most similarities between
19268 @code{nnkiboze} and @code{nnvirtual} end.
19270 In addition to this regexp detailing component groups, an
19271 @code{nnkiboze} group must have a score file to say what articles are
19272 to be included in the group (@pxref{Scoring}).
19274 @kindex M-x nnkiboze-generate-groups
19275 @findex nnkiboze-generate-groups
19276 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
19277 @code{nnkiboze} groups you want to have.  This command will take time.
19278 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
19279 headers from all the articles in all the component groups and run them
19280 through the scoring process to determine if there are any articles in
19281 the groups that are to be part of the @code{nnkiboze} groups.
19283 Please limit the number of component groups by using restrictive
19284 regexps.  Otherwise your sysadmin may become annoyed with you, and the
19285 @acronym{NNTP} site may throw you off and never let you back in again.
19286 Stranger things have happened.
19288 @code{nnkiboze} component groups do not have to be alive---they can be dead,
19289 and they can be foreign.  No restrictions.
19291 @vindex nnkiboze-directory
19292 The generation of an @code{nnkiboze} group means writing two files in
19293 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
19294 One contains the @acronym{NOV} header lines for all the articles in
19295 the group, and the other is an additional @file{.newsrc} file to store
19296 information on what groups have been searched through to find
19297 component articles.
19299 Articles marked as read in the @code{nnkiboze} group will have
19300 their @acronym{NOV} lines removed from the @acronym{NOV} file.
19303 @node Email Based Diary
19304 @section Email Based Diary
19305 @cindex diary
19306 @cindex email based diary
19307 @cindex calendar
19309 This section describes a special mail back end called @code{nndiary},
19310 and its companion library @code{gnus-diary}.  It is ``special'' in the
19311 sense that it is not meant to be one of the standard alternatives for
19312 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
19313 Instead, it is used to treat @emph{some} of your mails in a special way,
19314 namely, as event reminders.
19316 Here is a typical scenario:
19318 @itemize @bullet
19319 @item
19320 You've got a date with Andy Mc Dowell or Bruce Willis (select according
19321 to your sexual preference) in one month.  You don't want to forget it.
19322 @item
19323 So you send a ``reminder'' message (actually, a diary one) to yourself.
19324 @item
19325 You forget all about it and keep on getting and reading new mail, as usual.
19326 @item
19327 From time to time, as you type `g' in the group buffer and as the date
19328 is getting closer, the message will pop up again to remind you of your
19329 appointment, just as if it were new and unread.
19330 @item
19331 Read your ``new'' messages, this one included, and start dreaming again
19332 of the night you're gonna have.
19333 @item
19334 Once the date is over (you actually fell asleep just after dinner), the
19335 message will be automatically deleted if it is marked as expirable.
19336 @end itemize
19338 The Gnus Diary back end has the ability to handle regular appointments
19339 (that wouldn't ever be deleted) as well as punctual ones, operates as a
19340 real mail back end and is configurable in many ways.  All of this is
19341 explained in the sections below.
19343 @menu
19344 * The NNDiary Back End::        Basic setup and usage.
19345 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
19346 * Sending or Not Sending::      A final note on sending diary messages.
19347 @end menu
19350 @node The NNDiary Back End
19351 @subsection The NNDiary Back End
19352 @cindex nndiary
19353 @cindex the nndiary back end
19355 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
19356 Spool}).  Actually, it could appear as a mix of @code{nnml} and
19357 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
19358 the message storing scheme of @code{nndiary}: one file per message, one
19359 directory per group.
19361   Before anything, there is one requirement to be able to run
19362 @code{nndiary} properly: you @emph{must} use the group timestamp feature
19363 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
19364 Timestamp} to see how it's done.
19366 @menu
19367 * Diary Messages::              What makes a message valid for nndiary.
19368 * Running NNDiary::             NNDiary has two modes of operation.
19369 * Customizing NNDiary::         Bells and whistles.
19370 @end menu
19372 @node Diary Messages
19373 @subsubsection Diary Messages
19374 @cindex nndiary messages
19375 @cindex nndiary mails
19377 @code{nndiary} messages are just normal ones, except for the mandatory
19378 presence of 7 special headers.  These headers are of the form
19379 @code{X-Diary-<something>}, @code{<something>} being one of
19380 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
19381 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
19382 @code{dow} means ``Day of Week''.  These headers actually behave like
19383 crontab specifications and define the event date(s):
19385 @itemize @bullet
19386 @item
19387 For all headers except the @code{Time-Zone} one, a header value is
19388 either a star (meaning all possible values), or a list of fields
19389 (separated by a comma).
19390 @item
19391 A field is either an integer, or a range.
19392 @item
19393 A range is two integers separated by a dash.
19394 @item
19395 Possible integer values are 0--59 for @code{Minute}, 0--23 for
19396 @code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
19397 for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
19398 @item
19399 As a special case, a star in either @code{Dom} or @code{Dow} doesn't
19400 mean ``all possible values'', but ``use only the other field''.  Note
19401 that if both are star'ed, the use of either one gives the same result.
19402 @item
19403 The @code{Time-Zone} header is special in that it can only have one
19404 value (@code{GMT}, for instance).  A star doesn't mean ``all possible
19405 values'' (because it makes no sense), but ``the current local time
19406 zone''.  Most of the time, you'll be using a star here.  However, for a
19407 list of available time zone values, see the variable
19408 @code{nndiary-headers}.
19409 @end itemize
19411 As a concrete example, here are the diary headers to add to your message
19412 for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
19413 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
19414 what to do then):
19416 @example
19417 X-Diary-Minute: 0
19418 X-Diary-Hour: 12, 20-24
19419 X-Diary-Dom: 1
19420 X-Diary-Month: *
19421 X-Diary-Year: 1999-2010
19422 X-Diary-Dow: 1
19423 X-Diary-Time-Zone: *
19424 @end example
19426 @node Running NNDiary
19427 @subsubsection Running NNDiary
19428 @cindex running nndiary
19429 @cindex nndiary operation modes
19431 @code{nndiary} has two modes of operation: ``traditional'' (the default)
19432 and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
19433 mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
19434 from your primary mail back end to nndiary groups in order to handle them
19435 as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
19436 mail and handles it independently from your primary mail back end.
19438 One should note that Gnus is not inherently designed to allow several
19439 ``master'' mail back ends at the same time.  However, this does make
19440 sense with @code{nndiary}: you really want to send and receive diary
19441 messages to your diary groups directly.  So, @code{nndiary} supports
19442 being sort of a ``second primary mail back end'' (to my knowledge, it is
19443 the only back end offering this feature).  However, there is a limitation
19444 (which I hope to fix some day): respooling doesn't work in autonomous
19445 mode.
19447 In order to use @code{nndiary} in autonomous mode, you have several
19448 things to do:
19450 @itemize @bullet
19451 @item
19452 Allow @code{nndiary} to retrieve new mail by itself.  Put the following
19453 line in your @file{~/.gnus.el} file:
19455 @lisp
19456 (setq nndiary-get-new-mail t)
19457 @end lisp
19458 @item
19459 You must arrange for diary messages (those containing @code{X-Diary-*}
19460 headers) to be split in a private folder @emph{before} Gnus treat them.
19461 Again, this is needed because Gnus cannot (yet ?) properly handle
19462 multiple primary mail back ends.  Getting those messages from a separate
19463 source will compensate this misfeature to some extent.
19465 As an example, here's my procmailrc entry to store diary files in
19466 @file{~/.nndiary} (the default @code{nndiary} mail source file):
19468 @example
19469 :0 HD :
19470 * ^X-Diary
19471 .nndiary
19472 @end example
19473 @end itemize
19475 Once this is done, you might want to customize the following two options
19476 that affect the diary mail retrieval and splitting processes:
19478 @defvar nndiary-mail-sources
19479 This is the diary-specific replacement for the standard
19480 @code{mail-sources} variable.  It obeys the same syntax, and defaults to
19481 @code{(file :path "~/.nndiary")}.
19482 @end defvar
19484 @defvar nndiary-split-methods
19485 This is the diary-specific replacement for the standard
19486 @code{nnmail-split-methods} variable.  It obeys the same syntax.
19487 @end defvar
19489   Finally, you may add a permanent @code{nndiary} virtual server
19490 (something like @code{(nndiary "diary")} should do) to your
19491 @code{gnus-secondary-select-methods}.
19493   Hopefully, almost everything (see the TODO section in
19494 @file{nndiary.el}) will work as expected when you restart Gnus: in
19495 autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
19496 also get your new diary mails and split them according to your
19497 diary-specific rules, @kbd{F} will find your new diary groups etc.
19499 @node Customizing NNDiary
19500 @subsubsection Customizing NNDiary
19501 @cindex customizing nndiary
19502 @cindex nndiary customization
19504 Now that @code{nndiary} is up and running, it's time to customize it.
19505 The custom group is called @code{nndiary} (no, really ?!).  You should
19506 browse it to figure out which options you'd like to tweak.  The following
19507 two variables are probably the only ones you will want to change:
19509 @defvar nndiary-reminders
19510 This is the list of times when you want to be reminded of your
19511 appointments (e.g. 3 weeks before, then 2 days before, then 1 hour
19512 before and that's it).  Remember that ``being reminded'' means that the
19513 diary message will pop up as brand new and unread again when you get new
19514 mail.
19515 @end defvar
19517 @defvar nndiary-week-starts-on-monday
19518 Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
19519 default).
19520 @end defvar
19523 @node The Gnus Diary Library
19524 @subsection The Gnus Diary Library
19525 @cindex gnus-diary
19526 @cindex the gnus diary library
19528 Using @code{nndiary} manually (I mean, writing the headers by hand and
19529 so on) would be rather boring.  Fortunately, there is a library called
19530 @code{gnus-diary} written on top of @code{nndiary}, that does many
19531 useful things for you.
19533   In order to use it, add the following line to your @file{~/.gnus.el} file:
19535 @lisp
19536 (require 'gnus-diary)
19537 @end lisp
19539   Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
19540 (@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
19541 (sorry if you used them before).
19544 @menu
19545 * Diary Summary Line Format::           A nicer summary buffer line format.
19546 * Diary Articles Sorting::              A nicer way to sort messages.
19547 * Diary Headers Generation::            Not doing it manually.
19548 * Diary Group Parameters::              Not handling them manually.
19549 @end menu
19551 @node Diary Summary Line Format
19552 @subsubsection Diary Summary Line Format
19553 @cindex diary summary buffer line
19554 @cindex diary summary line format
19556 Displaying diary messages in standard summary line format (usually
19557 something like @samp{From Joe: Subject}) is pretty useless.  Most of
19558 the time, you're the one who wrote the message, and you mostly want to
19559 see the event's date.
19561   @code{gnus-diary} provides two supplemental user formats to be used in
19562 summary line formats.  @code{D} corresponds to a formatted time string
19563 for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
19564 while @code{d} corresponds to an approximative remaining time until the
19565 next occurrence of the event (e.g. ``in 6 months, 1 week'').
19567   For example, here's how Joe's birthday is displayed in my
19568 @code{nndiary+diary:birthdays} summary buffer (note that the message is
19569 expirable, but will never be deleted, as it specifies a periodic event):
19571 @example
19572    E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
19573 @end example
19575 In order to get something like the above, you would normally add the
19576 following line to your diary groups'parameters:
19578 @lisp
19579 (gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
19580 @end lisp
19582 However, @code{gnus-diary} does it automatically (@pxref{Diary Group
19583 Parameters}).  You can however customize the provided summary line format
19584 with the following user options:
19586 @defvar gnus-diary-summary-line-format
19587 Defines the summary line format used for diary groups (@pxref{Summary
19588 Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
19589 diary groups'parameters.
19590 @end defvar
19592 @defvar gnus-diary-time-format
19593 Defines the format to display dates in diary summary buffers.  This is
19594 used by the @code{D} user format.  See the docstring for details.
19595 @end defvar
19597 @defvar gnus-diary-delay-format-function
19598 Defines the format function to use for displaying delays (remaining
19599 times) in diary summary buffers.  This is used by the @code{d} user
19600 format.  There are currently built-in functions for English and French;
19601 you can also define your own.  See the docstring for details.
19602 @end defvar
19604 @node Diary Articles Sorting
19605 @subsubsection Diary Articles Sorting
19606 @cindex diary articles sorting
19607 @cindex diary summary lines sorting
19608 @findex gnus-summary-sort-by-schedule
19609 @findex gnus-thread-sort-by-schedule
19610 @findex gnus-article-sort-by-schedule
19612 @code{gnus-diary} provides new sorting functions (@pxref{Sorting the
19613 Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
19614 @code{gnus-thread-sort-by-schedule} and
19615 @code{gnus-article-sort-by-schedule}.  These functions let you organize
19616 your diary summary buffers from the closest event to the farthest one.
19618 @code{gnus-diary} automatically installs
19619 @code{gnus-summary-sort-by-schedule} as a menu item in the summary
19620 buffer's ``sort'' menu, and the two others as the primary (hence
19621 default) sorting functions in the group parameters (@pxref{Diary Group
19622 Parameters}).
19624 @node Diary Headers Generation
19625 @subsubsection Diary Headers Generation
19626 @cindex diary headers generation
19627 @findex gnus-diary-check-message
19629 @code{gnus-diary} provides a function called
19630 @code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
19631 headers.  This function ensures that the current message contains all the
19632 required diary headers, and prompts you for values or corrections if
19633 needed.
19635   This function is hooked into the @code{nndiary} back end, so that
19636 moving or copying an article to a diary group will trigger it
19637 automatically.  It is also bound to @kbd{C-c C-f d} in
19638 @code{message-mode} and @code{article-edit-mode} in order to ease the
19639 process of converting a usual mail to a diary one.
19641   This function takes a prefix argument which will force prompting of
19642 all diary headers, regardless of their presence or validity.  That way,
19643 you can very easily reschedule an already valid diary message, for
19644 instance.
19646 @node Diary Group Parameters
19647 @subsubsection Diary Group Parameters
19648 @cindex diary group parameters
19650 When you create a new diary group, or visit one, @code{gnus-diary}
19651 automatically checks your group parameters and if needed, sets the
19652 summary line format to the diary-specific value, installs the
19653 diary-specific sorting functions, and also adds the different
19654 @code{X-Diary-*} headers to the group's posting-style.  It is then easier
19655 to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
19656 on a diary group to prepare a message, these headers will be inserted
19657 automatically (although not filled with proper values yet).
19659 @node Sending or Not Sending
19660 @subsection Sending or Not Sending
19662 Well, assuming you've read all of the above, here are two final notes on
19663 mail sending with @code{nndiary}:
19665 @itemize @bullet
19666 @item
19667 @code{nndiary} is a @emph{real} mail back end.  You really send real diary
19668 messsages for real.  This means for instance that you can give
19669 appointments to anybody (provided they use Gnus and @code{nndiary}) by
19670 sending the diary message to them as well.
19671 @item
19672 However, since @code{nndiary} also has a @code{request-post} method, you
19673 can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
19674 message won't actually be sent; just stored locally in the group. This
19675 comes in very handy for private appointments.
19676 @end itemize
19678 @node Gnus Unplugged
19679 @section Gnus Unplugged
19680 @cindex offline
19681 @cindex unplugged
19682 @cindex agent
19683 @cindex Gnus agent
19684 @cindex Gnus unplugged
19686 In olden times (ca. February '88), people used to run their newsreaders
19687 on big machines with permanent connections to the net.  News transport
19688 was dealt with by news servers, and all the newsreaders had to do was to
19689 read news.  Believe it or not.
19691 Nowadays most people read news and mail at home, and use some sort of
19692 modem to connect to the net.  To avoid running up huge phone bills, it
19693 would be nice to have a way to slurp down all the news and mail, hang up
19694 the phone, read for several hours, and then upload any responses you
19695 have to make.  And then you repeat the procedure.
19697 Of course, you can use news servers for doing this as well.  I've used
19698 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
19699 for some years, but doing that's a bore.  Moving the news server
19700 functionality up to the newsreader makes sense if you're the only person
19701 reading news on a machine.
19703 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
19704 fact, you don't have to configure anything as the agent is now enabled
19705 by default (@pxref{Agent Variables, gnus-agent}).
19707 Of course, to use it as such, you have to learn a few new commands.
19709 @menu
19710 * Agent Basics::                How it all is supposed to work.
19711 * Agent Categories::            How to tell the Gnus Agent what to download.
19712 * Agent Commands::              New commands for all the buffers.
19713 * Agent Visuals::               Ways that the agent may effect your summary buffer.
19714 * Agent as Cache::              The Agent is a big cache too.
19715 * Agent Expiry::                How to make old articles go away.
19716 * Agent Regeneration::          How to recover from lost connections and other accidents.
19717 * Agent and flags::             How the Agent maintains flags.
19718 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
19719 * Outgoing Messages::           What happens when you post/mail something?
19720 * Agent Variables::             Customizing is fun.
19721 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
19722 * Batching Agents::             How to fetch news from a @code{cron} job.
19723 * Agent Caveats::               What you think it'll do and what it does.
19724 @end menu
19727 @node Agent Basics
19728 @subsection Agent Basics
19730 First, let's get some terminology out of the way.
19732 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
19733 connection to the net (and notified the Agent that this is the case).
19734 When the connection to the net is up again (and Gnus knows this), the
19735 Agent is @dfn{plugged}.
19737 The @dfn{local} machine is the one you're running on, and which isn't
19738 connected to the net continuously.
19740 @dfn{Downloading} means fetching things from the net to your local
19741 machine.  @dfn{Uploading} is doing the opposite.
19743 You know that Gnus gives you all the opportunity you'd ever want for
19744 shooting yourself in the foot.  Some people call it flexibility.  Gnus
19745 is also customizable to a great extent, which means that the user has a
19746 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
19747 you in your foot, but with Gnus, you have a choice!
19749 Gnus is never really in plugged or unplugged state.  Rather, it applies
19750 that state to each server individually.  This means that some servers
19751 can be plugged while others can be unplugged.  Additionally, some
19752 servers can be ignored by the Agent altogether (which means that
19753 they're kinda like plugged always).
19755 So when you unplug the Agent and then wonder why is Gnus opening a
19756 connection to the Net, the next step to do is to look whether all
19757 servers are agentized.  If there is an unagentized server, you found
19758 the culprit.
19760 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
19761 reachable.  When Gnus notices this, it asks you whether you want the
19762 server to be switched to offline state.  If you say yes, then the
19763 server will behave somewhat as if it was unplugged, except that Gnus
19764 will ask you whether you want to switch it back online again.
19766 Let's take a typical Gnus session using the Agent.
19768 @itemize @bullet
19770 @item
19771 @findex gnus-unplugged
19772 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
19773 Agent in a disconnected state.  You can read all the news that you have
19774 already fetched while in this mode.
19776 @item
19777 You then decide to see whether any new news has arrived.  You connect
19778 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
19779 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
19780 as usual.  To check for new mail in unplugged mode (@pxref{Mail
19781 Source Specifiers}).
19783 @item
19784 You can then read the new news immediately, or you can download the
19785 news onto your local machine.  If you want to do the latter, you press
19786 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
19787 all the eligible articles in all the groups.  (To let Gnus know which
19788 articles you want to download, @pxref{Agent Categories}).
19790 @item
19791 After fetching the articles, you press @kbd{J j} to make Gnus become
19792 unplugged again, and you shut down the PPP thing (or whatever).  And
19793 then you read the news offline.
19795 @item
19796 And then you go to step 2.
19797 @end itemize
19799 Here are some things you should do the first time (or so) that you use
19800 the Agent.
19802 @itemize @bullet
19804 @item
19805 Decide which servers should be covered by the Agent.  If you have a mail
19806 back end, it would probably be nonsensical to have it covered by the
19807 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
19808 @kbd{J a} on the server (or servers) that you wish to have covered by the
19809 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
19810 added servers you do not wish to have covered by the Agent.  By default,
19811 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
19812 @code{gnus-secondary-select-methods} are agentized.
19814 @item
19815 Decide on download policy.  It's fairly simple once you decide whether
19816 you are going to use agent categories, topic parameters, and/or group
19817 parameters to implement your policy.  If you're new to gnus, it
19818 is probably best to start with a category, @xref{Agent Categories}.
19820 Both topic parameters (@pxref{Topic Parameters}) and agent categories
19821 (@pxref{Agent Categories}) provide for setting a policy that applies
19822 to multiple groups.  Which you use is entirely up to you.  Topic
19823 parameters do override categories so, if you mix the two, you'll have
19824 to take that into account.  If you have a few groups that deviate from
19825 your policy, you can use group parameters (@pxref{Group Parameters}) to
19826 configure them.
19828 @item
19829 Uhm@dots{} that's it.
19830 @end itemize
19833 @node Agent Categories
19834 @subsection Agent Categories
19836 One of the main reasons to integrate the news transport layer into the
19837 newsreader is to allow greater control over what articles to download.
19838 There's not much point in downloading huge amounts of articles, just to
19839 find out that you're not interested in reading any of them.  It's better
19840 to be somewhat more conservative in choosing what to download, and then
19841 mark the articles for downloading manually if it should turn out that
19842 you're interested in the articles anyway.
19844 One of the more effective methods for controlling what is to be
19845 downloaded is to create a @dfn{category} and then assign some (or all)
19846 groups to this category.  Groups that do not belong in any other
19847 category belong to the @code{default} category.  Gnus has its own
19848 buffer for creating and managing categories.
19850 If you prefer, you can also use group parameters (@pxref{Group
19851 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
19852 alternative approach to controlling the agent.  The only real
19853 difference is that categories are specific to the agent (so there is
19854 less to learn) while group and topic parameters include the kitchen
19855 sink.
19857 Since you can set agent parameters in several different places we have
19858 a rule to decide which source to believe.  This rule specifies that
19859 the parameter sources are checked in the following order: group
19860 parameters, topic parameters, agent category, and finally customizable
19861 variables.  So you can mix all of these sources to produce a wide range
19862 of behavior, just don't blame me if you don't remember where you put
19863 your settings.
19865 @menu
19866 * Category Syntax::             What a category looks like.
19867 * Category Buffer::             A buffer for maintaining categories.
19868 * Category Variables::          Customize'r'Us.
19869 @end menu
19872 @node Category Syntax
19873 @subsubsection Category Syntax
19875 A category consists of a name, the list of groups belonging to the
19876 category, and a number of optional parameters that override the
19877 customizable variables.  The complete list of agent parameters are
19878 listed below.
19880 @cindex Agent Parameters
19881 @table @code
19882 @item agent-groups
19883 The list of groups that are in this category.
19885 @item agent-predicate
19886 A predicate which (generally) gives a rough outline of which articles
19887 are eligible for downloading; and
19889 @item agent-score
19890 a score rule which (generally) gives you a finer granularity when
19891 deciding what articles to download.  (Note that this @dfn{download
19892 score} is not necessarily related to normal scores.)
19894 @item agent-enable-expiration
19895 a boolean indicating whether the agent should expire old articles in
19896 this group.  Most groups should be expired to conserve disk space.  In
19897 fact, its probably safe to say that the gnus.* hierarchy contains the
19898 only groups that should not be expired.
19900 @item agent-days-until-old
19901 an integer indicating the number of days that the agent should wait
19902 before deciding that a read article is safe to expire.
19904 @item agent-low-score
19905 an integer that overrides the value of @code{gnus-agent-low-score}.
19907 @item agent-high-score
19908 an integer that overrides the value of @code{gnus-agent-high-score}.
19910 @item agent-short-article
19911 an integer that overrides the value of
19912 @code{gnus-agent-short-article}.
19914 @item agent-long-article
19915 an integer that overrides the value of @code{gnus-agent-long-article}.
19917 @item agent-enable-undownloaded-faces
19918 a symbol indicating whether the summary buffer should display
19919 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
19920 faces.  Any symbol other than @code{nil} will enable the use of
19921 undownloaded faces.
19922 @end table
19924 The name of a category can not be changed once the category has been
19925 created.
19927 Each category maintains a list of groups that are exclusive members of
19928 that category.  The exclusivity rule is automatically enforced, add a
19929 group to a new category and it is automatically removed from its old
19930 category.
19932 A predicate in its simplest form can be a single predicate such as
19933 @code{true} or @code{false}.  These two will download every available
19934 article or nothing respectively.  In the case of these two special
19935 predicates an additional score rule is superfluous.
19937 Predicates of @code{high} or @code{low} download articles in respect of
19938 their scores in relationship to @code{gnus-agent-high-score} and
19939 @code{gnus-agent-low-score} as described below.
19941 To gain even finer control of what is to be regarded eligible for
19942 download a predicate can consist of a number of predicates with logical
19943 operators sprinkled in between.
19945 Perhaps some examples are in order.
19947 Here's a simple predicate.  (It's the default predicate, in fact, used
19948 for all groups that don't belong to any other category.)
19950 @lisp
19951 short
19952 @end lisp
19954 Quite simple, eh?  This predicate is true if and only if the article is
19955 short (for some value of ``short'').
19957 Here's a more complex predicate:
19959 @lisp
19960 (or high
19961     (and
19962      (not low)
19963      (not long)))
19964 @end lisp
19966 This means that an article should be downloaded if it has a high score,
19967 or if the score is not low and the article is not long.  You get the
19968 drift.
19970 The available logical operators are @code{or}, @code{and} and
19971 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
19972 @samp{|}, @code{&} and @code{!} instead.)
19974 The following predicates are pre-defined, but if none of these fit what
19975 you want to do, you can write your own.
19977 When evaluating each of these predicates, the named constant will be
19978 bound to the value determined by calling
19979 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
19980 example, gnus-agent-short-article will be bound to
19981 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
19982 means that you can specify a predicate in your category then tune that
19983 predicate to individual groups.
19985 @table @code
19986 @item short
19987 True if the article is shorter than @code{gnus-agent-short-article}
19988 lines; default 100.
19990 @item long
19991 True if the article is longer than @code{gnus-agent-long-article}
19992 lines; default 200.
19994 @item low
19995 True if the article has a download score less than
19996 @code{gnus-agent-low-score}; default 0.
19998 @item high
19999 True if the article has a download score greater than
20000 @code{gnus-agent-high-score}; default 0.
20002 @item spam
20003 True if the Gnus Agent guesses that the article is spam.  The
20004 heuristics may change over time, but at present it just computes a
20005 checksum and sees whether articles match.
20007 @item true
20008 Always true.
20010 @item false
20011 Always false.
20012 @end table
20014 If you want to create your own predicate function, here's what you have
20015 to know:  The functions are called with no parameters, but the
20016 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
20017 useful values.
20019 For example, you could decide that you don't want to download articles
20020 that were posted more than a certain number of days ago (e.g. posted
20021 more than @code{gnus-agent-expire-days} ago) you might write a function
20022 something along the lines of the following:
20024 @lisp
20025 (defun my-article-old-p ()
20026   "Say whether an article is old."
20027   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
20028      (- (time-to-days (current-time)) gnus-agent-expire-days)))
20029 @end lisp
20031 with the predicate then defined as:
20033 @lisp
20034 (not my-article-old-p)
20035 @end lisp
20037 or you could append your predicate to the predefined
20038 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
20039 wherever.
20041 @lisp
20042 (require 'gnus-agent)
20043 (setq  gnus-category-predicate-alist
20044   (append gnus-category-predicate-alist
20045          '((old . my-article-old-p))))
20046 @end lisp
20048 and simply specify your predicate as:
20050 @lisp
20051 (not old)
20052 @end lisp
20054 If/when using something like the above, be aware that there are many
20055 misconfigured systems/mailers out there and so an article's date is not
20056 always a reliable indication of when it was posted.  Hell, some people
20057 just don't give a damn.
20059 The above predicates apply to @emph{all} the groups which belong to the
20060 category.  However, if you wish to have a specific predicate for an
20061 individual group within a category, or you're just too lazy to set up a
20062 new category, you can enter a group's individual predicate in its group
20063 parameters like so:
20065 @lisp
20066 (agent-predicate . short)
20067 @end lisp
20069 This is the group/topic parameter equivalent of the agent category default.
20070 Note that when specifying a single word predicate like this, the
20071 @code{agent-predicate} specification must be in dotted pair notation.
20073 The equivalent of the longer example from above would be:
20075 @lisp
20076 (agent-predicate or high (and (not low) (not long)))
20077 @end lisp
20079 The outer parenthesis required in the category specification are not
20080 entered here as, not being in dotted pair notation, the value of the
20081 predicate is assumed to be a list.
20084 Now, the syntax of the download score is the same as the syntax of
20085 normal score files, except that all elements that require actually
20086 seeing the article itself are verboten.  This means that only the
20087 following headers can be scored on: @code{Subject}, @code{From},
20088 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
20089 @code{Lines}, and @code{Xref}.
20091 As with predicates, the specification of the @code{download score rule}
20092 to use in respect of a group can be in either the category definition if
20093 it's to be applicable to all groups in therein, or a group's parameters
20094 if it's to be specific to that group.
20096 In both of these places the @code{download score rule} can take one of
20097 three forms:
20099 @enumerate
20100 @item
20101 Score rule
20103 This has the same syntax as a normal Gnus score file except only a
20104 subset of scoring keywords are available as mentioned above.
20106 example:
20108 @itemize @bullet
20109 @item
20110 Category specification
20112 @lisp
20113 (("from"
20114        ("Lars Ingebrigtsen" 1000000 nil s))
20115 ("lines"
20116        (500 -100 nil <)))
20117 @end lisp
20119 @item
20120 Group/Topic Parameter specification
20122 @lisp
20123 (agent-score ("from"
20124                    ("Lars Ingebrigtsen" 1000000 nil s))
20125              ("lines"
20126                    (500 -100 nil <)))
20127 @end lisp
20129 Again, note the omission of the outermost parenthesis here.
20130 @end itemize
20132 @item
20133 Agent score file
20135 These score files must @emph{only} contain the permitted scoring
20136 keywords stated above.
20138 example:
20140 @itemize @bullet
20141 @item
20142 Category specification
20144 @lisp
20145 ("~/News/agent.SCORE")
20146 @end lisp
20148 or perhaps
20150 @lisp
20151 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
20152 @end lisp
20154 @item
20155 Group Parameter specification
20157 @lisp
20158 (agent-score "~/News/agent.SCORE")
20159 @end lisp
20161 Additional score files can be specified as above.  Need I say anything
20162 about parenthesis?
20163 @end itemize
20165 @item
20166 Use @code{normal} score files
20168 If you don't want to maintain two sets of scoring rules for a group, and
20169 your desired @code{downloading} criteria for a group are the same as your
20170 @code{reading} criteria then you can tell the agent to refer to your
20171 @code{normal} score files when deciding what to download.
20173 These directives in either the category definition or a group's
20174 parameters will cause the agent to read in all the applicable score
20175 files for a group, @emph{filtering out} those sections that do not
20176 relate to one of the permitted subset of scoring keywords.
20178 @itemize @bullet
20179 @item
20180 Category Specification
20182 @lisp
20183 file
20184 @end lisp
20186 @item
20187 Group Parameter specification
20189 @lisp
20190 (agent-score . file)
20191 @end lisp
20192 @end itemize
20193 @end enumerate
20195 @node Category Buffer
20196 @subsubsection Category Buffer
20198 You'd normally do all category maintenance from the category buffer.
20199 When you enter it for the first time (with the @kbd{J c} command from
20200 the group buffer), you'll only see the @code{default} category.
20202 The following commands are available in this buffer:
20204 @table @kbd
20205 @item q
20206 @kindex q (Category)
20207 @findex gnus-category-exit
20208 Return to the group buffer (@code{gnus-category-exit}).
20210 @item e
20211 @kindex e (Category)
20212 @findex gnus-category-customize-category
20213 Use a customization buffer to set all of the selected category's
20214 parameters at one time (@code{gnus-category-customize-category}).
20216 @item k
20217 @kindex k (Category)
20218 @findex gnus-category-kill
20219 Kill the current category (@code{gnus-category-kill}).
20221 @item c
20222 @kindex c (Category)
20223 @findex gnus-category-copy
20224 Copy the current category (@code{gnus-category-copy}).
20226 @item a
20227 @kindex a (Category)
20228 @findex gnus-category-add
20229 Add a new category (@code{gnus-category-add}).
20231 @item p
20232 @kindex p (Category)
20233 @findex gnus-category-edit-predicate
20234 Edit the predicate of the current category
20235 (@code{gnus-category-edit-predicate}).
20237 @item g
20238 @kindex g (Category)
20239 @findex gnus-category-edit-groups
20240 Edit the list of groups belonging to the current category
20241 (@code{gnus-category-edit-groups}).
20243 @item s
20244 @kindex s (Category)
20245 @findex gnus-category-edit-score
20246 Edit the download score rule of the current category
20247 (@code{gnus-category-edit-score}).
20249 @item l
20250 @kindex l (Category)
20251 @findex gnus-category-list
20252 List all the categories (@code{gnus-category-list}).
20253 @end table
20256 @node Category Variables
20257 @subsubsection Category Variables
20259 @table @code
20260 @item gnus-category-mode-hook
20261 @vindex gnus-category-mode-hook
20262 Hook run in category buffers.
20264 @item gnus-category-line-format
20265 @vindex gnus-category-line-format
20266 Format of the lines in the category buffer (@pxref{Formatting
20267 Variables}).  Valid elements are:
20269 @table @samp
20270 @item c
20271 The name of the category.
20273 @item g
20274 The number of groups in the category.
20275 @end table
20277 @item gnus-category-mode-line-format
20278 @vindex gnus-category-mode-line-format
20279 Format of the category mode line (@pxref{Mode Line Formatting}).
20281 @item gnus-agent-short-article
20282 @vindex gnus-agent-short-article
20283 Articles that have fewer lines than this are short.  Default 100.
20285 @item gnus-agent-long-article
20286 @vindex gnus-agent-long-article
20287 Articles that have more lines than this are long.  Default 200.
20289 @item gnus-agent-low-score
20290 @vindex gnus-agent-low-score
20291 Articles that have a score lower than this have a low score.  Default
20294 @item gnus-agent-high-score
20295 @vindex gnus-agent-high-score
20296 Articles that have a score higher than this have a high score.  Default
20299 @item gnus-agent-expire-days
20300 @vindex gnus-agent-expire-days
20301 The number of days that a @samp{read} article must stay in the agent's
20302 local disk before becoming eligible for expiration (While the name is
20303 the same, this doesn't mean expiring the article on the server.  It
20304 just means deleting the local copy of the article).  What is also
20305 important to understand is that the counter starts with the time the
20306 article was written to the local disk and not the time the article was
20307 read.
20308 Default 7.
20310 @item gnus-agent-enable-expiration
20311 @vindex gnus-agent-enable-expiration
20312 Determines whether articles in a group are, by default, expired or
20313 retained indefinitely.  The default is @code{ENABLE} which means that
20314 you'll have to disable expiration when desired.  On the other hand,
20315 you could set this to @code{DISABLE}.  In that case, you would then
20316 have to enable expiration in selected groups.
20318 @end table
20321 @node Agent Commands
20322 @subsection Agent Commands
20323 @findex gnus-agent-toggle-plugged
20324 @kindex J j (Agent)
20326 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
20327 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
20328 toggles the plugged/unplugged state of the Gnus Agent.
20331 @menu
20332 * Group Agent Commands::        Configure groups and fetch their contents.
20333 * Summary Agent Commands::      Manually select then fetch specific articles.
20334 * Server Agent Commands::       Select the servers that are supported by the agent.
20335 @end menu
20340 @node Group Agent Commands
20341 @subsubsection Group Agent Commands
20343 @table @kbd
20344 @item J u
20345 @kindex J u (Agent Group)
20346 @findex gnus-agent-fetch-groups
20347 Fetch all eligible articles in the current group
20348 (@code{gnus-agent-fetch-groups}).
20350 @item J c
20351 @kindex J c (Agent Group)
20352 @findex gnus-enter-category-buffer
20353 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
20355 @item J s
20356 @kindex J s (Agent Group)
20357 @findex gnus-agent-fetch-session
20358 Fetch all eligible articles in all groups
20359 (@code{gnus-agent-fetch-session}).
20361 @item J S
20362 @kindex J S (Agent Group)
20363 @findex gnus-group-send-queue
20364 Send all sendable messages in the queue group
20365 (@code{gnus-group-send-queue}).  @xref{Drafts}.
20367 @item J a
20368 @kindex J a (Agent Group)
20369 @findex gnus-agent-add-group
20370 Add the current group to an Agent category
20371 (@code{gnus-agent-add-group}).  This command understands the
20372 process/prefix convention (@pxref{Process/Prefix}).
20374 @item J r
20375 @kindex J r (Agent Group)
20376 @findex gnus-agent-remove-group
20377 Remove the current group from its category, if any
20378 (@code{gnus-agent-remove-group}).  This command understands the
20379 process/prefix convention (@pxref{Process/Prefix}).
20381 @item J Y
20382 @kindex J Y (Agent Group)
20383 @findex gnus-agent-synchronize-flags
20384 Synchronize flags changed while unplugged with remote server, if any.
20387 @end table
20390 @node Summary Agent Commands
20391 @subsubsection Summary Agent Commands
20393 @table @kbd
20394 @item J #
20395 @kindex J # (Agent Summary)
20396 @findex gnus-agent-mark-article
20397 Mark the article for downloading (@code{gnus-agent-mark-article}).
20399 @item J M-#
20400 @kindex J M-# (Agent Summary)
20401 @findex gnus-agent-unmark-article
20402 Remove the downloading mark from the article
20403 (@code{gnus-agent-unmark-article}).
20405 @cindex %
20406 @item @@
20407 @kindex @@ (Agent Summary)
20408 @findex gnus-agent-toggle-mark
20409 Toggle whether to download the article
20410 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
20411 default.
20413 @item J c
20414 @kindex J c (Agent Summary)
20415 @findex gnus-agent-catchup
20416 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
20418 @item J S
20419 @kindex J S (Agent Summary)
20420 @findex gnus-agent-fetch-group
20421 Download all eligible (@pxref{Agent Categories}) articles in this group.
20422 (@code{gnus-agent-fetch-group}).
20424 @item J s
20425 @kindex J s (Agent Summary)
20426 @findex gnus-agent-summary-fetch-series
20427 Download all processable articles in this group.
20428 (@code{gnus-agent-summary-fetch-series}).
20430 @item J u
20431 @kindex J u (Agent Summary)
20432 @findex gnus-agent-summary-fetch-group
20433 Download all downloadable articles in the current group
20434 (@code{gnus-agent-summary-fetch-group}).
20436 @end table
20439 @node Server Agent Commands
20440 @subsubsection Server Agent Commands
20442 @table @kbd
20443 @item J a
20444 @kindex J a (Agent Server)
20445 @findex gnus-agent-add-server
20446 Add the current server to the list of servers covered by the Gnus Agent
20447 (@code{gnus-agent-add-server}).
20449 @item J r
20450 @kindex J r (Agent Server)
20451 @findex gnus-agent-remove-server
20452 Remove the current server from the list of servers covered by the Gnus
20453 Agent (@code{gnus-agent-remove-server}).
20455 @end table
20458 @node Agent Visuals
20459 @subsection Agent Visuals
20461 If you open a summary while unplugged and, Gnus knows from the group's
20462 active range that there are more articles than the headers currently
20463 stored in the Agent, you may see some articles whose subject looks
20464 something like @samp{[Undownloaded article #####]}.  These are
20465 placeholders for the missing headers.  Aside from setting a mark,
20466 there is not much that can be done with one of these placeholders.
20467 When Gnus finally gets a chance to fetch the group's headers, the
20468 placeholders will automatically be replaced by the actual headers.
20469 You can configure the summary buffer's maneuvering to skip over the
20470 placeholders if you care (See @code{gnus-auto-goto-ignores}).
20472 While it may be obvious to all, the only headers and articles
20473 available while unplugged are those headers and articles that were
20474 fetched into the Agent while previously plugged.  To put it another
20475 way, ``If you forget to fetch something while plugged, you might have a
20476 less than satisfying unplugged session''.  For this reason, the Agent
20477 adds two visual effects to your summary buffer.  These effects display
20478 the download status of each article so that you always know which
20479 articles will be available when unplugged.
20481 The first visual effect is the @samp{%O} spec.  If you customize
20482 @code{gnus-summary-line-format} to include this specifier, you will add
20483 a single character field that indicates an article's download status.
20484 Articles that have been fetched into either the Agent or the Cache,
20485 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
20486 other articles will display @code{gnus-undownloaded-mark} (defaults to
20487 @samp{-}).  If you open a group that has not been agentized, a space
20488 (@samp{ }) will be displayed.
20490 The second visual effect are the undownloaded faces.  The faces, there
20491 are three indicating the article's score (low, normal, high), seem to
20492 result in a love/hate response from many Gnus users.  The problem is
20493 that the face selection is controlled by a list of condition tests and
20494 face names (See @code{gnus-summary-highlight}).  Each condition is
20495 tested in the order in which it appears in the list so early
20496 conditions have precedence over later conditions.  All of this means
20497 that, if you tick an undownloaded article, the article will continue
20498 to be displayed in the undownloaded face rather than the ticked face.
20500 If you use the Agent as a cache (to avoid downloading the same article
20501 each time you visit it or to minimize your connection time), the
20502 undownloaded face will probably seem like a good idea.  The reason
20503 being that you do all of our work (marking, reading, deleting) with
20504 downloaded articles so the normal faces always appear.  For those
20505 users using the agent to improve online performance by caching the NOV
20506 database (most users since 5.10.2), the undownloaded faces may appear
20507 to be an absolutely horrible idea.  The issue being that, since none
20508 of their articles have been fetched into the Agent, all of the
20509 normal faces will be obscured by the undownloaded faces.
20511 If you would like to use the undownloaded faces, you must enable the
20512 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
20513 group parameter to @code{t}.  This parameter, like all other agent
20514 parameters, may be set on an Agent Category (@pxref{Agent Categories}),
20515 a Group Topic (@pxref{Topic Parameters}), or an individual group
20516 (@pxref{Group Parameters}).
20518 The one problem common to all users using the agent is how quickly it
20519 can consume disk space.  If you using the agent on many groups, it is
20520 even more difficult to effectively recover disk space.  One solution
20521 is the @samp{%F} format available in @code{gnus-group-line-format}.
20522 This format will display the actual disk space used by articles
20523 fetched into both the agent and cache.  By knowing which groups use
20524 the most space, users know where to focus their efforts when ``agent
20525 expiring'' articles.
20527 @node Agent as Cache
20528 @subsection Agent as Cache
20530 When Gnus is plugged, it is not efficient to download headers or
20531 articles from the server again, if they are already stored in the
20532 Agent.  So, Gnus normally only downloads headers once, and stores them
20533 in the Agent.  These headers are later used when generating the summary
20534 buffer, regardless of whether you are plugged or unplugged.  Articles
20535 are not cached in the Agent by default though (that would potentially
20536 consume lots of disk space), but if you have already downloaded an
20537 article into the Agent, Gnus will not download the article from the
20538 server again but use the locally stored copy instead.
20540 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
20541 @pxref{Agent Variables}) to always download headers and articles while
20542 plugged.  Gnus will almost certainly be slower, but it will be kept
20543 synchronized with the server.  That last point probably won't make any
20544 sense if you are using a nntp or nnimap back end.
20546 @node Agent Expiry
20547 @subsection Agent Expiry
20549 @vindex gnus-agent-expire-days
20550 @findex gnus-agent-expire
20551 @kindex M-x gnus-agent-expire
20552 @kindex M-x gnus-agent-expire-group
20553 @findex gnus-agent-expire-group
20554 @cindex agent expiry
20555 @cindex Gnus agent expiry
20556 @cindex expiry, in Gnus agent
20558 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
20559 least it doesn't handle it like other back ends.  Instead, there are
20560 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
20561 commands that will expire all read articles that are older than
20562 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
20563 that you're running out of space.  Neither are particularly fast or
20564 efficient, and it's not a particularly good idea to interrupt them (with
20565 @kbd{C-g} or anything else) once you've started one of them.
20567 Note that other functions, e.g. @code{gnus-request-expire-articles},
20568 might run @code{gnus-agent-expire} for you to keep the agent
20569 synchronized with the group.
20571 The agent parameter @code{agent-enable-expiration} may be used to
20572 prevent expiration in selected groups.
20574 @vindex gnus-agent-expire-all
20575 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
20576 expiration commands will expire all articles---unread, read, ticked
20577 and dormant.  If @code{nil} (which is the default), only read articles
20578 are eligible for expiry, and unread, ticked and dormant articles will
20579 be kept indefinitely.
20581 If you find that some articles eligible for expiry are never expired,
20582 perhaps some Gnus Agent files are corrupted.  There's are special
20583 commands, @code{gnus-agent-regenerate} and
20584 @code{gnus-agent-regenerate-group}, to fix possible problems.
20586 @node Agent Regeneration
20587 @subsection Agent Regeneration
20589 @cindex agent regeneration
20590 @cindex Gnus agent regeneration
20591 @cindex regeneration
20593 The local data structures used by @code{nnagent} may become corrupted
20594 due to certain exceptional conditions.  When this happens,
20595 @code{nnagent} functionality may degrade or even fail.  The solution
20596 to this problem is to repair the local data structures by removing all
20597 internal inconsistencies.
20599 For example, if your connection to your server is lost while
20600 downloaded articles into the agent, the local data structures will not
20601 know about articles successfully downloaded prior to the connection
20602 failure.  Running @code{gnus-agent-regenerate} or
20603 @code{gnus-agent-regenerate-group} will update the data structures
20604 such that you don't need to download these articles a second time.
20606 @findex gnus-agent-regenerate
20607 @kindex M-x gnus-agent-regenerate
20608 The command @code{gnus-agent-regenerate} will perform
20609 @code{gnus-agent-regenerate-group} on every agentized group.  While
20610 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
20611 recommended that you first close all summary buffers.
20613 @findex gnus-agent-regenerate-group
20614 @kindex M-x gnus-agent-regenerate-group
20615 The command @code{gnus-agent-regenerate-group} uses the local copies
20616 of individual articles to repair the local @acronym{NOV}(header) database.  It
20617 then updates the internal data structures that document which articles
20618 are stored locally.  An optional argument will mark articles in the
20619 agent as unread.
20621 @node Agent and flags
20622 @subsection Agent and flags
20624 The Agent works with any Gnus back end including those, such as
20625 nnimap, that store flags (read, ticked, etc) on the server.  Sadly,
20626 the Agent does not actually know which backends keep their flags in
20627 the backend server rather than in @file{.newsrc}.  This means that the
20628 Agent, while unplugged or disconnected, will always record all changes
20629 to the flags in its own files.
20631 When you plug back in, Gnus will then check to see if you have any
20632 changed any flags and ask if you wish to synchronize these with the
20633 server.  This behavior is customizable by @code{gnus-agent-synchronize-flags}.
20635 @vindex gnus-agent-synchronize-flags
20636 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20637 never automatically synchronize flags.  If it is @code{ask}, which is
20638 the default, the Agent will check if you made any changes and if so
20639 ask if you wish to synchronize these when you re-connect.  If it has
20640 any other value, all flags will be synchronized automatically.
20642 If you do not wish to synchronize flags automatically when you
20643 re-connect, you can do it manually with the
20644 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
20645 in the group buffer.
20647 Technical note: the synchronization algorithm does not work by ``pushing''
20648 all local flags to the server, but rather by incrementally updated the
20649 server view of flags by changing only those flags that were changed by
20650 the user.  Thus, if you set one flag on an article, quit the group then
20651 re-select the group and remove the flag; the flag will be set and
20652 removed from the server when you ``synchronize''.  The queued flag
20653 operations can be found in the per-server @code{flags} file in the Agent
20654 directory.  It's emptied when you synchronize flags.
20656 @node Agent and IMAP
20657 @subsection Agent and IMAP
20659 The Agent works with any Gnus back end, including nnimap.  However,
20660 since there are some conceptual differences between @acronym{NNTP} and
20661 @acronym{IMAP}, this section (should) provide you with some information to
20662 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
20664 Some things are currently not implemented in the Agent that you'd might
20665 expect from a disconnected @acronym{IMAP} client, including:
20667 @itemize @bullet
20669 @item
20670 Copying/moving articles into nnimap groups when unplugged.
20672 @item
20673 Creating/deleting nnimap groups when unplugged.
20675 @end itemize
20677 @node Outgoing Messages
20678 @subsection Outgoing Messages
20680 By default, when Gnus is unplugged, all outgoing messages (both mail
20681 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
20682 You can view them there after posting, and edit them at will.
20684 You can control the circumstances under which outgoing mail is queued
20685 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
20686 news is always queued when Gnus is unplugged, and never otherwise.
20688 You can send the messages either from the draft group with the special
20689 commands available there, or you can use the @kbd{J S} command in the
20690 group buffer to send all the sendable messages in the draft group.
20691 Posting news will only work when Gnus is plugged, but you can send
20692 mail at any time.
20694 If sending mail while unplugged does not work for you and you worry
20695 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
20696 ask you to confirm your action (see
20697 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
20699 @node Agent Variables
20700 @subsection Agent Variables
20702 @table @code
20703 @item gnus-agent
20704 @vindex gnus-agent
20705 Is the agent enabled?  The default is @code{t}.  When first enabled,
20706 the agent will use @code{gnus-agent-auto-agentize-methods} to
20707 automatically mark some back ends as agentized.  You may change which
20708 back ends are agentized using the agent commands in the server buffer.
20710 To enter the server buffer, use the @kbd{^}
20711 (@code{gnus-group-enter-server-mode}) command in the group buffer.
20714 @item gnus-agent-directory
20715 @vindex gnus-agent-directory
20716 Where the Gnus Agent will store its files.  The default is
20717 @file{~/News/agent/}.
20719 @item gnus-agent-handle-level
20720 @vindex gnus-agent-handle-level
20721 Groups on levels (@pxref{Group Levels}) higher than this variable will
20722 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
20723 which means that only subscribed group will be considered by the Agent
20724 by default.
20726 @item gnus-agent-plugged-hook
20727 @vindex gnus-agent-plugged-hook
20728 Hook run when connecting to the network.
20730 @item gnus-agent-unplugged-hook
20731 @vindex gnus-agent-unplugged-hook
20732 Hook run when disconnecting from the network.
20734 @item gnus-agent-fetched-hook
20735 @vindex gnus-agent-fetched-hook
20736 Hook run when finished fetching articles.
20738 @item gnus-agent-cache
20739 @vindex gnus-agent-cache
20740 Variable to control whether use the locally stored @acronym{NOV} and
20741 articles when plugged, e.g. essentially using the Agent as a cache.
20742 The default is non-@code{nil}, which means to use the Agent as a cache.
20744 @item gnus-agent-go-online
20745 @vindex gnus-agent-go-online
20746 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
20747 automatically switch offline servers into online status.  If it is
20748 @code{ask}, the default, the Agent will ask if you wish to switch
20749 offline servers into online status when you re-connect.  If it has any
20750 other value, all offline servers will be automatically switched into
20751 online status.
20753 @item gnus-agent-mark-unread-after-downloaded
20754 @vindex gnus-agent-mark-unread-after-downloaded
20755 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
20756 mark articles as unread after downloading.  This is usually a safe
20757 thing to do as the newly downloaded article has obviously not been
20758 read.  The default is @code{t}.
20760 @item gnus-agent-synchronize-flags
20761 @vindex gnus-agent-synchronize-flags
20762 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20763 never automatically synchronize flags.  If it is @code{ask}, which is
20764 the default, the Agent will check if you made any changes and if so
20765 ask if you wish to synchronize these when you re-connect.  If it has
20766 any other value, all flags will be synchronized automatically.
20768 @item gnus-agent-consider-all-articles
20769 @vindex gnus-agent-consider-all-articles
20770 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
20771 agent will let the agent predicate decide whether articles need to be
20772 downloaded or not, for all articles.  When @code{nil}, the default,
20773 the agent will only let the predicate decide whether unread articles
20774 are downloaded or not.  If you enable this, you may also want to look
20775 into the agent expiry settings (@pxref{Category Variables}), so that
20776 the agent doesn't download articles which the agent will later expire,
20777 over and over again.
20779 @item gnus-agent-max-fetch-size
20780 @vindex gnus-agent-max-fetch-size
20781 The agent fetches articles into a temporary buffer prior to parsing
20782 them into individual files.  To avoid exceeding the max. buffer size,
20783 the agent alternates between fetching and parsing until all articles
20784 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
20785 limit to control how often the cycling occurs.  A large value improves
20786 performance.  A small value minimizes the time lost should the
20787 connection be lost while fetching (You may need to run
20788 @code{gnus-agent-regenerate-group} to update the group's state.
20789 However, all articles parsed prior to loosing the connection will be
20790 available while unplugged).  The default is 10M so it is unusual to
20791 see any cycling.
20793 @item gnus-server-unopen-status
20794 @vindex gnus-server-unopen-status
20795 Perhaps not an Agent variable, but closely related to the Agent, this
20796 variable says what will happen if Gnus cannot open a server.  If the
20797 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
20798 whether to deny the server or whether to unplug the agent.  If the
20799 Agent is disabled, Gnus always simply deny the server.  Other choices
20800 for this variable include @code{denied} and @code{offline} the latter
20801 is only valid if the Agent is used.
20803 @item gnus-auto-goto-ignores
20804 @vindex gnus-auto-goto-ignores
20805 Another variable that isn't an Agent variable, yet so closely related
20806 that most will look for it here, this variable tells the summary
20807 buffer how to maneuver around undownloaded (only headers stored in the
20808 agent) and unfetched (neither article nor headers stored) articles.
20810 The valid values are @code{nil} (maneuver to any article),
20811 @code{undownloaded} (maneuvering while unplugged ignores articles that
20812 have not been fetched), @code{always-undownloaded} (maneuvering always
20813 ignores articles that have not been fetched), @code{unfetched}
20814 (maneuvering ignores articles whose headers have not been fetched).
20816 @item gnus-agent-queue-mail
20817 @vindex gnus-agent-queue-mail
20818 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
20819 queue mail rather than sending it straight away.  When @code{t}, Gnus
20820 will queue mail when unplugged only.  When @code{nil}, never queue
20821 mail.  The default is @code{t}.
20823 @item gnus-agent-prompt-send-queue
20824 @vindex gnus-agent-prompt-send-queue
20825 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
20826 prompt you to confirm that you really wish to proceed if you hit
20827 @kbd{J S} while unplugged.  The default is @code{nil}.
20829 @item gnus-agent-auto-agentize-methods
20830 @vindex gnus-agent-auto-agentize-methods
20831 If you have never used the Agent before (or more technically, if
20832 @file{~/News/agent/lib/servers} does not exist), Gnus will
20833 automatically agentize a few servers for you.  This variable control
20834 which back ends should be auto-agentized.  It is typically only useful
20835 to agentize remote back ends.  The auto-agentizing has the same effect
20836 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
20837 If the file exist, you must manage the servers manually by adding or
20838 removing them, this variable is only applicable the first time you
20839 start Gnus.  The default is @samp{(nntp nnimap)}.
20841 @end table
20844 @node Example Setup
20845 @subsection Example Setup
20847 If you don't want to read this manual, and you have a fairly standard
20848 setup, you may be able to use something like the following as your
20849 @file{~/.gnus.el} file to get started.
20851 @lisp
20852 ;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
20853 ;; @r{from your ISP's server.}
20854 (setq gnus-select-method '(nntp "news.your-isp.com"))
20856 ;; @r{Define how Gnus is to read your mail.  We read mail from}
20857 ;; @r{your ISP's @acronym{POP} server.}
20858 (setq mail-sources '((pop :server "pop.your-isp.com")))
20860 ;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
20861 (setq gnus-secondary-select-methods '((nnml "")))
20863 ;; @r{Make Gnus into an offline newsreader.}
20864 ;; (gnus-agentize) ; @r{The obsolete setting.}
20865 ;; (setq gnus-agent t) ; @r{Now the default.}
20866 @end lisp
20868 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
20869 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
20870 gnus}.
20872 If this is the first time you've run Gnus, you will be subscribed
20873 automatically to a few default newsgroups.  You'll probably want to
20874 subscribe to more groups, and to do that, you have to query the
20875 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
20876 command.  This usually takes quite a while, but you only have to do it
20877 once.
20879 After reading and parsing a while, you'll be presented with a list of
20880 groups.  Subscribe to the ones you want to read with the @kbd{u}
20881 command.  @kbd{l} to make all the killed groups disappear after you've
20882 subscribe to all the groups you want to read.  (@kbd{A k} will bring
20883 back all the killed groups.)
20885 You can now read the groups at once, or you can download the articles
20886 with the @kbd{J s} command.  And then read the rest of this manual to
20887 find out which of the other gazillion things you want to customize.
20890 @node Batching Agents
20891 @subsection Batching Agents
20892 @findex gnus-agent-batch
20894 Having the Gnus Agent fetch articles (and post whatever messages you've
20895 written) is quite easy once you've gotten things set up properly.  The
20896 following shell script will do everything that is necessary:
20898 You can run a complete batch command from the command line with the
20899 following incantation:
20901 @example
20902 #!/bin/sh
20903 emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-agent-batch >/dev/null 2>&1
20904 @end example
20907 @node Agent Caveats
20908 @subsection Agent Caveats
20910 The Gnus Agent doesn't seem to work like most other offline
20911 newsreaders.  Here are some common questions that some imaginary people
20912 may ask:
20914 @table @dfn
20915 @item If I read an article while plugged, do they get entered into the Agent?
20917 @strong{No}.  If you want this behavior, add
20918 @code{gnus-agent-fetch-selected-article} to
20919 @code{gnus-select-article-hook}.
20921 @item If I read an article while plugged, and the article already exists in
20922 the Agent, will it get downloaded once more?
20924 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
20926 @end table
20928 In short, when Gnus is unplugged, it only looks into the locally stored
20929 articles; when it's plugged, it talks to your ISP and may also use the
20930 locally stored articles.
20933 @node Scoring
20934 @chapter Scoring
20935 @cindex scoring
20937 Other people use @dfn{kill files}, but we here at Gnus Towers like
20938 scoring better than killing, so we'd rather switch than fight.  They do
20939 something completely different as well, so sit up straight and pay
20940 attention!
20942 @vindex gnus-summary-mark-below
20943 All articles have a default score (@code{gnus-summary-default-score}),
20944 which is 0 by default.  This score may be raised or lowered either
20945 interactively or by score files.  Articles that have a score lower than
20946 @code{gnus-summary-mark-below} are marked as read.
20948 Gnus will read any @dfn{score files} that apply to the current group
20949 before generating the summary buffer.
20951 There are several commands in the summary buffer that insert score
20952 entries based on the current article.  You can, for instance, ask Gnus to
20953 lower or increase the score of all articles with a certain subject.
20955 There are two sorts of scoring entries: Permanent and temporary.
20956 Temporary score entries are self-expiring entries.  Any entries that are
20957 temporary and have not been used for, say, a week, will be removed
20958 silently to help keep the sizes of the score files down.
20960 @menu
20961 * Summary Score Commands::      Adding score entries for the current group.
20962 * Group Score Commands::        General score commands.
20963 * Score Variables::             Customize your scoring.  (My, what terminology).
20964 * Score File Format::           What a score file may contain.
20965 * Score File Editing::          You can edit score files by hand as well.
20966 * Adaptive Scoring::            Big Sister Gnus knows what you read.
20967 * Home Score File::             How to say where new score entries are to go.
20968 * Followups To Yourself::       Having Gnus notice when people answer you.
20969 * Scoring On Other Headers::    Scoring on non-standard headers.
20970 * Scoring Tips::                How to score effectively.
20971 * Reverse Scoring::             That problem child of old is not problem.
20972 * Global Score Files::          Earth-spanning, ear-splitting score files.
20973 * Kill Files::                  They are still here, but they can be ignored.
20974 * Converting Kill Files::       Translating kill files to score files.
20975 * Advanced Scoring::            Using logical expressions to build score rules.
20976 * Score Decays::                It can be useful to let scores wither away.
20977 @end menu
20980 @node Summary Score Commands
20981 @section Summary Score Commands
20982 @cindex score commands
20984 The score commands that alter score entries do not actually modify real
20985 score files.  That would be too inefficient.  Gnus maintains a cache of
20986 previously loaded score files, one of which is considered the
20987 @dfn{current score file alist}.  The score commands simply insert
20988 entries into this list, and upon group exit, this list is saved.
20990 The current score file is by default the group's local score file, even
20991 if no such score file actually exists.  To insert score commands into
20992 some other score file (e.g. @file{all.SCORE}), you must first make this
20993 score file the current one.
20995 General score commands that don't actually change the score file:
20997 @table @kbd
20999 @item V s
21000 @kindex V s (Summary)
21001 @findex gnus-summary-set-score
21002 Set the score of the current article (@code{gnus-summary-set-score}).
21004 @item V S
21005 @kindex V S (Summary)
21006 @findex gnus-summary-current-score
21007 Display the score of the current article
21008 (@code{gnus-summary-current-score}).
21010 @item V t
21011 @kindex V t (Summary)
21012 @findex gnus-score-find-trace
21013 Display all score rules that have been used on the current article
21014 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
21015 may type @kbd{e} to edit score file corresponding to the score rule on
21016 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
21017 score file and edit it.
21019 @item V w
21020 @kindex V w (Summary)
21021 @findex gnus-score-find-favourite-words
21022 List words used in scoring (@code{gnus-score-find-favourite-words}).
21024 @item V R
21025 @kindex V R (Summary)
21026 @findex gnus-summary-rescore
21027 Run the current summary through the scoring process
21028 (@code{gnus-summary-rescore}).  This might be useful if you're playing
21029 around with your score files behind Gnus' back and want to see the
21030 effect you're having.
21032 @item V c
21033 @kindex V c (Summary)
21034 @findex gnus-score-change-score-file
21035 Make a different score file the current
21036 (@code{gnus-score-change-score-file}).
21038 @item V e
21039 @kindex V e (Summary)
21040 @findex gnus-score-edit-current-scores
21041 Edit the current score file (@code{gnus-score-edit-current-scores}).
21042 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
21043 File Editing}).
21045 @item V f
21046 @kindex V f (Summary)
21047 @findex gnus-score-edit-file
21048 Edit a score file and make this score file the current one
21049 (@code{gnus-score-edit-file}).
21051 @item V F
21052 @kindex V F (Summary)
21053 @findex gnus-score-flush-cache
21054 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
21055 after editing score files.
21057 @item V C
21058 @kindex V C (Summary)
21059 @findex gnus-score-customize
21060 Customize a score file in a visually pleasing manner
21061 (@code{gnus-score-customize}).
21063 @end table
21065 The rest of these commands modify the local score file.
21067 @table @kbd
21069 @item V m
21070 @kindex V m (Summary)
21071 @findex gnus-score-set-mark-below
21072 Prompt for a score, and mark all articles with a score below this as
21073 read (@code{gnus-score-set-mark-below}).
21075 @item V x
21076 @kindex V x (Summary)
21077 @findex gnus-score-set-expunge-below
21078 Prompt for a score, and add a score rule to the current score file to
21079 expunge all articles below this score
21080 (@code{gnus-score-set-expunge-below}).
21081 @end table
21083 The keystrokes for actually making score entries follow a very regular
21084 pattern, so there's no need to list all the commands.  (Hundreds of
21085 them.)
21087 @findex gnus-summary-increase-score
21088 @findex gnus-summary-lower-score
21090 @enumerate
21091 @item
21092 The first key is either @kbd{I} (upper case i) for increasing the score
21093 or @kbd{L} for lowering the score.
21094 @item
21095 The second key says what header you want to score on.  The following
21096 keys are available:
21097 @table @kbd
21099 @item a
21100 Score on the author name.
21102 @item s
21103 Score on the subject line.
21105 @item x
21106 Score on the @code{Xref} line---i.e., the cross-posting line.
21108 @item r
21109 Score on the @code{References} line.
21111 @item d
21112 Score on the date.
21114 @item l
21115 Score on the number of lines.
21117 @item i
21118 Score on the @code{Message-ID} header.
21120 @item e
21121 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
21122 if your @acronym{NNTP} server tracks additional header data in overviews.
21124 @item f
21125 Score on followups---this matches the author name, and adds scores to
21126 the followups to this author.  (Using this key leads to the creation of
21127 @file{ADAPT} files.)
21129 @item b
21130 Score on the body.
21132 @item h
21133 Score on the head.
21135 @item t
21136 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
21137 files.)
21139 @end table
21141 @item
21142 The third key is the match type.  Which match types are valid depends on
21143 what headers you are scoring on.
21145 @table @code
21147 @item strings
21149 @table @kbd
21151 @item e
21152 Exact matching.
21154 @item s
21155 Substring matching.
21157 @item f
21158 Fuzzy matching (@pxref{Fuzzy Matching}).
21160 @item r
21161 Regexp matching
21162 @end table
21164 @item date
21165 @table @kbd
21167 @item b
21168 Before date.
21170 @item a
21171 After date.
21173 @item n
21174 This date.
21175 @end table
21177 @item number
21178 @table @kbd
21180 @item <
21181 Less than number.
21183 @item =
21184 Equal to number.
21186 @item >
21187 Greater than number.
21188 @end table
21189 @end table
21191 @item
21192 The fourth and usually final key says whether this is a temporary (i.e.,
21193 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
21194 or whether it is to be done immediately, without adding to the score
21195 file.
21196 @table @kbd
21198 @item t
21199 Temporary score entry.
21201 @item p
21202 Permanent score entry.
21204 @item i
21205 Immediately scoring.
21206 @end table
21208 @item
21209 If you are scoring on `e' (extra) headers, you will then be prompted for
21210 the header name on which you wish to score.  This must be a header named
21211 in gnus-extra-headers, and @samp{TAB} completion is available.
21213 @end enumerate
21215 So, let's say you want to increase the score on the current author with
21216 exact matching permanently: @kbd{I a e p}.  If you want to lower the
21217 score based on the subject line, using substring matching, and make a
21218 temporary score entry: @kbd{L s s t}.  Pretty easy.
21220 To make things a bit more complicated, there are shortcuts.  If you use
21221 a capital letter on either the second or third keys, Gnus will use
21222 defaults for the remaining one or two keystrokes.  The defaults are
21223 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
21224 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
21226 These functions take both the numerical prefix and the symbolic prefix
21227 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
21228 (or increase) the score of the article.  A symbolic prefix of @code{a}
21229 says to use the @file{all.SCORE} file for the command instead of the
21230 current score file.
21232 @vindex gnus-score-mimic-keymap
21233 The @code{gnus-score-mimic-keymap} says whether these commands will
21234 pretend they are keymaps or not.
21237 @node Group Score Commands
21238 @section Group Score Commands
21239 @cindex group score commands
21241 There aren't many of these as yet, I'm afraid.
21243 @table @kbd
21245 @item W e
21246 @kindex W e (Group)
21247 @findex gnus-score-edit-all-score
21248 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
21249 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
21251 @item W f
21252 @kindex W f (Group)
21253 @findex gnus-score-flush-cache
21254 Gnus maintains a cache of score alists to avoid having to reload them
21255 all the time.  This command will flush the cache
21256 (@code{gnus-score-flush-cache}).
21258 @end table
21260 You can do scoring from the command line by saying something like:
21262 @findex gnus-batch-score
21263 @cindex batch scoring
21264 @example
21265 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
21266 @end example
21269 @node Score Variables
21270 @section Score Variables
21271 @cindex score variables
21273 @table @code
21275 @item gnus-use-scoring
21276 @vindex gnus-use-scoring
21277 If @code{nil}, Gnus will not check for score files, and will not, in
21278 general, do any score-related work.  This is @code{t} by default.
21280 @item gnus-kill-killed
21281 @vindex gnus-kill-killed
21282 If this variable is @code{nil}, Gnus will never apply score files to
21283 articles that have already been through the kill process.  While this
21284 may save you lots of time, it also means that if you apply a kill file
21285 to a group, and then change the kill file and want to run it over you
21286 group again to kill more articles, it won't work.  You have to set this
21287 variable to @code{t} to do that.  (It is @code{t} by default.)
21289 @item gnus-kill-files-directory
21290 @vindex gnus-kill-files-directory
21291 All kill and score files will be stored in this directory, which is
21292 initialized from the @env{SAVEDIR} environment variable by default.
21293 This is @file{~/News/} by default.
21295 @item gnus-score-file-suffix
21296 @vindex gnus-score-file-suffix
21297 Suffix to add to the group name to arrive at the score file name
21298 (@file{SCORE} by default.)
21300 @item gnus-score-uncacheable-files
21301 @vindex gnus-score-uncacheable-files
21302 @cindex score cache
21303 All score files are normally cached to avoid excessive re-loading of
21304 score files.  However, this might make your Emacs grow big and
21305 bloated, so this regexp can be used to weed out score files unlikely
21306 to be needed again.  It would be a bad idea to deny caching of
21307 @file{all.SCORE}, while it might be a good idea to not cache
21308 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
21309 variable is @samp{ADAPT$} by default, so no adaptive score files will
21310 be cached.
21312 @item gnus-save-score
21313 @vindex gnus-save-score
21314 If you have really complicated score files, and do lots of batch
21315 scoring, then you might set this variable to @code{t}.  This will make
21316 Gnus save the scores into the @file{.newsrc.eld} file.
21318 If you do not set this to @code{t}, then manual scores (like those set
21319 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
21320 across group visits.
21322 @item gnus-score-interactive-default-score
21323 @vindex gnus-score-interactive-default-score
21324 Score used by all the interactive raise/lower commands to raise/lower
21325 score with.  Default is 1000, which may seem excessive, but this is to
21326 ensure that the adaptive scoring scheme gets enough room to play with.
21327 We don't want the small changes from the adaptive scoring to overwrite
21328 manually entered data.
21330 @item gnus-summary-default-score
21331 @vindex gnus-summary-default-score
21332 Default score of an article, which is 0 by default.
21334 @item gnus-summary-expunge-below
21335 @vindex gnus-summary-expunge-below
21336 Don't display the summary lines of articles that have scores lower than
21337 this variable.  This is @code{nil} by default, which means that no
21338 articles will be hidden.  This variable is local to the summary buffers,
21339 and has to be set from @code{gnus-summary-mode-hook}.
21341 @item gnus-score-over-mark
21342 @vindex gnus-score-over-mark
21343 Mark (in the third column) used for articles with a score over the
21344 default.  Default is @samp{+}.
21346 @item gnus-score-below-mark
21347 @vindex gnus-score-below-mark
21348 Mark (in the third column) used for articles with a score below the
21349 default.  Default is @samp{-}.
21351 @item gnus-score-find-score-files-function
21352 @vindex gnus-score-find-score-files-function
21353 Function used to find score files for the current group.  This function
21354 is called with the name of the group as the argument.
21356 Predefined functions available are:
21357 @table @code
21359 @item gnus-score-find-single
21360 @findex gnus-score-find-single
21361 Only apply the group's own score file.
21363 @item gnus-score-find-bnews
21364 @findex gnus-score-find-bnews
21365 Apply all score files that match, using bnews syntax.  This is the
21366 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
21367 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
21368 @file{gnu.all.SCORE} would all apply.  In short, the instances of
21369 @samp{all} in the score file names are translated into @samp{.*}, and
21370 then a regexp match is done.
21372 This means that if you have some score entries that you want to apply to
21373 all groups, then you put those entries in the @file{all.SCORE} file.
21375 The score files are applied in a semi-random order, although Gnus will
21376 try to apply the more general score files before the more specific score
21377 files.  It does this by looking at the number of elements in the score
21378 file names---discarding the @samp{all} elements.
21380 @item gnus-score-find-hierarchical
21381 @findex gnus-score-find-hierarchical
21382 Apply all score files from all the parent groups.  This means that you
21383 can't have score files like @file{all.SCORE}, but you can have
21384 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
21385 server.
21387 @end table
21388 This variable can also be a list of functions.  In that case, all
21389 these functions will be called with the group name as argument, and
21390 all the returned lists of score files will be applied.  These
21391 functions can also return lists of lists of score alists directly.  In
21392 that case, the functions that return these non-file score alists
21393 should probably be placed before the ``real'' score file functions, to
21394 ensure that the last score file returned is the local score file.
21395 Phu.
21397 For example, to do hierarchical scoring but use a non-server-specific
21398 overall score file, you could use the value
21399 @example
21400 (list (lambda (group) ("all.SCORE"))
21401       'gnus-score-find-hierarchical)
21402 @end example
21404 @item gnus-score-expiry-days
21405 @vindex gnus-score-expiry-days
21406 This variable says how many days should pass before an unused score file
21407 entry is expired.  If this variable is @code{nil}, no score file entries
21408 are expired.  It's 7 by default.
21410 @item gnus-update-score-entry-dates
21411 @vindex gnus-update-score-entry-dates
21412 If this variable is non-@code{nil}, temporary score entries that have
21413 been triggered (matched) will have their dates updated.  (This is how Gnus
21414 controls expiry---all non-matched-entries will become too old while
21415 matched entries will stay fresh and young.)  However, if you set this
21416 variable to @code{nil}, even matched entries will grow old and will
21417 have to face that oh-so grim reaper.
21419 @item gnus-score-after-write-file-function
21420 @vindex gnus-score-after-write-file-function
21421 Function called with the name of the score file just written.
21423 @item gnus-score-thread-simplify
21424 @vindex gnus-score-thread-simplify
21425 If this variable is non-@code{nil}, article subjects will be
21426 simplified for subject scoring purposes in the same manner as with
21427 threading---according to the current value of
21428 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
21429 @code{substring} or @code{exact} matching, the match will also be
21430 simplified in this manner.
21432 @end table
21435 @node Score File Format
21436 @section Score File Format
21437 @cindex score file format
21439 A score file is an @code{emacs-lisp} file that normally contains just a
21440 single form.  Casual users are not expected to edit these files;
21441 everything can be changed from the summary buffer.
21443 Anyway, if you'd like to dig into it yourself, here's an example:
21445 @lisp
21446 (("from"
21447   ("Lars Ingebrigtsen" -10000)
21448   ("Per Abrahamsen")
21449   ("larsi\\|lmi" -50000 nil R))
21450  ("subject"
21451   ("Ding is Badd" nil 728373))
21452  ("xref"
21453   ("alt.politics" -1000 728372 s))
21454  ("lines"
21455   (2 -100 nil <))
21456  (mark 0)
21457  (expunge -1000)
21458  (mark-and-expunge -10)
21459  (read-only nil)
21460  (orphan -10)
21461  (adapt t)
21462  (files "/hom/larsi/News/gnu.SCORE")
21463  (exclude-files "all.SCORE")
21464  (local (gnus-newsgroup-auto-expire t)
21465         (gnus-summary-make-false-root empty))
21466  (eval (ding)))
21467 @end lisp
21469 This example demonstrates most score file elements.  @xref{Advanced
21470 Scoring}, for a different approach.
21472 Even though this looks much like Lisp code, nothing here is actually
21473 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
21474 has to be valid syntactically, if not semantically.
21476 Six keys are supported by this alist:
21478 @table @code
21480 @item STRING
21481 If the key is a string, it is the name of the header to perform the
21482 match on.  Scoring can only be performed on these eight headers:
21483 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
21484 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
21485 these headers, there are three strings to tell Gnus to fetch the entire
21486 article and do the match on larger parts of the article: @code{Body}
21487 will perform the match on the body of the article, @code{Head} will
21488 perform the match on the head of the article, and @code{All} will
21489 perform the match on the entire article.  Note that using any of these
21490 last three keys will slow down group entry @emph{considerably}.  The
21491 final ``header'' you can score on is @code{Followup}.  These score
21492 entries will result in new score entries being added for all follow-ups
21493 to articles that matches these score entries.
21495 Following this key is an arbitrary number of score entries, where each
21496 score entry has one to four elements.
21497 @enumerate
21499 @item
21500 The first element is the @dfn{match element}.  On most headers this will
21501 be a string, but on the Lines and Chars headers, this must be an
21502 integer.
21504 @item
21505 If the second element is present, it should be a number---the @dfn{score
21506 element}.  This number should be an integer in the neginf to posinf
21507 interval.  This number is added to the score of the article if the match
21508 is successful.  If this element is not present, the
21509 @code{gnus-score-interactive-default-score} number will be used
21510 instead.  This is 1000 by default.
21512 @item
21513 If the third element is present, it should be a number---the @dfn{date
21514 element}.  This date says when the last time this score entry matched,
21515 which provides a mechanism for expiring the score entries.  It this
21516 element is not present, the score entry is permanent.  The date is
21517 represented by the number of days since December 31, 1 BCE.
21519 @item
21520 If the fourth element is present, it should be a symbol---the @dfn{type
21521 element}.  This element specifies what function should be used to see
21522 whether this score entry matches the article.  What match types that can
21523 be used depends on what header you wish to perform the match on.
21524 @table @dfn
21526 @item From, Subject, References, Xref, Message-ID
21527 For most header types, there are the @code{r} and @code{R} (regexp), as
21528 well as @code{s} and @code{S} (substring) types, and @code{e} and
21529 @code{E} (exact match), and @code{w} (word match) types.  If this
21530 element is not present, Gnus will assume that substring matching should
21531 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
21532 that the matches will be done in a case-sensitive manner.  All these
21533 one-letter types are really just abbreviations for the @code{regexp},
21534 @code{string}, @code{exact}, and @code{word} types, which you can use
21535 instead, if you feel like.
21537 @item Extra
21538 Just as for the standard string overview headers, if you are using
21539 gnus-extra-headers, you can score on these headers' values.  In this
21540 case, there is a 5th element in the score entry, being the name of the
21541 header to be scored.  The following entry is useful in your
21542 @file{all.SCORE} file in case of spam attacks from a single origin
21543 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
21544 overviews:
21546 @lisp
21547 ("111.222.333.444" -1000 nil s
21548  "NNTP-Posting-Host")
21549 @end lisp
21551 @item Lines, Chars
21552 These two headers use different match types: @code{<}, @code{>},
21553 @code{=}, @code{>=} and @code{<=}.
21555 These predicates are true if
21557 @example
21558 (PREDICATE HEADER MATCH)
21559 @end example
21561 evaluates to non-@code{nil}.  For instance, the advanced match
21562 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
21563 following form:
21565 @lisp
21566 (< header-value 4)
21567 @end lisp
21569 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
21570 the match, we get the score added if the article has less than 4 lines.
21571 (It's easy to get confused and think it's the other way around.  But
21572 it's not.  I think.)
21574 When matching on @code{Lines}, be careful because some back ends (like
21575 @code{nndir}) do not generate @code{Lines} header, so every article ends
21576 up being marked as having 0 lines.  This can lead to strange results if
21577 you happen to lower score of the articles with few lines.
21579 @item Date
21580 For the Date header we have three kinda silly match types:
21581 @code{before}, @code{at} and @code{after}.  I can't really imagine this
21582 ever being useful, but, like, it would feel kinda silly not to provide
21583 this function.  Just in case.  You never know.  Better safe than sorry.
21584 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
21585 sex on a first date.  (I have been told that at least one person, and I
21586 quote, ``found this function indispensable'', however.)
21588 @cindex ISO8601
21589 @cindex date
21590 A more useful match type is @code{regexp}.  With it, you can match the
21591 date string using a regular expression.  The date is normalized to
21592 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
21593 you want to match all articles that have been posted on April 1st in
21594 every year, you could use @samp{....0401.........} as a match string,
21595 for instance.  (Note that the date is kept in its original time zone, so
21596 this will match articles that were posted when it was April 1st where
21597 the article was posted from.  Time zones are such wholesome fun for the
21598 whole family, eh?)
21600 @item Head, Body, All
21601 These three match keys use the same match types as the @code{From} (etc)
21602 header uses.
21604 @item Followup
21605 This match key is somewhat special, in that it will match the
21606 @code{From} header, and affect the score of not only the matching
21607 articles, but also all followups to the matching articles.  This allows
21608 you e.g. increase the score of followups to your own articles, or
21609 decrease the score of followups to the articles of some known
21610 trouble-maker.  Uses the same match types as the @code{From} header
21611 uses.  (Using this match key will lead to creation of @file{ADAPT}
21612 files.)
21614 @item Thread
21615 This match key works along the same lines as the @code{Followup} match
21616 key.  If you say that you want to score on a (sub-)thread started by an
21617 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
21618 match.  This will add a new @samp{thread} match for each article that
21619 has @var{x} in its @code{References} header.  (These new @samp{thread}
21620 matches will use the @code{Message-ID}s of these matching articles.)
21621 This will ensure that you can raise/lower the score of an entire thread,
21622 even though some articles in the thread may not have complete
21623 @code{References} headers.  Note that using this may lead to
21624 undeterministic scores of the articles in the thread.  (Using this match
21625 key will lead to creation of @file{ADAPT} files.)
21626 @end table
21627 @end enumerate
21629 @cindex score file atoms
21630 @item mark
21631 The value of this entry should be a number.  Any articles with a score
21632 lower than this number will be marked as read.
21634 @item expunge
21635 The value of this entry should be a number.  Any articles with a score
21636 lower than this number will be removed from the summary buffer.
21638 @item mark-and-expunge
21639 The value of this entry should be a number.  Any articles with a score
21640 lower than this number will be marked as read and removed from the
21641 summary buffer.
21643 @item thread-mark-and-expunge
21644 The value of this entry should be a number.  All articles that belong to
21645 a thread that has a total score below this number will be marked as read
21646 and removed from the summary buffer.  @code{gnus-thread-score-function}
21647 says how to compute the total score for a thread.
21649 @item files
21650 The value of this entry should be any number of file names.  These files
21651 are assumed to be score files as well, and will be loaded the same way
21652 this one was.
21654 @item exclude-files
21655 The clue of this entry should be any number of files.  These files will
21656 not be loaded, even though they would normally be so, for some reason or
21657 other.
21659 @item eval
21660 The value of this entry will be @code{eval}el.  This element will be
21661 ignored when handling global score files.
21663 @item read-only
21664 Read-only score files will not be updated or saved.  Global score files
21665 should feature this atom (@pxref{Global Score Files}).  (Note:
21666 @dfn{Global} here really means @dfn{global}; not your personal
21667 apply-to-all-groups score files.)
21669 @item orphan
21670 The value of this entry should be a number.  Articles that do not have
21671 parents will get this number added to their scores.  Imagine you follow
21672 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
21673 will only follow a few of the threads, also want to see any new threads.
21675 You can do this with the following two score file entries:
21677 @example
21678         (orphan -500)
21679         (mark-and-expunge -100)
21680 @end example
21682 When you enter the group the first time, you will only see the new
21683 threads.  You then raise the score of the threads that you find
21684 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
21685 rest.  Next time you enter the group, you will see new articles in the
21686 interesting threads, plus any new threads.
21688 I.e.---the orphan score atom is for high-volume groups where a few
21689 interesting threads which can't be found automatically by ordinary
21690 scoring rules exist.
21692 @item adapt
21693 This entry controls the adaptive scoring.  If it is @code{t}, the
21694 default adaptive scoring rules will be used.  If it is @code{ignore}, no
21695 adaptive scoring will be performed on this group.  If it is a list, this
21696 list will be used as the adaptive scoring rules.  If it isn't present,
21697 or is something other than @code{t} or @code{ignore}, the default
21698 adaptive scoring rules will be used.  If you want to use adaptive
21699 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
21700 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
21701 not want adaptive scoring.  If you only want adaptive scoring in a few
21702 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
21703 insert @code{(adapt t)} in the score files of the groups where you want
21706 @item adapt-file
21707 All adaptive score entries will go to the file named by this entry.  It
21708 will also be applied when entering the group.  This atom might be handy
21709 if you want to adapt on several groups at once, using the same adaptive
21710 file for a number of groups.
21712 @item local
21713 @cindex local variables
21714 The value of this entry should be a list of @code{(@var{var}
21715 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
21716 current summary buffer, and set to the value specified.  This is a
21717 convenient, if somewhat strange, way of setting variables in some
21718 groups if you don't like hooks much.  Note that the @var{value} won't
21719 be evaluated.
21720 @end table
21723 @node Score File Editing
21724 @section Score File Editing
21726 You normally enter all scoring commands from the summary buffer, but you
21727 might feel the urge to edit them by hand as well, so we've supplied you
21728 with a mode for that.
21730 It's simply a slightly customized @code{emacs-lisp} mode, with these
21731 additional commands:
21733 @table @kbd
21735 @item C-c C-c
21736 @kindex C-c C-c (Score)
21737 @findex gnus-score-edit-exit
21738 Save the changes you have made and return to the summary buffer
21739 (@code{gnus-score-edit-exit}).
21741 @item C-c C-d
21742 @kindex C-c C-d (Score)
21743 @findex gnus-score-edit-insert-date
21744 Insert the current date in numerical format
21745 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
21746 you were wondering.
21748 @item C-c C-p
21749 @kindex C-c C-p (Score)
21750 @findex gnus-score-pretty-print
21751 The adaptive score files are saved in an unformatted fashion.  If you
21752 intend to read one of these files, you want to @dfn{pretty print} it
21753 first.  This command (@code{gnus-score-pretty-print}) does that for
21754 you.
21756 @end table
21758 Type @kbd{M-x gnus-score-mode} to use this mode.
21760 @vindex gnus-score-mode-hook
21761 @code{gnus-score-menu-hook} is run in score mode buffers.
21763 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
21764 @kbd{V t} to begin editing score files.
21767 @node Adaptive Scoring
21768 @section Adaptive Scoring
21769 @cindex adaptive scoring
21771 If all this scoring is getting you down, Gnus has a way of making it all
21772 happen automatically---as if by magic.  Or rather, as if by artificial
21773 stupidity, to be precise.
21775 @vindex gnus-use-adaptive-scoring
21776 When you read an article, or mark an article as read, or kill an
21777 article, you leave marks behind.  On exit from the group, Gnus can sniff
21778 these marks and add score elements depending on what marks it finds.
21779 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
21780 @code{t} or @code{(line)}.  If you want score adaptively on separate
21781 words appearing in the subjects, you should set this variable to
21782 @code{(word)}.  If you want to use both adaptive methods, set this
21783 variable to @code{(word line)}.
21785 @vindex gnus-default-adaptive-score-alist
21786 To give you complete control over the scoring process, you can customize
21787 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
21788 might look something like this:
21790 @lisp
21791 (setq gnus-default-adaptive-score-alist
21792   '((gnus-unread-mark)
21793     (gnus-ticked-mark (from 4))
21794     (gnus-dormant-mark (from 5))
21795     (gnus-del-mark (from -4) (subject -1))
21796     (gnus-read-mark (from 4) (subject 2))
21797     (gnus-expirable-mark (from -1) (subject -1))
21798     (gnus-killed-mark (from -1) (subject -3))
21799     (gnus-kill-file-mark)
21800     (gnus-ancient-mark)
21801     (gnus-low-score-mark)
21802     (gnus-catchup-mark (from -1) (subject -1))))
21803 @end lisp
21805 As you see, each element in this alist has a mark as a key (either a
21806 variable name or a ``real'' mark---a character).  Following this key is
21807 a arbitrary number of header/score pairs.  If there are no header/score
21808 pairs following the key, no adaptive scoring will be done on articles
21809 that have that key as the article mark.  For instance, articles with
21810 @code{gnus-unread-mark} in the example above will not get adaptive score
21811 entries.
21813 Each article can have only one mark, so just a single of these rules
21814 will be applied to each article.
21816 To take @code{gnus-del-mark} as an example---this alist says that all
21817 articles that have that mark (i.e., are marked with @samp{e}) will have a
21818 score entry added to lower based on the @code{From} header by -4, and
21819 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
21821 If you have marked 10 articles with the same subject with
21822 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
21823 That means that that subject will get a score of ten times -1, which
21824 should be, unless I'm much mistaken, -10.
21826 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
21827 the read articles will be marked with the @samp{E} mark.  This'll
21828 probably make adaptive scoring slightly impossible, so auto-expiring and
21829 adaptive scoring doesn't really mix very well.
21831 The headers you can score on are @code{from}, @code{subject},
21832 @code{message-id}, @code{references}, @code{xref}, @code{lines},
21833 @code{chars} and @code{date}.  In addition, you can score on
21834 @code{followup}, which will create an adaptive score entry that matches
21835 on the @code{References} header using the @code{Message-ID} of the
21836 current article, thereby matching the following thread.
21838 If you use this scheme, you should set the score file atom @code{mark}
21839 to something small---like -300, perhaps, to avoid having small random
21840 changes result in articles getting marked as read.
21842 After using adaptive scoring for a week or so, Gnus should start to
21843 become properly trained and enhance the authors you like best, and kill
21844 the authors you like least, without you having to say so explicitly.
21846 You can control what groups the adaptive scoring is to be performed on
21847 by using the score files (@pxref{Score File Format}).  This will also
21848 let you use different rules in different groups.
21850 @vindex gnus-adaptive-file-suffix
21851 The adaptive score entries will be put into a file where the name is the
21852 group name with @code{gnus-adaptive-file-suffix} appended.  The default
21853 is @file{ADAPT}.
21855 @vindex gnus-adaptive-pretty-print
21856 Adaptive score files can get huge and are not meant to be edited by
21857 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
21858 deafult) those files will not be written in a human readable way.
21860 @vindex gnus-score-exact-adapt-limit
21861 When doing adaptive scoring, substring or fuzzy matching would probably
21862 give you the best results in most cases.  However, if the header one
21863 matches is short, the possibility for false positives is great, so if
21864 the length of the match is less than
21865 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
21866 this variable is @code{nil}, exact matching will always be used to avoid
21867 this problem.
21869 @vindex gnus-default-adaptive-word-score-alist
21870 As mentioned above, you can adapt either on individual words or entire
21871 headers.  If you adapt on words, the
21872 @code{gnus-default-adaptive-word-score-alist} variable says what score
21873 each instance of a word should add given a mark.
21875 @lisp
21876 (setq gnus-default-adaptive-word-score-alist
21877       `((,gnus-read-mark . 30)
21878         (,gnus-catchup-mark . -10)
21879         (,gnus-killed-mark . -20)
21880         (,gnus-del-mark . -15)))
21881 @end lisp
21883 This is the default value.  If you have adaption on words enabled, every
21884 word that appears in subjects of articles marked with
21885 @code{gnus-read-mark} will result in a score rule that increase the
21886 score with 30 points.
21888 @vindex gnus-default-ignored-adaptive-words
21889 @vindex gnus-ignored-adaptive-words
21890 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
21891 will be ignored.  If you wish to add more words to be ignored, use the
21892 @code{gnus-ignored-adaptive-words} list instead.
21894 @vindex gnus-adaptive-word-length-limit
21895 Some may feel that short words shouldn't count when doing adaptive
21896 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
21897 an integer.  Words shorter than this number will be ignored.  This
21898 variable defaults to @code{nil}.
21900 @vindex gnus-adaptive-word-syntax-table
21901 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
21902 syntax table in effect.  It is similar to the standard syntax table, but
21903 it considers numbers to be non-word-constituent characters.
21905 @vindex gnus-adaptive-word-minimum
21906 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
21907 word scoring process will never bring down the score of an article to
21908 below this number.  The default is @code{nil}.
21910 @vindex gnus-adaptive-word-no-group-words
21911 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
21912 won't adaptively word score any of the words in the group name.  Useful
21913 for groups like @samp{comp.editors.emacs}, where most of the subject
21914 lines contain the word @samp{emacs}.
21916 After using this scheme for a while, it might be nice to write a
21917 @code{gnus-psychoanalyze-user} command to go through the rules and see
21918 what words you like and what words you don't like.  Or perhaps not.
21920 Note that the adaptive word scoring thing is highly experimental and is
21921 likely to change in the future.  Initial impressions seem to indicate
21922 that it's totally useless as it stands.  Some more work (involving more
21923 rigorous statistical methods) will have to be done to make this useful.
21926 @node Home Score File
21927 @section Home Score File
21929 The score file where new score file entries will go is called the
21930 @dfn{home score file}.  This is normally (and by default) the score file
21931 for the group itself.  For instance, the home score file for
21932 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
21934 However, this may not be what you want.  It is often convenient to share
21935 a common home score file among many groups---all @samp{emacs} groups
21936 could perhaps use the same home score file.
21938 @vindex gnus-home-score-file
21939 The variable that controls this is @code{gnus-home-score-file}.  It can
21942 @enumerate
21943 @item
21944 A string.  Then this file will be used as the home score file for all
21945 groups.
21947 @item
21948 A function.  The result of this function will be used as the home score
21949 file.  The function will be called with the name of the group as the
21950 parameter.
21952 @item
21953 A list.  The elements in this list can be:
21955 @enumerate
21956 @item
21957 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
21958 group name, the @var{file-name} will be used as the home score file.
21960 @item
21961 A function.  If the function returns non-@code{nil}, the result will
21962 be used as the home score file.  The function will be called with the
21963 name of the group as the parameter.
21965 @item
21966 A string.  Use the string as the home score file.
21967 @end enumerate
21969 The list will be traversed from the beginning towards the end looking
21970 for matches.
21972 @end enumerate
21974 So, if you want to use just a single score file, you could say:
21976 @lisp
21977 (setq gnus-home-score-file
21978       "my-total-score-file.SCORE")
21979 @end lisp
21981 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
21982 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
21984 @findex gnus-hierarchial-home-score-file
21985 @lisp
21986 (setq gnus-home-score-file
21987       'gnus-hierarchial-home-score-file)
21988 @end lisp
21990 This is a ready-made function provided for your convenience.
21991 Other functions include
21993 @table @code
21994 @item gnus-current-home-score-file
21995 @findex gnus-current-home-score-file
21996 Return the ``current'' regular score file.  This will make scoring
21997 commands add entry to the ``innermost'' matching score file.
21999 @end table
22001 If you want to have one score file for the @samp{emacs} groups and
22002 another for the @samp{comp} groups, while letting all other groups use
22003 their own home score files:
22005 @lisp
22006 (setq gnus-home-score-file
22007       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
22008       '(("\\.emacs" "emacs.SCORE")
22009         ;; @r{All the comp groups in one score file}
22010         ("^comp" "comp.SCORE")))
22011 @end lisp
22013 @vindex gnus-home-adapt-file
22014 @code{gnus-home-adapt-file} works exactly the same way as
22015 @code{gnus-home-score-file}, but says what the home adaptive score file
22016 is instead.  All new adaptive file entries will go into the file
22017 specified by this variable, and the same syntax is allowed.
22019 In addition to using @code{gnus-home-score-file} and
22020 @code{gnus-home-adapt-file}, you can also use group parameters
22021 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
22022 Parameters}) to achieve much the same.  Group and topic parameters take
22023 precedence over this variable.
22026 @node Followups To Yourself
22027 @section Followups To Yourself
22029 Gnus offers two commands for picking out the @code{Message-ID} header in
22030 the current buffer.  Gnus will then add a score rule that scores using
22031 this @code{Message-ID} on the @code{References} header of other
22032 articles.  This will, in effect, increase the score of all articles that
22033 respond to the article in the current buffer.  Quite useful if you want
22034 to easily note when people answer what you've said.
22036 @table @code
22038 @item gnus-score-followup-article
22039 @findex gnus-score-followup-article
22040 This will add a score to articles that directly follow up your own
22041 article.
22043 @item gnus-score-followup-thread
22044 @findex gnus-score-followup-thread
22045 This will add a score to all articles that appear in a thread ``below''
22046 your own article.
22047 @end table
22049 @vindex message-sent-hook
22050 These two functions are both primarily meant to be used in hooks like
22051 @code{message-sent-hook}, like this:
22052 @lisp
22053 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
22054 @end lisp
22057 If you look closely at your own @code{Message-ID}, you'll notice that
22058 the first two or three characters are always the same.  Here's two of
22059 mine:
22061 @example
22062 <x6u3u47icf.fsf@@eyesore.no>
22063 <x6sp9o7ibw.fsf@@eyesore.no>
22064 @end example
22066 So ``my'' ident on this machine is @samp{x6}.  This can be
22067 exploited---the following rule will raise the score on all followups to
22068 myself:
22070 @lisp
22071 ("references"
22072  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
22073   1000 nil r))
22074 @end lisp
22076 Whether it's the first two or first three characters that are ``yours''
22077 is system-dependent.
22080 @node Scoring On Other Headers
22081 @section Scoring On Other Headers
22082 @cindex scoring on other headers
22084 Gnus is quite fast when scoring the ``traditional''
22085 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
22086 other headers requires writing a @code{head} scoring rule, which means
22087 that Gnus has to request every single article from the back end to find
22088 matches.  This takes a long time in big groups.
22090 @vindex gnus-inhibit-slow-scoring
22091 You can inhibit this slow scoring on headers or body by setting the
22092 variable @code{gnus-inhibit-slow-scoring}.  If
22093 @code{gnus-inhibit-slow-scoring} is regexp, slow scoring is inhibited if
22094 the group matches the regexp.  If it is t, slow scoring on it is
22095 inhibited for all groups.
22097 Now, there's not much you can do about the slowness for news groups, but for
22098 mail groups, you have greater control.  In @ref{To From Newsgroups},
22099 it's explained in greater detail what this mechanism does, but here's
22100 a cookbook example for @code{nnml} on how to allow scoring on the
22101 @samp{To} and @samp{Cc} headers.
22103 Put the following in your @file{~/.gnus.el} file.
22105 @lisp
22106 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
22107       nnmail-extra-headers gnus-extra-headers)
22108 @end lisp
22110 Restart Gnus and rebuild your @code{nnml} overview files with the
22111 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
22112 time if you have much mail.
22114 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
22115 so: @kbd{I e s p To RET <your name> RET}.
22117 See?  Simple.
22120 @node Scoring Tips
22121 @section Scoring Tips
22122 @cindex scoring tips
22124 @table @dfn
22126 @item Crossposts
22127 @cindex crossposts
22128 @cindex scoring crossposts
22129 If you want to lower the score of crossposts, the line to match on is
22130 the @code{Xref} header.
22131 @lisp
22132 ("xref" (" talk.politics.misc:" -1000))
22133 @end lisp
22135 @item Multiple crossposts
22136 If you want to lower the score of articles that have been crossposted to
22137 more than, say, 3 groups:
22138 @lisp
22139 ("xref"
22140   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
22141    -1000 nil r))
22142 @end lisp
22144 @item Matching on the body
22145 This is generally not a very good idea---it takes a very long time.
22146 Gnus actually has to fetch each individual article from the server.  But
22147 you might want to anyway, I guess.  Even though there are three match
22148 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
22149 and stick with it in each score file.  If you use any two, each article
22150 will be fetched @emph{twice}.  If you want to match a bit on the
22151 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
22152 the matches.
22154 @item Marking as read
22155 You will probably want to mark articles that have scores below a certain
22156 number as read.  This is most easily achieved by putting the following
22157 in your @file{all.SCORE} file:
22158 @lisp
22159 ((mark -100))
22160 @end lisp
22161 You may also consider doing something similar with @code{expunge}.
22163 @item Negated character classes
22164 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
22165 That will match newlines, which might lead to, well, The Unknown.  Say
22166 @code{[^abcd\n]*} instead.
22167 @end table
22170 @node Reverse Scoring
22171 @section Reverse Scoring
22172 @cindex reverse scoring
22174 If you want to keep just articles that have @samp{Sex with Emacs} in the
22175 subject header, and expunge all other articles, you could put something
22176 like this in your score file:
22178 @lisp
22179 (("subject"
22180   ("Sex with Emacs" 2))
22181  (mark 1)
22182  (expunge 1))
22183 @end lisp
22185 So, you raise all articles that match @samp{Sex with Emacs} and mark the
22186 rest as read, and expunge them to boot.
22189 @node Global Score Files
22190 @section Global Score Files
22191 @cindex global score files
22193 Sure, other newsreaders have ``global kill files''.  These are usually
22194 nothing more than a single kill file that applies to all groups, stored
22195 in the user's home directory.  Bah!  Puny, weak newsreaders!
22197 What I'm talking about here are Global Score Files.  Score files from
22198 all over the world, from users everywhere, uniting all nations in one
22199 big, happy score file union!  Ange-score!  New and untested!
22201 @vindex gnus-global-score-files
22202 All you have to do to use other people's score files is to set the
22203 @code{gnus-global-score-files} variable.  One entry for each score file,
22204 or each score file directory.  Gnus will decide by itself what score
22205 files are applicable to which group.
22207 To use the score file
22208 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
22209 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
22210 say this:
22212 @lisp
22213 (setq gnus-global-score-files
22214       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
22215         "/ftp@@ftp.some-where:/pub/score/"))
22216 @end lisp
22218 @findex gnus-score-search-global-directories
22219 @noindent
22220 Simple, eh?  Directory names must end with a @samp{/}.  These
22221 directories are typically scanned only once during each Gnus session.
22222 If you feel the need to manually re-scan the remote directories, you can
22223 use the @code{gnus-score-search-global-directories} command.
22225 Note that, at present, using this option will slow down group entry
22226 somewhat.  (That is---a lot.)
22228 If you want to start maintaining score files for other people to use,
22229 just put your score file up for anonymous ftp and announce it to the
22230 world.  Become a retro-moderator!  Participate in the retro-moderator
22231 wars sure to ensue, where retro-moderators battle it out for the
22232 sympathy of the people, luring them to use their score files on false
22233 premises!  Yay!  The net is saved!
22235 Here are some tips for the would-be retro-moderator, off the top of my
22236 head:
22238 @itemize @bullet
22240 @item
22241 Articles heavily crossposted are probably junk.
22242 @item
22243 To lower a single inappropriate article, lower by @code{Message-ID}.
22244 @item
22245 Particularly brilliant authors can be raised on a permanent basis.
22246 @item
22247 Authors that repeatedly post off-charter for the group can safely be
22248 lowered out of existence.
22249 @item
22250 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
22251 articles completely.
22253 @item
22254 Use expiring score entries to keep the size of the file down.  You
22255 should probably have a long expiry period, though, as some sites keep
22256 old articles for a long time.
22257 @end itemize
22259 @dots{} I wonder whether other newsreaders will support global score files
22260 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
22261 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
22262 holding our breath yet?
22265 @node Kill Files
22266 @section Kill Files
22267 @cindex kill files
22269 Gnus still supports those pesky old kill files.  In fact, the kill file
22270 entries can now be expiring, which is something I wrote before Daniel
22271 Quinlan thought of doing score files, so I've left the code in there.
22273 In short, kill processing is a lot slower (and I do mean @emph{a lot})
22274 than score processing, so it might be a good idea to rewrite your kill
22275 files into score files.
22277 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
22278 forms into this file, which means that you can use kill files as some
22279 sort of primitive hook function to be run on group entry, even though
22280 that isn't a very good idea.
22282 Normal kill files look like this:
22284 @lisp
22285 (gnus-kill "From" "Lars Ingebrigtsen")
22286 (gnus-kill "Subject" "ding")
22287 (gnus-expunge "X")
22288 @end lisp
22290 This will mark every article written by me as read, and remove the
22291 marked articles from the summary buffer.  Very useful, you'll agree.
22293 Other programs use a totally different kill file syntax.  If Gnus
22294 encounters what looks like a @code{rn} kill file, it will take a stab at
22295 interpreting it.
22297 Two summary functions for editing a @sc{gnus} kill file:
22299 @table @kbd
22301 @item M-k
22302 @kindex M-k (Summary)
22303 @findex gnus-summary-edit-local-kill
22304 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
22306 @item M-K
22307 @kindex M-K (Summary)
22308 @findex gnus-summary-edit-global-kill
22309 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
22310 @end table
22312 Two group mode functions for editing the kill files:
22314 @table @kbd
22316 @item M-k
22317 @kindex M-k (Group)
22318 @findex gnus-group-edit-local-kill
22319 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
22321 @item M-K
22322 @kindex M-K (Group)
22323 @findex gnus-group-edit-global-kill
22324 Edit the general kill file (@code{gnus-group-edit-global-kill}).
22325 @end table
22327 Kill file variables:
22329 @table @code
22330 @item gnus-kill-file-name
22331 @vindex gnus-kill-file-name
22332 A kill file for the group @samp{soc.motss} is normally called
22333 @file{soc.motss.KILL}.  The suffix appended to the group name to get
22334 this file name is detailed by the @code{gnus-kill-file-name} variable.
22335 The ``global'' kill file (not in the score file sense of ``global'', of
22336 course) is just called @file{KILL}.
22338 @vindex gnus-kill-save-kill-file
22339 @item gnus-kill-save-kill-file
22340 If this variable is non-@code{nil}, Gnus will save the
22341 kill file after processing, which is necessary if you use expiring
22342 kills.
22344 @item gnus-apply-kill-hook
22345 @vindex gnus-apply-kill-hook
22346 @findex gnus-apply-kill-file-unless-scored
22347 @findex gnus-apply-kill-file
22348 A hook called to apply kill files to a group.  It is
22349 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
22350 kill file if you have a score file for the same group, you can set this
22351 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
22352 kill files to be processed, you should set this variable to @code{nil}.
22354 @item gnus-kill-file-mode-hook
22355 @vindex gnus-kill-file-mode-hook
22356 A hook called in kill-file mode buffers.
22358 @end table
22361 @node Converting Kill Files
22362 @section Converting Kill Files
22363 @cindex kill files
22364 @cindex converting kill files
22366 If you have loads of old kill files, you may want to convert them into
22367 score files.  If they are ``regular'', you can use
22368 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
22369 by hand.
22371 The kill to score conversion package isn't included in Gnus by default.
22372 You can fetch it from
22373 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
22375 If your old kill files are very complex---if they contain more
22376 non-@code{gnus-kill} forms than not, you'll have to convert them by
22377 hand.  Or just let them be as they are.  Gnus will still use them as
22378 before.
22381 @node Advanced Scoring
22382 @section Advanced Scoring
22384 Scoring on Subjects and From headers is nice enough, but what if you're
22385 really interested in what a person has to say only when she's talking
22386 about a particular subject?  Or what if you really don't want to
22387 read what person A has to say when she's following up to person B, but
22388 want to read what she says when she's following up to person C?
22390 By using advanced scoring rules you may create arbitrarily complex
22391 scoring patterns.
22393 @menu
22394 * Advanced Scoring Syntax::     A definition.
22395 * Advanced Scoring Examples::   What they look like.
22396 * Advanced Scoring Tips::       Getting the most out of it.
22397 @end menu
22400 @node Advanced Scoring Syntax
22401 @subsection Advanced Scoring Syntax
22403 Ordinary scoring rules have a string as the first element in the rule.
22404 Advanced scoring rules have a list as the first element.  The second
22405 element is the score to be applied if the first element evaluated to a
22406 non-@code{nil} value.
22408 These lists may consist of three logical operators, one redirection
22409 operator, and various match operators.
22411 Logical operators:
22413 @table @code
22414 @item &
22415 @itemx and
22416 This logical operator will evaluate each of its arguments until it finds
22417 one that evaluates to @code{false}, and then it'll stop.  If all arguments
22418 evaluate to @code{true} values, then this operator will return
22419 @code{true}.
22421 @item |
22422 @itemx or
22423 This logical operator will evaluate each of its arguments until it finds
22424 one that evaluates to @code{true}.  If no arguments are @code{true},
22425 then this operator will return @code{false}.
22427 @item !
22428 @itemx not
22429 @itemx Â¬
22430 This logical operator only takes a single argument.  It returns the
22431 logical negation of the value of its argument.
22433 @end table
22435 There is an @dfn{indirection operator} that will make its arguments
22436 apply to the ancestors of the current article being scored.  For
22437 instance, @code{1-} will make score rules apply to the parent of the
22438 current article.  @code{2-} will make score rules apply to the
22439 grandparent of the current article.  Alternatively, you can write
22440 @code{^^}, where the number of @code{^}s (carets) says how far back into
22441 the ancestry you want to go.
22443 Finally, we have the match operators.  These are the ones that do the
22444 real work.  Match operators are header name strings followed by a match
22445 and a match type.  A typical match operator looks like @samp{("from"
22446 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
22447 simple scoring, and the match types are also the same.
22450 @node Advanced Scoring Examples
22451 @subsection Advanced Scoring Examples
22453 Please note that the following examples are score file rules.  To
22454 make a complete score file from them, surround them with another pair
22455 of parentheses.
22457 Let's say you want to increase the score of articles written by Lars
22458 when he's talking about Gnus:
22460 @example
22461 @group
22463   ("from" "Lars Ingebrigtsen")
22464   ("subject" "Gnus"))
22465  1000)
22466 @end group
22467 @end example
22469 Quite simple, huh?
22471 When he writes long articles, he sometimes has something nice to say:
22473 @example
22475   ("from" "Lars Ingebrigtsen")
22476   (|
22477    ("subject" "Gnus")
22478    ("lines" 100 >)))
22479  1000)
22480 @end example
22482 However, when he responds to things written by Reig Eigil Logge, you
22483 really don't want to read what he's written:
22485 @example
22487   ("from" "Lars Ingebrigtsen")
22488   (1- ("from" "Reig Eigil Logge")))
22489  -100000)
22490 @end example
22492 Everybody that follows up Redmondo when he writes about disappearing
22493 socks should have their scores raised, but only when they talk about
22494 white socks.  However, when Lars talks about socks, it's usually not
22495 very interesting:
22497 @example
22499   (1-
22500    (&
22501     ("from" "redmondo@@.*no" r)
22502     ("body" "disappearing.*socks" t)))
22503   (! ("from" "Lars Ingebrigtsen"))
22504   ("body" "white.*socks"))
22505  1000)
22506 @end example
22508 Suppose you're reading a high volume group and you're only interested
22509 in replies. The plan is to score down all articles that don't have
22510 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
22511 parents of articles that have subjects that begin with reply marks.
22513 @example
22514 ((! ("subject" "re:\\|fwd?:" r))
22515   -200)
22516 ((1- ("subject" "re:\\|fwd?:" r))
22517   200)
22518 @end example
22520 The possibilities are endless.
22522 @node Advanced Scoring Tips
22523 @subsection Advanced Scoring Tips
22525 The @code{&} and @code{|} logical operators do short-circuit logic.
22526 That is, they stop processing their arguments when it's clear what the
22527 result of the operation will be.  For instance, if one of the arguments
22528 of an @code{&} evaluates to @code{false}, there's no point in evaluating
22529 the rest of the arguments.  This means that you should put slow matches
22530 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
22531 @samp{subject}) first.
22533 The indirection arguments (@code{1-} and so on) will make their
22534 arguments work on previous generations of the thread.  If you say
22535 something like:
22537 @example
22540  (1-
22541   ("from" "lars")))
22543 @end example
22545 Then that means ``score on the from header of the grandparent of the
22546 current article''.  An indirection is quite fast, but it's better to say:
22548 @example
22550  (&
22551   ("from" "Lars")
22552   ("subject" "Gnus")))
22553 @end example
22555 than it is to say:
22557 @example
22559  (1- ("from" "Lars"))
22560  (1- ("subject" "Gnus")))
22561 @end example
22564 @node Score Decays
22565 @section Score Decays
22566 @cindex score decays
22567 @cindex decays
22569 You may find that your scores have a tendency to grow without
22570 bounds, especially if you're using adaptive scoring.  If scores get too
22571 big, they lose all meaning---they simply max out and it's difficult to
22572 use them in any sensible way.
22574 @vindex gnus-decay-scores
22575 @findex gnus-decay-score
22576 @vindex gnus-decay-score-function
22577 Gnus provides a mechanism for decaying scores to help with this problem.
22578 When score files are loaded and @code{gnus-decay-scores} is
22579 non-@code{nil}, Gnus will run the score files through the decaying
22580 mechanism thereby lowering the scores of all non-permanent score rules.
22581 If @code{gnus-decay-scores} is a regexp, only score files matching this
22582 regexp are treated.  E.g. you may set it to @samp{\\.ADAPT\\'} if only
22583 @emph{adaptive} score files should be decayed.  The decay itself if
22584 performed by the @code{gnus-decay-score-function} function, which is
22585 @code{gnus-decay-score} by default.  Here's the definition of that
22586 function:
22588 @lisp
22589 (defun gnus-decay-score (score)
22590   "Decay SCORE according to `gnus-score-decay-constant'
22591 and `gnus-score-decay-scale'."
22592   (let ((n (- score
22593               (* (if (< score 0) -1 1)
22594                  (min (abs score)
22595                       (max gnus-score-decay-constant
22596                            (* (abs score)
22597                               gnus-score-decay-scale)))))))
22598     (if (and (featurep 'xemacs)
22599              ;; XEmacs' floor can handle only the floating point
22600              ;; number below the half of the maximum integer.
22601              (> (abs n) (lsh -1 -2)))
22602         (string-to-number
22603          (car (split-string (number-to-string n) "\\.")))
22604       (floor n))))
22605 @end lisp
22607 @vindex gnus-score-decay-scale
22608 @vindex gnus-score-decay-constant
22609 @code{gnus-score-decay-constant} is 3 by default and
22610 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
22612 @enumerate
22613 @item
22614 Scores between -3 and 3 will be set to 0 when this function is called.
22616 @item
22617 Scores with magnitudes between 3 and 60 will be shrunk by 3.
22619 @item
22620 Scores with magnitudes greater than 60 will be shrunk by 5% of the
22621 score.
22622 @end enumerate
22624 If you don't like this decay function, write your own.  It is called
22625 with the score to be decayed as its only parameter, and it should return
22626 the new score, which should be an integer.
22628 Gnus will try to decay scores once a day.  If you haven't run Gnus for
22629 four days, Gnus will decay the scores four times, for instance.
22631 @iftex
22632 @iflatex
22633 @chapter Message
22634 @include message.texi
22635 @chapter Emacs MIME
22636 @include emacs-mime.texi
22637 @chapter Sieve
22638 @include sieve.texi
22639 @chapter PGG
22640 @include pgg.texi
22641 @chapter SASL
22642 @include sasl.texi
22643 @end iflatex
22644 @end iftex
22646 @node Various
22647 @chapter Various
22649 @menu
22650 * Process/Prefix::              A convention used by many treatment commands.
22651 * Interactive::                 Making Gnus ask you many questions.
22652 * Symbolic Prefixes::           How to supply some Gnus functions with options.
22653 * Formatting Variables::        You can specify what buffers should look like.
22654 * Window Layout::               Configuring the Gnus buffer windows.
22655 * Faces and Fonts::             How to change how faces look.
22656 * Compilation::                 How to speed Gnus up.
22657 * Mode Lines::                  Displaying information in the mode lines.
22658 * Highlighting and Menus::      Making buffers look all nice and cozy.
22659 * Buttons::                     Get tendinitis in ten easy steps!
22660 * Daemons::                     Gnus can do things behind your back.
22661 * NoCeM::                       How to avoid spam and other fatty foods.
22662 * Undo::                        Some actions can be undone.
22663 * Predicate Specifiers::        Specifying predicates.
22664 * Moderation::                  What to do if you're a moderator.
22665 * Fetching a Group::            Starting Gnus just to read a group.
22666 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
22667 * Fuzzy Matching::              What's the big fuzz?
22668 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
22669 * Spam Package::                A package for filtering and processing spam.
22670 * Other modes::                 Interaction with other modes.
22671 * Various Various::             Things that are really various.
22672 @end menu
22675 @node Process/Prefix
22676 @section Process/Prefix
22677 @cindex process/prefix convention
22679 Many functions, among them functions for moving, decoding and saving
22680 articles, use what is known as the @dfn{Process/Prefix convention}.
22682 This is a method for figuring out what articles the user wants the
22683 command to be performed on.
22685 It goes like this:
22687 If the numeric prefix is N, perform the operation on the next N
22688 articles, starting with the current one.  If the numeric prefix is
22689 negative, perform the operation on the previous N articles, starting
22690 with the current one.
22692 @vindex transient-mark-mode
22693 If @code{transient-mark-mode} in non-@code{nil} and the region is
22694 active, all articles in the region will be worked upon.
22696 If there is no numeric prefix, but some articles are marked with the
22697 process mark, perform the operation on the articles marked with
22698 the process mark.
22700 If there is neither a numeric prefix nor any articles marked with the
22701 process mark, just perform the operation on the current article.
22703 Quite simple, really, but it needs to be made clear so that surprises
22704 are avoided.
22706 Commands that react to the process mark will push the current list of
22707 process marked articles onto a stack and will then clear all process
22708 marked articles.  You can restore the previous configuration with the
22709 @kbd{M P y} command (@pxref{Setting Process Marks}).
22711 @vindex gnus-summary-goto-unread
22712 One thing that seems to shock & horrify lots of people is that, for
22713 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
22714 Since each @kbd{d} (which marks the current article as read) by default
22715 goes to the next unread article after marking, this means that @kbd{3 d}
22716 will mark the next three unread articles as read, no matter what the
22717 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
22718 @code{nil} for a more straightforward action.
22720 Many commands do not use the process/prefix convention.  All commands
22721 that do explicitly say so in this manual.  To apply the process/prefix
22722 convention to commands that do not use it, you can use the @kbd{M-&}
22723 command.  For instance, to mark all the articles in the group as
22724 expirable, you could say @kbd{M P b M-& E}.
22727 @node Interactive
22728 @section Interactive
22729 @cindex interaction
22731 @table @code
22733 @item gnus-novice-user
22734 @vindex gnus-novice-user
22735 If this variable is non-@code{nil}, you are either a newcomer to the
22736 World of Usenet, or you are very cautious, which is a nice thing to be,
22737 really.  You will be given questions of the type ``Are you sure you want
22738 to do this?'' before doing anything dangerous.  This is @code{t} by
22739 default.
22741 @item gnus-expert-user
22742 @vindex gnus-expert-user
22743 If this variable is non-@code{nil}, you will seldom be asked any
22744 questions by Gnus.  It will simply assume you know what you're doing, no
22745 matter how strange.
22747 @item gnus-interactive-catchup
22748 @vindex gnus-interactive-catchup
22749 Require confirmation before catching up a group if non-@code{nil}.  It
22750 is @code{t} by default.
22752 @item gnus-interactive-exit
22753 @vindex gnus-interactive-exit
22754 Require confirmation before exiting Gnus.  This variable is @code{t} by
22755 default.
22756 @end table
22759 @node Symbolic Prefixes
22760 @section Symbolic Prefixes
22761 @cindex symbolic prefixes
22763 Quite a lot of Emacs commands react to the (numeric) prefix.  For
22764 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
22765 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
22766 rule of 900 to the current article.
22768 This is all nice and well, but what if you want to give a command some
22769 additional information?  Well, what most commands do is interpret the
22770 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
22771 doesn't want a backup file to be created when saving the current buffer,
22772 for instance.  But what if you want to save without making a backup
22773 file, and you want Emacs to flash lights and play a nice tune at the
22774 same time?  You can't, and you're probably perfectly happy that way.
22776 @kindex M-i (Summary)
22777 @findex gnus-symbolic-argument
22778 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
22779 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
22780 character typed in is the value.  You can stack as many @kbd{M-i}
22781 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
22782 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
22783 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
22784 @code{b}''.  You get the drift.
22786 Typing in symbolic prefixes to commands that don't accept them doesn't
22787 hurt, but it doesn't do any good either.  Currently not many Gnus
22788 functions make use of the symbolic prefix.
22790 If you're interested in how Gnus implements this, @pxref{Extended
22791 Interactive}.
22794 @node Formatting Variables
22795 @section Formatting Variables
22796 @cindex formatting variables
22798 Throughout this manual you've probably noticed lots of variables called
22799 things like @code{gnus-group-line-format} and
22800 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
22801 output lines in the various buffers.  There's quite a lot of them.
22802 Fortunately, they all use the same syntax, so there's not that much to
22803 be annoyed by.
22805 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
22806 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
22807 lots of percentages everywhere.
22809 @menu
22810 * Formatting Basics::           A formatting variable is basically a format string.
22811 * Mode Line Formatting::        Some rules about mode line formatting variables.
22812 * Advanced Formatting::         Modifying output in various ways.
22813 * User-Defined Specs::          Having Gnus call your own functions.
22814 * Formatting Fonts::            Making the formatting look colorful and nice.
22815 * Positioning Point::           Moving point to a position after an operation.
22816 * Tabulation::                  Tabulating your output.
22817 * Wide Characters::             Dealing with wide characters.
22818 @end menu
22820 Currently Gnus uses the following formatting variables:
22821 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
22822 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
22823 @code{gnus-group-mode-line-format},
22824 @code{gnus-summary-mode-line-format},
22825 @code{gnus-article-mode-line-format},
22826 @code{gnus-server-mode-line-format}, and
22827 @code{gnus-summary-pick-line-format}.
22829 All these format variables can also be arbitrary elisp forms.  In that
22830 case, they will be @code{eval}ed to insert the required lines.
22832 @kindex M-x gnus-update-format
22833 @findex gnus-update-format
22834 Gnus includes a command to help you while creating your own format
22835 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
22836 update the spec in question and pop you to a buffer where you can
22837 examine the resulting Lisp code to be run to generate the line.
22841 @node Formatting Basics
22842 @subsection Formatting Basics
22844 Each @samp{%} element will be replaced by some string or other when the
22845 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
22846 spec, and pad with spaces to get a 5-character field''.
22848 As with normal C and Emacs Lisp formatting strings, the numerical
22849 modifier between the @samp{%} and the formatting type character will
22850 @dfn{pad} the output so that it is always at least that long.
22851 @samp{%5y} will make the field always (at least) five characters wide by
22852 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
22853 the right instead.
22855 You may also wish to limit the length of the field to protect against
22856 particularly wide values.  For that you can say @samp{%4,6y}, which
22857 means that the field will never be more than 6 characters wide and never
22858 less than 4 characters wide.
22860 Also Gnus supports some extended format specifications, such as
22861 @samp{%&user-date;}.
22864 @node Mode Line Formatting
22865 @subsection Mode Line Formatting
22867 Mode line formatting variables (e.g.,
22868 @code{gnus-summary-mode-line-format}) follow the same rules as other,
22869 buffer line oriented formatting variables (@pxref{Formatting Basics})
22870 with the following two differences:
22872 @enumerate
22874 @item
22875 There must be no newline (@samp{\n}) at the end.
22877 @item
22878 The special @samp{%%b} spec can be used to display the buffer name.
22879 Well, it's no spec at all, really---@samp{%%} is just a way to quote
22880 @samp{%} to allow it to pass through the formatting machinery unmangled,
22881 so that Emacs receives @samp{%b}, which is something the Emacs mode line
22882 display interprets to mean ``show the buffer name''.  For a full list of
22883 mode line specs Emacs understands, see the documentation of the
22884 @code{mode-line-format} variable.
22886 @end enumerate
22889 @node Advanced Formatting
22890 @subsection Advanced Formatting
22892 It is frequently useful to post-process the fields in some way.
22893 Padding, limiting, cutting off parts and suppressing certain values can
22894 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
22895 look like @samp{%~(cut 3)~(ignore "0")y}.
22897 These are the valid modifiers:
22899 @table @code
22900 @item pad
22901 @itemx pad-left
22902 Pad the field to the left with spaces until it reaches the required
22903 length.
22905 @item pad-right
22906 Pad the field to the right with spaces until it reaches the required
22907 length.
22909 @item max
22910 @itemx max-left
22911 Cut off characters from the left until it reaches the specified length.
22913 @item max-right
22914 Cut off characters from the right until it reaches the specified
22915 length.
22917 @item cut
22918 @itemx cut-left
22919 Cut off the specified number of characters from the left.
22921 @item cut-right
22922 Cut off the specified number of characters from the right.
22924 @item ignore
22925 Return an empty string if the field is equal to the specified value.
22927 @item form
22928 Use the specified form as the field value when the @samp{@@} spec is
22929 used.
22931 Here's an example:
22933 @lisp
22934 "~(form (current-time-string))@@"
22935 @end lisp
22937 @end table
22939 Let's take an example.  The @samp{%o} spec in the summary mode lines
22940 will return a date in compact ISO8601 format---@samp{19960809T230410}.
22941 This is quite a mouthful, so we want to shave off the century number and
22942 the time, leaving us with a six-character date.  That would be
22943 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
22944 maxing, and we need the padding to ensure that the date is never less
22945 than 6 characters to make it look nice in columns.)
22947 Ignoring is done first; then cutting; then maxing; and then as the very
22948 last operation, padding.
22950 If you use lots of these advanced thingies, you'll find that Gnus gets
22951 quite slow.  This can be helped enormously by running @kbd{M-x
22952 gnus-compile} when you are satisfied with the look of your lines.
22953 @xref{Compilation}.
22956 @node User-Defined Specs
22957 @subsection User-Defined Specs
22959 All the specs allow for inserting user defined specifiers---@samp{u}.
22960 The next character in the format string should be a letter.  Gnus
22961 will call the function @code{gnus-user-format-function-}@samp{X}, where
22962 @samp{X} is the letter following @samp{%u}.  The function will be passed
22963 a single parameter---what the parameter means depends on what buffer
22964 it's being called from.  The function should return a string, which will
22965 be inserted into the buffer just like information from any other
22966 specifier.  This function may also be called with dummy values, so it
22967 should protect against that.
22969 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
22970 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
22972 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
22973 much the same without defining new functions.  Here's an example:
22974 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
22975 given here will be evaluated to yield the current line number, and then
22976 inserted.
22979 @node Formatting Fonts
22980 @subsection Formatting Fonts
22982 @cindex %(, %)
22983 @vindex gnus-mouse-face
22984 There are specs for highlighting, and these are shared by all the format
22985 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
22986 the special @code{mouse-face} property set, which means that it will be
22987 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
22988 over it.
22990 @cindex %@{, %@}
22991 @vindex gnus-face-0
22992 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
22993 normal faces set using @code{gnus-face-0}, which is @code{bold} by
22994 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
22995 and so on.  Create as many faces as you wish.  The same goes for the
22996 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
22997 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
22999 @cindex %<<, %>>, guillemets
23000 @c @cindex %<<, %>>, %«, %», guillemets
23001 @vindex gnus-balloon-face-0
23002 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
23003 special @code{balloon-help} property set to
23004 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
23005 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
23006 variables should be either strings or symbols naming functions that
23007 return a string.  When the mouse passes over text with this property
23008 set, a balloon window will appear and display the string.  Please
23009 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
23010 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
23011 XEmacs) for more information on this.  (For technical reasons, the
23012 guillemets have been approximated as @samp{<<} and @samp{>>} in this
23013 paragraph.)
23015 Here's an alternative recipe for the group buffer:
23017 @lisp
23018 ;; @r{Create three face types.}
23019 (setq gnus-face-1 'bold)
23020 (setq gnus-face-3 'italic)
23022 ;; @r{We want the article count to be in}
23023 ;; @r{a bold and green face.  So we create}
23024 ;; @r{a new face called @code{my-green-bold}.}
23025 (copy-face 'bold 'my-green-bold)
23026 ;; @r{Set the color.}
23027 (set-face-foreground 'my-green-bold "ForestGreen")
23028 (setq gnus-face-2 'my-green-bold)
23030 ;; @r{Set the new & fancy format.}
23031 (setq gnus-group-line-format
23032       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
23033 @end lisp
23035 I'm sure you'll be able to use this scheme to create totally unreadable
23036 and extremely vulgar displays.  Have fun!
23038 Note that the @samp{%(} specs (and friends) do not make any sense on the
23039 mode-line variables.
23041 @node Positioning Point
23042 @subsection Positioning Point
23044 Gnus usually moves point to a pre-defined place on each line in most
23045 buffers.  By default, point move to the first colon character on the
23046 line.  You can customize this behavior in three different ways.
23048 You can move the colon character to somewhere else on the line.
23050 @findex gnus-goto-colon
23051 You can redefine the function that moves the point to the colon.  The
23052 function is called @code{gnus-goto-colon}.
23054 But perhaps the most convenient way to deal with this, if you don't want
23055 to have a colon in your line, is to use the @samp{%*} specifier.  If you
23056 put a @samp{%*} somewhere in your format line definition, Gnus will
23057 place point there.
23060 @node Tabulation
23061 @subsection Tabulation
23063 You can usually line up your displays by padding and cutting your
23064 strings.  However, when combining various strings of different size, it
23065 can often be more convenient to just output the strings, and then worry
23066 about lining up the following text afterwards.
23068 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
23069 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
23071 @samp{%50=} will insert space characters to pad the line up to column
23072 50.  If the text is already past column 50, nothing will be inserted.
23073 This is the soft tabulator.
23075 @samp{%-50=} will insert space characters to pad the line up to column
23076 50.  If the text is already past column 50, the excess text past column
23077 50 will be removed.  This is the hard tabulator.
23080 @node Wide Characters
23081 @subsection Wide Characters
23083 Fixed width fonts in most countries have characters of the same width.
23084 Some countries, however, use Latin characters mixed with wider
23085 characters---most notable East Asian countries.
23087 The problem is that when formatting, Gnus assumes that if a string is 10
23088 characters wide, it'll be 10 Latin characters wide on the screen.  In
23089 these countries, that's not true.
23091 @vindex gnus-use-correct-string-widths
23092 To help fix this, you can set @code{gnus-use-correct-string-widths} to
23093 @code{t}.  This makes buffer generation slower, but the results will be
23094 prettier.  The default value under XEmacs is @code{t} but @code{nil}
23095 for Emacs.
23098 @node Window Layout
23099 @section Window Layout
23100 @cindex window layout
23102 No, there's nothing here about X, so be quiet.
23104 @vindex gnus-use-full-window
23105 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
23106 other windows and occupy the entire Emacs screen by itself.  It is
23107 @code{t} by default.
23109 Setting this variable to @code{nil} kinda works, but there are
23110 glitches.  Use at your own peril.
23112 @vindex gnus-buffer-configuration
23113 @code{gnus-buffer-configuration} describes how much space each Gnus
23114 buffer should be given.  Here's an excerpt of this variable:
23116 @lisp
23117 ((group (vertical 1.0 (group 1.0 point)
23118                       (if gnus-carpal (group-carpal 4))))
23119  (article (vertical 1.0 (summary 0.25 point)
23120                         (article 1.0))))
23121 @end lisp
23123 This is an alist.  The @dfn{key} is a symbol that names some action or
23124 other.  For instance, when displaying the group buffer, the window
23125 configuration function will use @code{group} as the key.  A full list of
23126 possible names is listed below.
23128 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
23129 should occupy.  To take the @code{article} split as an example -
23131 @lisp
23132 (article (vertical 1.0 (summary 0.25 point)
23133                        (article 1.0)))
23134 @end lisp
23136 This @dfn{split} says that the summary buffer should occupy 25% of upper
23137 half of the screen, and that it is placed over the article buffer.  As
23138 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
23139 reaching for that calculator there).  However, the special number
23140 @code{1.0} is used to signal that this buffer should soak up all the
23141 rest of the space available after the rest of the buffers have taken
23142 whatever they need.  There should be only one buffer with the @code{1.0}
23143 size spec per split.
23145 Point will be put in the buffer that has the optional third element
23146 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
23147 split where the tag @code{frame-focus} is a member (i.e. is the third or
23148 fourth element in the list, depending on whether the @code{point} tag is
23149 present) gets focus.
23151 Here's a more complicated example:
23153 @lisp
23154 (article (vertical 1.0 (group 4)
23155                        (summary 0.25 point)
23156                        (if gnus-carpal (summary-carpal 4))
23157                        (article 1.0)))
23158 @end lisp
23160 If the size spec is an integer instead of a floating point number,
23161 then that number will be used to say how many lines a buffer should
23162 occupy, not a percentage.
23164 If the @dfn{split} looks like something that can be @code{eval}ed (to be
23165 precise---if the @code{car} of the split is a function or a subr), this
23166 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
23167 be used as a split.  This means that there will be three buffers if
23168 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
23169 is non-@code{nil}.
23171 Not complicated enough for you?  Well, try this on for size:
23173 @lisp
23174 (article (horizontal 1.0
23175              (vertical 0.5
23176                  (group 1.0)
23177                  (gnus-carpal 4))
23178              (vertical 1.0
23179                  (summary 0.25 point)
23180                  (summary-carpal 4)
23181                  (article 1.0))))
23182 @end lisp
23184 Whoops.  Two buffers with the mystery 100% tag.  And what's that
23185 @code{horizontal} thingie?
23187 If the first element in one of the split is @code{horizontal}, Gnus will
23188 split the window horizontally, giving you two windows side-by-side.
23189 Inside each of these strips you may carry on all you like in the normal
23190 fashion.  The number following @code{horizontal} says what percentage of
23191 the screen is to be given to this strip.
23193 For each split, there @emph{must} be one element that has the 100% tag.
23194 The splitting is never accurate, and this buffer will eat any leftover
23195 lines from the splits.
23197 To be slightly more formal, here's a definition of what a valid split
23198 may look like:
23200 @example
23201 @group
23202 split      = frame | horizontal | vertical | buffer | form
23203 frame      = "(frame " size *split ")"
23204 horizontal = "(horizontal " size *split ")"
23205 vertical   = "(vertical " size *split ")"
23206 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
23207 size       = number | frame-params
23208 buf-name   = group | article | summary ...
23209 @end group
23210 @end example
23212 The limitations are that the @code{frame} split can only appear as the
23213 top-level split.  @var{form} should be an Emacs Lisp form that should
23214 return a valid split.  We see that each split is fully recursive, and
23215 may contain any number of @code{vertical} and @code{horizontal} splits.
23217 @vindex gnus-window-min-width
23218 @vindex gnus-window-min-height
23219 @cindex window height
23220 @cindex window width
23221 Finding the right sizes can be a bit complicated.  No window may be less
23222 than @code{gnus-window-min-height} (default 1) characters high, and all
23223 windows must be at least @code{gnus-window-min-width} (default 1)
23224 characters wide.  Gnus will try to enforce this before applying the
23225 splits.  If you want to use the normal Emacs window width/height limit,
23226 you can just set these two variables to @code{nil}.
23228 If you're not familiar with Emacs terminology, @code{horizontal} and
23229 @code{vertical} splits may work the opposite way of what you'd expect.
23230 Windows inside a @code{horizontal} split are shown side-by-side, and
23231 windows within a @code{vertical} split are shown above each other.
23233 @findex gnus-configure-frame
23234 If you want to experiment with window placement, a good tip is to call
23235 @code{gnus-configure-frame} directly with a split.  This is the function
23236 that does all the real work when splitting buffers.  Below is a pretty
23237 nonsensical configuration with 5 windows; two for the group buffer and
23238 three for the article buffer.  (I said it was nonsensical.)  If you
23239 @code{eval} the statement below, you can get an idea of how that would
23240 look straight away, without going through the normal Gnus channels.
23241 Play with it until you're satisfied, and then use
23242 @code{gnus-add-configuration} to add your new creation to the buffer
23243 configuration list.
23245 @lisp
23246 (gnus-configure-frame
23247  '(horizontal 1.0
23248     (vertical 10
23249       (group 1.0)
23250       (article 0.3 point))
23251     (vertical 1.0
23252       (article 1.0)
23253       (horizontal 4
23254         (group 1.0)
23255         (article 10)))))
23256 @end lisp
23258 You might want to have several frames as well.  No prob---just use the
23259 @code{frame} split:
23261 @lisp
23262 (gnus-configure-frame
23263  '(frame 1.0
23264          (vertical 1.0
23265                    (summary 0.25 point frame-focus)
23266                    (article 1.0))
23267          (vertical ((height . 5) (width . 15)
23268                     (user-position . t)
23269                     (left . -1) (top . 1))
23270                    (picon 1.0))))
23272 @end lisp
23274 This split will result in the familiar summary/article window
23275 configuration in the first (or ``main'') frame, while a small additional
23276 frame will be created where picons will be shown.  As you can see,
23277 instead of the normal @code{1.0} top-level spec, each additional split
23278 should have a frame parameter alist as the size spec.
23279 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
23280 Reference Manual}.  Under XEmacs, a frame property list will be
23281 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
23282 is such a plist.
23283 The list of all possible keys for @code{gnus-buffer-configuration} can
23284 be found in its default value.
23286 Note that the @code{message} key is used for both
23287 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
23288 it is desirable to distinguish between the two, something like this
23289 might be used:
23291 @lisp
23292 (message (horizontal 1.0
23293                      (vertical 1.0 (message 1.0 point))
23294                      (vertical 0.24
23295                                (if (buffer-live-p gnus-summary-buffer)
23296                                    '(summary 0.5))
23297                                (group 1.0))))
23298 @end lisp
23300 One common desire for a multiple frame split is to have a separate frame
23301 for composing mail and news while leaving the original frame intact.  To
23302 accomplish that, something like the following can be done:
23304 @lisp
23305 (message
23306   (frame 1.0
23307          (if (not (buffer-live-p gnus-summary-buffer))
23308              (car (cdr (assoc 'group gnus-buffer-configuration)))
23309            (car (cdr (assoc 'summary gnus-buffer-configuration))))
23310          (vertical ((user-position . t) (top . 1) (left . 1)
23311                     (name . "Message"))
23312                    (message 1.0 point))))
23313 @end lisp
23315 @findex gnus-add-configuration
23316 Since the @code{gnus-buffer-configuration} variable is so long and
23317 complicated, there's a function you can use to ease changing the config
23318 of a single setting: @code{gnus-add-configuration}.  If, for instance,
23319 you want to change the @code{article} setting, you could say:
23321 @lisp
23322 (gnus-add-configuration
23323  '(article (vertical 1.0
23324                (group 4)
23325                (summary .25 point)
23326                (article 1.0))))
23327 @end lisp
23329 You'd typically stick these @code{gnus-add-configuration} calls in your
23330 @file{~/.gnus.el} file or in some startup hook---they should be run after
23331 Gnus has been loaded.
23333 @vindex gnus-always-force-window-configuration
23334 If all windows mentioned in the configuration are already visible, Gnus
23335 won't change the window configuration.  If you always want to force the
23336 ``right'' window configuration, you can set
23337 @code{gnus-always-force-window-configuration} to non-@code{nil}.
23339 If you're using tree displays (@pxref{Tree Display}), and the tree
23340 window is displayed vertically next to another window, you may also want
23341 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
23342 windows resized.
23344 @subsection Example Window Configurations
23346 @itemize @bullet
23347 @item
23348 Narrow left hand side occupied by group buffer.  Right hand side split
23349 between summary buffer (top one-sixth) and article buffer (bottom).
23351 @ifinfo
23352 @example
23353 +---+---------+
23354 | G | Summary |
23355 | r +---------+
23356 | o |         |
23357 | u | Article |
23358 | p |         |
23359 +---+---------+
23360 @end example
23361 @end ifinfo
23363 @lisp
23364 (gnus-add-configuration
23365  '(article
23366    (horizontal 1.0
23367                (vertical 25 (group 1.0))
23368                (vertical 1.0
23369                          (summary 0.16 point)
23370                          (article 1.0)))))
23372 (gnus-add-configuration
23373  '(summary
23374    (horizontal 1.0
23375                (vertical 25 (group 1.0))
23376                (vertical 1.0 (summary 1.0 point)))))
23377 @end lisp
23379 @end itemize
23382 @node Faces and Fonts
23383 @section Faces and Fonts
23384 @cindex faces
23385 @cindex fonts
23386 @cindex colors
23388 Fiddling with fonts and faces used to be very difficult, but these days
23389 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
23390 the face you want to alter, and alter it via the standard Customize
23391 interface.
23394 @node Compilation
23395 @section Compilation
23396 @cindex compilation
23397 @cindex byte-compilation
23399 @findex gnus-compile
23401 Remember all those line format specification variables?
23402 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
23403 on.  Now, Gnus will of course heed whatever these variables are, but,
23404 unfortunately, changing them will mean a quite significant slow-down.
23405 (The default values of these variables have byte-compiled functions
23406 associated with them, while the user-generated versions do not, of
23407 course.)
23409 To help with this, you can run @kbd{M-x gnus-compile} after you've
23410 fiddled around with the variables and feel that you're (kind of)
23411 satisfied.  This will result in the new specs being byte-compiled, and
23412 you'll get top speed again.  Gnus will save these compiled specs in the
23413 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
23414 this function, though---you should compile them yourself by sticking
23415 them into the @file{~/.gnus.el} file and byte-compiling that file.)
23418 @node Mode Lines
23419 @section Mode Lines
23420 @cindex mode lines
23422 @vindex gnus-updated-mode-lines
23423 @code{gnus-updated-mode-lines} says what buffers should keep their mode
23424 lines updated.  It is a list of symbols.  Supported symbols include
23425 @code{group}, @code{article}, @code{summary}, @code{server},
23426 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
23427 Gnus will keep that mode line updated with information that may be
23428 pertinent.  If this variable is @code{nil}, screen refresh may be
23429 quicker.
23431 @cindex display-time
23433 @vindex gnus-mode-non-string-length
23434 By default, Gnus displays information on the current article in the mode
23435 lines of the summary and article buffers.  The information Gnus wishes
23436 to display (e.g. the subject of the article) is often longer than the
23437 mode lines, and therefore have to be cut off at some point.  The
23438 @code{gnus-mode-non-string-length} variable says how long the other
23439 elements on the line is (i.e., the non-info part).  If you put
23440 additional elements on the mode line (e.g. a clock), you should modify
23441 this variable:
23443 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
23444 @lisp
23445 (add-hook 'display-time-hook
23446           (lambda () (setq gnus-mode-non-string-length
23447                            (+ 21
23448                               (if line-number-mode 5 0)
23449                               (if column-number-mode 4 0)
23450                               (length display-time-string)))))
23451 @end lisp
23453 If this variable is @code{nil} (which is the default), the mode line
23454 strings won't be chopped off, and they won't be padded either.  Note
23455 that the default is unlikely to be desirable, as even the percentage
23456 complete in the buffer may be crowded off the mode line; the user should
23457 configure this variable appropriately for her configuration.
23460 @node Highlighting and Menus
23461 @section Highlighting and Menus
23462 @cindex visual
23463 @cindex highlighting
23464 @cindex menus
23466 @vindex gnus-visual
23467 The @code{gnus-visual} variable controls most of the Gnus-prettifying
23468 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
23469 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
23470 file.
23472 This variable can be a list of visual properties that are enabled.  The
23473 following elements are valid, and are all included by default:
23475 @table @code
23476 @item group-highlight
23477 Do highlights in the group buffer.
23478 @item summary-highlight
23479 Do highlights in the summary buffer.
23480 @item article-highlight
23481 Do highlights in the article buffer.
23482 @item highlight
23483 Turn on highlighting in all buffers.
23484 @item group-menu
23485 Create menus in the group buffer.
23486 @item summary-menu
23487 Create menus in the summary buffers.
23488 @item article-menu
23489 Create menus in the article buffer.
23490 @item browse-menu
23491 Create menus in the browse buffer.
23492 @item server-menu
23493 Create menus in the server buffer.
23494 @item score-menu
23495 Create menus in the score buffers.
23496 @item menu
23497 Create menus in all buffers.
23498 @end table
23500 So if you only want highlighting in the article buffer and menus in all
23501 buffers, you could say something like:
23503 @lisp
23504 (setq gnus-visual '(article-highlight menu))
23505 @end lisp
23507 If you want highlighting only and no menus whatsoever, you'd say:
23509 @lisp
23510 (setq gnus-visual '(highlight))
23511 @end lisp
23513 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
23514 in all Gnus buffers.
23516 Other general variables that influence the look of all buffers include:
23518 @table @code
23519 @item gnus-mouse-face
23520 @vindex gnus-mouse-face
23521 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
23522 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
23524 @end table
23526 There are hooks associated with the creation of all the different menus:
23528 @table @code
23530 @item gnus-article-menu-hook
23531 @vindex gnus-article-menu-hook
23532 Hook called after creating the article mode menu.
23534 @item gnus-group-menu-hook
23535 @vindex gnus-group-menu-hook
23536 Hook called after creating the group mode menu.
23538 @item gnus-summary-menu-hook
23539 @vindex gnus-summary-menu-hook
23540 Hook called after creating the summary mode menu.
23542 @item gnus-server-menu-hook
23543 @vindex gnus-server-menu-hook
23544 Hook called after creating the server mode menu.
23546 @item gnus-browse-menu-hook
23547 @vindex gnus-browse-menu-hook
23548 Hook called after creating the browse mode menu.
23550 @item gnus-score-menu-hook
23551 @vindex gnus-score-menu-hook
23552 Hook called after creating the score mode menu.
23554 @end table
23557 @node Buttons
23558 @section Buttons
23559 @cindex buttons
23560 @cindex mouse
23561 @cindex click
23563 Those new-fangled @dfn{mouse} contraptions is very popular with the
23564 young, hep kids who don't want to learn the proper way to do things
23565 these days.  Why, I remember way back in the summer of '89, when I was
23566 using Emacs on a Tops 20 system.  Three hundred users on one single
23567 machine, and every user was running Simula compilers.  Bah!
23569 Right.
23571 @vindex gnus-carpal
23572 Well, you can make Gnus display bufferfuls of buttons you can click to
23573 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
23574 really.  Tell the chiropractor I sent you.
23577 @table @code
23579 @item gnus-carpal-mode-hook
23580 @vindex gnus-carpal-mode-hook
23581 Hook run in all carpal mode buffers.
23583 @item gnus-carpal-button-face
23584 @vindex gnus-carpal-button-face
23585 Face used on buttons.
23587 @item gnus-carpal-header-face
23588 @vindex gnus-carpal-header-face
23589 Face used on carpal buffer headers.
23591 @item gnus-carpal-group-buffer-buttons
23592 @vindex gnus-carpal-group-buffer-buttons
23593 Buttons in the group buffer.
23595 @item gnus-carpal-summary-buffer-buttons
23596 @vindex gnus-carpal-summary-buffer-buttons
23597 Buttons in the summary buffer.
23599 @item gnus-carpal-server-buffer-buttons
23600 @vindex gnus-carpal-server-buffer-buttons
23601 Buttons in the server buffer.
23603 @item gnus-carpal-browse-buffer-buttons
23604 @vindex gnus-carpal-browse-buffer-buttons
23605 Buttons in the browse buffer.
23606 @end table
23608 All the @code{buttons} variables are lists.  The elements in these list
23609 are either cons cells where the @code{car} contains a text to be displayed and
23610 the @code{cdr} contains a function symbol, or a simple string.
23613 @node Daemons
23614 @section Daemons
23615 @cindex demons
23616 @cindex daemons
23618 Gnus, being larger than any program ever written (allegedly), does lots
23619 of strange stuff that you may wish to have done while you're not
23620 present.  For instance, you may want it to check for new mail once in a
23621 while.  Or you may want it to close down all connections to all servers
23622 when you leave Emacs idle.  And stuff like that.
23624 Gnus will let you do stuff like that by defining various
23625 @dfn{handlers}.  Each handler consists of three elements:  A
23626 @var{function}, a @var{time}, and an @var{idle} parameter.
23628 Here's an example of a handler that closes connections when Emacs has
23629 been idle for thirty minutes:
23631 @lisp
23632 (gnus-demon-close-connections nil 30)
23633 @end lisp
23635 Here's a handler that scans for @acronym{PGP} headers every hour when
23636 Emacs is idle:
23638 @lisp
23639 (gnus-demon-scan-pgp 60 t)
23640 @end lisp
23642 This @var{time} parameter and that @var{idle} parameter work together
23643 in a strange, but wonderful fashion.  Basically, if @var{idle} is
23644 @code{nil}, then the function will be called every @var{time} minutes.
23646 If @var{idle} is @code{t}, then the function will be called after
23647 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
23648 the function will never be called.  But once Emacs goes idle, the
23649 function will be called every @var{time} minutes.
23651 If @var{idle} is a number and @var{time} is a number, the function will
23652 be called every @var{time} minutes only when Emacs has been idle for
23653 @var{idle} minutes.
23655 If @var{idle} is a number and @var{time} is @code{nil}, the function
23656 will be called once every time Emacs has been idle for @var{idle}
23657 minutes.
23659 And if @var{time} is a string, it should look like @samp{07:31}, and
23660 the function will then be called once every day somewhere near that
23661 time.  Modified by the @var{idle} parameter, of course.
23663 @vindex gnus-demon-timestep
23664 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
23665 seconds.  This is 60 by default.  If you change that variable,
23666 all the timings in the handlers will be affected.)
23668 So, if you want to add a handler, you could put something like this in
23669 your @file{~/.gnus.el} file:
23671 @findex gnus-demon-add-handler
23672 @lisp
23673 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
23674 @end lisp
23676 @findex gnus-demon-add-nocem
23677 @findex gnus-demon-add-scanmail
23678 @findex gnus-demon-add-rescan
23679 @findex gnus-demon-add-scan-timestamps
23680 @findex gnus-demon-add-disconnection
23681 Some ready-made functions to do this have been created:
23682 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
23683 @code{gnus-demon-add-nntp-close-connection},
23684 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
23685 @code{gnus-demon-add-scanmail}.  Just put those functions in your
23686 @file{~/.gnus.el} if you want those abilities.
23688 @findex gnus-demon-init
23689 @findex gnus-demon-cancel
23690 @vindex gnus-demon-handlers
23691 If you add handlers to @code{gnus-demon-handlers} directly, you should
23692 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
23693 daemons, you can use the @code{gnus-demon-cancel} function.
23695 Note that adding daemons can be pretty naughty if you over do it.  Adding
23696 functions that scan all news and mail from all servers every two seconds
23697 is a sure-fire way of getting booted off any respectable system.  So
23698 behave.
23701 @node NoCeM
23702 @section NoCeM
23703 @cindex nocem
23704 @cindex spam
23706 @dfn{Spamming} is posting the same article lots and lots of times.
23707 Spamming is bad.  Spamming is evil.
23709 Spamming is usually canceled within a day or so by various anti-spamming
23710 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
23711 NoCeM is pronounced ``no see-'em'', and means what the name
23712 implies---these are messages that make the offending articles, like, go
23713 away.
23715 What use are these NoCeM messages if the articles are canceled anyway?
23716 Some sites do not honor cancel messages and some sites just honor cancels
23717 from a select few people.  Then you may wish to make use of the NoCeM
23718 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
23720 Gnus can read and parse the messages in this group automatically, and
23721 this will make spam disappear.
23723 There are some variables to customize, of course:
23725 @table @code
23726 @item gnus-use-nocem
23727 @vindex gnus-use-nocem
23728 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
23729 by default.
23731 You can also set this variable to a positive number as a group level.
23732 In that case, Gnus scans NoCeM messages when checking new news if this
23733 value is not exceeding a group level that you specify as the prefix
23734 argument to some commands, e.g. @code{gnus},
23735 @code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
23736 NoCeM messages if you specify a group level to those commands.  For
23737 example, if you use 1 or 2 on the mail groups and the levels on the news
23738 groups remain the default, 3 is the best choice.
23740 @item gnus-nocem-groups
23741 @vindex gnus-nocem-groups
23742 Gnus will look for NoCeM messages in the groups in this list.  The
23743 default is
23744 @lisp
23745 ("news.lists.filters" "news.admin.net-abuse.bulletins"
23746  "alt.nocem.misc" "news.admin.net-abuse.announce")
23747 @end lisp
23749 @item gnus-nocem-issuers
23750 @vindex gnus-nocem-issuers
23751 There are many people issuing NoCeM messages.  This list says what
23752 people you want to listen to.  The default is
23753 @lisp
23754 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
23755  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
23756 @end lisp
23757 fine, upstanding citizens all of them.
23759 Known despammers that you can put in this list are listed at@*
23760 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
23762 You do not have to heed NoCeM messages from all these people---just the
23763 ones you want to listen to.  You also don't have to accept all NoCeM
23764 messages from the people you like.  Each NoCeM message has a @dfn{type}
23765 header that gives the message a (more or less, usually less) rigorous
23766 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
23767 @samp{binary}, and @samp{troll}.  To specify this, you have to use
23768 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
23769 Each condition is either a string (which is a regexp that matches types
23770 you want to use) or a list on the form @code{(not @var{string})}, where
23771 @var{string} is a regexp that matches types you don't want to use.
23773 For instance, if you want all NoCeM messages from Chris Lewis except his
23774 @samp{troll} messages, you'd say:
23776 @lisp
23777 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
23778 @end lisp
23780 On the other hand, if you just want nothing but his @samp{spam} and
23781 @samp{spew} messages, you'd say:
23783 @lisp
23784 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
23785 @end lisp
23787 The specs are applied left-to-right.
23790 @item gnus-nocem-verifyer
23791 @vindex gnus-nocem-verifyer
23792 @findex pgg-verify
23793 This should be a function for verifying that the NoCeM issuer is who she
23794 says she is.  The default is @code{pgg-verify}, which returns
23795 non-@code{nil} if the verification is successful, otherwise (including
23796 the case the NoCeM message was not signed) returns @code{nil}.  If this
23797 is too slow and you don't care for verification (which may be dangerous),
23798 you can set this variable to @code{nil}.
23800 Formerly the default was @code{mc-verify}, which is a Mailcrypt
23801 function.  While you can still use it, you can change it into
23802 @code{pgg-verify} running with GnuPG if you are willing to add the
23803 @acronym{PGP} public keys to GnuPG's keyring.
23805 @item gnus-nocem-directory
23806 @vindex gnus-nocem-directory
23807 This is where Gnus will store its NoCeM cache files.  The default is@*
23808 @file{~/News/NoCeM/}.
23810 @item gnus-nocem-expiry-wait
23811 @vindex gnus-nocem-expiry-wait
23812 The number of days before removing old NoCeM entries from the cache.
23813 The default is 15.  If you make it shorter Gnus will be faster, but you
23814 might then see old spam.
23816 @item gnus-nocem-check-from
23817 @vindex gnus-nocem-check-from
23818 Non-@code{nil} means check for valid issuers in message bodies.
23819 Otherwise don't bother fetching articles unless their author matches a
23820 valid issuer; that is much faster if you are selective about the
23821 issuers.
23823 @item gnus-nocem-check-article-limit
23824 @vindex gnus-nocem-check-article-limit
23825 If non-@code{nil}, the maximum number of articles to check in any NoCeM
23826 group.  NoCeM groups can be huge and very slow to process.
23828 @end table
23830 Using NoCeM could potentially be a memory hog.  If you have many living
23831 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
23832 big.  If this is a problem, you should kill off all (or most) of your
23833 unsubscribed groups (@pxref{Subscription Commands}).
23836 @node Undo
23837 @section Undo
23838 @cindex undo
23840 It is very useful to be able to undo actions one has done.  In normal
23841 Emacs buffers, it's easy enough---you just push the @code{undo} button.
23842 In Gnus buffers, however, it isn't that simple.
23844 The things Gnus displays in its buffer is of no value whatsoever to
23845 Gnus---it's all just data designed to look nice to the user.
23846 Killing a group in the group buffer with @kbd{C-k} makes the line
23847 disappear, but that's just a side-effect of the real action---the
23848 removal of the group in question from the internal Gnus structures.
23849 Undoing something like that can't be done by the normal Emacs
23850 @code{undo} function.
23852 Gnus tries to remedy this somewhat by keeping track of what the user
23853 does and coming up with actions that would reverse the actions the user
23854 takes.  When the user then presses the @code{undo} key, Gnus will run
23855 the code to reverse the previous action, or the previous actions.
23856 However, not all actions are easily reversible, so Gnus currently offers
23857 a few key functions to be undoable.  These include killing groups,
23858 yanking groups, and changing the list of read articles of groups.
23859 That's it, really.  More functions may be added in the future, but each
23860 added function means an increase in data to be stored, so Gnus will
23861 never be totally undoable.
23863 @findex gnus-undo-mode
23864 @vindex gnus-use-undo
23865 @findex gnus-undo
23866 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
23867 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
23868 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
23869 command, which should feel kinda like the normal Emacs @code{undo}
23870 command.
23873 @node Predicate Specifiers
23874 @section Predicate Specifiers
23875 @cindex predicate specifiers
23877 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
23878 form that allows flexible specification of predicates without having
23879 to type all that much.
23881 These specifiers are lists consisting of functions, symbols and lists.
23883 Here's an example:
23885 @lisp
23886 (or gnus-article-unseen-p
23887     gnus-article-unread-p)
23888 @end lisp
23890 The available symbols are @code{or}, @code{and} and @code{not}.  The
23891 functions all take one parameter.
23893 @findex gnus-make-predicate
23894 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
23895 to create a function that can be called.  This input parameter to this
23896 function will be passed along to all the functions in the predicate
23897 specifier.
23900 @node Moderation
23901 @section Moderation
23902 @cindex moderation
23904 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
23905 It is not included in the standard Gnus package.  Write a mail to
23906 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
23907 get a copy.
23909 The moderation package is implemented as a minor mode for summary
23910 buffers.  Put
23912 @lisp
23913 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
23914 @end lisp
23916 in your @file{~/.gnus.el} file.
23918 If you are the moderator of @samp{rec.zoofle}, this is how it's
23919 supposed to work:
23921 @enumerate
23922 @item
23923 You split your incoming mail by matching on
23924 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
23925 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
23927 @item
23928 You enter that group once in a while and post articles using the @kbd{e}
23929 (edit-and-post) or @kbd{s} (just send unedited) commands.
23931 @item
23932 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
23933 articles that weren't approved by you, you can cancel them with the
23934 @kbd{c} command.
23935 @end enumerate
23937 To use moderation mode in these two groups, say:
23939 @lisp
23940 (setq gnus-moderated-list
23941       "^nnml:rec.zoofle$\\|^rec.zoofle$")
23942 @end lisp
23945 @node Fetching a Group
23946 @section Fetching a Group
23947 @cindex fetching a group
23949 @findex gnus-fetch-group
23950 It is sometimes convenient to be able to just say ``I want to read this
23951 group and I don't care whether Gnus has been started or not''.  This is
23952 perhaps more useful for people who write code than for users, but the
23953 command @code{gnus-fetch-group} provides this functionality in any case.
23954 It takes the group name as a parameter.
23957 @node Image Enhancements
23958 @section Image Enhancements
23960 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
23961 support images, Emacs 22 does.} and up, are able to display pictures and
23962 stuff, so Gnus has taken advantage of that.
23964 @menu
23965 * X-Face::                      Display a funky, teensy black-and-white image.
23966 * Face::                        Display a funkier, teensier colored image.
23967 * Smileys::                     Show all those happy faces the way they were meant to be shown.
23968 * Picons::                      How to display pictures of what you're reading.
23969 * XVarious::                    Other XEmacsy Gnusey variables.
23970 @end menu
23973 @node X-Face
23974 @subsection X-Face
23975 @cindex x-face
23977 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
23978 depth) image that's supposed to represent the author of the message.
23979 It seems to be supported by an ever-growing number of mail and news
23980 readers.
23982 @cindex x-face
23983 @findex gnus-article-display-x-face
23984 @vindex gnus-article-x-face-command
23985 @vindex gnus-article-x-face-too-ugly
23986 @iftex
23987 @iflatex
23988 \include{xface}
23989 @end iflatex
23990 @end iftex
23991 @c @anchor{X-Face}
23993 Viewing an @code{X-Face} header either requires an Emacs that has
23994 @samp{compface} support (which most XEmacs versions have), or that you
23995 have suitable conversion or display programs installed.  If your Emacs
23996 has image support the default action is to display the face before the
23997 @code{From} header.  If there's no native @code{X-Face} support, Gnus
23998 will try to convert the @code{X-Face} header using external programs
23999 from the @code{pbmplus} package and friends, see below.  For XEmacs it's
24000 faster if XEmacs has been compiled with @code{X-Face} support.  The
24001 default action under Emacs without image support is to fork off the
24002 @code{display} program.
24004 On a GNU/Linux system, the @code{display} program is included in the
24005 ImageMagick package.  For external conversion programs look for packages
24006 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
24007 On Windows, you may use the packages @code{netpbm} and @code{compface}
24008 from @url{http://gnuwin32.sourceforge.net}.  You need to add the
24009 @code{bin} directory to your @code{PATH} environment variable.
24010 @c In fact only the following DLLs and binaries seem to be required:
24011 @c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
24013 The variable @code{gnus-article-x-face-command} controls which programs
24014 are used to display the @code{X-Face} header.  If this variable is a
24015 string, this string will be executed in a sub-shell.  If it is a
24016 function, this function will be called with the face as the argument.
24017 If @code{gnus-article-x-face-too-ugly} (which is a regexp) matches the
24018 @code{From} header, the face will not be shown.
24020 (Note: @code{x-face} is used in the variable/function names, not
24021 @code{xface}).
24023 @noindent
24024 Face and variable:
24026 @table @code
24027 @item gnus-x-face
24028 @vindex gnus-x-face
24029 Face to show X-Face.  The colors from this face are used as the
24030 foreground and background colors of the displayed X-Faces.  The
24031 default colors are black and white.
24033 @item gnus-face-properties-alist
24034 @vindex gnus-face-properties-alist
24035 Alist of image types and properties applied to Face (@pxref{Face}) and
24036 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
24037 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
24038 XEmacs.  Here are examples:
24040 @lisp
24041 ;; Specify the altitude of Face and X-Face images in the From header.
24042 (setq gnus-face-properties-alist
24043       '((pbm . (:face gnus-x-face :ascent 80))
24044         (png . (:ascent 80))))
24046 ;; Show Face and X-Face images as pressed buttons.
24047 (setq gnus-face-properties-alist
24048       '((pbm . (:face gnus-x-face :relief -2))
24049         (png . (:relief -2))))
24050 @end lisp
24052 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
24053 Reference Manual} for the valid properties for various image types.
24054 Currently, @code{pbm} is used for X-Face images and @code{png} is used
24055 for Face images in Emacs.  Only the @code{:face} property is effective
24056 on the @code{xface} image type in XEmacs if it is built with the
24057 @samp{libcompface} library.
24058 @end table
24060 If you use posting styles, you can use an @code{x-face-file} entry in
24061 @code{gnus-posting-styles}, @xref{Posting Styles}.  If you don't, Gnus
24062 provides a few convenience functions and variables to allow easier
24063 insertion of X-Face headers in outgoing messages.  You also need the
24064 above mentioned ImageMagick, netpbm or other image conversion packages
24065 (depending the values of the variables below) for these functions.
24067 @findex gnus-random-x-face
24068 @vindex gnus-convert-pbm-to-x-face-command
24069 @vindex gnus-x-face-directory
24070 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
24071 @code{gnus-x-face-directory} and picks one at random, and then
24072 converts it to the X-Face format by using the
24073 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
24074 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
24075 header data as a string.
24077 @findex gnus-insert-random-x-face-header
24078 @code{gnus-insert-random-x-face-header} calls
24079 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
24080 randomly generated data.
24082 @findex gnus-x-face-from-file
24083 @vindex gnus-convert-image-to-x-face-command
24084 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
24085 converts the file to X-Face format by using the
24086 @code{gnus-convert-image-to-x-face-command} shell command.
24088 Here's how you would typically use the first function.  Put something
24089 like the following in your @file{~/.gnus.el} file:
24091 @lisp
24092 (setq message-required-news-headers
24093       (nconc message-required-news-headers
24094              (list '(X-Face . gnus-random-x-face))))
24095 @end lisp
24097 Using the last function would be something like this:
24099 @lisp
24100 (setq message-required-news-headers
24101       (nconc message-required-news-headers
24102              (list '(X-Face . (lambda ()
24103                                 (gnus-x-face-from-file
24104                                  "~/My-face.gif"))))))
24105 @end lisp
24108 @node Face
24109 @subsection Face
24110 @cindex face
24112 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
24114 @code{Face} headers are essentially a funkier version of @code{X-Face}
24115 ones. They describe a 48x48 pixel colored image that's supposed to
24116 represent the author of the message.
24118 @cindex face
24119 @findex gnus-article-display-face
24120 The contents of a @code{Face} header must be a base64 encoded PNG image.
24121 See @uref{http://quimby.gnus.org/circus/face/} for the precise
24122 specifications.
24124 The @code{gnus-face-properties-alist} variable affects the appearance of
24125 displayed Face images.  @xref{X-Face}.
24127 Viewing an @code{Face} header requires an Emacs that is able to display
24128 PNG images.
24129 @c Maybe add this:
24130 @c (if (featurep 'xemacs)
24131 @c     (featurep 'png)
24132 @c   (image-type-available-p 'png))
24134 Gnus provides a few convenience functions and variables to allow
24135 easier insertion of Face headers in outgoing messages.
24137 @findex gnus-convert-png-to-face
24138 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
24139 726 bytes long, and converts it to a face.
24141 @findex gnus-face-from-file
24142 @vindex gnus-convert-image-to-face-command
24143 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
24144 converts the file to Face format by using the
24145 @code{gnus-convert-image-to-face-command} shell command.
24147 Here's how you would typically use this function. Put something like the
24148 following in your @file{~/.gnus.el} file:
24150 @lisp
24151 (setq message-required-news-headers
24152       (nconc message-required-news-headers
24153              (list '(Face . (lambda ()
24154                               (gnus-face-from-file "~/face.jpg"))))))
24155 @end lisp
24158 @node Smileys
24159 @subsection Smileys
24160 @cindex smileys
24162 @iftex
24163 @iflatex
24164 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
24165 \input{smiley}
24166 @end iflatex
24167 @end iftex
24169 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
24170 currently the only package that uses Smiley, it is documented here.
24172 In short---to use Smiley in Gnus, put the following in your
24173 @file{~/.gnus.el} file:
24175 @lisp
24176 (setq gnus-treat-display-smileys t)
24177 @end lisp
24179 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
24180 the like---to pictures and displays those instead of the text smiley
24181 faces.  The conversion is controlled by a list of regexps that matches
24182 text and maps that to file names.
24184 @vindex smiley-regexp-alist
24185 The alist used is specified by the @code{smiley-regexp-alist}
24186 variable.  The first item in each element is the regexp to be matched;
24187 the second element is the regexp match group that is to be replaced by
24188 the picture; and the third element is the name of the file to be
24189 displayed.
24191 The following variables customize the appearance of the smileys:
24193 @table @code
24195 @item smiley-style
24196 @vindex smiley-style
24197 Specifies the smiley style.  Predefined smiley styles include
24198 @code{low-color} (small 13x14 pixel, three-color images), @code{medium}
24199 (more colorful images, 16x16 pixel), and @code{grayscale} (grayscale
24200 images, 14x14 pixel).  The default depends on the height of the default
24201 face.
24203 @item smiley-data-directory
24204 @vindex smiley-data-directory
24205 Where Smiley will look for smiley faces files.  You shouldn't set this
24206 variable anymore.  Customize @code{smiley-style} instead.
24208 @item gnus-smiley-file-types
24209 @vindex gnus-smiley-file-types
24210 List of suffixes on smiley file names to try.
24212 @end table
24215 @node Picons
24216 @subsection Picons
24218 @iftex
24219 @iflatex
24220 \include{picons}
24221 @end iflatex
24222 @end iftex
24224 So@dots{}  You want to slow down your news reader even more!  This is a
24225 good way to do so.  It's also a great way to impress people staring
24226 over your shoulder as you read news.
24228 What are Picons?  To quote directly from the Picons Web site:
24230 @iftex
24231 @iflatex
24232 \margindex{}
24233 @end iflatex
24234 @end iftex
24236 @quotation
24237 @dfn{Picons} is short for ``personal icons''.  They're small,
24238 constrained images used to represent users and domains on the net,
24239 organized into databases so that the appropriate image for a given
24240 e-mail address can be found.  Besides users and domains, there are picon
24241 databases for Usenet newsgroups and weather forecasts.  The picons are
24242 in either monochrome @code{XBM} format or color @code{XPM} and
24243 @code{GIF} formats.
24244 @end quotation
24246 @vindex gnus-picon-databases
24247 For instructions on obtaining and installing the picons databases,
24248 point your Web browser at
24249 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
24251 If you are using Debian GNU/Linux, saying @samp{apt-get install
24252 picons.*} will install the picons where Gnus can find them.
24254 To enable displaying picons, simply make sure that
24255 @code{gnus-picon-databases} points to the directory containing the
24256 Picons databases.
24258 @vindex gnus-picon-style
24259 The variable @code{gnus-picon-style} controls how picons are displayed.
24260 If @code{inline}, the textual representation is replaced.  If
24261 @code{right}, picons are added right to the textual representation.
24263 The following variables offer control over where things are located.
24265 @table @code
24267 @item gnus-picon-databases
24268 @vindex gnus-picon-databases
24269 The location of the picons database.  This is a list of directories
24270 containing the @file{news}, @file{domains}, @file{users} (and so on)
24271 subdirectories.  Defaults to @code{("/usr/lib/picon"
24272 "/usr/local/faces")}.
24274 @item gnus-picon-news-directories
24275 @vindex gnus-picon-news-directories
24276 List of subdirectories to search in @code{gnus-picon-databases} for
24277 newsgroups faces.  @code{("news")} is the default.
24279 @item gnus-picon-user-directories
24280 @vindex gnus-picon-user-directories
24281 List of subdirectories to search in @code{gnus-picon-databases} for user
24282 faces.  @code{("users" "usenix" "local" "misc")} is the default.
24284 @item gnus-picon-domain-directories
24285 @vindex gnus-picon-domain-directories
24286 List of subdirectories to search in @code{gnus-picon-databases} for
24287 domain name faces.  Defaults to @code{("domains")}.  Some people may
24288 want to add @samp{"unknown"} to this list.
24290 @item gnus-picon-file-types
24291 @vindex gnus-picon-file-types
24292 Ordered list of suffixes on picon file names to try.  Defaults to
24293 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
24295 @end table
24298 @node XVarious
24299 @subsection Various XEmacs Variables
24301 @table @code
24302 @item gnus-xmas-glyph-directory
24303 @vindex gnus-xmas-glyph-directory
24304 This is where Gnus will look for pictures.  Gnus will normally
24305 auto-detect this directory, but you may set it manually if you have an
24306 unusual directory structure.
24308 @item gnus-xmas-modeline-glyph
24309 @vindex gnus-xmas-modeline-glyph
24310 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
24311 default.
24313 @end table
24315 @subsubsection Toolbar
24317 @table @code
24319 @item gnus-use-toolbar
24320 @vindex gnus-use-toolbar
24321 This variable specifies the position to display the toolbar.  If
24322 @code{nil}, don't display toolbars.  If it is non-@code{nil}, it should
24323 be one of the symbols @code{default}, @code{top}, @code{bottom},
24324 @code{right}, and @code{left}.  @code{default} means to use the default
24325 toolbar, the rest mean to display the toolbar on the place which those
24326 names show.  The default is @code{default}.
24328 @item gnus-toolbar-thickness
24329 @vindex gnus-toolbar-thickness
24330 Cons of the height and the width specifying the thickness of a toolbar.
24331 The height is used for the toolbar displayed on the top or the bottom,
24332 the width is used for the toolbar displayed on the right or the left.
24333 The default is that of the default toolbar.
24335 @item gnus-group-toolbar
24336 @vindex gnus-group-toolbar
24337 The toolbar in the group buffer.
24339 @item gnus-summary-toolbar
24340 @vindex gnus-summary-toolbar
24341 The toolbar in the summary buffer.
24343 @item gnus-summary-mail-toolbar
24344 @vindex gnus-summary-mail-toolbar
24345 The toolbar in the summary buffer of mail groups.
24347 @end table
24349 @iftex
24350 @iflatex
24351 \margindex{}
24352 @end iflatex
24353 @end iftex
24356 @node Fuzzy Matching
24357 @section Fuzzy Matching
24358 @cindex fuzzy matching
24360 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
24361 things like scoring, thread gathering and thread comparison.
24363 As opposed to regular expression matching, fuzzy matching is very fuzzy.
24364 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
24365 means, and the implementation has changed over time.
24367 Basically, it tries to remove all noise from lines before comparing.
24368 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
24369 out of the strings before comparing the results.  This often leads to
24370 adequate results---even when faced with strings generated by text
24371 manglers masquerading as newsreaders.
24374 @node Thwarting Email Spam
24375 @section Thwarting Email Spam
24376 @cindex email spam
24377 @cindex spam
24378 @cindex UCE
24379 @cindex unsolicited commercial email
24381 In these last days of the Usenet, commercial vultures are hanging about
24382 and grepping through news like crazy to find email addresses they can
24383 foist off their scams and products to.  As a reaction to this, many
24384 people have started putting nonsense addresses into their @code{From}
24385 lines.  I think this is counterproductive---it makes it difficult for
24386 people to send you legitimate mail in response to things you write, as
24387 well as making it difficult to see who wrote what.  This rewriting may
24388 perhaps be a bigger menace than the unsolicited commercial email itself
24389 in the end.
24391 The biggest problem I have with email spam is that it comes in under
24392 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
24393 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
24394 mail group, only to find two pyramid schemes, seven advertisements
24395 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
24396 and one mail asking me to repent and find some god.
24398 This is annoying.  Here's what you can do about it.
24400 @menu
24401 * The problem of spam::         Some background, and some solutions
24402 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
24403 * SpamAssassin::                How to use external anti-spam tools.
24404 * Hashcash::                    Reduce spam by burning CPU time.
24405 @end menu
24407 @node The problem of spam
24408 @subsection The problem of spam
24409 @cindex email spam
24410 @cindex spam filtering approaches
24411 @cindex filtering approaches, spam
24412 @cindex UCE
24413 @cindex unsolicited commercial email
24415 First, some background on spam.
24417 If you have access to e-mail, you are familiar with spam (technically
24418 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
24419 exists because e-mail delivery is very cheap compared to paper mail,
24420 so only a very small percentage of people need to respond to an UCE to
24421 make it worthwhile to the advertiser.  Ironically, one of the most
24422 common spams is the one offering a database of e-mail addresses for
24423 further spamming.  Senders of spam are usually called @emph{spammers},
24424 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
24425 @emph{morons} are in common use as well.
24427 Spam comes from a wide variety of sources.  It is simply impossible to
24428 dispose of all spam without discarding useful messages.  A good
24429 example is the TMDA system, which requires senders
24430 unknown to you to confirm themselves as legitimate senders before
24431 their e-mail can reach you.  Without getting into the technical side
24432 of TMDA, a downside is clearly that e-mail from legitimate sources may
24433 be discarded if those sources can't or won't confirm themselves
24434 through the TMDA system.  Another problem with TMDA is that it
24435 requires its users to have a basic understanding of e-mail delivery
24436 and processing.
24438 The simplest approach to filtering spam is filtering, at the mail
24439 server or when you sort through incoming mail.  If you get 200 spam
24440 messages per day from @samp{random-address@@vmadmin.com}, you block
24441 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
24442 discard all messages with @samp{VIAGRA} in the message.  If you get
24443 lots of spam from Bulgaria, for example, you try to filter all mail
24444 from Bulgarian IPs.
24446 This, unfortunately, is a great way to discard legitimate e-mail.  The
24447 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
24448 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
24449 you should be obvious, so don't do it if you have the choice.
24451 In another instance, the very informative and useful RISKS digest has
24452 been blocked by overzealous mail filters because it @strong{contained}
24453 words that were common in spam messages.  Nevertheless, in isolated
24454 cases, with great care, direct filtering of mail can be useful.
24456 Another approach to filtering e-mail is the distributed spam
24457 processing, for instance DCC implements such a system.  In essence,
24458 @var{N} systems around the world agree that a machine @var{X} in
24459 Ghana, Estonia, or California is sending out spam e-mail, and these
24460 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
24461 database.  The criteria for spam detection vary---it may be the number
24462 of messages sent, the content of the messages, and so on.  When a user
24463 of the distributed processing system wants to find out if a message is
24464 spam, he consults one of those @var{N} systems.
24466 Distributed spam processing works very well against spammers that send
24467 a large number of messages at once, but it requires the user to set up
24468 fairly complicated checks.  There are commercial and free distributed
24469 spam processing systems.  Distributed spam processing has its risks as
24470 well.  For instance legitimate e-mail senders have been accused of
24471 sending spam, and their web sites and mailing lists have been shut
24472 down for some time because of the incident.
24474 The statistical approach to spam filtering is also popular.  It is
24475 based on a statistical analysis of previous spam messages.  Usually
24476 the analysis is a simple word frequency count, with perhaps pairs of
24477 words or 3-word combinations thrown into the mix.  Statistical
24478 analysis of spam works very well in most of the cases, but it can
24479 classify legitimate e-mail as spam in some cases.  It takes time to
24480 run the analysis, the full message must be analyzed, and the user has
24481 to store the database of spam analysis.  Statistical analysis on the
24482 server is gaining popularity.  This has the advantage of letting the
24483 user Just Read Mail, but has the disadvantage that it's harder to tell
24484 the server that it has misclassified mail.
24486 Fighting spam is not easy, no matter what anyone says.  There is no
24487 magic switch that will distinguish Viagra ads from Mom's e-mails.
24488 Even people are having a hard time telling spam apart from non-spam,
24489 because spammers are actively looking to fool us into thinking they
24490 are Mom, essentially.  Spamming is irritating, irresponsible, and
24491 idiotic behavior from a bunch of people who think the world owes them
24492 a favor.  We hope the following sections will help you in fighting the
24493 spam plague.
24495 @node Anti-Spam Basics
24496 @subsection Anti-Spam Basics
24497 @cindex email spam
24498 @cindex spam
24499 @cindex UCE
24500 @cindex unsolicited commercial email
24502 One way of dealing with spam is having Gnus split out all spam into a
24503 @samp{spam} mail group (@pxref{Splitting Mail}).
24505 First, pick one (1) valid mail address that you can be reached at, and
24506 put it in your @code{From} header of all your news articles.  (I've
24507 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
24508 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
24509 sysadmin whether your sendmail installation accepts keywords in the local
24510 part of the mail address.)
24512 @lisp
24513 (setq message-default-news-headers
24514       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
24515 @end lisp
24517 Then put the following split rule in @code{nnmail-split-fancy}
24518 (@pxref{Fancy Mail Splitting}):
24520 @lisp
24521 (...
24522  (to "larsi@@trym.ifi.uio.no"
24523      (| ("subject" "re:.*" "misc")
24524         ("references" ".*@@.*" "misc")
24525         "spam"))
24526  ...)
24527 @end lisp
24529 This says that all mail to this address is suspect, but if it has a
24530 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
24531 header, it's probably ok.  All the rest goes to the @samp{spam} group.
24532 (This idea probably comes from Tim Pierce.)
24534 In addition, many mail spammers talk directly to your @acronym{SMTP} server
24535 and do not include your email address explicitly in the @code{To}
24536 header.  Why they do this is unknown---perhaps it's to thwart this
24537 thwarting scheme?  In any case, this is trivial to deal with---you just
24538 put anything not addressed to you in the @samp{spam} group by ending
24539 your fancy split rule in this way:
24541 @lisp
24543  ...
24544  (to "larsi" "misc")
24545  "spam")
24546 @end lisp
24548 In my experience, this will sort virtually everything into the right
24549 group.  You still have to check the @samp{spam} group from time to time to
24550 check for legitimate mail, though.  If you feel like being a good net
24551 citizen, you can even send off complaints to the proper authorities on
24552 each unsolicited commercial email---at your leisure.
24554 This works for me.  It allows people an easy way to contact me (they can
24555 just press @kbd{r} in the usual way), and I'm not bothered at all with
24556 spam.  It's a win-win situation.  Forging @code{From} headers to point
24557 to non-existent domains is yucky, in my opinion.
24559 Be careful with this approach.  Spammers are wise to it.
24562 @node SpamAssassin
24563 @subsection SpamAssassin, Vipul's Razor, DCC, etc
24564 @cindex SpamAssassin
24565 @cindex Vipul's Razor
24566 @cindex DCC
24568 The days where the hints in the previous section were sufficient in
24569 avoiding spam are coming to an end.  There are many tools out there
24570 that claim to reduce the amount of spam you get.  This section could
24571 easily become outdated fast, as new products replace old, but
24572 fortunately most of these tools seem to have similar interfaces.  Even
24573 though this section will use SpamAssassin as an example, it should be
24574 easy to adapt it to most other tools.
24576 Note that this section does not involve the @code{spam.el} package,
24577 which is discussed in the next section.  If you don't care for all
24578 the features of @code{spam.el}, you can make do with these simple
24579 recipes.
24581 If the tool you are using is not installed on the mail server, you
24582 need to invoke it yourself.  Ideas on how to use the
24583 @code{:postscript} mail source parameter (@pxref{Mail Source
24584 Specifiers}) follow.
24586 @lisp
24587 (setq mail-sources
24588       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
24589         (pop :user "jrl"
24590              :server "pophost"
24591              :postscript
24592              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
24593 @end lisp
24595 Once you manage to process your incoming spool somehow, thus making
24596 the mail contain e.g.@: a header indicating it is spam, you are ready to
24597 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
24599 @lisp
24600 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
24601                              ...))
24602 @end lisp
24604 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
24606 @lisp
24607 (setq nnmail-split-methods 'nnmail-split-fancy
24608       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
24609                              ...))
24610 @end lisp
24612 Some people might not like the idea of piping the mail through various
24613 programs using a @code{:prescript} (if some program is buggy, you
24614 might lose all mail).  If you are one of them, another solution is to
24615 call the external tools during splitting.  Example fancy split method:
24617 @lisp
24618 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
24619                              ...))
24620 (defun kevin-spamassassin ()
24621   (save-excursion
24622     (save-restriction
24623       (widen)
24624       (if (eq 1 (call-process-region (point-min) (point-max)
24625                                      "spamc" nil nil nil "-c"))
24626           "spam"))))
24627 @end lisp
24629 Note that with the nnimap back end, message bodies will not be
24630 downloaded by default.  You need to set
24631 @code{nnimap-split-download-body} to @code{t} to do that
24632 (@pxref{Splitting in IMAP}).
24634 That is about it.  As some spam is likely to get through anyway, you
24635 might want to have a nifty function to call when you happen to read
24636 spam.  And here is the nifty function:
24638 @lisp
24639  (defun my-gnus-raze-spam ()
24640   "Submit SPAM to Vipul's Razor, then mark it as expirable."
24641   (interactive)
24642   (gnus-summary-show-raw-article)
24643   (gnus-summary-save-in-pipe "razor-report -f -d")
24644   (gnus-summary-mark-as-expirable 1))
24645 @end lisp
24647 @node Hashcash
24648 @subsection Hashcash
24649 @cindex hashcash
24651 A novel technique to fight spam is to require senders to do something
24652 costly and demonstrably unique for each message they send.  This has
24653 the obvious drawback that you cannot rely on everyone in the world
24654 using this technique, since it is not part of the Internet standards,
24655 but it may be useful in smaller communities.
24657 While the tools in the previous section work well in practice, they
24658 work only because the tools are constantly maintained and updated as
24659 new form of spam appears.  This means that a small percentage of spam
24660 will always get through.  It also means that somewhere, someone needs
24661 to read lots of spam to update these tools.  Hashcash avoids that, but
24662 instead prefers that everyone you contact through e-mail supports the
24663 scheme.  You can view the two approaches as pragmatic vs dogmatic.
24664 The approaches have their own advantages and disadvantages, but as
24665 often in the real world, a combination of them is stronger than either
24666 one of them separately.
24668 @cindex X-Hashcash
24669 The ``something costly'' is to burn CPU time, more specifically to
24670 compute a hash collision up to a certain number of bits.  The
24671 resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
24672 For more details, and for the external application @code{hashcash} you
24673 need to install to use this feature, see
24674 @uref{http://www.hashcash.org/}.  Even more information can be found
24675 at @uref{http://www.camram.org/}.
24677 If you wish to generate hashcash for each message you send, you can
24678 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
24679 Headers,message, The Message Manual}), as in:
24681 @lisp
24682 (setq message-generate-hashcash t)
24683 @end lisp
24685 You will need to set up some additional variables as well:
24687 @table @code
24689 @item hashcash-default-payment
24690 @vindex hashcash-default-payment
24691 This variable indicates the default number of bits the hash collision
24692 should consist of.  By default this is 20.  Suggested useful values
24693 include 17 to 29.
24695 @item hashcash-payment-alist
24696 @vindex hashcash-payment-alist
24697 Some receivers may require you to spend burn more CPU time than the
24698 default.  This variable contains a list of @samp{(@var{addr}
24699 @var{amount})} cells, where @var{addr} is the receiver (email address
24700 or newsgroup) and @var{amount} is the number of bits in the collision
24701 that is needed.  It can also contain @samp{(@var{addr} @var{string}
24702 @var{amount})} cells, where the @var{string} is the string to use
24703 (normally the email address or newsgroup name is used).
24705 @item hashcash-path
24706 @vindex hashcash-path
24707 Where the @code{hashcash} binary is installed.  This variable should
24708 be automatically set by @code{executable-find}, but if it's @code{nil}
24709 (usually because the @code{hashcash} binary is not in your path)
24710 you'll get a warning when you check hashcash payments and an error
24711 when you generate hashcash payments.
24713 @end table
24715 Gnus can verify hashcash cookies, although this can also be done by
24716 hand customized mail filtering scripts.  To verify a hashcash cookie
24717 in a message, use the @code{mail-check-payment} function in the
24718 @code{hashcash.el} library.  You can also use the @code{spam.el}
24719 package with the @code{spam-use-hashcash} back end to validate hashcash
24720 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
24721 Hashcash Payments}).
24723 @node Spam Package
24724 @section Spam Package
24725 @cindex spam filtering
24726 @cindex spam
24728 The Spam package provides Gnus with a centralized mechanism for
24729 detecting and filtering spam.  It filters new mail, and processes
24730 messages according to whether they are spam or ham.  (@dfn{Ham} is the
24731 name used throughout this manual to indicate non-spam messages.)
24733 @menu
24734 * Spam Package Introduction::
24735 * Filtering Incoming Mail::
24736 * Detecting Spam in Groups::
24737 * Spam and Ham Processors::
24738 * Spam Package Configuration Examples::
24739 * Spam Back Ends::
24740 * Extending the Spam package::
24741 * Spam Statistics Package::
24742 @end menu
24744 @node Spam Package Introduction
24745 @subsection Spam Package Introduction
24746 @cindex spam filtering
24747 @cindex spam filtering sequence of events
24748 @cindex spam
24750 You must read this section to understand how the Spam package works.
24751 Do not skip, speed-read, or glance through this section.
24753 Make sure you read the section on the @code{spam.el} sequence of
24754 events.  See @xref{Extending the Spam package}.
24756 @cindex spam-initialize
24757 @vindex spam-use-stat
24758 To use the Spam package, you @strong{must} first run the function
24759 @code{spam-initialize}:
24761 @example
24762 (spam-initialize)
24763 @end example
24765 This autoloads @code{spam.el} and installs the various hooks necessary
24766 to let the Spam package do its job.  In order to make use of the Spam
24767 package, you have to set up certain group parameters and variables,
24768 which we will describe below.  All of the variables controlling the
24769 Spam package can be found in the @samp{spam} customization group.
24771 There are two ``contact points'' between the Spam package and the rest
24772 of Gnus: checking new mail for spam, and leaving a group.
24774 Checking new mail for spam is done in one of two ways: while splitting
24775 incoming mail, or when you enter a group.
24777 The first way, checking for spam while splitting incoming mail, is
24778 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
24779 new mail appears in a single spool file.  The Spam package processes
24780 incoming mail, and sends mail considered to be spam to a designated
24781 ``spam'' group.  @xref{Filtering Incoming Mail}.
24783 The second way is suited to back ends such as @code{nntp}, which have
24784 no incoming mail spool, or back ends where the server is in charge of
24785 splitting incoming mail.  In this case, when you enter a Gnus group,
24786 the unseen or unread messages in that group are checked for spam.
24787 Detected spam messages are marked as spam.  @xref{Detecting Spam in
24788 Groups}.
24790 @cindex spam back ends
24791 In either case, you have to tell the Spam package what method to use
24792 to detect spam messages.  There are several methods, or @dfn{spam back
24793 ends} (not to be confused with Gnus back ends!) to choose from: spam
24794 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
24795 forth.  @xref{Spam Back Ends}.
24797 In the Gnus summary buffer, messages that have been identified as spam
24798 always appear with a @samp{$} symbol.
24800 The Spam package divides Gnus groups into three categories: ham
24801 groups, spam groups, and unclassified groups.  You should mark each of
24802 the groups you subscribe to as either a ham group or a spam group,
24803 using the @code{spam-contents} group parameter (@pxref{Group
24804 Parameters}).  Spam groups have a special property: when you enter a
24805 spam group, all unseen articles are marked as spam.  Thus, mail split
24806 into a spam group is automatically marked as spam.
24808 Identifying spam messages is only half of the Spam package's job.  The
24809 second half comes into play whenever you exit a group buffer.  At this
24810 point, the Spam package does several things:
24812 First, it calls @dfn{spam and ham processors} to process the articles
24813 according to whether they are spam or ham.  There is a pair of spam
24814 and ham processors associated with each spam back end, and what the
24815 processors do depends on the back end.  At present, the main role of
24816 spam and ham processors is for dictionary-based spam filters: they add
24817 the contents of the messages in the group to the filter's dictionary,
24818 to improve its ability to detect future spam.  The @code{spam-process}
24819 group parameter specifies what spam processors to use.  @xref{Spam and
24820 Ham Processors}.
24822 If the spam filter failed to mark a spam message, you can mark it
24823 yourself, so that the message is processed as spam when you exit the
24824 group:
24826 @table @kbd
24827 @item M-d
24828 @itemx M s x
24829 @itemx S x
24830 @kindex M-d
24831 @kindex S x
24832 @kindex M s x
24833 @findex gnus-summary-mark-as-spam
24834 @findex gnus-summary-mark-as-spam
24835 Mark current article as spam, showing it with the @samp{$} mark
24836 (@code{gnus-summary-mark-as-spam}).
24837 @end table
24839 @noindent
24840 Similarly, you can unmark an article if it has been erroneously marked
24841 as spam.  @xref{Setting Marks}.
24843 Normally, a ham message found in a non-ham group is not processed as
24844 ham---the rationale is that it should be moved into a ham group for
24845 further processing (see below).  However, you can force these articles
24846 to be processed as ham by setting
24847 @code{spam-process-ham-in-spam-groups} and
24848 @code{spam-process-ham-in-nonham-groups}.
24850 @vindex gnus-ham-process-destinations
24851 @vindex gnus-spam-process-destinations
24852 The second thing that the Spam package does when you exit a group is
24853 to move ham articles out of spam groups, and spam articles out of ham
24854 groups.  Ham in a spam group is moved to the group specified by the
24855 variable @code{gnus-ham-process-destinations}, or the group parameter
24856 @code{ham-process-destination}.  Spam in a ham group is moved to the
24857 group specified by the variable @code{gnus-spam-process-destinations},
24858 or the group parameter @code{spam-process-destination}.  If these
24859 variables are not set, the articles are left in their current group.
24860 If an article cannot be moved (e.g., with a read-only backend such
24861 as @acronym{NNTP}), it is copied.
24863 If an article is moved to another group, it is processed again when
24864 you visit the new group.  Normally, this is not a problem, but if you
24865 want each article to be processed only once, load the
24866 @code{gnus-registry.el} package and set the variable
24867 @code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
24868 Configuration Examples}.
24870 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
24871 However, if you set @code{spam-move-spam-nonspam-groups-only} to
24872 @code{nil}, spam will also be moved out of spam groups, depending on
24873 the @code{spam-process-destination} parameter.
24875 The final thing the Spam package does is to mark spam articles as
24876 expired, which is usually the right thing to do.
24878 If all this seems confusing, don't worry.  Soon it will be as natural
24879 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
24880 50 years in the future yet.  Just trust us, it's not so bad.
24882 @node Filtering Incoming Mail
24883 @subsection Filtering Incoming Mail
24884 @cindex spam filtering
24885 @cindex spam filtering incoming mail
24886 @cindex spam
24888 To use the Spam package to filter incoming mail, you must first set up
24889 fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
24890 defines a special splitting function that you can add to your fancy
24891 split variable (either @code{nnmail-split-fancy} or
24892 @code{nnimap-split-fancy}, depending on your mail back end):
24894 @example
24895 (: spam-split)
24896 @end example
24898 @vindex spam-split-group
24899 @noindent
24900 The @code{spam-split} function scans incoming mail according to your
24901 chosen spam back end(s), and sends messages identified as spam to a
24902 spam group.  By default, the spam group is a group named @samp{spam},
24903 but you can change this by customizing @code{spam-split-group}.  Make
24904 sure the contents of @code{spam-split-group} are an unqualified group
24905 name.  For instance, in an @code{nnimap} server @samp{your-server},
24906 the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
24907 @samp{nnimap+server:spam} is therefore wrong---it gives the group
24908 @samp{nnimap+your-server:nnimap+server:spam}.
24910 @code{spam-split} does not modify the contents of messages in any way.
24912 @vindex nnimap-split-download-body
24913 Note for IMAP users: if you use the @code{spam-check-bogofilter},
24914 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
24915 you should also set set the variable @code{nnimap-split-download-body}
24916 to @code{t}.  These spam back ends are most useful when they can
24917 ``scan'' the full message body.  By default, the nnimap back end only
24918 retrieves the message headers; @code{nnimap-split-download-body} tells
24919 it to retrieve the message bodies as well.  We don't set this by
24920 default because it will slow @acronym{IMAP} down, and that is not an
24921 appropriate decision to make on behalf of the user.  @xref{Splitting
24922 in IMAP}.
24924 You have to specify one or more spam back ends for @code{spam-split}
24925 to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
24926 Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
24927 you enabled in this way.  However, you can tell @code{spam-split} to
24928 use only some of them.  Why this is useful?  Suppose you are using the
24929 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
24930 ends, and the following split rule:
24932 @example
24933  nnimap-split-fancy '(|
24934                       (any "ding" "ding")
24935                       (: spam-split)
24936                       ;; @r{default mailbox}
24937                       "mail")
24938 @end example
24940 @noindent
24941 The problem is that you want all ding messages to make it to the ding
24942 folder.  But that will let obvious spam (for example, spam detected by
24943 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
24944 sent to the ding list.  On the other hand, some messages to the ding
24945 list are from a mail server in the blackhole list, so the invocation
24946 of @code{spam-split} can't be before the ding rule.
24948 The solution is to let SpamAssassin headers supersede ding rules, and
24949 perform the other @code{spam-split} rules (including a second
24950 invocation of the regex-headers check) after the ding rule.  This is
24951 done by passing a parameter to @code{spam-split}:
24953 @example
24954 nnimap-split-fancy
24955       '(|
24956         ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
24957         (: spam-split "regex-spam" 'spam-use-regex-headers)
24958         (any "ding" "ding")
24959         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
24960         (: spam-split)
24961         ;; @r{default mailbox}
24962         "mail")
24963 @end example
24965 @noindent
24966 This lets you invoke specific @code{spam-split} checks depending on
24967 your particular needs, and target the results of those checks to a
24968 particular spam group.  You don't have to throw all mail into all the
24969 spam tests.  Another reason why this is nice is that messages to
24970 mailing lists you have rules for don't have to have resource-intensive
24971 blackhole checks performed on them.  You could also specify different
24972 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
24974 You should set the @code{spam-use-*} variables for whatever spam back
24975 ends you intend to use.  The reason is that when loading
24976 @file{spam.el}, some conditional loading is done depending on what
24977 @code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
24979 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
24980 @c statistical databases.  Some have that functionality built-in, others
24981 @c don't.}
24983 @node Detecting Spam in Groups
24984 @subsection Detecting Spam in Groups
24986 To detect spam when visiting a group, set the group's
24987 @code{spam-autodetect} and @code{spam-autodetect-methods} group
24988 parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
24989 usual (@pxref{Group Parameters}).
24991 You should set the @code{spam-use-*} variables for whatever spam back
24992 ends you intend to use.  The reason is that when loading
24993 @file{spam.el}, some conditional loading is done depending on what
24994 @code{spam-use-xyz} variables you have set.
24996 By default, only unseen articles are processed for spam.  You can
24997 force Gnus to recheck all messages in the group by setting the
24998 variable @code{spam-autodetect-recheck-messages} to @code{t}.
25000 If you use the @code{spam-autodetect} method of checking for spam, you
25001 can specify different spam detection methods for different groups.
25002 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
25003 the autodetection method, while the @samp{suspect} group may have the
25004 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
25005 enabled.  Unlike with @code{spam-split}, you don't have any control
25006 over the @emph{sequence} of checks, but this is probably unimportant.
25008 @node Spam and Ham Processors
25009 @subsection Spam and Ham Processors
25010 @cindex spam filtering
25011 @cindex spam filtering variables
25012 @cindex spam variables
25013 @cindex spam
25015 @vindex gnus-spam-process-newsgroups
25016 Spam and ham processors specify special actions to take when you exit
25017 a group buffer.  Spam processors act on spam messages, and ham
25018 processors on ham messages.  At present, the main role of these
25019 processors is to update the dictionaries of dictionary-based spam back
25020 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
25021 package (@pxref{Spam Statistics Filtering}).
25023 The spam and ham processors that apply to each group are determined by
25024 the group's@code{spam-process} group parameter.  If this group
25025 parameter is not defined, they are determined by the variable
25026 @code{gnus-spam-process-newsgroups}.
25028 @vindex gnus-spam-newsgroup-contents
25029 Gnus learns from the spam you get.  You have to collect your spam in
25030 one or more spam groups, and set or customize the variable
25031 @code{spam-junk-mailgroups} as appropriate.  You can also declare
25032 groups to contain spam by setting their group parameter
25033 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
25034 by customizing the corresponding variable
25035 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
25036 parameter and the @code{gnus-spam-newsgroup-contents} variable can
25037 also be used to declare groups as @emph{ham} groups if you set their
25038 classification to @code{gnus-group-spam-classification-ham}.  If
25039 groups are not classified by means of @code{spam-junk-mailgroups},
25040 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
25041 considered @emph{unclassified}.  All groups are unclassified by
25042 default.
25044 @vindex gnus-spam-mark
25045 @cindex $
25046 In spam groups, all messages are considered to be spam by default:
25047 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
25048 group.  If you have seen a message, had it marked as spam, then
25049 unmarked it, it won't be marked as spam when you enter the group
25050 thereafter.  You can disable that behavior, so all unread messages
25051 will get the @samp{$} mark, if you set the
25052 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
25053 should remove the @samp{$} mark when you are in the group summary
25054 buffer for every message that is not spam after all.  To remove the
25055 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
25056 @kbd{d} for declaring it read the non-spam way.  When you leave a
25057 group, all spam-marked (@samp{$}) articles are sent to a spam
25058 processor which will study them as spam samples.
25060 Messages may also be deleted in various other ways, and unless
25061 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
25062 and @samp{r} for default read or explicit delete, marks @samp{X} and
25063 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
25064 low scores, are all considered to be associated with articles which
25065 are not spam.  This assumption might be false, in particular if you
25066 use kill files or score files as means for detecting genuine spam, you
25067 should then adjust the @code{ham-marks} group parameter.
25069 @defvar ham-marks
25070 You can customize this group or topic parameter to be the list of
25071 marks you want to consider ham.  By default, the list contains the
25072 deleted, read, killed, kill-filed, and low-score marks (the idea is
25073 that these articles have been read, but are not spam).  It can be
25074 useful to also include the tick mark in the ham marks.  It is not
25075 recommended to make the unread mark a ham mark, because it normally
25076 indicates a lack of classification.  But you can do it, and we'll be
25077 happy for you.
25078 @end defvar
25080 @defvar spam-marks
25081 You can customize this group or topic parameter to be the list of
25082 marks you want to consider spam.  By default, the list contains only
25083 the spam mark.  It is not recommended to change that, but you can if
25084 you really want to.
25085 @end defvar
25087 When you leave @emph{any} group, regardless of its
25088 @code{spam-contents} classification, all spam-marked articles are sent
25089 to a spam processor, which will study these as spam samples.  If you
25090 explicit kill a lot, you might sometimes end up with articles marked
25091 @samp{K} which you never saw, and which might accidentally contain
25092 spam.  Best is to make sure that real spam is marked with @samp{$},
25093 and nothing else.
25095 @vindex gnus-ham-process-destinations
25096 When you leave a @emph{spam} group, all spam-marked articles are
25097 marked as expired after processing with the spam processor.  This is
25098 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
25099 @strong{ham} articles in a spam group will be moved to a location
25100 determined by either the @code{ham-process-destination} group
25101 parameter or a match in the @code{gnus-ham-process-destinations}
25102 variable, which is a list of regular expressions matched with group
25103 names (it's easiest to customize this variable with @kbd{M-x
25104 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
25105 group name list is a standard Lisp list, if you prefer to customize
25106 the variable manually.  If the @code{ham-process-destination}
25107 parameter is not set, ham articles are left in place.  If the
25108 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
25109 set, the ham articles are marked as unread before being moved.
25111 If ham can not be moved---because of a read-only back end such as
25112 @acronym{NNTP}, for example, it will be copied.
25114 Note that you can use multiples destinations per group or regular
25115 expression!  This enables you to send your ham to a regular mail
25116 group and to a @emph{ham training} group.
25118 When you leave a @emph{ham} group, all ham-marked articles are sent to
25119 a ham processor, which will study these as non-spam samples.
25121 @vindex spam-process-ham-in-spam-groups
25122 By default the variable @code{spam-process-ham-in-spam-groups} is
25123 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
25124 to be processed.  Normally this is not done, you are expected instead
25125 to send your ham to a ham group and process it there.
25127 @vindex spam-process-ham-in-nonham-groups
25128 By default the variable @code{spam-process-ham-in-nonham-groups} is
25129 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
25130 or unclassified) groups to be processed.  Normally this is not done,
25131 you are expected instead to send your ham to a ham group and process
25132 it there.
25134 @vindex gnus-spam-process-destinations
25135 When you leave a @emph{ham} or @emph{unclassified} group, all
25136 @strong{spam} articles are moved to a location determined by either
25137 the @code{spam-process-destination} group parameter or a match in the
25138 @code{gnus-spam-process-destinations} variable, which is a list of
25139 regular expressions matched with group names (it's easiest to
25140 customize this variable with @kbd{M-x customize-variable @key{RET}
25141 gnus-spam-process-destinations}).  Each group name list is a standard
25142 Lisp list, if you prefer to customize the variable manually.  If the
25143 @code{spam-process-destination} parameter is not set, the spam
25144 articles are only expired.  The group name is fully qualified, meaning
25145 that if you see @samp{nntp:servername} before the group name in the
25146 group buffer then you need it here as well.
25148 If spam can not be moved---because of a read-only back end such as
25149 @acronym{NNTP}, for example, it will be copied.
25151 Note that you can use multiples destinations per group or regular
25152 expression!  This enables you to send your spam to multiple @emph{spam
25153 training} groups.
25155 @vindex spam-log-to-registry
25156 The problem with processing ham and spam is that Gnus doesn't track
25157 this processing by default.  Enable the @code{spam-log-to-registry}
25158 variable so @code{spam.el} will use @code{gnus-registry.el} to track
25159 what articles have been processed, and avoid processing articles
25160 multiple times.  Keep in mind that if you limit the number of registry
25161 entries, this won't work as well as it does without a limit.
25163 @vindex spam-mark-only-unseen-as-spam
25164 Set this variable if you want only unseen articles in spam groups to
25165 be marked as spam.  By default, it is set.  If you set it to
25166 @code{nil}, unread articles will also be marked as spam.
25168 @vindex spam-mark-ham-unread-before-move-from-spam-group
25169 Set this variable if you want ham to be unmarked before it is moved
25170 out of the spam group.  This is very useful when you use something
25171 like the tick mark @samp{!} to mark ham---the article will be placed
25172 in your @code{ham-process-destination}, unmarked as if it came fresh
25173 from the mail server.
25175 @vindex spam-autodetect-recheck-messages
25176 When autodetecting spam, this variable tells @code{spam.el} whether
25177 only unseen articles or all unread articles should be checked for
25178 spam.  It is recommended that you leave it off.
25180 @node Spam Package Configuration Examples
25181 @subsection Spam Package Configuration Examples
25182 @cindex spam filtering
25183 @cindex spam filtering configuration examples
25184 @cindex spam configuration examples
25185 @cindex spam
25187 @subsubheading Ted's setup
25189 From Ted Zlatanov <tzz@@lifelogs.com>.
25190 @example
25191 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
25192 ;; @r{see @file{gnus-registry.el} for more information}
25193 (gnus-registry-initialize)
25194 (spam-initialize)
25196 (setq
25197  spam-log-to-registry t     ; @r{for spam autodetection}
25198  spam-use-BBDB t
25199  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
25200  ;; @r{all groups with @samp{spam} in the name contain spam}
25201  gnus-spam-newsgroup-contents
25202   '(("spam" gnus-group-spam-classification-spam))
25203  ;; @r{see documentation for these}
25204  spam-move-spam-nonspam-groups-only nil
25205  spam-mark-only-unseen-as-spam t
25206  spam-mark-ham-unread-before-move-from-spam-group t
25207  nnimap-split-rule 'nnimap-split-fancy
25208  ;; @r{understand what this does before you copy it to your own setup!}
25209  nnimap-split-fancy '(|
25210                       ;; @r{trace references to parents and put in their group}
25211                       (: gnus-registry-split-fancy-with-parent)
25212                       ;; @r{this will catch server-side SpamAssassin tags}
25213                       (: spam-split 'spam-use-regex-headers)
25214                       (any "ding" "ding")
25215                       ;; @r{note that spam by default will go to @samp{spam}}
25216                       (: spam-split)
25217                       ;; @r{default mailbox}
25218                       "mail"))
25220 ;; @r{my parameters, set with @kbd{G p}}
25222 ;; @r{all nnml groups, and all nnimap groups except}
25223 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
25224 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
25225 ;; @r{because it must have been detected manually}
25227 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25229 ;; @r{all @acronym{NNTP} groups}
25230 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
25231 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
25232 ;; @r{send all spam to the training group}
25233  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25235 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
25236 ((spam-autodetect . t))
25238 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
25240 ;; @r{this is a spam group}
25241 ((spam-contents gnus-group-spam-classification-spam)
25243  ;; @r{any spam (which happens when I enter for all unseen messages,}
25244  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
25245  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
25247  (spam-process-destination "nnimap+mail.lifelogs.com:train")
25249  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
25250  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
25252  (ham-process-destination "nnimap+mail.lifelogs.com:mail"
25253                           "nnimap+mail.lifelogs.com:trainham")
25254  ;; @r{in this group, only @samp{!} marks are ham}
25255  (ham-marks
25256   (gnus-ticked-mark))
25257  ;; @r{remembers senders in the blacklist on the way out---this is}
25258  ;; @r{definitely not needed, it just makes me feel better}
25259  (spam-process (gnus-group-spam-exit-processor-blacklist)))
25261 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
25262 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
25263 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
25265 @end example
25267 @subsubheading Using @code{spam.el} on an IMAP server with a statistical filter on the server
25268 From Reiner Steib <reiner.steib@@gmx.de>.
25270 My provider has set up bogofilter (in combination with @acronym{DCC}) on
25271 the mail server (@acronym{IMAP}).  Recognized spam goes to
25272 @samp{spam.detected}, the rest goes through the normal filter rules,
25273 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
25274 positives or negatives is done by copying or moving the article to
25275 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
25276 the server feeds those to bogofilter with the suitable ham or spam
25277 options and deletes them from the @samp{training.ham} and
25278 @samp{training.spam} folders.
25280 With the following entries in @code{gnus-parameters}, @code{spam.el}
25281 does most of the job for me:
25283 @lisp
25284    ("nnimap:spam\\.detected"
25285     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
25286     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
25287     (spam-contents gnus-group-spam-classification-spam))
25288    ("nnimap:\\(INBOX\\|other-folders\\)"
25289     (spam-process-destination . "nnimap:training.spam")
25290     (spam-contents gnus-group-spam-classification-ham))
25291 @end lisp
25293 @itemize
25295 @item @b{The Spam folder:}
25297 In the folder @samp{spam.detected}, I have to check for false positives
25298 (i.e. legitimate mails, that were wrongly judged as spam by
25299 bogofilter or DCC).
25301 Because of the @code{gnus-group-spam-classification-spam} entry, all
25302 messages are marked as spam (with @code{$}).  When I find a false
25303 positive, I mark the message with some other ham mark
25304 (@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
25305 those messages are copied to both groups, @samp{INBOX} (where I want
25306 to have the article) and @samp{training.ham} (for training bogofilter)
25307 and deleted from the @samp{spam.detected} folder.
25309 The @code{gnus-article-sort-by-chars} entry simplifies detection of
25310 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
25311 have a similar size.  Grouping them by size (i.e. chars) makes finding
25312 other false positives easier.  (Of course worms aren't @i{spam}
25313 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
25314 an excellent tool for filtering those unwanted mails for me.)
25316 @item @b{Ham folders:}
25318 In my ham folders, I just hit @kbd{S x}
25319 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
25320 mail (false negative).  On group exit, those messages are moved to
25321 @samp{training.spam}.
25322 @end itemize
25324 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
25326 From Reiner Steib <reiner.steib@@gmx.de>.
25328 With following entry in @code{gnus-parameters}, @kbd{S x}
25329 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
25330 groups as spam and reports the to Gmane at group exit:
25332 @lisp
25333    ("^gmane\\."
25334     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
25335 @end lisp
25337 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
25338 because I don't read the groups directly from news.gmane.org, but
25339 through my local news server (leafnode).  I.e. the article numbers are
25340 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
25341 the @code{X-Report-Spam} header to find the correct number.
25343 @node Spam Back Ends
25344 @subsection Spam Back Ends
25345 @cindex spam back ends
25347 The spam package offers a variety of back ends for detecting spam.
25348 Each back end defines a set of methods for detecting spam
25349 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
25350 and a pair of spam and ham processors (@pxref{Spam and Ham
25351 Processors}).
25353 @menu
25354 * Blacklists and Whitelists::
25355 * BBDB Whitelists::
25356 * Gmane Spam Reporting::
25357 * Anti-spam Hashcash Payments::
25358 * Blackholes::
25359 * Regular Expressions Header Matching::
25360 * Bogofilter::
25361 * SpamAssassin back end::
25362 * ifile spam filtering::
25363 * Spam Statistics Filtering::
25364 * SpamOracle::
25365 @end menu
25367 @node Blacklists and Whitelists
25368 @subsubsection Blacklists and Whitelists
25369 @cindex spam filtering
25370 @cindex whitelists, spam filtering
25371 @cindex blacklists, spam filtering
25372 @cindex spam
25374 @defvar spam-use-blacklist
25376 Set this variable to @code{t} if you want to use blacklists when
25377 splitting incoming mail.  Messages whose senders are in the blacklist
25378 will be sent to the @code{spam-split-group}.  This is an explicit
25379 filter, meaning that it acts only on mail senders @emph{declared} to
25380 be spammers.
25382 @end defvar
25384 @defvar spam-use-whitelist
25386 Set this variable to @code{t} if you want to use whitelists when
25387 splitting incoming mail.  Messages whose senders are not in the
25388 whitelist will be sent to the next spam-split rule.  This is an
25389 explicit filter, meaning that unless someone is in the whitelist, their
25390 messages are not assumed to be spam or ham.
25392 @end defvar
25394 @defvar spam-use-whitelist-exclusive
25396 Set this variable to @code{t} if you want to use whitelists as an
25397 implicit filter, meaning that every message will be considered spam
25398 unless the sender is in the whitelist.  Use with care.
25400 @end defvar
25402 @defvar gnus-group-spam-exit-processor-blacklist
25404 Add this symbol to a group's @code{spam-process} parameter by
25405 customizing the group parameters or the
25406 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25407 added to a group's @code{spam-process} parameter, the senders of
25408 spam-marked articles will be added to the blacklist.
25410 @emph{WARNING}
25412 Instead of the obsolete
25413 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
25414 that you use @code{(spam spam-use-blacklist)}.  Everything will work
25415 the same way, we promise.
25417 @end defvar
25419 @defvar gnus-group-ham-exit-processor-whitelist
25421 Add this symbol to a group's @code{spam-process} parameter by
25422 customizing the group parameters or the
25423 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25424 added to a group's @code{spam-process} parameter, the senders of
25425 ham-marked articles in @emph{ham} groups will be added to the
25426 whitelist.
25428 @emph{WARNING}
25430 Instead of the obsolete
25431 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
25432 that you use @code{(ham spam-use-whitelist)}.  Everything will work
25433 the same way, we promise.
25435 @end defvar
25437 Blacklists are lists of regular expressions matching addresses you
25438 consider to be spam senders.  For instance, to block mail from any
25439 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
25440 blacklist.  You start out with an empty blacklist.  Blacklist entries
25441 use the Emacs regular expression syntax.
25443 Conversely, whitelists tell Gnus what addresses are considered
25444 legitimate.  All messages from whitelisted addresses are considered
25445 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
25446 Emacs regular expression syntax.
25448 The blacklist and whitelist file locations can be customized with the
25449 @code{spam-directory} variable (@file{~/News/spam} by default), or
25450 the @code{spam-whitelist} and @code{spam-blacklist} variables
25451 directly.  The whitelist and blacklist files will by default be in the
25452 @code{spam-directory} directory, named @file{whitelist} and
25453 @file{blacklist} respectively.
25455 @node BBDB Whitelists
25456 @subsubsection BBDB Whitelists
25457 @cindex spam filtering
25458 @cindex BBDB whitelists, spam filtering
25459 @cindex BBDB, spam filtering
25460 @cindex spam
25462 @defvar spam-use-BBDB
25464 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
25465 Whitelists}), but uses the BBDB as the source of whitelisted
25466 addresses, without regular expressions.  You must have the BBDB loaded
25467 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
25468 not in the BBDB will be sent to the next spam-split rule.  This is an
25469 explicit filter, meaning that unless someone is in the BBDB, their
25470 messages are not assumed to be spam or ham.
25472 @end defvar
25474 @defvar spam-use-BBDB-exclusive
25476 Set this variable to @code{t} if you want to use the BBDB as an
25477 implicit filter, meaning that every message will be considered spam
25478 unless the sender is in the BBDB.  Use with care.  Only sender
25479 addresses in the BBDB will be allowed through; all others will be
25480 classified as spammers.
25482 While @code{spam-use-BBDB-exclusive} @emph{can} be used as an alias
25483 for @code{spam-use-BBDB} as far as @code{spam.el} is concerned, it is
25484 @emph{not} a separate back end.  If you set
25485 @code{spam-use-BBDB-exclusive} to t, @emph{all} your BBDB splitting
25486 will be exclusive.
25488 @end defvar
25490 @defvar gnus-group-ham-exit-processor-BBDB
25492 Add this symbol to a group's @code{spam-process} parameter by
25493 customizing the group parameters or the
25494 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25495 added to a group's @code{spam-process} parameter, the senders of
25496 ham-marked articles in @emph{ham} groups will be added to the
25497 BBDB.
25499 @emph{WARNING}
25501 Instead of the obsolete
25502 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
25503 that you use @code{(ham spam-use-BBDB)}.  Everything will work
25504 the same way, we promise.
25506 @end defvar
25508 @node Gmane Spam Reporting
25509 @subsubsection Gmane Spam Reporting
25510 @cindex spam reporting
25511 @cindex Gmane, spam reporting
25512 @cindex Gmane, spam reporting
25513 @cindex spam
25515 @defvar gnus-group-spam-exit-processor-report-gmane
25517 Add this symbol to a group's @code{spam-process} parameter by
25518 customizing the group parameters or the
25519 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25520 added to a group's @code{spam-process} parameter, the spam-marked
25521 articles groups will be reported to the Gmane administrators via a
25522 HTTP request.
25524 Gmane can be found at @uref{http://gmane.org}.
25526 @emph{WARNING}
25528 Instead of the obsolete
25529 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
25530 that you use @code{(spam spam-use-gmane)}.  Everything will work the
25531 same way, we promise.
25533 @end defvar
25535 @defvar spam-report-gmane-use-article-number
25537 This variable is @code{t} by default.  Set it to @code{nil} if you are
25538 running your own news server, for instance, and the local article
25539 numbers don't correspond to the Gmane article numbers.  When
25540 @code{spam-report-gmane-use-article-number} is @code{nil},
25541 @code{spam-report.el} will fetch the number from the article headers.
25543 @end defvar
25545 @defvar spam-report-user-mail-address
25547 Mail address exposed in the User-Agent spam reports to Gmane.  It allows
25548 the Gmane administrators to contact you in case of misreports.  The
25549 default is @code{user-mail-address}.
25551 @end defvar
25553 @node Anti-spam Hashcash Payments
25554 @subsubsection Anti-spam Hashcash Payments
25555 @cindex spam filtering
25556 @cindex hashcash, spam filtering
25557 @cindex spam
25559 @defvar spam-use-hashcash
25561 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
25562 Whitelists}), but uses hashcash tokens for whitelisting messages
25563 instead of the sender address.  Messages without a hashcash payment
25564 token will be sent to the next spam-split rule.  This is an explicit
25565 filter, meaning that unless a hashcash token is found, the messages
25566 are not assumed to be spam or ham.
25568 @end defvar
25570 @node Blackholes
25571 @subsubsection Blackholes
25572 @cindex spam filtering
25573 @cindex blackholes, spam filtering
25574 @cindex spam
25576 @defvar spam-use-blackholes
25578 This option is disabled by default.  You can let Gnus consult the
25579 blackhole-type distributed spam processing systems (DCC, for instance)
25580 when you set this option.  The variable @code{spam-blackhole-servers}
25581 holds the list of blackhole servers Gnus will consult.  The current
25582 list is fairly comprehensive, but make sure to let us know if it
25583 contains outdated servers.
25585 The blackhole check uses the @code{dig.el} package, but you can tell
25586 @code{spam.el} to use @code{dns.el} instead for better performance if
25587 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
25588 this time to set @code{spam-use-dig} to @code{nil} despite the
25589 possible performance improvements, because some users may be unable to
25590 use it, but you can try it and see if it works for you.
25592 @end defvar
25594 @defvar spam-blackhole-servers
25596 The list of servers to consult for blackhole checks.
25598 @end defvar
25600 @defvar spam-blackhole-good-server-regex
25602 A regular expression for IPs that should not be checked against the
25603 blackhole server list.  When set to @code{nil}, it has no effect.
25605 @end defvar
25607 @defvar spam-use-dig
25609 Use the @code{dig.el} package instead of the @code{dns.el} package.
25610 The default setting of @code{t} is recommended.
25612 @end defvar
25614 Blackhole checks are done only on incoming mail.  There is no spam or
25615 ham processor for blackholes.
25617 @node Regular Expressions Header Matching
25618 @subsubsection Regular Expressions Header Matching
25619 @cindex spam filtering
25620 @cindex regular expressions header matching, spam filtering
25621 @cindex spam
25623 @defvar spam-use-regex-headers
25625 This option is disabled by default.  You can let Gnus check the
25626 message headers against lists of regular expressions when you set this
25627 option.  The variables @code{spam-regex-headers-spam} and
25628 @code{spam-regex-headers-ham} hold the list of regular expressions.
25629 Gnus will check against the message headers to determine if the
25630 message is spam or ham, respectively.
25632 @end defvar
25634 @defvar spam-regex-headers-spam
25636 The list of regular expressions that, when matched in the headers of
25637 the message, positively identify it as spam.
25639 @end defvar
25641 @defvar spam-regex-headers-ham
25643 The list of regular expressions that, when matched in the headers of
25644 the message, positively identify it as ham.
25646 @end defvar
25648 Regular expression header checks are done only on incoming mail.
25649 There is no specific spam or ham processor for regular expressions.
25651 @node Bogofilter
25652 @subsubsection Bogofilter
25653 @cindex spam filtering
25654 @cindex bogofilter, spam filtering
25655 @cindex spam
25657 @defvar spam-use-bogofilter
25659 Set this variable if you want @code{spam-split} to use Eric Raymond's
25660 speedy Bogofilter.
25662 With a minimum of care for associating the @samp{$} mark for spam
25663 articles only, Bogofilter training all gets fairly automatic.  You
25664 should do this until you get a few hundreds of articles in each
25665 category, spam or not.  The command @kbd{S t} in summary mode, either
25666 for debugging or for curiosity, shows the @emph{spamicity} score of
25667 the current article (between 0.0 and 1.0).
25669 Bogofilter determines if a message is spam based on a specific
25670 threshold.  That threshold can be customized, consult the Bogofilter
25671 documentation.
25673 If the @code{bogofilter} executable is not in your path, Bogofilter
25674 processing will be turned off.
25676 You should not enable this if you use @code{spam-use-bogofilter-headers}.
25678 @end defvar
25680 @table @kbd
25681 @item M s t
25682 @itemx S t
25683 @kindex M s t
25684 @kindex S t
25685 @findex spam-bogofilter-score
25686 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
25687 @end table
25689 @defvar spam-use-bogofilter-headers
25691 Set this variable if you want @code{spam-split} to use Eric Raymond's
25692 speedy Bogofilter, looking only at the message headers.  It works
25693 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
25694 must be in the message already.  Normally you would do this with a
25695 procmail recipe or something similar; consult the Bogofilter
25696 installation documents for details.
25698 You should not enable this if you use @code{spam-use-bogofilter}.
25700 @end defvar
25702 @defvar gnus-group-spam-exit-processor-bogofilter
25703 Add this symbol to a group's @code{spam-process} parameter by
25704 customizing the group parameters or the
25705 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25706 added to a group's @code{spam-process} parameter, spam-marked articles
25707 will be added to the Bogofilter spam database.
25709 @emph{WARNING}
25711 Instead of the obsolete
25712 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
25713 that you use @code{(spam spam-use-bogofilter)}.  Everything will work
25714 the same way, we promise.
25715 @end defvar
25717 @defvar gnus-group-ham-exit-processor-bogofilter
25718 Add this symbol to a group's @code{spam-process} parameter by
25719 customizing the group parameters or the
25720 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25721 added to a group's @code{spam-process} parameter, the ham-marked
25722 articles in @emph{ham} groups will be added to the Bogofilter database
25723 of non-spam messages.
25725 @emph{WARNING}
25727 Instead of the obsolete
25728 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
25729 that you use @code{(ham spam-use-bogofilter)}.  Everything will work
25730 the same way, we promise.
25731 @end defvar
25733 @defvar spam-bogofilter-database-directory
25735 This is the directory where Bogofilter will store its databases.  It
25736 is not specified by default, so Bogofilter will use its own default
25737 database directory.
25739 @end defvar
25741 The Bogofilter mail classifier is similar to @command{ifile} in intent and
25742 purpose.  A ham and a spam processor are provided, plus the
25743 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
25744 variables to indicate to spam-split that Bogofilter should either be
25745 used, or has already been used on the article.  The 0.9.2.1 version of
25746 Bogofilter was used to test this functionality.
25748 @node SpamAssassin back end
25749 @subsubsection SpamAssassin back end
25750 @cindex spam filtering
25751 @cindex spamassassin, spam filtering
25752 @cindex spam
25754 @defvar spam-use-spamassassin
25756 Set this variable if you want @code{spam-split} to use SpamAssassin.
25758 SpamAssassin assigns a score to each article based on a set of rules
25759 and tests, including a Bayesian filter.  The Bayesian filter can be
25760 trained by associating the @samp{$} mark for spam articles.  The
25761 spam score can be viewed by using the command @kbd{S t} in summary
25762 mode.
25764 If you set this variable, each article will be processed by
25765 SpamAssassin when @code{spam-split} is called.  If your mail is
25766 preprocessed by SpamAssassin, and you want to just use the
25767 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
25768 instead.
25770 You should not enable this if you use
25771 @code{spam-use-spamassassin-headers}.
25773 @end defvar
25775 @defvar spam-use-spamassassin-headers
25777 Set this variable if your mail is preprocessed by SpamAssassin and
25778 want @code{spam-split} to split based on the SpamAssassin headers.
25780 You should not enable this if you use @code{spam-use-spamassassin}.
25782 @end defvar
25784 @defvar spam-spamassassin-program
25786 This variable points to the SpamAssassin executable.  If you have
25787 @code{spamd} running, you can set this variable to the @code{spamc}
25788 executable for faster processing.  See the SpamAssassin documentation
25789 for more information on @code{spamd}/@code{spamc}.
25791 @end defvar
25793 SpamAssassin is a powerful and flexible spam filter that uses a wide
25794 variety of tests to identify spam.  A ham and a spam processors are
25795 provided, plus the @code{spam-use-spamassassin} and
25796 @code{spam-use-spamassassin-headers} variables to indicate to
25797 spam-split that SpamAssassin should be either used, or has already
25798 been used on the article.  The 2.63 version of SpamAssassin was used
25799 to test this functionality.
25801 @node ifile spam filtering
25802 @subsubsection ifile spam filtering
25803 @cindex spam filtering
25804 @cindex ifile, spam filtering
25805 @cindex spam
25807 @defvar spam-use-ifile
25809 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
25810 statistical analyzer similar to Bogofilter.
25812 @end defvar
25814 @defvar spam-ifile-all-categories
25816 Enable this variable if you want @code{spam-use-ifile} to give you all
25817 the ifile categories, not just spam/non-spam.  If you use this, make
25818 sure you train ifile as described in its documentation.
25820 @end defvar
25822 @defvar spam-ifile-spam-category
25824 This is the category of spam messages as far as ifile is concerned.
25825 The actual string used is irrelevant, but you probably want to leave
25826 the default value of @samp{spam}.
25827 @end defvar
25829 @defvar spam-ifile-database
25831 This is the filename for the ifile database.  It is not specified by
25832 default, so ifile will use its own default database name.
25834 @end defvar
25836 The ifile mail classifier is similar to Bogofilter in intent and
25837 purpose.  A ham and a spam processor are provided, plus the
25838 @code{spam-use-ifile} variable to indicate to spam-split that ifile
25839 should be used.  The 1.2.1 version of ifile was used to test this
25840 functionality.
25842 @node Spam Statistics Filtering
25843 @subsubsection Spam Statistics Filtering
25844 @cindex spam filtering
25845 @cindex spam-stat, spam filtering
25846 @cindex spam-stat
25847 @cindex spam
25849 This back end uses the Spam Statistics Emacs Lisp package to perform
25850 statistics-based filtering (@pxref{Spam Statistics Package}).  Before
25851 using this, you may want to perform some additional steps to
25852 initialize your Spam Statistics dictionary.  @xref{Creating a
25853 spam-stat dictionary}.
25855 @defvar spam-use-stat
25857 @end defvar
25859 @defvar gnus-group-spam-exit-processor-stat
25860 Add this symbol to a group's @code{spam-process} parameter by
25861 customizing the group parameters or the
25862 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25863 added to a group's @code{spam-process} parameter, the spam-marked
25864 articles will be added to the spam-stat database of spam messages.
25866 @emph{WARNING}
25868 Instead of the obsolete
25869 @code{gnus-group-spam-exit-processor-stat}, it is recommended
25870 that you use @code{(spam spam-use-stat)}.  Everything will work
25871 the same way, we promise.
25872 @end defvar
25874 @defvar gnus-group-ham-exit-processor-stat
25875 Add this symbol to a group's @code{spam-process} parameter by
25876 customizing the group parameters or the
25877 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25878 added to a group's @code{spam-process} parameter, the ham-marked
25879 articles in @emph{ham} groups will be added to the spam-stat database
25880 of non-spam messages.
25882 @emph{WARNING}
25884 Instead of the obsolete
25885 @code{gnus-group-ham-exit-processor-stat}, it is recommended
25886 that you use @code{(ham spam-use-stat)}.  Everything will work
25887 the same way, we promise.
25888 @end defvar
25890 This enables @code{spam.el} to cooperate with @file{spam-stat.el}.
25891 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
25892 which unlike ifile or Bogofilter does not require external programs.
25893 A spam and a ham processor, and the @code{spam-use-stat} variable for
25894 @code{spam-split} are provided.
25896 @node SpamOracle
25897 @subsubsection Using SpamOracle with Gnus
25898 @cindex spam filtering
25899 @cindex SpamOracle
25900 @cindex spam
25902 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
25903 statistical mail filtering tool written by Xavier Leroy and needs to be
25904 installed separately.
25906 There are several ways to use SpamOracle with Gnus.  In all cases, your
25907 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
25908 then enter an @samp{X-Spam} header indicating whether it regards the
25909 mail as a spam mail or not.
25911 One possibility is to run SpamOracle as a @code{:prescript} from the
25912 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
25913 the advantage that the user can see the @emph{X-Spam} headers.
25915 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
25916 call SpamOracle.
25918 @vindex spam-use-spamoracle
25919 To enable SpamOracle usage by @code{spam.el}, set the variable
25920 @code{spam-use-spamoracle} to @code{t} and configure the
25921 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
25922 Package}.  In this example the @samp{INBOX} of an nnimap server is
25923 filtered using SpamOracle.  Mails recognized as spam mails will be
25924 moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
25925 messages stay in @samp{INBOX}:
25927 @example
25928 (setq spam-use-spamoracle t
25929       spam-split-group "Junk"
25930       nnimap-split-inbox '("INBOX")
25931       nnimap-split-rule 'nnimap-split-fancy
25932       nnimap-split-fancy '(| (: spam-split) "INBOX"))
25933 @end example
25935 @defvar spam-use-spamoracle
25936 Set to @code{t} if you want Gnus to enable spam filtering using
25937 SpamOracle.
25938 @end defvar
25940 @defvar spam-spamoracle-binary
25941 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
25942 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
25943 can be customized.
25944 @end defvar
25946 @defvar spam-spamoracle-database
25947 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
25948 store its analysis.  This is controlled by the variable
25949 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
25950 the default SpamOracle database will be used.  In case you want your
25951 database to live somewhere special, set
25952 @code{spam-spamoracle-database} to this path.
25953 @end defvar
25955 SpamOracle employs a statistical algorithm to determine whether a
25956 message is spam or ham.  In order to get good results, meaning few
25957 false hits or misses, SpamOracle needs training.  SpamOracle learns
25958 the characteristics of your spam mails.  Using the @emph{add} mode
25959 (training mode) one has to feed good (ham) and spam mails to
25960 SpamOracle.  This can be done by pressing @kbd{|} in the Summary
25961 buffer and pipe the mail to a SpamOracle process or using
25962 @file{spam.el}'s spam- and ham-processors, which is much more
25963 convenient.  For a detailed description of spam- and ham-processors,
25964 @xref{Spam Package}.
25966 @defvar gnus-group-spam-exit-processor-spamoracle
25967 Add this symbol to a group's @code{spam-process} parameter by
25968 customizing the group parameter or the
25969 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25970 to a group's @code{spam-process} parameter, spam-marked articles will be
25971 sent to SpamOracle as spam samples.
25973 @emph{WARNING}
25975 Instead of the obsolete
25976 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
25977 that you use @code{(spam spam-use-spamoracle)}.  Everything will work
25978 the same way, we promise.
25979 @end defvar
25981 @defvar gnus-group-ham-exit-processor-spamoracle
25982 Add this symbol to a group's @code{spam-process} parameter by
25983 customizing the group parameter or the
25984 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25985 to a group's @code{spam-process} parameter, the ham-marked articles in
25986 @emph{ham} groups will be sent to the SpamOracle as samples of ham
25987 messages.
25989 @emph{WARNING}
25991 Instead of the obsolete
25992 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
25993 that you use @code{(ham spam-use-spamoracle)}.  Everything will work
25994 the same way, we promise.
25995 @end defvar
25997 @emph{Example:} These are the Group Parameters of a group that has been
25998 classified as a ham group, meaning that it should only contain ham
25999 messages.
26000 @example
26001  ((spam-contents gnus-group-spam-classification-ham)
26002   (spam-process ((ham spam-use-spamoracle)
26003                  (spam spam-use-spamoracle))))
26004 @end example
26005 For this group the @code{spam-use-spamoracle} is installed for both
26006 ham and spam processing.  If the group contains spam message
26007 (e.g. because SpamOracle has not had enough sample messages yet) and
26008 the user marks some messages as spam messages, these messages will be
26009 processed by SpamOracle.  The processor sends the messages to
26010 SpamOracle as new samples for spam.
26012 @node Extending the Spam package
26013 @subsection Extending the Spam package
26014 @cindex spam filtering
26015 @cindex spam elisp package, extending
26016 @cindex extending the spam elisp package
26018 Say you want to add a new back end called blackbox.  For filtering
26019 incoming mail, provide the following:
26021 @enumerate
26023 @item
26024 Code
26026 @lisp
26027 (defvar spam-use-blackbox nil
26028   "True if blackbox should be used.")
26029 @end lisp
26031 Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
26033 Write @code{spam-blackbox-register-routine} and
26034 @code{spam-blackbox-unregister-routine} using the bogofilter
26035 register/unregister routines as a start, or other restister/unregister
26036 routines more appropriate to Blackbox, if Blackbox can
26037 register/unregister spam and ham.
26039 @item
26040 Functionality
26042 The @code{spam-check-blackbox} function should return @samp{nil} or
26043 @code{spam-split-group}, observing the other conventions.  See the
26044 existing @code{spam-check-*} functions for examples of what you can
26045 do, and stick to the template unless you fully understand the reasons
26046 why you aren't.
26048 @end enumerate
26050 For processing spam and ham messages, provide the following:
26052 @enumerate
26054 @item
26055 Code
26057 Note you don't have to provide a spam or a ham processor.  Only
26058 provide them if Blackbox supports spam or ham processing.
26060 Also, ham and spam processors are being phased out as single
26061 variables.  Instead the form @code{(spam spam-use-blackbox)} or
26062 @code{(ham spam-use-blackbox)} is favored.  For now, spam/ham
26063 processor variables are still around but they won't be for long.
26065 @lisp
26066 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
26067   "The Blackbox summary exit spam processor.
26068 Only applicable to spam groups.")
26070 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
26071   "The whitelist summary exit ham processor.
26072 Only applicable to non-spam (unclassified and ham) groups.")
26074 @end lisp
26076 @item
26077 Gnus parameters
26080 @lisp
26081 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
26082 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
26083 @end lisp
26084 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
26085 sure you do it twice, once for the parameter and once for the
26086 variable customization.
26089 @lisp
26090 (variable-item spam-use-blackbox)
26091 @end lisp
26092 to the @code{spam-autodetect-methods} group parameter in
26093 @code{gnus.el} if Blackbox can check incoming mail for spam contents.
26095 Finally, use the appropriate @code{spam-install-*-backend} function in
26096 @code{spam.el}.  Here are the available functions.
26099 @enumerate
26101 @item
26102 @code{spam-install-backend-alias}
26104 This function will simply install an alias for a back end that does
26105 everything like the original back end.  It is currently only used to
26106 make @code{spam-use-BBDB-exclusive} act like @code{spam-use-BBDB}.
26108 @item
26109 @code{spam-install-nocheck-backend}
26111 This function installs a back end that has no check function, but can
26112 register/unregister ham or spam.  The @code{spam-use-gmane} back end is
26113 such a back end.
26115 @item
26116 @code{spam-install-checkonly-backend}
26118 This function will install a back end that can only check incoming mail
26119 for spam contents.  It can't register or unregister messages.
26120 @code{spam-use-blackholes} and @code{spam-use-hashcash} are such
26121 back ends.
26123 @item
26124 @code{spam-install-statistical-checkonly-backend}
26126 This function installs a statistical back end (one which requires the
26127 full body of a message to check it) that can only check incoming mail
26128 for contents.  @code{spam-use-regex-body} is such a filter.
26130 @item
26131 @code{spam-install-statistical-backend}
26133 This function install a statistical back end with incoming checks and
26134 registration/unregistration routines.  @code{spam-use-bogofilter} is
26135 set up this way.
26137 @item
26138 @code{spam-install-backend}
26140 This is the most normal back end installation, where a back end that can
26141 check and register/unregister messages is set up without statistical
26142 abilities.  The @code{spam-use-BBDB} is such a back end.
26144 @item
26145 @code{spam-install-mover-backend}
26147 Mover back ends are internal to @code{spam.el} and specifically move
26148 articles around when the summary is exited.  You will very probably
26149 never install such a back end.
26150 @end enumerate
26152 @end enumerate
26154 @node Spam Statistics Package
26155 @subsection Spam Statistics Package
26156 @cindex Paul Graham
26157 @cindex Graham, Paul
26158 @cindex naive Bayesian spam filtering
26159 @cindex Bayesian spam filtering, naive
26160 @cindex spam filtering, naive Bayesian
26162 Paul Graham has written an excellent essay about spam filtering using
26163 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
26164 Spam}.  In it he describes the inherent deficiency of rule-based
26165 filtering as used by SpamAssassin, for example: Somebody has to write
26166 the rules, and everybody else has to install these rules.  You are
26167 always late.  It would be much better, he argues, to filter mail based
26168 on whether it somehow resembles spam or non-spam.  One way to measure
26169 this is word distribution.  He then goes on to describe a solution
26170 that checks whether a new mail resembles any of your other spam mails
26171 or not.
26173 The basic idea is this:  Create a two collections of your mail, one
26174 with spam, one with non-spam.  Count how often each word appears in
26175 either collection, weight this by the total number of mails in the
26176 collections, and store this information in a dictionary.  For every
26177 word in a new mail, determine its probability to belong to a spam or a
26178 non-spam mail.  Use the 15 most conspicuous words, compute the total
26179 probability of the mail being spam.  If this probability is higher
26180 than a certain threshold, the mail is considered to be spam.
26182 The Spam Statistics package adds support to Gnus for this kind of
26183 filtering.  It can be used as one of the back ends of the Spam package
26184 (@pxref{Spam Package}), or by itself.
26186 Before using the Spam Statistics package, you need to set it up.
26187 First, you need two collections of your mail, one with spam, one with
26188 non-spam.  Then you need to create a dictionary using these two
26189 collections, and save it.  And last but not least, you need to use
26190 this dictionary in your fancy mail splitting rules.
26192 @menu
26193 * Creating a spam-stat dictionary::
26194 * Splitting mail using spam-stat::
26195 * Low-level interface to the spam-stat dictionary::
26196 @end menu
26198 @node Creating a spam-stat dictionary
26199 @subsubsection Creating a spam-stat dictionary
26201 Before you can begin to filter spam based on statistics, you must
26202 create these statistics based on two mail collections, one with spam,
26203 one with non-spam.  These statistics are then stored in a dictionary
26204 for later use.  In order for these statistics to be meaningful, you
26205 need several hundred emails in both collections.
26207 Gnus currently supports only the nnml back end for automated dictionary
26208 creation.  The nnml back end stores all mails in a directory, one file
26209 per mail.  Use the following:
26211 @defun spam-stat-process-spam-directory
26212 Create spam statistics for every file in this directory.  Every file
26213 is treated as one spam mail.
26214 @end defun
26216 @defun spam-stat-process-non-spam-directory
26217 Create non-spam statistics for every file in this directory.  Every
26218 file is treated as one non-spam mail.
26219 @end defun
26221 Usually you would call @code{spam-stat-process-spam-directory} on a
26222 directory such as @file{~/Mail/mail/spam} (this usually corresponds to
26223 the group @samp{nnml:mail.spam}), and you would call
26224 @code{spam-stat-process-non-spam-directory} on a directory such as
26225 @file{~/Mail/mail/misc} (this usually corresponds to the group
26226 @samp{nnml:mail.misc}).
26228 When you are using @acronym{IMAP}, you won't have the mails available
26229 locally, so that will not work.  One solution is to use the Gnus Agent
26230 to cache the articles.  Then you can use directories such as
26231 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
26232 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
26234 @defvar spam-stat
26235 This variable holds the hash-table with all the statistics---the
26236 dictionary we have been talking about.  For every word in either
26237 collection, this hash-table stores a vector describing how often the
26238 word appeared in spam and often it appeared in non-spam mails.
26239 @end defvar
26241 If you want to regenerate the statistics from scratch, you need to
26242 reset the dictionary.
26244 @defun spam-stat-reset
26245 Reset the @code{spam-stat} hash-table, deleting all the statistics.
26246 @end defun
26248 When you are done, you must save the dictionary.  The dictionary may
26249 be rather large.  If you will not update the dictionary incrementally
26250 (instead, you will recreate it once a month, for example), then you
26251 can reduce the size of the dictionary by deleting all words that did
26252 not appear often enough or that do not clearly belong to only spam or
26253 only non-spam mails.
26255 @defun spam-stat-reduce-size
26256 Reduce the size of the dictionary.  Use this only if you do not want
26257 to update the dictionary incrementally.
26258 @end defun
26260 @defun spam-stat-save
26261 Save the dictionary.
26262 @end defun
26264 @defvar spam-stat-file
26265 The filename used to store the dictionary.  This defaults to
26266 @file{~/.spam-stat.el}.
26267 @end defvar
26269 @node Splitting mail using spam-stat
26270 @subsubsection Splitting mail using spam-stat
26272 This section describes how to use the Spam statistics
26273 @emph{independently} of the @xref{Spam Package}.
26275 First, add the following to your @file{~/.gnus.el} file:
26277 @lisp
26278 (require 'spam-stat)
26279 (spam-stat-load)
26280 @end lisp
26282 This will load the necessary Gnus code, and the dictionary you
26283 created.
26285 Next, you need to adapt your fancy splitting rules:  You need to
26286 determine how to use @code{spam-stat}.  The following examples are for
26287 the nnml back end.  Using the nnimap back end works just as well.  Just
26288 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
26290 In the simplest case, you only have two groups, @samp{mail.misc} and
26291 @samp{mail.spam}.  The following expression says that mail is either
26292 spam or it should go into @samp{mail.misc}.  If it is spam, then
26293 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
26295 @lisp
26296 (setq nnmail-split-fancy
26297       `(| (: spam-stat-split-fancy)
26298           "mail.misc"))
26299 @end lisp
26301 @defvar spam-stat-split-fancy-spam-group
26302 The group to use for spam.  Default is @samp{mail.spam}.
26303 @end defvar
26305 If you also filter mail with specific subjects into other groups, use
26306 the following expression.  Only mails not matching the regular
26307 expression are considered potential spam.
26309 @lisp
26310 (setq nnmail-split-fancy
26311       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
26312           (: spam-stat-split-fancy)
26313           "mail.misc"))
26314 @end lisp
26316 If you want to filter for spam first, then you must be careful when
26317 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
26318 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
26319 non-spam, therefore both should be in your collection of non-spam
26320 mails, when creating the dictionary!
26322 @lisp
26323 (setq nnmail-split-fancy
26324       `(| (: spam-stat-split-fancy)
26325           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26326           "mail.misc"))
26327 @end lisp
26329 You can combine this with traditional filtering.  Here, we move all
26330 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
26331 @code{spam-stat-split-fancy} will never see them, the mails in
26332 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
26333 nor in your collection of non-spam mails, when creating the
26334 dictionary!
26336 @lisp
26337 (setq nnmail-split-fancy
26338       `(| ("Content-Type" "text/html" "mail.spam.filtered")
26339           (: spam-stat-split-fancy)
26340           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26341           "mail.misc"))
26342 @end lisp
26345 @node Low-level interface to the spam-stat dictionary
26346 @subsubsection Low-level interface to the spam-stat dictionary
26348 The main interface to using @code{spam-stat}, are the following functions:
26350 @defun spam-stat-buffer-is-spam
26351 Called in a buffer, that buffer is considered to be a new spam mail.
26352 Use this for new mail that has not been processed before.
26353 @end defun
26355 @defun spam-stat-buffer-is-no-spam
26356 Called in a buffer, that buffer is considered to be a new non-spam
26357 mail.  Use this for new mail that has not been processed before.
26358 @end defun
26360 @defun spam-stat-buffer-change-to-spam
26361 Called in a buffer, that buffer is no longer considered to be normal
26362 mail but spam.  Use this to change the status of a mail that has
26363 already been processed as non-spam.
26364 @end defun
26366 @defun spam-stat-buffer-change-to-non-spam
26367 Called in a buffer, that buffer is no longer considered to be spam but
26368 normal mail.  Use this to change the status of a mail that has already
26369 been processed as spam.
26370 @end defun
26372 @defun spam-stat-save
26373 Save the hash table to the file.  The filename used is stored in the
26374 variable @code{spam-stat-file}.
26375 @end defun
26377 @defun spam-stat-load
26378 Load the hash table from a file.  The filename used is stored in the
26379 variable @code{spam-stat-file}.
26380 @end defun
26382 @defun spam-stat-score-word
26383 Return the spam score for a word.
26384 @end defun
26386 @defun spam-stat-score-buffer
26387 Return the spam score for a buffer.
26388 @end defun
26390 @defun spam-stat-split-fancy
26391 Use this function for fancy mail splitting.  Add the rule @samp{(:
26392 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
26393 @end defun
26395 Make sure you load the dictionary before using it.  This requires the
26396 following in your @file{~/.gnus.el} file:
26398 @lisp
26399 (require 'spam-stat)
26400 (spam-stat-load)
26401 @end lisp
26403 Typical test will involve calls to the following functions:
26405 @smallexample
26406 Reset: (setq spam-stat (make-hash-table :test 'equal))
26407 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26408 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26409 Save table: (spam-stat-save)
26410 File size: (nth 7 (file-attributes spam-stat-file))
26411 Number of words: (hash-table-count spam-stat)
26412 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26413 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26414 Reduce table size: (spam-stat-reduce-size)
26415 Save table: (spam-stat-save)
26416 File size: (nth 7 (file-attributes spam-stat-file))
26417 Number of words: (hash-table-count spam-stat)
26418 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26419 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26420 @end smallexample
26422 Here is how you would create your dictionary:
26424 @smallexample
26425 Reset: (setq spam-stat (make-hash-table :test 'equal))
26426 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26427 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26428 Repeat for any other non-spam group you need...
26429 Reduce table size: (spam-stat-reduce-size)
26430 Save table: (spam-stat-save)
26431 @end smallexample
26433 @node Other modes
26434 @section Interaction with other modes
26436 @subsection Dired
26437 @cindex dired
26439 @code{gnus-dired-minor-mode} provides some useful functions for dired
26440 buffers.  It is enabled with
26441 @lisp
26442 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
26443 @end lisp
26445 @table @kbd
26446 @item C-c C-m C-a
26447 @findex gnus-dired-attach
26448 @cindex attachments, selection via dired
26449 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
26450 You will be prompted for a message buffer.
26452 @item C-c C-m C-l
26453 @findex gnus-dired-find-file-mailcap
26454 Visit a file according to the appropriate mailcap entry
26455 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
26456 buffer.
26458 @item C-c C-m C-p
26459 @findex gnus-dired-print
26460 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
26461 there is no print command, print in a PostScript image.
26462 @end table
26464 @node Various Various
26465 @section Various Various
26466 @cindex mode lines
26467 @cindex highlights
26469 @table @code
26471 @item gnus-home-directory
26472 @vindex gnus-home-directory
26473 All Gnus file and directory variables will be initialized from this
26474 variable, which defaults to @file{~/}.
26476 @item gnus-directory
26477 @vindex gnus-directory
26478 Most Gnus storage file and directory variables will be initialized from
26479 this variable, which defaults to the @env{SAVEDIR} environment
26480 variable, or @file{~/News/} if that variable isn't set.
26482 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
26483 This means that other directory variables that are initialized from this
26484 variable won't be set properly if you set this variable in
26485 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
26487 @item gnus-default-directory
26488 @vindex gnus-default-directory
26489 Not related to the above variable at all---this variable says what the
26490 default directory of all Gnus buffers should be.  If you issue commands
26491 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
26492 default directory.  If this variable is @code{nil} (which is the
26493 default), the default directory will be the default directory of the
26494 buffer you were in when you started Gnus.
26496 @item gnus-verbose
26497 @vindex gnus-verbose
26498 This variable is an integer between zero and ten.  The higher the value,
26499 the more messages will be displayed.  If this variable is zero, Gnus
26500 will never flash any messages, if it is seven (which is the default),
26501 most important messages will be shown, and if it is ten, Gnus won't ever
26502 shut up, but will flash so many messages it will make your head swim.
26504 @item gnus-verbose-backends
26505 @vindex gnus-verbose-backends
26506 This variable works the same way as @code{gnus-verbose}, but it applies
26507 to the Gnus back ends instead of Gnus proper.
26509 @item gnus-add-timestamp-to-message
26510 @vindex gnus-add-timestamp-to-message
26511 This variable controls whether to add timestamps to messages that are
26512 controlled by @code{gnus-verbose} and @code{gnus-verbose-backends} and
26513 are issued.  The default value is @code{nil} which means never to add
26514 timestamp.  If it is @code{log}, add timestamps to only the messages
26515 that go into the @samp{*Messages*} buffer (in XEmacs, it is the
26516 @w{@samp{ *Message-Log*}} buffer).  If it is neither @code{nil} nor
26517 @code{log}, add timestamps not only to log messages but also to the ones
26518 displayed in the echo area.
26520 @item nnheader-max-head-length
26521 @vindex nnheader-max-head-length
26522 When the back ends read straight heads of articles, they all try to read
26523 as little as possible.  This variable (default 8192) specifies
26524 the absolute max length the back ends will try to read before giving up
26525 on finding a separator line between the head and the body.  If this
26526 variable is @code{nil}, there is no upper read bound.  If it is
26527 @code{t}, the back ends won't try to read the articles piece by piece,
26528 but read the entire articles.  This makes sense with some versions of
26529 @code{ange-ftp} or @code{efs}.
26531 @item nnheader-head-chop-length
26532 @vindex nnheader-head-chop-length
26533 This variable (default 2048) says how big a piece of each article to
26534 read when doing the operation described above.
26536 @item nnheader-file-name-translation-alist
26537 @vindex nnheader-file-name-translation-alist
26538 @cindex file names
26539 @cindex invalid characters in file names
26540 @cindex characters in file names
26541 This is an alist that says how to translate characters in file names.
26542 For instance, if @samp{:} is invalid as a file character in file names
26543 on your system (you OS/2 user you), you could say something like:
26545 @lisp
26546 @group
26547 (setq nnheader-file-name-translation-alist
26548       '((?: . ?_)))
26549 @end group
26550 @end lisp
26552 In fact, this is the default value for this variable on OS/2 and MS
26553 Windows (phooey) systems.
26555 @item gnus-hidden-properties
26556 @vindex gnus-hidden-properties
26557 This is a list of properties to use to hide ``invisible'' text.  It is
26558 @code{(invisible t intangible t)} by default on most systems, which
26559 makes invisible text invisible and intangible.
26561 @item gnus-parse-headers-hook
26562 @vindex gnus-parse-headers-hook
26563 A hook called before parsing headers.  It can be used, for instance, to
26564 gather statistics on the headers fetched, or perhaps you'd like to prune
26565 some headers.  I don't see why you'd want that, though.
26567 @item gnus-shell-command-separator
26568 @vindex gnus-shell-command-separator
26569 String used to separate two shell commands.  The default is @samp{;}.
26571 @item gnus-invalid-group-regexp
26572 @vindex gnus-invalid-group-regexp
26574 Regexp to match ``invalid'' group names when querying user for a group
26575 name.  The default value catches some @strong{really} invalid group
26576 names who could possibly mess up Gnus internally (like allowing
26577 @samp{:} in a group name, which is normally used to delimit method and
26578 group).
26580 @acronym{IMAP} users might want to allow @samp{/} in group names though.
26583 @end table
26585 @node The End
26586 @chapter The End
26588 Well, that's the manual---you can get on with your life now.  Keep in
26589 touch.  Say hello to your cats from me.
26591 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
26593 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
26595 @quotation
26596 @strong{Te Deum}
26598 @sp 1
26599 Not because of victories @*
26600 I sing,@*
26601 having none,@*
26602 but for the common sunshine,@*
26603 the breeze,@*
26604 the largess of the spring.
26606 @sp 1
26607 Not for victory@*
26608 but for the day's work done@*
26609 as well as I was able;@*
26610 not for a seat upon the dais@*
26611 but at the common table.@*
26612 @end quotation
26615 @node Appendices
26616 @chapter Appendices
26618 @menu
26619 * XEmacs::                      Requirements for installing under XEmacs.
26620 * History::                     How Gnus got where it is today.
26621 * On Writing Manuals::          Why this is not a beginner's guide.
26622 * Terminology::                 We use really difficult, like, words here.
26623 * Customization::               Tailoring Gnus to your needs.
26624 * Troubleshooting::             What you might try if things do not work.
26625 * Gnus Reference Guide::        Rilly, rilly technical stuff.
26626 * Emacs for Heathens::          A short introduction to Emacsian terms.
26627 * Frequently Asked Questions::  The Gnus FAQ
26628 @end menu
26631 @node XEmacs
26632 @section XEmacs
26633 @cindex XEmacs
26634 @cindex installing under XEmacs
26636 XEmacs is distributed as a collection of packages.  You should install
26637 whatever packages the Gnus XEmacs package requires.  The current
26638 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
26639 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
26640 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
26641 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
26644 @node History
26645 @section History
26647 @cindex history
26648 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
26649 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
26651 If you want to investigate the person responsible for this outrage,
26652 you can point your (feh!) web browser to
26653 @uref{http://quimby.gnus.org/}.  This is also the primary
26654 distribution point for the new and spiffy versions of Gnus, and is
26655 known as The Site That Destroys Newsrcs And Drives People Mad.
26657 During the first extended alpha period of development, the new Gnus was
26658 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
26659 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
26660 (Besides, the ``Gnus'' in this abbreviation should probably be
26661 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
26662 appropriate name, don't you think?)
26664 In any case, after spending all that energy on coming up with a new and
26665 spunky name, we decided that the name was @emph{too} spunky, so we
26666 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
26667 ``@sc{gnus}''.  New vs. old.
26669 @menu
26670 * Gnus Versions::               What Gnus versions have been released.
26671 * Other Gnus Versions::         Other Gnus versions that also have been released.
26672 * Why?::                        What's the point of Gnus?
26673 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
26674 * Conformity::                  Gnus tries to conform to all standards.
26675 * Emacsen::                     Gnus can be run on a few modern Emacsen.
26676 * Gnus Development::            How Gnus is developed.
26677 * Contributors::                Oodles of people.
26678 * New Features::                Pointers to some of the new stuff in Gnus.
26679 @end menu
26682 @node Gnus Versions
26683 @subsection Gnus Versions
26684 @cindex ding Gnus
26685 @cindex September Gnus
26686 @cindex Red Gnus
26687 @cindex Quassia Gnus
26688 @cindex Pterodactyl Gnus
26689 @cindex Oort Gnus
26690 @cindex No Gnus
26691 @cindex Gnus versions
26693 The first ``proper'' release of Gnus 5 was done in November 1995 when it
26694 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
26695 plus 15 Gnus 5.0 releases).
26697 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
26698 releases)) was released under the name ``Gnus 5.2'' (40 releases).
26700 On July 28th 1996 work on Red Gnus was begun, and it was released on
26701 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
26703 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
26704 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
26706 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
26707 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
26708 1999.
26710 On the 26th of October 2000, Oort Gnus was begun and was released as
26711 Gnus 5.10 on May 1st 2003 (24 releases).
26713 On the January 4th 2004, No Gnus was begun.
26715 If you happen upon a version of Gnus that has a prefixed name --
26716 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
26717 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
26718 Don't let it know that you're frightened.  Back away.  Slowly.  Whatever
26719 you do, don't run.  Walk away, calmly, until you're out of its reach.
26720 Find a proper released version of Gnus and snuggle up to that instead.
26723 @node Other Gnus Versions
26724 @subsection Other Gnus Versions
26725 @cindex Semi-gnus
26727 In addition to the versions of Gnus which have had their releases
26728 coordinated by Lars, one major development has been Semi-gnus from
26729 Japan.  It's based on a library called @acronym{SEMI}, which provides
26730 @acronym{MIME} capabilities.
26732 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
26733 Collectively, they are called ``Semi-gnus'', and different strains are
26734 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
26735 @acronym{MIME} and multilingualization things, especially important for
26736 Japanese users.
26739 @node Why?
26740 @subsection Why?
26742 What's the point of Gnus?
26744 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
26745 newsreader, that lets you do anything you can think of.  That was my
26746 original motivation, but while working on Gnus, it has become clear to
26747 me that this generation of newsreaders really belong in the stone age.
26748 Newsreaders haven't developed much since the infancy of the net.  If the
26749 volume continues to rise with the current rate of increase, all current
26750 newsreaders will be pretty much useless.  How do you deal with
26751 newsgroups that have thousands of new articles each day?  How do you
26752 keep track of millions of people who post?
26754 Gnus offers no real solutions to these questions, but I would very much
26755 like to see Gnus being used as a testing ground for new methods of
26756 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
26757 to separate the newsreader from the back ends, Gnus now offers a simple
26758 interface for anybody who wants to write new back ends for fetching mail
26759 and news from different sources.  I have added hooks for customizations
26760 everywhere I could imagine it being useful.  By doing so, I'm inviting
26761 every one of you to explore and invent.
26763 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
26764 @kbd{C-u 100 M-x all-hail-xemacs}.
26767 @node Compatibility
26768 @subsection Compatibility
26770 @cindex compatibility
26771 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
26772 bindings have been kept.  More key bindings have been added, of course,
26773 but only in one or two obscure cases have old bindings been changed.
26775 Our motto is:
26776 @quotation
26777 @cartouche
26778 @center In a cloud bones of steel.
26779 @end cartouche
26780 @end quotation
26782 All commands have kept their names.  Some internal functions have changed
26783 their names.
26785 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
26786 Articles}.
26788 One major compatibility question is the presence of several summary
26789 buffers.  All variables relevant while reading a group are
26790 buffer-local to the summary buffer they belong in.  Although many
26791 important variables have their values copied into their global
26792 counterparts whenever a command is executed in the summary buffer, this
26793 change might lead to incorrect values being used unless you are careful.
26795 All code that relies on knowledge of @sc{gnus} internals will probably
26796 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
26797 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
26798 maintains a hash table that points to the entries in this alist (which
26799 speeds up many functions), and changing the alist directly will lead to
26800 peculiar results.
26802 @cindex hilit19
26803 @cindex highlighting
26804 Old hilit19 code does not work at all.  In fact, you should probably
26805 remove all hilit code from all Gnus hooks
26806 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
26807 Gnus provides various integrated functions for highlighting.  These are
26808 faster and more accurate.  To make life easier for everybody, Gnus will
26809 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
26810 Away!
26812 Packages like @code{expire-kill} will no longer work.  As a matter of
26813 fact, you should probably remove all old @sc{gnus} packages (and other
26814 code) when you start using Gnus.  More likely than not, Gnus already
26815 does what you have written code to make @sc{gnus} do.  (Snicker.)
26817 Even though old methods of doing things are still supported, only the
26818 new methods are documented in this manual.  If you detect a new method of
26819 doing something while reading this manual, that does not mean you have
26820 to stop doing it the old way.
26822 Gnus understands all @sc{gnus} startup files.
26824 @kindex M-x gnus-bug
26825 @findex gnus-bug
26826 @cindex reporting bugs
26827 @cindex bugs
26828 Overall, a casual user who hasn't written much code that depends on
26829 @sc{gnus} internals should suffer no problems.  If problems occur,
26830 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
26832 @vindex gnus-bug-create-help-buffer
26833 If you are in the habit of sending bug reports @emph{very} often, you
26834 may find the helpful help buffer annoying after a while.  If so, set
26835 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
26836 up at you.
26839 @node Conformity
26840 @subsection Conformity
26842 No rebels without a clue here, ma'am.  We conform to all standards known
26843 to (wo)man.  Except for those standards and/or conventions we disagree
26844 with, of course.
26846 @table @strong
26848 @item RFC (2)822
26849 @cindex RFC 822
26850 @cindex RFC 2822
26851 There are no known breaches of this standard.
26853 @item RFC 1036
26854 @cindex RFC 1036
26855 There are no known breaches of this standard, either.
26857 @item Son-of-RFC 1036
26858 @cindex Son-of-RFC 1036
26859 We do have some breaches to this one.
26861 @table @emph
26863 @item X-Newsreader
26864 @itemx User-Agent
26865 These are considered to be ``vanity headers'', while I consider them
26866 to be consumer information.  After seeing so many badly formatted
26867 articles coming from @code{tin} and @code{Netscape} I know not to use
26868 either of those for posting articles.  I would not have known that if
26869 it wasn't for the @code{X-Newsreader} header.
26870 @end table
26872 @item USEFOR
26873 @cindex USEFOR
26874 USEFOR is an IETF working group writing a successor to RFC 1036, based
26875 on Son-of-RFC 1036.  They have produced a number of drafts proposing
26876 various changes to the format of news articles.  The Gnus towers will
26877 look into implementing the changes when the draft is accepted as an RFC.
26879 @item MIME - RFC 2045-2049 etc
26880 @cindex @acronym{MIME}
26881 All the various @acronym{MIME} RFCs are supported.
26883 @item Disposition Notifications - RFC 2298
26884 Message Mode is able to request notifications from the receiver.
26886 @item PGP - RFC 1991 and RFC 2440
26887 @cindex RFC 1991
26888 @cindex RFC 2440
26889 RFC 1991 is the original @acronym{PGP} message specification,
26890 published as an informational RFC.  RFC 2440 was the follow-up, now
26891 called Open PGP, and put on the Standards Track.  Both document a
26892 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
26893 encoding (signing and encryption) and decoding (verification and
26894 decryption).
26896 @item PGP/MIME - RFC 2015/3156
26897 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
26898 1991) describes the @acronym{MIME}-wrapping around the RFC 1991/2440 format.
26899 Gnus supports both encoding and decoding.
26901 @item S/MIME - RFC 2633
26902 RFC 2633 describes the @acronym{S/MIME} format.
26904 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
26905 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
26906 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
26907 authentication for @acronym{IMAP}.  RFC 2086 describes access control
26908 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
26909 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
26910 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
26911 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
26913 @end table
26915 If you ever notice Gnus acting non-compliant with regards to the texts
26916 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
26917 know.
26920 @node Emacsen
26921 @subsection Emacsen
26922 @cindex Emacsen
26923 @cindex XEmacs
26924 @cindex Mule
26925 @cindex Emacs
26927 This version of Gnus should work on:
26929 @itemize @bullet
26931 @item
26932 Emacs 21.1 and up.
26934 @item
26935 XEmacs 21.4 and up.
26937 @end itemize
26939 This Gnus version will absolutely not work on any Emacsen older than
26940 that.  Not reliably, at least.  Older versions of Gnus may work on older
26941 Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
26942 20.7 and XEmacs 21.1.
26944 @c No-merge comment: The paragraph added in v5-10 here must not be
26945 @c synced here!
26947 @node Gnus Development
26948 @subsection Gnus Development
26950 Gnus is developed in a two-phased cycle.  The first phase involves much
26951 discussion on the development mailing list @samp{ding@@gnus.org}, where people
26952 propose changes and new features, post patches and new back ends.  This
26953 phase is called the @dfn{alpha} phase, since the Gnusae released in this
26954 phase are @dfn{alpha releases}, or (perhaps more commonly in other
26955 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
26956 unstable and should not be used by casual users.  Gnus alpha releases
26957 have names like ``Oort Gnus'' and ``No Gnus''.  @xref{Gnus Versions}.
26959 After futzing around for 10-100 alpha releases, Gnus is declared
26960 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
26961 and is called things like ``Gnus 5.10.1'' instead.  Normal people are
26962 supposed to be able to use these, and these are mostly discussed on the
26963 @samp{gnu.emacs.gnus} newsgroup.  This newgroup is mirrored to the
26964 mailing list @samp{info-gnus-english@@gnu.org} which is carried on Gmane
26965 as @samp{gmane.emacs.gnus.user}.  These releases are finally integrated
26966 in Emacs.
26968 @cindex Incoming*
26969 @vindex mail-source-delete-incoming
26970 Some variable defaults differ between alpha Gnusae and released Gnusae,
26971 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26972 lossage of mail if an alpha release hiccups while handling the mail.
26973 @xref{Mail Source Customization}.
26975 The division of discussion between the ding mailing list and the Gnus
26976 newsgroup is not purely based on publicity concerns.  It's true that
26977 having people write about the horrible things that an alpha Gnus release
26978 can do (sometimes) in a public forum may scare people off, but more
26979 importantly, talking about new experimental features that have been
26980 introduced may confuse casual users.  New features are frequently
26981 introduced, fiddled with, and judged to be found wanting, and then
26982 either discarded or totally rewritten.  People reading the mailing list
26983 usually keep up with these rapid changes, while people on the newsgroup
26984 can't be assumed to do so.
26986 So if you have problems with or questions about the alpha versions,
26987 direct those to the ding mailing list @samp{ding@@gnus.org}.  This list
26988 is also available on Gmane as @samp{gmane.emacs.gnus.general}.
26990 @cindex Incoming*
26991 @vindex mail-source-delete-incoming
26992 Some variable defaults differ between alpha Gnusae and released Gnusae,
26993 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26994 lossage of mail if an alpha release hiccups while handling the mail.
26995 @xref{Mail Source Customization}.
26997 @node Contributors
26998 @subsection Contributors
26999 @cindex contributors
27001 The new Gnus version couldn't have been done without the help of all the
27002 people on the (ding) mailing list.  Every day for over a year I have
27003 gotten billions of nice bug reports from them, filling me with joy,
27004 every single one of them.  Smooches.  The people on the list have been
27005 tried beyond endurance, what with my ``oh, that's a neat idea <type
27006 type>, yup, I'll release it right away <ship off> no wait, that doesn't
27007 work at all <type type>, yup, I'll ship that one off right away <ship
27008 off> no, wait, that absolutely does not work'' policy for releases.
27009 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
27010 ``worser''? ``much worser''?  ``worsest''?)
27012 I would like to take this opportunity to thank the Academy for@dots{}  oops,
27013 wrong show.
27015 @itemize @bullet
27017 @item
27018 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
27020 @item
27021 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
27022 nnwarchive and many, many other things connected with @acronym{MIME} and
27023 other types of en/decoding, as well as general bug fixing, new
27024 functionality and stuff.
27026 @item
27027 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
27028 well as numerous other things).
27030 @item
27031 Luis Fernandes---design and graphics.
27033 @item
27034 Joe Reiss---creator of the smiley faces.
27036 @item
27037 Justin Sheehy---the @acronym{FAQ} maintainer.
27039 @item
27040 Erik Naggum---help, ideas, support, code and stuff.
27042 @item
27043 Wes Hardaker---@file{gnus-picon.el} and the manual section on
27044 @dfn{picons} (@pxref{Picons}).
27046 @item
27047 Kim-Minh Kaplan---further work on the picon code.
27049 @item
27050 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
27052 @item
27053 Sudish Joseph---innumerable bug fixes.
27055 @item
27056 Ilja Weis---@file{gnus-topic.el}.
27058 @item
27059 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
27061 @item
27062 Vladimir Alexiev---the refcard and reference booklets.
27064 @item
27065 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
27066 distribution by Felix Lee and JWZ.
27068 @item
27069 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
27071 @item
27072 Peter Mutsaers---orphan article scoring code.
27074 @item
27075 Ken Raeburn---POP mail support.
27077 @item
27078 Hallvard B Furuseth---various bits and pieces, especially dealing with
27079 .newsrc files.
27081 @item
27082 Brian Edmonds---@file{gnus-bbdb.el}.
27084 @item
27085 David Moore---rewrite of @file{nnvirtual.el} and many other things.
27087 @item
27088 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
27090 @item
27091 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
27092 well as autoconf support.
27094 @end itemize
27096 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
27097 Borges, and Jost Krieger proof-reading parts of the manual.
27099 The following people have contributed many patches and suggestions:
27101 Christopher Davis,
27102 Andrew Eskilsson,
27103 Kai Grossjohann,
27104 Kevin Greiner,
27105 Jesper Harder,
27106 Paul Jarc,
27107 Simon Josefsson,
27108 David K@aa{}gedal,
27109 Richard Pieri,
27110 Fabrice Popineau,
27111 Daniel Quinlan,
27112 Michael Shields,
27113 Reiner Steib,
27114 Jason L. Tibbitts, III,
27115 Jack Vinson,
27116 Katsumi Yamaoka, @c Yamaoka
27118 Teodor Zlatanov.
27120 Also thanks to the following for patches and stuff:
27122 Jari Aalto,
27123 Adrian Aichner,
27124 Vladimir Alexiev,
27125 Russ Allbery,
27126 Peter Arius,
27127 Matt Armstrong,
27128 Marc Auslander,
27129 Miles Bader,
27130 Alexei V. Barantsev,
27131 Frank Bennett,
27132 Robert Bihlmeyer,
27133 Chris Bone,
27134 Mark Borges,
27135 Mark Boyns,
27136 Lance A. Brown,
27137 Rob Browning,
27138 Kees de Bruin,
27139 Martin Buchholz,
27140 Joe Buehler,
27141 Kevin Buhr,
27142 Alastair Burt,
27143 Joao Cachopo,
27144 Zlatko Calusic,
27145 Massimo Campostrini,
27146 Castor,
27147 David Charlap,
27148 Dan Christensen,
27149 Kevin Christian,
27150 Jae-you Chung, @c ?
27151 James H. Cloos, Jr.,
27152 Laura Conrad,
27153 Michael R. Cook,
27154 Glenn Coombs,
27155 Andrew J. Cosgriff,
27156 Neil Crellin,
27157 Frank D. Cringle,
27158 Geoffrey T. Dairiki,
27159 Andre Deparade,
27160 Ulrik Dickow,
27161 Dave Disser,
27162 Rui-Tao Dong, @c ?
27163 Joev Dubach,
27164 Michael Welsh Duggan,
27165 Dave Edmondson,
27166 Paul Eggert,
27167 Mark W. Eichin,
27168 Karl Eichwalder,
27169 Enami Tsugutomo, @c Enami
27170 Michael Ernst,
27171 Luc Van Eycken,
27172 Sam Falkner,
27173 Nelson Jose dos Santos Ferreira,
27174 Sigbjorn Finne,
27175 Sven Fischer,
27176 Paul Fisher,
27177 Decklin Foster,
27178 Gary D. Foster,
27179 Paul Franklin,
27180 Guy Geens,
27181 Arne Georg Gleditsch,
27182 David S. Goldberg,
27183 Michelangelo Grigni,
27184 Dale Hagglund,
27185 D. Hall,
27186 Magnus Hammerin,
27187 Kenichi Handa, @c Handa
27188 Raja R. Harinath,
27189 Yoshiki Hayashi, @c Hayashi
27190 P. E. Jareth Hein,
27191 Hisashige Kenji, @c Hisashige
27192 Scott Hofmann,
27193 Tassilo Horn,
27194 Marc Horowitz,
27195 Gunnar Horrigmo,
27196 Richard Hoskins,
27197 Brad Howes,
27198 Miguel de Icaza,
27199 Fran@,{c}ois Felix Ingrand,
27200 Tatsuya Ichikawa, @c Ichikawa
27201 Ishikawa Ichiro, @c Ishikawa
27202 Lee Iverson,
27203 Iwamuro Motonori, @c Iwamuro
27204 Rajappa Iyer,
27205 Andreas Jaeger,
27206 Adam P. Jenkins,
27207 Randell Jesup,
27208 Fred Johansen,
27209 Gareth Jones,
27210 Greg Klanderman,
27211 Karl Kleinpaste,
27212 Michael Klingbeil,
27213 Peter Skov Knudsen,
27214 Shuhei Kobayashi, @c Kobayashi
27215 Petr Konecny,
27216 Koseki Yoshinori, @c Koseki
27217 Thor Kristoffersen,
27218 Jens Lautenbacher,
27219 Martin Larose,
27220 Seokchan Lee, @c Lee
27221 Joerg Lenneis,
27222 Carsten Leonhardt,
27223 James LewisMoss,
27224 Christian Limpach,
27225 Markus Linnala,
27226 Dave Love,
27227 Mike McEwan,
27228 Tonny Madsen,
27229 Shlomo Mahlab,
27230 Nat Makarevitch,
27231 Istvan Marko,
27232 David Martin,
27233 Jason R. Mastaler,
27234 Gordon Matzigkeit,
27235 Timo Metzemakers,
27236 Richard Mlynarik,
27237 Lantz Moore,
27238 Morioka Tomohiko, @c Morioka
27239 Erik Toubro Nielsen,
27240 Hrvoje Niksic,
27241 Andy Norman,
27242 Fred Oberhauser,
27243 C. R. Oldham,
27244 Alexandre Oliva,
27245 Ken Olstad,
27246 Masaharu Onishi, @c Onishi
27247 Hideki Ono, @c Ono
27248 Ettore Perazzoli,
27249 William Perry,
27250 Stephen Peters,
27251 Jens-Ulrik Holger Petersen,
27252 Ulrich Pfeifer,
27253 Matt Pharr,
27254 Andy Piper,
27255 John McClary Prevost,
27256 Bill Pringlemeir,
27257 Mike Pullen,
27258 Jim Radford,
27259 Colin Rafferty,
27260 Lasse Rasinen,
27261 Lars Balker Rasmussen,
27262 Joe Reiss,
27263 Renaud Rioboo,
27264 Roland B. Roberts,
27265 Bart Robinson,
27266 Christian von Roques,
27267 Markus Rost,
27268 Jason Rumney,
27269 Wolfgang Rupprecht,
27270 Jay Sachs,
27271 Dewey M. Sasser,
27272 Conrad Sauerwald,
27273 Loren Schall,
27274 Dan Schmidt,
27275 Ralph Schleicher,
27276 Philippe Schnoebelen,
27277 Andreas Schwab,
27278 Randal L. Schwartz,
27279 Danny Siu,
27280 Matt Simmons,
27281 Paul D. Smith,
27282 Jeff Sparkes,
27283 Toby Speight,
27284 Michael Sperber,
27285 Darren Stalder,
27286 Richard Stallman,
27287 Greg Stark,
27288 Sam Steingold,
27289 Paul Stevenson,
27290 Jonas Steverud,
27291 Paul Stodghill,
27292 Kiyokazu Suto, @c Suto
27293 Kurt Swanson,
27294 Samuel Tardieu,
27295 Teddy,
27296 Chuck Thompson,
27297 Tozawa Akihiko, @c Tozawa
27298 Philippe Troin,
27299 James Troup,
27300 Trung Tran-Duc,
27301 Jack Twilley,
27302 Aaron M. Ucko,
27303 Aki Vehtari,
27304 Didier Verna,
27305 Vladimir Volovich,
27306 Jan Vroonhof,
27307 Stefan Waldherr,
27308 Pete Ware,
27309 Barry A. Warsaw,
27310 Christoph Wedler,
27311 Joe Wells,
27312 Lee Willis,
27314 Lloyd Zusman.
27317 For a full overview of what each person has done, the ChangeLogs
27318 included in the Gnus alpha distributions should give ample reading
27319 (550kB and counting).
27321 Apologies to everybody that I've forgotten, of which there are many, I'm
27322 sure.
27324 Gee, that's quite a list of people.  I guess that must mean that there
27325 actually are people who are using Gnus.  Who'd'a thunk it!
27328 @node New Features
27329 @subsection New Features
27330 @cindex new features
27332 @menu
27333 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
27334 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
27335 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
27336 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
27337 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
27338 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
27339 * No Gnus::                     Very punny.
27340 @end menu
27342 These lists are, of course, just @emph{short} overviews of the
27343 @emph{most} important new features.  No, really.  There are tons more.
27344 Yes, we have feeping creaturism in full effect.
27346 @node ding Gnus
27347 @subsubsection (ding) Gnus
27349 New features in Gnus 5.0/5.1:
27351 @itemize @bullet
27353 @item
27354 The look of all buffers can be changed by setting format-like variables
27355 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
27357 @item
27358 Local spool and several @acronym{NNTP} servers can be used at once
27359 (@pxref{Select Methods}).
27361 @item
27362 You can combine groups into virtual groups (@pxref{Virtual Groups}).
27364 @item
27365 You can read a number of different mail formats (@pxref{Getting Mail}).
27366 All the mail back ends implement a convenient mail expiry scheme
27367 (@pxref{Expiring Mail}).
27369 @item
27370 Gnus can use various strategies for gathering threads that have lost
27371 their roots (thereby gathering loose sub-threads into one thread) or it
27372 can go back and retrieve enough headers to build a complete thread
27373 (@pxref{Customizing Threading}).
27375 @item
27376 Killed groups can be displayed in the group buffer, and you can read
27377 them as well (@pxref{Listing Groups}).
27379 @item
27380 Gnus can do partial group updates---you do not have to retrieve the
27381 entire active file just to check for new articles in a few groups
27382 (@pxref{The Active File}).
27384 @item
27385 Gnus implements a sliding scale of subscribedness to groups
27386 (@pxref{Group Levels}).
27388 @item
27389 You can score articles according to any number of criteria
27390 (@pxref{Scoring}).  You can even get Gnus to find out how to score
27391 articles for you (@pxref{Adaptive Scoring}).
27393 @item
27394 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
27395 manner, so it should be difficult to lose much data on what you have
27396 read if your machine should go down (@pxref{Auto Save}).
27398 @item
27399 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
27400 cluttering up the @file{.emacs} file.
27402 @item
27403 You can set the process mark on both groups and articles and perform
27404 operations on all the marked items (@pxref{Process/Prefix}).
27406 @item
27407 You can grep through a subset of groups and create a group from the
27408 results (@pxref{Kibozed Groups}).
27410 @item
27411 You can list subsets of groups according to, well, anything
27412 (@pxref{Listing Groups}).
27414 @item
27415 You can browse foreign servers and subscribe to groups from those
27416 servers (@pxref{Browse Foreign Server}).
27418 @item
27419 Gnus can fetch articles, asynchronously, on a second connection to the
27420 server (@pxref{Asynchronous Fetching}).
27422 @item
27423 You can cache articles locally (@pxref{Article Caching}).
27425 @item
27426 The uudecode functions have been expanded and generalized
27427 (@pxref{Decoding Articles}).
27429 @item
27430 You can still post uuencoded articles, which was a little-known feature
27431 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
27433 @item
27434 Fetching parents (and other articles) now actually works without
27435 glitches (@pxref{Finding the Parent}).
27437 @item
27438 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
27440 @item
27441 Digests (and other files) can be used as the basis for groups
27442 (@pxref{Document Groups}).
27444 @item
27445 Articles can be highlighted and customized (@pxref{Customizing
27446 Articles}).
27448 @item
27449 URLs and other external references can be buttonized (@pxref{Article
27450 Buttons}).
27452 @item
27453 You can do lots of strange stuff with the Gnus window & frame
27454 configuration (@pxref{Window Layout}).
27456 @item
27457 You can click on buttons instead of using the keyboard
27458 (@pxref{Buttons}).
27460 @end itemize
27463 @node September Gnus
27464 @subsubsection September Gnus
27466 @iftex
27467 @iflatex
27468 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
27469 @end iflatex
27470 @end iftex
27472 New features in Gnus 5.2/5.3:
27474 @itemize @bullet
27476 @item
27477 A new message composition mode is used.  All old customization variables
27478 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
27479 now obsolete.
27481 @item
27482 Gnus is now able to generate @dfn{sparse} threads---threads where
27483 missing articles are represented by empty nodes (@pxref{Customizing
27484 Threading}).
27486 @lisp
27487 (setq gnus-build-sparse-threads 'some)
27488 @end lisp
27490 @item
27491 Outgoing articles are stored on a special archive server
27492 (@pxref{Archived Messages}).
27494 @item
27495 Partial thread regeneration now happens when articles are
27496 referred.
27498 @item
27499 Gnus can make use of GroupLens predictions.
27501 @item
27502 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
27504 @item
27505 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
27507 @lisp
27508 (setq gnus-use-trees t)
27509 @end lisp
27511 @item
27512 An @code{nn}-like pick-and-read minor mode is available for the summary
27513 buffers (@pxref{Pick and Read}).
27515 @lisp
27516 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
27517 @end lisp
27519 @item
27520 In binary groups you can use a special binary minor mode (@pxref{Binary
27521 Groups}).
27523 @item
27524 Groups can be grouped in a folding topic hierarchy (@pxref{Group
27525 Topics}).
27527 @lisp
27528 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
27529 @end lisp
27531 @item
27532 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
27534 @item
27535 Groups can now have a score, and bubbling based on entry frequency
27536 is possible (@pxref{Group Score}).
27538 @lisp
27539 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
27540 @end lisp
27542 @item
27543 Groups can be process-marked, and commands can be performed on
27544 groups of groups (@pxref{Marking Groups}).
27546 @item
27547 Caching is possible in virtual groups.
27549 @item
27550 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
27551 news batches, ClariNet briefs collections, and just about everything
27552 else (@pxref{Document Groups}).
27554 @item
27555 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
27556 (@pxref{SOUP}).
27558 @item
27559 The Gnus cache is much faster.
27561 @item
27562 Groups can be sorted according to many criteria (@pxref{Sorting
27563 Groups}).
27565 @item
27566 New group parameters have been introduced to set list-addresses and
27567 expiry times (@pxref{Group Parameters}).
27569 @item
27570 All formatting specs allow specifying faces to be used
27571 (@pxref{Formatting Fonts}).
27573 @item
27574 There are several more commands for setting/removing/acting on process
27575 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
27577 @item
27578 The summary buffer can be limited to show parts of the available
27579 articles based on a wide range of criteria.  These commands have been
27580 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
27582 @item
27583 Articles can be made persistent with the @kbd{*} command
27584 (@pxref{Persistent Articles}).
27586 @item
27587 All functions for hiding article elements are now toggles.
27589 @item
27590 Article headers can be buttonized (@pxref{Article Washing}).
27592 @item
27593 All mail back ends support fetching articles by @code{Message-ID}.
27595 @item
27596 Duplicate mail can now be treated properly (@pxref{Duplicates}).
27598 @item
27599 All summary mode commands are available directly from the article
27600 buffer (@pxref{Article Keymap}).
27602 @item
27603 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
27604 Layout}).
27606 @item
27607 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
27608 @iftex
27609 @iflatex
27610 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
27611 @end iflatex
27612 @end iftex
27614 @item
27615 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
27617 @lisp
27618 (setq gnus-use-nocem t)
27619 @end lisp
27621 @item
27622 Groups can be made permanently visible (@pxref{Listing Groups}).
27624 @lisp
27625 (setq gnus-permanently-visible-groups "^nnml:")
27626 @end lisp
27628 @item
27629 Many new hooks have been introduced to make customizing easier.
27631 @item
27632 Gnus respects the @code{Mail-Copies-To} header.
27634 @item
27635 Threads can be gathered by looking at the @code{References} header
27636 (@pxref{Customizing Threading}).
27638 @lisp
27639 (setq gnus-summary-thread-gathering-function
27640       'gnus-gather-threads-by-references)
27641 @end lisp
27643 @item
27644 Read articles can be stored in a special backlog buffer to avoid
27645 refetching (@pxref{Article Backlog}).
27647 @lisp
27648 (setq gnus-keep-backlog 50)
27649 @end lisp
27651 @item
27652 A clean copy of the current article is always stored in a separate
27653 buffer to allow easier treatment.
27655 @item
27656 Gnus can suggest where to save articles (@pxref{Saving Articles}).
27658 @item
27659 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
27660 Articles}).
27662 @lisp
27663 (setq gnus-prompt-before-saving t)
27664 @end lisp
27666 @item
27667 @code{gnus-uu} can view decoded files asynchronously while fetching
27668 articles (@pxref{Other Decode Variables}).
27670 @lisp
27671 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
27672 @end lisp
27674 @item
27675 Filling in the article buffer now works properly on cited text
27676 (@pxref{Article Washing}).
27678 @item
27679 Hiding cited text adds buttons to toggle hiding, and how much
27680 cited text to hide is now customizable (@pxref{Article Hiding}).
27682 @lisp
27683 (setq gnus-cited-lines-visible 2)
27684 @end lisp
27686 @item
27687 Boring headers can be hidden (@pxref{Article Hiding}).
27689 @item
27690 Default scoring values can now be set from the menu bar.
27692 @item
27693 Further syntax checking of outgoing articles have been added.
27695 @end itemize
27698 @node Red Gnus
27699 @subsubsection Red Gnus
27701 New features in Gnus 5.4/5.5:
27703 @iftex
27704 @iflatex
27705 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
27706 @end iflatex
27707 @end iftex
27709 @itemize @bullet
27711 @item
27712 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
27714 @item
27715 Article prefetching functionality has been moved up into
27716 Gnus (@pxref{Asynchronous Fetching}).
27718 @item
27719 Scoring can now be performed with logical operators like @code{and},
27720 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
27721 Scoring}).
27723 @item
27724 Article washing status can be displayed in the
27725 article mode line (@pxref{Misc Article}).
27727 @item
27728 @file{gnus.el} has been split into many smaller files.
27730 @item
27731 Suppression of duplicate articles based on Message-ID can be done
27732 (@pxref{Duplicate Suppression}).
27734 @lisp
27735 (setq gnus-suppress-duplicates t)
27736 @end lisp
27738 @item
27739 New variables for specifying what score and adapt files are to be
27740 considered home score and adapt files (@pxref{Home Score File}) have
27741 been added.
27743 @item
27744 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
27745 Server Internals}).
27747 @item
27748 Groups can inherit group parameters from parent topics (@pxref{Topic
27749 Parameters}).
27751 @item
27752 Article editing has been revamped and is now actually usable.
27754 @item
27755 Signatures can be recognized in more intelligent fashions
27756 (@pxref{Article Signature}).
27758 @item
27759 Summary pick mode has been made to look more @code{nn}-like.  Line
27760 numbers are displayed and the @kbd{.} command can be used to pick
27761 articles (@code{Pick and Read}).
27763 @item
27764 Commands for moving the @file{.newsrc.eld} from one server to
27765 another have been added (@pxref{Changing Servers}).
27767 @item
27768 There's a way now to specify that ``uninteresting'' fields be suppressed
27769 when generating lines in buffers (@pxref{Advanced Formatting}).
27771 @item
27772 Several commands in the group buffer can be undone with @kbd{C-M-_}
27773 (@pxref{Undo}).
27775 @item
27776 Scoring can be done on words using the new score type @code{w}
27777 (@pxref{Score File Format}).
27779 @item
27780 Adaptive scoring can be done on a Subject word-by-word basis
27781 (@pxref{Adaptive Scoring}).
27783 @lisp
27784 (setq gnus-use-adaptive-scoring '(word))
27785 @end lisp
27787 @item
27788 Scores can be decayed (@pxref{Score Decays}).
27790 @lisp
27791 (setq gnus-decay-scores t)
27792 @end lisp
27794 @item
27795 Scoring can be performed using a regexp on the Date header.  The Date is
27796 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
27798 @item
27799 A new command has been added to remove all data on articles from
27800 the native server (@pxref{Changing Servers}).
27802 @item
27803 A new command for reading collections of documents
27804 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
27805 (@pxref{Really Various Summary Commands}).
27807 @item
27808 Process mark sets can be pushed and popped (@pxref{Setting Process
27809 Marks}).
27811 @item
27812 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
27813 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
27815 @item
27816 A new back end for reading searches from Web search engines
27817 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
27818 (@pxref{Web Searches}).
27820 @item
27821 Groups inside topics can now be sorted using the standard sorting
27822 functions, and each topic can be sorted independently (@pxref{Topic
27823 Sorting}).
27825 @item
27826 Subsets of the groups can be sorted independently (@code{Sorting
27827 Groups}).
27829 @item
27830 Cached articles can be pulled into the groups (@pxref{Summary Generation
27831 Commands}).
27832 @iftex
27833 @iflatex
27834 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
27835 @end iflatex
27836 @end iftex
27838 @item
27839 Score files are now applied in a more reliable order (@pxref{Score
27840 Variables}).
27842 @item
27843 Reports on where mail messages end up can be generated (@pxref{Splitting
27844 Mail}).
27846 @item
27847 More hooks and functions have been added to remove junk from incoming
27848 mail before saving the mail (@pxref{Washing Mail}).
27850 @item
27851 Emphasized text can be properly fontisized:
27853 @end itemize
27856 @node Quassia Gnus
27857 @subsubsection Quassia Gnus
27859 New features in Gnus 5.6:
27861 @itemize @bullet
27863 @item
27864 New functionality for using Gnus as an offline newsreader has been
27865 added.  A plethora of new commands and modes have been added.
27866 @xref{Gnus Unplugged}, for the full story.
27868 @item
27869 The @code{nndraft} back end has returned, but works differently than
27870 before.  All Message buffers are now also articles in the @code{nndraft}
27871 group, which is created automatically.
27873 @item
27874 @code{gnus-alter-header-function} can now be used to alter header
27875 values.
27877 @item
27878 @code{gnus-summary-goto-article} now accept Message-ID's.
27880 @item
27881 A new Message command for deleting text in the body of a message
27882 outside the region: @kbd{C-c C-v}.
27884 @item
27885 You can now post to component group in @code{nnvirtual} groups with
27886 @kbd{C-u C-c C-c}.
27888 @item
27889  @code{nntp-rlogin-program}---new variable to ease customization.
27891 @item
27892 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
27893 re-highlighting of the article buffer.
27895 @item
27896 New element in @code{gnus-boring-article-headers}---@code{long-to}.
27898 @item
27899 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
27900 details.
27902 @item
27903 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
27904 @kbd{a} to add the score rule to the @file{all.SCORE} file.
27906 @item
27907 @code{gnus-simplify-subject-functions} variable to allow greater
27908 control over simplification.
27910 @item
27911 @kbd{A T}---new command for fetching the current thread.
27913 @item
27914 @kbd{/ T}---new command for including the current thread in the
27915 limit.
27917 @item
27918 @kbd{M-RET} is a new Message command for breaking cited text.
27920 @item
27921 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
27923 @item
27924 The @code{custom-face-lookup} function has been removed.
27925 If you used this function in your initialization files, you must
27926 rewrite them to use @code{face-spec-set} instead.
27928 @item
27929 Canceling now uses the current select method.  Symbolic prefix
27930 @kbd{a} forces normal posting method.
27932 @item
27933 New command to translate M******** sm*rtq**t*s into proper
27934 text---@kbd{W d}.
27936 @item
27937 For easier debugging of @code{nntp}, you can set
27938 @code{nntp-record-commands} to a non-@code{nil} value.
27940 @item
27941 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
27942 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
27944 @item
27945 A command for editing group parameters from the summary buffer
27946 has been added.
27948 @item
27949 A history of where mails have been split is available.
27951 @item
27952 A new article date command has been added---@code{article-date-iso8601}.
27954 @item
27955 Subjects can be simplified when threading by setting
27956 @code{gnus-score-thread-simplify}.
27958 @item
27959 A new function for citing in Message has been
27960 added---@code{message-cite-original-without-signature}.
27962 @item
27963 @code{article-strip-all-blank-lines}---new article command.
27965 @item
27966 A new Message command to kill to the end of the article has
27967 been added.
27969 @item
27970 A minimum adaptive score can be specified by using the
27971 @code{gnus-adaptive-word-minimum} variable.
27973 @item
27974 The ``lapsed date'' article header can be kept continually
27975 updated by the @code{gnus-start-date-timer} command.
27977 @item
27978 Web listserv archives can be read with the @code{nnlistserv} back end.
27980 @item
27981 Old dejanews archives can now be read by @code{nnweb}.
27983 @end itemize
27985 @node Pterodactyl Gnus
27986 @subsubsection Pterodactyl Gnus
27988 New features in Gnus 5.8:
27990 @itemize @bullet
27992 @item
27993 The mail-fetching functions have changed.  See the manual for the
27994 many details.  In particular, all procmail fetching variables are gone.
27996 If you used procmail like in
27998 @lisp
27999 (setq nnmail-use-procmail t)
28000 (setq nnmail-spool-file 'procmail)
28001 (setq nnmail-procmail-directory "~/mail/incoming/")
28002 (setq nnmail-procmail-suffix "\\.in")
28003 @end lisp
28005 this now has changed to
28007 @lisp
28008 (setq mail-sources
28009       '((directory :path "~/mail/incoming/"
28010                    :suffix ".in")))
28011 @end lisp
28013 @xref{Mail Source Specifiers}.
28015 @item
28016 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
28017 Gnus, and adds a slew of new commands.  See the manual for details.
28019 @item
28020 Gnus has also been multilingualized.  This also affects too
28021 many parts of Gnus to summarize here, and adds many new variables.
28023 @item
28024 @code{gnus-auto-select-first} can now be a function to be
28025 called to position point.
28027 @item
28028 The user can now decide which extra headers should be included in
28029 summary buffers and @acronym{NOV} files.
28031 @item
28032 @code{gnus-article-display-hook} has been removed.  Instead, a number
28033 of variables starting with @code{gnus-treat-} have been added.
28035 @item
28036 The Gnus posting styles have been redone again and now works in a
28037 subtly different manner.
28039 @item
28040 New web-based back ends have been added: @code{nnslashdot},
28041 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
28042 again, to keep up with ever-changing layouts.
28044 @item
28045 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
28047 @end itemize
28049 @node Oort Gnus
28050 @subsubsection Oort Gnus
28051 @cindex Oort Gnus
28053 New features in Gnus 5.10:
28055 @itemize @bullet
28057 @item Installation changes
28058 @c ***********************
28060 @itemize @bullet
28061 @item
28062 Upgrading from previous (stable) version if you have used Oort.
28064 If you have tried Oort (the unstable Gnus branch leading to this
28065 release) but went back to a stable version, be careful when upgrading to
28066 this version.  In particular, you will probably want to remove all
28067 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
28068 read from your @file{.newsrc.eld} instead of from the
28069 @file{.marks}/@file{.mrk} file where this release store flags.  See a
28070 later entry for more information about marks.  Note that downgrading
28071 isn't save in general.
28073 @item
28074 Lisp files are now installed in @file{.../site-lisp/gnus/} by default.
28075 It defaulted to @file{.../site-lisp/} formerly.  In addition to this,
28076 the new installer issues a warning if other Gnus installations which
28077 will shadow the latest one are detected.  You can then remove those
28078 shadows manually or remove them using @code{make
28079 remove-installed-shadows}.
28081 @item
28082 New @file{make.bat} for compiling and installing Gnus under MS Windows
28084 Use @file{make.bat} if you want to install Gnus under MS Windows, the
28085 first argument to the batch-program should be the directory where
28086 @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want
28087 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
28088 the second parameter.
28090 @file{make.bat} has been rewritten from scratch, it now features
28091 automatic recognition of XEmacs and GNU Emacs, generates
28092 @file{gnus-load.el}, checks if errors occur while compilation and
28093 generation of info files and reports them at the end of the build
28094 process.  It now uses @code{makeinfo} if it is available and falls
28095 back to @file{infohack.el} otherwise.  @file{make.bat} should now
28096 install all files which are necessary to run Gnus and be generally a
28097 complete replacement for the @code{configure; make; make install}
28098 cycle used under Unix systems.
28100 The new @file{make.bat} makes @file{make-x.bat} and @file{xemacs.mak}
28101 superfluous, so they have been removed.
28103 @item
28104 @file{~/News/overview/} not used.
28106 As a result of the following change, the @file{~/News/overview/}
28107 directory is not used any more.  You can safely delete the entire
28108 hierarchy.
28110 @c FIXME: `gnus-load' is mentioned in README, which is not included in
28111 @c CVS.  We should find a better place for this item.
28112 @item
28113 @code{(require 'gnus-load)}
28115 If you use a stand-alone Gnus distribution, you'd better add
28116 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
28117 lisp directory into load-path.
28119 File @file{gnus-load.el} contains autoload commands, functions and variables,
28120 some of which may not be included in distributions of Emacsen.
28122 @end itemize
28124 @item New packages and libraries within Gnus
28125 @c *****************************************
28127 @itemize @bullet
28129 @item
28130 The revised Gnus @acronym{FAQ} is included in the manual,
28131 @xref{Frequently Asked Questions}.
28133 @item
28134 @acronym{TLS} wrapper shipped with Gnus
28136 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
28137 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
28138 @acronym{TLS}/@acronym{SSL} support via (external third party)
28139 @file{ssl.el} and OpenSSL still works.
28141 @item
28142 Improved anti-spam features.
28144 Gnus is now able to take out spam from your mail and news streams
28145 using a wide variety of programs and filter rules.  Among the supported
28146 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
28147 for easy use of external packages such as SpamAssassin and Hashcash
28148 are also new.  @ref{Thwarting Email Spam} and @ref{Spam Package}.
28149 @c FIXME: @xref{Spam Package}?.  Should this be under Misc?
28151 @item
28152 Gnus supports server-side mail filtering using Sieve.
28154 Sieve rules can be added as Group Parameters for groups, and the
28155 complete Sieve script is generated using @kbd{D g} from the Group
28156 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
28157 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
28158 manual @ref{Top, , Top, sieve, Emacs Sieve}.
28160 @end itemize
28162 @item Changes in group mode
28163 @c ************************
28165 @itemize @bullet
28167 @item
28168 @code{gnus-group-read-ephemeral-group} can be called interactively,
28169 using @kbd{G M}.
28171 @item
28172 Retrieval of charters and control messages
28174 There are new commands for fetching newsgroup charters (@kbd{H c}) and
28175 control messages (@kbd{H C}).
28177 @item
28178 The new variable @code{gnus-parameters} can be used to set group parameters.
28180 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
28181 the parameters in @file{~/.newsrc.eld}, but via this variable you can
28182 enjoy the powers of customize, and simplified backups since you set the
28183 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}.  The
28184 variable maps regular expressions matching group names to group
28185 parameters, a'la:
28186 @lisp
28187 (setq gnus-parameters
28188       '(("mail\\..*"
28189          (gnus-show-threads nil)
28190          (gnus-use-scoring nil))
28191         ("^nnimap:\\(foo.bar\\)$"
28192          (to-group . "\\1"))))
28193 @end lisp
28195 @item
28196 Unread count correct in nnimap groups.
28198 The estimated number of unread articles in the group buffer should now
28199 be correct for nnimap groups.  This is achieved by calling
28200 @code{nnimap-fixup-unread-after-getting-new-news} from the
28201 @code{gnus-setup-news-hook} (called on startup) and
28202 @code{gnus-after-getting-new-news-hook}. (called after getting new
28203 mail).  If you have modified those variables from the default, you may
28204 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
28205 you were happy with the estimate and want to save some (minimal) time
28206 when getting new mail, remove the function.
28208 @item
28209 Group names are treated as UTF-8 by default.
28211 This is supposedly what USEFOR wanted to migrate to.  See
28212 @code{gnus-group-name-charset-group-alist} and
28213 @code{gnus-group-name-charset-method-alist} for customization.
28215 @item
28216 @code{gnus-group-charset-alist} and
28217 @code{gnus-group-ignored-charsets-alist}.
28219 The regexps in these variables are compared with full group names
28220 instead of real group names in 5.8.  Users who customize these
28221 variables should change those regexps accordingly.  For example:
28222 @lisp
28223 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
28224 @end lisp
28226 @item
28227 Old intermediate incoming mail files (@file{Incoming*}) are deleted
28228 after a couple of days, not immediately.  @xref{Mail Source
28229 Customization}.  (New in Gnus 5.10.10 / Emacs 22.2)
28231 @end itemize
28233 @item Changes in summary and article mode
28234 @c **************************************
28236 @itemize @bullet
28238 @item
28239 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
28240 (@code{gnus-article-reply-with-original}) only yank the text in the
28241 region if the region is active.
28243 @item
28244 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
28245 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
28247 @item
28248 Article Buttons
28250 More buttons for URLs, mail addresses, Message-IDs, Info links, man
28251 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
28252 variables @code{gnus-button-@var{*}-level} can be used to control the
28253 appearance of all article buttons.  @xref{Article Button Levels}.
28255 @item
28256 Single-part yenc encoded attachments can be decoded.
28258 @item
28259 Picons
28261 The picons code has been reimplemented to work in GNU Emacs---some of
28262 the previous options have been removed or renamed.
28264 Picons are small ``personal icons'' representing users, domain and
28265 newsgroups, which can be displayed in the Article buffer.
28266 @xref{Picons}.
28268 @item
28269 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
28270 boundary line is drawn at the end of the headers.
28272 @item
28273 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
28275 @item
28276 The Summary Buffer uses an arrow in the fringe to indicate the current
28277 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
28279 @item
28280 Warn about email replies to news
28282 Do you often find yourself replying to news by email by mistake?  Then
28283 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
28284 you.
28286 @item
28287 If the new option @code{gnus-summary-display-while-building} is
28288 non-@code{nil}, the summary buffer is shown and updated as it's being
28289 built.
28291 @item
28292 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
28293 opposed to old but unread messages).
28295 @item
28296 Gnus supports RFC 2369 mailing list headers, and adds a number of
28297 related commands in mailing list groups.  @xref{Mailing List}.
28299 @item
28300 The Date header can be displayed in a format that can be read aloud
28301 in English.  @xref{Article Date}.
28303 @item
28304 diffs are automatically highlighted in groups matching
28305 @code{mm-uu-diff-groups-regexp}
28307 @item
28308 Better handling of Microsoft citation styles
28310 Gnus now tries to recognize the mangled header block that some Microsoft
28311 mailers use to indicate that the rest of the message is a citation, even
28312 though it is not quoted in any way.  The variable
28313 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
28314 citations.
28316 The new command @kbd{W Y f}
28317 (@code{gnus-article-outlook-deuglify-article}) allows deuglifying broken
28318 Outlook (Express) articles.
28320 @item
28321 @code{gnus-article-skip-boring}
28323 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
28324 not scroll down to show you a page that contains only boring text,
28325 which by default means cited text and signature.  You can customize
28326 what is skippable using @code{gnus-article-boring-faces}.
28328 This feature is especially useful if you read many articles that
28329 consist of a little new content at the top with a long, untrimmed
28330 message cited below.
28332 @item
28333 Smileys (@samp{:-)}, @samp{;-)} etc) are now displayed graphically in
28334 Emacs too.
28336 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
28337 disable it.
28339 @item
28340 Face headers handling.  @xref{Face}.
28342 @item
28343 In the summary buffer, the new command @kbd{/ N} inserts new messages
28344 and @kbd{/ o} inserts old messages.
28346 @item
28347 Gnus decodes morse encoded messages if you press @kbd{W m}.
28349 @item
28350 @code{gnus-summary-line-format}
28352 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
28353 %s\n}.  Moreover @code{gnus-extra-headers},
28354 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
28355 changed their default so that the users name will be replaced by the
28356 recipient's name or the group name posting to for @acronym{NNTP}
28357 groups.
28359 @item
28360 Deleting of attachments.
28362 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
28363 on @acronym{MIME} buttons) saves a part and replaces the part with an
28364 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
28365 @acronym{MIME} buttons) removes a part.  It works only on back ends
28366 that support editing.
28368 @item
28369 @code{gnus-default-charset}
28371 The default value is determined from the
28372 @code{current-language-environment} variable, instead of
28373 @code{iso-8859-1}.  Also the @samp{.*} item in
28374 @code{gnus-group-charset-alist} is removed.
28376 @item
28377 Printing capabilities are enhanced.
28379 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
28380 Article buffers.  Also, each individual @acronym{MIME} part can be
28381 printed using @kbd{p} on the @acronym{MIME} button.
28383 @item
28384 Extended format specs.
28386 Format spec @samp{%&user-date;} is added into
28387 @code{gnus-summary-line-format-alist}.  Also, user defined extended
28388 format specs are supported.  The extended format specs look like
28389 @samp{%u&foo;}, which invokes function
28390 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
28391 escape character, old user defined format @samp{%u&} is no longer supported.
28393 @item
28394 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
28395 @c FIXME: Was this a user-visible change?
28397 It was aliased to @kbd{Y c}
28398 (@code{gnus-summary-insert-cached-articles}).  The new function filters
28399 out other articles.
28401 @item
28402 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
28404 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
28405 s}, @kbd{/ a}, and @kbd{/ x}
28406 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
28407 result will be to display all articles that do not match the expression.
28409 @item
28410 Gnus inlines external parts (message/external).
28412 @end itemize
28414 @item Changes in Message mode and related Gnus features
28415 @c ****************************************************
28417 @itemize @bullet
28419 @item
28420 Delayed articles
28422 You can delay the sending of a message with @kbd{C-c C-j} in the Message
28423 buffer.  The messages are delivered at specified time.  This is useful
28424 for sending yourself reminders.  @xref{Delayed Articles}.
28426 @item
28427 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
28428 the nnml back end allows compressed message files.
28430 @item
28431 The new option @code{gnus-gcc-mark-as-read} automatically marks
28432 Gcc articles as read.
28434 @item
28435 Externalizing of attachments
28437 If @code{gnus-gcc-externalize-attachments} or
28438 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
28439 local files as external parts.
28441 @item
28442 The envelope sender address can be customized when using Sendmail.
28443 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
28445 @item
28446 Gnus no longer generate the Sender: header automatically.
28448 Earlier it was generated when the user configurable email address was
28449 different from the Gnus guessed default user address.  As the guessing
28450 algorithm is rarely correct these days, and (more controversially) the
28451 only use of the Sender: header was to check if you are entitled to
28452 cancel/supersede news (which is now solved by Cancel Locks instead,
28453 see another entry), generation of the header has been disabled by
28454 default.  See the variables @code{message-required-headers},
28455 @code{message-required-news-headers}, and
28456 @code{message-required-mail-headers}.
28458 @item
28459 Features from third party @file{message-utils.el} added to @file{message.el}.
28461 Message now asks if you wish to remove @samp{(was: <old subject>)} from
28462 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
28463 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
28464 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
28465 appropriate headers and a note in the body for cross-postings and
28466 followups (see the variables @code{message-cross-post-@var{*}}).
28468 @item
28469 References and X-Draft-From headers are no longer generated when you
28470 start composing messages and @code{message-generate-headers-first} is
28471 @code{nil}.
28473 @item
28474 Easy inclusion of X-Faces headers.  @xref{X-Face}.
28476 @item
28477 Group Carbon Copy (GCC) quoting
28479 To support groups that contains SPC and other weird characters, groups
28480 are quoted before they are placed in the Gcc: header.  This means
28481 variables such as @code{gnus-message-archive-group} should no longer
28482 contain quote characters to make groups containing SPC work.  Also, if
28483 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
28484 into two groups) you must change it to return the list
28485 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
28486 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
28487 was incorrect earlier, it just didn't generate any problems since it
28488 was inserted directly.
28490 @item
28491 @code{message-insinuate-rmail}
28493 Adding @code{(message-insinuate-rmail)} and @code{(setq
28494 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
28495 compose, reply and forward messages in message-mode, where you can
28496 enjoy the power of @acronym{MML}.
28498 @item
28499 @code{message-minibuffer-local-map}
28501 The line below enables BBDB in resending a message:
28502 @lisp
28503 (define-key message-minibuffer-local-map [(tab)]
28504   'bbdb-complete-name)
28505 @end lisp
28507 @item
28508 @code{gnus-posting-styles}
28510 Add a new format of match like
28511 @lisp
28512 ((header "to" "larsi.*org")
28513  (Organization "Somewhere, Inc."))
28514 @end lisp
28515 The old format like the lines below is obsolete, but still accepted.
28516 @lisp
28517 (header "to" "larsi.*org"
28518         (Organization "Somewhere, Inc."))
28519 @end lisp
28521 @item
28522 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
28524 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
28525 added into these two variables.  If you customized those, perhaps you
28526 need add those two headers too.
28528 @item
28529 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
28530 composing messages, it is enabled by @code{use-hard-newlines}.
28531 Decoding format=flowed was present but not documented in earlier
28532 versions.
28534 @item
28535 The option @code{mm-fill-flowed} can be used to disable treatment of
28536 ``format=flowed'' messages.  Also, flowed text is disabled when sending
28537 inline PGP signed messages.  @xref{Flowed text, , Flowed text,
28538 emacs-mime, The Emacs MIME Manual}.  (New in Gnus 5.10.7)
28539 @c This entry is also present in the node "No Gnus".
28541 @item
28542 Gnus supports the generation of RFC 2298 Disposition Notification requests.
28544 This is invoked with the @kbd{C-c M-n} key binding from message mode.
28546 @item
28547 Message supports the Importance: (RFC 2156) header.
28549 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
28550 the valid values.
28552 @item
28553 Gnus supports Cancel Locks in News.
28555 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
28556 used to determine if you wrote an article or not (for canceling and
28557 superseding).  Gnus generates a random password string the first time
28558 you post a message, and saves it in your @file{~/.emacs} using the Custom
28559 system.  While the variable is called @code{canlock-password}, it is not
28560 security sensitive data.  Publishing your canlock string on the web
28561 will not allow anyone to be able to anything she could not already do.
28562 The behavior can be changed by customizing @code{message-insert-canlock}.
28564 @item
28565 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
28566 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
28568 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
28569 additional Lisp libraries.  This add several menu items to the
28570 Attachments menu, and @kbd{C-c RET} key bindings, when composing
28571 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
28573 @item
28574 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
28575 C-m}.
28577 This change was made to avoid conflict with the standard binding of
28578 @code{back-to-indentation}, which is also useful in message mode.
28580 @item
28581 The default for @code{message-forward-show-mml} changed to the symbol
28582 @code{best}.
28584 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
28585 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
28586 used when forwarding signed or encrypted messages, as the conversion
28587 invalidate the digital signature.
28589 @item
28590 If @code{auto-compression-mode} is enabled, attachments are automatically
28591 decompressed when activated.
28592 @c FIXME: Does this affect article or message mode?
28594 @item
28595 Support for non-@acronym{ASCII} domain names
28597 Message supports non-@acronym{ASCII} domain names in From:, To: and
28598 Cc: and will query you whether to perform encoding when you try to
28599 send a message.  The variable @code{message-use-idna} controls this.
28600 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
28601 and Cc: when you view a message.  The variable @code{gnus-use-idna}
28602 controls this.
28604 @item You can now drag and drop attachments to the Message buffer.
28605 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
28606 @xref{MIME, ,MIME, message, Message Manual}.
28607 @c New in 5.10.9 / 5.11 (Emacs 21.1)
28609 @item @code{auto-fill-mode} is enabled by default in Message mode.
28610 See @code{message-fill-column}.  @xref{Various Message Variables, ,
28611 Message Headers, message, Message Manual}.
28612 @c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
28614 @end itemize
28616 @item Changes in back ends
28617 @c ***********************
28619 @itemize @bullet
28620 @item
28621 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
28623 @item
28624 The nndoc back end now supports mailman digests and exim bounces.
28626 @item
28627 Gnus supports Maildir groups.
28629 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
28631 @item
28632 The nnml and nnfolder back ends store marks for each groups.
28634 This makes it possible to take backup of nnml/nnfolder servers/groups
28635 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
28636 makes it possible to share articles and marks between users (without
28637 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
28638 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
28639 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
28640 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
28641 another machine, Gnus will automatically use the @file{.marks} or
28642 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
28643 The new server variables @code{nnml-marks-is-evil} and
28644 @code{nnfolder-marks-is-evil} can be used to disable this feature.
28646 @end itemize
28648 @item Appearance
28649 @c *************
28651 @itemize @bullet
28653 @item
28654 The menu bar item (in Group and Summary buffer) named ``Misc'' has
28655 been renamed to ``Gnus''.
28657 @item
28658 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
28659 renamed to ``Attachments''.  Note that this menu also contains security
28660 related stuff, like signing and encryption (@pxref{Security, Security,,
28661 message, Message Manual}).
28663 @item
28664 The tool bars have been updated to use GNOME icons in Group, Summary and
28665 Message mode.  You can also customize the tool bars: @kbd{M-x
28666 customize-apropos RET -tool-bar$} should get you started.  This is a new
28667 feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
28669 @item The tool bar icons are now (de)activated correctly
28670 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
28671 Its default value depends on your Emacs version.  This is a new feature
28672 in Gnus 5.10.9.
28673 @end itemize
28676 @item Miscellaneous changes
28677 @c ************************
28679 @itemize @bullet
28681 @item
28682 @code{gnus-agent}
28684 The Gnus Agent has seen a major updated and is now enabled by default,
28685 and all nntp and nnimap servers from @code{gnus-select-method} and
28686 @code{gnus-secondary-select-method} are agentized by default.  Earlier
28687 only the server in @code{gnus-select-method} was agentized by the
28688 default, and the agent was disabled by default.  When the agent is
28689 enabled, headers are now also retrieved from the Agent cache instead
28690 of the back ends when possible.  Earlier this only happened in the
28691 unplugged state.  You can enroll or remove servers with @kbd{J a} and
28692 @kbd{J r} in the server buffer.  Gnus will not download articles into
28693 the Agent cache, unless you instruct it to do so, though, by using
28694 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
28695 behavior of having the Agent disabled with @code{(setq gnus-agent
28696 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
28697 is not needed any more.
28699 @item
28700 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
28702 If one reads an article while plugged, and the article already exists
28703 in the Agent, it won't get downloaded once more.  @code{(setq
28704 gnus-agent-cache nil)} reverts to the old behavior.
28706 @item
28707 Dired integration
28709 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
28710 bindings in dired buffers to send a file as an attachment, open a file
28711 using the appropriate mailcap entry, and print a file using the mailcap
28712 entry.
28714 @item
28715 The format spec @code{%C} for positioning point has changed to @code{%*}.
28717 @item
28718 @code{gnus-slave-unplugged}
28720 A new command which starts Gnus offline in slave mode.
28722 @end itemize
28724 @end itemize
28726 @node No Gnus
28727 @subsubsection No Gnus
28728 @cindex No Gnus
28730 New features in No Gnus:
28731 @c FIXME: Gnus 5.12?
28733 @include gnus-news.texi
28735 @iftex
28737 @page
28738 @node The Manual
28739 @section The Manual
28740 @cindex colophon
28741 @cindex manual
28743 This manual was generated from a TeXinfo file and then run through
28744 either @code{texi2dvi}
28745 @iflatex
28746 or my own home-brewed TeXinfo to \LaTeX\ transformer,
28747 and then run through @code{latex} and @code{dvips}
28748 @end iflatex
28749 to get what you hold in your hands now.
28751 The following conventions have been used:
28753 @enumerate
28755 @item
28756 This is a @samp{string}
28758 @item
28759 This is a @kbd{keystroke}
28761 @item
28762 This is a @file{file}
28764 @item
28765 This is a @code{symbol}
28767 @end enumerate
28769 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
28770 mean:
28772 @lisp
28773 (setq flargnoze "yes")
28774 @end lisp
28776 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
28778 @lisp
28779 (setq flumphel 'yes)
28780 @end lisp
28782 @samp{yes} and @code{yes} are two @emph{very} different things---don't
28783 ever get them confused.
28785 @iflatex
28786 @c @head
28787 Of course, everything in this manual is of vital interest, so you should
28788 read it all.  Several times.  However, if you feel like skimming the
28789 manual, look for that gnu head you should see in the margin over
28790 there---it means that what's being discussed is of more importance than
28791 the rest of the stuff.  (On the other hand, if everything is infinitely
28792 important, how can anything be more important than that?  Just one more
28793 of the mysteries of this world, I guess.)
28794 @end iflatex
28796 @end iftex
28799 @node On Writing Manuals
28800 @section On Writing Manuals
28802 I guess most manuals are written after-the-fact; documenting a program
28803 that's already there.  This is not how this manual is written.  When
28804 implementing something, I write the manual entry for that something
28805 straight away.  I then see that it's difficult to explain the
28806 functionality, so I write how it's supposed to be, and then I change the
28807 implementation.  Writing the documentation and writing the code go hand
28808 in hand.
28810 This, of course, means that this manual has no, or little, flow.  It
28811 documents absolutely everything in Gnus, but often not where you're
28812 looking for it.  It is a reference manual, and not a guide to how to get
28813 started with Gnus.
28815 That would be a totally different book, that should be written using the
28816 reference manual as source material.  It would look quite different.
28819 @page
28820 @node Terminology
28821 @section Terminology
28823 @cindex terminology
28824 @table @dfn
28826 @item news
28827 @cindex news
28828 This is what you are supposed to use this thing for---reading news.
28829 News is generally fetched from a nearby @acronym{NNTP} server, and is
28830 generally publicly available to everybody.  If you post news, the entire
28831 world is likely to read just what you have written, and they'll all
28832 snigger mischievously.  Behind your back.
28834 @item mail
28835 @cindex mail
28836 Everything that's delivered to you personally is mail.  Some news/mail
28837 readers (like Gnus) blur the distinction between mail and news, but
28838 there is a difference.  Mail is private.  News is public.  Mailing is
28839 not posting, and replying is not following up.
28841 @item reply
28842 @cindex reply
28843 Send a mail to the person who has written what you are reading.
28845 @item follow up
28846 @cindex follow up
28847 Post an article to the current newsgroup responding to the article you
28848 are reading.
28850 @item back end
28851 @cindex back end
28852 Gnus considers mail and news to be mostly the same, really.  The only
28853 difference is how to access the actual articles.  News articles are
28854 commonly fetched via the protocol @acronym{NNTP}, whereas mail
28855 messages could be read from a file on the local disk.  The internal
28856 architecture of Gnus thus comprises a ``front end'' and a number of
28857 ``back ends''.  Internally, when you enter a group (by hitting
28858 @key{RET}, say), you thereby invoke a function in the front end in
28859 Gnus.  The front end then ``talks'' to a back end and says things like
28860 ``Give me the list of articles in the foo group'' or ``Show me article
28861 number 4711''.
28863 So a back end mainly defines either a protocol (the @code{nntp} back
28864 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
28865 accesses mail via @acronym{IMAP}) or a file format and directory
28866 layout (the @code{nnspool} back end accesses news via the common
28867 ``spool directory'' format, the @code{nnml} back end access mail via a
28868 file format and directory layout that's quite similar).
28870 Gnus does not handle the underlying media, so to speak---this is all
28871 done by the back ends.  A back end is a collection of functions to
28872 access the articles.
28874 However, sometimes the term ``back end'' is also used where ``server''
28875 would have been more appropriate.  And then there is the term ``select
28876 method'' which can mean either.  The Gnus terminology can be quite
28877 confusing.
28879 @item native
28880 @cindex native
28881 Gnus will always use one method (and back end) as the @dfn{native}, or
28882 default, way of getting news.
28884 @item foreign
28885 @cindex foreign
28886 You can also have any number of foreign groups active at the same time.
28887 These are groups that use non-native non-secondary back ends for getting
28888 news.
28890 @item secondary
28891 @cindex secondary
28892 Secondary back ends are somewhere half-way between being native and being
28893 foreign, but they mostly act like they are native.
28895 @item article
28896 @cindex article
28897 A message that has been posted as news.
28899 @item mail message
28900 @cindex mail message
28901 A message that has been mailed.
28903 @item message
28904 @cindex message
28905 A mail message or news article
28907 @item head
28908 @cindex head
28909 The top part of a message, where administrative information (etc.) is
28910 put.
28912 @item body
28913 @cindex body
28914 The rest of an article.  Everything not in the head is in the
28915 body.
28917 @item header
28918 @cindex header
28919 A line from the head of an article.
28921 @item headers
28922 @cindex headers
28923 A collection of such lines, or a collection of heads.  Or even a
28924 collection of @acronym{NOV} lines.
28926 @item @acronym{NOV}
28927 @cindex @acronym{NOV}
28928 @acronym{NOV} stands for News OverView, which is a type of news server
28929 header which provide datas containing the condensed header information
28930 of articles.  They are produced by the server itself; in the @code{nntp}
28931 back end Gnus uses the ones that the @acronym{NNTP} server makes, but
28932 Gnus makes them by itself for some backends (in particular, @code{nnml}).
28934 When Gnus enters a group, it asks the back end for the headers of all
28935 unread articles in the group.  Most servers support the News OverView
28936 format, which is more compact and much faster to read and parse than the
28937 normal @sc{head} format.
28939 The @acronym{NOV} data consist of one or more text lines (@pxref{Text
28940 Lines, ,Motion by Text Lines, elisp, The Emacs Lisp Reference Manual})
28941 where each line has the header information of one article.  The header
28942 information is a tab-separated series of the header's contents including
28943 an article number, a subject, an author, a date, a message-id,
28944 references, etc.
28946 Those data enable Gnus to generate summary lines quickly.  However, if
28947 the server does not support @acronym{NOV} or you disable it purposely or
28948 for some reason, Gnus will try to generate the header information by
28949 parsing each article's headers one by one.  It will take time.
28950 Therefore, it is not usually a good idea to set nn*-nov-is-evil
28951 (@pxref{Slow/Expensive Connection}) to a non-@code{nil} value unless you
28952 know that the server makes wrong @acronym{NOV} data.
28954 @item level
28955 @cindex levels
28956 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
28957 that have a lower level are ``more'' subscribed than the groups with a
28958 higher level.  In fact, groups on levels 1-5 are considered
28959 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
28960 are @dfn{killed}.  Commands for listing groups and scanning for new
28961 articles will all use the numeric prefix as @dfn{working level}.
28963 @item killed groups
28964 @cindex killed groups
28965 No information on killed groups is stored or updated, which makes killed
28966 groups much easier to handle than subscribed groups.
28968 @item zombie groups
28969 @cindex zombie groups
28970 Just like killed groups, only slightly less dead.
28972 @item active file
28973 @cindex active file
28974 The news server has to keep track of what articles it carries, and what
28975 groups exist.  All this information in stored in the active file, which
28976 is rather large, as you might surmise.
28978 @item bogus groups
28979 @cindex bogus groups
28980 A group that exists in the @file{.newsrc} file, but isn't known to the
28981 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
28982 This means that the group probably doesn't exist (any more).
28984 @item activating
28985 @cindex activating groups
28986 The act of asking the server for info on a group and computing the
28987 number of unread articles is called @dfn{activating the group}.
28988 Un-activated groups are listed with @samp{*} in the group buffer.
28990 @item spool
28991 @cindex spool
28992 News servers store their articles locally in one fashion or other.
28993 One old-fashioned storage method is to have just one file per
28994 article.  That's called a ``traditional spool''.
28996 @item server
28997 @cindex server
28998 A machine one can connect to and get news (or mail) from.
29000 @item select method
29001 @cindex select method
29002 A structure that specifies the back end, the server and the virtual
29003 server settings.
29005 @item virtual server
29006 @cindex virtual server
29007 A named select method.  Since a select method defines all there is to
29008 know about connecting to a (physical) server, taking the thing as a
29009 whole is a virtual server.
29011 @item washing
29012 @cindex washing
29013 Taking a buffer and running it through a filter of some sort.  The
29014 result will (more often than not) be cleaner and more pleasing than the
29015 original.
29017 @item ephemeral groups
29018 @cindex ephemeral groups
29019 @cindex temporary groups
29020 Most groups store data on what articles you have read.  @dfn{Ephemeral}
29021 groups are groups that will have no data stored---when you exit the
29022 group, it'll disappear into the aether.
29024 @item solid groups
29025 @cindex solid groups
29026 This is the opposite of ephemeral groups.  All groups listed in the
29027 group buffer are solid groups.
29029 @item sparse articles
29030 @cindex sparse articles
29031 These are article placeholders shown in the summary buffer when
29032 @code{gnus-build-sparse-threads} has been switched on.
29034 @item threading
29035 @cindex threading
29036 To put responses to articles directly after the articles they respond
29037 to---in a hierarchical fashion.
29039 @item root
29040 @cindex root
29041 @cindex thread root
29042 The first article in a thread is the root.  It is the ancestor of all
29043 articles in the thread.
29045 @item parent
29046 @cindex parent
29047 An article that has responses.
29049 @item child
29050 @cindex child
29051 An article that responds to a different article---its parent.
29053 @item digest
29054 @cindex digest
29055 A collection of messages in one file.  The most common digest format is
29056 specified by RFC 1153.
29058 @item splitting
29059 @cindex splitting, terminology
29060 @cindex mail sorting
29061 @cindex mail filtering (splitting)
29062 The action of sorting your emails according to certain rules. Sometimes
29063 incorrectly called mail filtering.
29065 @end table
29068 @page
29069 @node Customization
29070 @section Customization
29071 @cindex general customization
29073 All variables are properly documented elsewhere in this manual.  This
29074 section is designed to give general pointers on how to customize Gnus
29075 for some quite common situations.
29077 @menu
29078 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
29079 * Slow Terminal Connection::    You run a remote Emacs.
29080 * Little Disk Space::           You feel that having large setup files is icky.
29081 * Slow Machine::                You feel like buying a faster machine.
29082 @end menu
29085 @node Slow/Expensive Connection
29086 @subsection Slow/Expensive Connection
29088 If you run Emacs on a machine locally, and get your news from a machine
29089 over some very thin strings, you want to cut down on the amount of data
29090 Gnus has to get from the server.
29092 @table @code
29094 @item gnus-read-active-file
29095 Set this to @code{nil}, which will inhibit Gnus from requesting the
29096 entire active file from the server.  This file is often very large.  You
29097 also have to set @code{gnus-check-new-newsgroups} and
29098 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
29099 doesn't suddenly decide to fetch the active file anyway.
29101 @item gnus-nov-is-evil
29102 @vindex gnus-nov-is-evil
29103 Usually this one must @emph{always} be @code{nil} (which is the
29104 default).  If, for example, you wish to not use @acronym{NOV}
29105 (@pxref{Terminology}) with the @code{nntp} back end (@pxref{Crosspost
29106 Handling}), set @code{nntp-nov-is-evil} to a non-@code{nil} value
29107 instead of setting this.  But you normally do not need to set
29108 @code{nntp-nov-is-evil} since Gnus by itself will detect whether the
29109 @acronym{NNTP} server supports @acronym{NOV}.  Anyway, grabbing article
29110 headers from the @acronym{NNTP} server will not be very fast if you tell
29111 Gnus not to use @acronym{NOV}.
29113 As the variables for the other back ends, there are
29114 @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil},
29115 @code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil},
29116 @code{nnml-nov-is-evil}, @code{nnspool-nov-is-evil}, and
29117 @code{nnwarchive-nov-is-evil}.  Note that a non-@code{nil} value for
29118 @code{gnus-nov-is-evil} overrides all those variables.@footnote{Although
29119 the back ends @code{nnkiboze}, @code{nnslashdot}, @code{nnultimate}, and
29120 @code{nnwfm} don't have their own nn*-nov-is-evil.}
29121 @end table
29124 @node Slow Terminal Connection
29125 @subsection Slow Terminal Connection
29127 Let's say you use your home computer for dialing up the system that runs
29128 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
29129 possible) the amount of data sent over the wires.
29131 @table @code
29133 @item gnus-auto-center-summary
29134 Set this to @code{nil} to inhibit Gnus from re-centering the summary
29135 buffer all the time.  If it is @code{vertical}, do only vertical
29136 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
29137 horizontal and vertical recentering.
29139 @item gnus-visible-headers
29140 Cut down on the headers included in the articles to the
29141 minimum.  You can, in fact, make do without them altogether---most of the
29142 useful data is in the summary buffer, anyway.  Set this variable to
29143 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
29145 Use the following to enable all the available hiding features:
29146 @lisp
29147 (setq gnus-treat-hide-headers 'head
29148       gnus-treat-hide-signature t
29149       gnus-treat-hide-citation t)
29150 @end lisp
29152 @item gnus-use-full-window
29153 By setting this to @code{nil}, you can make all the windows smaller.
29154 While this doesn't really cut down much generally, it means that you
29155 have to see smaller portions of articles before deciding that you didn't
29156 want to read them anyway.
29158 @item gnus-thread-hide-subtree
29159 If this is non-@code{nil}, all threads in the summary buffer will be
29160 hidden initially.
29163 @item gnus-updated-mode-lines
29164 If this is @code{nil}, Gnus will not put information in the buffer mode
29165 lines, which might save some time.
29166 @end table
29169 @node Little Disk Space
29170 @subsection Little Disk Space
29171 @cindex disk space
29173 The startup files can get rather large, so you may want to cut their
29174 sizes a bit if you are running out of space.
29176 @table @code
29178 @item gnus-save-newsrc-file
29179 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
29180 only save @file{.newsrc.eld}.  This means that you will not be able to
29181 use any other newsreaders than Gnus.  This variable is @code{t} by
29182 default.
29184 @item gnus-read-newsrc-file
29185 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
29186 only read @file{.newsrc.eld}.  This means that you will not be able to
29187 use any other newsreaders than Gnus.  This variable is @code{t} by
29188 default.
29190 @item gnus-save-killed-list
29191 If this is @code{nil}, Gnus will not save the list of dead groups.  You
29192 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
29193 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
29194 variable to @code{nil}.  This variable is @code{t} by default.
29196 @end table
29199 @node Slow Machine
29200 @subsection Slow Machine
29201 @cindex slow machine
29203 If you have a slow machine, or are just really impatient, there are a
29204 few things you can do to make Gnus run faster.
29206 Set @code{gnus-check-new-newsgroups} and
29207 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
29209 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
29210 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
29211 summary buffer faster.  Also @pxref{Slow/Expensive Connection}.
29214 @page
29215 @node Troubleshooting
29216 @section Troubleshooting
29217 @cindex troubleshooting
29219 Gnus works @emph{so} well straight out of the box---I can't imagine any
29220 problems, really.
29222 Ahem.
29224 @enumerate
29226 @item
29227 Make sure your computer is switched on.
29229 @item
29230 Make sure that you really load the current Gnus version.  If you have
29231 been running @sc{gnus}, you need to exit Emacs and start it up again before
29232 Gnus will work.
29234 @item
29235 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
29236 like @c
29237 @samp{Gnus v5.13} @c Adjust ../Makefile.in if you change this line!
29239 you have the right files loaded.  Otherwise you have some old @file{.el}
29240 files lying around.  Delete these.
29242 @item
29243 Read the help group (@kbd{G h} in the group buffer) for a
29244 @acronym{FAQ} and a how-to.
29246 @item
29247 @vindex max-lisp-eval-depth
29248 Gnus works on many recursive structures, and in some extreme (and very
29249 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
29250 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
29251 something like that.
29252 @end enumerate
29254 If all else fails, report the problem as a bug.
29256 @cindex bugs
29257 @cindex reporting bugs
29259 @kindex M-x gnus-bug
29260 @findex gnus-bug
29261 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
29262 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
29263 me the backtrace.  I will fix bugs, but I can only fix them if you send
29264 me a precise description as to how to reproduce the bug.
29266 You really can never be too detailed in a bug report.  Always use the
29267 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
29268 a 10Kb mail each time you use it, and even if you have sent me your
29269 environment 500 times before.  I don't care.  I want the full info each
29270 time.
29272 It is also important to remember that I have no memory whatsoever.  If
29273 you send a bug report, and I send you a reply, and then you just send
29274 back ``No, it's not! Moron!'', I will have no idea what you are
29275 insulting me about.  Always over-explain everything.  It's much easier
29276 for all of us---if I don't have all the information I need, I will just
29277 mail you and ask for more info, and everything takes more time.
29279 If the problem you're seeing is very visual, and you can't quite explain
29280 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
29281 it somewhere it can be reached, and include the URL of the picture in
29282 the bug report.
29284 @cindex patches
29285 If you would like to contribute a patch to fix bugs or make
29286 improvements, please produce the patch using @samp{diff -u}.
29288 @cindex edebug
29289 If you want to debug your problem further before reporting, possibly
29290 in order to solve the problem yourself and send a patch, you can use
29291 edebug.  Debugging Lisp code is documented in the Elisp manual
29292 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
29293 Lisp Reference Manual}).  To get you started with edebug, consider if
29294 you discover some weird behavior when pressing @kbd{c}, the first
29295 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
29296 the documentation buffer that leads you to the function definition,
29297 then press @kbd{M-x edebug-defun RET} with point inside that function,
29298 return to Gnus and press @kbd{c} to invoke the code.  You will be
29299 placed in the lisp buffer and can single step using @kbd{SPC} and
29300 evaluate expressions using @kbd{M-:} or inspect variables using
29301 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
29302 @kbd{c} or @kbd{g}.
29304 @cindex elp
29305 @cindex profile
29306 @cindex slow
29307 Sometimes, a problem do not directly generate an elisp error but
29308 manifests itself by causing Gnus to be very slow.  In these cases, you
29309 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
29310 slow, and then try to analyze the backtrace (repeating the procedure
29311 helps isolating the real problem areas).
29313 A fancier approach is to use the elisp profiler, ELP.  The profiler is
29314 (or should be) fully documented elsewhere, but to get you started
29315 there are a few steps that need to be followed.  First, instrument the
29316 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
29317 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
29318 RET message}.  Then perform the operation that is slow and press
29319 @kbd{M-x elp-results}.  You will then see which operations that takes
29320 time, and can debug them further.  If the entire operation takes much
29321 longer than the time spent in the slowest function in the profiler
29322 output, you probably profiled the wrong part of Gnus.  To reset
29323 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
29324 elp-restore-all} is supposed to remove profiling, but given the
29325 complexities and dynamic code generation in Gnus, it might not always
29326 work perfectly.
29328 @cindex gnu.emacs.gnus
29329 @cindex ding mailing list
29330 If you just need help, you are better off asking on
29331 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
29332 @email{ding@@gnus.org, the ding mailing list}.  Write to
29333 @email{ding-request@@gnus.org} to subscribe.
29336 @page
29337 @node Gnus Reference Guide
29338 @section Gnus Reference Guide
29340 It is my hope that other people will figure out smart stuff that Gnus
29341 can do, and that other people will write those smart things as well.  To
29342 facilitate that I thought it would be a good idea to describe the inner
29343 workings of Gnus.  And some of the not-so-inner workings, while I'm at
29346 You can never expect the internals of a program not to change, but I
29347 will be defining (in some details) the interface between Gnus and its
29348 back ends (this is written in stone), the format of the score files
29349 (ditto), data structures (some are less likely to change than others)
29350 and general methods of operation.
29352 @menu
29353 * Gnus Utility Functions::      Common functions and variable to use.
29354 * Back End Interface::          How Gnus communicates with the servers.
29355 * Score File Syntax::           A BNF definition of the score file standard.
29356 * Headers::                     How Gnus stores headers internally.
29357 * Ranges::                      A handy format for storing mucho numbers.
29358 * Group Info::                  The group info format.
29359 * Extended Interactive::        Symbolic prefixes and stuff.
29360 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
29361 * Various File Formats::        Formats of files that Gnus use.
29362 @end menu
29365 @node Gnus Utility Functions
29366 @subsection Gnus Utility Functions
29367 @cindex Gnus utility functions
29368 @cindex utility functions
29369 @cindex functions
29370 @cindex internal variables
29372 When writing small functions to be run from hooks (and stuff), it's
29373 vital to have access to the Gnus internal functions and variables.
29374 Below is a list of the most common ones.
29376 @table @code
29378 @item gnus-newsgroup-name
29379 @vindex gnus-newsgroup-name
29380 This variable holds the name of the current newsgroup.
29382 @item gnus-find-method-for-group
29383 @findex gnus-find-method-for-group
29384 A function that returns the select method for @var{group}.
29386 @item gnus-group-real-name
29387 @findex gnus-group-real-name
29388 Takes a full (prefixed) Gnus group name, and returns the unprefixed
29389 name.
29391 @item gnus-group-prefixed-name
29392 @findex gnus-group-prefixed-name
29393 Takes an unprefixed group name and a select method, and returns the full
29394 (prefixed) Gnus group name.
29396 @item gnus-get-info
29397 @findex gnus-get-info
29398 Returns the group info list for @var{group}.
29400 @item gnus-group-unread
29401 @findex gnus-group-unread
29402 The number of unread articles in @var{group}, or @code{t} if that is
29403 unknown.
29405 @item gnus-active
29406 @findex gnus-active
29407 The active entry for @var{group}.
29409 @item gnus-set-active
29410 @findex gnus-set-active
29411 Set the active entry for @var{group}.
29413 @item gnus-add-current-to-buffer-list
29414 @findex gnus-add-current-to-buffer-list
29415 Adds the current buffer to the list of buffers to be killed on Gnus
29416 exit.
29418 @item gnus-continuum-version
29419 @findex gnus-continuum-version
29420 Takes a Gnus version string as a parameter and returns a floating point
29421 number.  Earlier versions will always get a lower number than later
29422 versions.
29424 @item gnus-group-read-only-p
29425 @findex gnus-group-read-only-p
29426 Says whether @var{group} is read-only or not.
29428 @item gnus-news-group-p
29429 @findex gnus-news-group-p
29430 Says whether @var{group} came from a news back end.
29432 @item gnus-ephemeral-group-p
29433 @findex gnus-ephemeral-group-p
29434 Says whether @var{group} is ephemeral or not.
29436 @item gnus-server-to-method
29437 @findex gnus-server-to-method
29438 Returns the select method corresponding to @var{server}.
29440 @item gnus-server-equal
29441 @findex gnus-server-equal
29442 Says whether two virtual servers are equal.
29444 @item gnus-group-native-p
29445 @findex gnus-group-native-p
29446 Says whether @var{group} is native or not.
29448 @item gnus-group-secondary-p
29449 @findex gnus-group-secondary-p
29450 Says whether @var{group} is secondary or not.
29452 @item gnus-group-foreign-p
29453 @findex gnus-group-foreign-p
29454 Says whether @var{group} is foreign or not.
29456 @item gnus-group-find-parameter
29457 @findex gnus-group-find-parameter
29458 Returns the parameter list of @var{group}.  If given a second parameter,
29459 returns the value of that parameter for @var{group}.
29461 @item gnus-group-set-parameter
29462 @findex gnus-group-set-parameter
29463 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
29465 @item gnus-narrow-to-body
29466 @findex gnus-narrow-to-body
29467 Narrows the current buffer to the body of the article.
29469 @item gnus-check-backend-function
29470 @findex gnus-check-backend-function
29471 Takes two parameters, @var{function} and @var{group}.  If the back end
29472 @var{group} comes from supports @var{function}, return non-@code{nil}.
29474 @lisp
29475 (gnus-check-backend-function "request-scan" "nnml:misc")
29476 @result{} t
29477 @end lisp
29479 @item gnus-read-method
29480 @findex gnus-read-method
29481 Prompts the user for a select method.
29483 @end table
29486 @node Back End Interface
29487 @subsection Back End Interface
29489 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
29490 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
29491 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
29492 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
29493 examples of the latter we have @code{nntp-port-number} and
29494 @code{nnmbox-directory}.
29496 When Gnus asks for information from a back end---say @code{nntp}---on
29497 something, it will normally include a virtual server name in the
29498 function parameters.  (If not, the back end should use the ``current''
29499 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
29500 server as its only (optional) parameter.  If this virtual server hasn't
29501 been opened, the function should fail.
29503 Note that a virtual server name has no relation to some physical server
29504 name.  Take this example:
29506 @lisp
29507 (nntp "odd-one"
29508       (nntp-address "ifi.uio.no")
29509       (nntp-port-number 4324))
29510 @end lisp
29512 Here the virtual server name is @samp{odd-one} while the name of
29513 the physical server is @samp{ifi.uio.no}.
29515 The back ends should be able to switch between several virtual servers.
29516 The standard back ends implement this by keeping an alist of virtual
29517 server environments that they pull down/push up when needed.
29519 There are two groups of interface functions: @dfn{required functions},
29520 which must be present, and @dfn{optional functions}, which Gnus will
29521 always check for presence before attempting to call 'em.
29523 All these functions are expected to return data in the buffer
29524 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
29525 unfortunately named, but we'll have to live with it.  When I talk about
29526 @dfn{resulting data}, I always refer to the data in that buffer.  When I
29527 talk about @dfn{return value}, I talk about the function value returned by
29528 the function call.  Functions that fail should return @code{nil} as the
29529 return value.
29531 Some back ends could be said to be @dfn{server-forming} back ends, and
29532 some might be said not to be.  The latter are back ends that generally
29533 only operate on one group at a time, and have no concept of ``server''
29534 ---they have a group, and they deliver info on that group and nothing
29535 more.
29537 Gnus identifies each message by way of group name and article number.  A
29538 few remarks about these article numbers might be useful.  First of all,
29539 the numbers are positive integers.  Secondly, it is normally not
29540 possible for later articles to ``re-use'' older article numbers without
29541 confusing Gnus.  That is, if a group has ever contained a message
29542 numbered 42, then no other message may get that number, or Gnus will get
29543 mightily confused.@footnote{See the function
29544 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
29545 Third, article numbers must be assigned in order of arrival in the
29546 group; this is not necessarily the same as the date of the message.
29548 The previous paragraph already mentions all the ``hard'' restrictions that
29549 article numbers must fulfill.  But it seems that it might be useful to
29550 assign @emph{consecutive} article numbers, for Gnus gets quite confused
29551 if there are holes in the article numbering sequence.  However, due to
29552 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
29553 also useful for the article numbers to start at 1 to avoid running out
29554 of numbers as long as possible.
29556 Note that by convention, back ends are named @code{nnsomething}, but
29557 Gnus also comes with some @code{nnnotbackends}, such as
29558 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
29560 In the examples and definitions I will refer to the imaginary back end
29561 @code{nnchoke}.
29563 @cindex @code{nnchoke}
29565 @menu
29566 * Required Back End Functions::  Functions that must be implemented.
29567 * Optional Back End Functions::  Functions that need not be implemented.
29568 * Error Messaging::             How to get messages and report errors.
29569 * Writing New Back Ends::       Extending old back ends.
29570 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
29571 * Mail-like Back Ends::         Some tips on mail back ends.
29572 @end menu
29575 @node Required Back End Functions
29576 @subsubsection Required Back End Functions
29578 @table @code
29580 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
29582 @var{articles} is either a range of article numbers or a list of
29583 @code{Message-ID}s.  Current back ends do not fully support either---only
29584 sequences (lists) of article numbers, and most back ends do not support
29585 retrieval of @code{Message-ID}s.  But they should try for both.
29587 The result data should either be HEADs or @acronym{NOV} lines, and the result
29588 value should either be @code{headers} or @code{nov} to reflect this.
29589 This might later be expanded to @code{various}, which will be a mixture
29590 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
29592 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
29593 headers'', in some meaning of the word.  This is generally done by
29594 fetching (at most) @var{fetch-old} extra headers less than the smallest
29595 article number in @code{articles}, and filling the gaps as well.  The
29596 presence of this parameter can be ignored if the back end finds it
29597 cumbersome to follow the request.  If this is non-@code{nil} and not a
29598 number, do maximum fetches.
29600 Here's an example HEAD:
29602 @example
29603 221 1056 Article retrieved.
29604 Path: ifi.uio.no!sturles
29605 From: sturles@@ifi.uio.no (Sturle Sunde)
29606 Newsgroups: ifi.discussion
29607 Subject: Re: Something very droll
29608 Date: 27 Oct 1994 14:02:57 +0100
29609 Organization: Dept. of Informatics, University of Oslo, Norway
29610 Lines: 26
29611 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
29612 References: <38jdmq$4qu@@visbur.ifi.uio.no>
29613 NNTP-Posting-Host: holmenkollen.ifi.uio.no
29615 @end example
29617 So a @code{headers} return value would imply that there's a number of
29618 these in the data buffer.
29620 Here's a BNF definition of such a buffer:
29622 @example
29623 headers        = *head
29624 head           = error / valid-head
29625 error-message  = [ "4" / "5" ] 2number " " <error message> eol
29626 valid-head     = valid-message *header "." eol
29627 valid-message  = "221 " <number> " Article retrieved." eol
29628 header         = <text> eol
29629 @end example
29631 @cindex BNF
29632 (The version of BNF used here is the one used in RFC822.)
29634 If the return value is @code{nov}, the data buffer should contain
29635 @dfn{network overview database} lines.  These are basically fields
29636 separated by tabs.
29638 @example
29639 nov-buffer = *nov-line
29640 nov-line   = field 7*8[ <TAB> field ] eol
29641 field      = <text except TAB>
29642 @end example
29644 For a closer look at what should be in those fields,
29645 @pxref{Headers}.
29648 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
29650 @var{server} is here the virtual server name.  @var{definitions} is a
29651 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
29653 If the server can't be opened, no error should be signaled.  The back end
29654 may then choose to refuse further attempts at connecting to this
29655 server.  In fact, it should do so.
29657 If the server is opened already, this function should return a
29658 non-@code{nil} value.  There should be no data returned.
29661 @item (nnchoke-close-server &optional SERVER)
29663 Close connection to @var{server} and free all resources connected
29664 to it.  Return @code{nil} if the server couldn't be closed for some
29665 reason.
29667 There should be no data returned.
29670 @item (nnchoke-request-close)
29672 Close connection to all servers and free all resources that the back end
29673 have reserved.  All buffers that have been created by that back end
29674 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
29675 function is generally only called when Gnus is shutting down.
29677 There should be no data returned.
29680 @item (nnchoke-server-opened &optional SERVER)
29682 If @var{server} is the current virtual server, and the connection to the
29683 physical server is alive, then this function should return a
29684 non-@code{nil} value.  This function should under no circumstances
29685 attempt to reconnect to a server we have lost connection to.
29687 There should be no data returned.
29690 @item (nnchoke-status-message &optional SERVER)
29692 This function should return the last error message from @var{server}.
29694 There should be no data returned.
29697 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
29699 The result data from this function should be the article specified by
29700 @var{article}.  This might either be a @code{Message-ID} or a number.
29701 It is optional whether to implement retrieval by @code{Message-ID}, but
29702 it would be nice if that were possible.
29704 If @var{to-buffer} is non-@code{nil}, the result data should be returned
29705 in this buffer instead of the normal data buffer.  This is to make it
29706 possible to avoid copying large amounts of data from one buffer to
29707 another, while Gnus mainly requests articles to be inserted directly
29708 into its article buffer.
29710 If it is at all possible, this function should return a cons cell where
29711 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
29712 the article number.  This will enable Gnus to find out what the real
29713 group and article numbers are when fetching articles by
29714 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
29715 on successful article retrieval.
29718 @item (nnchoke-request-group GROUP &optional SERVER FAST)
29720 Get data on @var{group}.  This function also has the side effect of
29721 making @var{group} the current group.
29723 If @var{fast}, don't bother to return useful data, just make @var{group}
29724 the current group.
29726 Here's an example of some result data and a definition of the same:
29728 @example
29729 211 56 1000 1059 ifi.discussion
29730 @end example
29732 The first number is the status, which should be 211.  Next is the
29733 total number of articles in the group, the lowest article number, the
29734 highest article number, and finally the group name.  Note that the total
29735 number of articles may be less than one might think while just
29736 considering the highest and lowest article numbers, but some articles
29737 may have been canceled.  Gnus just discards the total-number, so
29738 whether one should take the bother to generate it properly (if that is a
29739 problem) is left as an exercise to the reader.  If the group contains no
29740 articles, the lowest article number should be reported as 1 and the
29741 highest as 0.
29743 @example
29744 group-status = [ error / info ] eol
29745 error        = [ "4" / "5" ] 2<number> " " <Error message>
29746 info         = "211 " 3* [ <number> " " ] <string>
29747 @end example
29750 @item (nnchoke-close-group GROUP &optional SERVER)
29752 Close @var{group} and free any resources connected to it.  This will be
29753 a no-op on most back ends.
29755 There should be no data returned.
29758 @item (nnchoke-request-list &optional SERVER)
29760 Return a list of all groups available on @var{server}.  And that means
29761 @emph{all}.
29763 Here's an example from a server that only carries two groups:
29765 @example
29766 ifi.test 0000002200 0000002000 y
29767 ifi.discussion 3324 3300 n
29768 @end example
29770 On each line we have a group name, then the highest article number in
29771 that group, the lowest article number, and finally a flag.  If the group
29772 contains no articles, the lowest article number should be reported as 1
29773 and the highest as 0.
29775 @example
29776 active-file = *active-line
29777 active-line = name " " <number> " " <number> " " flags eol
29778 name        = <string>
29779 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
29780 @end example
29782 The flag says whether the group is read-only (@samp{n}), is moderated
29783 (@samp{m}), is dead (@samp{x}), is aliased to some other group
29784 (@samp{=other-group}) or none of the above (@samp{y}).
29787 @item (nnchoke-request-post &optional SERVER)
29789 This function should post the current buffer.  It might return whether
29790 the posting was successful or not, but that's not required.  If, for
29791 instance, the posting is done asynchronously, it has generally not been
29792 completed by the time this function concludes.  In that case, this
29793 function should set up some kind of sentinel to beep the user loud and
29794 clear if the posting could not be completed.
29796 There should be no result data from this function.
29798 @end table
29801 @node Optional Back End Functions
29802 @subsubsection Optional Back End Functions
29804 @table @code
29806 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
29808 @var{groups} is a list of groups, and this function should request data
29809 on all those groups.  How it does it is of no concern to Gnus, but it
29810 should attempt to do this in a speedy fashion.
29812 The return value of this function can be either @code{active} or
29813 @code{group}, which says what the format of the result data is.  The
29814 former is in the same format as the data from
29815 @code{nnchoke-request-list}, while the latter is a buffer full of lines
29816 in the same format as @code{nnchoke-request-group} gives.
29818 @example
29819 group-buffer = *active-line / *group-status
29820 @end example
29823 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
29825 A Gnus group info (@pxref{Group Info}) is handed to the back end for
29826 alterations.  This comes in handy if the back end really carries all
29827 the information (as is the case with virtual and imap groups).  This
29828 function should destructively alter the info to suit its needs, and
29829 should return a non-@code{nil} value (exceptionally,
29830 @code{nntp-request-update-info} always returns @code{nil} not to waste
29831 the network resources).
29833 There should be no result data from this function.
29836 @item (nnchoke-request-type GROUP &optional ARTICLE)
29838 When the user issues commands for ``sending news'' (@kbd{F} in the
29839 summary buffer, for instance), Gnus has to know whether the article the
29840 user is following up on is news or mail.  This function should return
29841 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
29842 is mail and @code{unknown} if the type can't be decided.  (The
29843 @var{article} parameter is necessary in @code{nnvirtual} groups which
29844 might very well combine mail groups and news groups.)  Both @var{group}
29845 and @var{article} may be @code{nil}.
29847 There should be no result data from this function.
29850 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
29852 Set/remove/add marks on articles.  Normally Gnus handles the article
29853 marks (such as read, ticked, expired etc) internally, and store them in
29854 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
29855 all information about the articles on the server, so Gnus need to
29856 propagate the mark information to the server.
29858 @var{action} is a list of mark setting requests, having this format:
29860 @example
29861 (RANGE ACTION MARK)
29862 @end example
29864 @var{range} is a range of articles you wish to update marks on.
29865 @var{action} is @code{add} or @code{del}, used to add marks or remove
29866 marks (preserving all marks not mentioned).  @var{mark} is a list of
29867 marks; where each mark is a symbol.  Currently used marks are
29868 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
29869 @code{dormant}, @code{save}, @code{download}, @code{unsend},
29870 @code{forward} and @code{recent}, but your back end should, if
29871 possible, not limit itself to these.
29873 Given contradictory actions, the last action in the list should be the
29874 effective one.  That is, if your action contains a request to add the
29875 @code{tick} mark on article 1 and, later in the list, a request to
29876 remove the mark on the same article, the mark should in fact be removed.
29878 An example action list:
29880 @example
29881 (((5 12 30) 'del '(tick))
29882  ((10 . 90) 'add '(read expire))
29883  ((92 94) 'del '(read)))
29884 @end example
29886 The function should return a range of articles it wasn't able to set the
29887 mark on (currently not used for anything).
29889 There should be no result data from this function.
29891 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
29893 If the user tries to set a mark that the back end doesn't like, this
29894 function may change the mark.  Gnus will use whatever this function
29895 returns as the mark for @var{article} instead of the original
29896 @var{mark}.  If the back end doesn't care, it must return the original
29897 @var{mark}, and not @code{nil} or any other type of garbage.
29899 The only use for this I can see is what @code{nnvirtual} does with
29900 it---if a component group is auto-expirable, marking an article as read
29901 in the virtual group should result in the article being marked as
29902 expirable.
29904 There should be no result data from this function.
29907 @item (nnchoke-request-scan &optional GROUP SERVER)
29909 This function may be called at any time (by Gnus or anything else) to
29910 request that the back end check for incoming articles, in one way or
29911 another.  A mail back end will typically read the spool file or query
29912 the @acronym{POP} server when this function is invoked.  The
29913 @var{group} doesn't have to be heeded---if the back end decides that
29914 it is too much work just scanning for a single group, it may do a
29915 total scan of all groups.  It would be nice, however, to keep things
29916 local if that's practical.
29918 There should be no result data from this function.
29921 @item (nnchoke-request-group-description GROUP &optional SERVER)
29923 The result data from this function should be a description of
29924 @var{group}.
29926 @example
29927 description-line = name <TAB> description eol
29928 name             = <string>
29929 description      = <text>
29930 @end example
29932 @item (nnchoke-request-list-newsgroups &optional SERVER)
29934 The result data from this function should be the description of all
29935 groups available on the server.
29937 @example
29938 description-buffer = *description-line
29939 @end example
29942 @item (nnchoke-request-newgroups DATE &optional SERVER)
29944 The result data from this function should be all groups that were
29945 created after @samp{date}, which is in normal human-readable date format
29946 (i.e., the date format used in mail and news headers, and returned by
29947 the function @code{message-make-date} by default).  The data should be
29948 in the active buffer format.
29950 It is okay for this function to return ``too many'' groups; some back ends
29951 might find it cheaper to return the full list of groups, rather than
29952 just the new groups.  But don't do this for back ends with many groups.
29953 Normally, if the user creates the groups herself, there won't be too
29954 many groups, so @code{nnml} and the like are probably safe.  But for
29955 back ends like @code{nntp}, where the groups have been created by the
29956 server, it is quite likely that there can be many groups.
29959 @item (nnchoke-request-create-group GROUP &optional SERVER)
29961 This function should create an empty group with name @var{group}.
29963 There should be no return data.
29966 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
29968 This function should run the expiry process on all articles in the
29969 @var{articles} range (which is currently a simple list of article
29970 numbers.)  It is left up to the back end to decide how old articles
29971 should be before they are removed by this function.  If @var{force} is
29972 non-@code{nil}, all @var{articles} should be deleted, no matter how new
29973 they are.
29975 This function should return a list of articles that it did not/was not
29976 able to delete.
29978 There should be no result data returned.
29981 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
29983 This function should move @var{article} (which is a number) from
29984 @var{group} by calling @var{accept-form}.
29986 This function should ready the article in question for moving by
29987 removing any header lines it has added to the article, and generally
29988 should ``tidy up'' the article.  Then it should @code{eval}
29989 @var{accept-form} in the buffer where the ``tidy'' article is.  This
29990 will do the actual copying.  If this @code{eval} returns a
29991 non-@code{nil} value, the article should be removed.
29993 If @var{last} is @code{nil}, that means that there is a high likelihood
29994 that there will be more requests issued shortly, so that allows some
29995 optimizations.
29997 The function should return a cons where the @code{car} is the group name and
29998 the @code{cdr} is the article number that the article was entered as.
30000 There should be no data returned.
30003 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
30005 This function takes the current buffer and inserts it into @var{group}.
30006 If @var{last} in @code{nil}, that means that there will be more calls to
30007 this function in short order.
30009 The function should return a cons where the @code{car} is the group name and
30010 the @code{cdr} is the article number that the article was entered as.
30012 The group should exist before the back end is asked to accept the
30013 article for that group.
30015 There should be no data returned.
30018 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
30020 This function should remove @var{article} (which is a number) from
30021 @var{group} and insert @var{buffer} there instead.
30023 There should be no data returned.
30026 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
30028 This function should delete @var{group}.  If @var{force}, it should
30029 really delete all the articles in the group, and then delete the group
30030 itself.  (If there is such a thing as ``the group itself''.)
30032 There should be no data returned.
30035 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
30037 This function should rename @var{group} into @var{new-name}.  All
30038 articles in @var{group} should move to @var{new-name}.
30040 There should be no data returned.
30042 @end table
30045 @node Error Messaging
30046 @subsubsection Error Messaging
30048 @findex nnheader-report
30049 @findex nnheader-get-report
30050 The back ends should use the function @code{nnheader-report} to report
30051 error conditions---they should not raise errors when they aren't able to
30052 perform a request.  The first argument to this function is the back end
30053 symbol, and the rest are interpreted as arguments to @code{format} if
30054 there are multiple of them, or just a string if there is one of them.
30055 This function must always returns @code{nil}.
30057 @lisp
30058 (nnheader-report 'nnchoke "You did something totally bogus")
30060 (nnheader-report 'nnchoke "Could not request group %s" group)
30061 @end lisp
30063 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
30064 @code{nil} back from a server, and this function returns the most
30065 recently reported message for the back end in question.  This function
30066 takes one argument---the server symbol.
30068 Internally, these functions access @var{back-end}@code{-status-string},
30069 so the @code{nnchoke} back end will have its error message stored in
30070 @code{nnchoke-status-string}.
30073 @node Writing New Back Ends
30074 @subsubsection Writing New Back Ends
30076 Many back ends are quite similar.  @code{nnml} is just like
30077 @code{nnspool}, but it allows you to edit the articles on the server.
30078 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
30079 and it doesn't maintain overview databases.  @code{nndir} is just like
30080 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
30081 editing articles.
30083 It would make sense if it were possible to ``inherit'' functions from
30084 back ends when writing new back ends.  And, indeed, you can do that if you
30085 want to.  (You don't have to if you don't want to, of course.)
30087 All the back ends declare their public variables and functions by using a
30088 package called @code{nnoo}.
30090 To inherit functions from other back ends (and allow other back ends to
30091 inherit functions from the current back end), you should use the
30092 following macros:
30094 @table @code
30096 @item nnoo-declare
30097 This macro declares the first parameter to be a child of the subsequent
30098 parameters.  For instance:
30100 @lisp
30101 (nnoo-declare nndir
30102   nnml nnmh)
30103 @end lisp
30105 @code{nndir} has declared here that it intends to inherit functions from
30106 both @code{nnml} and @code{nnmh}.
30108 @item defvoo
30109 This macro is equivalent to @code{defvar}, but registers the variable as
30110 a public server variable.  Most state-oriented variables should be
30111 declared with @code{defvoo} instead of @code{defvar}.
30113 In addition to the normal @code{defvar} parameters, it takes a list of
30114 variables in the parent back ends to map the variable to when executing
30115 a function in those back ends.
30117 @lisp
30118 (defvoo nndir-directory nil
30119   "Where nndir will look for groups."
30120   nnml-current-directory nnmh-current-directory)
30121 @end lisp
30123 This means that @code{nnml-current-directory} will be set to
30124 @code{nndir-directory} when an @code{nnml} function is called on behalf
30125 of @code{nndir}.  (The same with @code{nnmh}.)
30127 @item nnoo-define-basics
30128 This macro defines some common functions that almost all back ends should
30129 have.
30131 @lisp
30132 (nnoo-define-basics nndir)
30133 @end lisp
30135 @item deffoo
30136 This macro is just like @code{defun} and takes the same parameters.  In
30137 addition to doing the normal @code{defun} things, it registers the
30138 function as being public so that other back ends can inherit it.
30140 @item nnoo-map-functions
30141 This macro allows mapping of functions from the current back end to
30142 functions from the parent back ends.
30144 @lisp
30145 (nnoo-map-functions nndir
30146   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30147   (nnmh-request-article 0 nndir-current-group 0 0))
30148 @end lisp
30150 This means that when @code{nndir-retrieve-headers} is called, the first,
30151 third, and fourth parameters will be passed on to
30152 @code{nnml-retrieve-headers}, while the second parameter is set to the
30153 value of @code{nndir-current-group}.
30155 @item nnoo-import
30156 This macro allows importing functions from back ends.  It should be the
30157 last thing in the source file, since it will only define functions that
30158 haven't already been defined.
30160 @lisp
30161 (nnoo-import nndir
30162   (nnmh
30163    nnmh-request-list
30164    nnmh-request-newgroups)
30165   (nnml))
30166 @end lisp
30168 This means that calls to @code{nndir-request-list} should just be passed
30169 on to @code{nnmh-request-list}, while all public functions from
30170 @code{nnml} that haven't been defined in @code{nndir} yet should be
30171 defined now.
30173 @end table
30175 Below is a slightly shortened version of the @code{nndir} back end.
30177 @lisp
30178 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
30179 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
30181 ;;; @r{Code:}
30183 (require 'nnheader)
30184 (require 'nnmh)
30185 (require 'nnml)
30186 (require 'nnoo)
30187 (eval-when-compile (require 'cl))
30189 (nnoo-declare nndir
30190   nnml nnmh)
30192 (defvoo nndir-directory nil
30193   "Where nndir will look for groups."
30194   nnml-current-directory nnmh-current-directory)
30196 (defvoo nndir-nov-is-evil nil
30197   "*Non-nil means that nndir will never retrieve NOV headers."
30198   nnml-nov-is-evil)
30200 (defvoo nndir-current-group ""
30201   nil
30202   nnml-current-group nnmh-current-group)
30203 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
30204 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
30206 (defvoo nndir-status-string "" nil nnmh-status-string)
30207 (defconst nndir-version "nndir 1.0")
30209 ;;; @r{Interface functions.}
30211 (nnoo-define-basics nndir)
30213 (deffoo nndir-open-server (server &optional defs)
30214   (setq nndir-directory
30215         (or (cadr (assq 'nndir-directory defs))
30216             server))
30217   (unless (assq 'nndir-directory defs)
30218     (push `(nndir-directory ,server) defs))
30219   (push `(nndir-current-group
30220           ,(file-name-nondirectory
30221             (directory-file-name nndir-directory)))
30222         defs)
30223   (push `(nndir-top-directory
30224           ,(file-name-directory (directory-file-name nndir-directory)))
30225         defs)
30226   (nnoo-change-server 'nndir server defs))
30228 (nnoo-map-functions nndir
30229   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30230   (nnmh-request-article 0 nndir-current-group 0 0)
30231   (nnmh-request-group nndir-current-group 0 0)
30232   (nnmh-close-group nndir-current-group 0))
30234 (nnoo-import nndir
30235   (nnmh
30236    nnmh-status-message
30237    nnmh-request-list
30238    nnmh-request-newgroups))
30240 (provide 'nndir)
30241 @end lisp
30244 @node Hooking New Back Ends Into Gnus
30245 @subsubsection Hooking New Back Ends Into Gnus
30247 @vindex gnus-valid-select-methods
30248 @findex gnus-declare-backend
30249 Having Gnus start using your new back end is rather easy---you just
30250 declare it with the @code{gnus-declare-backend} functions.  This will
30251 enter the back end into the @code{gnus-valid-select-methods} variable.
30253 @code{gnus-declare-backend} takes two parameters---the back end name and
30254 an arbitrary number of @dfn{abilities}.
30256 Here's an example:
30258 @lisp
30259 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
30260 @end lisp
30262 The above line would then go in the @file{nnchoke.el} file.
30264 The abilities can be:
30266 @table @code
30267 @item mail
30268 This is a mailish back end---followups should (probably) go via mail.
30269 @item post
30270 This is a newsish back end---followups should (probably) go via news.
30271 @item post-mail
30272 This back end supports both mail and news.
30273 @item none
30274 This is neither a post nor mail back end---it's something completely
30275 different.
30276 @item respool
30277 It supports respooling---or rather, it is able to modify its source
30278 articles and groups.
30279 @item address
30280 The name of the server should be in the virtual server name.  This is
30281 true for almost all back ends.
30282 @item prompt-address
30283 The user should be prompted for an address when doing commands like
30284 @kbd{B} in the group buffer.  This is true for back ends like
30285 @code{nntp}, but not @code{nnmbox}, for instance.
30286 @end table
30289 @node Mail-like Back Ends
30290 @subsubsection Mail-like Back Ends
30292 One of the things that separate the mail back ends from the rest of the
30293 back ends is the heavy dependence by most of the mail back ends on
30294 common functions in @file{nnmail.el}.  For instance, here's the
30295 definition of @code{nnml-request-scan}:
30297 @lisp
30298 (deffoo nnml-request-scan (&optional group server)
30299   (setq nnml-article-file-alist nil)
30300   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
30301 @end lisp
30303 It simply calls @code{nnmail-get-new-mail} with a few parameters,
30304 and @code{nnmail} takes care of all the moving and splitting of the
30305 mail.
30307 This function takes four parameters.
30309 @table @var
30310 @item method
30311 This should be a symbol to designate which back end is responsible for
30312 the call.
30314 @item exit-function
30315 This function should be called after the splitting has been performed.
30317 @item temp-directory
30318 Where the temporary files should be stored.
30320 @item group
30321 This optional argument should be a group name if the splitting is to be
30322 performed for one group only.
30323 @end table
30325 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
30326 save each article.  @var{back-end}@code{-active-number} will be called to
30327 find the article number assigned to this article.
30329 The function also uses the following variables:
30330 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
30331 this back end); and @var{back-end}@code{-group-alist} and
30332 @var{back-end}@code{-active-file} to generate the new active file.
30333 @var{back-end}@code{-group-alist} should be a group-active alist, like
30334 this:
30336 @example
30337 (("a-group" (1 . 10))
30338  ("some-group" (34 . 39)))
30339 @end example
30342 @node Score File Syntax
30343 @subsection Score File Syntax
30345 Score files are meant to be easily parseable, but yet extremely
30346 mallable.  It was decided that something that had the same read syntax
30347 as an Emacs Lisp list would fit that spec.
30349 Here's a typical score file:
30351 @lisp
30352 (("summary"
30353   ("win95" -10000 nil s)
30354   ("Gnus"))
30355  ("from"
30356   ("Lars" -1000))
30357  (mark -100))
30358 @end lisp
30360 BNF definition of a score file:
30362 @example
30363 score-file      = "" / "(" *element ")"
30364 element         = rule / atom
30365 rule            = string-rule / number-rule / date-rule
30366 string-rule     = "(" quote string-header quote space *string-match ")"
30367 number-rule     = "(" quote number-header quote space *number-match ")"
30368 date-rule       = "(" quote date-header quote space *date-match ")"
30369 quote           = <ascii 34>
30370 string-header   = "subject" / "from" / "references" / "message-id" /
30371                   "xref" / "body" / "head" / "all" / "followup"
30372 number-header   = "lines" / "chars"
30373 date-header     = "date"
30374 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
30375                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
30376 score           = "nil" / <integer>
30377 date            = "nil" / <natural number>
30378 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
30379                   "r" / "regex" / "R" / "Regex" /
30380                   "e" / "exact" / "E" / "Exact" /
30381                   "f" / "fuzzy" / "F" / "Fuzzy"
30382 number-match    = "(" <integer> [ "" / [ space score [ "" /
30383                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
30384 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
30385 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
30386                   space date [ "" / [ space date-match-t ] ] ] ] ")"
30387 date-match-t    = "nil" / "at" / "before" / "after"
30388 atom            = "(" [ required-atom / optional-atom ] ")"
30389 required-atom   = mark / expunge / mark-and-expunge / files /
30390                   exclude-files / read-only / touched
30391 optional-atom   = adapt / local / eval
30392 mark            = "mark" space nil-or-number
30393 nil-or-number   = "nil" / <integer>
30394 expunge         = "expunge" space nil-or-number
30395 mark-and-expunge = "mark-and-expunge" space nil-or-number
30396 files           = "files" *[ space <string> ]
30397 exclude-files   = "exclude-files" *[ space <string> ]
30398 read-only       = "read-only" [ space "nil" / space "t" ]
30399 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
30400 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
30401 local           = "local" *[ space "(" <string> space <form> ")" ]
30402 eval            = "eval" space <form>
30403 space           = *[ " " / <TAB> / <NEWLINE> ]
30404 @end example
30406 Any unrecognized elements in a score file should be ignored, but not
30407 discarded.
30409 As you can see, white space is needed, but the type and amount of white
30410 space is irrelevant.  This means that formatting of the score file is
30411 left up to the programmer---if it's simpler to just spew it all out on
30412 one looong line, then that's ok.
30414 The meaning of the various atoms are explained elsewhere in this
30415 manual (@pxref{Score File Format}).
30418 @node Headers
30419 @subsection Headers
30421 Internally Gnus uses a format for storing article headers that
30422 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
30423 almost suspect that the author looked at the @acronym{NOV} specification and
30424 just shamelessly @emph{stole} the entire thing, and one would be right.
30426 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
30427 RFC 1036 to talk about lines in the head of an article (e.g.,
30428 @code{From}).  It is used by many people as a synonym for
30429 ``head''---``the header and the body''.  (That should be avoided, in my
30430 opinion.)  And Gnus uses a format internally that it calls ``header'',
30431 which is what I'm talking about here.  This is a 9-element vector,
30432 basically, with each header (ouch) having one slot.
30434 These slots are, in order: @code{number}, @code{subject}, @code{from},
30435 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
30436 @code{xref}, and @code{extra}.  There are macros for accessing and
30437 setting these slots---they all have predictable names beginning with
30438 @code{mail-header-} and @code{mail-header-set-}, respectively.
30440 All these slots contain strings, except the @code{extra} slot, which
30441 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
30444 @node Ranges
30445 @subsection Ranges
30447 @sc{gnus} introduced a concept that I found so useful that I've started
30448 using it a lot and have elaborated on it greatly.
30450 The question is simple: If you have a large amount of objects that are
30451 identified by numbers (say, articles, to take a @emph{wild} example)
30452 that you want to qualify as being ``included'', a normal sequence isn't
30453 very useful.  (A 200,000 length sequence is a bit long-winded.)
30455 The solution is as simple as the question: You just collapse the
30456 sequence.
30458 @example
30459 (1 2 3 4 5 6 10 11 12)
30460 @end example
30462 is transformed into
30464 @example
30465 ((1 . 6) (10 . 12))
30466 @end example
30468 To avoid having those nasty @samp{(13 . 13)} elements to denote a
30469 lonesome object, a @samp{13} is a valid element:
30471 @example
30472 ((1 . 6) 7 (10 . 12))
30473 @end example
30475 This means that comparing two ranges to find out whether they are equal
30476 is slightly tricky:
30478 @example
30479 ((1 . 5) 7 8 (10 . 12))
30480 @end example
30484 @example
30485 ((1 . 5) (7 . 8) (10 . 12))
30486 @end example
30488 are equal.  In fact, any non-descending list is a range:
30490 @example
30491 (1 2 3 4 5)
30492 @end example
30494 is a perfectly valid range, although a pretty long-winded one.  This is
30495 also valid:
30497 @example
30498 (1 . 5)
30499 @end example
30501 and is equal to the previous range.
30503 Here's a BNF definition of ranges.  Of course, one must remember the
30504 semantic requirement that the numbers are non-descending.  (Any number
30505 of repetition of the same number is allowed, but apt to disappear in
30506 range handling.)
30508 @example
30509 range           = simple-range / normal-range
30510 simple-range    = "(" number " . " number ")"
30511 normal-range    = "(" start-contents ")"
30512 contents        = "" / simple-range *[ " " contents ] /
30513                   number *[ " " contents ]
30514 @end example
30516 Gnus currently uses ranges to keep track of read articles and article
30517 marks.  I plan on implementing a number of range operators in C if The
30518 Powers That Be are willing to let me.  (I haven't asked yet, because I
30519 need to do some more thinking on what operators I need to make life
30520 totally range-based without ever having to convert back to normal
30521 sequences.)
30524 @node Group Info
30525 @subsection Group Info
30527 Gnus stores all permanent info on groups in a @dfn{group info} list.
30528 This list is from three to six elements (or more) long and exhaustively
30529 describes the group.
30531 Here are two example group infos; one is a very simple group while the
30532 second is a more complex one:
30534 @example
30535 ("no.group" 5 ((1 . 54324)))
30537 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
30538                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
30539                 (nnml "")
30540                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
30541 @end example
30543 The first element is the @dfn{group name}---as Gnus knows the group,
30544 anyway.  The second element is the @dfn{subscription level}, which
30545 normally is a small integer.  (It can also be the @dfn{rank}, which is a
30546 cons cell where the @code{car} is the level and the @code{cdr} is the
30547 score.)  The third element is a list of ranges of read articles.  The
30548 fourth element is a list of lists of article marks of various kinds.
30549 The fifth element is the select method (or virtual server, if you like).
30550 The sixth element is a list of @dfn{group parameters}, which is what
30551 this section is about.
30553 Any of the last three elements may be missing if they are not required.
30554 In fact, the vast majority of groups will normally only have the first
30555 three elements, which saves quite a lot of cons cells.
30557 Here's a BNF definition of the group info format:
30559 @example
30560 info          = "(" group space ralevel space read
30561                 [ "" / [ space marks-list [ "" / [ space method [ "" /
30562                 space parameters ] ] ] ] ] ")"
30563 group         = quote <string> quote
30564 ralevel       = rank / level
30565 level         = <integer in the range of 1 to inf>
30566 rank          = "(" level "." score ")"
30567 score         = <integer in the range of 1 to inf>
30568 read          = range
30569 marks-lists   = nil / "(" *marks ")"
30570 marks         = "(" <string> range ")"
30571 method        = "(" <string> *elisp-forms ")"
30572 parameters    = "(" *elisp-forms ")"
30573 @end example
30575 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
30576 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
30577 in pseudo-BNF.
30579 If you have a Gnus info and want to access the elements, Gnus offers a
30580 series of macros for getting/setting these elements.
30582 @table @code
30583 @item gnus-info-group
30584 @itemx gnus-info-set-group
30585 @findex gnus-info-group
30586 @findex gnus-info-set-group
30587 Get/set the group name.
30589 @item gnus-info-rank
30590 @itemx gnus-info-set-rank
30591 @findex gnus-info-rank
30592 @findex gnus-info-set-rank
30593 Get/set the group rank (@pxref{Group Score}).
30595 @item gnus-info-level
30596 @itemx gnus-info-set-level
30597 @findex gnus-info-level
30598 @findex gnus-info-set-level
30599 Get/set the group level.
30601 @item gnus-info-score
30602 @itemx gnus-info-set-score
30603 @findex gnus-info-score
30604 @findex gnus-info-set-score
30605 Get/set the group score (@pxref{Group Score}).
30607 @item gnus-info-read
30608 @itemx gnus-info-set-read
30609 @findex gnus-info-read
30610 @findex gnus-info-set-read
30611 Get/set the ranges of read articles.
30613 @item gnus-info-marks
30614 @itemx gnus-info-set-marks
30615 @findex gnus-info-marks
30616 @findex gnus-info-set-marks
30617 Get/set the lists of ranges of marked articles.
30619 @item gnus-info-method
30620 @itemx gnus-info-set-method
30621 @findex gnus-info-method
30622 @findex gnus-info-set-method
30623 Get/set the group select method.
30625 @item gnus-info-params
30626 @itemx gnus-info-set-params
30627 @findex gnus-info-params
30628 @findex gnus-info-set-params
30629 Get/set the group parameters.
30630 @end table
30632 All the getter functions take one parameter---the info list.  The setter
30633 functions take two parameters---the info list and the new value.
30635 The last three elements in the group info aren't mandatory, so it may be
30636 necessary to extend the group info before setting the element.  If this
30637 is necessary, you can just pass on a non-@code{nil} third parameter to
30638 the three final setter functions to have this happen automatically.
30641 @node Extended Interactive
30642 @subsection Extended Interactive
30643 @cindex interactive
30644 @findex gnus-interactive
30646 Gnus extends the standard Emacs @code{interactive} specification
30647 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
30648 Prefixes}).  Here's an example of how this is used:
30650 @lisp
30651 (defun gnus-summary-increase-score (&optional score symp)
30652   (interactive (gnus-interactive "P\ny"))
30653   ...
30654   )
30655 @end lisp
30657 The best thing to do would have been to implement
30658 @code{gnus-interactive} as a macro which would have returned an
30659 @code{interactive} form, but this isn't possible since Emacs checks
30660 whether a function is interactive or not by simply doing an @code{assq}
30661 on the lambda form.  So, instead we have @code{gnus-interactive}
30662 function that takes a string and returns values that are usable to
30663 @code{interactive}.
30665 This function accepts (almost) all normal @code{interactive} specs, but
30666 adds a few more.
30668 @table @samp
30669 @item y
30670 @vindex gnus-current-prefix-symbol
30671 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
30672 variable.
30674 @item Y
30675 @vindex gnus-current-prefix-symbols
30676 A list of the current symbolic prefixes---the
30677 @code{gnus-current-prefix-symbol} variable.
30679 @item A
30680 The current article number---the @code{gnus-summary-article-number}
30681 function.
30683 @item H
30684 The current article header---the @code{gnus-summary-article-header}
30685 function.
30687 @item g
30688 The current group name---the @code{gnus-group-group-name}
30689 function.
30691 @end table
30694 @node Emacs/XEmacs Code
30695 @subsection Emacs/XEmacs Code
30696 @cindex XEmacs
30697 @cindex Emacsen
30699 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
30700 platforms must be the primary one.  I chose Emacs.  Not because I don't
30701 like XEmacs or Mule, but because it comes first alphabetically.
30703 This means that Gnus will byte-compile under Emacs with nary a warning,
30704 while XEmacs will pump out gigabytes of warnings while byte-compiling.
30705 As I use byte-compilation warnings to help me root out trivial errors in
30706 Gnus, that's very useful.
30708 I've also consistently used Emacs function interfaces, but have used
30709 Gnusey aliases for the functions.  To take an example:  Emacs defines a
30710 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
30711 function.  I then define a function called @code{gnus-run-at-time} that
30712 takes the same parameters as the Emacs @code{run-at-time}.  When running
30713 Gnus under Emacs, the former function is just an alias for the latter.
30714 However, when running under XEmacs, the former is an alias for the
30715 following function:
30717 @lisp
30718 (defun gnus-xmas-run-at-time (time repeat function &rest args)
30719   (start-itimer
30720    "gnus-run-at-time"
30721    `(lambda ()
30722       (,function ,@@args))
30723    time repeat))
30724 @end lisp
30726 This sort of thing has been done for bunches of functions.  Gnus does
30727 not redefine any native Emacs functions while running under XEmacs---it
30728 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
30729 all over.
30731 In the cases where the XEmacs function interface was obviously cleaner,
30732 I used it instead.  For example @code{gnus-region-active-p} is an alias
30733 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
30735 Of course, I could have chosen XEmacs as my native platform and done
30736 mapping functions the other way around.  But I didn't.  The performance
30737 hit these indirections impose on Gnus under XEmacs should be slight.
30740 @node Various File Formats
30741 @subsection Various File Formats
30743 @menu
30744 * Active File Format::          Information on articles and groups available.
30745 * Newsgroups File Format::      Group descriptions.
30746 @end menu
30749 @node Active File Format
30750 @subsubsection Active File Format
30752 The active file lists all groups available on the server in
30753 question.  It also lists the highest and lowest current article numbers
30754 in each group.
30756 Here's an excerpt from a typical active file:
30758 @example
30759 soc.motss 296030 293865 y
30760 alt.binaries.pictures.fractals 3922 3913 n
30761 comp.sources.unix 1605 1593 m
30762 comp.binaries.ibm.pc 5097 5089 y
30763 no.general 1000 900 y
30764 @end example
30766 Here's a pseudo-BNF definition of this file:
30768 @example
30769 active      = *group-line
30770 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
30771 group       = <non-white-space string>
30772 spc         = " "
30773 high-number = <non-negative integer>
30774 low-number  = <positive integer>
30775 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
30776 @end example
30778 For a full description of this file, see the manual pages for
30779 @samp{innd}, in particular @samp{active(5)}.
30782 @node Newsgroups File Format
30783 @subsubsection Newsgroups File Format
30785 The newsgroups file lists groups along with their descriptions.  Not all
30786 groups on the server have to be listed,  and not all groups in the file
30787 have to exist on the server.  The file is meant purely as information to
30788 the user.
30790 The format is quite simple; a group name, a tab, and the description.
30791 Here's the definition:
30793 @example
30794 newsgroups    = *line
30795 line          = group tab description <NEWLINE>
30796 group         = <non-white-space string>
30797 tab           = <TAB>
30798 description   = <string>
30799 @end example
30802 @page
30803 @node Emacs for Heathens
30804 @section Emacs for Heathens
30806 Believe it or not, but some people who use Gnus haven't really used
30807 Emacs much before they embarked on their journey on the Gnus Love Boat.
30808 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
30809 region'', and ``set @code{gnus-flargblossen} to an alist where the key
30810 is a regexp that is used for matching on the group name'' are magical
30811 phrases with little or no meaning, then this appendix is for you.  If
30812 you are already familiar with Emacs, just ignore this and go fondle your
30813 cat instead.
30815 @menu
30816 * Keystrokes::                  Entering text and executing commands.
30817 * Emacs Lisp::                  The built-in Emacs programming language.
30818 @end menu
30821 @node Keystrokes
30822 @subsection Keystrokes
30824 @itemize @bullet
30825 @item
30826 Q: What is an experienced Emacs user?
30828 @item
30829 A: A person who wishes that the terminal had pedals.
30830 @end itemize
30832 Yes, when you use Emacs, you are apt to use the control key, the shift
30833 key and the meta key a lot.  This is very annoying to some people
30834 (notably @code{vi}le users), and the rest of us just love the hell out
30835 of it.  Just give up and submit.  Emacs really does stand for
30836 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
30837 may have heard from other disreputable sources (like the Emacs author).
30839 The shift keys are normally located near your pinky fingers, and are
30840 normally used to get capital letters and stuff.  You probably use it all
30841 the time.  The control key is normally marked ``CTRL'' or something like
30842 that.  The meta key is, funnily enough, never marked as such on any
30843 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
30844 which is the meta key on this keyboard.  It's usually located somewhere
30845 to the left hand side of the keyboard, usually on the bottom row.
30847 Now, us Emacs people don't say ``press the meta-control-m key'',
30848 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
30849 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
30850 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
30851 down the control key, and hold it down while you press @kbd{k}''.
30852 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
30853 the control key and then press @kbd{k}''.  Simple, ay?
30855 This is somewhat complicated by the fact that not all keyboards have a
30856 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
30857 means ``press escape, release escape, press @kbd{k}''.  That's much more
30858 work than if you have a meta key, so if that's the case, I respectfully
30859 suggest you get a real keyboard with a meta key.  You can't live without
30864 @node Emacs Lisp
30865 @subsection Emacs Lisp
30867 Emacs is the King of Editors because it's really a Lisp interpreter.
30868 Each and every key you tap runs some Emacs Lisp code snippet, and since
30869 Emacs Lisp is an interpreted language, that means that you can configure
30870 any key to run any arbitrary code.  You just, like, do it.
30872 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
30873 functions.  (These are byte-compiled for speed, but it's still
30874 interpreted.)  If you decide that you don't like the way Gnus does
30875 certain things, it's trivial to have it do something a different way.
30876 (Well, at least if you know how to write Lisp code.)  However, that's
30877 beyond the scope of this manual, so we are simply going to talk about
30878 some common constructs that you normally use in your @file{~/.gnus.el}
30879 file to customize Gnus.  (You can also use the @file{~/.emacs} file, but
30880 in order to set things of Gnus up, it is much better to use the
30881 @file{~/.gnus.el} file, @xref{Startup Files}.)
30883 If you want to set the variable @code{gnus-florgbnize} to four (4), you
30884 write the following:
30886 @lisp
30887 (setq gnus-florgbnize 4)
30888 @end lisp
30890 This function (really ``special form'') @code{setq} is the one that can
30891 set a variable to some value.  This is really all you need to know.  Now
30892 you can go and fill your @file{~/.gnus.el} file with lots of these to
30893 change how Gnus works.
30895 If you have put that thing in your @file{~/.gnus.el} file, it will be
30896 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
30897 start Gnus.  If you want to change the variable right away, simply say
30898 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
30899 previous ``form'', which is a simple @code{setq} statement here.
30901 Go ahead---just try it, if you're located at your Emacs.  After you
30902 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
30903 is the return value of the form you @code{eval}ed.
30905 Some pitfalls:
30907 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
30908 that means:
30910 @lisp
30911 (setq gnus-read-active-file 'some)
30912 @end lisp
30914 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
30915 @samp{nntp.ifi.uio.no}'', that means:
30917 @lisp
30918 (setq gnus-nntp-server "nntp.ifi.uio.no")
30919 @end lisp
30921 So be careful not to mix up strings (the latter) with symbols (the
30922 former).  The manual is unambiguous, but it can be confusing.
30924 @page
30925 @include gnus-faq.texi
30927 @node GNU Free Documentation License
30928 @chapter GNU Free Documentation License
30929 @include doclicense.texi
30931 @node Index
30932 @chapter Index
30933 @printindex cp
30935 @node Key Index
30936 @chapter Key Index
30937 @printindex ky
30939 @summarycontents
30940 @contents
30941 @bye
30943 @iftex
30944 @iflatex
30945 \end{document}
30946 @end iflatex
30947 @end iftex
30949 @c Local Variables:
30950 @c mode: texinfo
30951 @c coding: iso-8859-1
30952 @c End:
30954 @ignore
30955    arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
30956 @end ignore