]> code.delx.au - gnu-emacs/blob - man/mh-e.texi
(Folders): Updated mh-before-quit-hook and mh-quit-hook example with
[gnu-emacs] / man / mh-e.texi
1 \input texinfo @c -*-texinfo-*-
2 @c
3 @c Note: This document requires makeinfo version 4.6 or greater to build.
4 @c
5 @c %**start of header
6 @setfilename ../info/mh-e
7 @settitle The MH-E Manual
8 @c %**end of header
9
10 @c Version of the software and manual.
11 @set VERSION 7.93
12 @c Edition of the manual. It is either empty for the first edition or
13 @c has the form ", nth Edition" (without the quotes).
14 @set EDITION , 7th Edition
15 @set UPDATED 2006-04-17
16 @set UPDATE-MONTH April, 2006
17
18 @c Other variables.
19 @set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh
20 @set MH-E-HOME http://mh-e.sourceforge.net/
21
22 @c Copyright
23 @copying
24 This is version @value{VERSION}@value{EDITION} of @cite{The MH-E
25 Manual}, last updated @value{UPDATED}.
26
27 Copyright @copyright{} 1995, 2001, 2002, 2003, 2005, 2006 Free
28 Software Foundation, Inc.
29
30 @quotation
31 The MH-E manual is free documentation; you can redistribute it and/or
32 modify it under the terms of either:
33
34 @enumerate a
35 @item
36 the GNU Free Documentation License, Version 1.2 or any later version
37 published by the Free Software Foundation; with no Invariant Sections,
38 no Front-Cover Texts, and no Back-Cover Texts.
39
40 @item
41 the GNU General Public License as published by the Free Software
42 Foundation; either version 2, or (at your option) any later version.
43 @end enumerate
44
45 The MH-E manual is distributed in the hope that it will be useful, but
46 WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48 General Public License or GNU Free Documentation License for more
49 details.
50
51 The GNU General Public License and the GNU Free Documentation License
52 appear as appendices to this document. You may also request copies by
53 writing to the Free Software Foundation, Inc., 51 Franklin Street,
54 Fifth Floor, Boston, MA 02110-1301, USA.
55 @end quotation
56 @end copying
57
58 @c Info Directory Entry
59 @dircategory Emacs
60 @direntry
61 * MH-E: (mh-e). Emacs interface to the MH mail system.
62 @end direntry
63
64 @c Title Page
65 @setchapternewpage odd
66 @titlepage
67 @title The MH-E Manual
68 @subtitle Version @value{VERSION}@value{EDITION}
69 @subtitle @value{UPDATE-MONTH}
70 @author Bill Wohler
71
72 @c Copyright Page
73 @page
74 @vskip 0pt plus 1filll
75 @insertcopying
76 @end titlepage
77
78 @ifnottex
79 @html
80 <!--
81 @end html
82 @node Top, Preface, (dir), (dir)
83 @top The MH-E Manual
84 @html
85 -->
86 @end html
87 @insertcopying
88 @end ifnottex
89
90 @c Table of Contents
91 @contents
92
93 @html
94 <!--
95 @end html
96
97 @menu
98 * Preface:: Preface
99 * Conventions:: GNU Emacs Terms and Conventions
100 * Getting Started:: Getting Started
101 * Tour Through MH-E:: Tour Through MH-E
102 * Using This Manual:: Using This Manual
103 * Incorporating Mail:: Incorporating Mail
104 * Reading Mail:: Reading Mail
105 * Folders:: Organizing Your Mail with Folders
106 * Sending Mail:: Sending Mail
107 * Editing Drafts:: Editing a Draft
108 * Aliases:: Aliases
109 * Identities:: Identities
110 * Speedbar:: The Speedbar
111 * Menu Bar:: The Menu Bar
112 * Tool Bar:: The Tool Bar
113 * Searching:: Searching Through Messages
114 * Threading:: Viewing Message Threads
115 * Limits:: Limiting Display
116 * Sequences:: Using Sequences
117 * Junk:: Dealing With Junk Mail
118 * Miscellaneous:: Miscellaneous Commands, Variables, and Buffers
119 * Scan Line Formats:: Scan Line Formats
120 * Procmail:: Reading Mailing Lists Effectively
121 * Odds and Ends:: Odds and Ends
122 * History:: History of MH-E
123 * GFDL:: GNU Free Documentation License
124 * GPL:: GNU Public License
125 * Key Index:: Key (Character) Index
126 * Command Index:: Command Index
127 * Option Index:: Option (Variable) Index
128 * Concept Index:: Concept Index
129
130 @detailmenu
131 --- The Detailed Node Listing ---
132
133 Tour Through MH-E
134
135 * Sending Mail Tour::
136 * Reading Mail Tour::
137 * Processing Mail Tour::
138 * Leaving MH-E::
139 * More About MH-E::
140
141 Using This Manual
142
143 * Options::
144 * Ranges::
145 * Folder Selection::
146
147 Reading Your Mail
148
149 * Viewing::
150 * Viewing Attachments::
151 * HTML::
152 * Digests::
153 * Reading PGP::
154 * Printing::
155 * Files and Pipes::
156 * Navigating::
157 * Miscellaneous Commands and Options::
158
159 Sending Mail
160
161 * Composing::
162 * Replying::
163 * Forwarding::
164 * Redistributing::
165 * Editing Again::
166
167 Editing a Draft
168
169 * Editing Message::
170 * Inserting Letter::
171 * Inserting Messages::
172 * Signature::
173 * Picture::
174 * Adding Attachments::
175 * Sending PGP::
176 * Checking Recipients::
177 * Sending Message::
178 * Killing Draft::
179
180 Odds and Ends
181
182 * Bug Reports::
183 * Mailing Lists::
184 * MH FAQ and Support::
185 * Getting MH-E::
186
187 History of MH-E
188
189 * From Brian Reid::
190 * From Jim Larus::
191 * From Stephen Gildea::
192 * From Bill Wohler::
193
194 @end detailmenu
195 @end menu
196
197 @html
198 -->
199 @end html
200
201 @node Preface, Conventions, Top, Top
202 @unnumbered Preface
203
204 @cindex Emacs
205 @cindex Unix commands, Emacs
206 @cindex preface
207
208 This manual introduces another interface to the MH mail system that is
209 accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is
210 easy to use. I don't assume that you know GNU Emacs or even MH at this
211 point, since I didn't know either of them when I discovered MH-E.
212 However, MH-E was the tip of the iceberg, and I discovered more and
213 more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of
214 them.
215
216 The MH-E package is distributed with GNU Emacs@footnote{Version
217 @value{VERSION} of MH-E will appear in GNU Emacs 22.1. It is supported
218 in GNU Emacs 21, as well as XEmacs 21 (except for versions
219 21.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher,
220 all versions of nmh, and GNU mailutils 0.4 and higher.}, so you
221 shouldn't have to do anything special to use it. This manual covers
222 MH-E version @value{VERSION}. To help you decide which version you
223 have, see @ref{Getting Started}.
224
225 @findex help-with-tutorial
226 @kindex C-h t
227
228 If you don't already use GNU Emacs but want to learn more, you can
229 read an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
230 (@code{help-with-tutorial}). (To learn about this notation, see
231 @ref{Conventions}.) If you want to take the plunge, consult the
232 @iftex
233 @cite{GNU Emacs Manual},
234 @end iftex
235 @ifinfo
236 @ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual},
237 @end ifinfo
238 @ifhtml
239 @uref{http://www.gnu.org/software/emacs/manual/html_node/,
240 @cite{GNU Emacs Manual}},
241 @end ifhtml
242 from the Free Software Foundation.
243
244 If more information is needed, you can go to the Unix manual pages of
245 the individual MH commands. When the name is not obvious, I'll guide
246 you to a relevant MH manual page that describes the action more fully.
247
248 @cindex info
249 @kindex C-h i
250
251 This manual is available in both Info and online formats. The Info
252 version is distributed with Emacs and can be accessed with the
253 @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i
254 m mh-e @key{RET}}). The online version is available at
255 @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great
256 online resource is the book @uref{http://www.ics.uci.edu/~mh/book/,
257 @cite{MH & nmh: Email for Users & Programmers}} (also known as
258 @dfn{the MH book}).
259
260 I hope you enjoy this manual! If you have any comments, or suggestions
261 for this document, please let me know.
262
263 @cindex Bill Wohler
264 @cindex Wohler, Bill
265
266 @noindent
267 Bill Wohler <@i{wohler at newt.com}>@*
268 8 February 1995@*
269 24 February 2006
270
271 @node Conventions, Getting Started, Preface, Top
272 @chapter GNU Emacs Terms and Conventions
273
274 @cindex Emacs
275 @cindex Emacs, conventions
276 @cindex Emacs, terms
277 @cindex Unix commands, Emacs
278 @cindex conventions, Emacs
279 @cindex terms, Emacs
280
281 If you're an experienced Emacs user, you can skip the following
282 conventions and definition of terms and go directly to the next
283 section (@pxref{Getting Started}).
284
285 @cindex Emacs commands
286 @cindex MH commands
287 @cindex Unix commands
288 @cindex commands
289 @cindex commands, MH
290 @cindex commands, Unix
291 @cindex commands, shell
292 @cindex functions
293 @cindex shell commands
294
295 In general, @dfn{functions} in this text refer to Emacs Lisp functions
296 that one would call from within Emacs Lisp programs (for example,
297 @code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those
298 things that are run by the user, such as @kbd{i} or @kbd{M-x
299 mh-inc-folder}. Programs outside of Emacs are specifically called MH
300 commands, shell commands, or Unix commands.
301
302 @cindex conventions, key names
303 @cindex key names
304
305 The conventions for key names are as follows:
306
307 @table @kbd
308 @item C-x
309 Hold down the @key{CTRL} (Control) key and press the @kbd{x} key.
310 @c -------------------------
311 @item M-x
312 Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key.
313
314 Since some keyboards don't have a @key{META} key, you can generate
315 @kbd{M-x}, for example, by pressing @key{ESC} (Escape),
316 @emph{releasing it}, and then pressing the @kbd{x} key.
317 @c -------------------------
318 @item @key{RET}
319 Press the @key{RETURN} or @key{ENTER} key. This is normally used to
320 complete a command.
321 @c -------------------------
322 @item @key{SPC}
323 Press the space bar.
324 @c -------------------------
325 @item @key{TAB}
326 Press the @key{TAB} key.
327 @c -------------------------
328 @item @key{DEL}
329 Press the @key{DELETE} key.
330 @c -------------------------
331 @item @key{BS}
332 Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or
333 earlier of Emacs, you will need to use the @key{DEL} key.}.
334 @end table
335
336 @cindex Emacs, prefix argument
337 @cindex prefix argument
338 @kindex C-u
339
340 A @dfn{prefix argument} allows you to pass an argument to any Emacs
341 function. To pass an argument, type @kbd{C-u} before the Emacs command
342 or keystroke. Numeric arguments can be passed as well. For example, to
343 insert five f's, use @kbd{C-u 5 f}. There is a default of four when
344 using @kbd{C-u}, and you can use multiple prefix arguments to provide
345 arguments of powers of four. To continue our example, you could insert
346 four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with
347 @kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative
348 arguments can also be inserted with the @key{META} key. Examples
349 include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which
350 specifies a negative argument with no particular value.
351
352 @sp 1
353 @center @strong{NOTE}
354
355 @quotation
356 The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder
357 mode (@pxref{Reading Mail Tour}). In this mode, simply enter the
358 numerical argument before entering the command.
359 @end quotation
360 @sp 1
361
362 @cindex @file{.emacs}
363 @cindex Emacs, variables
364 @cindex files, @file{.emacs}
365 @cindex variables
366 @findex setq
367
368 Emacs uses @dfn{variables} to hold values. These can be changed via
369 calls to the function @code{setq} in @file{~/.emacs}.
370
371 @cindex Emacs, options
372 @cindex options
373 @findex customize-group
374 @findex customize-option
375
376 Variables in MH-E that are normally modified by the user are called
377 @dfn{options} and are modified through the customize functions (such
378 as @kbd{M-x customize-option} or @kbd{M-x customize-group}).
379 @ifnothtml
380 @xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
381 GNU Emacs Manual}.
382 @end ifnothtml
383 @ifhtml
384 See section
385 @uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html,
386 Easy Customization} in @cite{The GNU Emacs Manual}.
387 @end ifhtml
388 @xref{Options}.
389
390 @cindex Emacs, faces
391 @cindex faces
392 @cindex highlighting
393 @findex customize-face
394
395 You can specify various styles for displaying text using @dfn{faces}.
396 MH-E provides a set of faces that you can use to personalize the look
397 of your MH-E buffers. Use the command @kbd{M-x customize-face} to do
398 this.
399 @ifnothtml
400 @xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
401 GNU Emacs Manual}.
402 @end ifnothtml
403 @ifhtml
404 See section
405 @uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html,
406 Face Customization} in @cite{The GNU Emacs Manual}.
407 @end ifhtml
408
409 @cindex abnormal hooks
410 @cindex hooks
411 @cindex normal hooks
412 @findex add-hook
413 @findex customize-option
414
415 Commands often offer @dfn{hooks} which enable you to extend or modify
416 the way a command works.
417 @ifnothtml
418 @ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU
419 Emacs Manual}
420 @end ifnothtml
421 @ifhtml
422 See section
423 @uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html,
424 Hooks} in @cite{The GNU Emacs Manual}
425 @end ifhtml
426 for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
427 MH-E uses normal hooks in nearly all cases, so you can assume that we
428 are talking about normal hooks unless we explicitly mention that a
429 hook is abnormal. We also follow the conventions described in that
430 section: the name of the abnormal hooks end in @code{-hooks} and all
431 the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
432 either @code{customize-option} or @code{add-hook}.
433
434 @cindex Emacs, mark
435 @cindex Emacs, point
436 @cindex Emacs, region
437 @cindex mark
438 @cindex point
439 @cindex region
440 @kindex C-@@
441 @kindex C-@key{SPC}
442
443 There are several other terms that are used in Emacs that you should
444 know. The @dfn{point} is where the cursor currently is. You can save
445 your current place in the file by setting a @dfn{mark}. This operation
446 is useful in several ways. The mark can be later used when defining a
447 @dfn{region}, which is the text between the point and mark. Many
448 commands operate on regions, such as those for deleting text or
449 filling paragraphs. A mark can be set with @kbd{C-@@} (or
450 @kbd{C-@key{SPC}}).
451
452 @cindex completion
453 @cindex Emacs, completion
454 @cindex Emacs, file completion
455 @cindex Emacs, folder completion
456 @cindex Emacs, minibuffer
457 @cindex file completion
458 @cindex folder completion
459 @cindex minibuffer
460 @kindex SPC
461 @kindex TAB
462
463 The @dfn{minibuffer} is the bottom line of the Emacs window, where all
464 prompting and multiple-character input is directed. You can use
465 @dfn{completion} to enter values such as folders. Completion means
466 that Emacs fills in text for you when you type @key{SPC} or @key{TAB}.
467 A second @key{SPC} or @key{TAB} will list all possibilities at that
468 point.
469 @ifnothtml
470 @xref{Completion, , Completion, emacs, The GNU Emacs Manual}.
471 @end ifnothtml
472 @ifhtml
473 See the section
474 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
475 Completion} in @cite{The GNU Emacs Manual}.
476 @end ifhtml
477 Note that @key{SPC} cannot be used for completing filenames and
478 folders.
479
480 @findex help-with-tutorial
481 @kindex C-h t
482 @kindex M-x
483
484 The minibuffer is also where you enter Emacs function names after
485 typing @kbd{M-x}. For example, in the preface, I mentioned that you
486 could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What
487 this means is that you can get a tutorial by typing either @kbd{C-h t}
488 or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted
489 for @samp{help-with-tutorial} in the minibuffer after typing
490 @kbd{M-x}.
491
492 @cindex ~
493
494 The @samp{~} notation in filenames represents your home directory.
495 This notation is used by many shells including @command{bash},
496 @code{tcsh}, and @command{csh}. It is analogous to the environment
497 variable @samp{$HOME}. For example, @file{~/.emacs} can be written
498 @file{$HOME/.emacs} or using the absolute path as in
499 @file{/home/wohler/.emacs} instead.
500
501 @cindex Emacs, interrupting
502 @cindex Emacs, quitting
503 @cindex interrupting
504 @cindex quitting
505
506 @i{In case of trouble:} Emacs can be interrupted at any time with
507 @kbd{C-g}. For example, if you've started a command that requests that
508 you enter something in the minibuffer, but then you change your mind,
509 type @kbd{C-g} and you'll be back where you started. If you want to
510 exit Emacs entirely, use @kbd{C-x C-c}.
511
512 @node Getting Started, Tour Through MH-E, Conventions, Top
513 @chapter Getting Started
514
515 @cindex MH-E, versions
516 @cindex history
517 @cindex versions of MH-E
518
519 Because there are many old versions of MH-E out there, it is important
520 to know which version you have. I'll be talking about @w{Version 8}
521 which is pretty close to @w{Version 6} and @w{Version 7}. It differs
522 from @w{Version 4} and @w{Version 5} and is vastly different from
523 @w{Version 3}. @xref{History}.
524
525 @findex mh-version
526
527 To determine which version of MH-E that you have, enter @kbd{M-x
528 mh-version @key{RET}}. Hopefully it says that you're running
529 @w{Version @value{VERSION}} which is the latest version as of this
530 printing.
531
532 If your version is much older than this, please consider upgrading.
533 You can have your system administrator upgrade the system-wide
534 version, or you can install your own personal version. It's really
535 quite easy. @xref{Getting MH-E}, for instructions for getting and
536 installing MH-E.
537
538 If the @code{mh-version} command displays @samp{No MH variant
539 detected}, then you need to install MH or tell MH-E where to find
540 MH@footnote{In very old versions of MH-E, you may get the error
541 message, @samp{Cannot find the commands `inc' and `mhl' and the file
542 `components'} if MH-E can't find MH. In this case, you need to update
543 MH-E, and you may need to install MH too. However, newer versions of
544 MH-E are better at finding MH if it is on your system.}.
545
546 @cindex @command{mhparam}
547 @cindex MH commands, @command{mhparam}
548 @vindex exec-path
549 @vindex mh-path
550 @vindex mh-sys-path
551 @vindex mh-variant
552 @vindex mh-variant-in-use
553
554 The option @code{mh-variant} specifies the variant used by MH-E
555 (@pxref{Options}). The default setting of this option is
556 @samp{Auto-detect} which means that MH-E will automatically choose the
557 first of nmh, MH, or GNU mailutils that it finds in the directories
558 listed in @code{mh-path} (which you can customize),
559 @code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at
560 all, you may have to customize @code{mh-path} and add the directory in
561 which the command @command{mhparam} is located. If, on the other hand,
562 you have both nmh and mailutils installed (for example) and
563 @code{mh-variant-in-use} was initialized to nmh but you want to use
564 mailutils, then you can set @code{mh-variant} to @samp{mailutils}.
565
566 @vindex mh-flists-present-flag
567 @vindex mh-lib
568 @vindex mh-lib-progs
569 @vindex mh-progs
570
571 When @code{mh-variant} is changed, MH-E resets @code{mh-progs},
572 @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and
573 @code{mh-variant-in-use} accordingly.
574
575 @cindex @file{.emacs}
576 @cindex files, @file{.emacs}
577
578 @sp 1
579 @center @strong{NOTE}
580
581 @quotation
582 Prior to version 8, it was often necessary to set some of these
583 variables in @file{~/.emacs}; now it is no longer necessary and can
584 actually cause problems.
585 @end quotation
586 @sp 1
587
588 @cindex @command{install-mh}
589 @cindex MH commands, @command{install-mh}
590
591 If you've never run MH before, you need to run @command{install-mh}
592 from the shell before you continue. This sets up your personal MH
593 environment@footnote{See the section
594 @uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
595 MH book.}. If you don't, you'll be greeted with the error message:
596 @samp{Install MH and run install-mh before running MH-E}.
597
598 @cindex @samp{Path:} MH profile component
599 @cindex MH profile
600 @cindex MH profile component
601 @cindex MH profile component, @samp{Path:}
602
603 Your MH environment includes your @dfn{MH profile} which is found in
604 the file @file{~/.mh_profile}. This file contains a number of @dfn{MH
605 profile components}. For example, the @samp{Path:} MH profile
606 component contains the path to your mail directory, which is
607 @file{~/Mail} by default.
608
609 @cindex MH profile component, @samp{Draft-Folder:}
610 @cindex MH profile component, @samp{Path:}
611 @cindex MH profile component, @samp{Previous-Sequence:}
612 @cindex MH profile component, @samp{Unseen-Sequence:}
613 @cindex @samp{Draft-Folder:} MH profile component
614 @cindex @samp{Path:} MH profile component
615 @cindex @samp{Previous-Sequence:} MH profile component
616 @cindex @samp{Unseen-Sequence:} MH profile component
617 @findex mh-find-path
618 @vindex mh-draft-folder
619 @vindex mh-find-path-hook
620 @vindex mh-inbox
621 @vindex mh-previous-seq
622 @vindex mh-unseen-seq
623 @vindex mh-user-path
624
625 In addition to setting variables that point to MH itself, MH-E also
626 sets a handful of variables that point to where you keep your mail.
627 During initialization, the function @code{mh-find-path} sets
628 @code{mh-user-path} from your @samp{Path:} MH profile component (but
629 defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder}
630 from @samp{Draft-Folder:}, @code{mh-unseen-seq} from
631 @samp{Unseen-Sequence:}, @code{mh-previous-seq} from
632 @samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:}
633 (defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run
634 after these variables have been set. This hook can be used the change
635 the value of these variables if you need to run with different values
636 between MH and MH-E.
637
638 @node Tour Through MH-E, Using This Manual, Getting Started, Top
639 @chapter Tour Through MH-E
640
641 @cindex introduction
642 @cindex tour
643 @cindex tutorial
644
645 This chapter introduces some of the terms you'll need to know and then
646 takes you on a tour of MH-E@footnote{The keys mentioned in these
647 chapters refer to the default key bindings. If you've changed the
648 bindings, refer to the command summaries at the beginning of each
649 chapter for a mapping between default key bindings and function
650 names.}. When you're done, you'll be able to send, read, and file
651 mail, which is all that a lot of people ever do. But if you're the
652 curious or adventurous type, read the rest of the manual to be able to
653 use all the features of MH-E. I suggest you read this chapter first to
654 get the big picture, and then you can read the manual as you wish.
655
656 @menu
657 * Sending Mail Tour::
658 * Reading Mail Tour::
659 * Processing Mail Tour::
660 * Leaving MH-E::
661 * More About MH-E::
662 @end menu
663
664 @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E
665 @section Sending Mail
666
667 @cindex MH-Letter mode
668 @cindex mode
669 @cindex modes, MH-Letter
670 @cindex sending mail
671 @findex mh-smail
672 @kindex M-x mh-smail
673
674 Let's start our tour by sending ourselves a message which we can later
675 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
676 to send messages. Your message appears in an Emacs buffer whose
677 mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a
678 particular type of text.} is MH-Letter.
679
680 Enter your login name in the @samp{To:} header field. Press the
681 @key{TAB} twice to move the cursor past the @samp{Cc:} field, since no
682 carbon copies are to be sent, and on to the @samp{Subject:} field.
683 Enter @kbd{Test} or anything else that comes to mind.
684
685 Press @key{TAB} again to move the cursor to the body of the message.
686 Enter some text, using normal Emacs commands. You should now have
687 something like this@footnote{If you're running Emacs under the X
688 Window System, then you would also see a menu bar and a tool bar. I've
689 left out the menu bar and tool bar in all of the example screens.}:
690
691 @cartouche
692 @smallexample
693
694
695
696
697
698
699 --:-- *scratch* All L1 (Lisp Interaction)-------------------------
700 To: wohler
701 cc:
702 Subject: Test
703 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
704 --------
705 This is a test message to get the wheels churning...#
706
707
708 --:** @{draft@} All L5 (MH-Letter)----------------------------------
709 Type C-c C-c to send message, C-C ? for help
710 @end smallexample
711 @end cartouche
712 @i{MH-E message composition window}
713
714 Note the line of dashes that separates the header and the body of the
715 message. It is essential that these dashes (or a blank line) are
716 present or the body of your message will be considered to be part of
717 the header.
718
719 @cindex help
720 @findex describe-mode
721 @kindex C-c ?
722 @kindex C-c C-c
723 @kindex C-h m
724
725 There are several commands specific to MH-Letter mode@footnote{You can
726 get quick help for the commands used most often with @kbd{C-c ?} or
727 more complete help with the @kbd{C-h m} (@code{describe-mode})
728 command.}, but at this time we'll only use @kbd{C-c C-c} to send your
729 message. Type @kbd{C-c C-c} now. That's all there is to it!
730
731 @node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E
732 @section Receiving Mail
733
734 @cindex @command{inc}
735 @cindex @command{scan}
736 @cindex MH commands, @command{inc}
737 @cindex MH commands, @command{scan}
738 @cindex MH-Folder mode
739 @cindex modes, MH-Folder
740 @cindex reading mail
741 @findex mh-rmail
742 @kindex M-x mh-rmail
743
744 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
745 This incorporates the new mail and puts the output from
746 @command{inc}@footnote{See the section
747 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
748 prev} in the MH book.} (called @dfn{scan lines} after the MH program
749 @command{scan}@footnote{See the section
750 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
751 pick Ranges Sequences} in the MH book.} which prints a one-line
752 summary of each message) into a buffer called @samp{+inbox} whose
753 major mode is MH-Folder.
754
755 @findex mh-rmail
756 @kindex F r
757 @kindex M-x mh-rmail
758
759 @sp 1
760 @center @strong{NOTE}
761
762 @quotation
763
764 The @kbd{M-x mh-rmail} command will show you only new mail, not mail
765 you have already read. If you were to run this tour again, you would
766 use @kbd{F r} to pull all your messages into MH-E.
767 @end quotation
768 @sp 1
769
770 @kindex @key{RET}
771 @kindex n
772 @kindex p
773
774 You should see the scan line for your message, and perhaps others. Use
775 @kbd{n} or @kbd{p} to move the cursor to your test message and type
776 @key{RET} to read your message. You should see something like:
777
778 @cartouche
779 @smallexample
780 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
781 # 4+t08/24 To:wohler Test<<This is a test message to get the wheels
782
783 -:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------
784 To: wohler
785 Subject: Test
786 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
787 Date: Fri, 17 Mar 2006 10:49:11 -0800
788 From: Bill Wohler <wohler@@stop.mail-abuse.org>
789
790 This is a test message to get the wheels churning...
791
792
793
794 --:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
795
796 @end smallexample
797 @end cartouche
798 @i{After incorporating new messages}
799
800 @kindex @key{DEL}
801 @kindex @key{SPC}
802
803 If you typed a long message, you can view subsequent pages with
804 @key{SPC} and previous pages with @key{DEL}.
805
806 @node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E
807 @section Processing Mail
808
809 @cindex processing mail
810 @kindex @key{RET}
811 @kindex r
812
813 The first thing we want to do is reply to the message that we sent
814 ourselves. Ensure that the cursor is still on the same line as your
815 test message and type @kbd{r}. You are prompted in the minibuffer with
816 @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply
817 to the original sender only, to the sender and primary recipients, or
818 to the sender and all recipients. You can press @key{TAB} to see these
819 choices. If you simply press @key{RET}, you'll reply only to the
820 sender. Press @key{RET} now.
821
822 You'll find yourself in an Emacs buffer similar to that when you were
823 sending the original message, like this:
824
825 @cartouche
826 @smallexample
827 To:
828 cc:
829 Subject: Re: Test
830 In-reply-to: <31054.1142621351@@stop.mail-abuse.org>
831 References: <31054.1142621351@@stop.mail-abuse.org>
832 Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org>
833 message dated "Fri, 17 Mar 2006 10:49:11 -0800."
834 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
835 --------
836 #
837
838 --:-- @{draft@} All L10 (MH-Letter)----------------------------------
839 To: wohler
840 Subject: Test
841 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
842 Date: Fri, 17 Mar 2006 10:49:11 -0800
843 From: Bill Wohler <wohler@@stop.mail-abuse.org>
844
845 This is a test message to get the wheels churning...
846
847 --:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
848 Type C-c C-c to send message, C-c ? for help
849 @end smallexample
850 @end cartouche
851 @i{Composition window during reply}
852
853 @findex backward-char
854 @findex forward-char
855 @findex next-line
856 @findex previous-line
857 @kindex C-b
858 @kindex C-c C-c
859 @kindex C-c C-f C-t
860 @kindex C-f
861 @kindex C-n
862 @kindex C-p
863 @kindex @key{BS}
864
865 By default, MH will not add you to the address list of your replies,
866 so if you find that the @samp{To:} header field is missing, don't
867 worry. In this case, type @kbd{C-c C-f C-t} to create and go to the
868 @samp{To:} field, where you can type your login name again. You can
869 move around with the arrow keys or with @kbd{C-p}
870 (@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b}
871 (@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can
872 delete the previous character with @key{BS}. When you're finished
873 editing your message, send it with @kbd{C-c C-c} as before.
874
875 @cindex @command{refile}
876 @cindex MH commands, @command{refile}
877 @cindex folders
878 @kindex @key{SPC}
879 @kindex o
880
881 You'll often want to save messages that were sent to you in an
882 organized fashion. This is done with @dfn{folders}. You can use
883 folders to keep messages from your friends, or messages related to a
884 particular topic. With your cursor in the MH-Folder buffer and
885 positioned on the message you sent to yourself, type @kbd{o} to output
886 (@command{refile} in MH parlance) that message to a folder. Enter
887 @kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y}
888 (or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note
889 that a @samp{^} (caret) appears next to the message number, which
890 means that the message has been marked for refiling but has not yet
891 been refiled. We'll talk about how the refile is actually carried out
892 in a moment.
893
894 @cindex MH-Folder mode
895 @cindex modes, MH-Folder
896 @kindex d
897 @kindex i
898 @kindex @key{RET}
899 @kindex n
900 @kindex p
901 @kindex x
902
903 Your previous reply is now waiting in the system mailbox. You
904 incorporate this mail into your MH-Folder buffer named @samp{+inbox}
905 with the @kbd{i} command. Do this now. After the mail is incorporated,
906 use @kbd{n} or @kbd{p} to move the cursor to the new message, and read
907 it with @key{RET}. Let's delete this message by typing @kbd{d}. Note
908 that a @samp{D} appears next to the message number. This means that
909 the message is marked for deletion but is not yet deleted. To perform
910 the deletion (and the refile we did previously), use the @kbd{x}
911 command.
912
913 @findex mh-smail
914 @kindex m
915 @kindex M-x mh-smail
916
917 If you want to send another message you can use @kbd{m} instead of
918 @kbd{M-x mh-smail}. So go ahead, send some mail to your friends!
919
920 @cindex help
921 @cindex prefix characters
922 @findex describe-mode
923 @kindex ?
924 @kindex C-h m
925 @kindex F ?
926
927 You can get a quick reminder about these commands by typing @kbd{?}.
928 This lists several @dfn{prefix characters}. To list the commands
929 available via the prefix characters, type the prefix character
930 followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is
931 available with the @kbd{C-h m} (@code{describe-mode}) command.
932
933 @node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E
934 @section Leaving MH-E
935
936 @cindex Emacs, quitting
937 @cindex quitting
938 @kindex C-x C-c
939 @kindex x
940
941 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c}
942 to exit @command{emacs}. If you exited without running @kbd{x} in the
943 @samp{+inbox} buffer, Emacs will offer to save it for you. Type
944 @kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to
945 perform any refiles and deletes that you did there.
946
947 @findex mh-rmail
948 @kindex C-x b
949 @kindex C-x k
950 @kindex M-x mh-rmail
951 @kindex q
952
953 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
954 the MH-E folder or delete it entirely with @kbd{C-x k}. You can then
955 later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}.
956
957 @cindex @command{packf}
958 @cindex MH commands, @command{packf}
959 @cindex exporting folders
960 @cindex folders, exporting
961 @cindex mbox-style folder
962
963 On the other hand, if you no longer want to use MH and MH-E, you can
964 take your mail with you. You can copy all of your mail into a single
965 file, mbox-style, by using the MH command @command{packf}. For
966 example, to create a file called @file{msgbox} with the messages in
967 your @samp{+inbox} folder, use @samp{packf +inbox}. The
968 @command{packf} command will append the messages to the file if it
969 already exists, so you can use @samp{folders -recurse -fast} in a
970 script to copy all of your messages into a single file, or using the
971 @samp{-file} argument, a file for each folder.
972
973 @node More About MH-E, , Leaving MH-E, Tour Through MH-E
974 @section More About MH-E
975
976 These are the basic commands to get you going, but there are plenty
977 more. If you think that MH-E is for you, read the rest of the manual
978 to find out how you can:
979
980 @itemize @bullet
981 @item
982 Print your messages (@pxref{Printing}).
983 @c -------------------------
984 @item
985 Edit messages and include your signature (@pxref{Editing Drafts}).
986 @c -------------------------
987 @item
988 Forward messages (@pxref{Forwarding}).
989 @c -------------------------
990 @item
991 Read digests (@pxref{Digests}).
992 @c -------------------------
993 @item
994 Edit bounced messages (@pxref{Editing Again}).
995 @c -------------------------
996 @item
997 Send multimedia messages (@pxref{Adding Attachments}).
998 @c -------------------------
999 @item
1000 Read HTML messages (@pxref{HTML}).
1001 @c -------------------------
1002 @item
1003 Use aliases and identities (see @ref{Aliases}, @pxref{Identities}).
1004 @c -------------------------
1005 @item
1006 Create different views of your mail (see @ref{Threading}, @pxref{Limits}).
1007 @c -------------------------
1008 @item
1009 Deal with junk mail (@pxref{Junk}).
1010 @c -------------------------
1011 @item
1012 Handle signed and encrypted messages (see @ref{Reading PGP},
1013 @pxref{Sending PGP}).
1014 @c -------------------------
1015 @item
1016 Process mail that was sent with @command{shar} or @command{uuencode}
1017 (@pxref{Files and Pipes}).
1018 @c -------------------------
1019 @item
1020 Use sequences conveniently (@pxref{Sequences}).
1021 @c -------------------------
1022 @item
1023 Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool
1024 Bar}, @pxref{Menu Bar}).
1025 @c -------------------------
1026 @item
1027 Show header fields in different fonts (@pxref{Reading Mail}).
1028 @c -------------------------
1029 @item
1030 Find previously refiled messages (@pxref{Searching}).
1031 @c -------------------------
1032 @item
1033 Place messages in a file (@pxref{Files and Pipes}).
1034 @end itemize
1035
1036 Remember that you can also use MH commands when you're not running
1037 MH-E (and when you are!).
1038
1039 @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top
1040 @chapter Using This Manual
1041
1042 This chapter begins the meat of the manual which goes into more detail
1043 about every MH-E command and option.
1044
1045 @cindex Emacs, info
1046 @cindex Emacs, online help
1047 @cindex info
1048 @cindex online help
1049 @findex describe-mode
1050 @findex mh-help
1051 @kindex ?
1052 @kindex C-c ?
1053 @kindex C-h C-h
1054 @kindex C-h C-k i
1055 @kindex C-h i
1056 @kindex C-h m
1057
1058 There are many commands, but don't get intimidated. There are command
1059 summaries at the beginning of each chapter. In case you have or would
1060 like to rebind the keys, the command summaries also list the
1061 associated Emacs Lisp function. Furthermore, even if you're stranded
1062 on a desert island with a laptop and are without your manuals, you can
1063 get a summary of all these commands with GNU Emacs online help: use
1064 @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands,
1065 @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This
1066 help appears in a buffer called @samp{*MH-E Help*}
1067 (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h
1068 i} to read this manual via Info. The online help is quite good; try
1069 running @kbd{C-h C-h}. This brings up a list of available help topics,
1070 one of which displays the documentation for a given key (like @kbd{C-h
1071 k C-n}). Another useful help feature is to view the manual section
1072 that describes a given key (such as @kbd{C-h C-k i}). In addition,
1073 review @ref{Conventions}, if any of the GNU Emacs conventions are
1074 strange to you.
1075
1076 In addition to all of the commands, it is also possible to reconfigure
1077 MH-E to fit the needs of even the most demanding user. The following
1078 chapters also describe all of the options, show the defaults, and make
1079 recommendations for customization.
1080
1081 However, when customizing your mail environment, first try to change
1082 what you want in MH, and only change MH-E if changing MH is not
1083 possible. That way you will get the same behavior inside and outside
1084 GNU Emacs. Note that MH-E does not provide hooks for customizations
1085 that can be done in MH; this omission is intentional.
1086
1087 @cindex Emacs Lisp Manual
1088 @cindex Emacs, Emacs Lisp Manual
1089 @cindex Emacs, info
1090 @cindex Emacs, online help
1091 @cindex info
1092 @cindex online help
1093
1094 I hope I've included enough examples here to get you well on your way.
1095 If you want to explore Emacs Lisp further, a programming manual does
1096 exist,
1097 @c Yes, some of the stuff in the following sections is redundant, but
1098 @c TeX barfs if the @ifs are inside the @footnote.
1099 @iftex
1100 @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
1101 online in the Info system by typing @kbd{C-h i m Emacs Lisp
1102 @key{RET}}. It is also available online at @*
1103 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1104 can also order a printed manual, which has the desirable side-effect
1105 of helping to support the Free Software Foundation which made all this
1106 great software available. You can find an order form by running
1107 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1108 gnu.org}.}
1109 @end iftex
1110 @ifinfo
1111 @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU
1112 Emacs Lisp Reference Manual}, which may be available online in the
1113 Info system. It is also available online at
1114 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1115 can also order a printed manual, which has the desirable side-effect
1116 of helping to support the Free Software Foundation which made all this
1117 great software available. You can find an order form by running
1118 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1119 gnu.org}.}
1120 @end ifinfo
1121 @ifhtml
1122 @footnote{The
1123 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/,
1124 The GNU Emacs Lisp Reference Manual} may also be available online in
1125 the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can
1126 also order a printed manual, which has the desirable side-effect of
1127 helping to support the Free Software Foundation which made all this
1128 great software available. You can find an order form by running
1129 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1130 gnu.org}.}
1131 @end ifhtml
1132 and you can look at the code itself for examples. Look in the Emacs
1133 Lisp directory on your system (such as
1134 @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
1135 files there. When calling MH-E and other Emacs Lisp functions directly
1136 from Emacs Lisp code, you'll need to know the correct arguments. Use
1137 the online help for this. For example, try @kbd{C-h f
1138 mh-execute-commands @key{RET}}. If you write your own functions,
1139 please do not prefix your symbols (variables and functions) with
1140 @samp{mh-}. This prefix is reserved for the MH-E package. To avoid
1141 conflicts with existing MH-E symbols, use a prefix like @samp{my-} or
1142 your initials.
1143
1144 @menu
1145 * Options::
1146 * Ranges::
1147 * Folder Selection::
1148 @end menu
1149
1150 @node Options, Ranges, Using This Manual, Using This Manual
1151 @section Options
1152
1153 @cindex Emacs, customizing
1154 @cindex Emacs, setting options
1155 @cindex customizing MH-E
1156 @cindex setting options
1157 @findex customize-option
1158 @vindex mh-lpr-command-format, example
1159
1160 Many string or integer options are easy to modify using @kbd{M-x
1161 customize-option}. For example, to modify the option that controls
1162 printing, you would run @kbd{M-x customize-option @key{RET}
1163 mh-lpr-command-format @key{RET}}. In the buffer that appears, modify
1164 the string to the right of the variable. For example, you may change
1165 the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then
1166 use the @samp{State} combo box and select @samp{Save for Future
1167 Sessions}. To read more about @code{mh-lpr-command-format}, see
1168 @ref{Printing}.
1169
1170 @cindex nil
1171 @cindex off, option
1172 @cindex on, option
1173 @cindex option, turning on and off
1174 @cindex t
1175 @findex customize-option
1176 @vindex mh-bury-show-buffer-flag, example
1177
1178 Options can also hold boolean values. In Emacs Lisp, the boolean
1179 values are @code{nil}, which means false, and @code{t}, which means
1180 true. The @code{customize-option} function makes it easy to change
1181 boolean values; simply click on the toggle button in the customize
1182 buffer to switch between @samp{on} (@code{t}) and @samp{off}
1183 (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag}
1184 to @samp{off} to keep the MH-Show buffer at the top of the buffer
1185 stack. Use the @samp{State} combo box and choose @samp{Set for Current
1186 Session} to see how the option affects the show buffer. Then choose
1187 the @samp{Erase Customization} menu item to reset the option to the
1188 default, which places the MH-Show buffer at the bottom of the buffer
1189 stack.
1190
1191 @vindex mh-mhl-format-file, example
1192
1193 The text usually says to turn on an option by setting it to a
1194 @emph{non-@code{nil}} value, because sometimes values other than
1195 @samp{on} are meaningful. An example of this is the variable
1196 @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as
1197 hooks, involve a little more Emacs Lisp programming expertise.
1198
1199 @cindex customization group, @samp{mh}
1200 @cindex @samp{mh} customization group
1201 @findex customize-group
1202 @findex mh-customize
1203
1204 You can browse all of the MH-E options with the @code{customize-group}
1205 function. Try entering @kbd{M-x customize-group @key{RET} mh
1206 @key{RET}} to view the top-level options as well as buttons for all of
1207 the MH-E customization groups. Another way to view the MH-E
1208 customization group is to use @kbd{M-x mh-customize @key{RET}}.
1209
1210 @node Ranges, Folder Selection, Options, Using This Manual
1211 @section Ranges
1212
1213 @c Sync with mh-folder-mode docstring.
1214
1215 @cindex message abbreviations
1216 @cindex message ranges
1217 @cindex ranges
1218
1219 Many commands that operate on individual messages, such as
1220 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE}
1221 argument. This argument can be used in several ways.
1222
1223 @kindex C-u, with ranges
1224
1225 If you provide the prefix argument @kbd{C-u} to these commands, then
1226 you will be prompted for the message range. This can be any valid MH
1227 range which can include messages, sequences (@pxref{Sequences}), and
1228 the abbreviations (described in the @command{mh}(1) man page):
1229
1230 @table @samp
1231 @item <num1>-<num2>
1232 Indicates all messages in the range <num1> to <num2>, inclusive. The
1233 range must be nonempty.
1234 @c -------------------------
1235 @item <num>:N
1236 @item <num>:+N
1237 @itemx <num>:-N
1238 Up to N messages beginning with (or ending with) message num. Num may
1239 be any of the predefined symbols: first, prev, cur, next or last.
1240 @c -------------------------
1241 @item first:N
1242 @itemx prev:N
1243 @itemx next:N
1244 @itemx last:N
1245 The first, previous, next or last messages, if they exist.
1246 @c -------------------------
1247 @item all
1248 All of the messages.
1249 @end table
1250
1251 For example, a range that shows all of these things is @samp{1 2 3
1252 5-10 last:5 unseen}.
1253
1254 @vindex transient-mark-mode
1255
1256 If the option @code{transient-mark-mode} is turned on and you set a
1257 region in the MH-Folder buffer, then the MH-E command will perform the
1258 operation on all messages in that region.
1259
1260 @cindex @samp{mh-range} customization group
1261 @cindex customization group, @samp{mh-range}
1262
1263 The @samp{mh-range} customization group contains a single option which
1264 affects how ranges are interpreted.
1265
1266 @vtable @code
1267 @item mh-interpret-number-as-range-flag
1268 On means interpret a number as a range (default: @samp{on}).
1269 @end vtable
1270
1271 @vindex mh-interpret-number-as-range-flag
1272
1273 Since one of the most frequent ranges used is @samp{last:N}, MH-E will
1274 interpret input such as @samp{200} as @samp{last:200} if the
1275 @code{mh-interpret-number-as-range-flag} option is on (which is the
1276 default). If you need to scan just the message 200, then use the range
1277 @samp{200:1} or @samp{200-200}.
1278
1279 @node Folder Selection, , Ranges, Using This Manual
1280 @section Folder Selection
1281
1282 @cindex completion, folders
1283 @cindex folders, completion
1284 @cindex folders, selecting
1285
1286 When you choose a folder in MH-E via a command such as @kbd{o}
1287 (@code{mh-refile-msg}), completion is used to enter the folder
1288 @ifnothtml
1289 (@pxref{Completion, , , emacs, The GNU Emacs Manual}).
1290 @end ifnothtml
1291 @ifhtml
1292 (see the section
1293 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
1294 Completion} in @cite{The GNU Emacs Manual}).
1295 @end ifhtml
1296 In addition, MH-E has several ways of choosing a suitable default so
1297 that the folder can often be selected with a single @key{RET} key.
1298
1299 @cindex customization group, @samp{mh-folder-selection}
1300 @cindex @samp{mh-folder-selection} customization group
1301
1302 The @samp{mh-folder-selection} customization group contains some
1303 options which are used to help with this.
1304
1305 @vtable @code
1306 @item mh-default-folder-for-message-function
1307 Function to select a default folder for refiling or @samp{Fcc:}
1308 (default: @code{nil}).
1309 @c -------------------------
1310 @item mh-default-folder-list
1311 List of addresses and folders (default: @code{nil}).
1312 @c -------------------------
1313 @item mh-default-folder-must-exist-flag
1314 On means guessed folder name must exist to be used (default:
1315 @samp{on}).
1316 @c -------------------------
1317 @item mh-default-folder-prefix
1318 Prefix used for folder names generated from aliases (default: @code{""}).
1319 @end vtable
1320
1321 @vindex mh-default-folder-for-message-function
1322
1323 You can set the option @code{mh-default-folder-for-message-function}
1324 to a function that provides a default folder for the message to be
1325 refiled. When this function is called, the current buffer contains the
1326 message being refiled and point is at the start of the message. This
1327 function should return the default folder as a string with a leading
1328 @samp{+} sign. It can also return @code{nil} so that the last folder
1329 name is used as the default, or an empty string to suppress the
1330 default entirely.
1331
1332 Otherwise, the name of the destination folder is derived from the
1333 sender as follows:
1334
1335 @enumerate
1336 @vindex mh-default-folder-list
1337 @item
1338 The folder name associated with the first address found in the list
1339 @code{mh-default-folder-list} is used. Each element in this list
1340 contains a @samp{Check Recipient} item. If this item is turned on,
1341 then the address is checked against the recipient instead of the
1342 sender. This is useful for mailing lists.
1343 @c -------------------------
1344 @vindex mh-default-folder-prefix
1345 @item
1346 An alias prefixed by @code{mh-default-folder-prefix} corresponding to
1347 the address is used. The prefix is used to prevent clutter in your
1348 mail directory. @xref{Aliases}.
1349 @end enumerate
1350
1351 @vindex mh-default-folder-must-exist-flag
1352
1353 If the derived folder does not exist, and
1354 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last
1355 folder name used is suggested. This is useful if you get mail from
1356 various people for whom you have an alias, but file them all in the
1357 same project folder.
1358
1359 @node Incorporating Mail, Reading Mail, Using This Manual, Top
1360 @chapter Incorporating Your Mail
1361
1362 @cindex @samp{Folder} menu
1363 @cindex incorporating
1364 @cindex menu, @samp{Folder}
1365
1366 This chapter talks about getting mail from your system mailbox into
1367 your MH @samp{+inbox} folder. The following command accomplishes that
1368 and is found in the @samp{Folder} menu.
1369
1370 @table @kbd
1371 @cindex @samp{Folder > Incorporate New Mail} menu item
1372 @cindex menu item, @samp{Folder > Incorporate New Mail}
1373 @findex mh-inc-folder
1374 @kindex i
1375 @item i
1376 Incorporate new mail into a folder (@code{mh-inc-folder}).
1377 @end table
1378
1379 @cindex @samp{mh-inc} customization group
1380 @cindex customization group, @samp{mh-inc}
1381
1382 The following options in the @samp{mh-inc} customization group are
1383 used.
1384
1385 @vtable @code
1386 @item mh-inc-prog
1387 Program to incorporate mail (default: @code{"inc"}).
1388 @c -------------------------
1389 @item mh-inc-spool-list
1390 Alternate spool files (default: @code{nil}).
1391 @end vtable
1392
1393 The following hook is available.
1394
1395 @vtable @code
1396 @findex mh-inc-folder
1397 @item mh-inc-folder-hook
1398 Hook run by @code{mh-inc-folder} after incorporating mail into a
1399 folder (default: @code{nil}).
1400 @end vtable
1401
1402 @cindex @samp{+inbox}
1403 @findex mh-inc-folder
1404 @kindex i
1405
1406 If at any time you receive new mail, incorporate the new mail into
1407 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note
1408 that @kbd{i} will display the @samp{+inbox} buffer, even if there
1409 isn't any new mail. You can incorporate mail from any file into the
1410 current folder by specifying a prefix argument; you'll be prompted for
1411 the name of the file to use as well as the destination folder (for
1412 example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}).
1413
1414 @cindex @file{.emacs}
1415 @cindex Emacs, notification of new mail
1416 @cindex files, @file{.emacs}
1417 @cindex new mail
1418 @cindex notification of new mail
1419
1420 Emacs can notify you when you have new mail by displaying @samp{Mail}
1421 in the mode line. To enable this behavior, and to have a clock in the
1422 mode line as well, add the following to @file{~/.emacs}:
1423
1424 @findex display-time
1425
1426 @smalllisp
1427 (display-time)
1428 @end smalllisp
1429
1430 @cindex @command{inc}
1431 @cindex incorporating
1432 @cindex MH commands, @command{inc}
1433 @vindex mh-inc-prog
1434 @vindex mh-progs
1435
1436 The name of the program that incorporates new mail is stored in
1437 @code{mh-inc-prog}; it is @code{"inc"} by default. This program
1438 generates a one-line summary for each of the new messages. Unless it
1439 is an absolute pathname, the file is assumed to be in the
1440 @code{mh-progs} directory (@pxref{Getting Started}). You may also link
1441 a file to @command{inc} that uses a different format (see
1442 @samp{mh-profile}(5), and sections
1443 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
1444 prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in
1445 the MH book). You'll then need to modify several variables
1446 appropriately (@pxref{Scan Line Formats}).
1447
1448 @vindex mh-inc-spool-list
1449
1450 You can use the @code{mh-inc-spool-list} variable to direct MH-E to
1451 retrieve mail from arbitrary spool files other than your system
1452 mailbox, file it in folders other than your @samp{+inbox}, and assign
1453 key bindings to incorporate this mail.
1454
1455 @cindex @command{procmail}
1456 @cindex @file{.procmailrc}
1457 @cindex Unix commands, @command{procmail}
1458 @cindex files, @file{.procmailrc}
1459
1460 Suppose you are subscribed to the @i{mh-e-devel} mailing list and you
1461 use @command{procmail} to filter this mail into @file{~/mail/mh-e}
1462 with the following recipe in @file{.procmailrc}:
1463
1464 @smallexample
1465 MAILDIR=$HOME/mail
1466 :0:
1467 * ^From mh-e-devel-admin@@stop.mail-abuse.org
1468 mh-e
1469 @end smallexample
1470
1471 @findex mh-inc-spool-*
1472 @kindex I *
1473
1474 In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an
1475 @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option,
1476 and click on the @samp{INS} button. Enter a @samp{Spool File} of
1477 @samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key
1478 Binding} of @samp{m}.
1479
1480 @cindex @command{emacsclient}
1481 @cindex @command{gnuclient}
1482 @cindex @command{xbuffy}
1483 @cindex @samp{gnuserv}
1484 @cindex Unix commands, @command{emacsclient}
1485 @cindex Unix commands, @command{gnuclient}
1486 @cindex Unix commands, @command{xbuffy}
1487
1488 You can use @command{xbuffy} to automate the incorporation of this
1489 mail using the Emacs 22 command @command{emacsclient} as follows:
1490
1491 @smallexample
1492 box ~/mail/mh-e
1493 title mh-e
1494 origMode
1495 polltime 10
1496 headertime 0
1497 command emacsclient --eval '(mh-inc-spool-mh-e)'
1498 @end smallexample
1499
1500 In XEmacs, the command @command{gnuclient} is used in a similar
1501 fashion.
1502
1503 @findex mh-inc-folder
1504 @kindex i
1505 @vindex mh-inc-folder-hook
1506
1507 You can set the hook @code{mh-inc-folder-hook}, which is called after
1508 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder})
1509 command. A good use of this hook is to rescan the whole folder either
1510 after running @kbd{M-x mh-rmail} the first time or when you've changed
1511 the message numbers from outside of MH-E.
1512
1513 @findex mh-execute-commands
1514 @findex mh-rescan-folder, example
1515 @findex mh-show, example
1516 @vindex mh-inc-folder-hook, example
1517
1518 @smalllisp
1519 @group
1520 (defun my-mh-inc-folder-hook ()
1521 "Hook to rescan folder after incorporating mail."
1522 (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,}
1523 (mh-execute-commands)) ; @r{carry them out}
1524 (mh-rescan-folder) ; @r{synchronize with +inbox}
1525 (mh-show)) ; @r{show the current message}
1526
1527 (add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook)
1528
1529 @i{Rescan folder after incorporating new mail via mh-inc-folder-hook}
1530
1531 @end group
1532 @end smalllisp
1533
1534 @node Reading Mail, Folders, Incorporating Mail, Top
1535 @chapter Reading Your Mail
1536
1537 @cindex @samp{+inbox}
1538 @cindex MH-Folder mode
1539 @cindex MH-Show mode
1540 @cindex modes, MH-Folder
1541 @cindex modes, MH-Show
1542 @cindex reading mail
1543 @findex mh-rmail
1544 @kindex M-x mh-rmail
1545 @kindex F r
1546 @kindex F v
1547
1548 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This
1549 command incorporates your mail and creates a buffer called
1550 @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows
1551 you only new mail, not mail you have already read@footnote{If you want
1552 to see your old mail as well, use @kbd{F r} to pull all your messages
1553 into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will
1554 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u
1555 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}.
1556
1557 @cindex @command{scan}
1558 @cindex @samp{Message} menu
1559 @cindex MH commands, @command{scan}
1560 @cindex menu, @samp{Message}
1561 @cindex scan lines
1562
1563 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line
1564 summaries of each incorporated message. You can perform most MH
1565 commands on these messages via one- or two-letter commands in either
1566 the MH-Folder or MH-Show buffers or by using the @samp{Message} menu.
1567 See @command{scan}(1) for a description of the contents of the scan
1568 lines, and see the Figure in @ref{Reading Mail Tour}, for an example.
1569
1570 @table @kbd
1571 @kindex ?
1572 @findex mh-help
1573 @item ?
1574 Display cheat sheet for the MH-E commands (@code{mh-help}).
1575 @c -------------------------
1576 @cindex @samp{Message > Show Message} menu item
1577 @cindex menu item, @samp{Message > Show Message}
1578 @kindex @key{RET}
1579 @findex mh-show
1580 @item @key{RET}
1581 Display message (@code{mh-show}).
1582 @c -------------------------
1583 @cindex @samp{Message > Show Message with Header} menu item
1584 @cindex menu item, @samp{Message > Show Message with Header}
1585 @kindex , (comma)
1586 @findex mh-header-display
1587 @item , (comma)
1588 Display message with all header fields (@code{mh-header-display}).
1589 @c -------------------------
1590 @kindex ; (semicolon)
1591 @findex mh-toggle-mh-decode-mime-flag
1592 @item ; (semicolon)
1593 Toggle the value of @code{mh-decode-mime-flag}
1594 (@code{mh-toggle-mh-decode-mime-flag}).
1595 @c -------------------------
1596 @kindex @key{SPC}
1597 @findex mh-page-msg
1598 @item @key{SPC}
1599 Display next page in message (@code{mh-page-msg}).
1600 @c -------------------------
1601 @kindex @key{BS}
1602 @findex mh-previous-page
1603 @item @key{BS}
1604 Display previous page in message (@code{mh-previous-page}).
1605 @c -------------------------
1606 @cindex @samp{Message > Write Message to File...} menu item
1607 @cindex menu item, @samp{Message > Write Message to File...}
1608 @kindex >
1609 @findex mh-write-msg-to-file
1610 @item >
1611 Append message to end of file (@code{mh-write-msg-to-file}).
1612 @c -------------------------
1613 @cindex @samp{Message > Pipe Message to Command...} menu item
1614 @cindex menu item, @samp{Message > Pipe Message to Command...}
1615 @kindex |
1616 @findex mh-pipe-msg
1617 @item |
1618 Pipe message through shell command (@code{mh-pipe-msg}).
1619 @c -------------------------
1620 @kindex C-d
1621 @findex mh-delete-msg-no-motion
1622 @item C-d
1623 Delete range, don't move to next message
1624 (@code{mh-delete-msg-no-motion}).
1625 @c -------------------------
1626 @cindex @samp{Message > Delete Message} menu item
1627 @cindex menu item, @samp{Message > Delete Message}
1628 @kindex d
1629 @findex mh-delete-msg
1630 @item d
1631 Delete range (@code{mh-delete-msg}).
1632 @c -------------------------
1633 @kindex D ?
1634 @findex mh-prefix-help
1635 @item D ?
1636 Display cheat sheet for the commands of the current prefix in
1637 minibuffer (@code{mh-prefix-help}).
1638 @c -------------------------
1639 @kindex D @key{SPC}
1640 @findex mh-page-digest
1641 @item D @key{SPC}
1642 Display next message in digest (@code{mh-page-digest}).
1643 @c -------------------------
1644 @kindex D @key{BS}
1645 @findex mh-page-digest-backwards
1646 @item D @key{BS}
1647 Display previous message in digest (@code{mh-page-digest-backwards}).
1648 @c -------------------------
1649 @cindex @samp{Message > Burst Digest Message} menu item
1650 @cindex menu item, @samp{Message > Burst Digest Message}
1651 @kindex D b
1652 @findex mh-burst-digest
1653 @item D b
1654 Break up digest into separate messages (@code{mh-burst-digest}).
1655 @c -------------------------
1656 @cindex @samp{Message > Go to Message by Number...} menu item
1657 @cindex menu item, @samp{Message > Go to Message by Number...}
1658 @kindex g
1659 @findex mh-goto-msg
1660 @item g
1661 Go to a message (@code{mh-goto-msg}).
1662 @c -------------------------
1663 @kindex k
1664 @findex mh-delete-subject-or-thread
1665 @item k
1666 Delete messages with same subject or thread
1667 (@code{mh-delete-subject-or-thread}).
1668 @c -------------------------
1669 @kindex K ?
1670 @findex mh-prefix-help
1671 @item K ?
1672 Display cheat sheet for the commands of the current prefix in
1673 minibuffer (@code{mh-prefix-help}).
1674 @c -------------------------
1675 @kindex K @key{TAB}
1676 @findex mh-next-button
1677 @item K @key{TAB}
1678 Go to the next button (@code{mh-next-button}).
1679 @c -------------------------
1680 @kindex K S-@key{TAB}
1681 @findex mh-prev-button
1682 @item K S-@key{TAB}
1683 Go to the previous button (@code{mh-prev-button}).
1684 @c -------------------------
1685 @kindex K a
1686 @findex mh-mime-save-parts
1687 @item K a
1688 Save attachments (@code{mh-mime-save-parts}).
1689 @c -------------------------
1690 @kindex K e
1691 @findex mh-display-with-external-viewer
1692 @item K e
1693 View attachment externally (@code{mh-display-with-external-viewer}).
1694 @c -------------------------
1695 @kindex K i
1696 @findex mh-folder-inline-mime-part
1697 @item K i
1698 Show attachment verbatim (@code{mh-folder-inline-mime-part}).
1699 @c -------------------------
1700 @kindex K o
1701 @findex mh-folder-save-mime-part
1702 @item K o
1703 Save (output) attachment (@code{mh-folder-save-mime-part}).
1704 @c -------------------------
1705 @kindex K t
1706 @findex mh-toggle-mime-buttons
1707 @item K t
1708 Toggle option @code{mh-display-buttons-for-inline-parts-flag}
1709 (@code{mh-toggle-mime-buttons}).
1710 @c -------------------------
1711 @kindex K v
1712 @findex mh-folder-toggle-mime-part
1713 @item K v
1714 View attachment (@code{mh-folder-toggle-mime-part}).
1715 @c -------------------------
1716 @cindex @samp{Message > Modify Message} menu item
1717 @cindex menu item, @samp{Message > Modify Message}
1718 @kindex M
1719 @findex mh-modify
1720 @item M
1721 Edit message (@code{mh-modify}).
1722 @c -------------------------
1723 @cindex @samp{Message > Go to First Message} menu item
1724 @cindex menu item, @samp{Message > Go to First Message}
1725 @kindex M-<
1726 @findex mh-first-msg
1727 @item M-<
1728 Display first message (@code{mh-first-msg}).
1729 @c -------------------------
1730 @cindex @samp{Message > Go to Last Message} menu item
1731 @cindex menu item, @samp{Message > Go to Last Message}
1732 @kindex M->
1733 @findex mh-last-msg
1734 @item M->
1735 Display last message (@code{mh-last-msg}).
1736 @c -------------------------
1737 @kindex M-n
1738 @findex mh-next-unread-msg
1739 @item M-n
1740 Display next unread message (@code{mh-next-unread-msg}).
1741 @c -------------------------
1742 @kindex M-p
1743 @findex mh-previous-unread-msg
1744 @item M-p
1745 Display previous unread message (@code{mh-previous-unread-msg}).
1746 @c -------------------------
1747 @cindex @samp{Message > Next Message} menu item
1748 @cindex menu item, @samp{Message > Next Message}
1749 @kindex n
1750 @findex mh-next-undeleted-msg
1751 @item n
1752 Display next message (@code{mh-next-undeleted-msg}).
1753 @c -------------------------
1754 @cindex @samp{Message > Previous Message} menu item
1755 @cindex menu item, @samp{Message > Previous Message}
1756 @kindex p
1757 @findex mh-previous-undeleted-msg
1758 @item p
1759 Display previous message (@code{mh-previous-undeleted-msg}).
1760 @c -------------------------
1761 @kindex P ?
1762 @findex mh-prefix-help
1763 @item P ?
1764 Display cheat sheet for the commands of the current prefix in
1765 minibuffer (@code{mh-prefix-help}).
1766 @c -------------------------
1767 @kindex P C
1768 @findex mh-ps-print-toggle-color
1769 @item P C
1770 Toggle whether color is used in printing messages
1771 (@code{mh-ps-print-toggle-color}).
1772 @c -------------------------
1773 @kindex P F
1774 @findex mh-ps-print-toggle-faces
1775 @item P F
1776 Toggle whether printing is done with faces or not
1777 (@code{mh-ps-print-toggle-faces}).
1778 @c -------------------------
1779 @kindex P f
1780 @findex mh-ps-print-msg-file
1781 @item P f
1782 Print range to file (@code{mh-ps-print-msg-file}).
1783 @c -------------------------
1784 @cindex @samp{Message > Print Message} menu item
1785 @cindex menu item, @samp{Message > Print Message}
1786 @kindex P l
1787 @findex mh-print-msg
1788 @item P l
1789 Print range the old fashioned way
1790 (@code{mh-print-msg}).
1791 @c -------------------------
1792 @kindex P p
1793 @findex mh-ps-print-msg
1794 @item P p
1795 Print range (@code{mh-ps-print-msg}).
1796 @c -------------------------
1797 @kindex X ?
1798 @findex mh-prefix-help
1799 @item X ?
1800 Display cheat sheet for the commands of the current prefix in
1801 minibuffer (@code{mh-prefix-help}).
1802 @c -------------------------
1803 @cindex @samp{Message > Unpack Uuencoded Message...} menu item
1804 @cindex menu item, @samp{Message > Unpack Uuencoded Message...}
1805 @kindex X s
1806 @kindex X u
1807 @findex mh-store-msg
1808 @item X s
1809 @itemx X u
1810 Unpack message created with @command{uudecode} or @command{shar}
1811 (@code{mh-store-msg}).
1812 @c -------------------------
1813 @kindex Mouse-2
1814 @findex mh-show-mouse
1815 @item Mouse-2
1816 Move point to mouse event and show message (@code{mh-show-mouse}).
1817 @end table
1818
1819 Within the MH-Show buffer, the following command is defined.
1820
1821 @table @kbd
1822 @kindex @key{RET}
1823 @kindex Mouse-1
1824 @kindex Mouse-2
1825 @findex mh-press-button
1826 @item @key{RET}
1827 @itemx Mouse-1
1828 @itemx Mouse-2
1829 View contents of button (@code{mh-press-button}).
1830 @end table
1831
1832 @cindex @samp{mh-show} customization group
1833 @cindex customization group, @samp{mh-show}
1834
1835 The following table lists options in the @samp{mh-show} customization
1836 group that are used while reading mail.
1837
1838 @vtable @code
1839 @item mh-bury-show-buffer-flag
1840 On means show buffer is buried (default: @samp{on}).
1841 @c -------------------------
1842 @item mh-clean-message-header-flag
1843 On means remove extraneous header fields (default: @samp{on}).
1844 @c -------------------------
1845 @item mh-decode-mime-flag
1846 On means attachments are handled (default: @samp{on} if the Gnus
1847 @samp{mm-decode} package is present).
1848 @c -------------------------
1849 @item mh-display-buttons-for-alternatives-flag
1850 On means display buttons for all alternative attachments (default:
1851 @samp{off}).
1852 @c -------------------------
1853 @item mh-display-buttons-for-inline-parts-flag
1854 On means display buttons for all inline attachments (default:
1855 @samp{off}).
1856 @c -------------------------
1857 @item mh-do-not-confirm-flag
1858 On means non-reversible commands do not prompt for confirmation
1859 (default: @samp{off}).
1860 @c -------------------------
1861 @item mh-fetch-x-image-url
1862 Control fetching of @samp{X-Image-URL:} header field image (default:
1863 @samp{Never Fetch}).
1864 @c -------------------------
1865 @item mh-graphical-smileys-flag
1866 On means graphical smileys are displayed (default: @samp{on}).
1867 @c -------------------------
1868 @item mh-graphical-emphasis-flag
1869 On means graphical emphasis is displayed (default: @samp{on}).
1870 @c -------------------------
1871 @item mh-highlight-citation-style
1872 Style for highlighting citations (default: @samp{Multicolor}).
1873 @c -------------------------
1874 @item mh-invisible-header-fields-default
1875 List of hidden header fields (default: a checklist too long to list
1876 here).
1877 @c -------------------------
1878 @item mh-invisible-header-fields
1879 Additional header fields to hide (default: @code{nil}).
1880 @c -------------------------
1881 @item mh-lpr-command-format
1882 Command used to print (default: @code{"lpr -J '%s'"}).
1883 @c -------------------------
1884 @item mh-max-inline-image-height
1885 Maximum inline image height if @samp{Content-Disposition:} is not
1886 present (default: 0).
1887 @c -------------------------
1888 @item mh-max-inline-image-width
1889 Maximum inline image width if @samp{Content-Disposition:} is not
1890 present(default: 0).
1891 @c -------------------------
1892 @item mh-mhl-format-file
1893 Specifies the format file to pass to the @command{mhl} program
1894 (default: @samp{Use Default mhl Format (Printing Only)}).
1895 @c -------------------------
1896 @item mh-mime-save-parts-default-directory
1897 Default directory to use for @kbd{K a}.
1898 @c -------------------------
1899 @item mh-print-background-flag
1900 On means messages should be printed in the background (default:
1901 @samp{off}).
1902 @c -------------------------
1903 @item mh-show-buffer-mode-line-buffer-id
1904 Format string to produce @code{mode-line-buffer-identification} for
1905 show buffers (default: @code{" @{show-%s@} %d"}).
1906 @c -------------------------
1907 @item mh-show-maximum-size
1908 Maximum size of message (in bytes) to display automatically (default:
1909 0).
1910 @c -------------------------
1911 @item mh-show-use-xface-flag
1912 On means display face images in MH-Show buffers (default: @samp{on}).
1913 @c -------------------------
1914 @item mh-store-default-directory
1915 Default directory for @kbd{X s} (default: @samp{Current}).
1916 @c -------------------------
1917 @item mh-summary-height
1918 Number of lines in MH-Folder buffer (including the mode line)
1919 (default: depends on size of frame).
1920 @end vtable
1921
1922 The following hooks are available.
1923
1924 @vtable @code
1925 @item mh-delete-msg-hook
1926 Hook run after marking each message for deletion (default: @code{nil}).
1927 @c -------------------------
1928 @item mh-show-hook
1929 Hook run after @key{RET} shows a message (default: @code{nil}).
1930 @c -------------------------
1931 @item mh-show-mode-hook
1932 Hook run upon entry to @code{mh-show-mode} (default: @code{nil}).
1933 @end vtable
1934
1935 The following faces are available.
1936
1937 @vtable @code
1938 @item mh-show-cc
1939 Face used to highlight @samp{cc:} header fields.
1940 @c -------------------------
1941 @item mh-show-date
1942 Face used to highlight @samp{Date:} header fields.
1943 @c -------------------------
1944 @item mh-show-from
1945 Face used to highlight @samp{From:} header fields.
1946 @c -------------------------
1947 @item mh-show-header
1948 Face used to deemphasize less interesting header fields.
1949 @c -------------------------
1950 @item mh-show-pgg-bad
1951 Bad PGG signature face.
1952 @c -------------------------
1953 @item mh-show-pgg-good
1954 Good PGG signature face.
1955 @c -------------------------
1956 @item mh-show-pgg-unknown
1957 Unknown or untrusted PGG signature face.
1958 @c -------------------------
1959 @item mh-show-signature
1960 Signature face.
1961 @c -------------------------
1962 @item mh-show-subject
1963 Face used to highlight @samp{Subject:} header fields.
1964 @c -------------------------
1965 @item mh-show-to
1966 Face used to highlight @samp{To:} header fields.
1967 @c -------------------------
1968 @item mh-show-xface
1969 X-Face image face.
1970 @end vtable
1971
1972 The functions and variables introduced here are explained in more
1973 detail in the following sections.
1974
1975 @menu
1976 * Viewing::
1977 * Viewing Attachments::
1978 * HTML::
1979 * Digests::
1980 * Reading PGP::
1981 * Printing::
1982 * Files and Pipes::
1983 * Navigating::
1984 * Miscellaneous Commands and Options::
1985 @end menu
1986
1987 @node Viewing, Viewing Attachments, Reading Mail, Reading Mail
1988 @section Viewing Your Mail
1989
1990 @findex mh-header-display
1991 @findex mh-page-msg
1992 @findex mh-previous-page
1993 @findex mh-show
1994 @findex mh-show-mouse
1995 @kindex , (comma)
1996 @kindex . (period)
1997 @kindex @key{BS}
1998 @kindex @key{RET}
1999 @kindex @key{SPC}
2000 @kindex Mouse-2
2001
2002 The command @key{RET} (@code{mh-show}) displays the message that the
2003 cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the
2004 message that the mouse cursor is on. If the message is already
2005 displayed, it scrolls to the beginning of the message. Use @key{SPC}
2006 (@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move
2007 forwards and backwards one page at a time through the message. You can
2008 give either of these commands a prefix argument that specifies the
2009 number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC}
2010 command will also show the next undeleted message if it is used at the
2011 bottom of a message. MH-E normally hides a lot of the superfluous
2012 header fields that mailers add to a message, but if you wish to see
2013 all of them, use the command @kbd{,} (comma;
2014 @code{mh-header-display}).
2015
2016 @vindex mh-show-maximum-size
2017
2018 The option @code{mh-show-maximum-size} provides an opportunity to skip
2019 over large messages which may be slow to load. The default value of 0
2020 means that all message are shown regardless of size.
2021
2022 A litany of options control what displayed messages look like.
2023
2024 @vindex mh-show-cc
2025 @vindex mh-show-date
2026 @vindex mh-show-from
2027 @vindex mh-show-header
2028 @vindex mh-show-subject
2029 @vindex mh-show-to
2030
2031 First, the appearance of the header fields can be modified by
2032 customizing the associated face: @code{mh-show-to}, @code{mh-show-cc},
2033 @code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}.
2034 The face @code{mh-show-header} is used to deemphasize the other, less
2035 interesting, header fields.
2036
2037 @cindex regular expressions, @code{mh-invisible-header-fields}
2038 @vindex mh-clean-message-header-flag
2039 @vindex mh-invisible-header-fields
2040 @vindex mh-invisible-header-fields-default
2041
2042 Normally messages are delivered with a handful of uninteresting header
2043 fields. These are hidden by turning on the option
2044 @code{mh-clean-message-header-flag} (which it is by default). The
2045 header fields listed in the option
2046 @code{mh-invisible-header-fields-default} are hidden, although you can
2047 check off any field that you would like to see. Header fields that you
2048 would like to hide that aren't listed can be added to the option
2049 @code{mh-invisible-header-fields} with a couple of caveats. Regular
2050 expressions are not allowed. Unique fields should have a @samp{:}
2051 suffix; otherwise, the element can be used to render invisible an
2052 entire class of fields that start with the same prefix. If you think a
2053 header field should be generally ignored, report a bug (@pxref{Bug
2054 Reports}).
2055
2056 @cindex header field, @samp{Face:}
2057 @cindex header field, @samp{X-Face:}
2058 @cindex header field, @samp{X-Image-URL:}
2059 @cindex @samp{Face:} header field
2060 @cindex @samp{X-Face:} header field
2061 @cindex @samp{X-Image-URL:} header field
2062 @vindex mh-show-use-xface-flag
2063
2064 MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and
2065 @samp{X-Image-URL:} header fields. If any of these fields occur in the
2066 header of your message, the sender's face will appear in the
2067 @samp{From:} header field. If more than one of these fields appear,
2068 then the first field found in the order @samp{Face:}, @samp{X-Face:},
2069 and @samp{X-Image-URL:} will be used. The option
2070 @code{mh-show-use-xface-flag} is used to turn this feature on and off.
2071 This feature will be turned on by default if your system supports it.
2072
2073 The first header field used, if present, is the Gnus-specific
2074 @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU
2075 Emacs 21 and XEmacs. For more information, see
2076 @uref{http://quimby.gnus.org/circus/face/}.}.
2077
2078 @cindex @command{uncompface}
2079 @cindex Emacs, packages, x-face
2080 @cindex Unix commands, @command{uncompface}
2081 @cindex x-face package
2082 @vindex mh-show-xface
2083
2084 Next is the traditional @samp{X-Face:} header field@footnote{The
2085 display of this field requires the
2086 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
2087 @command{uncompface} program}. Recent versions of XEmacs have internal
2088 support for @samp{X-Face:} images. If your version of XEmacs does not,
2089 then you'll need both @command{uncompface} and the
2090 @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E
2091 renders the foreground and background of the image using the
2092 associated attributes of the face @code{mh-show-xface}.
2093
2094 @cindex @command{convert}
2095 @cindex @command{wget}
2096 @cindex ImageMagick
2097 @cindex Unix commands, @command{convert}
2098 @cindex Unix commands, @command{wget}
2099 @vindex mh-fetch-x-image-url
2100
2101 Finally, MH-E will display images referenced by the
2102 @samp{X-Image-URL:} header field if neither the @samp{Face:} nor the
2103 @samp{X-Face:} fields are present@footnote{The display of the images
2104 requires the @uref{http://www.gnu.org/software/wget/wget.html,
2105 @command{wget} program} to fetch the image and the @command{convert}
2106 program from the @uref{http://www.imagemagick.org/, ImageMagick
2107 suite}.}. Of the three header fields this is the most efficient in
2108 terms of network usage since the image doesn't need to be transmitted
2109 with every single mail. The option @code{mh-fetch-x-image-url}
2110 controls the fetching of the @samp{X-Image-URL:} header field image
2111 with the following values:
2112
2113 @table @samp
2114 @item Ask Before Fetching
2115 You are prompted before the image is fetched. MH-E will remember your
2116 reply and will either use the already fetched image the next time the
2117 same URL is encountered or silently skip it if you didn't fetch it the
2118 first time. This is a good setting.
2119 @c -------------------------
2120 @item Never Fetch
2121 Images are never fetched and only displayed if they are already
2122 present in the cache. This is the default.
2123 @end table
2124
2125 There isn't a value of @samp{Always Fetch} for privacy and DOS (denial
2126 of service) reasons. For example, fetching a URL can tip off a spammer
2127 that you've read his email (which is why you shouldn't blindly answer
2128 yes if you've set this option to @samp{Ask Before Fetching}). Someone
2129 may also flood your network and fill your disk drive by sending a
2130 torrent of messages, each specifying a unique URL to a very large
2131 file.
2132
2133 @cindex @file{.mhe-x-image-cache}
2134 @cindex files, @file{.mhe-x-image-cache}
2135
2136 The cache of images is found in the directory
2137 @file{.mhe-x-image-cache} within your MH directory. You can add your
2138 own face to the @samp{From:} field too. @xref{Picture}.
2139
2140 @cindex @command{mhl}
2141 @cindex MH commands, @command{mhl}
2142 @vindex mh-mhl-format-file
2143
2144 Normally MH-E takes care of displaying messages itself (rather than
2145 calling an MH program to do the work). If you'd rather have
2146 @command{mhl} display the message (within MH-E), change the option
2147 @code{mh-mhl-format-file} from its default value of @samp{Use Default
2148 mhl Format (Printing Only)}. You can set this option to @samp{Use
2149 Default mhl Format} to get the same output as you would get if you ran
2150 @command{mhl} from the shell. If you have a format file that you want
2151 MH-E to use, you can set this option to @samp{Specify an mhl Format
2152 File} and enter the name of your format file (@command{mhl}(1) or
2153 section @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in
2154 the MH book tells you how to write one). Your format file should
2155 specify a non-zero value for @samp{overflowoffset} to allow MH-E to
2156 parse the header. Note that @command{mhl} is always used for printing
2157 and forwarding; in this case, the value of @code{mh-mhl-format-file}
2158 is consulted if you have specified a format file.
2159
2160 @cindex citations, highlighting
2161 @cindex highlighting citations
2162 @vindex mh-highlight-citation-style
2163
2164 If the sender of the message has cited other messages in his message,
2165 then MH-E will highlight these citations to emphasize the sender's
2166 actual response. The option @code{mh-highlight-citation-style} can be
2167 customized to change the highlighting style. The @samp{Multicolor}
2168 method uses a different color for each indentation while the
2169 @samp{Monotone} method highlights all citations in red. To disable
2170 highlighting of citations entirely, choose @samp{None}.
2171
2172 @cindex URLs, highlighting
2173 @cindex email addresses, highlighting
2174 @cindex highlighting URLs
2175 @cindex highlighting email addresses
2176 @cindex links, following
2177 @findex goto-address-at-point
2178 @kindex C-c @key{RET}
2179 @kindex Mouse-2
2180 @vindex goto-address-highlight-p
2181
2182 Email addresses and URLs in the message are highlighted if the option
2183 @code{goto-address-highlight-p} is on, which it is by default. To view
2184 the web page for a highlighted URL or to send a message using a
2185 highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}
2186 (@code{goto-address-at-point}). @xref{Sending Mail}, to see how to
2187 configure Emacs to send the message using MH-E.
2188
2189 @cindex boldface, showing
2190 @cindex emphasis
2191 @cindex italics, showing
2192 @cindex smileys
2193 @cindex typesetting
2194 @cindex underline, showing
2195 @vindex gnus-emphasis-alist
2196 @vindex mh-decode-mime-flag
2197 @vindex mh-graphical-emphasis-flag
2198 @vindex mh-graphical-smileys-flag
2199
2200 It is a long standing custom to inject body language using a
2201 cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can
2202 render these as graphical widgets if the option
2203 @code{mh-graphical-smileys-flag} is turned on, which it is by default.
2204 Smileys include patterns such as :-) and ;-). Similarly, a few
2205 typesetting features are indicated in ASCII text with certain
2206 characters. If your terminal supports it, MH-E can render these
2207 typesetting directives naturally if the option
2208 @code{mh-graphical-emphasis-flag} is turned on, which it is by
2209 default. For example, _underline_ will be
2210 @ifhtml
2211 @html
2212 <u>underlined</u>,
2213 @end html
2214 @end ifhtml
2215 @ifnothtml
2216 underlined,
2217 @end ifnothtml
2218 *bold* will appear in @b{bold}, /italics/ will appear in @i{italics},
2219 and so on. See the option @code{gnus-emphasis-alist} for the whole
2220 list. Both of these options are disabled if the option
2221 @code{mh-decode-mime-flag} is turned off. @xref{Viewing Attachments}.
2222
2223 @cindex signature separator
2224 @cindex vCard
2225 @vindex mh-show-signature
2226
2227 MH-E normally renders signatures and vCards in italics so that the
2228 body of the message stands out more. MH-E depends on the presence of
2229 the @dfn{signature separator} (@code{"-- "}) to do this. You can also
2230 customize the face @code{mh-show-signature} so the appearance of the
2231 signature block is more to your liking.
2232
2233 @vindex mh-show-hook
2234 @vindex mh-show-mode-hook
2235
2236 Two hooks can be used to control how messages are displayed. The first
2237 hook, @code{mh-show-mode-hook}, is called early on in the process of
2238 the message display. It is usually used to perform some action on the
2239 message's content. The second hook, @code{mh-show-hook}, is the last
2240 thing called after messages are displayed. It's used to affect the
2241 behavior of MH-E in general or when @code{mh-show-mode-hook} is too
2242 early.
2243
2244 @cindex MH-Show mode
2245 @cindex modes, MH-Show
2246 @vindex mh-show-buffer-mode-line-buffer-id
2247
2248 For those who like to modify their mode lines, use
2249 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in
2250 the MH-Show buffers. Place the two escape strings @samp{%s} and
2251 @samp{%d}, which will display the folder name and the message number,
2252 respectively, somewhere in the string in that order. The default value
2253 of @code{"@{show-%s@} %d"} yields a mode line of
2254
2255 @smallexample
2256 -----@{show-+inbox@} 4 (MH-Show)--Bot--------------------------------
2257 @end smallexample
2258
2259 @node Viewing Attachments, HTML, Viewing, Reading Mail
2260 @section Viewing Attachments
2261
2262 @cindex attachments
2263 @cindex body parts
2264 @cindex @command{mhshow}
2265 @cindex @command{show}
2266 @cindex MH commands, @command{mhshow}
2267 @cindex MH commands, @command{show}
2268 @cindex MIME
2269 @cindex multimedia mail
2270
2271 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
2272 Mail Extensions) messages which are simply messages with additional
2273 @dfn{body parts} or @dfn{attachments}. You can use the MH commands
2274 @command{show}@footnote{See the section
2275 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
2276 prev} in the MH book.} or @command{mhshow}@footnote{See the section
2277 @uref{@value{MH-BOOK-HOME}/usimim.htm#ReMIMa, Reading MIME Mail} in
2278 the MH book.} from the shell to read @sc{mime} messages@footnote{You
2279 can call them directly from Emacs if you're running the X Window
2280 System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can
2281 leave out the @samp{xterm -e} if you use @command{mhlist} or
2282 @command{mhstore}.}.
2283
2284 @cindex Emacs, packages, mm-decode
2285 @cindex mm-decode package
2286 @findex mh-toggle-mh-decode-mime-flag
2287 @kindex ; (semicolon)
2288 @vindex mh-decode-mime-flag
2289
2290 MH-E can handle attachments as well if the Gnus @samp{mm-decode}
2291 package is present. If so, the option @code{mh-decode-mime-flag} will
2292 be on. Otherwise, you'll see the @sc{mime} body parts rather than text
2293 or attachments. There isn't much point in turning off the option
2294 @code{mh-decode-mime-flag}; however, you can inspect it if it appears
2295 that the body parts are not being interpreted correctly or toggle it
2296 with the command @kbd{;} (semicolon;
2297 @code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This
2298 option also controls the display of quoted-printable messages and
2299 other graphical widgets. @xref{Viewing}.
2300
2301 @cindex buttons
2302
2303 Attachments in MH-E are indicated by @dfn{buttons} like this:
2304
2305 @smallexample
2306 [1. image/jpeg; foo.jpg]...
2307 @end smallexample
2308
2309 @findex mh-next-button
2310 @findex mh-press-button
2311 @findex mh-prev-button
2312 @kindex @key{RET}
2313 @kindex K @key{TAB}
2314 @kindex K S-@key{TAB}
2315 @kindex Mouse-1
2316 @kindex Mouse-2
2317
2318 To view the contents of the button, use either @kbd{Mouse-1} or
2319 @kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when
2320 the cursor is over the button. This command is a toggle so if you use
2321 it again on the same attachment, it is hidden. If Emacs does not know
2322 how to display the attachment, then Emacs offers to save the
2323 attachment in a file. To move the cursor to the next button, use the
2324 command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the
2325 buffer is reached then the search wraps over to the start of the
2326 buffer. To move the cursor to the previous button, use the command
2327 @kbd{K S-@key{TAB}} (@code{mh-prev-button}). If the beginning of the
2328 buffer is reached then the search wraps over to the end of the buffer.
2329
2330 @cindex attachments, viewing
2331 @cindex viewing attachments
2332 @findex mh-folder-toggle-mime-part
2333 @kindex K v
2334
2335 Another way to view the contents of a button is to use the command
2336 @kbd{K v} (@code{mh-folder-toggle-mime-part}). This command displays
2337 (or hides) the attachment associated with the button under the cursor.
2338 If the cursor is not located over a button, then the cursor first
2339 moves to the next button, wrapping to the beginning of the message if
2340 necessary. This command has the advantage over the previous commands
2341 of working from the MH-Folder buffer. You can also provide a numeric
2342 prefix argument (as in @kbd{4 K v}) to view the attachment labeled
2343 with that number. If Emacs does not know how to display the
2344 attachment, then Emacs offers to save the attachment in a file.
2345
2346 @cindex @file{/etc/mailcap}
2347 @cindex files, @file{/etc/mailcap}
2348 @findex mailcap-mime-info
2349 @findex mh-display-with-external-viewer
2350 @kindex K e
2351
2352 If Emacs does not know how to view an attachment, you could save it
2353 into a file and then run some program to open it. It is easier,
2354 however, to launch the program directly from MH-E with the command
2355 @kbd{K e} (@code{mh-display-with-external-viewer}). While you'll most
2356 likely use this to view spreadsheets and documents, it is also useful
2357 to use your browser to view HTML attachments with higher fidelity than
2358 what Emacs can provide. This command displays the attachment
2359 associated with the button under the cursor. If the cursor is not
2360 located over a button, then the cursor first moves to the next button,
2361 wrapping to the beginning of the message if necessary. You can provide
2362 a numeric prefix argument (as in @kbd{4 K e}) to view the attachment
2363 labeled with that number. This command tries to provide a reasonable
2364 default for the viewer by calling the Emacs function
2365 @code{mailcap-mime-info}. This function usually reads the file
2366 @file{/etc/mailcap}.
2367
2368 @cindex attachments, saving
2369 @cindex saving attachments
2370 @findex mh-folder-save-mime-part
2371 @kindex K o
2372
2373 Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save
2374 attachments (the mnemonic is ``output''). This command saves the
2375 attachment associated with the button under the cursor. If the cursor
2376 is not located over a button, then the cursor first moves to the next
2377 button, wrapping to the beginning of the message if necessary. You can
2378 also provide a numeric prefix argument (as in @kbd{3 K o}) to save the
2379 attachment labeled with that number. This command prompts you for a
2380 filename and suggests a specific name if it is available.
2381
2382 @cindex @command{mhn}
2383 @cindex @command{mhstore}
2384 @cindex MH commands, @command{mhn}
2385 @cindex MH commands, @command{mhstore}
2386 @findex mh-mime-save-parts
2387 @kindex K a
2388 @vindex mh-mime-save-parts-default-directory
2389
2390 You can save all of the attachments at once with the command @kbd{K a}
2391 (@code{mh-mime-save-parts}). The attachments are saved in the
2392 directory specified by the option
2393 @code{mh-mime-save-parts-default-directory} unless you use a prefix
2394 argument (as in @kbd{C-u K a}) in which case you are prompted for the
2395 directory. These directories may be superseded by MH profile
2396 components, since this function calls on @command{mhstore}
2397 (@command{mhn}) to do the work.
2398
2399 @vindex mh-mime-save-parts-default-directory
2400
2401 The default value for the option
2402 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so
2403 that you are always prompted for the directory in which to save the
2404 attachments. However, if you usually use the same directory within a
2405 session, then you can set this option to @samp{Prompt the First Time}
2406 to avoid the prompt each time. you can make this directory permanent
2407 by choosing @samp{Directory} and entering the directory's name.
2408
2409 @cindex attachments, inline
2410 @cindex inline attachments
2411 @findex mh-toggle-mime-buttons
2412 @kindex K t
2413 @vindex mh-display-buttons-for-inline-parts-flag
2414
2415 The sender can request that attachments should be viewed inline so
2416 that they do not really appear like an attachment at all to the
2417 reader. Most of the time, this is desirable, so by default MH-E
2418 suppresses the buttons for inline attachments. On the other hand, you
2419 may receive code or HTML which the sender has added to his message as
2420 inline attachments so that you can read them in MH-E. In this case, it
2421 is useful to see the buttons so that you know you don't have to cut
2422 and paste the code into a file; you can simply save the attachment. If
2423 you want to make the buttons visible for inline attachments, you can
2424 use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle
2425 the visibility of these buttons. You can turn on these buttons
2426 permanently by turning on the option
2427 @code{mh-display-buttons-for-inline-parts-flag}.
2428
2429 MH-E cannot display all attachments inline however. It can display
2430 text (including @sc{html}) and images.
2431
2432 @cindex header field, @samp{Content-Disposition:}
2433 @cindex inline images
2434 @cindex @samp{Content-Disposition:} header field
2435 @vindex mh-max-inline-image-height
2436 @vindex mh-max-inline-image-width
2437
2438 Some older mail programs do not insert the needed
2439 plumbing@footnote{This plumbing is the @samp{Content-Disposition:}
2440 header field.} to tell MH-E whether to display the attachments inline
2441 or not. If this is the case, MH-E will display these images inline if
2442 they are smaller than the window. However, you might want to allow
2443 larger images to be displayed inline. To do this, you can change the
2444 options @code{mh-max-inline-image-width} and
2445 @code{mh-max-inline-image-height} from their default value of zero to
2446 a large number. The size of your screen is a good choice for these
2447 numbers.
2448
2449 @cindex alternatives
2450 @cindex attachments, alternatives
2451 @vindex mh-display-buttons-for-alternatives-flag
2452
2453 Sometimes, a mail program will produce multiple alternatives of an
2454 attachment in increasing degree of faithfulness to the original
2455 content. By default, only the preferred alternative is displayed. If
2456 the option @code{mh-display-buttons-for-alternatives-flag} is on, then
2457 the preferred part is shown inline and buttons are shown for each of
2458 the other alternatives.
2459
2460 @kindex K i
2461 @findex mh-folder-inline-mime-part
2462
2463 You can view the raw contents of an attachment with the command @kbd{K
2464 i} (@code{mh-folder-inline-mime-part}). This command displays (or
2465 hides) the contents of the attachment associated with the button under
2466 the cursor verbatim. If the cursor is not located over a button, then
2467 the cursor first moves to the next button, wrapping to the beginning
2468 of the message if necessary. You can also provide a numeric prefix
2469 argument (as in @kbd{4 K i}) to view the attachment labeled with that
2470 number.
2471
2472 For additional information on buttons, see
2473 @ifinfo
2474 @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}.
2475 @end ifinfo
2476 @ifnotinfo
2477 the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101,
2478 Article Buttons} and
2479 @uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands}
2480 in the @cite{The Gnus Manual}.
2481 @end ifnotinfo
2482
2483 @node HTML, Digests, Viewing Attachments, Reading Mail
2484 @section HTML
2485
2486 @cindex HTML
2487 @cindex Gnus
2488
2489 MH-E can display messages that have been sent in HTML@footnote{This
2490 feature depends on a version of Gnus that is at least 5.10.}. The
2491 content of the message will appear in the MH-Show buffer as you would
2492 expect if the entire message is HTML, or there is an inline HTML body
2493 part. However, if there is an HTML body part that is an attachment,
2494 then you'll see a button like this:
2495
2496 @smallexample
2497 [1. text/html; foo.html]...
2498 @end smallexample
2499
2500 To see how to read the contents of this body part, see @ref{Viewing
2501 Attachments}.
2502
2503 @vindex mm-text-html-renderer
2504
2505 The browser that MH-E uses is determined by the option
2506 @code{mm-text-html-renderer}. The default setting is set automatically
2507 based upon the presence of a known browser on your system. If you wish
2508 to use a different browser, then set this option accordingly. See the
2509 documentation for the browser you use for additional information on
2510 how to use it. In particular, find and disable the option to render
2511 images as this can tip off spammers that the email address they have
2512 used is valid.
2513
2514 @vindex mm-text-html-renderer
2515
2516 If you're confused about which @code{mm-text-html-renderer} to use,
2517 here's a brief description of each, sorted by popularity, that
2518 includes the results of a quick poll of MH-E users from 2005-12-23.
2519
2520 @table @asis
2521 @cindex browser, @samp{w3m}
2522 @cindex @samp{w3m}
2523 @kindex Mouse-2
2524 @kindex S-Mouse-2
2525 @item @samp{w3m} 7
2526 The @samp{w3m} browser requires an external program. It's quick,
2527 produces pretty nice output, and best of all, it's the only browser
2528 that highlights links. These can be clicked with @kbd{Mouse-2} to view
2529 the content of the link in @samp{w3m} or with @kbd{S-Mouse-2} to view
2530 the content of the link in an external browser. The @samp{w3m} browser
2531 handles tables well and actually respects the table's width parameter
2532 (which can cause text to wrap if the author didn't anticipate that the
2533 page would be viewed in Emacs).
2534 @c -------------------------
2535 @cindex browser, @samp{w3m-standalone}
2536 @cindex @samp{w3m-standalone}
2537 @item @samp{w3m-standalone} 3
2538 This browser, along with @samp{nil} for the external browser, are the
2539 only choices that work without having to download a separate lisp
2540 package or external program. This browser is quick, but does not show
2541 links. It handles simple tables but some tables get rendered much
2542 wider than the Emacs frame. This browser was the only one not to
2543 handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did
2544 render @samp{&reg;}.
2545 @c -------------------------
2546 @cindex browser, @samp{links}
2547 @cindex @samp{links}
2548 @item @samp{links} 1
2549 The @samp{links} browser requires an external program. It's quick, and
2550 produces nicer output than @samp{lynx} on single column mails in
2551 tables. However, it doesn't show links and it doesn't do as nice a job
2552 on multi-column tables as some lines wrap. At least it fits in 80
2553 columns and thus seems better than @samp{w3} and
2554 @samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R).
2555 @c -------------------------
2556 @cindex browser, @samp{lynx}
2557 @cindex @samp{lynx}
2558 @item @samp{lynx} 1
2559 The @samp{lynx} browser requires an external program. It's quick and
2560 produces pretty decent output but it doesn't show links. It doesn't
2561 seem to do multi-column tables which makes output much cleaner. It
2562 centers the output and wraps long lines more than most. Handles
2563 @samp{&reg;}.
2564 @c -------------------------
2565 @item @samp{nil} 1
2566 This choice obviously requires an external browser. Like
2567 @samp{w3m-standalone}, it works out of the box. With this setting,
2568 HTML messages have a button for the body part which you can view with
2569 @kbd{K v} (@code{mh-folder-toggle-mime-part}).
2570 @c -------------------------
2571 @cindex browser, @samp{w3}
2572 @cindex @samp{w3}
2573 @item @samp{w3} 0
2574 This choice does not require an external program as all of the
2575 rendering is done in lisp. You do need to get the package separately.
2576 This browser is @strong{slow}, and doesn't appear to have been updated
2577 since 2001 and the author hasn't responded to my emails. It displays
2578 unknown tags instead of hiding them, so you get to see all the
2579 Microsoft crap in certain messages. Tends to make multi-column tables
2580 wider than even a full-screen Emacs can handle. Like @samp{w3m}, you
2581 can follow links, but you have to find them first as they are not
2582 highlighted. Performs well on single-column tables and handles escapes
2583 such as @samp{&reg;}.
2584 @c -------------------------
2585 @cindex browser, @samp{html2text}
2586 @cindex @samp{html2text}
2587 @item @samp{html2text} 0
2588 The @samp{html2text} browser requires an external program. I noticed
2589 that it can do some nasty things with simple HTML mails (like filling
2590 the entire message as if it were one paragraph, including signature).
2591 On another message, it displayed half of the HTML tags for some
2592 reason.
2593 @end table
2594
2595 @vindex mm-text-html-renderer
2596
2597 For a couple more sources of information about
2598 @code{mm-text-html-renderer},
2599 @ifinfo
2600 @xref{Display Customization,,,emacs-mime}, and the documentation for
2601 the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},).
2602 @end ifinfo
2603 @ifnotinfo
2604 see section @uref{http://www.gnus.org/manual/emacs-mime_6.html,
2605 Display Customization} in the @cite{The Emacs MIME Manual} and the the
2606 documentation for the Gnus command @kbd{W h} (see section
2607 @uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the
2608 @cite{The Gnus Manual}).
2609 @end ifnotinfo
2610
2611 @node Digests, Reading PGP, HTML, Reading Mail
2612 @section Digests
2613
2614 @cindex digests
2615 @findex mh-page-digest
2616 @findex mh-page-digest-backwards
2617 @kindex D @key{BS}
2618 @kindex D @key{SPC}
2619 @kindex @key{BS}
2620 @kindex @key{SPC}
2621
2622 A digest is a message that contains other messages. Special MH-E
2623 commands let you read digests conveniently. You can use @key{SPC} and
2624 @key{BS} to page through the digest as if it were a normal message,
2625 but if you wish to skip to the next message in the digest, use
2626 @kbd{D @key{SPC}} (@code{mh-page-digest}). To return to a previous message,
2627 use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
2628
2629 @cindex @command{burst}
2630 @cindex MH commands, @command{burst}
2631 @cindex MH-Folder Show mode
2632 @cindex modes, MH-Folder Show
2633 @findex mh-burst-digest
2634 @kindex d
2635 @kindex D b
2636 @kindex t
2637
2638 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
2639 command uses the MH command @command{burst}@footnote{See the section
2640 @uref{@value{MH-BOOK-HOME}/burdig.htm, Bursting Messages} in the MH
2641 book.} to break out each message in the digest into its own message.
2642 Using this command, you can quickly delete unwanted messages, like
2643 this: Once the digest is split up, toggle out of MH-Folder Show mode
2644 with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen
2645 and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail})
2646 to quickly delete messages that you don't want to read (based on the
2647 @samp{Subject:} header field). You can also burst the digest to reply
2648 directly to the people who posted the messages in the digest. One
2649 problem you may encounter is that the @samp{From:} header fields are
2650 preceded with a @samp{>} so that your reply can't create the
2651 @samp{To:} field correctly. In this case, you must correct the
2652 @samp{To:} field yourself. This is described later (@pxref{Editing
2653 Drafts}).
2654
2655 @node Reading PGP, Printing, Digests, Reading Mail
2656 @section Signed and Encrypted Messages
2657
2658 @cindex GPG
2659 @cindex GnuPG
2660 @cindex Gnus
2661 @cindex OpenPGP
2662 @cindex PGP
2663 @cindex RFC 3156
2664 @cindex encrypted messages
2665 @cindex security
2666 @cindex signed messages
2667
2668 You can read encrypted or signed PGP or GPG messages with
2669 MH-E@footnote{This feature depends on post-5.10 versions of Gnus.
2670 @cite{MIME Security with OpenPGP} is documented in
2671 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However,
2672 MH-E can also decrypt old-style PGP messages that are not in MIME
2673 format.}. This section assumes that you already have a good
2674 understanding of GPG and have set up your keys appropriately.
2675
2676 If someone sends you a signed message, here is what you'll see:
2677
2678 @smallexample
2679 @group
2680 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2681 This is a signed message.
2682
2683 [[End of PGP Signed Part]]
2684 @end group
2685 @end smallexample
2686
2687 @cindex keychain
2688 @cindex key server
2689 @cindex signed messages
2690
2691 If the key for the given signature is not in your keychain, you'll be
2692 given the opportunity to fetch the key from a key server and verify
2693 the key. If the message is really large, the verification process can
2694 take a long time. You can press @kbd{C-g} at any time to
2695 cancel@footnote{Unfortunately in the current version, the validation
2696 process doesn't display a message so it appears that MH-E has hung. We
2697 hope that this will be fixed in the future.}.
2698
2699 If the signature doesn't check out, you might see something like this:
2700
2701 @smallexample
2702 @group
2703 [[PGP Signed Part:Failed]]
2704 This is a signed message.
2705 This is garbage added after the signature was made.
2706
2707 [[End of PGP Signed Part]]
2708 @end group
2709 @end smallexample
2710
2711 @cindex decrypting messages
2712
2713 If someone sends you an encrypted message, MH-E will ask for your
2714 passphrase to decrypt the message. You should see something like this:
2715
2716 @smallexample
2717 @group
2718 [[PGP Encrypted Part:OK]]
2719
2720 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2721 This is the secret message.
2722
2723 [[End of PGP Signed Part]]
2724
2725 [[End of PGP Encrypted Part]]
2726 @end group
2727 @end smallexample
2728
2729 If there is a problem decrypting the message, the button will say:
2730
2731 @smallexample
2732 [[PGP Encrypted Part:Failed]]
2733 @end smallexample
2734
2735 You can read the contents of this button using the methods described in
2736 @ref{Viewing Attachments}. If the message were corrupted, you'd see
2737 this:
2738
2739 @smallexample
2740 [[PGP Encrypted Part:Failed]
2741 Invalid base64 data]
2742 @end smallexample
2743
2744 If your passphrase were incorrect, you'd see something like this:
2745
2746 @smallexample
2747 [GNUPG:] ENC_TO CD9C88BB610BD9AD 1 0
2748 [GNUPG:] USERID_HINT CD9C88BB610BD9AD Bill Wohler <wohler@@stop.mail-abuse.org>
2749 [GNUPG:] NEED_PASSPHRASE CD9C88BB610BD9AD CD9C88BB610BD9AD 1 0
2750 [GNUPG:] BAD_PASSPHRASE CD9C88BB610BD9AD
2751 gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09
2752 "Bill Wohler <wohler@@stop.mail-abuse.org>"
2753 gpg: public key decryption failed: bad passphrase
2754 [GNUPG:] BEGIN_DECRYPTION
2755 [GNUPG:] DECRYPTION_FAILED
2756 gpg: decryption failed: secret key not available
2757 [GNUPG:] END_DECRYPTION
2758
2759 gpg exited abnormally: '2'
2760 @end smallexample
2761
2762 @vindex mh-show-pgg-bad
2763 @vindex mh-show-pgg-good
2764 @vindex mh-show-pgg-unknown
2765
2766 The appearance of the buttons is controlled by the faces
2767 @code{mh-show-pgg-good}, @code{mh-show-pgg-bad}, and
2768 @code{mh-show-pgg-unknown} depending on the validity of the signature.
2769 The latter is used whether the signature is unknown or untrusted.
2770
2771 @cindex @samp{pgg} customization group
2772 @cindex PGG
2773 @cindex customization group, @samp{pgg}
2774
2775 The @samp{pgg} customization group may have some settings which may
2776 interest you.
2777 @iftex
2778 See @cite{The PGG Manual}.
2779 @end iftex
2780 @ifinfo
2781 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
2782 @end ifinfo
2783 @ifhtml
2784 See
2785 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
2786 @cite{The PGG Manual}}.
2787 @end ifhtml
2788
2789 @node Printing, Files and Pipes, Reading PGP, Reading Mail
2790 @section Printing Your Mail
2791
2792 @cindex printing
2793 @findex mh-ps-print-msg
2794 @findex mh-ps-print-msg-file
2795 @kindex P f
2796 @kindex P p
2797 @vindex mh-lpr-command-format
2798 @vindex mh-print-background-flag
2799
2800 To print messages in MH-E, use the command @kbd{P p}
2801 (@code{mh-ps-print-msg}). You can print all the messages in a range
2802 (as in @kbd{C-u P p 1 3 5-7 last:5 frombob @key{RET}},
2803 @pxref{Ranges}). You can also send the output to a file with @kbd{P f}
2804 (@code{mh-ps-print-msg-file}). This command will print inline text
2805 attachments but will not decrypt messages. However, when a message is
2806 displayed in an MH-Show buffer, then that buffer is used verbatim for
2807 printing with the caveat that only text attachments, if opened inline,
2808 are printed. Therefore, encrypted messages can be printed by showing
2809 and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not
2810 use the options @code{mh-lpr-command-format} or
2811 @code{mh-print-background-flag}, described below.
2812
2813 @findex mh-ps-print-toggle-color
2814 @kindex P C
2815 @vindex ps-print-color-p
2816
2817 Colors are emulated on black-and-white printers with shades of gray.
2818 This might produce illegible output, even if your screen colors only
2819 use shades of gray. If this is the case, try using the command @kbd{P
2820 C} (@code{mh-ps-print-toggle-color}) to toggle between color, no
2821 color, and a black and white representation of the colors and see
2822 which works best. You change this setting permanently by customizing
2823 the option @code{ps-print-color-p}.
2824
2825 @findex mh-ps-print-toggle-faces
2826 @kindex P F
2827
2828 Another related function is the command @kbd{P F}
2829 (@code{mh-ps-print-toggle-faces}). This command toggles between using
2830 faces and not. When faces are enabled, the printed message will look
2831 very similar to the message in the MH-Show buffer.
2832
2833 @cindex ps-print package
2834 @cindex Emacs, packages, ps-print
2835
2836 MH-E uses the @samp{ps-print} package to do the printing, so you can
2837 customize the printing further by going to the @samp{ps-print}
2838 customization group.
2839
2840 @cindex @command{lpr}
2841 @cindex @command{mhl}
2842 @cindex MH commands, @command{mhl}
2843 @cindex Unix commands, @command{lpr}
2844 @findex mh-print-msg
2845 @kindex P l
2846
2847 An alternative to using the @samp{ps-print} package is the command
2848 @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or
2849 @i{l}pr). You can print all the messages in a range. The message is
2850 formatted with @command{mhl}@footnote{See the section
2851 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
2852 book.} and printed with the @command{lpr} command.
2853
2854 @kindex P f
2855 @kindex P l
2856 @kindex P p
2857 @vindex mh-lpr-command-format
2858 @vindex mh-print-background-flag
2859
2860 The command @kbd{P l} uses two options. The option
2861 @code{mh-lpr-command-format} contains the Unix command line which
2862 performs the actual printing. The string can contain one escape,
2863 @samp{%s}, which is replaced by the name of the folder and the message
2864 number and is useful for print job names. The default setting is
2865 @code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb
2866 -P"} which produces a nice header and adds a bit of margin so the text
2867 fits within my printer's margins. Normally messages are printed in the
2868 foreground. If this is slow on your system, you may elect to turn on
2869 the option @code{mh-print-background-flag} to print in the background.
2870 If you do this, do not delete the message until it is printed or else
2871 the output may be truncated. These options are not used by the
2872 commands @kbd{P p} or @kbd{P f}.
2873
2874 @node Files and Pipes, Navigating, Printing, Reading Mail
2875 @section Files and Pipes
2876
2877 @cindex files
2878 @cindex pipes
2879 @findex mh-refile-or-write-again
2880 @findex mh-write-msg-to-file
2881 @kindex >
2882 @kindex !
2883
2884 MH-E does offer a couple of commands that are not a part of MH@. The
2885 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to
2886 a file. You are prompted for the filename. If the file already exists,
2887 the message is appended to it. You can also write the message to the
2888 file without the header by specifying a prefix argument (such as
2889 @kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file
2890 can be made with the command @kbd{!}
2891 (@code{mh-refile-or-write-again}).
2892
2893 @findex mh-pipe-msg
2894 @kindex |
2895 @kindex l
2896
2897 You can also pipe the message through a Unix shell command with the
2898 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix
2899 command through which you wish to run your message. If you give a
2900 prefix argument to this command, the message header is included in the
2901 text passed to the command (the contrived example @kbd{C-u | lpr}
2902 would be done with the @kbd{l} command instead).
2903
2904 @cindex @command{shar}
2905 @cindex @command{uuencode}
2906 @cindex Unix commands, @command{shar}
2907 @cindex Unix commands, @command{uuencode}
2908 @findex mh-store-msg
2909 @kindex X s
2910 @vindex mh-store-default-directory
2911
2912 If the message is a shell archive @command{shar} or has been run
2913 through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to
2914 extract the body of the message. The default directory for extraction
2915 is the current directory; however, you have a chance to specify a
2916 different extraction directory. The next time you use this command,
2917 the default directory is the last directory you used. If you would
2918 like to change the initial default directory, customize the option
2919 @code{mh-store-default-directory}, change the value from
2920 @samp{Current} to @samp{Directory}, and then enter the name of the
2921 directory for storing the content of these messages.
2922
2923 @findex mh-store-buffer
2924 @kindex @key{RET}
2925 @kindex X s
2926
2927 By the way, @kbd{X s} calls the Emacs Lisp function
2928 @code{mh-store-buffer}. I mention this because you can use it directly
2929 if you're editing a buffer that contains a file that has been run
2930 through @command{uuencode} or @command{shar}. For example, you can
2931 extract the contents of the current buffer in your home directory by
2932 typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}.
2933
2934 @node Navigating, Miscellaneous Commands and Options, Files and Pipes, Reading Mail
2935 @section Navigating
2936
2937 @cindex moving between messages
2938 @cindex navigation
2939 @findex mh-first-msg
2940 @findex mh-goto-msg
2941 @findex mh-last-msg
2942 @findex mh-next-undeleted-msg
2943 @findex mh-next-unread-msg
2944 @findex mh-previous-undeleted-msg
2945 @findex mh-previous-unread-msg
2946 @kindex g
2947 @kindex M-<
2948 @kindex M->
2949 @kindex M-n
2950 @kindex M-p
2951 @kindex n
2952 @kindex p
2953
2954 To move on to the next message, use the command @kbd{n}
2955 (@code{mh-next-undeleted-msg}); use @kbd{p}
2956 (@code{mh-previous-undeleted-msg}) to read the previous message. To
2957 move to the next unread message, use @kbd{M-n}
2958 (@code{mh-next-unread-msg}); use @kbd{M-p}
2959 (@code{mh-previous-unread-msg}) to move to the previous unread
2960 message. These commands can be given a prefix argument to specify how
2961 many messages to skip (for example, @kbd{5 n}). You can also move to a
2962 specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the
2963 message number either before or after typing @kbd{g}. In the latter
2964 case, Emacs prompts you. Finally, you can go to the first or last
2965 message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->}
2966 (@code{mh-last-msg}) respectively.
2967
2968 @cindex MH-Folder mode
2969 @cindex modes, MH-Folder
2970 @findex next-line
2971 @findex previous-line
2972 @kindex C-n
2973 @kindex C-p
2974 @kindex @key{RET}
2975
2976 You can also use the Emacs commands @kbd{C-p} (@code{previous-line})
2977 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in
2978 the MH-Folder window. These commands can be used in conjunction with
2979 @key{RET} to look at deleted or refiled messages.
2980
2981 @cindex deleting messages
2982 @findex mh-delete-msg
2983 @kindex d
2984 @kindex n
2985 @kindex p
2986
2987 To mark a message for deletion, use the command @kbd{d}
2988 (@code{mh-delete-msg}). A @samp{D} is placed by the message in the
2989 scan window, and the next undeleted message is displayed. If the
2990 previous command had been @kbd{p}, then the next message displayed is
2991 the first undeleted message previous to the message just deleted. Use
2992 @kbd{n} to force subsequent @kbd{d} commands to move forward to the
2993 next undeleted message after deleting the message under the cursor.
2994 You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5
2995 frombob @key{RET}}, @pxref{Ranges}).
2996
2997 @findex mh-delete-msg-no-motion
2998 @kindex C-d
2999
3000 The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the
3001 message (or messages in range) for deletion but leaves the cursor at
3002 the current message in case you wish to perform other operations on
3003 the message.
3004
3005 @findex mh-delete-subject
3006 @findex mh-delete-subject-or-thread
3007 @findex mh-thread-delete
3008 @findex mh-undo
3009 @kindex k
3010 @kindex T d
3011 @kindex u
3012
3013 And to delete more messages faster, you can use @kbd{k}
3014 (@code{mh-delete-subject-or-thread}) to delete all the messages with
3015 the same subject as the current message. This command puts these
3016 messages in a sequence named @samp{subject}. You can undo this action
3017 by using @kbd{u} (@code{mh-undo}) with a prefix argument and then
3018 specifying the @samp{subject} sequence. However, if the buffer is
3019 displaying a threaded view of the folder then @kbd{k} behaves like
3020 @kbd{T d} (@code{mh-thread-delete}). @xref{Threading}.
3021
3022 @findex mh-execute-commands
3023 @kindex x
3024
3025 However you mark a message for deletion, the command @kbd{x}
3026 (@code{mh-execute-commands}) actually carries out the deletion
3027 (@pxref{Folders}).
3028
3029 @vindex mh-delete-msg-hook
3030
3031 The hook @code{mh-delete-msg-hook} is called after you mark a message
3032 for deletion. For example, a past maintainer of MH-E used this once
3033 when he kept statistics on his mail usage.
3034
3035 @node Miscellaneous Commands and Options, , Navigating, Reading Mail
3036 @section Miscellaneous Commands and Options
3037
3038 This section contains a few more miscellaneous commands and options.
3039
3040 @cindex editing message
3041 @findex mh-modify
3042 @kindex M
3043
3044 There are times when you need to edit a message. For example, you may
3045 need to fix a broken Content-Type header field. You can do this with
3046 the command @kbd{M} (@code{mh-modify}). It displays the raw message in
3047 an editable buffer. When you are done editing, save and kill the
3048 buffer as you would any other.
3049
3050 @findex mh-kill-folder
3051 @findex mh-pack-folder
3052 @vindex mh-do-not-confirm-flag
3053
3054 Commands such as @code{mh-pack-folder} prompt to confirm whether to
3055 process outstanding moves and deletes or not before continuing.
3056 Turning on the option @code{mh-do-not-confirm-flag} means that these
3057 actions will be performed---which is usually desired but cannot be
3058 retracted---without question@footnote{In previous versions of MH-E,
3059 this option suppressed the confirmation in @code{mh-kill-folder}.
3060 Since this kept most users from setting this option,
3061 @code{mh-kill-folder} was modified in version 6.0 to always ask for
3062 confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}.
3063 @xref{Folders}.}.
3064
3065 @cindex MH-Folder mode
3066 @cindex modes, MH-Folder
3067 @vindex mh-summary-height
3068
3069 The option @code{mh-summary-height} controls the number of scan lines
3070 displayed in the MH-Folder window, including the mode line. The
3071 default value of this option is @samp{Automatic} which means that the
3072 MH-Folder buffer will maintain the same proportional size if the frame
3073 is resized. If you'd prefer a fixed height, then choose the
3074 @samp{Fixed Size} option and enter the number of lines you'd like to
3075 see.
3076
3077 @vindex mh-bury-show-buffer-flag
3078
3079 Normally the buffer for displaying messages is buried at the bottom at
3080 the buffer stack. You may wish to disable this feature by turning off
3081 the option @code{mh-bury-show-buffer-flag}. One advantage of not
3082 burying the show buffer is that one can delete the show buffer more
3083 easily in an electric buffer list because of its proximity to its
3084 associated MH-Folder buffer. Try running @kbd{M-x
3085 electric-buffer-list} to see what I mean.
3086
3087 @cindex @file{.emacs}
3088 @cindex files, @file{.emacs}
3089 @cindex reading mail
3090
3091 Before we leave this section, I'll include a function that I use as a
3092 front end to MH-E@footnote{Stephen Gildea's favorite binding is
3093 @kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your
3094 working window configuration, which may be quite involved---windows
3095 filled with source, compilation output, man pages, and other
3096 documentation---and your MH-E window configuration. Like the rest of
3097 the customization described in this section, simply add the following
3098 code to @file{~/.emacs}.
3099
3100 @iftex
3101 @filbreak
3102 @end iftex
3103
3104 @findex mh-rmail, example
3105
3106 @smalllisp
3107 @group
3108 (defvar my-mh-screen-saved nil
3109 "Set to non-@code{nil} when MH-E window configuration shown.")
3110 (defvar my-normal-screen nil "Normal window configuration.")
3111 (defvar my-mh-screen nil "MH-E window configuration.")
3112
3113 (defun my-mh-rmail (&optional arg)
3114 "Toggle between MH-E and normal screen configurations.
3115 With non-@code{nil} or prefix argument, @i{inc} mailbox as well
3116 when going into mail."
3117 (interactive "P") ; @r{user callable function, P=prefix arg}
3118 (setq my-mh-screen-saved ; @r{save state}
3119 (cond
3120 ;; @r{Bring up MH-E screen if arg or normal window configuration.}
3121 ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.}
3122 ((or arg (null my-mh-screen-saved))
3123 (setq my-normal-screen (current-window-configuration))
3124 (if (or arg (null (get-buffer "+inbox")))
3125 (mh-rmail)
3126 (set-window-configuration my-mh-screen))
3127 t) ; @r{set my-mh-screen-saved to @code{t}}
3128 ;; @r{Otherwise, save MH-E screen and restore normal screen.}
3129 (t
3130 (setq my-mh-screen (current-window-configuration))
3131 (set-window-configuration my-normal-screen)
3132 nil)))) ; @r{set my-mh-screen-saved to nil}
3133
3134 (global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}}
3135
3136 @i{Starting MH-E}
3137
3138 @end group
3139 @end smalllisp
3140
3141 If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved} is
3142 @code{nil} (meaning a non-MH-E window configuration), the current
3143 window configuration is saved, either the @samp{+inbox} buffer is
3144 displayed or @code{mh-rmail} is run, and the MH-E window configuration
3145 is shown. Otherwise, the MH-E window configuration is saved and the
3146 original configuration is displayed.
3147
3148 @node Folders, Sending Mail, Reading Mail, Top
3149 @chapter Organizing Your Mail with Folders
3150
3151 @cindex @samp{Folder} menu
3152 @cindex @samp{Message} menu
3153 @cindex folders
3154 @cindex menu, @samp{Folder}
3155 @cindex menu, @samp{Message}
3156 @cindex using folders
3157
3158 This chapter discusses the things you can do with folders within MH-E.
3159 The commands in this chapter are also found in the @samp{Folder} and
3160 @samp{Message} menus.
3161
3162 @table @kbd
3163 @kindex ?
3164 @findex mh-help
3165 @item ?
3166 Display cheat sheet for the MH-E commands (@code{mh-help}).
3167 @c -------------------------
3168 @kindex !
3169 @findex mh-refile-or-write-again
3170 @item !
3171 Repeat last output command (@code{mh-refile-or-write-again}).
3172 @c -------------------------
3173 @cindex @samp{Message > Copy Message to Folder...} menu item
3174 @cindex menu item, @samp{Message > Copy Message to Folder...}
3175 @kindex c
3176 @findex mh-copy-msg
3177 @item c
3178 Copy range to folder (@code{mh-copy-msg}).
3179 @c -------------------------
3180 @kindex F ?
3181 @findex mh-prefix-help
3182 @item F ?
3183 Display cheat sheet for the commands of the current prefix in
3184 minibuffer (@code{mh-prefix-help}).
3185 @c -------------------------
3186 @kindex F '
3187 @findex mh-index-ticked-messages
3188 @item F '
3189 Display ticked messages (@code{mh-index-ticked-messages}).
3190 @c -------------------------
3191 @kindex F c
3192 @findex mh-catchup
3193 @item F c
3194 Delete range from the @samp{unseen} sequence (@code{mh-catchup}).
3195 @c -------------------------
3196 @kindex F k
3197 @findex mh-kill-folder
3198 @item F k
3199 Remove folder (@code{mh-kill-folder}).
3200 @c -------------------------
3201 @cindex @samp{Folder > List Folders} menu item
3202 @cindex menu item, @samp{Folder > List Folders}
3203 @kindex F l
3204 @findex mh-list-folders
3205 @item F l
3206 List all folders (@code{mh-list-folders}).
3207 @c -------------------------
3208 @cindex @samp{Folder > View New Messages} menu item
3209 @cindex menu item, @samp{Folder > View New Messages}
3210 @kindex F n
3211 @findex mh-index-new-messages
3212 @item F n
3213 Display unseen messages (@code{mh-index-new-messages}).
3214 @c -------------------------
3215 @cindex @samp{Folder > Pack Folder} menu item
3216 @cindex menu item, @samp{Folder > Pack Folder}
3217 @kindex F p
3218 @findex mh-pack-folder
3219 @item F p
3220 Pack folder (@code{mh-pack-folder}).
3221 @c -------------------------
3222 @kindex F q
3223 @findex mh-index-sequenced-messages
3224 @item F q
3225 Display messages in any sequence (@code{mh-index-sequenced-messages}).
3226 @c -------------------------
3227 @cindex @samp{Folder > Rescan Folder} menu item
3228 @cindex menu item, @samp{Folder > Rescan Folder}
3229 @kindex F r
3230 @findex mh-rescan-folder
3231 @item F r
3232 Rescan folder (@code{mh-rescan-folder}).
3233 @c -------------------------
3234 @cindex @samp{Folder > Search...} menu item
3235 @cindex menu item, @samp{Folder > Search...}
3236 @kindex F s
3237 @findex mh-search
3238 @item F s
3239 Search your MH mail (@code{mh-search}).
3240 @c -------------------------
3241 @cindex @samp{Folder > Sort Folder} menu item
3242 @cindex menu item, @samp{Folder > Sort Folder}
3243 @kindex F S
3244 @findex mh-sort-folder
3245 @item F S
3246 Sort folder (@code{mh-sort-folder}).
3247 @c -------------------------
3248 @kindex F u
3249 @findex mh-undo-folder
3250 @item F u
3251 Undo all refiles and deletes in the current folder (@code{mh-undo-folder}).
3252 @c -------------------------
3253 @cindex @samp{Folder > Visit a Folder...} menu item
3254 @cindex menu item, @samp{Folder > Visit a Folder...}
3255 @kindex F v
3256 @findex mh-visit-folder
3257 @item F v
3258 Visit folder (@code{mh-visit-folder}).
3259 @c -------------------------
3260 @cindex @samp{Message > Refile Message} menu item
3261 @cindex menu item, @samp{Message > Refile Message}
3262 @kindex o
3263 @findex mh-refile-msg
3264 @item o
3265 Refile (output) range into folder (@code{mh-refile-msg}).
3266 @c -------------------------
3267 @cindex @samp{Folder > Quit MH-E} menu item
3268 @cindex menu item, @samp{Folder > Quit MH-E}
3269 @kindex q
3270 @findex mh-quit
3271 @item q
3272 Quit the current MH-E folder (@code{mh-quit}).
3273 @c -------------------------
3274 @cindex @samp{Folder > Toggle Show/Folder} menu item
3275 @cindex menu item, @samp{Folder > Toggle Show/Folder}
3276 @kindex t
3277 @findex mh-toggle-showing
3278 @item t
3279 Toggle between MH-Folder and MH-Folder Show modes
3280 (@code{mh-toggle-showing}).
3281 @c -------------------------
3282 @cindex @samp{Message > Undo Delete/Refile} menu item
3283 @cindex menu item, @samp{Message > Undo Delete/Refile}
3284 @kindex u
3285 @findex mh-undo
3286 @item u
3287 Undo pending deletes or refiles in range (@code{mh-undo}).
3288 @c -------------------------
3289 @cindex @samp{Message > Execute Delete/Refile} menu item
3290 @cindex menu item, @samp{Message > Execute Delete/Refile}
3291 @kindex x
3292 @findex mh-execute-commands
3293 @item x
3294 Process outstanding delete and refile requests
3295 (@code{mh-execute-commands}).
3296 @end table
3297
3298 @cindex @samp{mh-folder} customization group
3299 @cindex customization group, @samp{mh-folder}
3300
3301 The @samp{mh-folder} customization group is used to tune these
3302 commands.
3303
3304 @vtable @code
3305 @item mh-new-messages-folders
3306 Folders searched for the @samp{unseen} sequence (default:
3307 @code{Inbox}).
3308 @c -------------------------
3309 @item mh-ticked-messages-folders
3310 Folders searched for @code{mh-tick-seq} (default: @code{t}).
3311 @c -------------------------
3312 @item mh-large-folder
3313 The number of messages that indicates a large folder (default: 200).
3314 @c -------------------------
3315 @item mh-recenter-summary-flag
3316 On means to recenter the summary window (default: @samp{off}).
3317 @c -------------------------
3318 @item mh-recursive-folders-flag
3319 On means that commands which operate on folders do so recursively
3320 (default: @samp{off}).
3321 @c -------------------------
3322 @item mh-sortm-args
3323 Additional arguments for @command{sortm} (default: @code{nil}).
3324 @end vtable
3325
3326 The following hooks are available.
3327
3328 @vtable @code
3329 @item mh-after-commands-processed-hook
3330 Hook run by @kbd{x} after performing outstanding refile and delete
3331 requests (default: @code{nil}).
3332 @c -------------------------
3333 @item mh-before-commands-processed-hook
3334 Hook run by @kbd{x} before performing outstanding refile and delete
3335 requests (default: @code{nil}).
3336 @c -------------------------
3337 @item mh-before-quit-hook
3338 Hook run by q before quitting MH-E (default: @code{nil}).
3339 @c -------------------------
3340 @item mh-folder-mode-hook
3341 Hook run by @code{mh-folder-mode} when visiting a new folder (default:
3342 @code{nil}).
3343 @c -------------------------
3344 @item mh-kill-folder-suppress-prompt-hook
3345 Abnormal hook run at the beginning of @code{mh-kill-folder} (default:
3346 @code{'mh-search-p}).
3347 @c -------------------------
3348 @item mh-quit-hook
3349 Hook run by q after quitting MH-E (default: @code{nil}).
3350 @c -------------------------
3351 @item mh-refile-msg-hook
3352 Hook run by o after marking each message for refiling (default:
3353 @code{nil}).
3354 @end vtable
3355
3356 The following faces are available for customizing the appearance of
3357 the MH-Folder buffer. @xref{Scan Line Formats}.
3358
3359 @vtable @code
3360 @item mh-folder-address
3361 Recipient face.
3362 @c -------------------------
3363 @item mh-folder-body
3364 Body text face.
3365 @c -------------------------
3366 @item mh-folder-cur-msg-number
3367 Current message number face.
3368 @c -------------------------
3369 @item mh-folder-date
3370 Date face.
3371 @c -------------------------
3372 @item mh-folder-deleted
3373 Deleted message face.
3374 @c -------------------------
3375 @item mh-folder-followup
3376 @samp{Re:} face.
3377 @c -------------------------
3378 @item mh-folder-msg-number
3379 Message number face.
3380 @c -------------------------
3381 @item mh-folder-refiled
3382 Refiled message face.
3383 @c -------------------------
3384 @vindex mh-scan-format-nmh
3385 @vindex mh-scan-sent-to-me-sender-regexp
3386 @item mh-folder-sent-to-me-hint
3387 Fontification hint face in messages sent directly to us. The detection
3388 of messages sent to us is governed by the scan format
3389 @code{mh-scan-format-nmh} and regular expression
3390 @code{mh-scan-sent-to-me-sender-regexp}.
3391 @c -------------------------
3392 @vindex mh-scan-format-nmh
3393 @vindex mh-scan-sent-to-me-sender-regexp
3394 @item mh-folder-scan-format
3395 Sender face in messages sent directly to us. The detection of messages
3396 sent to us is governed by the scan format @code{mh-scan-format-nmh}
3397 and regular expression @code{mh-scan-sent-to-me-sender-regexp}.
3398 @c -------------------------
3399 @item mh-folder-subject
3400 Subject face.
3401 @c -------------------------
3402 @item mh-folder-tick
3403 Ticked message face.
3404 @c -------------------------
3405 @item mh-folder-to
3406 @samp{To:} face.
3407 @end vtable
3408
3409 @vindex mh-folder-mode-hook
3410
3411 The hook @code{mh-folder-mode-hook} is called when visiting a new
3412 folder in MH-Folder mode. This could be used to set your own key
3413 bindings, for example:
3414
3415 @vindex mh-folder-mode-hook, example
3416
3417 @smalllisp
3418 @group
3419 (defvar my-mh-init-done nil
3420 "Non-@code{nil} when one-time MH-E settings made.")
3421
3422 (defun my-mh-folder-mode-hook ()
3423 "Hook to set key bindings in MH-Folder mode."
3424 (if (not my-mh-init-done) ; @r{only need to bind the keys once }
3425 (progn
3426 (local-set-key "//" 'my-search-msg)
3427 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}}
3428 (setq my-mh-init-done t))))
3429
3430 (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
3431
3432 (defun my-search-msg ()
3433 "Search for a regexp in the current message."
3434 (interactive) ; @r{user function}
3435 (save-window-excursion
3436 (other-window 1) ; @r{go to next window}
3437 (isearch-forward-regexp))) ; @r{string search; hit return}
3438 ; @r{ when done}
3439
3440 @i{Create additional key bindings via mh-folder-mode-hook}
3441
3442 @end group
3443 @end smalllisp
3444
3445 @cindex @command{folder}
3446 @cindex @command{refile}
3447 @cindex MH commands, @command{folder}
3448 @cindex MH commands, @command{refile}
3449 @findex mh-refile-msg
3450 @kindex o
3451 @vindex mh-refile-msg-hook
3452
3453 MH-E has analogies for each of the MH @command{folder} and
3454 @command{refile} commands@footnote{See the sections
3455 @uref{@value{MH-BOOK-HOME}/fol.htm#Youfol, Your Current Folder:
3456 folder} and @uref{@value{MH-BOOK-HOME}/fol.htm#Movref, Moving and
3457 Linking Messages: refile} in the MH book.}. To refile a message in
3458 another folder, use the command @kbd{o} (@code{mh-refile-msg})
3459 (mnemonic: ``output''). You are prompted for the folder name
3460 (@pxref{Folder Selection}). Note that this command can also be used to
3461 create folders. If you specify a folder that does not exist, you will
3462 be prompted to create it. The hook @code{mh-refile-msg-hook} is called
3463 after a message is marked to be refiled.
3464
3465 @findex mh-write-msg-to-file
3466 @kindex !
3467
3468 If you are refiling several messages into the same folder, you can use
3469 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the
3470 last refile or write (for the description of @kbd{>}
3471 (@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a
3472 range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob
3473 @key{RET}}, @pxref{Ranges}).
3474
3475 @cindex expunging refiles and deletes
3476 @cindex undoing refiles and deletes
3477 @findex mh-undo
3478 @kindex u
3479
3480 If you've deleted a message or refiled it, but changed your mind, you
3481 can cancel the action before you've executed it. Use @kbd{u}
3482 (@code{mh-undo}) to undo a refile on or deletion of a single message.
3483 You can also undo refiles and deletes for messages that are found in a
3484 given range (@pxref{Ranges}).
3485
3486 @findex mh-undo-folder
3487 @kindex F u
3488
3489 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo
3490 all refiles and deletes in the current folder.
3491
3492 @findex mh-execute-commands
3493 @kindex x
3494
3495 If you've marked messages to be deleted or refiled and you want to go
3496 ahead and delete or refile the messages, use @kbd{x}
3497 (@code{mh-execute-commands}). Many MH-E commands that may affect the
3498 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if
3499 you want to process refiles or deletes first and then either run
3500 @kbd{x} for you or undo the pending refiles and deletes.
3501
3502 @kindex x
3503 @vindex mh-after-commands-processed-hook
3504 @vindex mh-before-commands-processed-hook
3505
3506 The command @kbd{x} runs @code{mh-before-commands-processed-hook}
3507 before the commands are processed and
3508 @code{mh-after-commands-processed-hook} after the commands are
3509 processed. Variables that are useful with the former hook include
3510 @code{mh-delete-list} and @code{mh-refile-list} which can be used to
3511 see which changes will be made to the current folder,
3512 @code{mh-current-folder}. Variables that are useful with the latter
3513 hook include @code{mh-folders-changed}, which lists which folders were
3514 affected by deletes and refiles. This list will always include the
3515 current folder @code{mh-current-folder}.
3516
3517 @findex mh-copy-msg
3518 @kindex c
3519 @kindex o
3520
3521 If you wish to copy a message to another folder, you can use the
3522 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
3523 to @command{refile}(1)). Like the command @kbd{o}, this command
3524 prompts you for the name of the target folder and you can specify a
3525 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy
3526 takes place immediately. The original copy remains in the current
3527 folder.
3528
3529 @cindex junk mail
3530 @cindex MH-Folder mode
3531 @cindex MH-Folder Show mode
3532 @cindex modes, MH-Folder
3533 @cindex modes, MH-Folder Show
3534 @cindex spam
3535 @findex mh-toggle-showing
3536 @kindex t
3537
3538 The command @kbd{t} (@code{mh-toggle-showing}) switches between
3539 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
3540 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off
3541 the associated show buffer so that you can perform operations on the
3542 messages quickly without reading them. This is an excellent way to
3543 prune out your junk mail or to refile a group of messages to another
3544 folder for later examination.
3545
3546 @cindex MH-Folder mode
3547 @cindex MH-Show mode
3548 @cindex modes, MH-Folder
3549 @cindex modes, MH-Show
3550 @cindex moving between messages
3551 @kindex t
3552 @vindex mh-recenter-summary-flag
3553
3554 When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder
3555 mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
3556 alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil}
3557 value causes the toggle to display as many scan lines as possible,
3558 with the cursor at the middle. The effect of
3559 @code{mh-recenter-summary-flag} is rather useful, but it can be
3560 annoying on a slow network connection.
3561
3562 @findex mh-visit-folder
3563 @kindex F v
3564 @vindex mh-large-folder
3565
3566 When you want to read the messages that you have refiled into folders,
3567 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the
3568 folder. You are prompted for the folder name. The folder buffer will
3569 show just unseen messages if there are any; otherwise, it will show
3570 all the messages in the buffer as long there are fewer than
3571 @code{mh-large-folder} messages. If there are more, then you are
3572 prompted for a range of messages to scan. You can provide a prefix
3573 argument in order to specify a range of messages to show when you
3574 visit the folder (@pxref{Ranges}). In this case, regions are not used
3575 to specify the range and @code{mh-large-folder} is ignored. Note that
3576 this command can also be used to create folders. If you specify a
3577 folder that does not exist, you will be prompted to create it.
3578
3579 @findex mh-search
3580 @kindex F s
3581
3582 If you forget where you've refiled your messages, you can find them
3583 using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3584
3585 @cindex @command{procmail}
3586 @cindex @samp{unseen} sequence
3587 @cindex sequence, @samp{unseen}
3588 @cindex Unix commands, @command{procmail}
3589 @cindex unseen messages, viewing
3590 @findex mh-index-new-messages
3591 @kindex F n
3592 @vindex mh-new-messages-folders
3593
3594 If you use a program such as @command{procmail} to file your incoming
3595 mail automatically, you can display new, unseen, messages using the
3596 command @kbd{F n} (@code{mh-index-new-messages}). All messages in the
3597 @samp{unseen} sequence from the folders in
3598 @code{mh-new-messages-folders} are listed. However, this list of
3599 folders can be overridden with a prefix argument: with a prefix
3600 argument, enter a space-separated list of folders, or nothing to
3601 search all folders.
3602
3603 @cindex @samp{tick} sequence
3604 @cindex sequence, @samp{tick}
3605 @cindex ticked messages, viewing
3606 @findex mh-index-ticked-messages
3607 @kindex F '
3608 @vindex mh-ticked-messages-folders
3609
3610 If you have ticked messages (@pxref{Sequences}), you can display them
3611 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
3612 messages in the @samp{tick} sequence from the folders in
3613 @code{mh-ticked-messages-folders} are listed. With a prefix argument,
3614 enter a space-separated list of folders, or nothing to search all
3615 folders.
3616
3617 @findex mh-index-sequenced-messages
3618 @kindex F q
3619 @vindex mh-new-messages-folders
3620
3621 You can display messages in any sequence with the command @kbd{F q}
3622 (@code{mh-index-sequenced-messages}). All messages from the folders in
3623 @code{mh-new-messages-folders} in the sequence you provide are listed.
3624 With a prefix argument, enter a space-separated list of folders at the
3625 prompt, or nothing to search all folders.
3626
3627 @vindex mh-new-messages-folders
3628 @vindex mh-recursive-folders-flag
3629 @vindex mh-ticked-messages-folders
3630
3631 Set the options @code{mh-new-messages-folders} and
3632 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the
3633 @samp{+inbox} folder or @samp{All} to search all of the top level
3634 folders. Otherwise, list the folders that should be searched with the
3635 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
3636
3637 @cindex buffers, @samp{*MH-E Folders*}
3638 @cindex @samp{*MH-E Folders*}
3639 @findex mh-kill-folder
3640 @findex mh-list-folders
3641 @findex mh-pack-folder
3642 @findex mh-rescan-folder
3643 @findex mh-sort-folder
3644 @kindex F k
3645 @kindex F l
3646 @kindex F p
3647 @kindex F r
3648 @kindex F S
3649
3650 Other commands you can perform on folders include: @kbd{F l}
3651 (@code{mh-list-folders}), to place a listing of all the folders in
3652 your mail directory in a buffer called @samp{*MH-E Folders*}
3653 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove
3654 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by
3655 date (see @command{sortm}(1) to see how to sort by other criteria);
3656 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps
3657 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}),
3658 to rescan the folder, which is useful to grab all messages in your
3659 @samp{+inbox} after processing your new mail for the first time. If
3660 you don't want to rescan the entire folder, the commands @kbd{F r} or
3661 @kbd{F p} will accept a range (@pxref{Ranges}).
3662
3663 @kindex @key{TAB}
3664 @vindex mh-recursive-folders-flag
3665
3666 By default, operations on folders work only one level at a time. Set
3667 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
3668 folders. This mostly means that you'll be able to see all your folders
3669 when you press @key{TAB} when prompted for a folder name.
3670
3671 @findex mh-search-p
3672 @kindex k
3673 @vindex mh-kill-folder-suppress-prompt-hooks
3674
3675 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
3676 hook run at the beginning of the command @kbd{k}. The hook functions
3677 are called with no arguments and should return a non-nil value to
3678 suppress the normal prompt when you remove a folder. This is useful
3679 for folders that are easily regenerated. The default value of
3680 @code{mh-search-p} suppresses the prompt on folders generated by
3681 searching.
3682
3683 @sp 1
3684 @center @strong{NOTE}
3685
3686 @quotation
3687 Use this hook with care. If there is a bug in your hook which returns
3688 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
3689 @code{+inbox} folder, you will not be happy.
3690 @end quotation
3691 @sp 1
3692
3693 @cindex @command{sortm}
3694 @cindex @file{.mh_profile}
3695 @cindex files, @file{.mh_profile}
3696 @cindex MH commands, @command{sortm}
3697 @cindex MH profile component, @samp{sortm:}
3698 @cindex @samp{sortm:} MH profile component
3699 @kindex F S
3700 @vindex mh-sortm-args
3701
3702 The option @code{mh-sortm-args} holds extra arguments to pass on to
3703 the command @command{sortm}@footnote{See the section
3704 @uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the
3705 MH book.} when a prefix argument is used with @kbd{F S}. Normally
3706 default arguments to @command{sortm} are specified in the MH profile.
3707 This option may be used to provide an alternate view. For example,
3708 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting.
3709
3710 @cindex exiting
3711 @cindex quitting
3712 @findex mh-quit
3713 @kindex q
3714
3715 When you want to quit using MH-E and go back to editing, you can use
3716 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
3717 current MH-E folder and restores the buffers that were present when
3718 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working
3719 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E }
3720 (@pxref{Miscellaneous}). You can later restore your MH-E session by
3721 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
3722 again.
3723
3724 @findex mh-execute-commands
3725 @kindex q
3726 @vindex mh-before-quit-hook
3727 @vindex mh-before-quit-hook, example
3728 @vindex mh-quit-hook
3729 @vindex mh-quit-hook, example
3730
3731 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3732 called by @kbd{q}. The former one is called before the quit occurs, so
3733 you might use it to perform any MH-E operations; you could perform
3734 some query and abort the quit or call @code{mh-execute-commands}, for
3735 example. The latter is not run in an MH-E context, so you might use it
3736 to modify the window setup. If you find that @kbd{q} buries a lot of
3737 buffers that you would rather remove, you can use both
3738 @code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that.
3739
3740 @smalllisp
3741 @group
3742 (defvar my-mh-folder-buffer-to-delete nil
3743 "Folder buffer that is being quit.")
3744
3745 (defun my-mh-before-quit-hook ()
3746 "Save folder buffer that is to be deleted."
3747 (setq my-mh-folder-buffer-to-delete (current-buffer)))
3748
3749 (defun my-mh-quit-hook ()
3750 "Kill folder buffer rather than just bury it."
3751 (set-buffer my-mh-folder-buffer-to-delete)
3752 (if (get-buffer mh-show-buffer)
3753 (kill-buffer mh-show-buffer))
3754 (kill-buffer (current-buffer)))
3755
3756 @i{Kill MH-Folder buffer instead of burying it}
3757 @end group
3758 @end smalllisp
3759
3760 @cindex folders, renaming
3761 @cindex renaming folders
3762 @findex dired
3763 @findex dired-do-rename
3764
3765 You can use dired to manipulate the folders themselves. For example, I
3766 renamed my @samp{+out} folder to the more common @samp{+outbox} by
3767 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}),
3768 moving my cursor to @samp{out} and using the command @kbd{R}
3769 (@code{dired-do-rename}).
3770
3771 @node Sending Mail, Editing Drafts, Folders, Top
3772 @chapter Sending Mail
3773
3774 @cindex sending mail
3775 @findex mh-smail
3776 @kindex M-x mh-smail
3777
3778 You can send a mail message in several ways. You can call @kbd{M-x
3779 mh-smail} directly, or from the command line like this:
3780
3781 @cindex starting from command line
3782
3783 @smallexample
3784 $ @kbd{emacs -f mh-smail}
3785 @end smallexample
3786
3787 @findex goto-address-at-point
3788 @vindex mail-user-agent
3789
3790 There are some commands that need to send a mail message, such as
3791 @code{goto-address-at-point}. You can configure Emacs to have these
3792 commands use MH-E by setting the option @code{mail-user-agent} to
3793 @samp{Emacs interface to MH}.
3794
3795 @cindex @samp{Message} menu
3796 @cindex menu, @samp{Message}
3797
3798 From within MH-E's MH-Folder mode, other methods of sending mail are
3799 available as well. These can also be found in the @samp{Message} menu.
3800
3801 @table @kbd
3802 @cindex @samp{Message > Edit Message Again} menu item
3803 @cindex menu item, @samp{Message > Edit Message Again}
3804 @kindex e
3805 @findex mh-edit-again
3806 @item e
3807 Edit a message to send it again (@code{mh-edit-again}).
3808 @c -------------------------
3809 @cindex @samp{Message > Re-edit a Bounced Message} menu item
3810 @cindex menu item, @samp{Message > Re-edit a Bounced Message}
3811 @kindex E
3812 @findex mh-extract-rejected-mail
3813 @item E
3814 Edit a message that was returned by the mail system
3815 (@code{mh-extract-rejected-mail}).
3816 @c -------------------------
3817 @cindex @samp{Message > Forward Message...} menu item
3818 @cindex menu item, @samp{Message > Forward Message...}
3819 @kindex f
3820 @findex mh-forward
3821 @item f
3822 Forward message (@code{mh-forward}).
3823 @c -------------------------
3824 @cindex @samp{Message > Reply to Message...} menu item
3825 @cindex menu item, @samp{Message > Reply to Message...}
3826 @kindex r
3827 @findex mh-reply
3828 @item r
3829 Reply to a message (@code{mh-reply}).
3830 @c -------------------------
3831 @cindex @samp{Message > Compose a New Message} menu item
3832 @cindex menu item, @samp{Message > Compose a New Message}
3833 @kindex s
3834 @findex mh-send
3835 @item s
3836 Compose a message (@code{mh-send}).
3837 @c -------------------------
3838 @cindex @samp{Message > Redistribute Message...} menu item
3839 @cindex menu item, @samp{Message > Redistribute Message...}
3840 @kindex M-d
3841 @findex mh-redistribute
3842 @item M-d
3843 Redistribute a message (@code{mh-redistribute}).
3844 @c -------------------------
3845 @findex mh-smail
3846 @item M-x mh-smail
3847 Compose a message with the MH mail system.
3848 @c -------------------------
3849 @findex mh-smail-other-window
3850 @item M-x mh-smail-other-window
3851 Compose a message with the MH mail system in other window.
3852 @end table
3853
3854 @cindex @samp{mh-sending-mail} customization group
3855 @cindex customization group, @samp{mh-sending-mail}
3856
3857 In addition, several options from the @samp{mh-sending-mail}
3858 customization group are useful when sending mail or replying to mail.
3859 They are summarized in the following table.
3860
3861 @vtable @code
3862 @item mh-compose-forward-as-mime-flag
3863 On means that messages are forwarded as attachments (default:
3864 @samp{on}).
3865 @c -------------------------
3866 @item mh-compose-letter-function
3867 Hook run when starting a new draft (default: @code{nil}).
3868 @c -------------------------
3869 @item mh-compose-prompt-flag
3870 On means prompt for header fields when composing a new draft (default:
3871 @samp{off}).
3872 @c -------------------------
3873 @item mh-forward-subject-format
3874 Format string for forwarded message subject (default: @code{"%s:
3875 %s"}).
3876 @c -------------------------
3877 @item mh-insert-x-mailer-flag
3878 On means append an @samp{X-Mailer:} header field to the header
3879 (default: @samp{on}).
3880 @c -------------------------
3881 @item mh-redist-full-contents-flag
3882 On means the @command{dist} command needs entire letter for
3883 redistribution (default: @samp{off}).
3884 @c -------------------------
3885 @item mh-reply-default-reply-to
3886 Sets the person or persons to whom a reply will be sent (default:
3887 @samp{Prompt}).
3888 @c -------------------------
3889 @item mh-reply-show-message-flag
3890 On means the MH-Show buffer is displayed using @kbd{r}
3891 (@code{mh-reply}) (default: @samp{on}).
3892 @end vtable
3893
3894 The following hooks are available.
3895
3896 @vtable @code
3897 @item mh-forward-hook
3898 Hook run by @code{mh-forward} on a forwarded letter (default:
3899 @code{nil}).
3900 @c -------------------------
3901 @item mh-letter-mode-hook
3902 Hook run by @code{mh-letter-mode} on a new letter (default:
3903 @code{nil}).
3904 @end vtable
3905
3906 The functions and options introduced here are explained in more detail
3907 in the following sections.
3908
3909 @menu
3910 * Composing::
3911 * Replying::
3912 * Forwarding::
3913 * Redistributing::
3914 * Editing Again::
3915 @end menu
3916
3917 @node Composing, Replying, Sending Mail, Sending Mail
3918 @section Composing
3919
3920 @cindex @file{.emacs}
3921 @cindex MH-Folder mode
3922 @cindex composing mail
3923 @cindex draft
3924 @cindex files, @file{.emacs}
3925 @cindex modes, MH-Folder
3926 @cindex sending mail
3927 @findex mh-smail
3928 @findex mh-smail-other-window
3929 @kindex M-x mh-smail
3930 @kindex M-x mh-smail-other-window
3931
3932 Outside of an MH-Folder buffer, you must call either @kbd{M-x
3933 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
3934 The former command always creates a two-window layout with the current
3935 buffer on top and the draft on the bottom. Use the latter command if
3936 you would rather preserve the window layout. You may find adding the
3937 following key bindings to @file{~/.emacs} useful:
3938
3939 @smalllisp
3940 (global-set-key "\C-xm" 'mh-smail)
3941 (global-set-key "\C-x4m" 'mh-smail-other-window)
3942 @end smalllisp
3943
3944 @cindex draft folder
3945 @cindex MH-Letter mode
3946 @cindex modes, MH-Letter
3947 @findex mh-send
3948 @kindex m
3949
3950 From within a MH-Folder buffer, you can simply use the command @kbd{m}
3951 (@code{mh-send}). However you invoke @code{mh-send}, your letter
3952 appears in an Emacs buffer whose mode is MH-Letter (to see what the
3953 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows
3954 you to edit your message, to check the validity of the recipients, to
3955 insert attachments and other messages into your message, and to send
3956 the message. We'll go more into depth about editing a
3957 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft
3958 folder} so that you can edit several drafts in parallel. To do so,
3959 create a folder named @samp{+drafts} for example, and add the profile
3960 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a
3961 message you're composing) in just a moment (@pxref{Editing Drafts}).
3962
3963 @vindex mh-compose-prompt-flag
3964
3965 If you prefer to be prompted for the recipient and subject fields
3966 before the MH-Letter buffer appears, turn on the option
3967 @code{mh-compose-prompt-flag}.
3968
3969 @cindex header field, @samp{X-Mailer:}
3970 @cindex @samp{X-Mailer:} header field
3971 @vindex mh-insert-x-mailer-flag
3972
3973 MH-E adds an @samp{X-Mailer:} header field to the header that includes
3974 the version of MH-E and Emacs that you are using. If you don't want to
3975 participate in our marketing, you can turn off the option
3976 @code{mh-insert-x-mailer-flag}.
3977
3978 @cindex @command{repl}
3979 @cindex @file{components}
3980 @cindex MH commands, @command{repl}
3981 @cindex MH-Letter mode
3982 @cindex Mail mode
3983 @cindex files, @file{components}
3984 @cindex modes, MH-Letter
3985 @cindex modes, Mail
3986 @vindex mail-mode-hook
3987 @vindex mh-letter-mode-hook
3988 @vindex text-mode-hook
3989
3990 Two hooks are provided to run commands on your freshly created draft.
3991 The first hook, @code{mh-letter-mode-hook}, allows you to do some
3992 processing before editing a letter@footnote{Actually, because
3993 MH-Letter mode inherits from Mail mode, the hooks
3994 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that
3995 order) before @code{mh-letter-mode-hook}.}. For example, you may wish
3996 to modify the header after @command{repl} has done its work, or you
3997 may have a complicated @file{components} file and need to tell MH-E
3998 where the cursor should go. Here's an example of how you would use
3999 this hook.
4000
4001 @findex mh-insert-signature, example
4002
4003 @smalllisp
4004 @group
4005 (defvar letter-mode-init-done-flag nil
4006 "Non-nil means one-time MH-E settings have been made.")
4007
4008 (defun my-mh-letter-mode-hook ()
4009 "Prepare letter for editing."
4010 (when (not letter-mode-init-done) ; @r{only need to bind the keys once}
4011 (local-set-key "\C-ctb" 'add-enriched-text)
4012 (local-set-key "\C-cti" 'add-enriched-text)
4013 (local-set-key "\C-ctf" 'add-enriched-text)
4014 (local-set-key "\C-cts" 'add-enriched-text)
4015 (local-set-key "\C-ctB" 'add-enriched-text)
4016 (local-set-key "\C-ctu" 'add-enriched-text)
4017 (local-set-key "\C-ctc" 'add-enriched-text)
4018 (setq letter-mode-init-done t))
4019 (save-excursion
4020 (goto-char (point-max)) ; @r{go to end of message to}
4021 (mh-insert-signature))) ; @r{insert signature}
4022
4023 @i{Prepare draft for editing via mh-letter-mode-hook}
4024
4025 @end group
4026 @end smalllisp
4027
4028 The function, @code{add-enriched-text} is defined in the example in
4029 @ref{Adding Attachments}.
4030
4031 @vindex mh-compose-letter-function
4032 @vindex mh-letter-mode-hook
4033
4034 The second hook, a function really, is
4035 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
4036 is called just before editing a new message; however, it is the last
4037 function called before you edit your message. The consequence of this
4038 is that you can write a function to write and send the message for
4039 you. This function is passed three arguments: the contents of the
4040 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields.
4041
4042 @node Replying, Forwarding, Composing, Sending Mail
4043 @section Replying to Mail
4044
4045 @cindex @command{mhl}
4046 @cindex @file{mhl.reply}
4047 @cindex MH commands, @command{mhl}
4048 @cindex files, @file{mhl.reply}
4049 @cindex replying
4050 @findex mh-reply
4051 @kindex r
4052
4053 To compose a reply to a message, use the @kbd{r} (@code{mh-reply})
4054 command.
4055
4056 When you reply to a message, you are first prompted with @samp{Reply
4057 to whom?}. You have several choices here.
4058
4059 @quotation
4060 @multitable @columnfractions .20 .80
4061 @c @headitem Response @tab Reply Goes To
4062 @c XXX @headitem not yet supported by SourceForge's texi2pdf.
4063 @item @b{Response} @tab @b{Reply Goes To}
4064 @c -------------------------
4065 @item @kbd{from}
4066 @tab
4067 The person who sent the message. This is the default, so @key{RET} is
4068 sufficient.
4069 @c -------------------------
4070 @item @kbd{to}
4071 @tab
4072 Replies to the sender, plus all recipients in the @samp{To:} header field.
4073 @c -------------------------
4074 @item @kbd{cc}@*@kbd{all}
4075 @tab
4076 Forms a reply to the addresses in the @samp{Mail-Followup-To:} header
4077 field if one exists; otherwise forms a reply to the sender, plus all
4078 recipients.
4079 @end multitable
4080 @end quotation
4081
4082 @cindex @command{repl}
4083 @cindex MH commands, @command{repl}
4084 @vindex mh-reply-default-reply-to
4085
4086 Depending on your answer, @command{repl}@footnote{See the section
4087 @uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
4088 the MH book.} is given a different argument to form your reply.
4089 Specifically, a choice of @kbd{from} or none at all runs @samp{repl
4090 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
4091 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you
4092 find that most of the time you specify one of these choices when you
4093 reply to a message, you can change the option
4094 @code{mh-reply-default-reply-to} from its default value of
4095 @samp{Prompt} to one of the choices listed above. You can always edit
4096 the recipients in the draft.
4097
4098 @cindex @samp{repl:} MH profile component
4099 @cindex MH profile component, @samp{repl:}
4100 @cindex MH-Letter mode
4101 @cindex MH-Show mode
4102 @cindex draft
4103 @cindex modes, MH-Letter
4104 @cindex modes, MH-Show
4105
4106 Two windows are then created. One window contains the message to which
4107 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
4108 (@pxref{Editing Drafts}), is in the other window. If the reply draft
4109 was not one that you expected, check the things that affect the
4110 behavior of @command{repl} which include the @samp{repl:} profile
4111 component and the @file{replcomps} and @file{replgroupcomps} files.
4112
4113 If you supply a prefix argument (as in @kbd{C-u r}), the message you
4114 are replying to is inserted in your reply after having first been run
4115 through @command{mhl} with the format file @file{mhl.reply}. See
4116 @command{mhl}(1) or the section
4117 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
4118 book to see how you can modify the default @file{mhl.reply} file.
4119
4120 @vindex mh-yank-behavior
4121
4122 Alternatively, you can customize the option @code{mh-yank-behavior}
4123 and choose one of its @samp{Automatically} variants to do the same
4124 thing. @xref{Inserting Letter}. If you do so, the prefix argument has
4125 no effect.
4126
4127 Another way to include the message automatically in your draft is to
4128 use @samp{repl: -filter repl.filter} in your MH profile.
4129
4130 @vindex mh-reply-show-message-flag
4131
4132 If you include the message automatically, you can hide the MH-Show
4133 buffer by turning off the option @code{mh-reply-show-message-flag}.
4134
4135 If you wish to customize the header or other parts of the reply draft,
4136 please see @command{repl}(1) and @code{mh-format}(5).
4137
4138 @node Forwarding, Redistributing, Replying, Sending Mail
4139 @section Forwarding Mail
4140
4141 @cindex @command{forw}
4142 @cindex draft
4143 @cindex forwarding
4144 @cindex MH commands, @command{forw}
4145 @findex mh-forward
4146 @kindex f
4147 @vindex mh-forward-hook
4148
4149 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
4150 are prompted for the @samp{To:} and @samp{cc:} recipients. You are
4151 given a draft to edit that looks like it would if you had run the MH
4152 command @command{forw}@footnote{See the section
4153 @uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in
4154 the MH book.}. You can then add some text (@pxref{Editing Drafts}).
4155 You can forward several messages by using a range (@pxref{Ranges}).
4156 All of the messages in the range are inserted into your draft. The
4157 hook @code{mh-forward-hook} is called on the draft.
4158
4159 @cindex @file{.mh_profile}
4160 @cindex files, @file{.mh_profile}
4161 @cindex MH profile component, @samp{forw:}
4162 @cindex @samp{forw:} MH profile component
4163 @vindex mh-compose-forward-as-mime-flag
4164
4165 By default, the option @code{mh-compose-forward-as-mime-flag} is on
4166 which means that the forwarded messages are included as attachments.
4167 If you would prefer to forward your messages verbatim (as text,
4168 inline), then turn off this option. Forwarding messages verbatim works
4169 well for short, textual messages, but your recipient won't be able to
4170 view any non-textual attachments that were in the forwarded message.
4171 Be aware that if you have @samp{forw: -mime} in your MH profile, then
4172 forwarded messages will always be included as attachments regardless
4173 of the settings of @code{mh-compose-forward-as-mime-flag}.
4174
4175 @vindex mh-forward-subject-format
4176
4177 The format of the @samp{Subject:} header field for forwarded messages
4178 is controlled by the option @code{mh-forward-subject-format}. This
4179 option is a string which includes two escapes (@samp{%s}). The first
4180 @samp{%s} is replaced with the sender of the original message, and the
4181 second one is replaced with the original @samp{Subject:}. The default
4182 value of @code{"%s: %s"} takes a message with the header:
4183
4184 @smallexample
4185 @group
4186 To: Bill Wohler <wohler@@stop.mail-abuse.org>
4187 Subject: Re: 49er football
4188 From: Greg DesBrisay <gd@@stop.mail-abuse.org>
4189 @end group
4190 @end smallexample
4191
4192 and creates a subject header field of:
4193
4194 @smallexample
4195 Subject: Greg DesBrisay: Re: 49er football
4196 @end smallexample
4197
4198 @node Redistributing, Editing Again, Forwarding, Sending Mail
4199 @section Redistributing Your Mail
4200
4201 @cindex @command{dist}
4202 @cindex MH commands, @command{dist}
4203 @cindex redistributing
4204 @findex mh-redistribute
4205 @kindex M-d
4206
4207 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function
4208 to forwarding mail, but it does not allow you to edit the message, nor
4209 does it add your name to the @samp{From:} header field. It appears to
4210 the recipient as if the message had come from the original sender.
4211 When you run this command, you are prompted for the recipients.
4212
4213 @findex mh-edit-again
4214 @kindex e
4215
4216 For more information on redistributing messages, see
4217 @command{dist}(1). Also investigate the command @kbd{e}
4218 (@code{mh-edit-again}) for another way to redistribute messages
4219 (@pxref{Editing Again}).
4220
4221 @cindex @command{send}
4222 @cindex MH commands, @command{send}
4223 @vindex mh-redist-full-contents-flag
4224
4225 The option @code{mh-redist-full-contents-flag} must be turned on if
4226 @command{dist}@footnote{See the section
4227 @uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with
4228 dist} in the MH book.} requires the whole letter for redistribution,
4229 which is the case if @command{send}@footnote{See the section
4230 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
4231 in the MH book.} is compiled with the @sc{berk} option (which many
4232 people abhor). If you find that MH will not allow you to redistribute
4233 a message that has been redistributed before, turn off this option.
4234
4235 @node Editing Again, , Redistributing, Sending Mail
4236 @section Editing Old Drafts and Bounced Messages
4237
4238 @cindex @file{draft}
4239 @cindex files, @file{draft}
4240 @cindex re-editing drafts
4241 @findex mh-edit-again
4242 @kindex F v drafts
4243 @kindex e
4244 @kindex n
4245
4246 If you don't complete a draft for one reason or another, and if the
4247 draft buffer is no longer available, you can pick your draft up again
4248 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft
4249 folder, your last @file{draft} file will be used. If you use draft
4250 folders, you'll need to visit the draft folder with @kbd{F v drafts
4251 @key{RET}}, use @kbd{n} to move to the appropriate message, and then
4252 use @kbd{e} to prepare the message for editing.
4253
4254 @kindex e
4255
4256 The @kbd{e} command can also be used to take messages that were sent
4257 to you and to send them to more people.
4258
4259 @cindex Mailer-Daemon
4260 @findex mh-extract-rejected-mail
4261 @kindex C-c C-c
4262 @kindex E
4263
4264 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
4265 complained that your mail wasn't posted for some reason or another. In
4266 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare
4267 the message for editing by removing the @i{Mailer-Daemon} envelope and
4268 unneeded header fields. Fix whatever addressing problem you had, and
4269 send the message again with @kbd{C-c C-c}.
4270
4271 @node Editing Drafts, Aliases, Sending Mail, Top
4272 @chapter Editing a Draft
4273
4274 @cindex @samp{Letter} menu
4275 @cindex MH-Letter mode
4276 @cindex draft
4277 @cindex editing draft
4278 @cindex menu, @samp{Letter}
4279 @cindex modes, MH-Letter
4280
4281 When you edit a message that you want to send (called a @dfn{draft} in
4282 this case), the mode used is MH-Letter. This mode provides several
4283 commands in addition to the normal Emacs editing commands to help you
4284 edit your draft. These can also be found in the @samp{Letter} menu.
4285
4286 @table @kbd
4287 @kindex @key{SPC}
4288 @findex mh-letter-complete-or-space
4289 @item @key{SPC}
4290 Perform completion or insert space (@code{mh-letter-complete-or-space}).
4291 @c -------------------------
4292 @kindex M-@key{TAB}
4293 @findex mh-letter-complete
4294 @item M-@key{TAB}
4295 Perform completion on header field or word preceding point
4296 (@code{mh-letter-complete}).
4297 @c -------------------------
4298 @kindex , (comma)
4299 @findex mh-letter-confirm-address
4300 @item , (comma)
4301 Flash alias expansion (@code{mh-letter-confirm-address}).
4302 @c -------------------------
4303 @kindex @key{TAB}
4304 @findex mh-letter-next-header-field-or-indent
4305 @item @key{TAB}
4306 Cycle to next field (@code{mh-letter-next-header-field-or-indent}).
4307 @c -------------------------
4308 @kindex S-@key{TAB}
4309 @findex mh-letter-previous-header-field
4310 @item S-@key{TAB}
4311 Cycle to the previous header field
4312 (@code{mh-letter-previous-header-field}).
4313 @c -------------------------
4314 @kindex C-c ?
4315 @findex mh-help
4316 @item C-c ?
4317 Display cheat sheet for the MH-E commands (@code{mh-help}).
4318 @c -------------------------
4319 @cindex @samp{Letter > Send This Draft} menu item
4320 @cindex menu item, @samp{Letter > Send This Draft}
4321 @kindex C-c C-c
4322 @findex mh-send-letter
4323 @item C-c C-c
4324 Save draft and send message (@code{mh-send-letter}).
4325 @c -------------------------
4326 @kindex C-c C-d
4327 @findex mh-insert-identity
4328 @item C-c C-d
4329 Insert fields specified by the given identity
4330 (@code{mh-insert-identity}). @xref{Identities}.
4331 @c -------------------------
4332 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item
4333 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)}
4334 @kindex C-c C-e
4335 @findex mh-mh-to-mime
4336 @item C-c C-e
4337 Compose @sc{mime} message from MH-style directives
4338 (@code{mh-mh-to-mime}).
4339 @c -------------------------
4340 @kindex C-c C-f C-a
4341 @kindex C-c C-f a
4342 @findex mh-to-field
4343 @item C-c C-f C-a
4344 @itemx C-c C-f a
4345 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
4346 @c -------------------------
4347 @kindex C-c C-f C-b
4348 @kindex C-c C-f b
4349 @item C-c C-f C-b
4350 @itemx C-c C-f b
4351 Move to @samp{Bcc:} header field (@code{mh-to-field}).
4352 @c -------------------------
4353 @kindex C-c C-f C-c
4354 @kindex C-c C-f c
4355 @item C-c C-f C-c
4356 @itemx C-c C-f c
4357 Move to @samp{Cc:} header field (@code{mh-to-field}).
4358 @c -------------------------
4359 @kindex C-c C-f C-d
4360 @kindex C-c C-f d
4361 @item C-c C-f C-d
4362 @itemx C-c C-f d
4363 Move to @samp{Dcc:} header field (@code{mh-to-field}).
4364 @c -------------------------
4365 @kindex C-c C-f C-f
4366 @kindex C-c C-f f
4367 @findex mh-to-fcc
4368 @item C-c C-f C-f
4369 @itemx C-c C-f f
4370 Move to @samp{Fcc:} header field (@code{mh-to-fcc}).
4371 @c -------------------------
4372 @kindex C-c C-f C-l
4373 @kindex C-c C-f l
4374 @item C-c C-f C-l
4375 @itemx C-c C-f l
4376 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
4377 @c -------------------------
4378 @kindex C-c C-f C-m
4379 @kindex C-c C-f m
4380 @item C-c C-f C-m
4381 @itemx C-c C-f m
4382 Move to @samp{From:} header field (@code{mh-to-field}).
4383 @c -------------------------
4384 @kindex C-c C-f C-r
4385 @kindex C-c C-f r
4386 @item C-c C-f C-r
4387 @itemx C-c C-f r
4388 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
4389 @c -------------------------
4390 @kindex C-c C-f C-s
4391 @kindex C-c C-f s
4392 @item C-c C-f C-s
4393 @itemx C-c C-f s
4394 Move to @samp{Subject:} header field (@code{mh-to-field}).
4395 @c -------------------------
4396 @kindex C-c C-f C-t
4397 @kindex C-c C-f t
4398 @item C-c C-f C-t
4399 @itemx C-c C-f t
4400 Move to @samp{To:} header field (@code{mh-to-field}).
4401 @c -------------------------
4402 @cindex @samp{Letter > Insert a Message...} menu item
4403 @cindex menu item, @samp{Letter > Insert a Message...}
4404 @kindex C-c C-i
4405 @findex mh-insert-letter
4406 @item C-c C-i
4407 Insert a message (@code{mh-insert-letter}).
4408 @c -------------------------
4409 @kindex C-c C-m C-e
4410 @findex mh-mml-secure-message-encrypt
4411 @item C-c C-m C-e
4412 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4413 @c -------------------------
4414 @cindex @samp{Letter > Compose Forward...} menu item
4415 @cindex menu item, @samp{Letter > Compose Forward...}
4416 @kindex C-c C-m C-f
4417 @kindex C-c C-m f
4418 @findex mh-compose-forward
4419 @item C-c C-m C-f
4420 @itemx C-c C-m f
4421 Add tag to forward a message (@code{mh-compose-forward}).
4422 @c -------------------------
4423 @cindex @samp{Letter > Compose Get File (MH)...} menu item
4424 @cindex menu item, @samp{Letter > Compose Get File (MH)...}
4425 @kindex C-c C-m C-g
4426 @kindex C-c C-m g
4427 @findex mh-mh-compose-anon-ftp
4428 @item C-c C-m C-g
4429 @itemx C-c C-m g
4430 Add tag to include anonymous ftp reference to a file
4431 (@code{mh-mh-compose-anon-ftp}).
4432 @c -------------------------
4433 @cindex @samp{Letter > Compose Insertion...} menu item
4434 @cindex menu item, @samp{Letter > Compose Insertion...}
4435 @kindex C-c C-m C-i
4436 @kindex C-c C-m i
4437 @findex mh-compose-insertion
4438 @item C-c C-m C-i
4439 @itemx C-c C-m i
4440 Add tag to include a file such as an image or sound
4441 (@code{mh-compose-insertion}).
4442 @c -------------------------
4443 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item
4444 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)}
4445 @kindex C-c C-m C-m
4446 @kindex C-c C-m m
4447 @findex mh-mml-to-mime
4448 @item C-c C-m C-m
4449 @itemx C-c C-m m
4450 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}).
4451 @c -------------------------
4452 @kindex C-c C-m C-n
4453 @kindex C-c C-m n
4454 @findex mh-mml-unsecure-message
4455 @item C-c C-m C-n
4456 @itemx C-c C-m n
4457 Remove any secure message tags (@code{mh-mml-unsecure-message}).
4458 @c -------------------------
4459 @kindex C-c C-m C-s
4460 @findex mh-mml-secure-message-sign
4461 @item C-c C-m C-s
4462 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4463 @c -------------------------
4464 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item
4465 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...}
4466 @kindex C-c C-m C-t
4467 @kindex C-c C-m t
4468 @findex mh-mh-compose-external-compressed-tar
4469 @item C-c C-m C-t
4470 @itemx C-c C-m t
4471 Add tag to include anonymous ftp reference to a compressed tar file
4472 (@code{mh-mh-compose-external-compressed-tar}).
4473 @c -------------------------
4474 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item
4475 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)}
4476 @kindex C-c C-m C-u
4477 @kindex C-c C-m u
4478 @findex mh-mh-to-mime-undo
4479 @item C-c C-m C-u
4480 @itemx C-c C-m u
4481 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}).
4482 @c -------------------------
4483 @kindex C-c C-m C-x
4484 @kindex C-c C-m x
4485 @findex mh-mh-compose-external-type
4486 @item C-c C-m C-x
4487 @itemx C-c C-m x
4488 Add tag to refer to a remote file
4489 (@code{mh-mh-compose-external-type}).
4490 @c -------------------------
4491 @kindex C-c C-m e e
4492 @findex mh-mml-secure-message-encrypt
4493 @item C-c C-m e e
4494 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4495 @c -------------------------
4496 @kindex C-c C-m e s
4497 @findex mh-mml-secure-message-signencrypt
4498 @item C-c C-m e s
4499 Add tag to encrypt and sign the message@*
4500 (@code{mh-mml-secure-message-signencrypt}).
4501 @c -------------------------
4502 @kindex C-c C-m s e
4503 @findex mh-mml-secure-message-signencrypt
4504 @item C-c C-m s e
4505 Add tag to encrypt and sign the message@*
4506 (@code{mh-mml-secure-message-signencrypt}).
4507 @c -------------------------
4508 @kindex C-c C-m s s
4509 @findex mh-mml-secure-message-sign
4510 @item C-c C-m s s
4511 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4512 @c -------------------------
4513 @cindex @samp{Letter > Split Current Line} menu item
4514 @cindex menu item, @samp{Letter > Split Current Line}
4515 @kindex C-c C-o
4516 @findex mh-open-line
4517 @item C-c C-o
4518 Insert a newline and leave point before it (@code{mh-open-line}).
4519 @c -------------------------
4520 @cindex @samp{Letter > Kill This Draft} menu item
4521 @cindex menu item, @samp{Letter > Kill This Draft}
4522 @kindex C-c C-q
4523 @findex mh-fully-kill-draft
4524 @item C-c C-q
4525 Quit editing and delete draft message (@code{mh-fully-kill-draft}).
4526 @c -------------------------
4527 @cindex @samp{Letter > Insert Signature} menu item
4528 @cindex menu item, @samp{Letter > Insert Signature}
4529 @kindex C-c C-s
4530 @findex mh-insert-signature
4531 @item C-c C-s
4532 Insert signature in message (@code{mh-insert-signature}).
4533 @c -------------------------
4534 @kindex C-c C-t
4535 @findex mh-letter-toggle-header-field-display
4536 @item C-c C-t
4537 Toggle display of header field at point
4538 (@code{mh-letter-toggle-header-field-display}).
4539 @c -------------------------
4540 @cindex @samp{Letter > Check Recipient} menu item
4541 @cindex menu item, @samp{Letter > Check Recipient}
4542 @kindex C-c C-w
4543 @findex mh-check-whom
4544 @item C-c C-w
4545 Verify recipients, showing expansion of any aliases
4546 (@code{mh-check-whom}).
4547 @c -------------------------
4548 @cindex @samp{Letter > Yank Current Message} menu item
4549 @cindex menu item, @samp{Letter > Yank Current Message}
4550 @kindex C-c C-y
4551 @findex mh-yank-cur-msg
4552 @item C-c C-y
4553 Insert the current message into the draft buffer
4554 (@code{mh-yank-cur-msg}).
4555 @c -------------------------
4556 @kindex C-c M-d
4557 @findex mh-insert-auto-fields
4558 @item C-c M-d
4559 Insert custom fields if recipient is found in
4560 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}).
4561 @xref{Identities}.
4562 @end table
4563
4564 @cindex @samp{mh-letter} customization group
4565 @cindex customization group, @samp{mh-letter}
4566
4567 Several options from the @samp{mh-letter} customization group are used
4568 while editing a draft.
4569
4570 @vtable @code
4571 @item mh-compose-insertion
4572 Type of @sc{mime} message tags in messages (default: @samp{MML} if
4573 available; otherwise @samp{MH}).
4574 @c -------------------------
4575 @item mh-compose-skipped-header-fields
4576 List of header fields to skip over when navigating in draft (default:
4577 @code{'("From"} @code{"Organization"} @code{"References"}
4578 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"}
4579 @code{"X-Image-URL"} @code{"X-Mailer")}.
4580 @c -------------------------
4581 @item mh-compose-space-does-completion-flag
4582 On means @key{SPC} does completion in message header (default:
4583 @samp{off}).
4584 @c -------------------------
4585 @item mh-delete-yanked-msg-window-flag
4586 On means delete any window displaying the message (default: @samp{off}).
4587 @c -------------------------
4588 @item mh-extract-from-attribution-verb
4589 Verb to use for attribution when a message is yanked by @kbd{C-c C-y}
4590 (default: @code{"wrote:"}).
4591 @c -------------------------
4592 @item mh-ins-buf-prefix
4593 String to put before each line of a yanked or inserted message
4594 (default: @code{"> "}).
4595 @c -------------------------
4596 @item mh-letter-complete-function
4597 Function to call when completing outside of address or folder fields
4598 (default: @code{ispell-complete-word}).
4599 @c -------------------------
4600 @item mh-letter-fill-column
4601 Fill column to use in MH-Letter mode (default: 72).
4602 @c -------------------------
4603 @item mh-mml-method-default
4604 Default method to use in security tags (default: @samp{PGP (MIME)} if
4605 support for it is available; otherwise @samp{None}).
4606 @c -------------------------
4607 @item mh-signature-file-name
4608 Source of user's signature (default: @code{"~/.signature"}).
4609 @c -------------------------
4610 @item mh-signature-separator-flag
4611 On means a signature separator should be inserted (default:
4612 @samp{on}).
4613 @c -------------------------
4614 @item mh-x-face-file
4615 File containing X-Face or Face header field to insert in outgoing mail.
4616 (default: @code{"~/.face"}).
4617 @c -------------------------
4618 @item mh-yank-behavior
4619 Controls which part of a message is yanked by @kbd{C-c C-y} (default:
4620 @samp{Body With Attribution}).
4621 @end vtable
4622
4623 The following hooks are available.
4624
4625 @vtable @code
4626 @item mail-citation-hook
4627 Hook for modifying a citation just inserted in the mail buffer
4628 (default: @code{nil}).
4629 @c -------------------------
4630 @item mh-before-send-letter-hook
4631 Hook run at the beginning of the @kbd{C-c C-c} command (default:
4632 @samp{nil}).
4633 @c -------------------------
4634 @item mh-mh-to-mime-hook
4635 Hook run on the formatted letter by @kbd{C-c C-e} (default:
4636 @samp{nil}).
4637 @c -------------------------
4638 @item mh-insert-signature-hook
4639 Hook run by @kbd{C-c C-s} after signature has been inserted (default:
4640 @code{nil}).
4641 @end vtable
4642
4643 The following face is available.
4644
4645 @vtable @code
4646 @item mh-letter-header-field
4647 Editable header field value face in draft buffers.
4648 @end vtable
4649
4650 The commands and options introduced here are explained in more
4651 detail in the following sections.
4652
4653 @menu
4654 * Editing Message::
4655 * Inserting Letter::
4656 * Inserting Messages::
4657 * Signature::
4658 * Picture::
4659 * Adding Attachments::
4660 * Sending PGP::
4661 * Checking Recipients::
4662 * Sending Message::
4663 * Killing Draft::
4664 @end menu
4665
4666 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts
4667 @section Editing the Message
4668
4669 @cindex @samp{Bcc:} header field
4670 @cindex @samp{Cc:} header field
4671 @cindex @samp{Dcc:} header field
4672 @cindex @samp{From:} header field
4673 @cindex @samp{Mail-Followup-To:} header field
4674 @cindex @samp{Mail-Reply-To:} header field
4675 @cindex @samp{Reply-To:} header field
4676 @cindex @samp{Subject:} header field
4677 @cindex @samp{To:} header field
4678 @cindex editing header
4679 @cindex header field, @samp{Bcc:}
4680 @cindex header field, @samp{Cc:}
4681 @cindex header field, @samp{Dcc:}
4682 @cindex header field, @samp{From:}
4683 @cindex header field, @samp{Mail-Followup-To:}
4684 @cindex header field, @samp{Mail-Reply-To:}
4685 @cindex header field, @samp{Reply-To:}
4686 @cindex header field, @samp{Subject:}
4687 @cindex header field, @samp{To:}
4688 @findex mh-to-field
4689 @kindex C-c C-f C-t
4690 @kindex C-c C-f t
4691
4692 Because the header is part of the message, you can edit the header
4693 fields as you wish. However, several convenience commands exist to
4694 help you create and edit them. For example, the command @kbd{C-c C-f
4695 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the
4696 cursor to the @samp{To:} header field, creating it if necessary. The
4697 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:},
4698 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To},
4699 @samp{Bcc:}, and @samp{Dcc:} header fields are similar.
4700
4701 @findex mh-to-fcc
4702 @kindex C-c C-f C-f
4703 @kindex C-c C-f f
4704
4705 One command behaves differently from the others, namely, @kbd{C-c C-f
4706 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command
4707 will prompt you for the folder name in which to file a copy of the
4708 draft. @xref{Folder Selection}.
4709
4710 @findex indent-relative
4711 @findex mh-letter-next-header-field-or-indent
4712 @findex mh-letter-previous-header-field
4713 @kindex @key{TAB}
4714 @kindex S-@key{TAB}
4715 @vindex mh-compose-skipped-header-fields
4716 @vindex mh-letter-header-field
4717
4718 Within the header of the message, the command@* @key{TAB}
4719 (@code{mh-letter-next-header-field-or-indent}) moves between fields
4720 that are highlighted with the face @code{mh-letter-header-field},
4721 skipping those fields listed in
4722 @code{mh-compose-skipped-header-fields}. After the last field, this
4723 command then moves point to the message body before cycling back to
4724 the first field. If point is already past the first line of the
4725 message body, then this command indents by calling
4726 @code{indent-relative} with the given prefix argument. The command
4727 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves
4728 backwards between the fields and cycles to the body of the message
4729 after the first field. Unlike the command @key{TAB}, it will always
4730 take point to the last field from anywhere in the body.
4731
4732 @cindex alias completion
4733 @cindex completion
4734 @cindex spell check
4735 @findex ispell-complete-word
4736 @findex mh-letter-complete
4737 @findex mh-letter-complete-or-space
4738 @findex mh-letter-confirm-address
4739 @kindex , (comma)
4740 @kindex @key{SPC}
4741 @kindex M-@key{TAB}
4742 @vindex mh-alias-flash-on-comma
4743 @vindex mh-compose-space-does-completion-flag
4744 @vindex mh-letter-complete-function
4745
4746 If the field contains addresses (for example, @samp{To:} or
4747 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command
4748 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias
4749 completion (@pxref{Aliases}). In the body of the message,
4750 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead,
4751 which is set to @samp{'ispell-complete-word} by default. The command
4752 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument
4753 that is passed to the @code{mh-letter-complete-function}. In addition,
4754 turn on the option @code{mh-compose-space-does-completion-flag} to use
4755 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform
4756 completion in the header as well; use a prefix argument to specify
4757 more than one space. Addresses are separated by a comma; when you
4758 press the comma, the command @code{mh-letter-confirm-address} flashes
4759 the alias expansion in the minibuffer if
4760 @code{mh-alias-flash-on-comma} is turned on.
4761
4762 @c XXX Document the replacement for the inaccessible 'long argument.
4763
4764 @findex mh-letter-toggle-header-field-display
4765 @kindex C-c C-t
4766
4767 Use the command @kbd{C-c C-t}
4768 @code{mh-letter-toggle-header-field-display} to display truncated
4769 header fields. This command is a toggle so entering it again will hide
4770 the field. This command takes a prefix argument: if negative then the
4771 field is hidden, if positive then the field is displayed (for example,
4772 @kbd{C-u C-c C-t}).
4773
4774 Be sure to leave a row of dashes or a blank line between the header
4775 and the body of the message.
4776
4777 @vindex mh-letter-fill-column
4778
4779 The body of the message is edited as you would edit any Emacs buffer
4780 although there are a few commands and options to assist you. You can
4781 change the fill column in MH-Letter mode with the option
4782 @code{mh-letter-fill-column}. By default, this option is 72 to allow
4783 others to quote your message without line wrapping.
4784
4785 @cindex filling paragraphs
4786 @cindex paragraphs, filling
4787 @findex fill-paragraph
4788 @kindex M-q
4789 @vindex mh-ins-buf-prefix
4790
4791 You'll often include messages that were sent from user agents that
4792 haven't yet realized that paragraphs consist of more than a single
4793 line. This makes for long lines that wrap in an ugly fashion. You'll
4794 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these
4795 quoted messages, even if they are nested, just as long as all of the
4796 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting
4797 Letter}). For example, let's assume you have the following in your
4798 draft:
4799
4800 @smallexample
4801 @group
4802 > Hopefully this gives you an idea of what I'm currently doing. I'm \
4803 not sure yet whether I'm completely satisfied with my setup, but \
4804 it's worked okay for me so far.
4805 @end group
4806 @end smallexample
4807
4808 Running @kbd{M-q} on this paragraph produces:
4809
4810 @smallexample
4811 @group
4812 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4813 > sure yet whether I'm completely satisfied with my setup, but it's
4814 > worked okay for me so far.
4815 @end group
4816 @end smallexample
4817
4818 @findex mh-open-line
4819 @findex open-line
4820 @kindex C-c C-o
4821 @kindex C-o
4822
4823 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the
4824 command @kbd{C-o} (@code{open-line}) in that it inserts a newline
4825 after point. It differs in that it also inserts the right number of
4826 quoting characters and spaces so that the next line begins in the same
4827 column as it was. This is useful when breaking up paragraphs in
4828 replies. For example, if this command was used when point was after
4829 the first period in the paragraph above, the result would be this:
4830
4831 @smallexample
4832 @group
4833 > Hopefully this gives you an idea of what I'm currently doing.
4834
4835 > I'm not
4836 > sure yet whether I'm completely satisfied with my setup, but it's
4837 > worked okay for me so far.
4838 @end group
4839 @end smallexample
4840
4841 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
4842 @section Inserting Letter to Which You're Replying
4843
4844 @cindex inserting messages
4845 @cindex replying to messages
4846 @cindex yanking messages
4847 @findex mh-yank-cur-msg
4848 @kindex C-c C-y
4849 @vindex mh-ins-buf-prefix
4850
4851 It is often useful to insert a snippet of text from a letter that
4852 someone mailed to provide some context for your reply. The command
4853 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an
4854 attribution, yanking a portion of text from the message to which
4855 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
4856 before each line.
4857
4858 @smallexample
4859 @group
4860 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4861
4862 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4863 > sure yet whether I'm completely satisfied with my setup, but it's
4864 > worked okay for me so far.
4865 @end group
4866 @end smallexample
4867
4868 @vindex mh-extract-from-attribution-verb
4869
4870 The attribution consists of the sender's name and email address
4871 followed by the content of the option
4872 @code{mh-extract-from-attribution-verb}. This option can be set to
4873 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use
4874 the @samp{Custom String} menu item to enter your own verb.
4875
4876 @vindex mail-citation-hook
4877 @vindex mh-ins-buf-prefix
4878 @vindex mh-yank-behavior
4879
4880 The prefix @code{"> "} is the default setting for the option
4881 @code{mh-ins-buf-prefix}. I suggest that you not modify this option
4882 since it is used by many mailers and news readers: messages are far
4883 easier to read if several included messages have all been indented by
4884 the same string. This prefix is not inserted if you use one of the
4885 supercite flavors of @code{mh-yank-behavior} or you have added a
4886 @code{mail-citation-hook} as described below.
4887
4888 @vindex mh-delete-yanked-msg-window-flag
4889
4890 You can also turn on the @code{mh-delete-yanked-msg-window-flag}
4891 option to delete the window containing the original message after
4892 yanking it to make more room on your screen for your reply.
4893
4894 @cindex Emacs, packages, supercite
4895 @cindex supercite package
4896 @kindex r
4897 @vindex mail-citation-hook
4898 @vindex mh-yank-behavior
4899
4900 You can control how the message to which you are replying is yanked
4901 into your reply using @code{mh-yank-behavior}. To include the entire
4902 message, including the entire header, use @samp{Body and
4903 Header}@footnote{If you'd rather have the header cleaned up, use
4904 @kbd{C-u r} instead of @kbd{r} when replying
4905 (@pxref{Replying}).}@footnote{In the past you would use this setting
4906 and set @code{mail-citation-hook} to @samp{supercite}, but this usage
4907 is now deprecated in favor of the @samp{Invoke supercite} setting.}.
4908 Use @samp{Body} to yank just the body without the header. To yank only
4909 the portion of the message following the point, set this option to
4910 @samp{Below Point}.
4911
4912 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a
4913 full-bodied, full-featured, citation package that comes standard with
4914 Emacs.} to pass the entire message and header through supercite.
4915
4916 @vindex mh-extract-from-attribution-verb
4917
4918 If the @samp{Body With Attribution} setting is used, then the message
4919 minus the header is yanked and a simple attribution line is added at
4920 the top using the value of the option
4921 @code{mh-extract-from-attribution-verb}. This is the default.
4922
4923 @kindex C-c C-y
4924 @vindex mh-delete-yanked-msg-window-flag
4925
4926 If the @samp{Invoke supercite} or @samp{Body With Attribution}
4927 settings are used, the @samp{-noformat} argument is passed to the
4928 @command{repl} program to override a @samp{-filter} or @samp{-format}
4929 argument. These settings also have @samp{Automatically} variants that
4930 perform the action automatically when you reply so that you don't need
4931 to use @kbd{C-c C-y} at all. Note that this automatic action is only
4932 performed if the show buffer matches the message being replied to.
4933 People who use the automatic variants tend to turn on the option
4934 @code{mh-delete-yanked-msg-window-flag} as well so that the show
4935 window is never displayed.
4936
4937 @vindex mh-yank-behavior
4938
4939 If the show buffer has a region, the option @code{mh-yank-behavior} is
4940 ignored unless its value is one of @samp{Attribution} variants in
4941 which case the attribution is added to the yanked region.
4942
4943 @findex trivial-cite
4944 @vindex mail-citation-hook
4945 @vindex mh-ins-buf-prefix
4946 @vindex mh-yank-behavior
4947
4948 If this isn't enough, you can gain full control over the appearance of
4949 the included text by setting @code{mail-citation-hook} to a function
4950 that modifies it. This hook is ignored if the option
4951 @code{mh-yank-behavior} is set to one of the supercite flavors.
4952 Otherwise, this option controls how much of the message is passed to
4953 the hook. The function can find the citation between point and mark
4954 and it should leave point and mark around the modified citation text
4955 for the next hook function. The standard prefix
4956 @code{mh-ins-buf-prefix} is not added if this hook is set.
4957
4958 @cindex Emacs, packages, trivial-cite
4959 @cindex trivial-cite package
4960 @vindex mh-yank-behavior
4961
4962 For example, if you use the hook function
4963 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
4964 @code{trivial-cite}} (which is NOT part of Emacs), set
4965 @code{mh-yank-behavior} to @samp{Body and Header}.
4966
4967 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts
4968 @section Inserting Messages
4969
4970 @cindex inserting messages
4971 @findex mh-insert-letter
4972 @findex mh-yank-behavior
4973 @kindex C-c C-i
4974 @vindex mh-ins-buf-prefix
4975 @vindex mh-invisible-header-fields-compiled
4976 @vindex mh-yank-behavior
4977
4978 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
4979 This command prompts you for the folder and message number, which
4980 defaults to the current message in that folder. It then inserts the
4981 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless
4982 @code{mh-yank-behavior} is set to one of the supercite flavors in
4983 which case supercite is used to format the message. Certain
4984 undesirable header fields (see
4985 @code{mh-invisible-header-fields-compiled}) are removed before
4986 insertion.
4987
4988 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is
4989 left intact, the message is not indented, and @samp{> } is not
4990 inserted before each line. This command leaves the mark before the
4991 letter and point after it.
4992
4993 @node Signature, Picture, Inserting Messages, Editing Drafts
4994 @section Inserting Your Signature
4995
4996 @cindex signature
4997 @findex mh-insert-signature
4998 @kindex C-c C-s
4999
5000 You can insert your signature at the current cursor location with the
5001 command @kbd{C-c C-s} (@code{mh-insert-signature}).
5002
5003 @cindex files, @file{.signature}
5004 @cindex @file{.signature}
5005 @cindex vCard
5006 @vindex mh-signature-file-name
5007
5008 By default, the text of your signature is taken from the file
5009 @file{~/.signature}. You can read from other sources by changing the
5010 option @code{mh-signature-file-name}. This file may contain a
5011 @dfn{vCard} in which case an attachment is added with the vCard.
5012
5013 @findex mh-signature-separator-p
5014 @vindex mh-signature-file-name
5015 @vindex mh-signature-separator
5016 @vindex mh-signature-separator-regexp
5017
5018 The option @code{mh-signature-file-name} may also be a symbol, in
5019 which case that function is called. You may not want a signature
5020 separator to be added for you; instead you may want to insert one
5021 yourself. Options that you may find useful to do this include
5022 @code{mh-signature-separator} (when inserting a signature separator)
5023 and @code{mh-signature-separator-regexp} (for finding said separator).
5024 The function @code{mh-signature-separator-p}, which reports @code{t}
5025 if the buffer contains a separator, may be useful as well.
5026
5027 @cindex signature separator
5028 @vindex mh-signature-separator-flag
5029
5030 A signature separator (@code{"-- "}) will be added if the signature
5031 block does not contain one and @code{mh-signature-separator-flag} is
5032 on. It is not recommended that you change this option since various
5033 mail user agents, including MH-E, use the separator to present the
5034 signature differently, and to suppress the signature when replying or
5035 yanking a letter into a draft.
5036
5037 @vindex mh-insert-signature-hook
5038 @vindex mh-signature-file-name
5039
5040 The hook @code{mh-insert-signature-hook} is run after the signature is
5041 inserted. Hook functions may access the actual name of the file or the
5042 function used to insert the signature with
5043 @code{mh-signature-file-name}.
5044
5045 The signature can also be inserted using Identities.
5046 @xref{Identities}.
5047
5048 @node Picture, Adding Attachments, Signature, Editing Drafts
5049 @section Inserting Your Picture
5050
5051 @cindex @file{.face}
5052 @cindex files, @file{.face}
5053 @vindex mh-x-face-file
5054
5055 You can insert your picture in the header of your mail message so that
5056 recipients see your face in the @samp{From:} header field if their
5057 mail user agent is sophisticated enough. In MH-E, this is done by
5058 placing your image in the file named by the option
5059 @code{mh-x-face-file} which is @file{~/.face} by default.
5060
5061 @cindex @samp{Face:} header field
5062 @cindex @samp{X-Face:} header field
5063 @cindex @samp{X-Image-URL:} header field
5064 @cindex header field, @samp{Face:}
5065 @cindex header field, @samp{X-Face:}
5066 @cindex header field, @samp{X-Image-URL:}
5067
5068 If the file starts with either of the strings @samp{X-Face:},
5069 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the
5070 message header verbatim. Otherwise it is assumed that the file
5071 contains the value of the @samp{X-Face:} header field.
5072
5073 @cindex @command{compface}
5074 @cindex Unix commands, @command{compface}
5075
5076 The @samp{X-Face:} header field, which is a low-resolution, black and
5077 white image, can be generated using the
5078 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
5079 @command{compface}} command. The @uref{http://www.dairiki.org/xface/,
5080 @cite{Online X-Face Converter}} is a useful resource for quick
5081 conversion of images into @samp{X-Face:} header fields.
5082
5083 Use the @uref{http://quimby.gnus.org/circus/face/make-face,
5084 @command{make-face}} script to convert a JPEG image to the higher
5085 resolution, color, @samp{Face:} header field.
5086
5087 The URL of any image can be used for the @samp{X-Image-URL:} field and
5088 no processing of the image is required.
5089
5090 @vindex mh-x-face-file
5091
5092 To prevent the setting of any of these header fields, either set
5093 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file
5094 defined by this option doesn't exist.
5095
5096 @xref{Viewing}, to see how these header fields are displayed in MH-E.
5097
5098 @node Adding Attachments, Sending PGP, Picture, Editing Drafts
5099 @section Adding Attachments
5100
5101 @cindex @command{mhbuild}
5102 @cindex @command{mhn}
5103 @cindex MH commands, @command{mhbuild}
5104 @cindex MH commands, @command{mhn}
5105 @cindex MIME
5106 @cindex multimedia mail
5107
5108 MH-E has the capability to create multimedia messages. It uses the
5109 @sc{mime} (Multipurpose Internet Mail Extensions)
5110 protocol@footnote{@sc{mime} is defined in
5111 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The
5112 @sc{mime} protocol allows you to incorporate images, sound, video,
5113 binary files, and even commands that fetch a file with @samp{ftp} when
5114 your recipient reads the message!
5115
5116 @kindex C-c C-m
5117
5118 If you were to create a multimedia message with plain MH commands, you
5119 would insert @command{mhbuild} or @command{mhn} directives (henceforth
5120 called @dfn{MH-style directives} into your draft and use the
5121 @command{mhbuild} command in nmh or @command{mhn} command in MH and
5122 GNU mailutils to expand them. MH-E works in much the same way,
5123 although it provides a handful of commands prefixed with @kbd{C-c C-m}
5124 to insert the directives so you don't need to remember the syntax of
5125 them. Remember: you can always add MH-style directives by
5126 hand@footnote{See the section
5127 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5128 the MH book.}.
5129
5130 @cindex MIME Meta Language (MML)
5131 @cindex MML
5132 @vindex mh-compose-insertion
5133
5134 In addition to MH-style directives, MH-E also supports MML (@sc{mime}
5135 Meta Language) tags@footnote{
5136 @ifinfo
5137 @c Although the third argument should default to the
5138 @c first, makeinfo goes to the wrong Info file without it being
5139 @c different--it seems to be getting our own Composing node.
5140 @xref{Composing,,Composing with MML,emacs-mime}.
5141 @end ifinfo
5142 @ifnotinfo
5143 See the section Composing in
5144 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME
5145 Manual}}.
5146 @end ifnotinfo
5147 }. The option @code{mh-compose-insertion} can be used to choose
5148 between them. By default, this option is set to @samp{MML} if it is
5149 supported since it provides a lot more functionality. This option can
5150 also be set to @samp{MH} if MH-style directives are preferred.
5151
5152 @cindex media types
5153 @cindex MIME, media types
5154
5155 The MH-E @sc{mime} commands require a @dfn{media type} for each body
5156 part or attachment. For example, a PDF document is of type
5157 @samp{application/pdf} and an HTML document is of type
5158 @samp{text/html}. Some commands fill in the media type for you,
5159 whereas others require you to enter one.
5160
5161 @cindex @command{file}
5162 @cindex @file{/etc/mime.types}
5163 @cindex files, @file{/etc/mime.types}
5164 @cindex Unix commands, @command{file}
5165 @findex mailcap-mime-types
5166
5167 In the cases where MH-E can do so, it will determine the media type
5168 automatically. It uses the @command{file} command to do this. Failing
5169 that, the Emacs function @code{mailcap-mime-types} is used to provide
5170 a list from which to choose. This function usually reads the file
5171 @file{/etc/mime.types}.
5172
5173 Whether the media type is chosen automatically, or you choose it from
5174 a list, use the type that seems to match best the file that you are
5175 including. In the case of binaries, the media type
5176 @samp{application/x-executable} can be useful. If you can't find an
5177 appropriate media type, use @samp{text/plain} for text messages and
5178 @samp{application/octet-stream} for everything else.
5179
5180 @cindex content description
5181 @cindex MIME, content description
5182
5183 You are also sometimes asked for a @dfn{content description}. This is
5184 simply an optional brief phrase, in your own words, that describes the
5185 object. If you don't care to enter a content description, just press
5186 return and none will be included; however, a reader may skip over
5187 multimedia fields unless the content description is compelling.
5188
5189 You can also create your own @sc{mime} body parts. In the following
5190 example, I describe how you can create and edit a @samp{text/enriched}
5191 body part to liven up your plain text messages with boldface,
5192 underlining, and italics. I include an Emacs function which inserts
5193 enriched text tags.
5194
5195 @smalllisp
5196 @group
5197 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic")
5198 ("u" . "underline")
5199 ("s" . "smaller") ("B" . "bigger")
5200 ("f" . "fixed")
5201 ("c" . "center"))
5202 "Alist of (final-character . tag) choices for add-enriched-text.
5203 Additional types can be found in RFC 1563.")
5204
5205 (defun add-enriched-text (begin end)
5206 "Add enriched text tags around region.
5207 The tag used comes from the list enriched-text-types and is
5208 specified by the last keystroke of the command. When called from Lisp,
5209 arguments are BEGIN and END@."
5210 (interactive "r")
5211 ;; @r{Set type to the tag indicated by the last keystroke.}
5212 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`}))
5213 enriched-text-types))))
5214 (save-restriction ; @r{restores state from narrow-to-region}
5215 (narrow-to-region begin end) ; @r{narrow view to region}
5216 (goto-char (point-min)) ; @r{move to beginning of text}
5217 (insert "<" type ">") ; @r{insert beginning tag}
5218 (goto-char (point-max)) ; @r{move to end of text}
5219 (insert "</" type ">")))) ; @r{insert terminating tag}
5220 @i{Emacs function for entering enriched text}
5221
5222 @end group
5223 @end smalllisp
5224
5225 To use the function @code{add-enriched-text}, first add it to
5226 @file{~/.emacs} and create key bindings for it (@pxref{Composing}).
5227
5228 Then, in your plain text message, set the mark with @kbd{C-@@} or
5229 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t
5230 b}. This adds @samp{<bold>} where you set the mark and adds
5231 @samp{</bold>} at the location of your cursor, giving you something
5232 like: @samp{You should be <bold>very</bold>}.
5233
5234 Before sending this message, use @kbd{C-c C-m C-m}
5235 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e}
5236 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add
5237 MIME header fields. Then replace @samp{text/plain} with
5238 @samp{text/enriched} in the @samp{Content-Type:} header field.
5239
5240 You may also be interested in investigating @code{sgml-mode}.
5241
5242 @subheading Including Files
5243
5244 @cindex attachments, inserting
5245 @cindex images
5246 @cindex MIME, images
5247 @cindex MIME, sound
5248 @cindex MIME, video
5249 @cindex sound
5250 @cindex video
5251 @findex mh-compose-insertion
5252 @kindex C-c C-m C-i
5253 @kindex C-c C-m i
5254 @vindex mh-compose-insertion
5255
5256 Binaries, images, sound, and video can be inserted in your message
5257 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You
5258 are prompted for the filename containing the object, the media type if
5259 it cannot be determined automatically, and a content description. If
5260 you're using MH-style directives, you will also be prompted for
5261 additional attributes.
5262
5263 @subheading Forwarding Multimedia Messages
5264
5265 @findex mh-compose-forward
5266 @kindex C-c C-m C-f
5267 @kindex C-c C-m f
5268
5269 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m
5270 C-f} (@code{mh-compose-forward}). You are prompted for a content
5271 description, the name of the folder in which the messages to forward
5272 are located, and a range of messages, which defaults to the current
5273 message in that folder. @xref{Ranges}.
5274
5275 @subheading Including an FTP Reference
5276
5277 @cindex @command{ftp}
5278 @cindex MIME, @command{ftp}
5279 @cindex Unix commands, @command{ftp}
5280 @findex mh-mh-compose-anon-ftp
5281 @kindex C-c C-m C-g
5282 @kindex C-c C-m g
5283
5284 You can have your message initiate an @command{ftp} transfer when the
5285 recipient reads the message. To do this, use the command @kbd{C-c C-m
5286 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote
5287 host and filename, the media type, and the content description.
5288
5289 @subheading Including tar Files
5290
5291 @cindex @command{ftp}
5292 @cindex @command{tar}
5293 @cindex MIME, @command{ftp}
5294 @cindex MIME, @command{tar}
5295 @cindex Unix commands, @command{ftp}
5296 @cindex Unix commands, @command{tar}
5297 @findex mh-mh-compose-anon-ftp
5298 @findex mh-mh-compose-external-compressed-tar
5299 @kindex C-c C-m C-g
5300 @kindex C-c C-m C-t
5301 @kindex C-c C-m t
5302
5303 If the remote file is a compressed tar file, you can use @kbd{C-c C-m
5304 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition
5305 to retrieving the file via anonymous @emph{ftp} as per the command
5306 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also
5307 be uncompressed and untarred. You are prompted for the remote host and
5308 filename and the content description.
5309
5310 @subheading Including Other External Files
5311
5312 @findex mh-mh-compose-external-type
5313 @kindex C-c C-m C-x
5314 @kindex C-c C-m x
5315
5316 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is
5317 a general utility for referencing external files. In fact, all of the
5318 other commands that insert tags to access external files call this
5319 command. You are prompted for the access type, remote host and
5320 filename, and content type. If you provide a prefix argument, you are
5321 also prompted for a content description, attributes, parameters, and a
5322 comment.
5323
5324 @subheading Previewing Multimedia Messages
5325
5326 When you are finished editing a @sc{mime} message, it might look like this:
5327
5328 @cartouche
5329 @smallexample
5330 3 t08/24 root received fax files on Wed Aug 24 11:00:
5331 4+t08/24 To:wohler Test<<This is a test message to get the
5332
5333
5334
5335
5336
5337 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------------
5338 To: wohler
5339 cc:
5340 Subject: Test of MIME
5341 --------
5342 Here is the SETI@@Home logo:
5343
5344 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm"
5345 disposition=inline description="SETI@@home logo">
5346 <#/part>
5347 --:** @{draft@} All L8 (MH-Letter)----------------------------------
5348
5349 @end smallexample
5350 @end cartouche
5351 @i{MH-E @sc{mime} draft}
5352
5353 @findex mh-mml-to-mime
5354 @kindex C-c C-m C-m
5355 @kindex C-c C-m m
5356
5357 Typically, you send a message with attachments just like any other
5358 message (@pxref{Sending Message}).
5359
5360 @findex mh-mml-to-mime
5361 @kindex C-c C-m C-m
5362
5363 However, you may take a sneak preview of the @sc{mime} encoding if you
5364 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}).
5365 The following screen shows the @sc{mime} encoding specified by the
5366 tags. You can see why mail user agents are usually built to hide these
5367 details from the user.
5368
5369 @cartouche
5370 @smallexample
5371 To: wohler
5372 cc:
5373 Subject: Test of MIME
5374 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
5375 MIME-Version: 1.0
5376 Content-Type: multipart/mixed; boundary="=-=-="
5377 --------
5378 --=-=-=
5379
5380 Here is the SETI@@Home logo:
5381
5382
5383 --=-=-=
5384 Content-Type: image/x-xpm
5385 Content-Disposition: inline; filename=setiathome.xpm
5386 Content-Transfer-Encoding: base64
5387 Content-Description: SETI@@home logo
5388
5389 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N
5390 --:-- @{draft@} Top L1 (MH-Letter)----------------------------------
5391
5392 @end smallexample
5393 @end cartouche
5394 @i{MH-E @sc{mime} draft ready to send}
5395
5396 @cindex undo effects of mh-mml-to-mime
5397
5398 This action can be undone by running @kbd{C-_} (@code{undo}).
5399
5400 @cindex @command{mhbuild}
5401 @cindex @command{mhn}
5402 @cindex MH commands, @command{mhbuild}
5403 @cindex MH commands, @command{mhn}
5404 @cindex undo effects of mh-mh-to-mime
5405 @findex mh-mh-to-mime
5406 @findex mh-mh-to-mime-undo
5407 @kindex C-c C-e
5408 @kindex C-c C-m C-m
5409 @kindex C-c C-m C-u
5410 @kindex C-c C-m u
5411
5412 If you're using MH-style directives, use @kbd{C-c C-e}
5413 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the
5414 command @command{mhbuild} (@command{mhn}) on the message which expands
5415 the tags@footnote{See the section
5416 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5417 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u}
5418 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup
5419 file. You are prompted to confirm this action, but you can avoid the
5420 confirmation by adding an argument (for example, @kbd{C-u C-c C-m
5421 C-u}).
5422
5423 @kindex C-c C-e
5424 @vindex mh-mh-to-mime-args
5425
5426 If you wish to pass additional arguments to @command{mhbuild}
5427 (@command{mhn}) to affect how it builds your message, use the option
5428 @code{mh-mh-to-mime-args}. For example, you can build a consistency
5429 check into the message by setting @code{mh-mh-to-mime-args} to
5430 @samp{-check}. The recipient of your message can then run
5431 @samp{mhbuild -check} on the message---@command{mhbuild}
5432 (@command{mhn}) will complain if the message has been corrupted on the
5433 way. The command @kbd{C-c C-e} only consults this option when given a
5434 prefix argument (as in @kbd{C-u C-c C-e}).
5435
5436 @kindex C-c C-e
5437 @vindex mh-mh-to-mime-hook
5438
5439 The hook @code{mh-mh-to-mime-hook} is called after the message has
5440 been formatted by @kbd{C-c C-e}.
5441
5442 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts
5443 @section Signing and Encrypting Messages
5444
5445 @cindex signing messages
5446 @cindex encrypting messages
5447 @cindex RFC 3156
5448
5449 MH-E can sign and encrypt messages as defined in
5450 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you
5451 should choose to sign or encrypt your message, use one of the
5452 following commands to do so any time before sending your message.
5453
5454 @findex mh-mml-secure-message-encrypt
5455 @findex mh-mml-secure-message-sign
5456 @findex mh-mml-secure-message-signencrypt
5457 @kindex C-c C-m C-e
5458 @kindex C-c C-m C-s
5459 @kindex C-c C-m e e
5460 @kindex C-c C-m e s
5461 @kindex C-c C-m s e
5462 @kindex C-c C-m s s
5463
5464 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign})
5465 inserts the following tag:
5466
5467 @smallexample
5468 <#secure method=pgpmime mode=sign>
5469 @end smallexample
5470
5471 This is used to sign your message digitally. Likewise, the command
5472 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the
5473 following tag:
5474
5475 @smallexample
5476 <#secure method=pgpmime mode=encrypt>
5477 @end smallexample
5478
5479 This is used to encrypt your message. Finally, the command @kbd{C-c
5480 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the
5481 following tag:
5482
5483 @smallexample
5484 <#secure method=pgpmime mode=signencrypt>
5485 @end smallexample
5486
5487 @findex mh-mml-unsecure-message
5488 @kindex C-c C-m C-n
5489 @kindex C-c C-m n
5490 @vindex mh-mml-method-default
5491
5492 This is used to sign and encrypt your message. In each of these cases,
5493 a proper multipart message is created for you when you send the
5494 message. Use the command @kbd{C-c C-m C-n}
5495 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix
5496 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the
5497 possible security methods (see @code{mh-mml-method-default}).
5498
5499 @vindex mh-mml-method-default
5500
5501 The option @code{mh-mml-method-default} is used to select between a
5502 variety of mail security mechanisms. The default is @samp{PGP (MIME)}
5503 if it is supported; otherwise, the default is @samp{None}. Other
5504 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}.
5505
5506 @cindex @samp{pgg} customization group
5507 @cindex PGG
5508 @cindex customization group, @samp{pgg}
5509
5510 The @samp{pgg} customization group may have some settings which may
5511 interest you.
5512 @iftex
5513 See @cite{The PGG Manual}.
5514 @end iftex
5515 @ifinfo
5516 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
5517 @end ifinfo
5518 @ifhtml
5519 See
5520 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
5521 @cite{The PGG Manual}}.
5522 @end ifhtml
5523
5524 @cindex header field, @samp{Fcc:}
5525 @cindex @samp{Fcc:} header field
5526 @vindex pgg-encrypt-for-me
5527
5528 In particular, I turn on the option @code{pgg-encrypt-for-me} so that
5529 all messages I encrypt are encrypted with my public key as well. If
5530 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header
5531 field, this setting is vital so that you can read the mail you write!
5532
5533 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts
5534 @section Checking Recipients
5535
5536 @cindex @samp{*MH-E Recipients*}
5537 @cindex @command{whom}
5538 @cindex MH commands, @command{whom}
5539 @cindex buffers, @samp{*MH-E Recipients*}
5540 @cindex checking recipients
5541 @cindex recipients, checking
5542 @findex mh-check-whom
5543 @kindex C-c C-w
5544
5545 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so
5546 you can check the actual address(es) in the alias. A new buffer named
5547 @samp{*MH-E Recipients*} is created with the output of @command{whom}
5548 (@pxref{Miscellaneous})@footnote{See the section
5549 @uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the
5550 whatnow Program} in the MH book.}.
5551
5552 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
5553 @section Sending a Message
5554
5555 @cindex buffers, @samp{*MH-E Mail Delivery*}
5556 @cindex @samp{*MH-E Mail Delivery*}
5557 @cindex sending mail
5558 @findex mh-send-letter
5559 @kindex C-c C-c
5560
5561 When you are all through editing a message, you send it with the
5562 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix
5563 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the
5564 delivery; this output can be found in a buffer called @samp{*MH-E Mail
5565 Delivery*} (@pxref{Miscellaneous}).
5566
5567 @cindex sending mail
5568 @cindex spell check
5569 @findex ispell-message
5570 @kindex C-c C-c
5571 @vindex mh-before-send-letter-hook
5572
5573 The hook @code{mh-before-send-letter-hook} is run at the beginning of
5574 the command @kbd{C-c C-c}. For example, if you want to check your
5575 spelling in your message before sending, add the function
5576 @code{ispell-message}.
5577
5578 @cindex @command{send}
5579 @cindex MH commands, @command{send}
5580 @vindex mh-send-prog
5581
5582 In case the MH @command{send} program@footnote{See the section
5583 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
5584 in the MH book.} is installed under a different name, use
5585 @code{mh-send-prog} to tell MH-E the name.
5586
5587 @node Killing Draft, , Sending Message, Editing Drafts
5588 @section Killing the Draft
5589
5590 @cindex killing draft
5591 @findex kill-buffer
5592 @findex mh-fully-kill-draft
5593 @kindex C-c C-q
5594 @kindex C-x k
5595
5596 If for some reason you are not happy with the draft, you can use the
5597 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft
5598 buffer and delete the draft message. Use the command @kbd{C-x k}
5599 (@code{kill-buffer}) if you don't want to delete the draft message.
5600
5601 @node Aliases, Identities, Editing Drafts, Top
5602 @chapter Aliases
5603
5604 @cindex aliases
5605
5606 MH aliases are used in the same way in MH-E as they are in MH. Any
5607 alias listed as a recipient will be expanded when the message is sent.
5608 This chapter discusses other things you can do with aliases in MH-E.
5609
5610 @cindex MH-Letter mode
5611 @cindex modes, MH-Letter
5612
5613 The following commands are available in MH-Letter mode with the
5614 exception of @code{mh-alias-reload} which can be called from anywhere.
5615
5616 @table @kbd
5617 @kindex @key{SPC}
5618 @findex mh-letter-complete-or-space
5619 @item @key{SPC}
5620 Perform completion or insert space (@code{mh-letter-complete-or-space}).
5621 @c -------------------------
5622 @kindex M-@key{TAB}
5623 @findex mh-letter-complete
5624 @item M-@key{TAB}
5625 Perform completion on header field or word preceding point
5626 (@code{mh-letter-complete}).
5627 @c -------------------------
5628 @findex mh-alias-apropos
5629 @item mh-alias-apropos
5630 Show all aliases or addresses that match a regular expression.
5631 @c -------------------------
5632 @findex mh-alias-grab-from-field
5633 @item mh-alias-grab-from-field
5634 Add alias for the sender of the current message
5635 @c -------------------------
5636 @findex mh-alias-reload
5637 @item mh-alias-reload
5638 Reload MH aliases.
5639 @end table
5640
5641 @cindex @samp{mh-alias} customization group
5642 @cindex customization group, @samp{mh-alias}
5643
5644 The @samp{mh-alias} customization group contains options associated
5645 with aliases.
5646
5647 @vtable @code
5648 @item mh-alias-completion-ignore-case-flag
5649 On means don't consider case significant in MH alias completion
5650 (default: @samp{on}).
5651 @c -------------------------
5652 @item mh-alias-expand-aliases-flag
5653 On means to expand aliases entered in the minibuffer (default:
5654 @samp{off}).
5655 @c -------------------------
5656 @item mh-alias-flash-on-comma
5657 Specify whether to flash address or warn on translation (default: @samp{Flash
5658 but Don't Warn If No Alias}).
5659 @c -------------------------
5660 @item mh-alias-insert-file
5661 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile
5662 Profile Component}).
5663 @c -------------------------
5664 @item mh-alias-insertion-location
5665 Specifies where new aliases are entered in alias files (default:
5666 @samp{Alphabetical}).
5667 @c -------------------------
5668 @item mh-alias-local-users
5669 If @samp{on}, local users are added to alias completion (default:
5670 @samp{on}).
5671 @c -------------------------
5672 @item mh-alias-local-users-prefix
5673 String prefixed to the real names of users from the password file
5674 (default: @code{"local."}.
5675 @c -------------------------
5676 @item mh-alias-passwd-gecos-comma-separator-flag
5677 On means the GECOS field in the password file uses a comma separator
5678 (default: @samp{on}).
5679 @end vtable
5680
5681 The following hook is available.
5682
5683 @vtable @code
5684 @item mh-alias-reloaded-hook
5685 Hook run by @code{mh-alias-reload} after loading aliases (default:
5686 @code{nil}).
5687 @end vtable
5688
5689 @subheading Adding Addresses to Draft
5690
5691 You can use aliases when you are adding recipients to a message.
5692
5693 @findex minibuffer-complete
5694 @kindex @key{TAB}
5695 @vindex mh-alias-expand-aliases-flag
5696 @vindex mh-compose-prompt-flag
5697
5698 In order to use minibuffer prompting for recipients and the subject
5699 line in the minibuffer, turn on the option
5700 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the
5701 @key{TAB} (@code{minibuffer-complete}) command to complete aliases
5702 (and optionally local logins) when prompted for the recipients. Turn
5703 on the option @code{mh-alias-expand-aliases-flag} if you want these
5704 aliases to be expanded to their respective addresses in the draft.
5705
5706 @findex mh-letter-complete
5707 @findex mh-letter-complete-or-space
5708 @kindex @key{SPC}
5709 @kindex M-@key{TAB}
5710
5711 Otherwise, you can complete aliases in the header of the draft with
5712 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC}
5713 (@code{mh-letter-complete-or-space}).
5714
5715 @vindex mh-alias-completion-ignore-case-flag
5716
5717 As MH ignores case in the aliases, so too does MH-E. However, you may
5718 turn off the option @code{mh-alias-completion-ignore-case-flag} to
5719 make case significant which can be used to segregate completion of
5720 your aliases. You might use uppercase for mailing lists and lowercase
5721 for people. For example, you might have:
5722
5723 @smallexample
5724 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org>
5725 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org>
5726 @end smallexample
5727
5728 When this option is turned off, if you were to type @kbd{M} in the
5729 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list;
5730 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then
5731 you'd get Mark's address. Note that this option affects completion
5732 only. If you were to enter @kbd{Mark.Baushke}, it would still be
5733 identified with your @samp{mark.baushke} alias.
5734
5735 @findex mh-alias-minibuffer-confirm-address
5736 @findex mh-letter-confirm-address
5737 @vindex mh-alias-flash-on-comma
5738 @vindex mh-compose-prompt-flag
5739
5740 To verify that the alias you've entered is valid, the alias will be
5741 displayed in the minibuffer when you type a comma
5742 (@code{mh-letter-confirm-address} or
5743 @code{mh-alias-minibuffer-confirm-address} if the option
5744 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This
5745 behavior can be controlled with the option
5746 @code{mh-alias-flash-on-comma} which provides three choices:
5747 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No
5748 Alias}, and @samp{Don't Flash Nor Warn If No Alias}.
5749
5750 For another way to verify the alias expansion, see @ref{Checking
5751 Recipients}.
5752
5753 @subheading Loading Aliases
5754
5755 @cindex @command{ali}
5756 @cindex @file{/etc/nmh/MailAliases}
5757 @cindex @samp{Aliasfile:} MH profile component
5758 @cindex MH commands, @command{ali}
5759 @cindex MH profile component, @samp{Aliasfile:}
5760 @cindex files, @file{/etc/nmh/MailAliases}
5761
5762 MH-E loads aliases for completion and folder name hints from various
5763 places. It uses the MH command @command{ali}@footnote{See the section
5764 @uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to
5765 read aliases from the files listed in the profile component
5766 @samp{Aliasfile:} as well as system-wide aliases (for example,
5767 @file{/etc/nmh/MailAliases}).
5768
5769 @cindex @file{/etc/passwd}
5770 @cindex files, @file{/etc/passwd}
5771
5772 In addition, aliases are created from @file{/etc/passwd} entries with
5773 a user ID larger than a magical number, typically 200. This can be a
5774 handy tool on a machine where you and co-workers exchange messages.
5775 These aliases have the form @samp{local.@var{first.last}} if a real
5776 name is present in the password file. Otherwise, the alias will have
5777 the form @samp{local.@var{login}}.
5778
5779 @vindex mh-alias-local-users-prefix
5780
5781 The prefix @samp{local.} can be modified via the option
5782 @code{mh-alias-local-users-prefix}. This option can also be set to
5783 @samp{Use Login}.
5784
5785 For example, consider the following password file entry:
5786
5787 @smallexample
5788 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
5789 @end smallexample
5790
5791 @vindex mh-alias-local-users-prefix
5792
5793 The following settings of option @code{mh-alias-local-users-prefix}
5794 will produce the associated aliases:
5795
5796 @table @code
5797 @item "local."
5798 local.peter.galbraith
5799 @c -------------------------
5800 @item ""
5801 peter.galbraith
5802 @c -------------------------
5803 @item Use Login
5804 psg
5805 @end table
5806
5807 @vindex mh-alias-passwd-gecos-comma-separator-flag
5808
5809 In the example above, commas are used to separate different values
5810 within the so-called GECOS field. This is a fairly common usage.
5811 However, in the rare case that the GECOS field in your password file
5812 is not separated by commas and whose contents may contain commas, you
5813 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag}
5814 off.
5815
5816 @cindex NIS, obtaining local aliases from
5817 @cindex @samp{ypcat passwd}
5818 @vindex mh-alias-local-users
5819
5820 If you're on a system with thousands of users you don't know, and the
5821 loading of local aliases slows MH-E down noticeably, then the local
5822 alias feature can be disabled by turning off the option
5823 @code{mh-alias-local-users}. This option also takes a string which is
5824 executed to generate the password file. For example, use @samp{ypcat
5825 passwd} to obtain the NIS password file.
5826
5827 @findex mh-alias-reload
5828 @kindex M-x mh-alias-reload
5829 @vindex mh-alias-reloaded-hook
5830
5831 Since aliases are updated frequently, MH-E reloads aliases
5832 automatically whenever an alias lookup occurs if an alias source has
5833 changed. However, you can reload your aliases manually by calling the
5834 command @kbd{M-x mh-alias-reload} directly. This command runs
5835 @code{mh-alias-reloaded-hook} after the aliases have been loaded.
5836
5837 @subheading Adding Aliases
5838
5839 In the past, you have manually added aliases to your alias file(s)
5840 listed in your @samp{Aliasfile:} profile component. MH-E provides
5841 other methods for maintaining your alias file(s).
5842
5843 @findex mh-alias-add-alias
5844 @kindex M-x mh-alias-add-alias
5845
5846 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt
5847 you for the alias and address that you would like to add. If the alias
5848 exists already, you will have the choice of inserting the new alias
5849 before or after the old alias. In the former case, this alias will be
5850 used when sending mail to this alias. In the latter case, the alias
5851 serves as an additional folder name hint when filing messages
5852 (@pxref{Folder Selection}).
5853
5854 Earlier, the alias prefix @samp{local} was presented. You can use
5855 other prefixes to organize your aliases or disambiguate entries. You
5856 might use prefixes for locales, jobs, or activities. For example, I
5857 have:
5858
5859 @smallexample
5860 @group
5861 ; Work
5862 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com>
5863 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com>
5864 ...
5865 ; Sport
5866 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com>
5867 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com>
5868 ...
5869 ; Personal
5870 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com>
5871 ...
5872 @end group
5873 @end smallexample
5874
5875 Using prefixes instead of postfixes helps you explore aliases during
5876 completion. If you forget the name of an old dive buddy, you can enter
5877 @samp{div} and then @key{SPC} to get a listing of all your dive buddies.
5878
5879 @kindex M-x mh-alias-add-address-under-point
5880 @kindex M-x mh-alias-grab-from-field
5881
5882 An alias for the sender of the current message is added automatically
5883 by clicking on the @samp{Grab From alias} tool bar button or by running
5884 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other
5885 recipients of the current message are added by placing your cursor
5886 over the desired recipient and giving the @kbd{M-x
5887 mh-alias-add-address-under-point} command.
5888
5889 @vindex mh-alias-insert-file
5890 @vindex mh-alias-insertion-location
5891
5892 The options @code{mh-alias-insert-file} and
5893 @code{mh-alias-insertion-location} controls how and where these aliases
5894 are inserted.
5895
5896 @vindex mh-alias-insert-file
5897
5898 The default setting of option @code{mh-alias-insert-file} is @samp{Use
5899 Aliasfile Profile Component}. This option can also hold the name of a
5900 file or a list a file names. If this option is set to a list of file
5901 names, or the @samp{Aliasfile:} profile component contains more than
5902 one file name, MH-E will prompt for one of them.
5903
5904 @vindex mh-alias-insertion-location
5905
5906 The option @code{mh-alias-insertion-location} is set to
5907 @samp{Alphabetical} by default. If you organize your alias file in
5908 other ways, then the settings @samp{Top} and @samp{Bottom} might be
5909 more appropriate.
5910
5911 @subheading Querying Aliases
5912
5913 @cindex regular expressions, @code{mh-alias-apropos}
5914 @findex mh-alias-apropos
5915 @kindex M-x mh-alias-apropos
5916
5917 If you can't quite remember an alias, you can use @kbd{M-x
5918 mh-alias-apropos} to show all aliases or addresses that match a
5919 regular expression
5920 @ifnothtml
5921 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
5922 GNU Emacs Manual}).
5923 @end ifnothtml
5924 @ifhtml
5925 (see the section
5926 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
5927 Syntax of Regular Expressions} in
5928 @cite{The GNU Emacs Manual}).
5929 @end ifhtml
5930
5931 @node Identities, Speedbar, Aliases, Top
5932 @chapter Identities
5933
5934 @cindex identities
5935 @cindex multiple personalities
5936
5937 MH-E supports the concept of multiple personalities or identities.
5938 This means that you can easily have a different header and signature
5939 at home and at work.
5940
5941 @cindex @samp{Identity} menu
5942 @cindex menu, @samp{Identity}
5943
5944 A couple of commands are used to insert identities in MH-Letter mode
5945 which are also found in the @samp{Identity} menu.
5946
5947 @table @kbd
5948 @kindex C-c C-d
5949 @findex mh-insert-identity
5950 @item C-c C-d
5951 Insert fields specified by given identity (@code{mh-insert-identity}).
5952 @c -------------------------
5953 @cindex @samp{Identity > Insert Auto Fields} menu item
5954 @cindex menu item, @samp{Identity > Insert Auto Fields}
5955 @kindex C-c M-d
5956 @findex mh-insert-auto-fields
5957 @item C-c M-d
5958 Insert custom fields if recipient found in @code{mh-auto-fields-list}
5959 (@code{mh-insert-auto-fields}).
5960 @end table
5961
5962 @cindex @samp{mh-identity} customization group
5963 @cindex customization group, @samp{mh-identity}
5964
5965 The @samp{mh-identity} customization group contains the following
5966 options.
5967
5968 @vtable @code
5969 @item mh-auto-fields-list
5970 List of recipients for which header lines are automatically inserted
5971 (default: @code{nil}).
5972 @c -------------------------
5973 @item mh-auto-fields-prompt-flag
5974 On means to prompt before sending if fields inserted (default:
5975 @samp{on})
5976 @c -------------------------
5977 @item mh-identity-default
5978 Default identity to use when @code{mh-letter-mode} is called (default:
5979 @samp{None}).
5980 @c -------------------------
5981 @item mh-identity-handlers
5982 Handler functions for fields in @code{mh-identity-list}.
5983 @c -------------------------
5984 @item mh-identity-list
5985 List of identities (default: @code{nil}).
5986 @end vtable
5987
5988 Some of the common header fields that people change depending on the
5989 context are the @samp{From:} and @samp{Organization:} fields, as well
5990 as the signature.
5991
5992 @vindex mh-identity-list
5993
5994 This is done by customizing the option @code{mh-identity-list}. In the
5995 customization buffer for this option, click on the @samp{INS} button
5996 and enter a label such as @samp{Home} or @samp{Work}. Then click on
5997 the @samp{INS} button with the label @samp{Add at least one item
5998 below}. The @samp{Value Menu} has the following menu items:
5999
6000 @table @samp
6001 @cindex header field, @samp{From:}
6002 @cindex @samp{From:} header field
6003 @item From Field
6004 Specify an alternate @samp{From:} header field. You must include a
6005 valid email address. A standard format is @samp{First Last
6006 <login@@host.domain>}. If you use an initial with a period, then you
6007 must quote your name as in @samp{"First I. Last"
6008 <login@@host.domain>}.
6009 @c -------------------------
6010 @cindex header field, @samp{Organization:}
6011 @cindex @samp{Organization:} header field
6012 @item Organization Field
6013 People usually list the name of the company where they work here.
6014 @c -------------------------
6015 @item Other Field
6016 Set any arbitrary header field and value here. Unless the header field
6017 is a standard one, precede the name of your field's label with
6018 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}.
6019 @c -------------------------
6020 @item Attribution Verb
6021 This value overrides the setting of
6022 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}.
6023 @c -------------------------
6024 @cindex signature
6025 @vindex mh-signature-file-name
6026 @item Signature
6027 Set your signature with this item. You can specify the contents of
6028 @code{mh-signature-file-name}, a file, or a function.
6029 @xref{Signature}.
6030 @c -------------------------
6031 @item GPG Key ID
6032 Specify a different key to sign or encrypt messages.
6033 @end table
6034
6035 @cindex Identity menu
6036 @cindex menu, Identity
6037 @findex mh-insert-identity
6038 @kindex C-c C-d
6039
6040 You can select the identities you have added via the menu called
6041 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c
6042 C-d} (@code{mh-insert-identity}). To clear the fields and signature
6043 added by the identity, select the @samp{None} identity.
6044
6045 @cindex menu item, @samp{Identity > Customize Identities}
6046 @cindex menu item, @samp{Identity > Save as Default}
6047 @cindex menu item, @samp{Identity > Set Default for Session}
6048 @cindex @samp{Identity > Customize Identities} menu item
6049 @cindex @samp{Identity > Save as Default} menu item
6050 @cindex @samp{Identity > Set Default for Session} menu item
6051 @vindex mh-identity-default
6052
6053 The @samp{Identity} menu contains two other items to save you from
6054 having to set the identity on every message. The menu item @samp{Set
6055 Default for Session} can be used to set the default identity to the
6056 current identity until you exit Emacs. The menu item @samp{Save as
6057 Default} sets the option @code{mh-identity-default} to the current
6058 identity setting. You can also customize the option
6059 @code{mh-identity-default} in the usual fashion. If you find that you
6060 need to add another identity, the menu item @samp{Customize
6061 Identities} is available for your convenience.
6062
6063 @cindex regular expressions, @code{mh-auto-fields-list}
6064 @vindex mh-auto-fields-list
6065
6066 The option @code{mh-auto-fields-list} can also be used to set the
6067 identity depending on the recipient to provide even more control. To
6068 customize @code{mh-auto-fields-list}, click on the @samp{INS} button
6069 and enter a regular expression for the recipient's address
6070 @ifnothtml
6071 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
6072 GNU Emacs Manual}).
6073 @end ifnothtml
6074 @ifhtml
6075 (see the section
6076 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
6077 Syntax of Regular Expressions} in
6078 @cite{The GNU Emacs Manual}).
6079 @end ifhtml
6080 Click on the @samp{INS} button with the @samp{Add at least one item
6081 below} label. The @samp{Value Menu} contains the following menu items:
6082
6083 @table @samp
6084 @item Identity
6085 Select an identity from those configured in @code{mh-identity-list}.
6086 All of the information for that identity will be added if the
6087 recipient matches.
6088 @c -------------------------
6089 @cindex @samp{Fcc:} header field
6090 @cindex header field, @samp{Fcc:}
6091 @item Fcc Field
6092 Insert an @samp{Fcc:} header field with the folder you provide. When
6093 you send the message, MH will put a copy of your message in this
6094 folder.
6095 @c -------------------------
6096 @cindex @samp{Mail-Followup-To:} header field
6097 @cindex header field, @samp{Mail-Followup-To:}
6098 @item Mail-Followup-To Field
6099 Insert an @samp{Mail-Followup-To:} header field with the recipients
6100 you provide. If the recipient's mail user agent supports this header
6101 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then
6102 their replies will go to the addresses listed. This is useful if their
6103 replies go both to the list and to you and you don't have a mechanism
6104 to suppress duplicates. If you reply to someone not on the list, you
6105 must either remove the @samp{Mail-Followup-To:} field, or ensure the
6106 recipient is also listed there so that he receives replies to your
6107 reply.
6108 @c -------------------------
6109 @item Other Field
6110 Other header fields may be added using this menu item.
6111 @end table
6112
6113 @findex mh-insert-auto-fields
6114 @kindex C-c M-d
6115 @vindex mh-auto-fields-prompt-flag
6116
6117 These fields can only be added after the recipient is known. Because
6118 you can continue to add recipients as you edit the draft, MH-E waits
6119 until the message is sent to perform the auto-insertions. This seems
6120 strange at first, but you'll get used to it. There are two ways to
6121 help you feel that the desired fields are added. The first is the
6122 action when the message is sent: if any fields are added
6123 automatically, you are given a chance to see and to confirm these
6124 fields before the message is actually sent. You can do away with this
6125 confirmation by turning off the option
6126 @code{mh-auto-fields-prompt-flag}. The second method is manual: once
6127 the header contains one or more recipients, you may run the command
6128 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the
6129 @samp{Identity -> Insert Auto Fields} menu item to insert these fields
6130 manually. However, if you use this command, the automatic insertion
6131 when the message is sent is disabled.
6132
6133 @vindex mh-auto-fields-list
6134 @vindex mh-identity-list
6135
6136 You should avoid using the same header field in
6137 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions
6138 that may apply to the same message as the result is undefined.
6139
6140 @vindex mh-identity-handlers
6141 @vindex mh-identity-list
6142
6143 The option @code{mh-identity-handlers} is used to change the way that
6144 fields, signatures, and attributions in @code{mh-identity-list} are
6145 added. To customize @code{mh-identity-handlers}, replace the name of
6146 an existing handler function associated with the field you want to
6147 change with the name of a function you have written. You can also
6148 click on an @samp{INS} button and insert a field of your choice and
6149 the name of the function you have written to handle it.
6150
6151 @vindex mh-identity-list
6152
6153 The @samp{Field} field can be any field that you've used in your
6154 @code{mh-identity-list}. The special fields @samp{:attribution-verb},
6155 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the
6156 @code{mh-identity-list} choices @samp{Attribution Verb},
6157 @samp{Signature}, and @samp{GPG Key ID} respectively.
6158
6159 The handler associated with the @samp{:default} field is used when no
6160 other field matches.
6161
6162 The handler functions are passed two or three arguments: the field
6163 itself (for example, @samp{From}), or one of the special fields (for
6164 example, @samp{:signature}), and the action @samp{'remove} or
6165 @samp{'add}. If the action is @samp{'add}, an additional argument
6166 containing the value for the field is given.
6167
6168 @node Speedbar, Menu Bar, Identities, Top
6169 @chapter The Speedbar
6170
6171 @cindex folder navigation
6172 @cindex speedbar
6173 @findex mh-visit-folder
6174 @kindex F v
6175 @kindex M-x speedbar
6176 @kindex Mouse-2
6177
6178 You can also use the speedbar
6179 @ifnothtml
6180 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},)
6181 @end ifnothtml
6182 @ifhtml
6183 (see the section
6184 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html,
6185 Speedbar Frames} in @cite{The GNU Emacs Manual})
6186 @end ifhtml
6187 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar
6188 @key{RET}}. You will see a new frame appear with all of your MH
6189 folders. Folders with unseen messages appear in boldface. Click on a
6190 folder name with @kbd{Mouse-2} to visit that folder in a similar
6191 fashion to the command @kbd{F v} (@code{mh-visit-folder})
6192 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the
6193 sub-folders of that folder.
6194
6195 The speedbar can be manipulated with the keyboard as well. Use the
6196 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move
6197 the cursor over the desired folder and then use the shortcuts for the
6198 menu items listed in the table below.
6199
6200 @table @samp
6201 @findex mh-speed-view
6202 @item Visit Folder (@key{RET})
6203 Visits the selected folder just as if you had used @kbd{F v}
6204 (@code{mh-speed-view}).
6205 @c -------------------------
6206 @findex mh-speed-expand-folder
6207 @item Expand Nested Folders (@kbd{+})
6208 Expands the selected folder in the speedbar, exposing the children
6209 folders inside it (@code{mh-speed-expand-folder}).
6210 @c -------------------------
6211 @findex mh-speed-contract-folder
6212 @item Contract Nested Folders (@kbd{-})
6213 Contracts or collapses the selected folder in the speedbar, hiding the
6214 children folders inside it (@code{mh-speed-contract-folder}).
6215 @c -------------------------
6216 @findex mh-speed-refresh
6217 @item Refresh Speedbar (@kbd{r})
6218 Regenerates the list of folders in the speedbar. Run this command if
6219 you've added or deleted a folder, or want to update the unseen message
6220 count before the next automatic update (@code{mh-speed-refresh}).
6221 @end table
6222
6223 @findex delete-frame
6224 @kindex C-x 5 0
6225 @kindex Mouse-3
6226
6227 You can click on @kbd{Mouse-3} to bring up a context menu that
6228 contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
6229 (@code{delete-frame}).
6230
6231 @cindex @command{flists}
6232 @cindex MH commands, @command{flists}
6233 @cindex @samp{mh-speedbar} customization group
6234 @cindex customization group, @samp{mh-speedbar}
6235
6236 The MH-E speedbar uses the MH command @command{flists}@footnote{See
6237 the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for
6238 Sequences with flist} in the MH book.} to generate the list of
6239 folders. The @samp{mh-speedbar} customization group contains the
6240 following option which controls how often the speedbar calls
6241 @command{flists}.
6242
6243 @vtable @code
6244 @item mh-speed-update-interval
6245 Time between speedbar updates in seconds (default: 60). Set to 0 to
6246 disable automatic update.
6247 @end vtable
6248
6249 You can modify the appearance of the folders in the speedbar by
6250 customizing the following faces.
6251
6252 @vtable @code
6253 @item mh-speedbar-folder
6254 Basic folder face.
6255 @c -------------------------
6256 @item mh-speedbar-folder-with-unseen-messages
6257 Folder face when folder contains unread messages.
6258 @c -------------------------
6259 @item mh-speedbar-selected-folder
6260 Selected folder face.
6261 @c -------------------------
6262 @item mh-speedbar-selected-folder-with-unseen-messages
6263 Selected folder face when folder contains unread messages.
6264 @end vtable
6265
6266 @node Menu Bar, Tool Bar, Speedbar, Top
6267 @chapter The Menu Bar
6268
6269 @cindex @samp{Folder} menu
6270 @cindex @samp{Identity} menu
6271 @cindex @samp{Letter} menu
6272 @cindex @samp{Message} menu
6273 @cindex @samp{Search} menu
6274 @cindex @samp{Sequence} menu
6275 @cindex Folder menu
6276 @cindex Identity menu
6277 @cindex Letter menu
6278 @cindex MH-Folder mode
6279 @cindex MH-Letter mode
6280 @cindex MH-Search mode
6281 @cindex Message menu
6282 @cindex Search menu
6283 @cindex Sequence menu
6284 @cindex menu bar
6285 @cindex menu, Folder
6286 @cindex menu, Identity
6287 @cindex menu, Letter
6288 @cindex menu, Message
6289 @cindex menu, Search
6290 @cindex menu, Sequence
6291 @cindex menu, @samp{Folder}
6292 @cindex menu, @samp{Identity}
6293 @cindex menu, @samp{Letter}
6294 @cindex menu, @samp{Message}
6295 @cindex menu, @samp{Search}
6296 @cindex menu, @samp{Sequence}
6297 @cindex modes, MH-Folder
6298 @cindex modes, MH-Letter
6299 @cindex modes, MH-Search
6300
6301 For those of you who prefer to mouse and menu instead of using the
6302 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its
6303 functions. The MH-Folder buffer adds the @samp{Folder},
6304 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds
6305 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds
6306 the @samp{Search} menu. There's no need to list the actual items here,
6307 as you can more easily see them for yourself, and the functions are
6308 already described elsewhere in this manual.
6309
6310 For a description of the menu bar, please
6311 @ifnothtml
6312 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}.
6313 @end ifnothtml
6314 @ifhtml
6315 see the section
6316 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html,
6317 The Menu Bar} in @cite{The GNU Emacs Manual}.
6318 @end ifhtml
6319
6320 The Emacs manual describes how to get online help for a particular
6321 menu item. You can also look up a menu item in the index of this
6322 manual in two ways: all of the menu items are listed alphabetically,
6323 and you can also browse all of the items under the index entry
6324 @samp{menu item}.
6325
6326 @node Tool Bar, Searching, Menu Bar, Top
6327 @chapter The Tool Bar
6328
6329 @cindex tool bar
6330
6331 Emacs also provides a graphical tool bar. For a description of the
6332 tool bar, please
6333 @ifnothtml
6334 @xref{Tool Bars, , Tool Bars, emacs, The GNU Emacs Manual}.
6335 @end ifnothtml
6336 @ifhtml
6337 see the section
6338 @uref{http://www.gnu.org/software/emacs/manual/html_node/Tool-Bars.html,
6339 Tool Bars} in @cite{The GNU Emacs Manual}.
6340 @end ifhtml
6341
6342 @cindex @samp{mh-tool-bar} customization group
6343 @cindex customization group, @samp{mh-tool-bar}
6344
6345 MH-E adds several icons to this tool bar; you can modify the MH-E
6346 aspects of the tool bar via the @samp{mh-tool-bar} customization group.
6347
6348 @vtable @code
6349 @item mh-tool-bar-folder-buttons
6350 List of buttons to include in MH-Folder tool bar (default: a checklist
6351 too long to list here).
6352 @c -------------------------
6353 @item mh-tool-bar-letter-buttons
6354 List of buttons to include in MH-Letter tool bar (default: a checklist
6355 too long to list here).
6356 @c -------------------------
6357 @item mh-tool-bar-search-function
6358 Function called by the tool bar search button (default:
6359 @code{mh-search}).
6360 @c -------------------------
6361 @item mh-xemacs-tool-bar-position
6362 Tool bar location (default: @samp{Same As Default Tool Bar}).
6363 @c -------------------------
6364 @item mh-xemacs-use-tool-bar-flag
6365 If on, use tool bar (default: on, if supported).
6366 @end vtable
6367
6368 In GNU Emacs, icons for some of MH-E's functions are added to the tool
6369 bar. In XEmacs, you have the opportunity to create a separate tool bar for
6370 the MH-E icons.
6371
6372 @vindex mh-tool-bar-folder-buttons
6373 @vindex mh-tool-bar-letter-buttons
6374
6375 In either case, you can select which of these functions you'd like to
6376 see by customizing the options @code{mh-tool-bar-folder-buttons} and
6377 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former
6378 customizes the tool bar in MH-Folder mode and the latter in MH-Letter
6379 mode. Both of these options present you with a list of functions;
6380 check the functions whose icons you want to see and clear the check
6381 boxes for those you don't.
6382
6383 @findex mh-search
6384 @vindex mh-tool-bar-search-function
6385
6386 The function associated with the searching icon can be set via the
6387 option @code{mh-tool-bar-search-function}. By default, this is set to
6388 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other
6389 Function} from the @samp{Value Menu} and enter a function of your own
6390 choosing.
6391
6392 @vindex mh-xemacs-use-tool-bar-flag
6393
6394 XEmacs provides a couple of extra options. The first,
6395 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E
6396 icons at all. By default, this option is turned on if the window
6397 system supports tool bars. If your system doesn't support tool bars,
6398 then you won't be able to turn on this option.
6399
6400 @vindex mh-xemacs-tool-bar-position
6401
6402 The second extra option is @code{mh-xemacs-tool-bar-position} which
6403 controls the placement of the tool bar along the four edges of the
6404 frame. You can choose from one of @samp{Same As Default Tool Bar},
6405 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this
6406 variable is set to anything other than @samp{Same As Default Tool Bar}
6407 and the default tool bar is in a different location, then two tool
6408 bars will be displayed: the MH-E tool bar and the default tool bar.
6409
6410 @node Searching, Threading, Tool Bar, Top
6411 @chapter Searching Through Messages
6412
6413 @cindex @samp{Search} menu
6414 @cindex menu, @samp{Search}
6415 @cindex searching
6416 @findex mh-search
6417 @kindex F s
6418
6419 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which
6420 helps you find messages that lie buried in your folders
6421 (@pxref{Folders}). This chapter covers this command in more detail.
6422 Several commands are used to compose the search criteria and to start
6423 searching. A couple of them can be found in the @samp{Search} menu.
6424
6425 @table @kbd
6426 @kindex C-c ?
6427 @findex mh-help
6428 @item C-c ?
6429 Display cheat sheet for the MH-E commands (@code{mh-help}).
6430 @c -------------------------
6431 @cindex @samp{Search > Perform Search} menu item
6432 @cindex menu item, @samp{Search > Perform Search}
6433 @kindex C-c C-c
6434 @findex mh-index-do-search
6435 @item C-c C-c
6436 Find messages using @code{mh-search-program}
6437 (@code{mh-index-do-search}).
6438 @c -------------------------
6439 @cindex @samp{Search > Search with pick} menu item
6440 @cindex menu item, @samp{Search > Search with pick}
6441 @kindex C-c C-p
6442 @findex mh-pick-do-search
6443 @item C-c C-p
6444 Find messages using @command{pick} (@code{mh-pick-do-search}).
6445 @c -------------------------
6446 @kindex C-c ?
6447 @findex mh-help
6448 @item C-c ?
6449 Display cheat sheet for the MH-E commands (@code{mh-help}).
6450 @c -------------------------
6451 @kindex C-c C-f C-a
6452 @kindex C-c C-f a
6453 @findex mh-to-field
6454 @item C-c C-f a
6455 @itemx C-c C-f C-a
6456 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
6457 @c -------------------------
6458 @kindex C-c C-f C-b
6459 @kindex C-c C-f b
6460 @item C-c C-f b
6461 @itemx C-c C-f C-b
6462 Move to @samp{Bcc:} header field (@code{mh-to-field}).
6463 @c -------------------------
6464 @kindex C-c C-f C-c
6465 @kindex C-c C-f c
6466 @item C-c C-f c
6467 @itemx C-c C-f C-c
6468 Move to @samp{Cc:} header field (@code{mh-to-field}).
6469 @c -------------------------
6470 @kindex C-c C-f C-d
6471 @kindex C-c C-f d
6472 @item C-c C-f d
6473 @itemx C-c C-f C-d
6474 Move to @samp{Dcc:} header field (@code{mh-to-field}).
6475 @c -------------------------
6476 @kindex C-c C-f C-f
6477 @kindex C-c C-f f
6478 @item C-c C-f f
6479 @itemx C-c C-f C-f
6480 Move to @samp{Fcc:} header field (@code{mh-to-field}).
6481 @c -------------------------
6482 @kindex C-c C-f C-l
6483 @kindex C-c C-f l
6484 @item C-c C-f l
6485 @itemx C-c C-f C-l
6486 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
6487 @c -------------------------
6488 @kindex C-c C-f C-m
6489 @kindex C-c C-f m
6490 @item C-c C-f m
6491 @itemx C-c C-f C-m
6492 Move to @samp{From:} header field (@code{mh-to-field}).
6493 @c -------------------------
6494 @kindex C-c C-f C-r
6495 @kindex C-c C-f r
6496 @item C-c C-f r
6497 @itemx C-c C-f C-r
6498 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
6499 @c -------------------------
6500 @kindex C-c C-f C-s
6501 @kindex C-c C-f s
6502 @item C-c C-f s
6503 @itemx C-c C-f C-s
6504 Move to @samp{Subject:} header field (@code{mh-to-field}).
6505 @c -------------------------
6506 @kindex C-c C-f C-t
6507 @kindex C-c C-f t
6508 @item C-c C-f t
6509 @itemx C-c C-f C-t
6510 Move to @samp{To:} header field (@code{mh-to-field}).
6511 @end table
6512
6513 Another few commands are available in the MH-Folder buffer resulting
6514 from a search.
6515
6516 @table @kbd
6517 @kindex @key{TAB}
6518 @findex mh-index-next-folder
6519 @item @key{TAB}
6520 Jump to the next folder marker (@code{mh-index-next-folder}).
6521 @c -------------------------
6522 @kindex S-@key{TAB}
6523 @findex mh-index-previous-folder
6524 @item S-@key{TAB}
6525 Jump to the previous folder marker (@code{mh-index-previous-folder}).
6526 @c -------------------------
6527 @kindex v
6528 @findex mh-index-visit-folder
6529 @item v
6530 Visit original folder from where the message at point was found
6531 (@code{mh-index-visit-folder}).
6532 @end table
6533
6534 @cindex @samp{mh-search} customization group
6535 @cindex customization group, @samp{mh-search}
6536
6537 There is one option from the @samp{mh-search} customization group used
6538 in searching.
6539
6540 @vtable @code
6541 @item mh-search-program
6542 Search program that MH-E shall use (default: @samp{Auto-detect}).
6543 @end vtable
6544
6545 The following hook is available.
6546
6547 @vtable @code
6548 @item mh-search-mode-hook
6549 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}).
6550 @end vtable
6551
6552 The following face is available.
6553
6554 @vtable @code
6555 @item mh-search-folder
6556 Folder heading face in MH-Folder buffers created by searches.
6557 @end vtable
6558
6559 @findex mh-search-folder
6560 @kindex F s
6561
6562 The command @kbd{F s} (@code{mh-search-folder}) helps you find
6563 messages in your entire corpus of mail. You can search for messages to
6564 or from a particular person or about a particular subject. In fact,
6565 you can also search for messages containing selected strings in any
6566 arbitrary header field or any string found within the messages.
6567
6568 @cindex @command{pick}
6569 @cindex MH commands, @command{pick}
6570
6571 Out of the box, MH-E uses @command{pick} to find messages. With a
6572 little extra effort, you can set an indexing program which rewards you
6573 with extremely quick results. The drawback is that sometimes the index
6574 does not contain the words you're looking for. You can still use
6575 @command{pick} in these situations.
6576
6577 You are prompted for the folder to search. This can be @samp{all} to
6578 search all folders. Note that the search works recursively on the
6579 listed folder.
6580
6581 @cindex MH-Search mode
6582 @cindex modes, MH-Search
6583
6584 Next, an MH-Search buffer appears where you can enter search criteria.
6585
6586 @cartouche
6587 @smallexample
6588 From:
6589 To:
6590 Cc:
6591 Date:
6592 Subject:
6593 --------
6594 #
6595
6596
6597
6598
6599
6600
6601
6602
6603 --:** search-pattern All L7 (MH-Search)---------------------------
6604 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
6605 @end smallexample
6606 @end cartouche
6607 @i{Search window}
6608
6609 @cindex @command{pick}
6610 @cindex MH commands, @command{pick}
6611
6612 Edit this template by entering your search criteria in an appropriate
6613 header field that is already there, or create a new field yourself. If
6614 the string you're looking for could be anywhere in a message, then
6615 place the string underneath the row of dashes.
6616
6617 As an example, let's say that we want to find messages from Ginnean
6618 about horseback riding in the Kosciusko National Park (Australia)
6619 during January, 1994. Normally we would start with a broad search and
6620 narrow it down if necessary to produce a manageable amount of data,
6621 but we'll cut to the chase and create a fairly restrictive set of
6622 criteria as follows:
6623
6624 @smallexample
6625 @group
6626 From: ginnean
6627 To:
6628 Cc:
6629 Date: Jan 1994
6630 Subject:
6631 --------
6632 horse
6633 kosciusko
6634 @end group
6635 @end smallexample
6636
6637 @findex mh-to-field
6638 @kindex C-c C-f C-t
6639
6640 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f
6641 C-t} (@code{mh-to-field}) to help you fill in the blanks.
6642 @xref{Editing Message}.
6643
6644 @kindex F s
6645 @vindex mh-search-mode-hook
6646
6647 If you find that you do the same thing over and over when editing the
6648 search template, you may wish to bind some shortcuts to keys. This can
6649 be done with the variable @code{mh-search-mode-hook}, which is called
6650 when @kbd{F s} is run on a new pattern.
6651
6652 @findex mh-index-do-search
6653 @findex mh-pick-do-search
6654 @kindex C-c C-c
6655 @kindex C-c C-p
6656
6657 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}).
6658 Sometimes you're searching for text that is either not indexed, or
6659 hasn't been indexed yet. In this case you can override the default
6660 method with the pick method by running the command @kbd{C-c C-p}
6661 (@code{mh-pick-do-search}).
6662
6663 @cindex folders, @samp{+mhe-index}
6664 @cindex @samp{+mhe-index}
6665 @findex mh-index-next-folder
6666 @findex mh-index-previous-folder
6667 @kindex @key{TAB}
6668 @kindex S-@key{TAB}
6669 @vindex mh-search-folder
6670
6671 The messages that are found are put in a temporary sub-folder of
6672 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This
6673 buffer is special because it displays messages from multiple folders;
6674 each set of messages from a given folder has a heading with the folder
6675 name. The appearance of the heading can be modified by customizing the
6676 face @code{mh-search-folder}. You can jump back and forth between the
6677 headings using the commands @kbd{@key{TAB}}
6678 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}}
6679 (@code{mh-index-previous-folder}).
6680
6681 @findex mh-index-visit-folder
6682 @findex mh-rescan-folder
6683 @kindex F r
6684 @kindex v
6685
6686 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be
6687 used to visit the folder of the message at point. Initially, only the
6688 messages that matched the search criteria are displayed in the folder.
6689 While the temporary buffer has its own set of message numbers, the
6690 actual messages numbers are shown in the visited folder. Thus, the
6691 command @kbd{v} is useful to find the actual message number of an
6692 interesting message, or to view surrounding messages with the command
6693 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}.
6694
6695 @findex mh-kill-folder
6696 @kindex F k
6697
6698 Because this folder is temporary, you'll probably get in the habit of
6699 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}).
6700 @xref{Folders}.
6701
6702 @kindex F s
6703
6704 You can regenerate the results by running @kbd{F s} with a prefix
6705 argument.
6706
6707 @cindex @command{procmail}
6708 @cindex Unix commands, @command{procmail}
6709 @cindex @samp{X-MHE-Checksum:} header field
6710 @cindex header field, @samp{X-MHE-Checksum:}
6711
6712 Note: This command uses an @samp{X-MHE-Checksum:} header field to
6713 cache the MD5 checksum of a message. This means that if an incoming
6714 message already contains an @samp{X-MHE-Checksum:} field, that message
6715 might not be found by this command. The following @command{procmail}
6716 recipe avoids this problem by renaming the existing header field:
6717
6718 @smallexample
6719 @group
6720 :0 wf
6721 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum"
6722 @end group
6723 @end smallexample
6724
6725 @xref{Limits}, for an alternative interface to searching.
6726
6727 @section Configuring Indexed Searches
6728
6729 @cindex @command{grep}
6730 @cindex @command{mairix}
6731 @cindex @command{namazu}
6732 @cindex @command{pick}
6733 @cindex @command{swish++}
6734 @cindex @command{swish-e}
6735 @cindex Unix commands, @command{grep}
6736 @cindex Unix commands, @command{mairix}
6737 @cindex Unix commands, @command{namazu}
6738 @cindex Unix commands, @command{pick}
6739 @cindex Unix commands, @command{swish++}
6740 @cindex Unix commands, @command{swish-e}
6741 @findex mh-search
6742 @kindex F s
6743 @vindex mh-search-program
6744
6745 The command @kbd{F s} (@code{mh-search}) runs the command defined by
6746 the option @code{mh-search-program}. The default value is
6747 @samp{Auto-detect} which means that MH-E will automatically choose one
6748 of @command{swish++}, @command{swish-e}, @command{mairix},
6749 @command{namazu}, @command{pick} and @command{grep} in that order. If,
6750 for example, you have both @command{swish++} and @command{mairix}
6751 installed and you want to use @command{mairix}, then you can set this
6752 option to @samp{mairix}.
6753
6754 The following sub-sections describe how to set up the various indexing
6755 programs to use with MH-E.
6756
6757 @subsection swish++
6758
6759 @cindex @command{swish++}
6760 @cindex Unix commands, @command{swish++}
6761
6762 In the examples below, replace @file{/home/user/Mail} with the path to
6763 your MH directory.
6764
6765 First create the directory @file{/home/user/Mail/.swish++}. Then
6766 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the
6767 following contents:
6768
6769 @smallexample
6770 @group
6771 IncludeMeta Bcc Cc Comments Content-Description From Keywords
6772 IncludeMeta Newsgroups Resent-To Subject To
6773 IncludeMeta Message-Id References In-Reply-To
6774 IncludeFile Mail *
6775 IndexFile /home/user/Mail/.swish++/swish++.index
6776 @end group
6777 @end smallexample
6778
6779 Use the following command line to generate the swish index. Run this
6780 daily from cron:
6781
6782 @smallexample
6783 @group
6784 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \
6785 -o -path /home/user/Mail/.swish++ -prune \
6786 -o -name "[0-9]*" -print \
6787 | index -c /home/user/Mail/.swish++/swish++.conf -
6788 @end group
6789 @end smallexample
6790
6791 This command does not index the folders that hold the results of your
6792 searches in @samp{+mhe-index} since they tend to be ephemeral and the
6793 original messages are indexed anyway.
6794
6795 @cindex @command{index}
6796 @cindex Unix commands, @command{index}
6797 @cindex @command{index++}
6798 @cindex Unix commands, @command{index++}
6799
6800 On some systems (Debian GNU/Linux, for example), use @command{index++}
6801 instead of @command{index}.
6802
6803 @subsection swish
6804
6805 @cindex @command{swish-e}
6806 @cindex Unix commands, @command{swish-e}
6807
6808 In the examples below, replace @file{/home/user/Mail} with the path to
6809 your MH directory.
6810
6811 First create the directory @file{/home/user/Mail/.swish}. Then create
6812 the file @file{/home/user/Mail/.swish/config} with the following
6813 contents:
6814
6815 @smallexample
6816 @group
6817 DefaultContents TXT*
6818 IndexDir /home/user/Mail
6819 IndexFile /home/user/Mail/.swish/index
6820 IndexName "Mail Index"
6821 IndexDescription "Mail Index"
6822 IndexPointer "http://nowhere"
6823 IndexAdmin "nobody"
6824 #MetaNames automatic
6825 IndexReport 3
6826 FollowSymLinks no
6827 UseStemming no
6828 IgnoreTotalWordCountWhenRanking yes
6829 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
6830 BeginCharacters abcdefghijklmnopqrstuvwxyz
6831 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
6832 IgnoreLimit 50 1000
6833 IndexComments 0
6834 FileRules filename contains \D
6835 FileRules pathname contains /home/user/Mail/.swish
6836 FileRules pathname contains /home/user/Mail/mhe-index
6837 FileRules filename is index
6838 @end group
6839 @end smallexample
6840
6841 This configuration does not index the folders that hold the results of
6842 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6843 the original messages are indexed anyway.
6844
6845 If there are any directories you would like to ignore, append lines
6846 like the following to @file{config}:
6847
6848 @smallexample
6849 FileRules pathname contains /home/user/Mail/scripts
6850 @end smallexample
6851
6852 @cindex @command{swish-e}
6853 @cindex Unix commands, @command{swish-e}
6854
6855 Use the following command line to generate the swish index. Run this
6856 daily from cron:
6857
6858 @smallexample
6859 swish-e -c /home/user/Mail/.swish/config
6860 @end smallexample
6861
6862 @subsection mairix
6863
6864 @cindex @command{mairix}
6865 @cindex Unix commands, @command{mairix}
6866
6867 In the examples below, replace @file{/home/user/Mail} with the path to
6868 your MH directory.
6869
6870 First create the directory @file{/home/user/Mail/.mairix}. Then create
6871 the file @file{/home/user/Mail/.mairix/config} with the following
6872 contents:
6873
6874 @smallexample
6875 @group
6876 base=/home/user/Mail
6877
6878 # List of folders that should be indexed. 3 dots at the end means there
6879 # are subfolders within the folder
6880 mh=archive...:inbox:drafts:news:sent:trash
6881
6882 vfolder_format=raw
6883 database=/home/user/Mail/mairix/database
6884 @end group
6885 @end smallexample
6886
6887 Use the following command line to generate the mairix index. Run this daily
6888 from cron:
6889
6890 @smallexample
6891 mairix -f /home/user/Mail/.mairix/config
6892 @end smallexample
6893
6894 @subsection namazu
6895
6896 @cindex @command{namazu}
6897 @cindex Unix commands, @command{namazu}
6898
6899 In the examples below, replace @file{/home/user/Mail} with the path to
6900 your MH directory.
6901
6902 First create the directory @file{/home/user/Mail/.namazu}. Then create
6903 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following
6904 contents:
6905
6906 @smallexample
6907 @group
6908 package conf; # Don't remove this line!
6909 $ADDRESS = 'user@@localhost';
6910 $ALLOW_FILE = "[0-9]*";
6911 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)";
6912 @end group
6913 @end smallexample
6914
6915 This configuration does not index the folders that hold the results of
6916 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6917 the original messages are indexed anyway.
6918
6919 Use the following command line to generate the namazu index. Run this
6920 daily from cron:
6921
6922 @smallexample
6923 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
6924 /home/user/Mail
6925 @end smallexample
6926
6927 @subsection pick
6928
6929 @cindex @command{pick}
6930 @cindex MH commands, @command{pick}
6931
6932 This search method does not require any setup.
6933
6934 Read @command{pick}(1) or the section
6935 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
6936 the MH book to find out more about how to enter the criteria.
6937
6938 @subsection grep
6939
6940 @cindex @command{grep}
6941 @cindex Unix commands, @command{grep}
6942
6943 This search method does not require any setup.
6944
6945 Unlike the other search methods, this method does not use the
6946 MH-Search buffer. Instead, you simply enter a regular expression in
6947 the minibuffer. For help in constructing regular expressions, see your
6948 man page for @command{grep}.
6949
6950 @node Threading, Limits, Searching, Top
6951 @chapter Viewing Message Threads
6952
6953 @cindex threading
6954
6955 MH-E groups messages by @dfn{threads} which are messages that are part
6956 of the same discussion and usually all have the same @samp{Subject:}
6957 header field. Other ways to organize messages in a folder include
6958 limiting (@pxref{Limits}) or using full-text indexed searches
6959 (@pxref{Searching}).
6960
6961 @cindex root, in threads
6962 @cindex siblings, in threads
6963 @cindex ancestor, in threads
6964
6965 A thread begins with a single message called a @dfn{root}. All replies
6966 to the same message are @dfn{siblings} of each other. Any message that
6967 has replies to it is an @dfn{ancestor} of those replies.
6968
6969 There are several commands that you can use to navigate and operate on
6970 threads.
6971
6972 @table @kbd
6973 @kindex T ?
6974 @findex mh-prefix-help
6975 @item T ?
6976 Display cheat sheet for the commands of the current prefix in
6977 minibuffer (@code{mh-prefix-help}).
6978 @c -------------------------
6979 @kindex T o
6980 @findex mh-thread-refile
6981 @item T o
6982 Refile (output) thread into folder (@code{mh-thread-refile}).
6983 @c -------------------------
6984 @kindex T d
6985 @findex mh-thread-delete
6986 @item T d
6987 Delete thread (@code{mh-thread-delete}).
6988 @c -------------------------
6989 @kindex T t
6990 @findex mh-toggle-threads
6991 @item T t
6992 Toggle threaded view of folder (@code{mh-toggle-threads}).
6993 @c -------------------------
6994 @kindex T n
6995 @findex mh-thread-next-sibling
6996 @item T n
6997 Display next sibling (@code{mh-thread-next-sibling}).
6998 @c -------------------------
6999 @kindex T p
7000 @findex mh-thread-previous-sibling
7001 @item T p
7002 Display previous sibling (@code{mh-thread-previous-sibling}).
7003 @c -------------------------
7004 @kindex T u
7005 @findex mh-thread-ancestor
7006 @item T u
7007 Display ancestor of current message (@code{mh-thread-ancestor}).
7008 @end table
7009
7010 @cindex @samp{mh-thread} customization group
7011 @cindex customization group, @samp{mh-thread}
7012
7013 The @samp{mh-thread} customization group contains one option.
7014
7015 @vtable @code
7016 @item mh-show-threads-flag
7017 On means new folders start in threaded mode (default: @samp{off}).
7018 @end vtable
7019
7020 @findex mh-toggle-threads
7021 @kindex T t
7022 @vindex mh-large-folder
7023 @vindex mh-show-threads-flag
7024
7025 Threading large number of messages can be time consuming so the option
7026 @code{mh-show-threads-flag} is turned off by default. If you turn on
7027 this option, then threading will be done only if the number of
7028 messages being threaded is less than @code{mh-large-folder}. In any
7029 event, threading can be turned on (and off) with the command @kbd{T t}
7030 (@code{mh-toggle-threads}).
7031
7032 @findex mh-thread-ancestor
7033 @findex mh-thread-next-sibling
7034 @findex mh-thread-previous-sibling
7035 @kindex T n
7036 @kindex T p
7037 @kindex T u
7038
7039 There are a few commands to help you navigate threads. If you do not
7040 care for the way a particular thread has turned, you can move up the
7041 chain of messages with the command @kbd{T u}
7042 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n}
7043 (@code{mh-thread-next-sibling} or @kbd{T p}
7044 (@code{mh-thread-previous-sibling}) to jump to the next or previous
7045 sibling, skipping the sub-threads. The command @kbd{T u} can also take
7046 a prefix argument to jump to the message that started everything.
7047
7048 @findex mh-delete-subject-or-thread
7049 @findex mh-thread-delete
7050 @findex mh-thread-refile
7051 @kindex k
7052 @kindex T d
7053 @kindex T o
7054
7055 There are threaded equivalents for the commands that delete and refile
7056 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the
7057 current message and all its children. Similarly, the command @kbd{T d}
7058 (@code{mh-thread-delete}) deletes the current message and all its
7059 children. These commands do not refile or delete sibling messages.
7060 @xref{Navigating}, for a description of the similar command @kbd{k}
7061 (@code{mh-delete-subject-or-thread}).
7062
7063 @vindex mh-large-folder
7064
7065 If you find that threading is too slow, it may be that you have
7066 @code{mh-large-folder} set too high. Also, threading is one of the few
7067 features of MH-E that really benefits from compiling. If you haven't
7068 compiled MH-E, I encourage you to do so@footnote{If you're not sure if
7069 MH-E has been byte-compiled, you could try running @samp{locate
7070 mh-thread.elc} or otherwise find MH-E on your system and ensure that
7071 @file{mh-thread.elc} exists. If you have multiple versions and you
7072 find that one is compiled but the other is not, then go into your
7073 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and
7074 ensure that the byte-compiled version appears first in the
7075 @code{load-path}. If you find that MH-E is not compiled and you
7076 installed MH-E yourself, please refer to the installation directions
7077 in the file @file{README} in the distribution.}.
7078
7079 @node Limits, Sequences, Threading, Top
7080 @chapter Limiting Display
7081
7082 @cindex limits
7083 @cindex filters
7084
7085 Another way to organize messages in a folder besides threading
7086 (@pxref{Threading}) or using full-text indexed searches
7087 (@pxref{Searching}) is by limiting the folder display to messages that
7088 are similar to the current message.
7089
7090 @table @kbd
7091 @kindex / ?
7092 @findex mh-prefix-help
7093 @item / ?
7094 Display cheat sheet for the commands of the current prefix in
7095 minibuffer (@code{mh-prefix-help}).
7096 @c -------------------------
7097 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7098 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7099 @kindex / '
7100 @findex mh-narrow-to-tick
7101 @item / '
7102 Limit to messages in the @samp{tick} sequence
7103 (@code{mh-narrow-to-tick}).
7104 @c -------------------------
7105 @kindex / c
7106 @findex mh-narrow-to-cc
7107 @item / c
7108 Limit to messages with the same @samp{Cc:} field
7109 (@code{mh-narrow-to-cc}).
7110 @c -------------------------
7111 @kindex / m
7112 @findex mh-narrow-to-from
7113 @item / m
7114 Limit to messages with the same @samp{From:} field
7115 (@code{mh-narrow-to-from}).
7116 @c -------------------------
7117 @kindex / g
7118 @findex mh-narrow-to-range
7119 @item / g
7120 Limit to range (@code{mh-narrow-to-range}).
7121 @c -------------------------
7122 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item
7123 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence}
7124 @kindex / s
7125 @findex mh-narrow-to-subject
7126 @item / s
7127 Limit to messages with the same @samp{Subject:} field
7128 (@code{mh-narrow-to-subject}).
7129 @c -------------------------
7130 @kindex / t
7131 @findex mh-narrow-to-to
7132 @item / t
7133 Limit to messages with the same @samp{To:} field
7134 (@code{mh-narrow-to-to}).
7135 @c -------------------------
7136 @cindex @samp{Sequence > Widen from Sequence} menu item
7137 @cindex menu item, @samp{Sequence > Widen from Sequence}
7138 @kindex / w
7139 @findex mh-widen
7140 @item / w
7141 Remove last restriction (@code{mh-widen}).
7142 @end table
7143
7144 All of the limiting commands above refine the display in some way.
7145
7146 @cindex @command{pick}
7147 @cindex MH commands, @command{pick}
7148 @findex mh-narrow-to-cc
7149 @findex mh-narrow-to-from
7150 @findex mh-narrow-to-subject
7151 @findex mh-narrow-to-to
7152 @kindex / c
7153 @kindex / m
7154 @kindex / s
7155 @kindex / t
7156
7157 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m}
7158 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}),
7159 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to
7160 messages matching the content of the respective field in the current
7161 message. However, you can give any of these a prefix argument to edit
7162 the @command{pick} expression used to narrow the view@footnote{See
7163 @command{pick}(1) or the section
7164 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
7165 the MH book.}.
7166
7167 @cindex @samp{tick} sequence
7168 @cindex sequence, @samp{tick}
7169 @cindex ticked messages, viewing
7170 @findex mh-narrow-to-range
7171 @findex mh-narrow-to-tick
7172 @kindex / '
7173 @kindex / g
7174
7175 You can also limit the display to messages in the @samp{tick} sequence
7176 with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
7177 @xref{Sequences}, for information on putting message into the
7178 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range})
7179 command to limit the display to messages in a range (@pxref{Ranges}).
7180
7181 @findex mh-widen
7182 @kindex / w
7183
7184 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen})
7185 command. Give this command a prefix argument to remove all limits.
7186
7187 @node Sequences, Junk, Limits, Top
7188 @chapter Using Sequences
7189
7190 @cindex @samp{Sequence} menu
7191 @cindex menu, @samp{Sequence}
7192 @cindex sequences
7193
7194 For the whole scoop on MH sequences, refer to
7195 @samp{mh-sequence}(5)@footnote{See the section
7196 @uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH
7197 book.}. As you've read, several of the MH-E commands can operate on a
7198 sequence, which is a shorthand for a range or group of messages. For
7199 example, you might want to forward several messages to a friend or
7200 colleague. Here's how to manipulate sequences. These commands are also
7201 available in the @samp{Sequence} menu.
7202
7203 @table @kbd
7204 @cindex @samp{Sequence > Toggle Tick Mark} menu item
7205 @cindex menu item, @samp{Sequence > Toggle Tick Mark}
7206 @kindex '
7207 @findex mh-toggle-tick
7208 @item '
7209 Toggle tick mark of range (@code{mh-toggle-tick}).
7210 @c -------------------------
7211 @kindex S ?
7212 @findex mh-prefix-help
7213 @item S ?
7214 Display cheat sheet for the commands of the current prefix in
7215 minibuffer (@code{mh-prefix-help}).
7216 @c -------------------------
7217 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7218 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7219 @kindex S '
7220 @findex mh-narrow-to-tick
7221 @item S '
7222 Limit to ticked messages (@code{mh-narrow-to-tick}).
7223 @c -------------------------
7224 @cindex @samp{Sequence > Delete Message from Sequence...} menu item
7225 @cindex menu item, @samp{Sequence > Delete Message from Sequence...}
7226 @kindex S d
7227 @findex mh-delete-msg-from-seq
7228 @item S d
7229 Delete range from sequence (@code{mh-delete-msg-from-seq}).
7230 @c -------------------------
7231 @cindex @samp{Sequence > Delete Sequence...} menu item
7232 @cindex menu item, @samp{Sequence > Delete Sequence...}
7233 @kindex S k
7234 @findex mh-delete-seq
7235 @item S k
7236 Delete sequence (@code{mh-delete-seq}).
7237 @c -------------------------
7238 @cindex @samp{Sequence > List Sequences in Folder...} menu item
7239 @cindex menu item, @samp{Sequence > List Sequences in Folder...}
7240 @kindex S l
7241 @findex mh-list-sequences
7242 @item S l
7243 List all sequences in folder (@code{mh-list-sequences}).
7244 @c -------------------------
7245 @cindex @samp{Sequence > Narrow to Sequence...} menu item
7246 @cindex menu item, @samp{Sequence > Narrow to Sequence...}
7247 @kindex S n
7248 @findex mh-narrow-to-seq
7249 @item S n
7250 Restrict display to messages in sequence (@code{mh-narrow-to-seq}).
7251 @c -------------------------
7252 @cindex @samp{Sequence > Add Message to Sequence...} menu item
7253 @cindex menu item, @samp{Sequence > Add Message to Sequence...}
7254 @kindex S p
7255 @findex mh-put-msg-in-seq
7256 @item S p
7257 Add range to sequence (@code{mh-put-msg-in-seq}).
7258 @c -------------------------
7259 @cindex @samp{Sequence > List Sequences for Message} menu item
7260 @cindex menu item, @samp{Sequence > List Sequences for Message}
7261 @kindex S s
7262 @findex mh-msg-is-in-seq
7263 @item S s
7264 Display the sequences in which the current message appears
7265 (@code{mh-msg-is-in-seq}).
7266 @c -------------------------
7267 @cindex @samp{Sequence > Widen from Sequence} menu item
7268 @cindex menu item, @samp{Sequence > Widen from Sequence}
7269 @kindex S w
7270 @findex mh-widen
7271 @item S w
7272 Remove last restriction (@code{mh-widen}).
7273 @c -------------------------
7274 @findex mh-update-sequences
7275 @item M-x mh-update-sequences
7276 Flush MH-E's state out to MH@.
7277 @end table
7278
7279 @cindex @samp{mh-sequences} customization group
7280 @cindex customization group, @samp{mh-sequences}
7281
7282 The @samp{mh-sequences} customization group contains the options
7283 associated with sequences.
7284
7285 @vtable @code
7286 @item mh-refile-preserves-sequences-flag
7287 On means that sequences are preserved when messages are refiled
7288 (default: @samp{on}).
7289 @c -------------------------
7290 @item mh-tick-seq
7291 The name of the MH sequence for ticked messages (default: @samp{'tick}).
7292 @c -------------------------
7293 @item mh-update-sequences-after-mh-show-flag
7294 On means flush MH sequences to disk after message is shown (default:
7295 @samp{on}).
7296 @end vtable
7297
7298 The following hook is available.
7299
7300 @vtable @code
7301 @item mh-unseen-updated-hook
7302 Hook run after the unseen sequence has been updated (default: @code{nil}).
7303 @end vtable
7304
7305 @cindex @command{pick}
7306 @cindex MH commands, @command{pick}
7307 @findex mh-put-msg-in-seq
7308 @kindex S p
7309
7310 To place a message in a sequence, use @kbd{S p}
7311 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all
7312 the messages in a sequence to another sequence (for example, @kbd{C-u
7313 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}).
7314
7315 @cindex @samp{tick} sequence
7316 @cindex sequence, @samp{tick}
7317 @cindex ticking messages
7318 @findex mh-index-ticked-messages
7319 @findex mh-toggle-tick
7320 @kindex '
7321 @kindex F '
7322 @kindex S p
7323
7324 One specific use of the @kbd{S p} command is @kbd{'}
7325 (@code{mh-toggle-tick}) which adds messages to the @samp{tick}
7326 sequence. This sequence can be viewed later with the @kbd{F '}
7327 (@code{mh-index-ticked-messages}) command (@pxref{Folders}).
7328
7329 @vindex mh-tick-seq
7330
7331 You can customize the option @code{mh-tick-seq} if you already use the
7332 @samp{tick} sequence for your own use. You can also disable all of the
7333 ticking functions by choosing the @samp{Disable Ticking} item but
7334 there isn't much advantage to that.
7335
7336 @cindex MH-Folder mode
7337 @cindex modes, MH-Folder
7338 @findex mh-narrow-to-seq
7339 @findex mh-narrow-to-tick
7340 @findex mh-widen
7341 @kindex S '
7342 @kindex S n
7343 @kindex S w
7344
7345 Once you've placed some messages in a sequence, you may wish to narrow
7346 the field of view to just those messages in the sequence you've
7347 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are
7348 prompted for the name of the sequence. What this does is show only
7349 those messages that are in the selected sequence in the MH-Folder
7350 buffer. In addition, it limits further MH-E searches to just those
7351 messages. To narrow the view to the messages in the @samp{tick}
7352 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to
7353 widen the view to all your messages again, use @kbd{S w}
7354 (@code{mh-widen}).
7355
7356 @cindex buffers, @samp{*MH-E Sequences*}
7357 @cindex @samp{*MH-E Sequences*}
7358 @findex mh-list-sequences
7359 @findex mh-msg-is-in-seq
7360 @kindex S l
7361 @kindex S s
7362
7363 You can see which sequences in which a message appears with the
7364 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to
7365 display the sequences in which another message appears (as in @kbd{C-u
7366 42 S s @key{RET}}). Or, you can list all sequences in a selected
7367 folder (default is current folder) with @kbd{S l}
7368 (@code{mh-list-sequences}). The list appears in a buffer named
7369 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}).
7370
7371 @cindex MH profile component, @samp{Previous-Sequence:}
7372 @cindex @samp{cur} sequence
7373 @cindex @samp{Previous-Sequence:} MH profile component
7374 @cindex sequence, @samp{cur}
7375 @cindex sequence, @samp{Previous-Sequence}
7376 @vindex mh-refile-preserves-sequences-flag
7377
7378 If a message is in any sequence (except
7379 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and
7380 @samp{cur}) when it is refiled, then it will still be in those
7381 sequences in the destination folder. If this behavior is not desired,
7382 then turn off the option @code{mh-refile-preserves-sequences-flag}.
7383
7384 @findex mh-delete-msg-from-seq
7385 @findex mh-delete-seq
7386 @kindex d
7387 @kindex S d
7388 @kindex S k
7389
7390 If you want to remove a message (or range, @pxref{Ranges}) from a
7391 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want
7392 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In
7393 the latter case you are prompted for the sequence to delete. Note that
7394 this deletes only the sequence, not the messages in the sequence. If
7395 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading
7396 Mail}).
7397
7398 @cindex @samp{Unseen-Sequence:} MH profile component
7399 @cindex @samp{cur} sequence
7400 @cindex @samp{tick} sequence
7401 @cindex MH profile component, @samp{Unseen-Sequence:}
7402 @cindex sequence, @samp{Unseen-Sequence}
7403 @cindex sequence, @samp{cur}
7404 @cindex sequence, @samp{tick}
7405 @findex mh-update-sequences
7406 @kindex M-x mh-update-sequences
7407 @kindex q
7408 @kindex x
7409 @vindex mh-tick-seq
7410 @vindex mh-update-sequences-after-mh-show-flag
7411
7412 Three sequences are maintained internally by MH-E and pushed out to MH
7413 when a message is shown. They include the sequence specified by your
7414 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the
7415 sequence listed by the option @code{mh-tick-seq} which is @samp{tick}
7416 by default. If you do not like this behavior, turn off the option
7417 @code{mh-update-sequences-after-mh-show-flag}. You can then update the
7418 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x
7419 mh-update-sequences} commands.
7420
7421 @vindex mh-seen-list
7422 @vindex mh-unseen-updated-hook
7423
7424 The hook @code{mh-unseen-updated-hook} is run after the unseen
7425 sequence has been updated. The variable @code{mh-seen-list} can be
7426 used by this hook to obtain the list of messages which were removed
7427 from the unseen sequence.
7428
7429 @cindex @command{mark}
7430 @cindex MH commands, @command{mark}
7431 @kindex S n
7432 @kindex S w
7433
7434 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
7435 command dealing with sequences is @command{mark}@footnote{See the
7436 section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks
7437 with mark} in the MH book.}.
7438
7439 @node Junk, Miscellaneous, Sequences, Top
7440 @chapter Dealing With Junk Mail
7441
7442 @cindex Marshall Rose
7443 @cindex junk mail
7444 @cindex spam
7445
7446 Marshall Rose once wrote a paper on MH entitled, @cite{How to process
7447 200 messages a day and still get some real work done}. This chapter
7448 could be entitled, @cite{How to process 1000 spams a day and still get
7449 some real work done}.
7450
7451 @cindex blacklisting
7452 @cindex ham
7453 @cindex viruses
7454 @cindex whitelisting
7455 @cindex worms
7456
7457 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for
7458 any unwanted message which includes spam, @dfn{viruses}, and
7459 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying
7460 a sender as one who sends junk mail is called @dfn{blacklisting}; the
7461 opposite is called @dfn{whitelisting}.
7462
7463 @table @kbd
7464 @kindex J ?
7465 @findex mh-prefix-help
7466 @item J ?
7467 Display cheat sheet for the commands of the current prefix in
7468 minibuffer (@code{mh-prefix-help}).
7469 @c -------------------------
7470 @kindex J b
7471 @findex mh-junk-blacklist
7472 @item J b
7473 Blacklist range as spam (@code{mh-junk-blacklist}).
7474 @c -------------------------
7475 @kindex J w
7476 @findex mh-junk-whitelist
7477 @item J w
7478 Whitelist range as ham (@code{mh-junk-whitelist}).
7479 @c -------------------------
7480 @item @code{mh-spamassassin-identify-spammers}
7481 Identify spammers who are repeat offenders.
7482 @end table
7483
7484 @cindex @samp{mh-junk} customization group
7485 @cindex customization group, @samp{mh-junk}
7486
7487 The following table lists the options from the @samp{mh-junk}
7488 customization group.
7489
7490 @vtable @code
7491 @item mh-junk-background
7492 If on, spam programs are run in background (default: @samp{off}).
7493 @c -------------------------
7494 @item mh-junk-disposition
7495 Disposition of junk mail (default: @samp{Delete Spam}).
7496 @c -------------------------
7497 @item mh-junk-program
7498 Spam program that MH-E should use (default: @samp{Auto-detect}).
7499 @end vtable
7500
7501 @cindex SpamProbe
7502 @cindex Spamassassin
7503 @cindex bogofilter
7504 @cindex spam filters, SpamProbe
7505 @cindex spam filters, Spamassassin
7506 @cindex spam filters, bogofilter
7507
7508 MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin},
7509 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or
7510 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck
7511 away. This chapter describes briefly how to configure these programs
7512 to work well with MH-E and how to use MH-E's interface that provides
7513 continuing education for these programs.
7514
7515 @vindex mh-junk-program
7516
7517 The default setting of the option @code{mh-junk-program} is
7518 @samp{Auto-detect} which means that MH-E will automatically choose one
7519 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for
7520 example, you have both SpamAssassin and bogofilter installed and you
7521 want to use bogofilter, then you can set this option to
7522 @samp{Bogofilter}.
7523
7524 @findex mh-junk-blacklist
7525 @kindex J b
7526 @vindex mh-junk-disposition
7527
7528 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam
7529 program in use with the content of the range (@pxref{Ranges}) and then
7530 handles the message(s) as specified by the option
7531 @code{mh-junk-disposition}. By default, this option is set to
7532 @samp{Delete Spam} but you can also specify the name of the folder
7533 which is useful for building a corpus of spam for training purposes.
7534
7535 @findex mh-junk-whitelist
7536 @kindex J w
7537
7538 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist})
7539 reclassifies a range of messages (@pxref{Ranges}) as ham if it were
7540 incorrectly classified as spam. It then refiles the message into the
7541 @file{+inbox} folder.
7542
7543 @vindex mh-junk-background
7544
7545 By default, the programs are run in the foreground, but this can be
7546 slow when junking large numbers of messages. If you have enough memory
7547 or don't junk that many messages at the same time, you might try
7548 turning on the option @code{mh-junk-background}.
7549
7550 The following sections discuss the various counter-spam measures that
7551 MH-E can work with.
7552
7553 @cindex @file{.procmailrc}
7554 @cindex files, @file{.procmailrc}
7555
7556 @subheading SpamAssassin
7557
7558 @cindex Spamassassin
7559 @cindex spam filters, Spamassassin
7560
7561 SpamAssassin is one of the more popular spam filtering programs. Get
7562 it from your local distribution or from the
7563 @uref{http://spamassassin.apache.org/, SpamAssassin web site}.
7564
7565 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}:
7566
7567 @cindex @command{spamc}
7568 @cindex @samp{X-Spam-Level:} header field
7569 @cindex @samp{X-Spam-Status:} header field
7570 @cindex header field, @samp{X-Spam-Level:}
7571 @cindex header field, @samp{X-Spam-Status:}
7572
7573 @smallexample
7574 MAILDIR=$HOME/`mhparam Path`
7575
7576 # Fight spam with SpamAssassin.
7577 :0fw
7578 | spamc
7579
7580 # Anything with a spam level of 10 or more is junked immediately.
7581 :0:
7582 * ^X-Spam-Level: ..........
7583 /dev/null
7584
7585 :0:
7586 * ^X-Spam-Status: Yes
7587 spam/.
7588 @end smallexample
7589
7590 If you don't use @command{spamc}, use @samp{spamassassin -P -a}.
7591
7592 Note that one of the recipes above throws away messages with a score
7593 greater than or equal to 10. Here's how you can determine a value that
7594 works best for you.
7595
7596 First, run @samp{spamassassin -t} on every mail message in your
7597 archive and use @command{gnumeric} to verify that the average plus the
7598 standard deviation of good mail is under 5, the SpamAssassin default
7599 for ``spam''.
7600
7601 Using @command{gnumeric}, sort the messages by score and view the
7602 messages with the highest score. Determine the score which encompasses
7603 all of your interesting messages and add a couple of points to be
7604 conservative. Add that many dots to the @samp{X-Spam-Level:} header
7605 field above to send messages with that score down the drain.
7606
7607 In the example above, messages with a score of 5-9 are set aside in
7608 the @samp{+spam} folder for later review. The major weakness of
7609 rules-based filters is a plethora of false positives so it is
7610 worthwhile to check.
7611
7612 @findex mh-junk-blacklist
7613 @findex mh-junk-whitelist
7614 @kindex J b
7615 @kindex J w
7616
7617 If SpamAssassin classifies a message incorrectly, or is unsure, you can
7618 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and
7619 @kbd{J w} (@code{mh-junk-whitelist}).
7620
7621 @cindex @command{sa-learn}
7622 @cindex @file{.spamassassin/user_prefs}
7623 @cindex files, @file{.spamassassin/user_prefs}
7624
7625 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a
7626 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs},
7627 deletes the message, and sends the message to the Razor, so that
7628 others might not see this spam. If the @command{sa-learn} command is
7629 available, the message is also recategorized as spam.
7630
7631 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a
7632 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If
7633 the @command{sa-learn} command is available, the message is also
7634 recategorized as ham.
7635
7636 Over time, you'll observe that the same host or domain occurs
7637 repeatedly in the @samp{blacklist_from} entries, so you might think
7638 that you could avoid future spam by blacklisting all mail from a
7639 particular domain. The utility function
7640 @code{mh-spamassassin-identify-spammers} helps you do precisely that.
7641 This function displays a frequency count of the hosts and domains in
7642 the @samp{blacklist_from} entries from the last blank line in
7643 @file{~/.spamassassin/user_prefs} to the end of the file. This
7644 information can be used so that you can replace multiple
7645 @samp{blacklist_from} entries with a single wildcard entry such as:
7646
7647 @smallexample
7648 blacklist_from *@@*amazingoffersdirect2u.com
7649 @end smallexample
7650
7651 In versions of SpamAssassin (2.50 and on) that support a Bayesian
7652 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program
7653 @command{sa-learn} to recategorize the message as spam. Neither MH-E,
7654 nor SpamAssassin, rebuilds the database after adding words, so you
7655 will need to run @samp{sa-learn --rebuild} periodically. This can be
7656 done by adding the following to your @file{crontab}:
7657
7658 @smallexample
7659 0 * * * * sa-learn --rebuild > /dev/null 2>&1
7660 @end smallexample
7661
7662 @subheading Bogofilter
7663
7664 @cindex bogofilter
7665 @cindex spam filters, bogofilter
7666
7667 Bogofilter is a Bayesian spam filtering program. Get it from your
7668 local distribution or from the
7669 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}.
7670
7671 Bogofilter is taught by running:
7672
7673 @smallexample
7674 bogofilter -n < good-message
7675 @end smallexample
7676
7677 on every good message, and
7678
7679 @smallexample
7680 bogofilter -s < spam-message
7681 @end smallexample
7682
7683 @cindex full training
7684
7685 on every spam message. This is called a @dfn{full training}; three
7686 other training methods are described in the FAQ that is distributed
7687 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of
7688 each type of message to start doing a good job.
7689
7690 To use bogofilter, add the following recipes to @file{~/.procmailrc}:
7691
7692 @cindex @samp{X-Bogosity:} header field
7693 @cindex header field, @samp{X-Bogosity:}
7694
7695 @smallexample
7696 MAILDIR=$HOME/`mhparam Path`
7697
7698 # Fight spam with Bogofilter.
7699 :0fw
7700 | bogofilter -3 -e -p
7701
7702 :0:
7703 * ^X-Bogosity: Yes, tests=bogofilter
7704 spam/.
7705
7706 :0:
7707 * ^X-Bogosity: Unsure, tests=bogofilter
7708 spam/unsure/.
7709 @end smallexample
7710
7711 @findex mh-junk-blacklist
7712 @findex mh-junk-whitelist
7713 @kindex J b
7714 @kindex J w
7715
7716 If bogofilter classifies a message incorrectly, or is unsure, you can
7717 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J
7718 w} (@code{mh-junk-whitelist}) to update bogofilter's training.
7719
7720 The @cite{Bogofilter FAQ} suggests that you run the following
7721 occasionally to shrink the database:
7722
7723 @smallexample
7724 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new
7725 mv wordlist.db wordlist.db.prv
7726 mv wordlist.db.new wordlist.db
7727 @end smallexample
7728
7729 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune
7730 bogofilter.
7731
7732 @subheading SpamProbe
7733
7734 @cindex SpamProbe
7735 @cindex spam filters, SpamProbe
7736
7737 SpamProbe is a Bayesian spam filtering program. Get it from your local
7738 distribution or from the @uref{http://spamprobe.sourceforge.net,
7739 SpamProbe web site}.
7740
7741 To use SpamProbe, add the following recipes to @file{~/.procmailrc}:
7742
7743 @cindex @command{formail}
7744 @cindex @samp{X-SpamProbe:} header field
7745 @cindex header field, @samp{X-SpamProbe:}
7746
7747 @smallexample
7748 MAILDIR=$HOME/`mhparam Path`
7749
7750 # Fight spam with SpamProbe.
7751 :0
7752 SCORE=| spamprobe receive
7753
7754 :0 wf
7755 | formail -I "X-SpamProbe: $SCORE"
7756
7757 :0:
7758 *^X-SpamProbe: SPAM
7759 spam/.
7760 @end smallexample
7761
7762 @findex mh-junk-blacklist
7763 @findex mh-junk-whitelist
7764 @kindex J b
7765 @kindex J w
7766
7767 If SpamProbe classifies a message incorrectly, you can use the MH-E
7768 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w}
7769 (@code{mh-junk-whitelist}) to update SpamProbe's training.
7770
7771 @subheading Other Things You Can Do
7772
7773 There are a couple of things that you can add to @file{~/.procmailrc}
7774 in order to filter out a lot of spam and viruses. The first is to
7775 eliminate any message with a Windows executable (which is most likely
7776 a virus). The second is to eliminate mail in character sets that you
7777 can't read.
7778
7779 @cindex @samp{Content-Transfer-Encoding:} header field
7780 @cindex @samp{Content-Type:} header field
7781 @cindex @samp{Subject:} header field
7782 @cindex header field, @samp{Content-Transfer-Encoding:}
7783 @cindex header field, @samp{Content-Type:}
7784 @cindex header field, @samp{Subject:}
7785
7786 @smallexample
7787 MAILDIR=$HOME/`mhparam Path`
7788
7789 #
7790 # Filter messages with win32 executables/virii.
7791 #
7792 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg
7793 # pattern. The string "this program cannot be run in MS-DOS mode"
7794 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false
7795 # positives (Roland Smith via Pete from the bogofilter mailing list).
7796 #
7797 :0 B:
7798 * ^Content-Transfer-Encoding:.*base64
7799 * ^TVqQAAMAAAAEAAAA//8AALg
7800 * 4fug4AtAnNIbg
7801 spam/exe/.
7802
7803 #
7804 # Filter mail in unreadable character sets (from the Bogofilter FAQ).
7805 #
7806 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987'
7807
7808 :0:
7809 * 1^0 $ ^Subject:.*=\?($UNREADABLE)
7810 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE)
7811 spam/unreadable/.
7812
7813 :0:
7814 * ^Content-Type:.*multipart
7815 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE)
7816 spam/unreadable/.
7817 @end smallexample
7818
7819 @node Miscellaneous, Scan Line Formats, Junk, Top
7820 @chapter Miscellaneous Commands, Variables, and Buffers
7821
7822 This chapter covers the following command and the various MH-E
7823 buffers,
7824
7825 @ftable @code
7826 @item mh-version
7827 Display version information about MH-E and the MH mail handling
7828 system.
7829 @end ftable
7830
7831 @cindex buffers, @samp{*MH-E Info*}
7832 @cindex MH-E version
7833 @cindex @samp{*MH-E Info*}
7834 @cindex version
7835 @kindex M-x mh-version
7836
7837 One command worth noting is @kbd{M-x mh-version}. You can compare the
7838 version this command prints to the latest release (@pxref{Getting
7839 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named
7840 @samp{*MH-E Info*}, should usually be included with any bug report you
7841 submit (@pxref{Bug Reports}).
7842
7843 @subheading MH-E Buffers
7844
7845 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates
7846 several other buffers. They are:
7847
7848 @table @samp
7849 @cindex @samp{*MH-E Folders*}
7850 @cindex buffers, @samp{*MH-E Folders*}
7851 @findex mh-list-folders
7852 @item *MH-E Folders*
7853 @kindex F l
7854 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}).
7855 @xref{Folders}.
7856 @c -------------------------
7857 @cindex @samp{*MH-E Help*}
7858 @cindex buffers, @samp{*MH-E Help*}
7859 @findex mh-help
7860 @item *MH-E Help*
7861 @kindex ?
7862 @kindex C-c ?
7863 This buffer contains the output of @kbd{?} (@code{mh-help}) and
7864 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}.
7865 @c -------------------------
7866 @cindex @samp{*MH-E Info*}
7867 @cindex buffers, @samp{*MH-E Info*}
7868 @item *MH-E Info*
7869 This buffer contains the output of @kbd{M-x mh-version @key{RET}}.
7870 @c -------------------------
7871 @cindex @samp{*MH-E Log*}
7872 @cindex buffers, @samp{*MH-E Log*}
7873 @item *MH-E Log*
7874 This buffer contains the last 100 lines of the output of the various
7875 MH commands.
7876 @c -------------------------
7877 @cindex @samp{*MH-E Mail Delivery*}
7878 @cindex buffers, @samp{*MH-E Mail Delivery*}
7879 @item *MH-E Mail Delivery*
7880 This buffer contains the transcript of a mail delivery. @xref{Sending
7881 Message}.
7882 @c -------------------------
7883 @cindex @samp{*MH-E Recipients*}
7884 @cindex buffers, @samp{*MH-E Recipients*}
7885 @findex mh-check-whom
7886 @item *MH-E Recipients*
7887 @kindex C-c C-w
7888 This buffer contains the output of @kbd{C-c C-w}
7889 (@code{mh-check-whom}) and is killed when draft is sent.
7890 @xref{Checking Recipients}.
7891 @c -------------------------
7892 @cindex @samp{*MH-E Sequences*}
7893 @cindex buffers, @samp{*MH-E Sequences*}
7894 @item *MH-E Sequences*
7895 This buffer contains the output of @kbd{S l}
7896 (@code{mh-list-sequences}). @xref{Sequences}.
7897 @c -------------------------
7898 @cindex @samp{*mh-temp*}
7899 @cindex buffers, @samp{*mh-temp*}
7900 @item *mh-temp*
7901 This is a scratch, ephemeral, buffer used by MH-E functions. Note that
7902 it is hidden because the first character in the name is a space.
7903 You'll generally not have any need for this buffer.
7904 @end table
7905
7906 @node Scan Line Formats, Procmail, Miscellaneous, Top
7907 @appendix Scan Line Formats
7908
7909 @cindex scan line formats
7910
7911 This appendix discusses how MH-E creates, parses, and manipulates scan
7912 lines. If you have your own MH scan or inc format files, you
7913 @strong{can} teach MH-E how to handle them, but it isn't easy as
7914 you'll see.
7915
7916 @cindex @samp{mh-scan-line-formats} customization group
7917 @cindex customization group, @samp{mh-scan-line-formats}
7918
7919 This table lists the options in the @samp{mh-scan-line-formats}
7920 customization group.
7921
7922 @vtable @code
7923 @item mh-adaptive-cmd-note-flag
7924 On means that the message number width is determined dynamically
7925 (default: @samp{on}).
7926 @c -------------------------
7927 @item mh-scan-format-file
7928 Specifies the format file to pass to the scan program (default:
7929 @samp{Use MH-E scan Format}).
7930 @c -------------------------
7931 @item mh-scan-prog
7932 Program used to scan messages (default: @code{"scan"}).
7933 @end vtable
7934
7935 @vindex mh-adaptive-cmd-note-flag
7936
7937 There are a couple of caveats when creating your own scan format file.
7938 First, MH-E will not work if your scan lines do not include message
7939 numbers. It will work poorly if you don't dedicate a column for
7940 showing the current message and notations. You won't be able to use
7941 the option @code{mh-adaptive-cmd-note-flag} or the threading features
7942 (@pxref{Threading}).
7943
7944 @cindex message numbers
7945 @findex mh-set-cmd-note
7946 @vindex mh-adaptive-cmd-note-flag
7947 @vindex mh-scan-format-file
7948
7949 If you've created your own format to handle long message numbers,
7950 you'll be pleased to know you no longer need it since MH-E adapts its
7951 internal format based upon the largest message number if
7952 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer
7953 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag}
7954 and call @code{mh-set-cmd-note} with the width specified by your
7955 format file (see @code{mh-scan-format-file}). For example, the default
7956 width is 4, so you would use @samp{(mh-set-cmd-note 4)}.
7957
7958 @vindex mh-adaptive-cmd-note-flag
7959 @vindex mh-scan-format-file
7960 @vindex mh-scan-format-mh
7961 @vindex mh-scan-format-nmh
7962
7963 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E
7964 scan Format}. This means that the format string will be taken from the
7965 either @code{mh-scan-format-mh} or @code{mh-scan-format-nmh} depending
7966 on whether MH or nmh (or GNU mailutils) is in use. This setting also
7967 enables you to turn on the option @code{mh-adaptive-cmd-note-flag}.
7968 You can also set this option to @samp{Use Default scan Format} to get
7969 the same output as you would get if you ran @command{scan} from the
7970 shell. If you have a format file that you want MH-E to use but not MH,
7971 you can set this option to @samp{Specify a scan Format File} and enter
7972 the name of your format file.
7973
7974 @vindex mh-scan-format-file
7975 @vindex mh-scan-format-mh
7976 @vindex mh-scan-format-nmh
7977
7978 The scan format that MH-E uses when @code{mh-scan-format-file} is set
7979 to its default of @samp{Use MH-E scan Format} is held in the variables
7980 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on
7981 whether you are using nmh (or GNU mailutils) or not. Typically, you
7982 create your own format files rather than modifying these variables.
7983 The value of @code{mh-scan-format-nmh} is:
7984
7985 @smallexample
7986 (concat
7987 "%4(msg)"
7988 "%<(cur)+%| %>"
7989 "%<@{replied@}-"
7990 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>"
7991 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>"
7992 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>"
7993 "%?(nonnull(comp@{newsgroups@}))n%>"
7994 "%<(zero) %>"
7995 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>"
7996 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>"
7997 "%<(zero)%17(decode(friendly@{from@}))%> "
7998 "%(decode@{subject@})%<@{body@}<<%@{body@}%>")
7999 @end smallexample
8000
8001 @cindex decoding RFC 2047
8002 @cindex RFC 2047, decoding
8003 @vindex mh-scan-format-mh
8004
8005 The setting for @code{mh-scan-format-mh} is similar, except that MH
8006 doesn't have the function @code{decode} (which is used to decode RFC
8007 2047 encodings).
8008
8009 @cindex notations, scan line
8010 @cindex scan line notations
8011
8012 These strings are passed to the @command{scan} program via the
8013 @option{-format} argument. The formats are identical to the defaults
8014 except that additional hints for fontification have been added to the
8015 existing notations in the fifth column (remember that in Emacs, the
8016 columns start at 0). The values of the fifth column, in priority
8017 order, are: @samp{-} if the message has been replied to, @samp{t} if
8018 an address in the @samp{To:} field matches one of the mailboxes of the
8019 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if
8020 the @samp{Bcc:} field matches, and @samp{n} if a non-empty
8021 @samp{Newsgroups:} field is present.
8022
8023 @cindex @command{scan}
8024 @cindex MH commands, @command{scan}
8025 @vindex mh-progs
8026 @vindex mh-scan-prog
8027
8028 The name of the program that generates a listing of one line per
8029 message is held in @code{mh-scan-prog} (default: @code{"scan"}).
8030 Unless this variable contains an absolute pathname, it is assumed to
8031 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
8032 link another program to @command{scan} (see @samp{mh-profile}(5)) to
8033 produce a different type of listing@footnote{See the section
8034 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
8035 pick Ranges Sequences} in the MH book.}.
8036
8037 @cindex regular expressions, scan line formats
8038 @findex mh-set-cmd-note
8039 @findex setq
8040
8041 If you change the format of the scan lines you'll need to tell MH-E
8042 how to parse the new format. As you will see, quite a lot of variables
8043 are involved to do that. Use @kbd{M-x apropos @key{RET}
8044 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You
8045 will also have to call @code{mh-set-cmd-note} if your notations are
8046 not in column 4 (columns in Emacs start with 0). Note that unlike most
8047 of the user options described in this manual, these are variables and
8048 must be set with @code{setq} instead of in a customization buffer. For
8049 help with regular expressions, see
8050 @ifnothtml
8051 @ref{Regexps, , Syntax of Regular Expressions, emacs, The
8052 GNU Emacs Manual}.
8053 @end ifnothtml
8054 @ifhtml
8055 section
8056 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
8057 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}.
8058 @end ifhtml
8059
8060 The first variable has to do with pruning out garbage.
8061
8062 @vtable @code
8063 @cindex @command{inc}
8064 @cindex MH commands, @command{inc}
8065 @cindex @command{scan}
8066 @cindex MH commands, @command{scan}
8067 @item mh-scan-valid-regexp
8068 This regular expression describes a valid scan line. This is used to
8069 eliminate error messages that are occasionally produced by
8070 @command{inc}@footnote{See the section
8071 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
8072 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
8073 @end vtable
8074
8075 Next, many variables control how the scan lines are parsed.
8076
8077 @vtable @code
8078 @vindex mh-folder-body
8079 @vindex mh-folder-font-lock-keywords
8080 @item mh-scan-body-regexp
8081 This regular expression matches the message body fragment. Note that
8082 the default setting of @code{mh-folder-font-lock-keywords} expects
8083 this expression to contain at least one parenthesized expression which
8084 matches the body text as in the default of
8085 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not
8086 correct, the body fragment will not be highlighted with the face
8087 @code{mh-folder-body}.
8088 @c -------------------------
8089 @vindex mh-folder-cur-msg-number
8090 @vindex mh-folder-font-lock-keywords
8091 @vindex mh-note-cur
8092 @item mh-scan-cur-msg-number-regexp
8093 This regular expression matches the current message. It must match
8094 from the beginning of the line. Note that the default setting of
8095 @code{mh-folder-font-lock-keywords} expects this expression to contain
8096 at least one parenthesized expression which matches the message number
8097 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This
8098 expression includes the leading space and current message marker
8099 @samp{+} within the parenthesis since it looks better to highlight
8100 these items as well. The highlighting is done with the face
8101 @code{mh-folder-cur-msg-number}. This regular expression should be
8102 correct as it is needed by non-fontification functions. See also
8103 @code{mh-note-cur}.
8104 @c -------------------------
8105 @vindex mh-folder-date
8106 @vindex mh-folder-font-lock-keywords
8107 @vindex mh-scan-sent-to-me-sender-regexp
8108 @item mh-scan-date-regexp
8109 This regular expression matches a valid date. It must @strong{not} be
8110 anchored to the beginning or the end of the line. Note that the
8111 default setting of @code{mh-folder-font-lock-keywords} expects this
8112 expression to contain only one parenthesized expression which matches
8113 the date field as in the default of
8114 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is
8115 not correct, the date will not be highlighted with the face
8116 @code{mh-folder-date}.
8117 @c -------------------------
8118 @vindex mh-folder-deleted
8119 @vindex mh-folder-font-lock-keywords
8120 @vindex mh-note-deleted
8121 @item mh-scan-deleted-msg-regexp
8122 This regular expression matches deleted messages. It must match from
8123 the beginning of the line. Note that the default setting of
8124 @code{mh-folder-font-lock-keywords} expects this expression to contain
8125 at least one parenthesized expression which matches the message number
8126 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression
8127 includes the leading space within the parenthesis since it looks
8128 better to highlight it as well. The highlighting is done with the face
8129 @code{mh-folder-deleted}. This regular expression should be correct as
8130 it is needed by non-fontification functions. See also
8131 @code{mh-note-deleted}.
8132 @c -------------------------
8133 @vindex mh-folder-font-lock-keywords
8134 @vindex mh-folder-msg-number
8135 @item mh-scan-good-msg-regexp
8136 This regular expression matches ``good'' messages. It must match from
8137 the beginning of the line. Note that the default setting of
8138 @code{mh-folder-font-lock-keywords} expects this expression to contain
8139 at least one parenthesized expression which matches the message number
8140 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This
8141 expression includes the leading space within the parenthesis since it
8142 looks better to highlight it as well. The highlighting is done with
8143 the face @code{mh-folder-msg-number}. This regular expression should
8144 be correct as it is needed by non-fontification functions.
8145 @c -------------------------
8146 @vindex mh-scan-format-file
8147 @item mh-scan-msg-format-regexp
8148 This regular expression finds the message number width in a scan
8149 format. Note that the message number must be placed in a parenthesized
8150 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This
8151 variable is only consulted if @code{mh-scan-format-file} is set to
8152 @samp{Use MH-E scan Format}.
8153 @c -------------------------
8154 @vindex mh-scan-format-file
8155 @item mh-scan-msg-format-string
8156 This is a format string for the width of the message number in a scan
8157 format. Use @samp{0%d} for zero-filled message numbers. This variable
8158 is only consulted if @code{mh-scan-format-file} is set to @samp{Use
8159 MH-E scan Format} (default: @code{"%d"}).
8160 @c -------------------------
8161 @item mh-scan-msg-number-regexp
8162 This regular expression extracts the message number. It must match
8163 from the beginning of the line. Note that the message number must be
8164 placed in a parenthesized expression as in the default of @w{@code{"^
8165 *\\([0-9]+\\)"}}.
8166 @c -------------------------
8167 @item mh-scan-msg-overflow-regexp
8168 This regular expression matches overflowed message numbers (default:
8169 @code{"^[?0-9][0-9]"}).
8170 @c -------------------------
8171 @item mh-scan-msg-search-regexp
8172 This regular expression matches a particular message. It is a format
8173 string; use @samp{%d} to represent the location of the message number
8174 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}.
8175 @c -------------------------
8176 @vindex mh-folder-address
8177 @vindex mh-folder-font-lock-keywords
8178 @vindex mh-folder-to
8179 @item mh-scan-rcpt-regexp
8180 This regular expression specifies the recipient in messages you sent.
8181 Note that the default setting of @code{mh-folder-font-lock-keywords}
8182 expects this expression to contain two parenthesized expressions. The
8183 first is expected to match the @samp{To:} that the default scan format
8184 file generates. The second is expected to match the recipient's name
8185 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this
8186 regular expression is not correct, the @samp{To:} string will not be
8187 highlighted with the face @code{mh-folder-to} and the recipient will not be
8188 highlighted with the face @code{mh-folder-address}.
8189 @c -------------------------
8190 @vindex mh-folder-font-lock-keywords
8191 @vindex mh-folder-refiled
8192 @vindex mh-note-refiled
8193 @item mh-scan-refiled-msg-regexp
8194 This regular expression matches refiled messages. It must match from
8195 the beginning of the line. Note that the default setting of
8196 @code{mh-folder-font-lock-keywords} expects this expression to contain
8197 at least one parenthesized expression which matches the message number
8198 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression
8199 includes the leading space within the parenthesis since it looks
8200 better to highlight it as well. The highlighting is done with the face
8201 @code{mh-folder-refiled}. This regular expression should be correct as
8202 it is needed by non-fontification functions. See also
8203 @code{mh-note-refiled}.
8204 @c -------------------------
8205 @vindex mh-folder-font-lock-keywords
8206 @vindex mh-folder-sent-to-me-sender
8207 @vindex mh-mh-folder-sent-to-me-hint
8208 @vindex mh-scan-format-nmh
8209 @item mh-scan-sent-to-me-sender-regexp
8210 This regular expression matches messages sent to us. Note that the
8211 default setting of @code{mh-folder-font-lock-keywords} expects this
8212 expression to contain at least two parenthesized expressions. The
8213 first should match the fontification hint (see
8214 @code{mh-scan-format-nmh}) and the second should match the user name
8215 as in the default of
8216 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}.
8217 If this regular expression is not correct, the notation hints will not
8218 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and
8219 the sender will not be highlighted with the face
8220 @code{mh-folder-sent-to-me-sender}.
8221 @c -------------------------
8222 @vindex mh-folder-followup
8223 @vindex mh-folder-font-lock-keywords
8224 @vindex mh-folder-subject
8225 @item mh-scan-subject-regexp
8226 This regular expression matches the subject. It must match from the
8227 beginning of the line. Note that the default setting of
8228 @samp{mh-folder-font-lock-keywords} expects this expression to contain
8229 at least three parenthesized expressions. The first is expected to
8230 match the @samp{Re:} string, if any, and is highlighted with the face
8231 @code{mh-folder-followup}. The second matches an optional bracketed
8232 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a
8233 sub-expression of the first expression). The third is expected to
8234 match the subject line itself which is highlighted with the face
8235 @code{mh-folder-subject}. For example, the default is
8236 @w{@code{"^ *[0-9]+........[ ]*...................}}@*
8237 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}.
8238 This regular expression should be correct as it is needed by
8239 non-fontification functions. Note that this example is broken up on
8240 two lines for readability, but is actually a single string.
8241 @end vtable
8242
8243 Finally, there are a slew of variables that control how MH-E annotates
8244 the scan lines.
8245
8246 @vtable @code
8247 @findex mh-set-cmd-note
8248 @vindex mh-adaptive-cmd-note-flag
8249 @item mh-cmd-note
8250 Column for notations (default: 4). This variable should be set with
8251 the function @code{mh-set-cmd-note}. This variable may be updated
8252 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following
8253 variables contain the notational characters. Note that columns in
8254 Emacs start with 0.
8255 @c -------------------------
8256 @item mh-note-copied
8257 Messages that have been copied are marked by this character (default:
8258 @code{?C}).
8259 @c -------------------------
8260 @vindex mh-scan-cur-msg-number-regexp
8261 @item mh-note-cur
8262 The current message (in MH, not in MH-E) is marked by this character
8263 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}.
8264 @c -------------------------
8265 @vindex mh-scan-deleted-msg-regexp
8266 @item mh-note-deleted
8267 Messages that have been deleted are marked by this character (default:
8268 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}.
8269 @c -------------------------
8270 @item mh-note-dist
8271 Messages that have been redistributed are marked by this character
8272 (default: @code{?R}).
8273 @c -------------------------
8274 @item mh-note-forw
8275 Messages that have been forwarded are marked by this character
8276 (default: @code{?F}).
8277 @c -------------------------
8278 @item mh-note-printed
8279 Messages that have been printed are marked by this character (default:
8280 @code{?P}).
8281 @c -------------------------
8282 @vindex mh-scan-refiled-msg-regexp
8283 @item mh-note-refiled
8284 Messages that have been refiled are marked by this character (default:
8285 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}.
8286 @c -------------------------
8287 @item mh-note-repl
8288 Messages that have been replied to are marked by this character
8289 (default: @code{?-}).
8290 @c -------------------------
8291 @item mh-note-seq
8292 Messages in a user-defined sequence are marked by this character
8293 (default: @code{?%}). Messages in the @samp{search} sequence are
8294 marked by this character as well.
8295 @end vtable
8296
8297 For example, let's say I have the following in @file{scan.format}
8298 which displays the sender, the subject, and the message number. This
8299 format places a @samp{+} after the message number for the current
8300 message according to MH; it also uses that column for notations.
8301
8302 @smallexample
8303 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %>
8304 @end smallexample
8305
8306 @vindex mh-adaptive-cmd-note-flag
8307 @vindex mh-scan-format-file
8308 @vindex mh-scan-format-file, example
8309
8310 The first thing you have to do is tell MH-E to use this file.
8311 Customize @code{mh-scan-format-file} and set its value to @samp{Use
8312 Default scan Format}. If you didn't get already turn off
8313 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first.
8314
8315 Next, tell MH-E what a valid scan line looks like so that you can at
8316 least display the output of scan in your MH-Folder buffer.
8317
8318 @vindex mh-scan-valid-regexp, example
8319
8320 @smalllisp
8321 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$")
8322 @end smalllisp
8323
8324 Now, in order to get rid of the @samp{Cursor not pointing to message}
8325 message, you need to tell MH-E how to access the message number. You
8326 should also see why MH-E requires that you include a message number in
8327 the first place.
8328
8329 @vindex mh-scan-msg-number-regexp, example
8330 @vindex mh-scan-msg-search-regexp, example
8331
8332 @smalllisp
8333 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8334 (setq mh-scan-msg-search-regexp " %d[+D^ ]$")
8335 @end smalllisp
8336
8337 In order to get the next and previous commands working, add this.
8338
8339 @vindex mh-scan-good-msg-regexp, example
8340
8341 @smalllisp
8342 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8343 @end smalllisp
8344
8345 Note that the current message isn't marked with a @samp{+} when moving
8346 between the next and previous messages. Here is the code required to
8347 get this working.
8348
8349 @vindex set-mh-cmd-note, example
8350 @vindex mh-scan-cur-msg-number-regexp, example
8351
8352 @smalllisp
8353 (set-mh-cmd-note 76)
8354 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$")
8355 @end smalllisp
8356
8357 Finally, add the following to delete and refile messages.
8358
8359 @vindex mh-scan-deleted-msg-regexp, example
8360 @vindex mh-scan-refiled-msg-regexp, example
8361
8362 @smalllisp
8363 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$")
8364 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$")
8365 @end smalllisp
8366
8367 This is just a bare minimum; it's best to adjust all of the regular
8368 expressions to ensure that MH-E and highlighting perform well.
8369
8370 @node Procmail, Odds and Ends, Scan Line Formats, Top
8371 @appendix Reading Mailing Lists Effectively
8372
8373 @cindex @command{procmail}
8374 @cindex @command{slocal}
8375 @cindex Gnus
8376 @cindex MH commands, @command{slocal}
8377 @cindex Unix commands, @command{procmail}
8378 @cindex mailing lists, reading
8379
8380 This appendix explains how to use @uref{http://www.procmail.org/,
8381 procmail} to file mail from mailing lists into folders which can then
8382 be read easily with MH-E@footnote{The MH equivalent, @command{slocal},
8383 can be used as well, but procmail is more flexible and more packages
8384 exist for procmail than for slocal.}. Some mailing lists have such
8385 high traffic that Gnus must be used and I discuss how to use Gnus
8386 side-by-side with MH-E.
8387
8388 @cindex @file{.procmailrc}
8389 @cindex files, @file{.procmailrc}
8390
8391 First, I'll describe how to put mail from your mailing lists directly
8392 into an MH folder using @command{procmail}. First, add the following
8393 to @file{~/.procmailrc}. While the logging variables aren't strictly
8394 necessary, they are extremely useful.
8395
8396 @smallexample
8397 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam.
8398 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin
8399 [3]
8400 [4] # Point LOGFILE at the actual log file.
8401 [5] LOGFILE=$HOME/.procmail.log
8402 [6]
8403 [7] # This setting provides just the right amount of information.
8404 [8] LOGABSTRACT=all
8405 [9]
8406 [10] # Uncomment the following line to see how your patterns match.
8407 [11] #VERBOSE=yes
8408 [12]
8409 [13] # Place mail sent to any MH-E mailing list in +mh-e.
8410 [14] :0 w: mh-e$LOCKEXT
8411 [15] * ^TO.*mh-e-.*@.*sourceforge.net
8412 [16] | myrcvstore -create +mh-e
8413 @end smallexample
8414
8415 @cindex @command{rcvstore}
8416 @cindex MH commands, @command{rcvstore}
8417
8418 Line 14 creates a lock file in your mail directory based upon the name
8419 of the folder. This is done because @command{rcvstore} does not
8420 perform locking. While this lock file will prevent @command{procmail}
8421 from writing to a folder concurrently, there is a slight chance that
8422 you might lose a message if you're performing operations on a folder
8423 at the same time @command{rcvstore} is placing a message there. You
8424 have been warned. Now that that disclaimer is out of the way, note
8425 that I've been using this set-up for over a decade and haven't lost
8426 anything to my knowledge@footnote{See
8427 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166,
8428 Savannah issue #4361} to see if @command{rcvstore} locking is still an
8429 issue.}.
8430
8431 @cindex @samp{Unseen-Sequence:} MH profile component
8432 @cindex MH profile component, @samp{Unseen-Sequence:}
8433
8434 Line 16 uses the following script, @code{myrcvstore}, to massage the
8435 message as described in the comment and file the message in the given
8436 folder@footnote{The @samp{-create} argument wasn't always the default
8437 to @command{rcvstore}.}.
8438
8439 @smallexample
8440 #! /bin/sh
8441
8442 # Accepts a message on standard input and passes it through rcvstore
8443 # after first passing it through any filters. All arguments are passed
8444 # on to rcvstore.
8445
8446 # Force the "From user date" to become part of header. One reason this
8447 # is done is because the presence of the From field confuses dist so
8448 # that dist adds a new header, rather than using the existing header.
8449 # Note that this should not be done for any message that goes into a
8450 # Gnus incoming file (Gnus will thrown an error) nor should it be
8451 # applied to any message that goes to the system mailbox because the
8452 # entire mailbox will be incorporated as a single message.
8453 formail -c -z -R 'From ' X-Envelope-From: |
8454 rcvstore $@@
8455 @end smallexample
8456
8457 If your version of @command{rcvstore} doesn't add messages to the
8458 @samp{unseen} sequence by default, add the following line to your MH
8459 profile:
8460
8461 @smallexample
8462 Unseen-Sequence: unseen
8463 @end smallexample
8464
8465 Now view your new messages with the speedbar (@pxref{Speedbar}) or with
8466 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}.
8467
8468 If you're on a mailing list that is so voluminous that it is
8469 impossible to read every message, it usually better to read the
8470 mailing list like a newsgroup in a news reader. Emacs has a built-in
8471 newsreader called Gnus. The remainder of this appendix talks about how
8472 to use Gnus with an MH message store. The version of Gnus that was
8473 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should
8474 work but versions prior to 5.8 use different options.
8475
8476 This table contains a list of Gnus options that you will have to
8477 modify. Note that for them to become accessible, you'll have to load
8478 @file{nnml.el} first. This can be done with @kbd{M-x load-library
8479 @key{RET} nnml @key{RET}}.
8480
8481 @vtable @code
8482 @item gnus-secondary-select-methods
8483 Select the @samp{nnml} value. This select method uses directories for
8484 folders and individual files for messages, just like MH. You do not
8485 have to set an address.
8486 @c -------------------------
8487 @item mail-sources
8488 Select the @samp{Several files in a directory} value, check the
8489 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find
8490 your mail.
8491 @c -------------------------
8492 @vindex mail-user-agent
8493 @item message-mail-user-agent
8494 In order to send mail within Gnus using MH-E, set this option to
8495 @samp{mail-user-agent} and set the @code{mail-user-agent} option to
8496 @samp{Emacs interface to MH}.
8497 @c -------------------------
8498 @item nnmail-keep-last-article
8499 Since Gnus keeps track of which messages you have read, it would be
8500 bad if Gnus expired the last message, for example, message 100, and
8501 @command{rcvstore} gave the next new message number 1. Gnus would then
8502 ignore it since it thinks that you've read messages 1-100. Turning on
8503 this option ensures that the last message is never removed thereby
8504 eliminating this problem.
8505 @end vtable
8506
8507 Next add the following to @file{~/.procmailrc}. If you don't subscribe
8508 to the GnuCash mailing list, substitute one to which you are
8509 subscribed.
8510
8511 @smallexample
8512 MAILDIR=$HOME/`mhparam Path`
8513 # Place mail sent to the GnuCash mailing list in gnucash.spool, where
8514 # Gnus will pick it up.
8515 :0:
8516 * ^TO.*gnucash.*@.*gnucash.org
8517 gnucash.spool
8518 @end smallexample
8519
8520 Wait for some messages to appear in @file{gnucash.spool} and run Gnus
8521 with @kbd{M-x gnus @key{RET}}. To view the folder created in the
8522 example above, you would tell Gnus about it the first time only with
8523 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is
8524 known as @samp{+gnucash}.
8525
8526 @node Odds and Ends, History, Procmail, Top
8527 @appendix Odds and Ends
8528
8529 This appendix covers a few topics that don't fit elsewhere. Here I
8530 tell you how to report bugs and how to get on the MH-E mailing lists.
8531 I also point out some additional sources of information.
8532
8533 @menu
8534 * Bug Reports::
8535 * Mailing Lists::
8536 * MH FAQ and Support::
8537 * Getting MH-E::
8538 @end menu
8539
8540 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends
8541 @appendixsec Bug Reports
8542
8543 @cindex bugs
8544 @cindex SourceForge
8545 @kindex M-x mh-version
8546
8547 Bug reports should be filed at
8548 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=113357,
8549 SourceForge}. You need to be a SourceForge user to submit bug reports,
8550 but this is easy enough to do that it shouldn't be a restriction for
8551 you. Please include the output of @kbd{M-x mh-version}
8552 (@pxref{Miscellaneous}) in any bug report you send unless you're 110%
8553 positive we won't ask for it.
8554
8555 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends
8556 @appendixsec MH-E Mailing Lists
8557
8558 @cindex SourceForge
8559 @cindex mailing lists
8560
8561 There are several mailing lists for MH-E. They are @i{mh-e-users at
8562 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net},
8563 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view
8564 the archives at @uref{https://sourceforge.net/mail/?group_id=13357,
8565 SourceForge}. Do not report bugs on these lists; please submit them
8566 via SourceForge (@pxref{Bug Reports}).
8567
8568 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends
8569 @appendixsec MH FAQ and Support
8570
8571 @cindex FAQ
8572 @cindex MH FAQ
8573
8574 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently
8575 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup
8576 @samp{comp.mail.mh}. While very little is there that deals with MH-E
8577 specifically, there is an incredible wealth of material about MH
8578 itself which you will find useful.
8579
8580 @cindex support
8581
8582 You can find FAQs on MH-E at the
8583 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=213357,
8584 Support Requests} page on SourceForge. If you don't find the answer to
8585 your question, file a support request and your question will become a
8586 new FAQ!
8587
8588 @node Getting MH-E, , MH FAQ and Support, Odds and Ends
8589 @appendixsec Getting MH-E
8590
8591 @cindex MH-E, obtaining
8592 @cindex getting MH-E
8593 @cindex obtaining MH-E
8594
8595 Because MH-E is undergoing a phase of sustained growth, the version of
8596 MH-E in your Emacs is likely to be out of date although it is most
8597 likely to be more up to date than the copy that comes with the MH
8598 distribution in @file{miscellany/mh-e}.
8599
8600 @cindex change log
8601 @cindex release notes
8602
8603 New MH-E releases are always available for downloading at
8604 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8605 SourceForge} before they appear in an Emacs release. You can read the
8606 release notes on that page to determine if the given release of MH-E
8607 is already installed in your version of Emacs. You can also read the
8608 change log to see if you are interested in what the given release of
8609 MH-E has to offer (although we have no doubt that you will be
8610 extremely interested in all new releases).
8611
8612 @cindex files, @samp{MH-E-NEWS}
8613 @cindex files, @samp{README}
8614 @cindex news
8615 @cindex @samp{MH-E-NEWS}
8616 @cindex @samp{README}
8617 @kindex M-x mh-version
8618
8619 After you download and extract the MH-E tarball, read the
8620 @file{README} file and @file{MH-E-NEWS}. These correspond to the
8621 release notes and change log mentioned above. The file @file{README}
8622 contains instructions on installing MH-E. If you're already running
8623 Emacs, please quit that session and start again to load in the new
8624 MH-E. Check that you're running the new version with the command
8625 @kbd{M-x mh-version}.
8626
8627 @cindex contributed software
8628 @cindex manual
8629 @cindex documentation
8630
8631 In addition to the mh-e package, the
8632 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8633 SourceForge} site also contains doc and contrib packages. The former
8634 is the latest release of this manual, and the latter contains a few
8635 contributed packages you might find useful.
8636
8637 @node History, GFDL, Odds and Ends, Top
8638 @appendix History of MH-E
8639
8640 @cindex Bill Wohler
8641 @cindex Brian Reid
8642 @cindex Gildea, Stephen
8643 @cindex Jim Larus
8644 @cindex Larus, Jim
8645 @cindex MH-E, versions
8646 @cindex Reid, Brian
8647 @cindex SourceForge
8648 @cindex Stephen Gildea
8649 @cindex Wohler, Bill
8650 @cindex history of MH-E
8651 @cindex versions of MH-E
8652
8653 MH-E was originally written by Brian Reid in 1983 and has changed
8654 hands several times since then. Jim Larus wanted to do something
8655 similar for GNU Emacs, and ended up completely rewriting it that same
8656 year. In 1989, Stephen Gildea picked it up and added many
8657 improvements. Bill Wohler then took over in 2000 and moved its
8658 development to @uref{http://sourceforge.net/, SourceForge} where it
8659 lives today.
8660
8661 @menu
8662 * From Brian Reid::
8663 * From Jim Larus::
8664 * From Stephen Gildea::
8665 * From Bill Wohler::
8666 @end menu
8667
8668 @node From Brian Reid, From Jim Larus, History, History
8669 @appendixsec From Brian Reid
8670
8671 @cindex Brian Reid
8672 @cindex Reid, Brian
8673
8674 One day in 1983 I got the flu and had to stay home from work for three
8675 days with nothing to do. I used that time to write MHE@. The
8676 fundamental idea behind MHE was that it was a ``puppeteer'' driving
8677 the MH programs underneath it. MH had a model that the editor was
8678 supposed to run as a sub-process of the mailer, which seemed to me at
8679 the time to be the tail wagging the dog. So I turned it around and
8680 made the editor drive the MH programs. I made sure that the UCI people
8681 (who were maintaining MH at the time) took in my changes and made them
8682 stick.
8683
8684 Today, I still use my own version of MHE because I don't at all like
8685 the way that GNU MH-E works and I've never gotten to be good enough at
8686 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs
8687 version of MHE and the GNU Emacs version of MH-E have almost nothing
8688 in common except similar names. They work differently, have different
8689 conceptual models, and have different key bindings@footnote{After
8690 reading this article, I questioned Brian about his version of MHE, and
8691 received some great ideas for improving MH-E such as a dired-like
8692 method of selecting folders; and removing the prompting when sending
8693 mail, filling in the blanks in the draft buffer instead. I passed them
8694 on to Stephen Gildea, the current maintainer, and he was excited about
8695 the ideas as well. Perhaps one day, MH-E will again resemble MHE
8696 (draft form editing was introduced in version 7.4).}.
8697
8698 Brian Reid, June 1994
8699
8700 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History
8701 @appendixsec From Jim Larus
8702
8703 @cindex Jim Larus
8704 @cindex Larus, Jim
8705
8706 Brian Reid, while at CMU or shortly after going to Stanford wrote a
8707 mail reading program called MHE for Gosling Emacs. It had much the
8708 same structure as MH-E (i.e., invoked MH programs), though it was
8709 simpler and the commands were slightly different. Unfortunately, I no
8710 longer have a copy so the differences are lost in the mists of time.
8711
8712 In '82-83, I was working at BBN and wrote a lot of mlisp code in
8713 Gosling Emacs to make it look more like Tennex Emacs. One of the
8714 packages that I picked up and improved was Reid's mail system. In '83,
8715 I went back to Berkeley. About that time, Stallman's first version of
8716 GNU Emacs came out and people started to move to it from Gosling Emacs
8717 (as I recall, the transition took a year or two). I decided to port
8718 Reid's MHE and used the mlisp to Emacs Lisp translator that came with
8719 GNU Emacs. It did a lousy job and the resulting code didn't work, so I
8720 bit the bullet and rewrote the code by hand (it was a lot smaller and
8721 simpler then, so it took only a day or two).
8722
8723 Soon after that, MH-E became part of the standard Emacs distribution
8724 and suggestions kept dribbling in for improvements. MH-E soon reached
8725 sufficient functionality to keep me happy, but I kept on improving it
8726 because I was a graduate student with plenty of time on my hands and
8727 it was more fun than my dissertation. In retrospect, the one thing
8728 that I regret is not writing any documentation, which seriously
8729 limited the use and appeal of the package.
8730
8731 @cindex @command{xmh}, in MH-E history
8732
8733 In '89, I came to Wisconsin as a professor and decided not to work on
8734 MH-E. It was stable, except for minor bugs, and had enough
8735 functionality, so I let it be for a few years. Stephen Gildea of BBN
8736 began to pester me about the bugs, but I ignored them. In 1990, he
8737 went off to the X Consortium, said good bye, and said that he would
8738 now be using @command{xmh}. A few months later, he came back and said
8739 that he couldn't stand @command{xmh} and could I put a few more bug fixes
8740 into MH-E. At that point, I had no interest in fixing MH-E, so I gave
8741 the responsibility of maintenance to him and he has done a fine job
8742 since then.
8743
8744 Jim Larus, June 1994
8745
8746 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History
8747 @appendixsec From Stephen Gildea
8748
8749 @cindex Gildea, Stephen
8750 @cindex Stephen Gildea
8751
8752 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before
8753 me. In my previous job, I had been using RMAIL, but as my folders tend
8754 to run large, I was frustrated with the speed of RMAIL@. However, I
8755 stuck with it because I wanted the GNU Emacs interface. I am very
8756 familiar and comfortable with the Emacs interface (with just a few
8757 modifications of my own) and dislike having to use applications with
8758 embedded editors; they never live up to Emacs.
8759
8760 MH is the mail reader of choice at BBN, so I converted to it. Since I
8761 didn't want to give up using an Emacs interface, I started using MH-E.
8762 As is my wont, I started hacking on it almost immediately. I first
8763 used version 3.4m. One of the first features I added was to treat the
8764 folder buffer as a file-visiting buffer: you could lock it, save it,
8765 and be warned of unsaved changes when killing it. I also worked to
8766 bring its functionality a little closer to RMAIL@. Jim Larus was very
8767 cooperative about merging in my changes, and my efforts first appeared
8768 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided
8769 MH-E was too slow and optimized it a lot. Version, 3.7, distributed
8770 with Emacs 18.56 in 1990, was noticeably faster.
8771
8772 When I moved to the X Consortium I became the first person there to
8773 not use xmh. (There is now one other engineer there using MH-E.) About
8774 this point I took over maintenance of MH-E from Jim and was finally
8775 able to add some features Jim hadn't accepted, such as the backward
8776 searching undo. My first release was 3.8 (Emacs 18.58) in 1992.
8777
8778 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0.
8779 Version 4.0 added many new features, including background folder
8780 collection and support for composing @sc{mime} messages. (Reading
8781 @sc{mime} messages remains to be done, alas.) While writing this book,
8782 Bill Wohler gave MH-E its closest examination ever, uncovering bugs
8783 and inconsistencies that required a new major version to fix, and so
8784 version 5 was released.
8785
8786 Stephen Gildea, June 1994
8787
8788 @node From Bill Wohler, , From Stephen Gildea, History
8789 @appendixsec From Bill Wohler
8790
8791 @cindex Wohler, Bill
8792 @cindex Bill Wohler
8793
8794 The preface originally included the following text which I use to
8795 begin my story:
8796
8797 @quotation
8798 But it's important to note a brief history of MH-E.
8799
8800 @w{Version 3} was prevalent through the @w{Emacs 18} and early
8801 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}),
8802 which introduced several new and changed commands. Next, @w{Version
8803 5.0} was released, which fixed some bugs and incompatibilities, and
8804 was incorporated into @w{Emacs 19.29}.
8805 @end quotation
8806
8807 After a long break, Stephen handed the reins over to me in 2000. I
8808 moved the project to a new site called SourceForge and organized a
8809 great team of developers. Our first release in late 2001 was version
8810 6. It appeared around the time of Emacs 21.2 and had menus and tool
8811 bar buttons.
8812
8813 Then, indexed searches, improved MIME handling, a speedbar, multiple
8814 identities, alias completion, an index view of unseen messages, spam
8815 software support, Face and X-Image-URL header field support, Fcc
8816 completion, arbitrary range handling, and draft form editing were
8817 introduced in the version 7 series around the time of Emacs 21.4
8818 (2004). Still, Emacs itself contained version 5 of MH-E released back
8819 in 1994.
8820
8821 Version 8 development was mostly driven by the rewrite of the manual.
8822 It also brought mailutils support, S/MIME support, picon support, and
8823 an improved interface for hiding header fields. The CVS repository was
8824 migrated from SourceForge to Savannah (only for those files that were
8825 already part of Emacs) and the software was completely reorganized to
8826 push back two decades of entropy. Version 8 will appear in Emacs 22.1,
8827 expected to be released in 2006.
8828
8829 Bill Wohler, February 2006
8830
8831 @node GFDL, GPL, History, Top
8832 @appendix GNU FREE DOCUMENTATION LICENSE
8833 @center Version 1.2, November 2002
8834
8835 @display
8836 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
8837 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
8838
8839 Everyone is permitted to copy and distribute verbatim copies
8840 of this license document, but changing it is not allowed.
8841 @end display
8842 @sp 1
8843 @enumerate 0
8844 @item
8845 PREAMBLE
8846
8847 The purpose of this License is to make a manual, textbook, or other
8848 functional and useful document ``free'' in the sense of freedom: to
8849 assure everyone the effective freedom to copy and redistribute it,
8850 with or without modifying it, either commercially or noncommercially.
8851 Secondarily, this License preserves for the author and publisher a way
8852 to get credit for their work, while not being considered responsible
8853 for modifications made by others.
8854
8855 This License is a kind of ``copyleft'', which means that derivative
8856 works of the document must themselves be free in the same sense. It
8857 complements the GNU General Public License, which is a copyleft
8858 license designed for free software.
8859
8860 We have designed this License in order to use it for manuals for free
8861 software, because free software needs free documentation: a free
8862 program should come with manuals providing the same freedoms that the
8863 software does. But this License is not limited to software manuals;
8864 it can be used for any textual work, regardless of subject matter or
8865 whether it is published as a printed book. We recommend this License
8866 principally for works whose purpose is instruction or reference.
8867
8868 @sp 1
8869 @item
8870 APPLICABILITY AND DEFINITIONS
8871
8872 This License applies to any manual or other work, in any medium, that
8873 contains a notice placed by the copyright holder saying it can be
8874 distributed under the terms of this License. Such a notice grants a
8875 world-wide, royalty-free license, unlimited in duration, to use that
8876 work under the conditions stated herein. The ``Document'', below,
8877 refers to any such manual or work. Any member of the public is a
8878 licensee, and is addressed as ``you''. You accept the license if you
8879 copy, modify or distribute the work in a way requiring permission
8880 under copyright law.
8881
8882 A ``Modified Version'' of the Document means any work containing the
8883 Document or a portion of it, either copied verbatim, or with
8884 modifications and/or translated into another language.
8885
8886 A ``Secondary Section'' is a named appendix or a front-matter section of
8887 the Document that deals exclusively with the relationship of the
8888 publishers or authors of the Document to the Document's overall subject
8889 (or to related matters) and contains nothing that could fall directly
8890 within that overall subject. (Thus, if the Document is in part a
8891 textbook of mathematics, a Secondary Section may not explain any
8892 mathematics.) The relationship could be a matter of historical
8893 connection with the subject or with related matters, or of legal,
8894 commercial, philosophical, ethical or political position regarding
8895 them.
8896
8897 The ``Invariant Sections'' are certain Secondary Sections whose titles
8898 are designated, as being those of Invariant Sections, in the notice
8899 that says that the Document is released under this License. If a
8900 section does not fit the above definition of Secondary then it is not
8901 allowed to be designated as Invariant. The Document may contain zero
8902 Invariant Sections. If the Document does not identify any Invariant
8903 Sections then there are none.
8904
8905 The ``Cover Texts'' are certain short passages of text that are listed,
8906 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
8907 the Document is released under this License. A Front-Cover Text may
8908 be at most 5 words, and a Back-Cover Text may be at most 25 words.
8909
8910 A ``Transparent'' copy of the Document means a machine-readable copy,
8911 represented in a format whose specification is available to the
8912 general public, that is suitable for revising the document
8913 straightforwardly with generic text editors or (for images composed of
8914 pixels) generic paint programs or (for drawings) some widely available
8915 drawing editor, and that is suitable for input to text formatters or
8916 for automatic translation to a variety of formats suitable for input
8917 to text formatters. A copy made in an otherwise Transparent file
8918 format whose markup, or absence of markup, has been arranged to thwart
8919 or discourage subsequent modification by readers is not Transparent.
8920 An image format is not Transparent if used for any substantial amount
8921 of text. A copy that is not ``Transparent'' is called ``Opaque.''
8922
8923
8924 Examples of suitable formats for Transparent copies include plain
8925 ASCII without markup, Texinfo input format, LaTeX input format, SGML
8926 or XML using a publicly available DTD, and standard-conforming simple
8927 HTML, PostScript or PDF designed for human modification. Examples of
8928 transparent image formats include PNG, XCF and JPG. Opaque formats
8929 include proprietary formats that can be read and edited only by
8930 proprietary word processors, SGML or XML for which the DTD and/or
8931 processing tools are not generally available, and the
8932 machine-generated HTML, PostScript or PDF produced by some word
8933 processors for output purposes only.
8934
8935 The ``Title Page'' means, for a printed book, the title page itself,
8936 plus such following pages as are needed to hold, legibly, the material
8937 this License requires to appear in the title page. For works in
8938 formats which do not have any title page as such, ``Title Page'' means
8939 the text near the most prominent appearance of the work's title,
8940 preceding the beginning of the body of the text.
8941
8942 A section ``Entitled XYZ'' means a named subunit of the Document whose
8943 title either is precisely XYZ or contains XYZ in parentheses following
8944 text that translates XYZ in another language. (Here XYZ stands for a
8945 specific section name mentioned below, such as ``Acknowledgements'',
8946 ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
8947 of such a section when you modify the Document means that it remains a
8948 section ``Entitled XYZ'' according to this definition.
8949
8950 The Document may include Warranty Disclaimers next to the notice which
8951 states that this License applies to the Document. These Warranty
8952 Disclaimers are considered to be included by reference in this
8953 License, but only as regards disclaiming warranties: any other
8954 implication that these Warranty Disclaimers may have is void and has
8955 no effect on the meaning of this License.
8956 @sp 1
8957 @item
8958 VERBATIM COPYING
8959
8960 You may copy and distribute the Document in any medium, either
8961 commercially or noncommercially, provided that this License, the
8962 copyright notices, and the license notice saying this License applies
8963 to the Document are reproduced in all copies, and that you add no other
8964 conditions whatsoever to those of this License. You may not use
8965 technical measures to obstruct or control the reading or further
8966 copying of the copies you make or distribute. However, you may accept
8967 compensation in exchange for copies. If you distribute a large enough
8968 number of copies you must also follow the conditions in section 3.
8969
8970 You may also lend copies, under the same conditions stated above, and
8971 you may publicly display copies.
8972 @sp 1
8973 @item
8974 COPYING IN QUANTITY
8975
8976 If you publish printed copies (or copies in media that commonly have
8977 printed covers) of the Document, numbering more than 100, and the
8978 Document's license notice requires Cover Texts, you must enclose the
8979 copies in covers that carry, clearly and legibly, all these Cover
8980 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
8981 the back cover. Both covers must also clearly and legibly identify
8982 you as the publisher of these copies. The front cover must present
8983 the full title with all words of the title equally prominent and
8984 visible. You may add other material on the covers in addition.
8985 Copying with changes limited to the covers, as long as they preserve
8986 the title of the Document and satisfy these conditions, can be treated
8987 as verbatim copying in other respects.
8988
8989 If the required texts for either cover are too voluminous to fit
8990 legibly, you should put the first ones listed (as many as fit
8991 reasonably) on the actual cover, and continue the rest onto adjacent
8992 pages.
8993
8994 If you publish or distribute Opaque copies of the Document numbering
8995 more than 100, you must either include a machine-readable Transparent
8996 copy along with each Opaque copy, or state in or with each Opaque copy
8997 a computer-network location from which the general network-using
8998 public has access to download using public-standard network protocols
8999 a complete Transparent copy of the Document, free of added material.
9000 If you use the latter option, you must take reasonably prudent steps,
9001 when you begin distribution of Opaque copies in quantity, to ensure
9002 that this Transparent copy will remain thus accessible at the stated
9003 location until at least one year after the last time you distribute an
9004 Opaque copy (directly or through your agents or retailers) of that
9005 edition to the public.
9006
9007 It is requested, but not required, that you contact the authors of the
9008 Document well before redistributing any large number of copies, to give
9009 them a chance to provide you with an updated version of the Document.
9010 @sp 1
9011 @item
9012 MODIFICATIONS
9013
9014 You may copy and distribute a Modified Version of the Document under
9015 the conditions of sections 2 and 3 above, provided that you release
9016 the Modified Version under precisely this License, with the Modified
9017 Version filling the role of the Document, thus licensing distribution
9018 and modification of the Modified Version to whoever possesses a copy
9019 of it. In addition, you must do these things in the Modified Version:
9020
9021 A. Use in the Title Page (and on the covers, if any) a title distinct
9022 from that of the Document, and from those of previous versions
9023 (which should, if there were any, be listed in the History section
9024 of the Document). You may use the same title as a previous version
9025 if the original publisher of that version gives permission.@*
9026 B. List on the Title Page, as authors, one or more persons or entities
9027 responsible for authorship of the modifications in the Modified
9028 Version, together with at least five of the principal authors of the
9029 Document (all of its principal authors, if it has fewer than five),
9030 unless they release you from this requirement.@*
9031 C. State on the Title page the name of the publisher of the
9032 Modified Version, as the publisher.@*
9033 D. Preserve all the copyright notices of the Document.@*
9034 E. Add an appropriate copyright notice for your modifications
9035 adjacent to the other copyright notices.@*
9036 F. Include, immediately after the copyright notices, a license notice
9037 giving the public permission to use the Modified Version under the
9038 terms of this License, in the form shown in the Addendum below.@*
9039 G. Preserve in that license notice the full lists of Invariant Sections
9040 and required Cover Texts given in the Document's license notice.@*
9041 H. Include an unaltered copy of this License.@*
9042 I. Preserve the section Entitled ``History'', Preserve its Title, and add
9043 to it an item stating at least the title, year, new authors, and
9044 publisher of the Modified Version as given on the Title Page. If
9045 there is no section Entitled ``History'' in the Document, create one
9046 stating the title, year, authors, and publisher of the Document as
9047 given on its Title Page, then add an item describing the Modified
9048 Version as stated in the previous sentence.@*
9049 J. Preserve the network location, if any, given in the Document for
9050 public access to a Transparent copy of the Document, and likewise
9051 the network locations given in the Document for previous versions
9052 it was based on. These may be placed in the ``History'' section.
9053 You may omit a network location for a work that was published at
9054 least four years before the Document itself, or if the original
9055 publisher of the version it refers to gives permission.@*
9056 K. For any section Entitled ``Acknowledgements'' or ``Dedications'',
9057 Preserve the Title of the section, and preserve in the section all
9058 the substance and tone of each of the contributor acknowledgements
9059 and/or dedications given therein.@*
9060 L. Preserve all the Invariant Sections of the Document,
9061 unaltered in their text and in their titles. Section numbers
9062 or the equivalent are not considered part of the section titles.@*
9063 M. Delete any section Entitled ``Endorsements.'' Such a section
9064 may not be included in the Modified Version.@*
9065 N. Do not retitle any existing section to be Entitled ``Endorsements''
9066 or to conflict in title with any Invariant Section.@*
9067 O. Preserve any Warranty Disclaimers.@*
9068 @sp 1
9069 If the Modified Version includes new front-matter sections or
9070 appendices that qualify as Secondary Sections and contain no material
9071 copied from the Document, you may at your option designate some or all
9072 of these sections as invariant. To do this, add their titles to the
9073 list of Invariant Sections in the Modified Version's license notice.
9074 These titles must be distinct from any other section titles.
9075
9076 You may add a section Entitled ``Endorsements'', provided it contains
9077 nothing but endorsements of your Modified Version by various
9078 parties--for example, statements of peer review or that the text has
9079 been approved by an organization as the authoritative definition of a
9080 standard.
9081
9082 You may add a passage of up to five words as a Front-Cover Text, and a
9083 passage of up to 25 words as a Back-Cover Text, to the end of the list
9084 of Cover Texts in the Modified Version. Only one passage of
9085 Front-Cover Text and one of Back-Cover Text may be added by (or
9086 through arrangements made by) any one entity. If the Document already
9087 includes a cover text for the same cover, previously added by you or
9088 by arrangement made by the same entity you are acting on behalf of,
9089 you may not add another; but you may replace the old one, on explicit
9090 permission from the previous publisher that added the old one.
9091
9092 The author(s) and publisher(s) of the Document do not by this License
9093 give permission to use their names for publicity for or to assert or
9094 imply endorsement of any Modified Version.
9095 @sp 1
9096 @item
9097 COMBINING DOCUMENTS
9098
9099 You may combine the Document with other documents released under this
9100 License, under the terms defined in section 4 above for modified
9101 versions, provided that you include in the combination all of the
9102 Invariant Sections of all of the original documents, unmodified, and
9103 list them all as Invariant Sections of your combined work in its
9104 license notice, and that you preserve all their Warranty Disclaimers.
9105
9106 The combined work need only contain one copy of this License, and
9107 multiple identical Invariant Sections may be replaced with a single
9108 copy. If there are multiple Invariant Sections with the same name but
9109 different contents, make the title of each such section unique by
9110 adding at the end of it, in parentheses, the name of the original
9111 author or publisher of that section if known, or else a unique number.
9112 Make the same adjustment to the section titles in the list of
9113 Invariant Sections in the license notice of the combined work.
9114
9115 In the combination, you must combine any sections Entitled ``History''
9116 in the various original documents, forming one section Entitled
9117 ``History''; likewise combine any sections Entitled ``Acknowledgements'',
9118 and any sections Entitled ``Dedications.'' You must delete all sections
9119 Entitled ``Endorsements.''
9120 @sp 1
9121 @item
9122 COLLECTIONS OF DOCUMENTS
9123
9124 You may make a collection consisting of the Document and other documents
9125 released under this License, and replace the individual copies of this
9126 License in the various documents with a single copy that is included in
9127 the collection, provided that you follow the rules of this License for
9128 verbatim copying of each of the documents in all other respects.
9129
9130 You may extract a single document from such a collection, and distribute
9131 it individually under this License, provided you insert a copy of this
9132 License into the extracted document, and follow this License in all
9133 other respects regarding verbatim copying of that document.
9134 @sp 1
9135 @item
9136 AGGREGATION WITH INDEPENDENT WORKS
9137
9138 A compilation of the Document or its derivatives with other separate
9139 and independent documents or works, in or on a volume of a storage or
9140 distribution medium, is called an ``aggregate'' if the copyright
9141 resulting from the compilation is not used to limit the legal rights
9142 of the compilation's users beyond what the individual works permit.
9143 When the Document is included in an aggregate, this License does not
9144 apply to the other works in the aggregate which are not themselves
9145 derivative works of the Document.
9146
9147 If the Cover Text requirement of section 3 is applicable to these
9148 copies of the Document, then if the Document is less than one half of
9149 the entire aggregate, the Document's Cover Texts may be placed on
9150 covers that bracket the Document within the aggregate, or the
9151 electronic equivalent of covers if the Document is in electronic form.
9152 Otherwise they must appear on printed covers that bracket the whole
9153 aggregate.
9154 @sp 1
9155 @item
9156 TRANSLATION
9157
9158 Translation is considered a kind of modification, so you may
9159 distribute translations of the Document under the terms of section 4.
9160 Replacing Invariant Sections with translations requires special
9161 permission from their copyright holders, but you may include
9162 translations of some or all Invariant Sections in addition to the
9163 original versions of these Invariant Sections. You may include a
9164 translation of this License, and all the license notices in the
9165 Document, and any Warranty Disclaimers, provided that you also include
9166 the original English version of this License and the original versions
9167 of those notices and disclaimers. In case of a disagreement between
9168 the translation and the original version of this License or a notice
9169 or disclaimer, the original version will prevail.
9170
9171 If a section in the Document is Entitled ``Acknowledgements'',
9172 ``Dedications'', or ``History'', the requirement (section 4) to Preserve
9173 its Title (section 1) will typically require changing the actual
9174 title.
9175 @sp 1
9176 @item
9177 TERMINATION
9178
9179 You may not copy, modify, sublicense, or distribute the Document except
9180 as expressly provided for under this License. Any other attempt to
9181 copy, modify, sublicense or distribute the Document is void, and will
9182 automatically terminate your rights under this License. However,
9183 parties who have received copies, or rights, from you under this
9184 License will not have their licenses terminated so long as such
9185 parties remain in full compliance.
9186 @sp 1
9187 @item
9188 FUTURE REVISIONS OF THIS LICENSE
9189
9190 The Free Software Foundation may publish new, revised versions
9191 of the GNU Free Documentation License from time to time. Such new
9192 versions will be similar in spirit to the present version, but may
9193 differ in detail to address new problems or concerns. See
9194 http://www.gnu.org/copyleft/.
9195
9196 Each version of the License is given a distinguishing version number.
9197 If the Document specifies that a particular numbered version of this
9198 License ``or any later version'' applies to it, you have the option of
9199 following the terms and conditions either of that specified version or
9200 of any later version that has been published (not as a draft) by the
9201 Free Software Foundation. If the Document does not specify a version
9202 number of this License, you may choose any version ever published (not
9203 as a draft) by the Free Software Foundation.
9204
9205 @end enumerate
9206
9207 @unnumberedsec ADDENDUM: How to use this License for your documents
9208
9209 To use this License in a document you have written, include a copy of
9210 the License in the document and put the following copyright and
9211 license notices just after the title page:
9212
9213 @smallexample
9214 @group
9215 Copyright (C) @var{year} @var{your name}.
9216 Permission is granted to copy, distribute and/or modify this document
9217 under the terms of the GNU Free Documentation License, Version 1.2
9218 or any later version published by the Free Software Foundation;
9219 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
9220 A copy of the license is included in the section entitled ``GNU
9221 Free Documentation License''.
9222 @end group
9223 @end smallexample
9224
9225 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
9226 replace the ``with...Texts.'' line with this:
9227
9228 @smallexample
9229 @group
9230 with the Invariant Sections being @var{list their titles}, with the
9231 Front-Cover Texts being @var{list}, and with the Back-Cover Texts being
9232 @var{list}.
9233 @end group
9234 @end smallexample
9235
9236 If you have Invariant Sections without Cover Texts, or some other
9237 combination of the three, merge those two alternatives to suit the
9238 situation.
9239
9240 If your document contains nontrivial examples of program code, we
9241 recommend releasing these examples in parallel under your choice of
9242 free software license, such as the GNU General Public License,
9243 to permit their use in free software.
9244
9245 @node GPL, Key Index, GFDL, Top
9246 @appendix GNU GENERAL PUBLIC LICENSE
9247 @center Version 2, June 1991
9248
9249 @display
9250 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
9251 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
9252
9253 Everyone is permitted to copy and distribute verbatim copies
9254 of this license document, but changing it is not allowed.
9255 @end display
9256
9257 @unnumberedsec Preamble
9258
9259 The licenses for most software are designed to take away your
9260 freedom to share and change it. By contrast, the GNU General Public
9261 License is intended to guarantee your freedom to share and change free
9262 software---to make sure the software is free for all its users. This
9263 General Public License applies to most of the Free Software
9264 Foundation's software and to any other program whose authors commit to
9265 using it. (Some other Free Software Foundation software is covered by
9266 the GNU Library General Public License instead.) You can apply it to
9267 your programs, too.
9268
9269 When we speak of free software, we are referring to freedom, not
9270 price. Our General Public Licenses are designed to make sure that you
9271 have the freedom to distribute copies of free software (and charge for
9272 this service if you wish), that you receive source code or can get it
9273 if you want it, that you can change the software or use pieces of it
9274 in new free programs; and that you know you can do these things.
9275
9276 To protect your rights, we need to make restrictions that forbid
9277 anyone to deny you these rights or to ask you to surrender the rights.
9278 These restrictions translate to certain responsibilities for you if you
9279 distribute copies of the software, or if you modify it.
9280
9281 For example, if you distribute copies of such a program, whether
9282 gratis or for a fee, you must give the recipients all the rights that
9283 you have. You must make sure that they, too, receive or can get the
9284 source code. And you must show them these terms so they know their
9285 rights.
9286
9287 We protect your rights with two steps: (1) copyright the software, and
9288 (2) offer you this license which gives you legal permission to copy,
9289 distribute and/or modify the software.
9290
9291 Also, for each author's protection and ours, we want to make certain
9292 that everyone understands that there is no warranty for this free
9293 software. If the software is modified by someone else and passed on, we
9294 want its recipients to know that what they have is not the original, so
9295 that any problems introduced by others will not reflect on the original
9296 authors' reputations.
9297
9298 Finally, any free program is threatened constantly by software
9299 patents. We wish to avoid the danger that redistributors of a free
9300 program will individually obtain patent licenses, in effect making the
9301 program proprietary. To prevent this, we have made it clear that any
9302 patent must be licensed for everyone's free use or not licensed at all.
9303
9304 The precise terms and conditions for copying, distribution and
9305 modification follow.
9306
9307 @iftex
9308 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9309 @end iftex
9310 @ifinfo
9311 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9312 @end ifinfo
9313
9314 @enumerate 0
9315 @item
9316 This License applies to any program or other work which contains
9317 a notice placed by the copyright holder saying it may be distributed
9318 under the terms of this General Public License. The ``Program,'' below,
9319 refers to any such program or work, and a ``work based on the Program''
9320 means either the Program or any derivative work under copyright law:
9321 that is to say, a work containing the Program or a portion of it,
9322 either verbatim or with modifications and/or translated into another
9323 language. (Hereinafter, translation is included without limitation in
9324 the term ``modification.'') Each licensee is addressed as ``you.''
9325
9326 Activities other than copying, distribution and modification are not
9327 covered by this License; they are outside its scope. The act of
9328 running the Program is not restricted, and the output from the Program
9329 is covered only if its contents constitute a work based on the
9330 Program (independent of having been made by running the Program).
9331 Whether that is true depends on what the Program does.
9332
9333 @item
9334 You may copy and distribute verbatim copies of the Program's
9335 source code as you receive it, in any medium, provided that you
9336 conspicuously and appropriately publish on each copy an appropriate
9337 copyright notice and disclaimer of warranty; keep intact all the
9338 notices that refer to this License and to the absence of any warranty;
9339 and give any other recipients of the Program a copy of this License
9340 along with the Program.
9341
9342 You may charge a fee for the physical act of transferring a copy, and
9343 you may at your option offer warranty protection in exchange for a fee.
9344
9345 @item
9346 You may modify your copy or copies of the Program or any portion
9347 of it, thus forming a work based on the Program, and copy and
9348 distribute such modifications or work under the terms of Section 1
9349 above, provided that you also meet all of these conditions:
9350
9351 @enumerate a
9352 @item
9353 You must cause the modified files to carry prominent notices
9354 stating that you changed the files and the date of any change.
9355
9356 @item
9357 You must cause any work that you distribute or publish, that in
9358 whole or in part contains or is derived from the Program or any
9359 part thereof, to be licensed as a whole at no charge to all third
9360 parties under the terms of this License.
9361
9362 @item
9363 If the modified program normally reads commands interactively
9364 when run, you must cause it, when started running for such
9365 interactive use in the most ordinary way, to print or display an
9366 announcement including an appropriate copyright notice and a
9367 notice that there is no warranty (or else, saying that you provide
9368 a warranty) and that users may redistribute the program under
9369 these conditions, and telling the user how to view a copy of this
9370 License. (Exception: if the Program itself is interactive but
9371 does not normally print such an announcement, your work based on
9372 the Program is not required to print an announcement.)
9373 @end enumerate
9374
9375 These requirements apply to the modified work as a whole. If
9376 identifiable sections of that work are not derived from the Program,
9377 and can be reasonably considered independent and separate works in
9378 themselves, then this License, and its terms, do not apply to those
9379 sections when you distribute them as separate works. But when you
9380 distribute the same sections as part of a whole which is a work based
9381 on the Program, the distribution of the whole must be on the terms of
9382 this License, whose permissions for other licensees extend to the
9383 entire whole, and thus to each and every part regardless of who wrote it.
9384
9385 Thus, it is not the intent of this section to claim rights or contest
9386 your rights to work written entirely by you; rather, the intent is to
9387 exercise the right to control the distribution of derivative or
9388 collective works based on the Program.
9389
9390 In addition, mere aggregation of another work not based on the Program
9391 with the Program (or with a work based on the Program) on a volume of
9392 a storage or distribution medium does not bring the other work under
9393 the scope of this License.
9394
9395 @item
9396 You may copy and distribute the Program (or a work based on it,
9397 under Section 2) in object code or executable form under the terms of
9398 Sections 1 and 2 above provided that you also do one of the following:
9399
9400 @enumerate a
9401 @item
9402 Accompany it with the complete corresponding machine-readable
9403 source code, which must be distributed under the terms of Sections
9404 1 and 2 above on a medium customarily used for software interchange; or,
9405
9406 @item
9407 Accompany it with a written offer, valid for at least three
9408 years, to give any third party, for a charge no more than your
9409 cost of physically performing source distribution, a complete
9410 machine-readable copy of the corresponding source code, to be
9411 distributed under the terms of Sections 1 and 2 above on a medium
9412 customarily used for software interchange; or,
9413
9414 @item
9415 Accompany it with the information you received as to the offer
9416 to distribute corresponding source code. (This alternative is
9417 allowed only for noncommercial distribution and only if you
9418 received the program in object code or executable form with such
9419 an offer, in accord with Subsection b above.)
9420 @end enumerate
9421
9422 The source code for a work means the preferred form of the work for
9423 making modifications to it. For an executable work, complete source
9424 code means all the source code for all modules it contains, plus any
9425 associated interface definition files, plus the scripts used to
9426 control compilation and installation of the executable. However, as a
9427 special exception, the source code distributed need not include
9428 anything that is normally distributed (in either source or binary
9429 form) with the major components (compiler, kernel, and so on) of the
9430 operating system on which the executable runs, unless that component
9431 itself accompanies the executable.
9432
9433 If distribution of executable or object code is made by offering
9434 access to copy from a designated place, then offering equivalent
9435 access to copy the source code from the same place counts as
9436 distribution of the source code, even though third parties are not
9437 compelled to copy the source along with the object code.
9438
9439 @item
9440 You may not copy, modify, sublicense, or distribute the Program
9441 except as expressly provided under this License. Any attempt
9442 otherwise to copy, modify, sublicense or distribute the Program is
9443 void, and will automatically terminate your rights under this License.
9444 However, parties who have received copies, or rights, from you under
9445 this License will not have their licenses terminated so long as such
9446 parties remain in full compliance.
9447
9448 @item
9449 You are not required to accept this License, since you have not
9450 signed it. However, nothing else grants you permission to modify or
9451 distribute the Program or its derivative works. These actions are
9452 prohibited by law if you do not accept this License. Therefore, by
9453 modifying or distributing the Program (or any work based on the
9454 Program), you indicate your acceptance of this License to do so, and
9455 all its terms and conditions for copying, distributing or modifying
9456 the Program or works based on it.
9457
9458 @item
9459 Each time you redistribute the Program (or any work based on the
9460 Program), the recipient automatically receives a license from the
9461 original licensor to copy, distribute or modify the Program subject to
9462 these terms and conditions. You may not impose any further
9463 restrictions on the recipients' exercise of the rights granted herein.
9464 You are not responsible for enforcing compliance by third parties to
9465 this License.
9466
9467 @item
9468 If, as a consequence of a court judgment or allegation of patent
9469 infringement or for any other reason (not limited to patent issues),
9470 conditions are imposed on you (whether by court order, agreement or
9471 otherwise) that contradict the conditions of this License, they do not
9472 excuse you from the conditions of this License. If you cannot
9473 distribute so as to satisfy simultaneously your obligations under this
9474 License and any other pertinent obligations, then as a consequence you
9475 may not distribute the Program at all. For example, if a patent
9476 license would not permit royalty-free redistribution of the Program by
9477 all those who receive copies directly or indirectly through you, then
9478 the only way you could satisfy both it and this License would be to
9479 refrain entirely from distribution of the Program.
9480
9481 If any portion of this section is held invalid or unenforceable under
9482 any particular circumstance, the balance of the section is intended to
9483 apply and the section as a whole is intended to apply in other
9484 circumstances.
9485
9486 It is not the purpose of this section to induce you to infringe any
9487 patents or other property right claims or to contest validity of any
9488 such claims; this section has the sole purpose of protecting the
9489 integrity of the free software distribution system, which is
9490 implemented by public license practices. Many people have made
9491 generous contributions to the wide range of software distributed
9492 through that system in reliance on consistent application of that
9493 system; it is up to the author/donor to decide if he or she is willing
9494 to distribute software through any other system and a licensee cannot
9495 impose that choice.
9496
9497 This section is intended to make thoroughly clear what is believed to
9498 be a consequence of the rest of this License.
9499
9500 @item
9501 If the distribution and/or use of the Program is restricted in
9502 certain countries either by patents or by copyrighted interfaces, the
9503 original copyright holder who places the Program under this License
9504 may add an explicit geographical distribution limitation excluding
9505 those countries, so that distribution is permitted only in or among
9506 countries not thus excluded. In such case, this License incorporates
9507 the limitation as if written in the body of this License.
9508
9509 @item
9510 The Free Software Foundation may publish revised and/or new versions
9511 of the General Public License from time to time. Such new versions will
9512 be similar in spirit to the present version, but may differ in detail to
9513 address new problems or concerns.
9514
9515 Each version is given a distinguishing version number. If the Program
9516 specifies a version number of this License which applies to it and ``any
9517 later version,'' you have the option of following the terms and conditions
9518 either of that version or of any later version published by the Free
9519 Software Foundation. If the Program does not specify a version number of
9520 this License, you may choose any version ever published by the Free Software
9521 Foundation.
9522
9523 @item
9524 If you wish to incorporate parts of the Program into other free
9525 programs whose distribution conditions are different, write to the author
9526 to ask for permission. For software which is copyrighted by the Free
9527 Software Foundation, write to the Free Software Foundation; we sometimes
9528 make exceptions for this. Our decision will be guided by the two goals
9529 of preserving the free status of all derivatives of our free software and
9530 of promoting the sharing and reuse of software generally.
9531
9532 @iftex
9533 @heading NO WARRANTY
9534 @end iftex
9535 @ifinfo
9536 @center NO WARRANTY
9537 @end ifinfo
9538
9539 @item
9540 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
9541 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
9542 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
9543 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
9544 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9545 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
9546 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
9547 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
9548 REPAIR OR CORRECTION.
9549
9550 @item
9551 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
9552 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
9553 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
9554 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
9555 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
9556 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
9557 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
9558 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
9559 POSSIBILITY OF SUCH DAMAGES.
9560 @end enumerate
9561
9562 @iftex
9563 @heading END OF TERMS AND CONDITIONS
9564 @end iftex
9565 @ifinfo
9566 @center END OF TERMS AND CONDITIONS
9567 @end ifinfo
9568
9569 @page
9570 @unnumberedsec How to Apply These Terms to Your New Programs
9571
9572 If you develop a new program, and you want it to be of the greatest
9573 possible use to the public, the best way to achieve this is to make it
9574 free software which everyone can redistribute and change under these terms.
9575
9576 To do so, attach the following notices to the program. It is safest
9577 to attach them to the start of each source file to most effectively
9578 convey the exclusion of warranty; and each file should have at least
9579 the ``copyright'' line and a pointer to where the full notice is found.
9580
9581 @smallexample
9582 @var{one line to give the program's name and an idea of what it does.}
9583 Copyright (C) 19@var{yy} @var{name of author}
9584
9585 This program is free software; you can redistribute it and/or
9586 modify it under the terms of the GNU General Public License
9587 as published by the Free Software Foundation; either version 2
9588 of the License, or (at your option) any later version.
9589
9590 This program is distributed in the hope that it will be useful,
9591 but WITHOUT ANY WARRANTY; without even the implied warranty of
9592 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
9593 GNU General Public License for more details.
9594
9595 You should have received a copy of the GNU General Public License along
9596 with this program; if not, write to the Free Software Foundation, Inc.,
9597 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9598 @end smallexample
9599
9600 Also add information on how to contact you by electronic and paper mail.
9601
9602 If the program is interactive, make it output a short notice like this
9603 when it starts in an interactive mode:
9604
9605 @smallexample
9606 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
9607 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
9608 type `show w'. This is free software, and you are welcome
9609 to redistribute it under certain conditions; type `show c'
9610 for details.
9611 @end smallexample
9612
9613 The hypothetical commands @samp{show w} and @samp{show c} should show
9614 the appropriate parts of the General Public License. Of course, the
9615 commands you use may be called something other than @samp{show w} and
9616 @samp{show c}; they could even be mouse-clicks or menu items---whatever
9617 suits your program.
9618
9619 You should also get your employer (if you work as a programmer) or your
9620 school, if any, to sign a ``copyright disclaimer'' for the program, if
9621 necessary. Here is a sample; alter the names:
9622
9623 @smallexample
9624 @group
9625 Yoyodyne, Inc., hereby disclaims all copyright
9626 interest in the program `Gnomovision'
9627 (which makes passes at compilers) written
9628 by James Hacker.
9629
9630 @var{signature of Ty Coon}, 1 April 1989
9631 Ty Coon, President of Vice
9632 @end group
9633 @end smallexample
9634
9635 This General Public License does not permit incorporating your program into
9636 proprietary programs. If your program is a subroutine library, you may
9637 consider it more useful to permit linking proprietary applications with the
9638 library. If this is what you want to do, use the GNU Library General
9639 Public License instead of this License.
9640
9641 @node Key Index, Command Index, GPL, Top
9642 @unnumbered Key (Character) Index
9643 @printindex ky
9644
9645 @node Command Index, Option Index, Key Index, Top
9646 @unnumbered Command Index
9647 @printindex fn
9648
9649 @node Option Index, Concept Index, Command Index, Top
9650 @unnumbered Option (Variable) Index
9651 @printindex vr
9652
9653 @node Concept Index, , Option Index, Top
9654 @unnumbered Concept Index
9655 @printindex cp
9656
9657 @bye
9658
9659 @c Ispell Helpers
9660 @c
9661 @c The following are words that ispell should ignore that would not
9662 @c normally be in a dictionary (global or personal). Be careful not to
9663 @c include words here that could potentially be typos of other words
9664 @c (such as url, elisp, or MHE).
9665 @c
9666 @c LocalWords: CTRL ESC SPC f's
9667 @c LocalWords: addr Aliasfile alist
9668 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's
9669 @c LocalWords: cmd CMU contrib cron
9670 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw
9671 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm
9672 @c LocalWords: ImageMagick inbox ispell keychain
9673 @c LocalWords: Larus licensor LocalWords lookup lpr
9674 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp
9675 @c LocalWords: MML msg multipart
9676 @c LocalWords: Namazu NIS nenscript nnml num
9677 @c LocalWords: packmbox passphrase pathname prev procmail prog repl
9678 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's
9679 @c LocalWords: sublicense supercite speedbar
9680 @c LocalWords: Tennex texi texinfo Thelen thelenm
9681 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat
9682 @c
9683 @c See http://www.oreilly.com/oreilly/author/stylesheet.html.
9684 @c See http://en.wikipedia.org/.
9685 @c
9686 @c Note the lowercase mh which is needed to avoid hits in the
9687 @c functions and variables. Occasionally, check for accidental
9688 @c inclusion of mh in text by uncommenting the following and executing
9689 @c it with C-x C-e. You want to see "Search failed"
9690 @c (let ((case-fold-search nil))
9691 @c (goto-char (point-min))
9692 @c (search-forward-regexp "^mh\\( \\|$\\)"))
9693 @c
9694 @c An extremely useful setting for texinfo-mode-hook is:
9695 @c (add-to-list
9696 @c 'ispell-skip-region-alist
9697 @c (list
9698 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)"
9699 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|"
9700 @c "@[@{}.]\\|"
9701 @c "[^@]\\|"
9702 @c "@\\(end \\)?group\\|"
9703 @c "@\\(end \\)?cartouche\\)+"
9704 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|"
9705 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|"
9706 @c "^@end [a-z]+$\\|"
9707 @c "^@\\([fv]\\|print\\)index .*$\\|"
9708 @c "@uref{[^,]+,\\|"
9709 @c "@[a-z]+\\|"
9710 @c "/[a-z.]+[/}]\\)")))))
9711 @c
9712 @c Cross References
9713 @c
9714 @c See existing cross-references to the Emacs manual and the Emacs
9715 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU
9716 @c Emacs Lisp Reference Manual'' respectively).
9717
9718 @c @ftable Sorting
9719 @c
9720 @c As per index (sort of): Punctuation, keyboard characters (such as
9721 @c RET and BS) upper and lowercase mixed (lower comes before
9722 @c uppercase), control characters go with uppercase C, meta characters
9723 @c go with uppercase M.
9724 @c In some cases, the sort isn't strictly ASCII.
9725 @c For example, SPC (mh-page-msg) reads better before BS
9726 @c (mh-previous-page) and . (mh-show) is better before ,
9727 @c (mh-header-display).
9728
9729 @c @vtable Sorting
9730 @c
9731 @c Alphabetical, pull hooks into their own table.
9732
9733 @c Local Variables:
9734 @c sentence-end-double-space: nil
9735 @c End:
9736
9737 @ignore
9738 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef
9739 @end ignore