]> code.delx.au - gnu-emacs/blob - man/mh-e.texi
6f20c47f40fff783b271a39016d92a0f98830d2d
[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.94
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 , 2nd Edition
15 @set UPDATED 2006-04-24
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 @cite{MH & nmh: Email for Users & Programmers}
249 @cindex MH book
250 @cindex info
251 @kindex C-h i
252
253 This manual is available in both Info and online formats. The Info
254 version is distributed with Emacs and can be accessed with the
255 @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i
256 m mh-e @key{RET}}). The online version is available at
257 @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great
258 online resource is the book @uref{http://www.ics.uci.edu/~mh/book/,
259 @cite{MH & nmh: Email for Users & Programmers}} (also known as
260 @dfn{the MH book}).
261
262 I hope you enjoy this manual! If you have any comments, or suggestions
263 for this document, please let me know.
264
265 @cindex Bill Wohler
266 @cindex Wohler, Bill
267
268 @noindent
269 Bill Wohler <@i{wohler at newt.com}>@*
270 8 February 1995@*
271 24 February 2006
272
273 @node Conventions, Getting Started, Preface, Top
274 @chapter GNU Emacs Terms and Conventions
275
276 @cindex Emacs
277 @cindex Emacs, conventions
278 @cindex Emacs, terms
279 @cindex Unix commands, Emacs
280 @cindex conventions, Emacs
281 @cindex terms, Emacs
282
283 If you're an experienced Emacs user, you can skip the following
284 conventions and definition of terms and go directly to the next
285 section (@pxref{Getting Started}).
286
287 @cindex Emacs commands
288 @cindex MH commands
289 @cindex Unix commands
290 @cindex commands
291 @cindex commands, MH
292 @cindex commands, Unix
293 @cindex commands, shell
294 @cindex functions
295 @cindex shell commands
296
297 In general, @dfn{functions} in this text refer to Emacs Lisp functions
298 that one would call from within Emacs Lisp programs (for example,
299 @code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those
300 things that are run by the user, such as @kbd{i} or @kbd{M-x
301 mh-inc-folder}. Programs outside of Emacs are specifically called MH
302 commands, shell commands, or Unix commands.
303
304 @cindex conventions, key names
305 @cindex key names
306
307 The conventions for key names are as follows:
308
309 @table @kbd
310 @item C-x
311 Hold down the @key{CTRL} (Control) key and press the @kbd{x} key.
312 @c -------------------------
313 @item M-x
314 Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key.
315
316 Since some keyboards don't have a @key{META} key, you can generate
317 @kbd{M-x}, for example, by pressing @key{ESC} (Escape),
318 @emph{releasing it}, and then pressing the @kbd{x} key.
319 @c -------------------------
320 @item @key{RET}
321 Press the @key{RETURN} or @key{ENTER} key. This is normally used to
322 complete a command.
323 @c -------------------------
324 @item @key{SPC}
325 Press the space bar.
326 @c -------------------------
327 @item @key{TAB}
328 Press the @key{TAB} key.
329 @c -------------------------
330 @item @key{DEL}
331 Press the @key{DELETE} key.
332 @c -------------------------
333 @item @key{BS}
334 Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or
335 earlier of Emacs, you will need to use the @key{DEL} key.}.
336 @end table
337
338 @cindex Emacs, prefix argument
339 @cindex prefix argument
340 @kindex C-u
341
342 A @dfn{prefix argument} allows you to pass an argument to any Emacs
343 function. To pass an argument, type @kbd{C-u} before the Emacs command
344 or keystroke. Numeric arguments can be passed as well. For example, to
345 insert five f's, use @kbd{C-u 5 f}. There is a default of four when
346 using @kbd{C-u}, and you can use multiple prefix arguments to provide
347 arguments of powers of four. To continue our example, you could insert
348 four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with
349 @kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative
350 arguments can also be inserted with the @key{META} key. Examples
351 include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which
352 specifies a negative argument with no particular value.
353
354 @sp 1
355 @center @strong{NOTE}
356
357 @quotation
358 The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder
359 mode (@pxref{Reading Mail Tour}). In this mode, simply enter the
360 numerical argument before entering the command.
361 @end quotation
362 @sp 1
363
364 @cindex @file{.emacs}
365 @cindex Emacs, variables
366 @cindex files, @file{.emacs}
367 @cindex variables
368 @findex setq
369
370 Emacs uses @dfn{variables} to hold values. These can be changed via
371 calls to the function @code{setq} in @file{~/.emacs}.
372
373 @cindex Emacs, options
374 @cindex options
375 @findex customize-group
376 @findex customize-option
377
378 Variables in MH-E that are normally modified by the user are called
379 @dfn{options} and are modified through the customize functions (such
380 as @kbd{M-x customize-option} or @kbd{M-x customize-group}).
381 @ifnothtml
382 @xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
383 GNU Emacs Manual}.
384 @end ifnothtml
385 @ifhtml
386 See section
387 @uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html,
388 Easy Customization} in @cite{The GNU Emacs Manual}.
389 @end ifhtml
390 @xref{Options}.
391
392 @cindex Emacs, faces
393 @cindex faces
394 @cindex highlighting
395 @findex customize-face
396
397 You can specify various styles for displaying text using @dfn{faces}.
398 MH-E provides a set of faces that you can use to personalize the look
399 of your MH-E buffers. Use the command @kbd{M-x customize-face} to do
400 this.
401 @ifnothtml
402 @xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
403 GNU Emacs Manual}.
404 @end ifnothtml
405 @ifhtml
406 See section
407 @uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html,
408 Face Customization} in @cite{The GNU Emacs Manual}.
409 @end ifhtml
410
411 @cindex abnormal hooks
412 @cindex hooks
413 @cindex normal hooks
414 @findex add-hook
415 @findex customize-option
416
417 Commands often offer @dfn{hooks} which enable you to extend or modify
418 the way a command works.
419 @ifnothtml
420 @ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU
421 Emacs Manual}
422 @end ifnothtml
423 @ifhtml
424 See section
425 @uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html,
426 Hooks} in @cite{The GNU Emacs Manual}
427 @end ifhtml
428 for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
429 MH-E uses normal hooks in nearly all cases, so you can assume that we
430 are talking about normal hooks unless we explicitly mention that a
431 hook is abnormal. We also follow the conventions described in that
432 section: the name of the abnormal hooks end in @code{-hooks} and all
433 the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
434 either @code{customize-option} or @code{add-hook}.
435
436 @cindex Emacs, mark
437 @cindex Emacs, point
438 @cindex Emacs, region
439 @cindex mark
440 @cindex point
441 @cindex region
442 @kindex C-@@
443 @kindex C-@key{SPC}
444
445 There are several other terms that are used in Emacs that you should
446 know. The @dfn{point} is where the cursor currently is. You can save
447 your current place in the file by setting a @dfn{mark}. This operation
448 is useful in several ways. The mark can be later used when defining a
449 @dfn{region}, which is the text between the point and mark. Many
450 commands operate on regions, such as those for deleting text or
451 filling paragraphs. A mark can be set with @kbd{C-@@} (or
452 @kbd{C-@key{SPC}}).
453
454 @cindex completion
455 @cindex Emacs, completion
456 @cindex Emacs, file completion
457 @cindex Emacs, folder completion
458 @cindex Emacs, minibuffer
459 @cindex file completion
460 @cindex folder completion
461 @cindex minibuffer
462 @kindex SPC
463 @kindex TAB
464
465 The @dfn{minibuffer} is the bottom line of the Emacs window, where all
466 prompting and multiple-character input is directed. You can use
467 @dfn{completion} to enter values such as folders. Completion means
468 that Emacs fills in text for you when you type @key{SPC} or @key{TAB}.
469 A second @key{SPC} or @key{TAB} will list all possibilities at that
470 point.
471 @ifnothtml
472 @xref{Completion, , Completion, emacs, The GNU Emacs Manual}.
473 @end ifnothtml
474 @ifhtml
475 See the section
476 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
477 Completion} in @cite{The GNU Emacs Manual}.
478 @end ifhtml
479 Note that @key{SPC} cannot be used for completing filenames and
480 folders.
481
482 @findex help-with-tutorial
483 @kindex C-h t
484 @kindex M-x
485
486 The minibuffer is also where you enter Emacs function names after
487 typing @kbd{M-x}. For example, in the preface, I mentioned that you
488 could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What
489 this means is that you can get a tutorial by typing either @kbd{C-h t}
490 or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted
491 for @samp{help-with-tutorial} in the minibuffer after typing
492 @kbd{M-x}.
493
494 @cindex ~
495
496 The @samp{~} notation in filenames represents your home directory.
497 This notation is used by many shells including @command{bash},
498 @code{tcsh}, and @command{csh}. It is analogous to the environment
499 variable @samp{$HOME}. For example, @file{~/.emacs} can be written
500 @file{$HOME/.emacs} or using the absolute path as in
501 @file{/home/wohler/.emacs} instead.
502
503 @cindex Emacs, interrupting
504 @cindex Emacs, quitting
505 @cindex interrupting
506 @cindex quitting
507
508 @i{In case of trouble:} Emacs can be interrupted at any time with
509 @kbd{C-g}. For example, if you've started a command that requests that
510 you enter something in the minibuffer, but then you change your mind,
511 type @kbd{C-g} and you'll be back where you started. If you want to
512 exit Emacs entirely, use @kbd{C-x C-c}.
513
514 @node Getting Started, Tour Through MH-E, Conventions, Top
515 @chapter Getting Started
516
517 @cindex MH-E, versions
518 @cindex history
519 @cindex versions of MH-E
520
521 Because there are many old versions of MH-E out there, it is important
522 to know which version you have. I'll be talking about @w{Version 8}
523 which is pretty close to @w{Version 6} and @w{Version 7}. It differs
524 from @w{Version 4} and @w{Version 5} and is vastly different from
525 @w{Version 3}. @xref{History}.
526
527 @findex mh-version
528
529 To determine which version of MH-E that you have, enter @kbd{M-x
530 mh-version @key{RET}}. Hopefully it says that you're running
531 @w{Version @value{VERSION}} which is the latest version as of this
532 printing.
533
534 If your version is much older than this, please consider upgrading.
535 You can have your system administrator upgrade the system-wide
536 version, or you can install your own personal version. It's really
537 quite easy. @xref{Getting MH-E}, for instructions for getting and
538 installing MH-E.
539
540 If the @code{mh-version} command displays @samp{No MH variant
541 detected}@footnote{In very old versions of MH-E, you may get the error
542 message, @samp{Cannot find the commands `inc' and `mhl' and the file
543 `components'} if MH-E can't find MH. In this case, you need to update
544 MH-E, and you may need to install MH too. However, newer versions of
545 MH-E are better at finding MH if it is on your system.}, then you need
546 to install MH or tell MH-E where to find MH.
547
548 @cindex Debian
549 @cindex nmh
550 @cindex GNU mailutils
551
552 If you don't have MH on your system already, you must install a
553 variant of MH. The Debian mh-e package does this for you automatically
554 (@pxref{Getting MH-E}). Most people use
555 @uref{http://www.nongnu.org/nmh/, nmh}, but you may be interested in
556 trying out @uref{http://www.gnu.org/software/mailutils/, GNU
557 mailutils}, which supports IMAP. Your GNU/Linux distribution probably
558 has packages for both of these.
559
560 @cindex @command{install-mh}
561 @cindex MH commands, @command{install-mh}
562 @cindex MH book
563
564 If you've never run MH before, you need to run @command{install-mh}
565 from the shell before you continue. This sets up your personal MH
566 environment@footnote{See the section
567 @uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
568 MH book.}. If you don't, you'll be greeted with the error message:
569 @samp{Install MH and run install-mh before running MH-E}. This is all
570 you need to know about MH to use MH-E, but the more you know about MH,
571 the more you can leverage its power. See the
572 @uref{@value{MH-BOOK-HOME}, MH book} to learn more about MH.
573
574 @cindex @samp{Path:} MH profile component
575 @cindex MH profile
576 @cindex MH profile component
577 @cindex MH profile component, @samp{Path:}
578
579 Your MH environment includes your @dfn{MH profile} which is found in
580 the file @file{~/.mh_profile}. This file contains a number of @dfn{MH
581 profile components}. For example, the @samp{Path:} MH profile
582 component contains the path to your mail directory, which is
583 @file{~/Mail} by default.
584
585 @cindex @command{mhparam}
586 @cindex MH commands, @command{mhparam}
587 @vindex exec-path
588 @vindex mh-path
589 @vindex mh-sys-path
590 @vindex mh-variant
591 @vindex mh-variant-in-use
592
593 There are several options MH-E uses to interact with your MH
594 installation. The option @code{mh-variant} specifies the variant used
595 by MH-E (@pxref{Options}). The default setting of this option is
596 @samp{Auto-detect} which means that MH-E will automatically choose the
597 first of nmh, MH, or GNU mailutils that it finds in the directories
598 listed in @code{mh-path} (which you can customize),
599 @code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at
600 all, you may have to customize @code{mh-path} and add the directory in
601 which the command @command{mhparam} is located. If, on the other hand,
602 you have both nmh and mailutils installed (for example) and
603 @code{mh-variant-in-use} was initialized to nmh but you want to use
604 mailutils, then you can set @code{mh-variant} to @samp{mailutils}.
605
606 @vindex mh-flists-present-flag
607 @vindex mh-lib
608 @vindex mh-lib-progs
609 @vindex mh-progs
610
611 When @code{mh-variant} is changed, MH-E resets @code{mh-progs},
612 @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and
613 @code{mh-variant-in-use} accordingly.
614
615 @cindex @file{.emacs}
616 @cindex files, @file{.emacs}
617
618 @sp 1
619 @center @strong{NOTE}
620
621 @quotation
622 Prior to version 8, it was often necessary to set some of these
623 variables in @file{~/.emacs}; now it is no longer necessary and can
624 actually cause problems.
625 @end quotation
626 @sp 1
627
628 @cindex MH profile component, @samp{Draft-Folder:}
629 @cindex MH profile component, @samp{Path:}
630 @cindex MH profile component, @samp{Previous-Sequence:}
631 @cindex MH profile component, @samp{Unseen-Sequence:}
632 @cindex @samp{Draft-Folder:} MH profile component
633 @cindex @samp{Path:} MH profile component
634 @cindex @samp{Previous-Sequence:} MH profile component
635 @cindex @samp{Unseen-Sequence:} MH profile component
636 @findex mh-find-path
637 @vindex mh-draft-folder
638 @vindex mh-find-path-hook
639 @vindex mh-inbox
640 @vindex mh-previous-seq
641 @vindex mh-unseen-seq
642 @vindex mh-user-path
643
644 In addition to setting variables that point to MH itself, MH-E also
645 sets a handful of variables that point to where you keep your mail.
646 During initialization, the function @code{mh-find-path} sets
647 @code{mh-user-path} from your @samp{Path:} MH profile component (but
648 defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder}
649 from @samp{Draft-Folder:}, @code{mh-unseen-seq} from
650 @samp{Unseen-Sequence:}, @code{mh-previous-seq} from
651 @samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:}
652 (defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run
653 after these variables have been set. This hook can be used the change
654 the value of these variables if you need to run with different values
655 between MH and MH-E.
656
657 @node Tour Through MH-E, Using This Manual, Getting Started, Top
658 @chapter Tour Through MH-E
659
660 @cindex introduction
661 @cindex tour
662 @cindex tutorial
663
664 This chapter introduces some of the terms you'll need to know and then
665 takes you on a tour of MH-E@footnote{The keys mentioned in these
666 chapters refer to the default key bindings. If you've changed the
667 bindings, refer to the command summaries at the beginning of each
668 chapter for a mapping between default key bindings and function
669 names.}. When you're done, you'll be able to send, read, and file
670 mail, which is all that a lot of people ever do. But if you're the
671 curious or adventurous type, read the rest of the manual to be able to
672 use all the features of MH-E. I suggest you read this chapter first to
673 get the big picture, and then you can read the manual as you wish.
674
675 @menu
676 * Sending Mail Tour::
677 * Reading Mail Tour::
678 * Processing Mail Tour::
679 * Leaving MH-E::
680 * More About MH-E::
681 @end menu
682
683 @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E
684 @section Sending Mail
685
686 @cindex MH-Letter mode
687 @cindex mode
688 @cindex modes, MH-Letter
689 @cindex sending mail
690 @findex mh-smail
691 @kindex M-x mh-smail
692
693 Let's start our tour by sending ourselves a message which we can later
694 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
695 to send messages. Your message appears in an Emacs buffer whose
696 mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a
697 particular type of text.} is MH-Letter.
698
699 Enter your login name in the @samp{To:} header field. Press the
700 @key{TAB} twice to move the cursor past the @samp{Cc:} field, since no
701 carbon copies are to be sent, and on to the @samp{Subject:} field.
702 Enter @kbd{Test} or anything else that comes to mind.
703
704 Press @key{TAB} again to move the cursor to the body of the message.
705 Enter some text, using normal Emacs commands. You should now have
706 something like this@footnote{If you're running Emacs under the X
707 Window System, then you would also see a menu bar and a tool bar. I've
708 left out the menu bar and tool bar in all of the example screens.}:
709
710 @cartouche
711 @smallexample
712
713
714
715
716
717
718 --:-- *scratch* All L1 (Lisp Interaction)-------------------------
719 To: wohler
720 cc:
721 Subject: Test
722 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
723 --------
724 This is a test message to get the wheels churning...#
725
726
727 --:** @{draft@} All L5 (MH-Letter)----------------------------------
728 Type C-c C-c to send message, C-C ? for help
729 @end smallexample
730 @end cartouche
731 @i{MH-E message composition window}
732
733 Note the line of dashes that separates the header and the body of the
734 message. It is essential that these dashes (or a blank line) are
735 present or the body of your message will be considered to be part of
736 the header.
737
738 @cindex help
739 @findex describe-mode
740 @kindex C-c ?
741 @kindex C-c C-c
742 @kindex C-h m
743
744 There are several commands specific to MH-Letter mode@footnote{You can
745 get quick help for the commands used most often with @kbd{C-c ?} or
746 more complete help with the @kbd{C-h m} (@code{describe-mode})
747 command.}, but at this time we'll only use @kbd{C-c C-c} to send your
748 message. Type @kbd{C-c C-c} now. That's all there is to it!
749
750 @node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E
751 @section Receiving Mail
752
753 @cindex @command{inc}
754 @cindex @command{scan}
755 @cindex MH commands, @command{inc}
756 @cindex MH commands, @command{scan}
757 @cindex MH-Folder mode
758 @cindex modes, MH-Folder
759 @cindex reading mail
760 @findex mh-rmail
761 @kindex M-x mh-rmail
762
763 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
764 This incorporates the new mail and puts the output from
765 @command{inc}@footnote{See the section
766 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
767 prev} in the MH book.} (called @dfn{scan lines} after the MH program
768 @command{scan}@footnote{See the section
769 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
770 pick Ranges Sequences} in the MH book.} which prints a one-line
771 summary of each message) into a buffer called @samp{+inbox} whose
772 major mode is MH-Folder.
773
774 @findex mh-rmail
775 @kindex F r
776 @kindex M-x mh-rmail
777
778 @sp 1
779 @center @strong{NOTE}
780
781 @quotation
782
783 The @kbd{M-x mh-rmail} command will show you only new mail, not mail
784 you have already read. If you were to run this tour again, you would
785 use @kbd{F r} to pull all your messages into MH-E.
786 @end quotation
787 @sp 1
788
789 @kindex @key{RET}
790 @kindex n
791 @kindex p
792
793 You should see the scan line for your message, and perhaps others. Use
794 @kbd{n} or @kbd{p} to move the cursor to your test message and type
795 @key{RET} to read your message. You should see something like:
796
797 @cartouche
798 @smallexample
799 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
800 # 4+t08/24 To:wohler Test<<This is a test message to get the wheels
801
802 -:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------
803 To: wohler
804 Subject: Test
805 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
806 Date: Fri, 17 Mar 2006 10:49:11 -0800
807 From: Bill Wohler <wohler@@stop.mail-abuse.org>
808
809 This is a test message to get the wheels churning...
810
811
812
813 --:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
814
815 @end smallexample
816 @end cartouche
817 @i{After incorporating new messages}
818
819 @kindex @key{DEL}
820 @kindex @key{SPC}
821
822 If you typed a long message, you can view subsequent pages with
823 @key{SPC} and previous pages with @key{DEL}.
824
825 @node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E
826 @section Processing Mail
827
828 @cindex processing mail
829 @kindex @key{RET}
830 @kindex r
831
832 The first thing we want to do is reply to the message that we sent
833 ourselves. Ensure that the cursor is still on the same line as your
834 test message and type @kbd{r}. You are prompted in the minibuffer with
835 @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply
836 to the original sender only, to the sender and primary recipients, or
837 to the sender and all recipients. You can press @key{TAB} to see these
838 choices. If you simply press @key{RET}, you'll reply only to the
839 sender. Press @key{RET} now.
840
841 You'll find yourself in an Emacs buffer similar to that when you were
842 sending the original message, like this:
843
844 @cartouche
845 @smallexample
846 To:
847 cc:
848 Subject: Re: Test
849 In-reply-to: <31054.1142621351@@stop.mail-abuse.org>
850 References: <31054.1142621351@@stop.mail-abuse.org>
851 Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org>
852 message dated "Fri, 17 Mar 2006 10:49:11 -0800."
853 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
854 --------
855 #
856
857 --:-- @{draft@} All L10 (MH-Letter)----------------------------------
858 To: wohler
859 Subject: Test
860 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
861 Date: Fri, 17 Mar 2006 10:49:11 -0800
862 From: Bill Wohler <wohler@@stop.mail-abuse.org>
863
864 This is a test message to get the wheels churning...
865
866 --:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
867 Type C-c C-c to send message, C-c ? for help
868 @end smallexample
869 @end cartouche
870 @i{Composition window during reply}
871
872 @findex backward-char
873 @findex forward-char
874 @findex next-line
875 @findex previous-line
876 @kindex C-b
877 @kindex C-c C-c
878 @kindex C-c C-f C-t
879 @kindex C-f
880 @kindex C-n
881 @kindex C-p
882 @kindex @key{BS}
883
884 By default, MH will not add you to the address list of your replies,
885 so if you find that the @samp{To:} header field is missing, don't
886 worry. In this case, type @kbd{C-c C-f C-t} to create and go to the
887 @samp{To:} field, where you can type your login name again. You can
888 move around with the arrow keys or with @kbd{C-p}
889 (@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b}
890 (@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can
891 delete the previous character with @key{BS}. When you're finished
892 editing your message, send it with @kbd{C-c C-c} as before.
893
894 @cindex @command{refile}
895 @cindex MH commands, @command{refile}
896 @cindex folders
897 @kindex @key{SPC}
898 @kindex o
899
900 You'll often want to save messages that were sent to you in an
901 organized fashion. This is done with @dfn{folders}. You can use
902 folders to keep messages from your friends, or messages related to a
903 particular topic. With your cursor in the MH-Folder buffer and
904 positioned on the message you sent to yourself, type @kbd{o} to output
905 (@command{refile} in MH parlance) that message to a folder. Enter
906 @kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y}
907 (or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note
908 that a @samp{^} (caret) appears next to the message number, which
909 means that the message has been marked for refiling but has not yet
910 been refiled. We'll talk about how the refile is actually carried out
911 in a moment.
912
913 @cindex MH-Folder mode
914 @cindex modes, MH-Folder
915 @kindex d
916 @kindex i
917 @kindex @key{RET}
918 @kindex n
919 @kindex p
920 @kindex x
921
922 Your previous reply is now waiting in the system mailbox. You
923 incorporate this mail into your MH-Folder buffer named @samp{+inbox}
924 with the @kbd{i} command. Do this now. After the mail is incorporated,
925 use @kbd{n} or @kbd{p} to move the cursor to the new message, and read
926 it with @key{RET}. Let's delete this message by typing @kbd{d}. Note
927 that a @samp{D} appears next to the message number. This means that
928 the message is marked for deletion but is not yet deleted. To perform
929 the deletion (and the refile we did previously), use the @kbd{x}
930 command.
931
932 @findex mh-smail
933 @kindex m
934 @kindex M-x mh-smail
935
936 If you want to send another message you can use @kbd{m} instead of
937 @kbd{M-x mh-smail}. So go ahead, send some mail to your friends!
938
939 @cindex help
940 @cindex prefix characters
941 @findex describe-mode
942 @kindex ?
943 @kindex C-h m
944 @kindex F ?
945
946 You can get a quick reminder about these commands by typing @kbd{?}.
947 This lists several @dfn{prefix characters}. To list the commands
948 available via the prefix characters, type the prefix character
949 followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is
950 available with the @kbd{C-h m} (@code{describe-mode}) command.
951
952 @node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E
953 @section Leaving MH-E
954
955 @cindex Emacs, quitting
956 @cindex quitting
957 @kindex C-x C-c
958 @kindex x
959
960 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c}
961 to exit @command{emacs}. If you exited without running @kbd{x} in the
962 @samp{+inbox} buffer, Emacs will offer to save it for you. Type
963 @kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to
964 perform any refiles and deletes that you did there.
965
966 @findex mh-rmail
967 @kindex C-x b
968 @kindex C-x k
969 @kindex M-x mh-rmail
970 @kindex q
971
972 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
973 the MH-E folder or delete it entirely with @kbd{C-x k}. You can then
974 later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}.
975
976 @cindex @command{packf}
977 @cindex MH commands, @command{packf}
978 @cindex exporting folders
979 @cindex folders, exporting
980 @cindex mbox-style folder
981
982 On the other hand, if you no longer want to use MH and MH-E, you can
983 take your mail with you. You can copy all of your mail into a single
984 file, mbox-style, by using the MH command @command{packf}. For
985 example, to create a file called @file{msgbox} with the messages in
986 your @samp{+inbox} folder, use @samp{packf +inbox}. The
987 @command{packf} command will append the messages to the file if it
988 already exists, so you can use @samp{folders -recurse -fast} in a
989 script to copy all of your messages into a single file, or using the
990 @samp{-file} argument, a file for each folder.
991
992 @node More About MH-E, , Leaving MH-E, Tour Through MH-E
993 @section More About MH-E
994
995 These are the basic commands to get you going, but there are plenty
996 more. If you think that MH-E is for you, read the rest of the manual
997 to find out how you can:
998
999 @itemize @bullet
1000 @item
1001 Print your messages (@pxref{Printing}).
1002 @c -------------------------
1003 @item
1004 Edit messages and include your signature (@pxref{Editing Drafts}).
1005 @c -------------------------
1006 @item
1007 Forward messages (@pxref{Forwarding}).
1008 @c -------------------------
1009 @item
1010 Read digests (@pxref{Digests}).
1011 @c -------------------------
1012 @item
1013 Edit bounced messages (@pxref{Editing Again}).
1014 @c -------------------------
1015 @item
1016 Send multimedia messages (@pxref{Adding Attachments}).
1017 @c -------------------------
1018 @item
1019 Read HTML messages (@pxref{HTML}).
1020 @c -------------------------
1021 @item
1022 Use aliases and identities (see @ref{Aliases}, @pxref{Identities}).
1023 @c -------------------------
1024 @item
1025 Create different views of your mail (see @ref{Threading}, @pxref{Limits}).
1026 @c -------------------------
1027 @item
1028 Deal with junk mail (@pxref{Junk}).
1029 @c -------------------------
1030 @item
1031 Handle signed and encrypted messages (see @ref{Reading PGP},
1032 @pxref{Sending PGP}).
1033 @c -------------------------
1034 @item
1035 Process mail that was sent with @command{shar} or @command{uuencode}
1036 (@pxref{Files and Pipes}).
1037 @c -------------------------
1038 @item
1039 Use sequences conveniently (@pxref{Sequences}).
1040 @c -------------------------
1041 @item
1042 Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool
1043 Bar}, @pxref{Menu Bar}).
1044 @c -------------------------
1045 @item
1046 Show header fields in different fonts (@pxref{Reading Mail}).
1047 @c -------------------------
1048 @item
1049 Find previously refiled messages (@pxref{Searching}).
1050 @c -------------------------
1051 @item
1052 Place messages in a file (@pxref{Files and Pipes}).
1053 @end itemize
1054
1055 Remember that you can also use MH commands when you're not running
1056 MH-E (and when you are!).
1057
1058 @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top
1059 @chapter Using This Manual
1060
1061 This chapter begins the meat of the manual which goes into more detail
1062 about every MH-E command and option.
1063
1064 @cindex Emacs, info
1065 @cindex Emacs, online help
1066 @cindex info
1067 @cindex online help
1068 @findex describe-mode
1069 @findex mh-help
1070 @kindex ?
1071 @kindex C-c ?
1072 @kindex C-h C-h
1073 @kindex C-h C-k i
1074 @kindex C-h i
1075 @kindex C-h m
1076
1077 There are many commands, but don't get intimidated. There are command
1078 summaries at the beginning of each chapter. In case you have or would
1079 like to rebind the keys, the command summaries also list the
1080 associated Emacs Lisp function. Furthermore, even if you're stranded
1081 on a desert island with a laptop and are without your manuals, you can
1082 get a summary of all these commands with GNU Emacs online help: use
1083 @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands,
1084 @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This
1085 help appears in a buffer called @samp{*MH-E Help*}
1086 (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h
1087 i} to read this manual via Info. The online help is quite good; try
1088 running @kbd{C-h C-h}. This brings up a list of available help topics,
1089 one of which displays the documentation for a given key (like @kbd{C-h
1090 k C-n}). Another useful help feature is to view the manual section
1091 that describes a given key (such as @kbd{C-h C-k i}). In addition,
1092 review @ref{Conventions}, if any of the GNU Emacs conventions are
1093 strange to you.
1094
1095 In addition to all of the commands, it is also possible to reconfigure
1096 MH-E to fit the needs of even the most demanding user. The following
1097 chapters also describe all of the options, show the defaults, and make
1098 recommendations for customization.
1099
1100 However, when customizing your mail environment, first try to change
1101 what you want in MH, and only change MH-E if changing MH is not
1102 possible. That way you will get the same behavior inside and outside
1103 GNU Emacs. Note that MH-E does not provide hooks for customizations
1104 that can be done in MH; this omission is intentional.
1105
1106 @cindex Emacs Lisp Manual
1107 @cindex Emacs, Emacs Lisp Manual
1108 @cindex Emacs, info
1109 @cindex Emacs, online help
1110 @cindex info
1111 @cindex online help
1112
1113 I hope I've included enough examples here to get you well on your way.
1114 If you want to explore Emacs Lisp further, a programming manual does
1115 exist,
1116 @c Yes, some of the stuff in the following sections is redundant, but
1117 @c TeX barfs if the @ifs are inside the @footnote.
1118 @iftex
1119 @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
1120 online in the Info system by typing @kbd{C-h i m Emacs Lisp
1121 @key{RET}}. It is also available online at @*
1122 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1123 can also order a printed manual, which has the desirable side-effect
1124 of helping to support the Free Software Foundation which made all this
1125 great software available. You can find an order form by running
1126 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1127 gnu.org}.}
1128 @end iftex
1129 @ifinfo
1130 @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU
1131 Emacs Lisp Reference Manual}, which may be available online in the
1132 Info system. It is also available online at
1133 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1134 can also order a printed manual, which has the desirable side-effect
1135 of helping to support the Free Software Foundation which made all this
1136 great software available. You can find an order form by running
1137 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1138 gnu.org}.}
1139 @end ifinfo
1140 @ifhtml
1141 @footnote{The
1142 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/,
1143 The GNU Emacs Lisp Reference Manual} may also be available online in
1144 the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can
1145 also order a printed manual, which has the desirable side-effect of
1146 helping to support the Free Software Foundation which made all this
1147 great software available. You can find an order form by running
1148 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1149 gnu.org}.}
1150 @end ifhtml
1151 and you can look at the code itself for examples. Look in the Emacs
1152 Lisp directory on your system (such as
1153 @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
1154 files there. When calling MH-E and other Emacs Lisp functions directly
1155 from Emacs Lisp code, you'll need to know the correct arguments. Use
1156 the online help for this. For example, try @kbd{C-h f
1157 mh-execute-commands @key{RET}}. If you write your own functions,
1158 please do not prefix your symbols (variables and functions) with
1159 @samp{mh-}. This prefix is reserved for the MH-E package. To avoid
1160 conflicts with existing MH-E symbols, use a prefix like @samp{my-} or
1161 your initials.
1162
1163 @menu
1164 * Options::
1165 * Ranges::
1166 * Folder Selection::
1167 @end menu
1168
1169 @node Options, Ranges, Using This Manual, Using This Manual
1170 @section Options
1171
1172 @cindex Emacs, customizing
1173 @cindex Emacs, setting options
1174 @cindex customizing MH-E
1175 @cindex setting options
1176 @findex customize-option
1177 @vindex mh-lpr-command-format, example
1178
1179 Many string or integer options are easy to modify using @kbd{M-x
1180 customize-option}. For example, to modify the option that controls
1181 printing, you would run @kbd{M-x customize-option @key{RET}
1182 mh-lpr-command-format @key{RET}}. In the buffer that appears, modify
1183 the string to the right of the variable. For example, you may change
1184 the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then
1185 use the @samp{State} combo box and select @samp{Save for Future
1186 Sessions}. To read more about @code{mh-lpr-command-format}, see
1187 @ref{Printing}.
1188
1189 @cindex nil
1190 @cindex off, option
1191 @cindex on, option
1192 @cindex option, turning on and off
1193 @cindex t
1194 @findex customize-option
1195 @vindex mh-bury-show-buffer-flag, example
1196
1197 Options can also hold boolean values. In Emacs Lisp, the boolean
1198 values are @code{nil}, which means false, and @code{t}, which means
1199 true. The @code{customize-option} function makes it easy to change
1200 boolean values; simply click on the toggle button in the customize
1201 buffer to switch between @samp{on} (@code{t}) and @samp{off}
1202 (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag}
1203 to @samp{off} to keep the MH-Show buffer at the top of the buffer
1204 stack. Use the @samp{State} combo box and choose @samp{Set for Current
1205 Session} to see how the option affects the show buffer. Then choose
1206 the @samp{Erase Customization} menu item to reset the option to the
1207 default, which places the MH-Show buffer at the bottom of the buffer
1208 stack.
1209
1210 @vindex mh-mhl-format-file, example
1211
1212 The text usually says to turn on an option by setting it to a
1213 @emph{non-@code{nil}} value, because sometimes values other than
1214 @samp{on} are meaningful. An example of this is the variable
1215 @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as
1216 hooks, involve a little more Emacs Lisp programming expertise.
1217
1218 @cindex customization group, @samp{mh}
1219 @cindex @samp{mh} customization group
1220 @findex customize-group
1221 @findex mh-customize
1222
1223 You can browse all of the MH-E options with the @code{customize-group}
1224 function. Try entering @kbd{M-x customize-group @key{RET} mh
1225 @key{RET}} to view the top-level options as well as buttons for all of
1226 the MH-E customization groups. Another way to view the MH-E
1227 customization group is to use @kbd{M-x mh-customize @key{RET}}.
1228
1229 @node Ranges, Folder Selection, Options, Using This Manual
1230 @section Ranges
1231
1232 @c Sync with mh-folder-mode docstring.
1233
1234 @cindex message abbreviations
1235 @cindex message ranges
1236 @cindex ranges
1237
1238 Many commands that operate on individual messages, such as
1239 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE}
1240 argument. This argument can be used in several ways.
1241
1242 @kindex C-u, with ranges
1243
1244 If you provide the prefix argument @kbd{C-u} to these commands, then
1245 you will be prompted for the message range. This can be any valid MH
1246 range which can include messages, sequences (@pxref{Sequences}), and
1247 the abbreviations (described in the @command{mh}(1) man page):
1248
1249 @table @samp
1250 @item <num1>-<num2>
1251 Indicates all messages in the range <num1> to <num2>, inclusive. The
1252 range must be nonempty.
1253 @c -------------------------
1254 @item <num>:N
1255 @item <num>:+N
1256 @itemx <num>:-N
1257 Up to N messages beginning with (or ending with) message num. Num may
1258 be any of the predefined symbols: first, prev, cur, next or last.
1259 @c -------------------------
1260 @item first:N
1261 @itemx prev:N
1262 @itemx next:N
1263 @itemx last:N
1264 The first, previous, next or last messages, if they exist.
1265 @c -------------------------
1266 @item all
1267 All of the messages.
1268 @end table
1269
1270 For example, a range that shows all of these things is @samp{1 2 3
1271 5-10 last:5 unseen}.
1272
1273 @vindex transient-mark-mode
1274
1275 If the option @code{transient-mark-mode} is turned on and you set a
1276 region in the MH-Folder buffer, then the MH-E command will perform the
1277 operation on all messages in that region.
1278
1279 @cindex @samp{mh-range} customization group
1280 @cindex customization group, @samp{mh-range}
1281
1282 The @samp{mh-range} customization group contains a single option which
1283 affects how ranges are interpreted.
1284
1285 @vtable @code
1286 @item mh-interpret-number-as-range-flag
1287 On means interpret a number as a range (default: @samp{on}).
1288 @end vtable
1289
1290 @vindex mh-interpret-number-as-range-flag
1291
1292 Since one of the most frequent ranges used is @samp{last:N}, MH-E will
1293 interpret input such as @samp{200} as @samp{last:200} if the
1294 @code{mh-interpret-number-as-range-flag} option is on (which is the
1295 default). If you need to scan just the message 200, then use the range
1296 @samp{200:1} or @samp{200-200}.
1297
1298 @node Folder Selection, , Ranges, Using This Manual
1299 @section Folder Selection
1300
1301 @cindex completion, folders
1302 @cindex folders, completion
1303 @cindex folders, selecting
1304
1305 When you choose a folder in MH-E via a command such as @kbd{o}
1306 (@code{mh-refile-msg}), completion is used to enter the folder
1307 @ifnothtml
1308 (@pxref{Completion, , , emacs, The GNU Emacs Manual}).
1309 @end ifnothtml
1310 @ifhtml
1311 (see the section
1312 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
1313 Completion} in @cite{The GNU Emacs Manual}).
1314 @end ifhtml
1315 In addition, MH-E has several ways of choosing a suitable default so
1316 that the folder can often be selected with a single @key{RET} key.
1317
1318 @cindex customization group, @samp{mh-folder-selection}
1319 @cindex @samp{mh-folder-selection} customization group
1320
1321 The @samp{mh-folder-selection} customization group contains some
1322 options which are used to help with this.
1323
1324 @vtable @code
1325 @item mh-default-folder-for-message-function
1326 Function to select a default folder for refiling or @samp{Fcc:}
1327 (default: @code{nil}).
1328 @c -------------------------
1329 @item mh-default-folder-list
1330 List of addresses and folders (default: @code{nil}).
1331 @c -------------------------
1332 @item mh-default-folder-must-exist-flag
1333 On means guessed folder name must exist to be used (default:
1334 @samp{on}).
1335 @c -------------------------
1336 @item mh-default-folder-prefix
1337 Prefix used for folder names generated from aliases (default: @code{""}).
1338 @end vtable
1339
1340 @vindex mh-default-folder-for-message-function
1341
1342 You can set the option @code{mh-default-folder-for-message-function}
1343 to a function that provides a default folder for the message to be
1344 refiled. When this function is called, the current buffer contains the
1345 message being refiled and point is at the start of the message. This
1346 function should return the default folder as a string with a leading
1347 @samp{+} sign. It can also return @code{nil} so that the last folder
1348 name is used as the default, or an empty string to suppress the
1349 default entirely.
1350
1351 Otherwise, the name of the destination folder is derived from the
1352 sender as follows:
1353
1354 @enumerate
1355 @vindex mh-default-folder-list
1356 @item
1357 The folder name associated with the first address found in the list
1358 @code{mh-default-folder-list} is used. Each element in this list
1359 contains a @samp{Check Recipient} item. If this item is turned on,
1360 then the address is checked against the recipient instead of the
1361 sender. This is useful for mailing lists.
1362 @c -------------------------
1363 @vindex mh-default-folder-prefix
1364 @item
1365 An alias prefixed by @code{mh-default-folder-prefix} corresponding to
1366 the address is used. The prefix is used to prevent clutter in your
1367 mail directory. @xref{Aliases}.
1368 @end enumerate
1369
1370 @vindex mh-default-folder-must-exist-flag
1371
1372 If the derived folder does not exist, and
1373 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last
1374 folder name used is suggested. This is useful if you get mail from
1375 various people for whom you have an alias, but file them all in the
1376 same project folder.
1377
1378 @node Incorporating Mail, Reading Mail, Using This Manual, Top
1379 @chapter Incorporating Your Mail
1380
1381 @cindex @samp{Folder} menu
1382 @cindex incorporating
1383 @cindex menu, @samp{Folder}
1384
1385 This chapter talks about getting mail from your system mailbox into
1386 your MH @samp{+inbox} folder. The following command accomplishes that
1387 and is found in the @samp{Folder} menu.
1388
1389 @table @kbd
1390 @cindex @samp{Folder > Incorporate New Mail} menu item
1391 @cindex menu item, @samp{Folder > Incorporate New Mail}
1392 @findex mh-inc-folder
1393 @kindex i
1394 @item i
1395 Incorporate new mail into a folder (@code{mh-inc-folder}).
1396 @end table
1397
1398 @cindex @samp{mh-inc} customization group
1399 @cindex customization group, @samp{mh-inc}
1400
1401 The following options in the @samp{mh-inc} customization group are
1402 used.
1403
1404 @vtable @code
1405 @item mh-inc-prog
1406 Program to incorporate mail (default: @code{"inc"}).
1407 @c -------------------------
1408 @item mh-inc-spool-list
1409 Alternate spool files (default: @code{nil}).
1410 @end vtable
1411
1412 The following hook is available.
1413
1414 @vtable @code
1415 @findex mh-inc-folder
1416 @item mh-inc-folder-hook
1417 Hook run by @code{mh-inc-folder} after incorporating mail into a
1418 folder (default: @code{nil}).
1419 @end vtable
1420
1421 @cindex @samp{+inbox}
1422 @findex mh-inc-folder
1423 @kindex i
1424
1425 If at any time you receive new mail, incorporate the new mail into
1426 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note
1427 that @kbd{i} will display the @samp{+inbox} buffer, even if there
1428 isn't any new mail. You can incorporate mail from any file into the
1429 current folder by specifying a prefix argument; you'll be prompted for
1430 the name of the file to use as well as the destination folder (for
1431 example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}).
1432
1433 @cindex @file{.emacs}
1434 @cindex Emacs, notification of new mail
1435 @cindex files, @file{.emacs}
1436 @cindex new mail
1437 @cindex notification of new mail
1438
1439 Emacs can notify you when you have new mail by displaying @samp{Mail}
1440 in the mode line. To enable this behavior, and to have a clock in the
1441 mode line as well, add the following to @file{~/.emacs}:
1442
1443 @findex display-time
1444
1445 @smalllisp
1446 (display-time)
1447 @end smalllisp
1448
1449 @cindex @command{inc}
1450 @cindex incorporating
1451 @cindex MH commands, @command{inc}
1452 @vindex mh-inc-prog
1453 @vindex mh-progs
1454
1455 The name of the program that incorporates new mail is stored in
1456 @code{mh-inc-prog}; it is @code{"inc"} by default. This program
1457 generates a one-line summary for each of the new messages. Unless it
1458 is an absolute pathname, the file is assumed to be in the
1459 @code{mh-progs} directory (@pxref{Getting Started}). You may also link
1460 a file to @command{inc} that uses a different format (see
1461 @samp{mh-profile}(5), and sections
1462 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
1463 prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in
1464 the MH book). You'll then need to modify several variables
1465 appropriately (@pxref{Scan Line Formats}).
1466
1467 @vindex mh-inc-spool-list
1468
1469 You can use the @code{mh-inc-spool-list} variable to direct MH-E to
1470 retrieve mail from arbitrary spool files other than your system
1471 mailbox, file it in folders other than your @samp{+inbox}, and assign
1472 key bindings to incorporate this mail.
1473
1474 @cindex @command{procmail}
1475 @cindex @file{.procmailrc}
1476 @cindex Unix commands, @command{procmail}
1477 @cindex files, @file{.procmailrc}
1478
1479 Suppose you are subscribed to the @i{mh-e-devel} mailing list and you
1480 use @command{procmail} to filter this mail into @file{~/mail/mh-e}
1481 with the following recipe in @file{.procmailrc}:
1482
1483 @smallexample
1484 MAILDIR=$HOME/mail
1485 :0:
1486 * ^From mh-e-devel-admin@@stop.mail-abuse.org
1487 mh-e
1488 @end smallexample
1489
1490 @findex mh-inc-spool-*
1491 @kindex I *
1492
1493 In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an
1494 @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option,
1495 and click on the @samp{INS} button. Enter a @samp{Spool File} of
1496 @samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key
1497 Binding} of @samp{m}.
1498
1499 @cindex @command{emacsclient}
1500 @cindex @command{gnuclient}
1501 @cindex @command{xbuffy}
1502 @cindex @samp{gnuserv}
1503 @cindex Unix commands, @command{emacsclient}
1504 @cindex Unix commands, @command{gnuclient}
1505 @cindex Unix commands, @command{xbuffy}
1506
1507 You can use @command{xbuffy} to automate the incorporation of this
1508 mail using the Emacs 22 command @command{emacsclient} as follows:
1509
1510 @smallexample
1511 box ~/mail/mh-e
1512 title mh-e
1513 origMode
1514 polltime 10
1515 headertime 0
1516 command emacsclient --eval '(mh-inc-spool-mh-e)'
1517 @end smallexample
1518
1519 In XEmacs, the command @command{gnuclient} is used in a similar
1520 fashion.
1521
1522 @findex mh-inc-folder
1523 @kindex i
1524 @vindex mh-inc-folder-hook
1525
1526 You can set the hook @code{mh-inc-folder-hook}, which is called after
1527 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder})
1528 command. A good use of this hook is to rescan the whole folder either
1529 after running @kbd{M-x mh-rmail} the first time or when you've changed
1530 the message numbers from outside of MH-E.
1531
1532 @findex mh-execute-commands
1533 @findex mh-rescan-folder, example
1534 @findex mh-show, example
1535 @vindex mh-inc-folder-hook, example
1536
1537 @smalllisp
1538 @group
1539 (defun my-mh-inc-folder-hook ()
1540 "Hook to rescan folder after incorporating mail."
1541 (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,}
1542 (mh-execute-commands)) ; @r{carry them out}
1543 (mh-rescan-folder) ; @r{synchronize with +inbox}
1544 (mh-show)) ; @r{show the current message}
1545
1546 (add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook)
1547
1548 @i{Rescan folder after incorporating new mail via mh-inc-folder-hook}
1549
1550 @end group
1551 @end smalllisp
1552
1553 @node Reading Mail, Folders, Incorporating Mail, Top
1554 @chapter Reading Your Mail
1555
1556 @cindex @samp{+inbox}
1557 @cindex MH-Folder mode
1558 @cindex MH-Show mode
1559 @cindex modes, MH-Folder
1560 @cindex modes, MH-Show
1561 @cindex reading mail
1562 @findex mh-rmail
1563 @kindex M-x mh-rmail
1564 @kindex F r
1565 @kindex F v
1566
1567 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This
1568 command incorporates your mail and creates a buffer called
1569 @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows
1570 you only new mail, not mail you have already read@footnote{If you want
1571 to see your old mail as well, use @kbd{F r} to pull all your messages
1572 into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will
1573 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u
1574 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}.
1575
1576 @cindex @command{scan}
1577 @cindex @samp{Message} menu
1578 @cindex MH commands, @command{scan}
1579 @cindex menu, @samp{Message}
1580 @cindex scan lines
1581
1582 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line
1583 summaries of each incorporated message. You can perform most MH
1584 commands on these messages via one- or two-letter commands in either
1585 the MH-Folder or MH-Show buffers or by using the @samp{Message} menu.
1586 See @command{scan}(1) for a description of the contents of the scan
1587 lines, and see the Figure in @ref{Reading Mail Tour}, for an example.
1588
1589 @table @kbd
1590 @kindex ?
1591 @findex mh-help
1592 @item ?
1593 Display cheat sheet for the MH-E commands (@code{mh-help}).
1594 @c -------------------------
1595 @cindex @samp{Message > Show Message} menu item
1596 @cindex menu item, @samp{Message > Show Message}
1597 @kindex @key{RET}
1598 @findex mh-show
1599 @item @key{RET}
1600 Display message (@code{mh-show}).
1601 @c -------------------------
1602 @cindex @samp{Message > Show Message with Header} menu item
1603 @cindex menu item, @samp{Message > Show Message with Header}
1604 @kindex , (comma)
1605 @findex mh-header-display
1606 @item , (comma)
1607 Display message with all header fields (@code{mh-header-display}).
1608 @c -------------------------
1609 @kindex ; (semicolon)
1610 @findex mh-toggle-mh-decode-mime-flag
1611 @item ; (semicolon)
1612 Toggle the value of @code{mh-decode-mime-flag}
1613 (@code{mh-toggle-mh-decode-mime-flag}).
1614 @c -------------------------
1615 @kindex @key{SPC}
1616 @findex mh-page-msg
1617 @item @key{SPC}
1618 Display next page in message (@code{mh-page-msg}).
1619 @c -------------------------
1620 @kindex @key{BS}
1621 @findex mh-previous-page
1622 @item @key{BS}
1623 Display previous page in message (@code{mh-previous-page}).
1624 @c -------------------------
1625 @cindex @samp{Message > Write Message to File...} menu item
1626 @cindex menu item, @samp{Message > Write Message to File...}
1627 @kindex >
1628 @findex mh-write-msg-to-file
1629 @item >
1630 Append message to end of file (@code{mh-write-msg-to-file}).
1631 @c -------------------------
1632 @cindex @samp{Message > Pipe Message to Command...} menu item
1633 @cindex menu item, @samp{Message > Pipe Message to Command...}
1634 @kindex |
1635 @findex mh-pipe-msg
1636 @item |
1637 Pipe message through shell command (@code{mh-pipe-msg}).
1638 @c -------------------------
1639 @kindex C-d
1640 @findex mh-delete-msg-no-motion
1641 @item C-d
1642 Delete range, don't move to next message
1643 (@code{mh-delete-msg-no-motion}).
1644 @c -------------------------
1645 @cindex @samp{Message > Delete Message} menu item
1646 @cindex menu item, @samp{Message > Delete Message}
1647 @kindex d
1648 @findex mh-delete-msg
1649 @item d
1650 Delete range (@code{mh-delete-msg}).
1651 @c -------------------------
1652 @kindex D ?
1653 @findex mh-prefix-help
1654 @item D ?
1655 Display cheat sheet for the commands of the current prefix in
1656 minibuffer (@code{mh-prefix-help}).
1657 @c -------------------------
1658 @kindex D @key{SPC}
1659 @findex mh-page-digest
1660 @item D @key{SPC}
1661 Display next message in digest (@code{mh-page-digest}).
1662 @c -------------------------
1663 @kindex D @key{BS}
1664 @findex mh-page-digest-backwards
1665 @item D @key{BS}
1666 Display previous message in digest (@code{mh-page-digest-backwards}).
1667 @c -------------------------
1668 @cindex @samp{Message > Burst Digest Message} menu item
1669 @cindex menu item, @samp{Message > Burst Digest Message}
1670 @kindex D b
1671 @findex mh-burst-digest
1672 @item D b
1673 Break up digest into separate messages (@code{mh-burst-digest}).
1674 @c -------------------------
1675 @cindex @samp{Message > Go to Message by Number...} menu item
1676 @cindex menu item, @samp{Message > Go to Message by Number...}
1677 @kindex g
1678 @findex mh-goto-msg
1679 @item g
1680 Go to a message (@code{mh-goto-msg}).
1681 @c -------------------------
1682 @kindex k
1683 @findex mh-delete-subject-or-thread
1684 @item k
1685 Delete messages with same subject or thread
1686 (@code{mh-delete-subject-or-thread}).
1687 @c -------------------------
1688 @kindex K ?
1689 @findex mh-prefix-help
1690 @item K ?
1691 Display cheat sheet for the commands of the current prefix in
1692 minibuffer (@code{mh-prefix-help}).
1693 @c -------------------------
1694 @kindex K @key{TAB}
1695 @findex mh-next-button
1696 @item K @key{TAB}
1697 Go to the next button (@code{mh-next-button}).
1698 @c -------------------------
1699 @kindex K S-@key{TAB}
1700 @findex mh-prev-button
1701 @item K S-@key{TAB}
1702 Go to the previous button (@code{mh-prev-button}).
1703 @c -------------------------
1704 @kindex K a
1705 @findex mh-mime-save-parts
1706 @item K a
1707 Save attachments (@code{mh-mime-save-parts}).
1708 @c -------------------------
1709 @kindex K e
1710 @findex mh-display-with-external-viewer
1711 @item K e
1712 View attachment externally (@code{mh-display-with-external-viewer}).
1713 @c -------------------------
1714 @kindex K i
1715 @findex mh-folder-inline-mime-part
1716 @item K i
1717 Show attachment verbatim (@code{mh-folder-inline-mime-part}).
1718 @c -------------------------
1719 @kindex K o
1720 @findex mh-folder-save-mime-part
1721 @item K o
1722 Save (output) attachment (@code{mh-folder-save-mime-part}).
1723 @c -------------------------
1724 @kindex K t
1725 @findex mh-toggle-mime-buttons
1726 @item K t
1727 Toggle option @code{mh-display-buttons-for-inline-parts-flag}
1728 (@code{mh-toggle-mime-buttons}).
1729 @c -------------------------
1730 @kindex K v
1731 @findex mh-folder-toggle-mime-part
1732 @item K v
1733 View attachment (@code{mh-folder-toggle-mime-part}).
1734 @c -------------------------
1735 @cindex @samp{Message > Modify Message} menu item
1736 @cindex menu item, @samp{Message > Modify Message}
1737 @kindex M
1738 @findex mh-modify
1739 @item M
1740 Edit message (@code{mh-modify}).
1741 @c -------------------------
1742 @cindex @samp{Message > Go to First Message} menu item
1743 @cindex menu item, @samp{Message > Go to First Message}
1744 @kindex M-<
1745 @findex mh-first-msg
1746 @item M-<
1747 Display first message (@code{mh-first-msg}).
1748 @c -------------------------
1749 @cindex @samp{Message > Go to Last Message} menu item
1750 @cindex menu item, @samp{Message > Go to Last Message}
1751 @kindex M->
1752 @findex mh-last-msg
1753 @item M->
1754 Display last message (@code{mh-last-msg}).
1755 @c -------------------------
1756 @kindex M-n
1757 @findex mh-next-unread-msg
1758 @item M-n
1759 Display next unread message (@code{mh-next-unread-msg}).
1760 @c -------------------------
1761 @kindex M-p
1762 @findex mh-previous-unread-msg
1763 @item M-p
1764 Display previous unread message (@code{mh-previous-unread-msg}).
1765 @c -------------------------
1766 @cindex @samp{Message > Next Message} menu item
1767 @cindex menu item, @samp{Message > Next Message}
1768 @kindex n
1769 @findex mh-next-undeleted-msg
1770 @item n
1771 Display next message (@code{mh-next-undeleted-msg}).
1772 @c -------------------------
1773 @cindex @samp{Message > Previous Message} menu item
1774 @cindex menu item, @samp{Message > Previous Message}
1775 @kindex p
1776 @findex mh-previous-undeleted-msg
1777 @item p
1778 Display previous message (@code{mh-previous-undeleted-msg}).
1779 @c -------------------------
1780 @kindex P ?
1781 @findex mh-prefix-help
1782 @item P ?
1783 Display cheat sheet for the commands of the current prefix in
1784 minibuffer (@code{mh-prefix-help}).
1785 @c -------------------------
1786 @kindex P C
1787 @findex mh-ps-print-toggle-color
1788 @item P C
1789 Toggle whether color is used in printing messages
1790 (@code{mh-ps-print-toggle-color}).
1791 @c -------------------------
1792 @kindex P F
1793 @findex mh-ps-print-toggle-faces
1794 @item P F
1795 Toggle whether printing is done with faces or not
1796 (@code{mh-ps-print-toggle-faces}).
1797 @c -------------------------
1798 @kindex P f
1799 @findex mh-ps-print-msg-file
1800 @item P f
1801 Print range to file (@code{mh-ps-print-msg-file}).
1802 @c -------------------------
1803 @cindex @samp{Message > Print Message} menu item
1804 @cindex menu item, @samp{Message > Print Message}
1805 @kindex P l
1806 @findex mh-print-msg
1807 @item P l
1808 Print range the old fashioned way
1809 (@code{mh-print-msg}).
1810 @c -------------------------
1811 @kindex P p
1812 @findex mh-ps-print-msg
1813 @item P p
1814 Print range (@code{mh-ps-print-msg}).
1815 @c -------------------------
1816 @kindex X ?
1817 @findex mh-prefix-help
1818 @item X ?
1819 Display cheat sheet for the commands of the current prefix in
1820 minibuffer (@code{mh-prefix-help}).
1821 @c -------------------------
1822 @cindex @samp{Message > Unpack Uuencoded Message...} menu item
1823 @cindex menu item, @samp{Message > Unpack Uuencoded Message...}
1824 @kindex X s
1825 @kindex X u
1826 @findex mh-store-msg
1827 @item X s
1828 @itemx X u
1829 Unpack message created with @command{uudecode} or @command{shar}
1830 (@code{mh-store-msg}).
1831 @c -------------------------
1832 @kindex Mouse-2
1833 @findex mh-show-mouse
1834 @item Mouse-2
1835 Move point to mouse event and show message (@code{mh-show-mouse}).
1836 @end table
1837
1838 Within the MH-Show buffer, the following command is defined.
1839
1840 @table @kbd
1841 @kindex @key{RET}
1842 @kindex Mouse-1
1843 @kindex Mouse-2
1844 @findex mh-press-button
1845 @item @key{RET}
1846 @itemx Mouse-1
1847 @itemx Mouse-2
1848 View contents of button (@code{mh-press-button}).
1849 @end table
1850
1851 @cindex @samp{mh-show} customization group
1852 @cindex customization group, @samp{mh-show}
1853
1854 The following table lists options in the @samp{mh-show} customization
1855 group that are used while reading mail.
1856
1857 @vtable @code
1858 @item mh-bury-show-buffer-flag
1859 On means show buffer is buried (default: @samp{on}).
1860 @c -------------------------
1861 @item mh-clean-message-header-flag
1862 On means remove extraneous header fields (default: @samp{on}).
1863 @c -------------------------
1864 @item mh-decode-mime-flag
1865 On means attachments are handled (default: @samp{on} if the Gnus
1866 @samp{mm-decode} package is present).
1867 @c -------------------------
1868 @item mh-display-buttons-for-alternatives-flag
1869 On means display buttons for all alternative attachments (default:
1870 @samp{off}).
1871 @c -------------------------
1872 @item mh-display-buttons-for-inline-parts-flag
1873 On means display buttons for all inline attachments (default:
1874 @samp{off}).
1875 @c -------------------------
1876 @item mh-do-not-confirm-flag
1877 On means non-reversible commands do not prompt for confirmation
1878 (default: @samp{off}).
1879 @c -------------------------
1880 @item mh-fetch-x-image-url
1881 Control fetching of @samp{X-Image-URL:} header field image (default:
1882 @samp{Never Fetch}).
1883 @c -------------------------
1884 @item mh-graphical-smileys-flag
1885 On means graphical smileys are displayed (default: @samp{on}).
1886 @c -------------------------
1887 @item mh-graphical-emphasis-flag
1888 On means graphical emphasis is displayed (default: @samp{on}).
1889 @c -------------------------
1890 @item mh-highlight-citation-style
1891 Style for highlighting citations (default: @samp{Multicolor}).
1892 @c -------------------------
1893 @item mh-invisible-header-fields-default
1894 List of hidden header fields (default: a checklist too long to list
1895 here).
1896 @c -------------------------
1897 @item mh-invisible-header-fields
1898 Additional header fields to hide (default: @code{nil}).
1899 @c -------------------------
1900 @item mh-lpr-command-format
1901 Command used to print (default: @code{"lpr -J '%s'"}).
1902 @c -------------------------
1903 @item mh-max-inline-image-height
1904 Maximum inline image height if @samp{Content-Disposition:} is not
1905 present (default: 0).
1906 @c -------------------------
1907 @item mh-max-inline-image-width
1908 Maximum inline image width if @samp{Content-Disposition:} is not
1909 present(default: 0).
1910 @c -------------------------
1911 @item mh-mhl-format-file
1912 Specifies the format file to pass to the @command{mhl} program
1913 (default: @samp{Use Default mhl Format (Printing Only)}).
1914 @c -------------------------
1915 @item mh-mime-save-parts-default-directory
1916 Default directory to use for @kbd{K a}.
1917 @c -------------------------
1918 @item mh-print-background-flag
1919 On means messages should be printed in the background (default:
1920 @samp{off}).
1921 @c -------------------------
1922 @item mh-show-buffer-mode-line-buffer-id
1923 Format string to produce @code{mode-line-buffer-identification} for
1924 show buffers (default: @code{" @{show-%s@} %d"}).
1925 @c -------------------------
1926 @item mh-show-maximum-size
1927 Maximum size of message (in bytes) to display automatically (default:
1928 0).
1929 @c -------------------------
1930 @item mh-show-use-xface-flag
1931 On means display face images in MH-Show buffers (default: @samp{on}).
1932 @c -------------------------
1933 @item mh-store-default-directory
1934 Default directory for @kbd{X s} (default: @samp{Current}).
1935 @c -------------------------
1936 @item mh-summary-height
1937 Number of lines in MH-Folder buffer (including the mode line)
1938 (default: depends on size of frame).
1939 @end vtable
1940
1941 The following hooks are available.
1942
1943 @vtable @code
1944 @item mh-delete-msg-hook
1945 Hook run after marking each message for deletion (default: @code{nil}).
1946 @c -------------------------
1947 @item mh-show-hook
1948 Hook run after @key{RET} shows a message (default: @code{nil}).
1949 @c -------------------------
1950 @item mh-show-mode-hook
1951 Hook run upon entry to @code{mh-show-mode} (default: @code{nil}).
1952 @end vtable
1953
1954 The following faces are available.
1955
1956 @vtable @code
1957 @item mh-show-cc
1958 Face used to highlight @samp{cc:} header fields.
1959 @c -------------------------
1960 @item mh-show-date
1961 Face used to highlight @samp{Date:} header fields.
1962 @c -------------------------
1963 @item mh-show-from
1964 Face used to highlight @samp{From:} header fields.
1965 @c -------------------------
1966 @item mh-show-header
1967 Face used to deemphasize less interesting header fields.
1968 @c -------------------------
1969 @item mh-show-pgg-bad
1970 Bad PGG signature face.
1971 @c -------------------------
1972 @item mh-show-pgg-good
1973 Good PGG signature face.
1974 @c -------------------------
1975 @item mh-show-pgg-unknown
1976 Unknown or untrusted PGG signature face.
1977 @c -------------------------
1978 @item mh-show-signature
1979 Signature face.
1980 @c -------------------------
1981 @item mh-show-subject
1982 Face used to highlight @samp{Subject:} header fields.
1983 @c -------------------------
1984 @item mh-show-to
1985 Face used to highlight @samp{To:} header fields.
1986 @c -------------------------
1987 @item mh-show-xface
1988 X-Face image face.
1989 @end vtable
1990
1991 The functions and variables introduced here are explained in more
1992 detail in the following sections.
1993
1994 @menu
1995 * Viewing::
1996 * Viewing Attachments::
1997 * HTML::
1998 * Digests::
1999 * Reading PGP::
2000 * Printing::
2001 * Files and Pipes::
2002 * Navigating::
2003 * Miscellaneous Commands and Options::
2004 @end menu
2005
2006 @node Viewing, Viewing Attachments, Reading Mail, Reading Mail
2007 @section Viewing Your Mail
2008
2009 @findex mh-header-display
2010 @findex mh-page-msg
2011 @findex mh-previous-page
2012 @findex mh-show
2013 @findex mh-show-mouse
2014 @kindex , (comma)
2015 @kindex . (period)
2016 @kindex @key{BS}
2017 @kindex @key{RET}
2018 @kindex @key{SPC}
2019 @kindex Mouse-2
2020
2021 The command @key{RET} (@code{mh-show}) displays the message that the
2022 cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the
2023 message that the mouse cursor is on. If the message is already
2024 displayed, it scrolls to the beginning of the message. Use @key{SPC}
2025 (@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move
2026 forwards and backwards one page at a time through the message. You can
2027 give either of these commands a prefix argument that specifies the
2028 number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC}
2029 command will also show the next undeleted message if it is used at the
2030 bottom of a message. MH-E normally hides a lot of the superfluous
2031 header fields that mailers add to a message, but if you wish to see
2032 all of them, use the command @kbd{,} (comma;
2033 @code{mh-header-display}).
2034
2035 @vindex mh-show-maximum-size
2036
2037 The option @code{mh-show-maximum-size} provides an opportunity to skip
2038 over large messages which may be slow to load. The default value of 0
2039 means that all message are shown regardless of size.
2040
2041 A litany of options control what displayed messages look like.
2042
2043 @vindex mh-show-cc
2044 @vindex mh-show-date
2045 @vindex mh-show-from
2046 @vindex mh-show-header
2047 @vindex mh-show-subject
2048 @vindex mh-show-to
2049
2050 First, the appearance of the header fields can be modified by
2051 customizing the associated face: @code{mh-show-to}, @code{mh-show-cc},
2052 @code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}.
2053 The face @code{mh-show-header} is used to deemphasize the other, less
2054 interesting, header fields.
2055
2056 @cindex regular expressions, @code{mh-invisible-header-fields}
2057 @vindex mh-clean-message-header-flag
2058 @vindex mh-invisible-header-fields
2059 @vindex mh-invisible-header-fields-default
2060
2061 Normally messages are delivered with a handful of uninteresting header
2062 fields. These are hidden by turning on the option
2063 @code{mh-clean-message-header-flag} (which it is by default). The
2064 header fields listed in the option
2065 @code{mh-invisible-header-fields-default} are hidden, although you can
2066 check off any field that you would like to see. Header fields that you
2067 would like to hide that aren't listed can be added to the option
2068 @code{mh-invisible-header-fields} with a couple of caveats. Regular
2069 expressions are not allowed. Unique fields should have a @samp{:}
2070 suffix; otherwise, the element can be used to render invisible an
2071 entire class of fields that start with the same prefix. If you think a
2072 header field should be generally ignored, report a bug (@pxref{Bug
2073 Reports}).
2074
2075 @cindex header field, @samp{Face:}
2076 @cindex header field, @samp{X-Face:}
2077 @cindex header field, @samp{X-Image-URL:}
2078 @cindex @samp{Face:} header field
2079 @cindex @samp{X-Face:} header field
2080 @cindex @samp{X-Image-URL:} header field
2081 @vindex mh-show-use-xface-flag
2082
2083 MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and
2084 @samp{X-Image-URL:} header fields. If any of these fields occur in the
2085 header of your message, the sender's face will appear in the
2086 @samp{From:} header field. If more than one of these fields appear,
2087 then the first field found in the order @samp{Face:}, @samp{X-Face:},
2088 and @samp{X-Image-URL:} will be used. The option
2089 @code{mh-show-use-xface-flag} is used to turn this feature on and off.
2090 This feature will be turned on by default if your system supports it.
2091
2092 The first header field used, if present, is the Gnus-specific
2093 @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU
2094 Emacs 21 and XEmacs. For more information, see
2095 @uref{http://quimby.gnus.org/circus/face/}.}.
2096
2097 @cindex @command{uncompface}
2098 @cindex Emacs, packages, x-face
2099 @cindex Unix commands, @command{uncompface}
2100 @cindex x-face package
2101 @vindex mh-show-xface
2102
2103 Next is the traditional @samp{X-Face:} header field@footnote{The
2104 display of this field requires the
2105 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
2106 @command{uncompface} program}. Recent versions of XEmacs have internal
2107 support for @samp{X-Face:} images. If your version of XEmacs does not,
2108 then you'll need both @command{uncompface} and the
2109 @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E
2110 renders the foreground and background of the image using the
2111 associated attributes of the face @code{mh-show-xface}.
2112
2113 @cindex @command{convert}
2114 @cindex @command{wget}
2115 @cindex ImageMagick
2116 @cindex Unix commands, @command{convert}
2117 @cindex Unix commands, @command{wget}
2118 @vindex mh-fetch-x-image-url
2119
2120 Finally, MH-E will display images referenced by the
2121 @samp{X-Image-URL:} header field if neither the @samp{Face:} nor the
2122 @samp{X-Face:} fields are present@footnote{The display of the images
2123 requires the @uref{http://www.gnu.org/software/wget/wget.html,
2124 @command{wget} program} to fetch the image and the @command{convert}
2125 program from the @uref{http://www.imagemagick.org/, ImageMagick
2126 suite}.}. Of the three header fields this is the most efficient in
2127 terms of network usage since the image doesn't need to be transmitted
2128 with every single mail. The option @code{mh-fetch-x-image-url}
2129 controls the fetching of the @samp{X-Image-URL:} header field image
2130 with the following values:
2131
2132 @table @samp
2133 @item Ask Before Fetching
2134 You are prompted before the image is fetched. MH-E will remember your
2135 reply and will either use the already fetched image the next time the
2136 same URL is encountered or silently skip it if you didn't fetch it the
2137 first time. This is a good setting.
2138 @c -------------------------
2139 @item Never Fetch
2140 Images are never fetched and only displayed if they are already
2141 present in the cache. This is the default.
2142 @end table
2143
2144 There isn't a value of @samp{Always Fetch} for privacy and DOS (denial
2145 of service) reasons. For example, fetching a URL can tip off a spammer
2146 that you've read his email (which is why you shouldn't blindly answer
2147 yes if you've set this option to @samp{Ask Before Fetching}). Someone
2148 may also flood your network and fill your disk drive by sending a
2149 torrent of messages, each specifying a unique URL to a very large
2150 file.
2151
2152 @cindex @file{.mhe-x-image-cache}
2153 @cindex files, @file{.mhe-x-image-cache}
2154
2155 The cache of images is found in the directory
2156 @file{.mhe-x-image-cache} within your MH directory. You can add your
2157 own face to the @samp{From:} field too. @xref{Picture}.
2158
2159 @cindex @command{mhl}
2160 @cindex MH commands, @command{mhl}
2161 @vindex mh-mhl-format-file
2162
2163 Normally MH-E takes care of displaying messages itself (rather than
2164 calling an MH program to do the work). If you'd rather have
2165 @command{mhl} display the message (within MH-E), change the option
2166 @code{mh-mhl-format-file} from its default value of @samp{Use Default
2167 mhl Format (Printing Only)}. You can set this option to @samp{Use
2168 Default mhl Format} to get the same output as you would get if you ran
2169 @command{mhl} from the shell. If you have a format file that you want
2170 MH-E to use, you can set this option to @samp{Specify an mhl Format
2171 File} and enter the name of your format file (@command{mhl}(1) or
2172 section @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in
2173 the MH book tells you how to write one). Your format file should
2174 specify a non-zero value for @samp{overflowoffset} to allow MH-E to
2175 parse the header. Note that @command{mhl} is always used for printing
2176 and forwarding; in this case, the value of @code{mh-mhl-format-file}
2177 is consulted if you have specified a format file.
2178
2179 @cindex citations, highlighting
2180 @cindex highlighting citations
2181 @vindex mh-highlight-citation-style
2182
2183 If the sender of the message has cited other messages in his message,
2184 then MH-E will highlight these citations to emphasize the sender's
2185 actual response. The option @code{mh-highlight-citation-style} can be
2186 customized to change the highlighting style. The @samp{Multicolor}
2187 method uses a different color for each indentation while the
2188 @samp{Monotone} method highlights all citations in red. To disable
2189 highlighting of citations entirely, choose @samp{None}.
2190
2191 @cindex URLs, highlighting
2192 @cindex email addresses, highlighting
2193 @cindex highlighting URLs
2194 @cindex highlighting email addresses
2195 @cindex links, following
2196 @findex goto-address-at-point
2197 @kindex C-c @key{RET}
2198 @kindex Mouse-2
2199 @vindex goto-address-highlight-p
2200
2201 Email addresses and URLs in the message are highlighted if the option
2202 @code{goto-address-highlight-p} is on, which it is by default. To view
2203 the web page for a highlighted URL or to send a message using a
2204 highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}
2205 (@code{goto-address-at-point}). @xref{Sending Mail}, to see how to
2206 configure Emacs to send the message using MH-E.
2207
2208 @cindex boldface, showing
2209 @cindex emphasis
2210 @cindex italics, showing
2211 @cindex smileys
2212 @cindex typesetting
2213 @cindex underline, showing
2214 @vindex gnus-emphasis-alist
2215 @vindex mh-decode-mime-flag
2216 @vindex mh-graphical-emphasis-flag
2217 @vindex mh-graphical-smileys-flag
2218
2219 It is a long standing custom to inject body language using a
2220 cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can
2221 render these as graphical widgets if the option
2222 @code{mh-graphical-smileys-flag} is turned on, which it is by default.
2223 Smileys include patterns such as :-) and ;-). Similarly, a few
2224 typesetting features are indicated in ASCII text with certain
2225 characters. If your terminal supports it, MH-E can render these
2226 typesetting directives naturally if the option
2227 @code{mh-graphical-emphasis-flag} is turned on, which it is by
2228 default. For example, _underline_ will be
2229 @ifhtml
2230 @html
2231 <u>underlined</u>,
2232 @end html
2233 @end ifhtml
2234 @ifnothtml
2235 underlined,
2236 @end ifnothtml
2237 *bold* will appear in @b{bold}, /italics/ will appear in @i{italics},
2238 and so on. See the option @code{gnus-emphasis-alist} for the whole
2239 list. Both of these options are disabled if the option
2240 @code{mh-decode-mime-flag} is turned off. @xref{Viewing Attachments}.
2241
2242 @cindex signature separator
2243 @cindex vCard
2244 @vindex mh-show-signature
2245
2246 MH-E normally renders signatures and vCards in italics so that the
2247 body of the message stands out more. MH-E depends on the presence of
2248 the @dfn{signature separator} (@code{"-- "}) to do this. You can also
2249 customize the face @code{mh-show-signature} so the appearance of the
2250 signature block is more to your liking.
2251
2252 @vindex mh-show-hook
2253 @vindex mh-show-mode-hook
2254
2255 Two hooks can be used to control how messages are displayed. The first
2256 hook, @code{mh-show-mode-hook}, is called early on in the process of
2257 the message display. It is usually used to perform some action on the
2258 message's content. The second hook, @code{mh-show-hook}, is the last
2259 thing called after messages are displayed. It's used to affect the
2260 behavior of MH-E in general or when @code{mh-show-mode-hook} is too
2261 early.
2262
2263 @cindex MH-Show mode
2264 @cindex modes, MH-Show
2265 @vindex mh-show-buffer-mode-line-buffer-id
2266
2267 For those who like to modify their mode lines, use
2268 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in
2269 the MH-Show buffers. Place the two escape strings @samp{%s} and
2270 @samp{%d}, which will display the folder name and the message number,
2271 respectively, somewhere in the string in that order. The default value
2272 of @code{"@{show-%s@} %d"} yields a mode line of
2273
2274 @smallexample
2275 -----@{show-+inbox@} 4 (MH-Show)--Bot--------------------------------
2276 @end smallexample
2277
2278 @node Viewing Attachments, HTML, Viewing, Reading Mail
2279 @section Viewing Attachments
2280
2281 @cindex attachments
2282 @cindex body parts
2283 @cindex @command{mhshow}
2284 @cindex @command{show}
2285 @cindex MH commands, @command{mhshow}
2286 @cindex MH commands, @command{show}
2287 @cindex MIME
2288 @cindex multimedia mail
2289
2290 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
2291 Mail Extensions) messages which are simply messages with additional
2292 @dfn{body parts} or @dfn{attachments}. You can use the MH commands
2293 @command{show}@footnote{See the section
2294 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
2295 prev} in the MH book.} or @command{mhshow}@footnote{See the section
2296 @uref{@value{MH-BOOK-HOME}/usimim.htm#ReMIMa, Reading MIME Mail} in
2297 the MH book.} from the shell to read @sc{mime} messages@footnote{You
2298 can call them directly from Emacs if you're running the X Window
2299 System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can
2300 leave out the @samp{xterm -e} if you use @command{mhlist} or
2301 @command{mhstore}.}.
2302
2303 @cindex Emacs, packages, mm-decode
2304 @cindex mm-decode package
2305 @findex mh-toggle-mh-decode-mime-flag
2306 @kindex ; (semicolon)
2307 @vindex mh-decode-mime-flag
2308
2309 MH-E can handle attachments as well if the Gnus @samp{mm-decode}
2310 package is present. If so, the option @code{mh-decode-mime-flag} will
2311 be on. Otherwise, you'll see the @sc{mime} body parts rather than text
2312 or attachments. There isn't much point in turning off the option
2313 @code{mh-decode-mime-flag}; however, you can inspect it if it appears
2314 that the body parts are not being interpreted correctly or toggle it
2315 with the command @kbd{;} (semicolon;
2316 @code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This
2317 option also controls the display of quoted-printable messages and
2318 other graphical widgets. @xref{Viewing}.
2319
2320 @cindex buttons
2321
2322 Attachments in MH-E are indicated by @dfn{buttons} like this:
2323
2324 @smallexample
2325 [1. image/jpeg; foo.jpg]...
2326 @end smallexample
2327
2328 @findex mh-next-button
2329 @findex mh-press-button
2330 @findex mh-prev-button
2331 @kindex @key{RET}
2332 @kindex K @key{TAB}
2333 @kindex K S-@key{TAB}
2334 @kindex Mouse-1
2335 @kindex Mouse-2
2336
2337 To view the contents of the button, use either @kbd{Mouse-1} or
2338 @kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when
2339 the cursor is over the button. This command is a toggle so if you use
2340 it again on the same attachment, it is hidden. If Emacs does not know
2341 how to display the attachment, then Emacs offers to save the
2342 attachment in a file. To move the cursor to the next button, use the
2343 command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the
2344 buffer is reached then the search wraps over to the start of the
2345 buffer. To move the cursor to the previous button, use the command
2346 @kbd{K S-@key{TAB}} (@code{mh-prev-button}). If the beginning of the
2347 buffer is reached then the search wraps over to the end of the buffer.
2348
2349 @cindex attachments, viewing
2350 @cindex viewing attachments
2351 @findex mh-folder-toggle-mime-part
2352 @kindex K v
2353
2354 Another way to view the contents of a button is to use the command
2355 @kbd{K v} (@code{mh-folder-toggle-mime-part}). This command displays
2356 (or hides) the attachment associated with the button under the cursor.
2357 If the cursor is not located over a button, then the cursor first
2358 moves to the next button, wrapping to the beginning of the message if
2359 necessary. This command has the advantage over the previous commands
2360 of working from the MH-Folder buffer. You can also provide a numeric
2361 prefix argument (as in @kbd{4 K v}) to view the attachment labeled
2362 with that number. If Emacs does not know how to display the
2363 attachment, then Emacs offers to save the attachment in a file.
2364
2365 @cindex @file{/etc/mailcap}
2366 @cindex files, @file{/etc/mailcap}
2367 @findex mailcap-mime-info
2368 @findex mh-display-with-external-viewer
2369 @kindex K e
2370
2371 If Emacs does not know how to view an attachment, you could save it
2372 into a file and then run some program to open it. It is easier,
2373 however, to launch the program directly from MH-E with the command
2374 @kbd{K e} (@code{mh-display-with-external-viewer}). While you'll most
2375 likely use this to view spreadsheets and documents, it is also useful
2376 to use your browser to view HTML attachments with higher fidelity than
2377 what Emacs can provide. This command displays the attachment
2378 associated with the button under the cursor. If the cursor is not
2379 located over a button, then the cursor first moves to the next button,
2380 wrapping to the beginning of the message if necessary. You can provide
2381 a numeric prefix argument (as in @kbd{4 K e}) to view the attachment
2382 labeled with that number. This command tries to provide a reasonable
2383 default for the viewer by calling the Emacs function
2384 @code{mailcap-mime-info}. This function usually reads the file
2385 @file{/etc/mailcap}.
2386
2387 @cindex attachments, saving
2388 @cindex saving attachments
2389 @findex mh-folder-save-mime-part
2390 @kindex K o
2391
2392 Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save
2393 attachments (the mnemonic is ``output''). This command saves the
2394 attachment associated with the button under the cursor. If the cursor
2395 is not located over a button, then the cursor first moves to the next
2396 button, wrapping to the beginning of the message if necessary. You can
2397 also provide a numeric prefix argument (as in @kbd{3 K o}) to save the
2398 attachment labeled with that number. This command prompts you for a
2399 filename and suggests a specific name if it is available.
2400
2401 @cindex @command{mhn}
2402 @cindex @command{mhstore}
2403 @cindex MH commands, @command{mhn}
2404 @cindex MH commands, @command{mhstore}
2405 @findex mh-mime-save-parts
2406 @kindex K a
2407 @vindex mh-mime-save-parts-default-directory
2408
2409 You can save all of the attachments at once with the command @kbd{K a}
2410 (@code{mh-mime-save-parts}). The attachments are saved in the
2411 directory specified by the option
2412 @code{mh-mime-save-parts-default-directory} unless you use a prefix
2413 argument (as in @kbd{C-u K a}) in which case you are prompted for the
2414 directory. These directories may be superseded by MH profile
2415 components, since this function calls on @command{mhstore}
2416 (@command{mhn}) to do the work.
2417
2418 @vindex mh-mime-save-parts-default-directory
2419
2420 The default value for the option
2421 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so
2422 that you are always prompted for the directory in which to save the
2423 attachments. However, if you usually use the same directory within a
2424 session, then you can set this option to @samp{Prompt the First Time}
2425 to avoid the prompt each time. you can make this directory permanent
2426 by choosing @samp{Directory} and entering the directory's name.
2427
2428 @cindex attachments, inline
2429 @cindex inline attachments
2430 @findex mh-toggle-mime-buttons
2431 @kindex K t
2432 @vindex mh-display-buttons-for-inline-parts-flag
2433
2434 The sender can request that attachments should be viewed inline so
2435 that they do not really appear like an attachment at all to the
2436 reader. Most of the time, this is desirable, so by default MH-E
2437 suppresses the buttons for inline attachments. On the other hand, you
2438 may receive code or HTML which the sender has added to his message as
2439 inline attachments so that you can read them in MH-E. In this case, it
2440 is useful to see the buttons so that you know you don't have to cut
2441 and paste the code into a file; you can simply save the attachment. If
2442 you want to make the buttons visible for inline attachments, you can
2443 use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle
2444 the visibility of these buttons. You can turn on these buttons
2445 permanently by turning on the option
2446 @code{mh-display-buttons-for-inline-parts-flag}.
2447
2448 MH-E cannot display all attachments inline however. It can display
2449 text (including @sc{html}) and images.
2450
2451 @cindex header field, @samp{Content-Disposition:}
2452 @cindex inline images
2453 @cindex @samp{Content-Disposition:} header field
2454 @vindex mh-max-inline-image-height
2455 @vindex mh-max-inline-image-width
2456
2457 Some older mail programs do not insert the needed
2458 plumbing@footnote{This plumbing is the @samp{Content-Disposition:}
2459 header field.} to tell MH-E whether to display the attachments inline
2460 or not. If this is the case, MH-E will display these images inline if
2461 they are smaller than the window. However, you might want to allow
2462 larger images to be displayed inline. To do this, you can change the
2463 options @code{mh-max-inline-image-width} and
2464 @code{mh-max-inline-image-height} from their default value of zero to
2465 a large number. The size of your screen is a good choice for these
2466 numbers.
2467
2468 @cindex alternatives
2469 @cindex attachments, alternatives
2470 @vindex mh-display-buttons-for-alternatives-flag
2471
2472 Sometimes, a mail program will produce multiple alternatives of an
2473 attachment in increasing degree of faithfulness to the original
2474 content. By default, only the preferred alternative is displayed. If
2475 the option @code{mh-display-buttons-for-alternatives-flag} is on, then
2476 the preferred part is shown inline and buttons are shown for each of
2477 the other alternatives.
2478
2479 @kindex K i
2480 @findex mh-folder-inline-mime-part
2481
2482 You can view the raw contents of an attachment with the command @kbd{K
2483 i} (@code{mh-folder-inline-mime-part}). This command displays (or
2484 hides) the contents of the attachment associated with the button under
2485 the cursor verbatim. If the cursor is not located over a button, then
2486 the cursor first moves to the next button, wrapping to the beginning
2487 of the message if necessary. You can also provide a numeric prefix
2488 argument (as in @kbd{4 K i}) to view the attachment labeled with that
2489 number.
2490
2491 For additional information on buttons, see
2492 @ifinfo
2493 @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}.
2494 @end ifinfo
2495 @ifnotinfo
2496 the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101,
2497 Article Buttons} and
2498 @uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands}
2499 in the @cite{The Gnus Manual}.
2500 @end ifnotinfo
2501
2502 @node HTML, Digests, Viewing Attachments, Reading Mail
2503 @section HTML
2504
2505 @cindex HTML
2506 @cindex Gnus
2507
2508 MH-E can display messages that have been sent in HTML@footnote{This
2509 feature depends on a version of Gnus that is at least 5.10.}. The
2510 content of the message will appear in the MH-Show buffer as you would
2511 expect if the entire message is HTML, or there is an inline HTML body
2512 part. However, if there is an HTML body part that is an attachment,
2513 then you'll see a button like this:
2514
2515 @smallexample
2516 [1. text/html; foo.html]...
2517 @end smallexample
2518
2519 To see how to read the contents of this body part, see @ref{Viewing
2520 Attachments}.
2521
2522 @vindex mm-text-html-renderer
2523
2524 The browser that MH-E uses is determined by the option
2525 @code{mm-text-html-renderer}. The default setting is set automatically
2526 based upon the presence of a known browser on your system. If you wish
2527 to use a different browser, then set this option accordingly. See the
2528 documentation for the browser you use for additional information on
2529 how to use it. In particular, find and disable the option to render
2530 images as this can tip off spammers that the email address they have
2531 used is valid.
2532
2533 @vindex mm-text-html-renderer
2534
2535 If you're confused about which @code{mm-text-html-renderer} to use,
2536 here's a brief description of each, sorted by popularity, that
2537 includes the results of a quick poll of MH-E users from 2005-12-23.
2538
2539 @table @asis
2540 @cindex browser, @samp{w3m}
2541 @cindex @samp{w3m}
2542 @kindex Mouse-2
2543 @kindex S-Mouse-2
2544 @item @samp{w3m} 7
2545 The @samp{w3m} browser requires an external program. It's quick,
2546 produces pretty nice output, and best of all, it's the only browser
2547 that highlights links. These can be clicked with @kbd{Mouse-2} to view
2548 the content of the link in @samp{w3m} or with @kbd{S-Mouse-2} to view
2549 the content of the link in an external browser. The @samp{w3m} browser
2550 handles tables well and actually respects the table's width parameter
2551 (which can cause text to wrap if the author didn't anticipate that the
2552 page would be viewed in Emacs).
2553 @c -------------------------
2554 @cindex browser, @samp{w3m-standalone}
2555 @cindex @samp{w3m-standalone}
2556 @item @samp{w3m-standalone} 3
2557 This browser, along with @samp{nil} for the external browser, are the
2558 only choices that work without having to download a separate lisp
2559 package or external program. This browser is quick, but does not show
2560 links. It handles simple tables but some tables get rendered much
2561 wider than the Emacs frame. This browser was the only one not to
2562 handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did
2563 render @samp{&reg;}.
2564 @c -------------------------
2565 @cindex browser, @samp{links}
2566 @cindex @samp{links}
2567 @item @samp{links} 1
2568 The @samp{links} browser requires an external program. It's quick, and
2569 produces nicer output than @samp{lynx} on single column mails in
2570 tables. However, it doesn't show links and it doesn't do as nice a job
2571 on multi-column tables as some lines wrap. At least it fits in 80
2572 columns and thus seems better than @samp{w3} and
2573 @samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R).
2574 @c -------------------------
2575 @cindex browser, @samp{lynx}
2576 @cindex @samp{lynx}
2577 @item @samp{lynx} 1
2578 The @samp{lynx} browser requires an external program. It's quick and
2579 produces pretty decent output but it doesn't show links. It doesn't
2580 seem to do multi-column tables which makes output much cleaner. It
2581 centers the output and wraps long lines more than most. Handles
2582 @samp{&reg;}.
2583 @c -------------------------
2584 @item @samp{nil} 1
2585 This choice obviously requires an external browser. Like
2586 @samp{w3m-standalone}, it works out of the box. With this setting,
2587 HTML messages have a button for the body part which you can view with
2588 @kbd{K v} (@code{mh-folder-toggle-mime-part}).
2589 @c -------------------------
2590 @cindex browser, @samp{w3}
2591 @cindex @samp{w3}
2592 @item @samp{w3} 0
2593 This choice does not require an external program as all of the
2594 rendering is done in lisp. You do need to get the package separately.
2595 This browser is @strong{slow}, and doesn't appear to have been updated
2596 since 2001 and the author hasn't responded to my emails. It displays
2597 unknown tags instead of hiding them, so you get to see all the
2598 Microsoft crap in certain messages. Tends to make multi-column tables
2599 wider than even a full-screen Emacs can handle. Like @samp{w3m}, you
2600 can follow links, but you have to find them first as they are not
2601 highlighted. Performs well on single-column tables and handles escapes
2602 such as @samp{&reg;}.
2603 @c -------------------------
2604 @cindex browser, @samp{html2text}
2605 @cindex @samp{html2text}
2606 @item @samp{html2text} 0
2607 The @samp{html2text} browser requires an external program. I noticed
2608 that it can do some nasty things with simple HTML mails (like filling
2609 the entire message as if it were one paragraph, including signature).
2610 On another message, it displayed half of the HTML tags for some
2611 reason.
2612 @end table
2613
2614 @vindex mm-text-html-renderer
2615
2616 For a couple more sources of information about
2617 @code{mm-text-html-renderer},
2618 @ifinfo
2619 @xref{Display Customization,,,emacs-mime}, and the documentation for
2620 the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},).
2621 @end ifinfo
2622 @ifnotinfo
2623 see section @uref{http://www.gnus.org/manual/emacs-mime_6.html,
2624 Display Customization} in the @cite{The Emacs MIME Manual} and the the
2625 documentation for the Gnus command @kbd{W h} (see section
2626 @uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the
2627 @cite{The Gnus Manual}).
2628 @end ifnotinfo
2629
2630 @node Digests, Reading PGP, HTML, Reading Mail
2631 @section Digests
2632
2633 @cindex digests
2634 @findex mh-page-digest
2635 @findex mh-page-digest-backwards
2636 @kindex D @key{BS}
2637 @kindex D @key{SPC}
2638 @kindex @key{BS}
2639 @kindex @key{SPC}
2640
2641 A digest is a message that contains other messages. Special MH-E
2642 commands let you read digests conveniently. You can use @key{SPC} and
2643 @key{BS} to page through the digest as if it were a normal message,
2644 but if you wish to skip to the next message in the digest, use
2645 @kbd{D @key{SPC}} (@code{mh-page-digest}). To return to a previous message,
2646 use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
2647
2648 @cindex @command{burst}
2649 @cindex MH commands, @command{burst}
2650 @cindex MH-Folder Show mode
2651 @cindex modes, MH-Folder Show
2652 @findex mh-burst-digest
2653 @kindex d
2654 @kindex D b
2655 @kindex t
2656
2657 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
2658 command uses the MH command @command{burst}@footnote{See the section
2659 @uref{@value{MH-BOOK-HOME}/burdig.htm, Bursting Messages} in the MH
2660 book.} to break out each message in the digest into its own message.
2661 Using this command, you can quickly delete unwanted messages, like
2662 this: Once the digest is split up, toggle out of MH-Folder Show mode
2663 with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen
2664 and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail})
2665 to quickly delete messages that you don't want to read (based on the
2666 @samp{Subject:} header field). You can also burst the digest to reply
2667 directly to the people who posted the messages in the digest. One
2668 problem you may encounter is that the @samp{From:} header fields are
2669 preceded with a @samp{>} so that your reply can't create the
2670 @samp{To:} field correctly. In this case, you must correct the
2671 @samp{To:} field yourself. This is described later (@pxref{Editing
2672 Drafts}).
2673
2674 @node Reading PGP, Printing, Digests, Reading Mail
2675 @section Signed and Encrypted Messages
2676
2677 @cindex GPG
2678 @cindex GnuPG
2679 @cindex Gnus
2680 @cindex OpenPGP
2681 @cindex PGP
2682 @cindex RFC 3156
2683 @cindex encrypted messages
2684 @cindex security
2685 @cindex signed messages
2686
2687 You can read encrypted or signed PGP or GPG messages with
2688 MH-E@footnote{This feature depends on post-5.10 versions of Gnus.
2689 @cite{MIME Security with OpenPGP} is documented in
2690 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However,
2691 MH-E can also decrypt old-style PGP messages that are not in MIME
2692 format.}. This section assumes that you already have a good
2693 understanding of GPG and have set up your keys appropriately.
2694
2695 If someone sends you a signed message, here is what you'll see:
2696
2697 @smallexample
2698 @group
2699 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2700 This is a signed message.
2701
2702 [[End of PGP Signed Part]]
2703 @end group
2704 @end smallexample
2705
2706 @cindex keychain
2707 @cindex key server
2708 @cindex signed messages
2709
2710 If the key for the given signature is not in your keychain, you'll be
2711 given the opportunity to fetch the key from a key server and verify
2712 the key. If the message is really large, the verification process can
2713 take a long time. You can press @kbd{C-g} at any time to
2714 cancel@footnote{Unfortunately in the current version, the validation
2715 process doesn't display a message so it appears that MH-E has hung. We
2716 hope that this will be fixed in the future.}.
2717
2718 If the signature doesn't check out, you might see something like this:
2719
2720 @smallexample
2721 @group
2722 [[PGP Signed Part:Failed]]
2723 This is a signed message.
2724 This is garbage added after the signature was made.
2725
2726 [[End of PGP Signed Part]]
2727 @end group
2728 @end smallexample
2729
2730 @cindex decrypting messages
2731
2732 If someone sends you an encrypted message, MH-E will ask for your
2733 passphrase to decrypt the message. You should see something like this:
2734
2735 @smallexample
2736 @group
2737 [[PGP Encrypted Part:OK]]
2738
2739 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2740 This is the secret message.
2741
2742 [[End of PGP Signed Part]]
2743
2744 [[End of PGP Encrypted Part]]
2745 @end group
2746 @end smallexample
2747
2748 If there is a problem decrypting the message, the button will say:
2749
2750 @smallexample
2751 [[PGP Encrypted Part:Failed]]
2752 @end smallexample
2753
2754 You can read the contents of this button using the methods described in
2755 @ref{Viewing Attachments}. If the message were corrupted, you'd see
2756 this:
2757
2758 @smallexample
2759 [[PGP Encrypted Part:Failed]
2760 Invalid base64 data]
2761 @end smallexample
2762
2763 If your passphrase were incorrect, you'd see something like this:
2764
2765 @smallexample
2766 [GNUPG:] ENC_TO CD9C88BB610BD9AD 1 0
2767 [GNUPG:] USERID_HINT CD9C88BB610BD9AD Bill Wohler <wohler@@stop.mail-abuse.org>
2768 [GNUPG:] NEED_PASSPHRASE CD9C88BB610BD9AD CD9C88BB610BD9AD 1 0
2769 [GNUPG:] BAD_PASSPHRASE CD9C88BB610BD9AD
2770 gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09
2771 "Bill Wohler <wohler@@stop.mail-abuse.org>"
2772 gpg: public key decryption failed: bad passphrase
2773 [GNUPG:] BEGIN_DECRYPTION
2774 [GNUPG:] DECRYPTION_FAILED
2775 gpg: decryption failed: secret key not available
2776 [GNUPG:] END_DECRYPTION
2777
2778 gpg exited abnormally: '2'
2779 @end smallexample
2780
2781 @vindex mh-show-pgg-bad
2782 @vindex mh-show-pgg-good
2783 @vindex mh-show-pgg-unknown
2784
2785 The appearance of the buttons is controlled by the faces
2786 @code{mh-show-pgg-good}, @code{mh-show-pgg-bad}, and
2787 @code{mh-show-pgg-unknown} depending on the validity of the signature.
2788 The latter is used whether the signature is unknown or untrusted.
2789
2790 @cindex @samp{pgg} customization group
2791 @cindex PGG
2792 @cindex customization group, @samp{pgg}
2793
2794 The @samp{pgg} customization group may have some settings which may
2795 interest you.
2796 @iftex
2797 See @cite{The PGG Manual}.
2798 @end iftex
2799 @ifinfo
2800 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
2801 @end ifinfo
2802 @ifhtml
2803 See
2804 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
2805 @cite{The PGG Manual}}.
2806 @end ifhtml
2807
2808 @node Printing, Files and Pipes, Reading PGP, Reading Mail
2809 @section Printing Your Mail
2810
2811 @cindex printing
2812 @findex mh-ps-print-msg
2813 @findex mh-ps-print-msg-file
2814 @kindex P f
2815 @kindex P p
2816 @vindex mh-lpr-command-format
2817 @vindex mh-print-background-flag
2818
2819 To print messages in MH-E, use the command @kbd{P p}
2820 (@code{mh-ps-print-msg}). You can print all the messages in a range
2821 (as in @kbd{C-u P p 1 3 5-7 last:5 frombob @key{RET}},
2822 @pxref{Ranges}). You can also send the output to a file with @kbd{P f}
2823 (@code{mh-ps-print-msg-file}). This command will print inline text
2824 attachments but will not decrypt messages. However, when a message is
2825 displayed in an MH-Show buffer, then that buffer is used verbatim for
2826 printing with the caveat that only text attachments, if opened inline,
2827 are printed. Therefore, encrypted messages can be printed by showing
2828 and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not
2829 use the options @code{mh-lpr-command-format} or
2830 @code{mh-print-background-flag}, described below.
2831
2832 @findex mh-ps-print-toggle-color
2833 @kindex P C
2834 @vindex ps-print-color-p
2835
2836 Colors are emulated on black-and-white printers with shades of gray.
2837 This might produce illegible output, even if your screen colors only
2838 use shades of gray. If this is the case, try using the command @kbd{P
2839 C} (@code{mh-ps-print-toggle-color}) to toggle between color, no
2840 color, and a black and white representation of the colors and see
2841 which works best. You change this setting permanently by customizing
2842 the option @code{ps-print-color-p}.
2843
2844 @findex mh-ps-print-toggle-faces
2845 @kindex P F
2846
2847 Another related function is the command @kbd{P F}
2848 (@code{mh-ps-print-toggle-faces}). This command toggles between using
2849 faces and not. When faces are enabled, the printed message will look
2850 very similar to the message in the MH-Show buffer.
2851
2852 @cindex ps-print package
2853 @cindex Emacs, packages, ps-print
2854
2855 MH-E uses the @samp{ps-print} package to do the printing, so you can
2856 customize the printing further by going to the @samp{ps-print}
2857 customization group.
2858
2859 @cindex @command{lpr}
2860 @cindex @command{mhl}
2861 @cindex MH commands, @command{mhl}
2862 @cindex Unix commands, @command{lpr}
2863 @findex mh-print-msg
2864 @kindex P l
2865
2866 An alternative to using the @samp{ps-print} package is the command
2867 @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or
2868 @i{l}pr). You can print all the messages in a range. The message is
2869 formatted with @command{mhl}@footnote{See the section
2870 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
2871 book.} and printed with the @command{lpr} command.
2872
2873 @kindex P f
2874 @kindex P l
2875 @kindex P p
2876 @vindex mh-lpr-command-format
2877 @vindex mh-print-background-flag
2878
2879 The command @kbd{P l} uses two options. The option
2880 @code{mh-lpr-command-format} contains the Unix command line which
2881 performs the actual printing. The string can contain one escape,
2882 @samp{%s}, which is replaced by the name of the folder and the message
2883 number and is useful for print job names. The default setting is
2884 @code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb
2885 -P"} which produces a nice header and adds a bit of margin so the text
2886 fits within my printer's margins. Normally messages are printed in the
2887 foreground. If this is slow on your system, you may elect to turn on
2888 the option @code{mh-print-background-flag} to print in the background.
2889 If you do this, do not delete the message until it is printed or else
2890 the output may be truncated. These options are not used by the
2891 commands @kbd{P p} or @kbd{P f}.
2892
2893 @node Files and Pipes, Navigating, Printing, Reading Mail
2894 @section Files and Pipes
2895
2896 @cindex files
2897 @cindex pipes
2898 @findex mh-refile-or-write-again
2899 @findex mh-write-msg-to-file
2900 @kindex >
2901 @kindex !
2902
2903 MH-E does offer a couple of commands that are not a part of MH@. The
2904 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to
2905 a file. You are prompted for the filename. If the file already exists,
2906 the message is appended to it. You can also write the message to the
2907 file without the header by specifying a prefix argument (such as
2908 @kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file
2909 can be made with the command @kbd{!}
2910 (@code{mh-refile-or-write-again}).
2911
2912 @findex mh-pipe-msg
2913 @kindex |
2914 @kindex l
2915
2916 You can also pipe the message through a Unix shell command with the
2917 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix
2918 command through which you wish to run your message. If you give a
2919 prefix argument to this command, the message header is included in the
2920 text passed to the command (the contrived example @kbd{C-u | lpr}
2921 would be done with the @kbd{l} command instead).
2922
2923 @cindex @command{shar}
2924 @cindex @command{uuencode}
2925 @cindex Unix commands, @command{shar}
2926 @cindex Unix commands, @command{uuencode}
2927 @findex mh-store-msg
2928 @kindex X s
2929 @vindex mh-store-default-directory
2930
2931 If the message is a shell archive @command{shar} or has been run
2932 through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to
2933 extract the body of the message. The default directory for extraction
2934 is the current directory; however, you have a chance to specify a
2935 different extraction directory. The next time you use this command,
2936 the default directory is the last directory you used. If you would
2937 like to change the initial default directory, customize the option
2938 @code{mh-store-default-directory}, change the value from
2939 @samp{Current} to @samp{Directory}, and then enter the name of the
2940 directory for storing the content of these messages.
2941
2942 @findex mh-store-buffer
2943 @kindex @key{RET}
2944 @kindex X s
2945
2946 By the way, @kbd{X s} calls the Emacs Lisp function
2947 @code{mh-store-buffer}. I mention this because you can use it directly
2948 if you're editing a buffer that contains a file that has been run
2949 through @command{uuencode} or @command{shar}. For example, you can
2950 extract the contents of the current buffer in your home directory by
2951 typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}.
2952
2953 @node Navigating, Miscellaneous Commands and Options, Files and Pipes, Reading Mail
2954 @section Navigating
2955
2956 @cindex moving between messages
2957 @cindex navigation
2958 @findex mh-first-msg
2959 @findex mh-goto-msg
2960 @findex mh-last-msg
2961 @findex mh-next-undeleted-msg
2962 @findex mh-next-unread-msg
2963 @findex mh-previous-undeleted-msg
2964 @findex mh-previous-unread-msg
2965 @kindex g
2966 @kindex M-<
2967 @kindex M->
2968 @kindex M-n
2969 @kindex M-p
2970 @kindex n
2971 @kindex p
2972
2973 To move on to the next message, use the command @kbd{n}
2974 (@code{mh-next-undeleted-msg}); use @kbd{p}
2975 (@code{mh-previous-undeleted-msg}) to read the previous message. To
2976 move to the next unread message, use @kbd{M-n}
2977 (@code{mh-next-unread-msg}); use @kbd{M-p}
2978 (@code{mh-previous-unread-msg}) to move to the previous unread
2979 message. These commands can be given a prefix argument to specify how
2980 many messages to skip (for example, @kbd{5 n}). You can also move to a
2981 specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the
2982 message number either before or after typing @kbd{g}. In the latter
2983 case, Emacs prompts you. Finally, you can go to the first or last
2984 message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->}
2985 (@code{mh-last-msg}) respectively.
2986
2987 @cindex MH-Folder mode
2988 @cindex modes, MH-Folder
2989 @findex next-line
2990 @findex previous-line
2991 @kindex C-n
2992 @kindex C-p
2993 @kindex @key{RET}
2994
2995 You can also use the Emacs commands @kbd{C-p} (@code{previous-line})
2996 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in
2997 the MH-Folder window. These commands can be used in conjunction with
2998 @key{RET} to look at deleted or refiled messages.
2999
3000 @cindex deleting messages
3001 @findex mh-delete-msg
3002 @kindex d
3003 @kindex n
3004 @kindex p
3005
3006 To mark a message for deletion, use the command @kbd{d}
3007 (@code{mh-delete-msg}). A @samp{D} is placed by the message in the
3008 scan window, and the next undeleted message is displayed. If the
3009 previous command had been @kbd{p}, then the next message displayed is
3010 the first undeleted message previous to the message just deleted. Use
3011 @kbd{n} to force subsequent @kbd{d} commands to move forward to the
3012 next undeleted message after deleting the message under the cursor.
3013 You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5
3014 frombob @key{RET}}, @pxref{Ranges}).
3015
3016 @findex mh-delete-msg-no-motion
3017 @kindex C-d
3018
3019 The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the
3020 message (or messages in range) for deletion but leaves the cursor at
3021 the current message in case you wish to perform other operations on
3022 the message.
3023
3024 @findex mh-delete-subject
3025 @findex mh-delete-subject-or-thread
3026 @findex mh-thread-delete
3027 @findex mh-undo
3028 @kindex k
3029 @kindex T d
3030 @kindex u
3031
3032 And to delete more messages faster, you can use @kbd{k}
3033 (@code{mh-delete-subject-or-thread}) to delete all the messages with
3034 the same subject as the current message. This command puts these
3035 messages in a sequence named @samp{subject}. You can undo this action
3036 by using @kbd{u} (@code{mh-undo}) with a prefix argument and then
3037 specifying the @samp{subject} sequence. However, if the buffer is
3038 displaying a threaded view of the folder then @kbd{k} behaves like
3039 @kbd{T d} (@code{mh-thread-delete}). @xref{Threading}.
3040
3041 @findex mh-execute-commands
3042 @kindex x
3043
3044 However you mark a message for deletion, the command @kbd{x}
3045 (@code{mh-execute-commands}) actually carries out the deletion
3046 (@pxref{Folders}).
3047
3048 @vindex mh-delete-msg-hook
3049
3050 The hook @code{mh-delete-msg-hook} is called after you mark a message
3051 for deletion. For example, a past maintainer of MH-E used this once
3052 when he kept statistics on his mail usage.
3053
3054 @node Miscellaneous Commands and Options, , Navigating, Reading Mail
3055 @section Miscellaneous Commands and Options
3056
3057 This section contains a few more miscellaneous commands and options.
3058
3059 @cindex editing message
3060 @findex mh-modify
3061 @kindex M
3062
3063 There are times when you need to edit a message. For example, you may
3064 need to fix a broken Content-Type header field. You can do this with
3065 the command @kbd{M} (@code{mh-modify}). It displays the raw message in
3066 an editable buffer. When you are done editing, save and kill the
3067 buffer as you would any other.
3068
3069 @findex mh-kill-folder
3070 @findex mh-pack-folder
3071 @vindex mh-do-not-confirm-flag
3072
3073 Commands such as @code{mh-pack-folder} prompt to confirm whether to
3074 process outstanding moves and deletes or not before continuing.
3075 Turning on the option @code{mh-do-not-confirm-flag} means that these
3076 actions will be performed---which is usually desired but cannot be
3077 retracted---without question@footnote{In previous versions of MH-E,
3078 this option suppressed the confirmation in @code{mh-kill-folder}.
3079 Since this kept most users from setting this option,
3080 @code{mh-kill-folder} was modified in version 6.0 to always ask for
3081 confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}.
3082 @xref{Folders}.}.
3083
3084 @cindex MH-Folder mode
3085 @cindex modes, MH-Folder
3086 @vindex mh-summary-height
3087
3088 The option @code{mh-summary-height} controls the number of scan lines
3089 displayed in the MH-Folder window, including the mode line. The
3090 default value of this option is @samp{Automatic} which means that the
3091 MH-Folder buffer will maintain the same proportional size if the frame
3092 is resized. If you'd prefer a fixed height, then choose the
3093 @samp{Fixed Size} option and enter the number of lines you'd like to
3094 see.
3095
3096 @vindex mh-bury-show-buffer-flag
3097
3098 Normally the buffer for displaying messages is buried at the bottom at
3099 the buffer stack. You may wish to disable this feature by turning off
3100 the option @code{mh-bury-show-buffer-flag}. One advantage of not
3101 burying the show buffer is that one can delete the show buffer more
3102 easily in an electric buffer list because of its proximity to its
3103 associated MH-Folder buffer. Try running @kbd{M-x
3104 electric-buffer-list} to see what I mean.
3105
3106 @cindex @file{.emacs}
3107 @cindex files, @file{.emacs}
3108 @cindex reading mail
3109
3110 Before we leave this section, I'll include a function that I use as a
3111 front end to MH-E@footnote{Stephen Gildea's favorite binding is
3112 @kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your
3113 working window configuration, which may be quite involved---windows
3114 filled with source, compilation output, man pages, and other
3115 documentation---and your MH-E window configuration. Like the rest of
3116 the customization described in this section, simply add the following
3117 code to @file{~/.emacs}.
3118
3119 @iftex
3120 @filbreak
3121 @end iftex
3122
3123 @findex mh-rmail, example
3124
3125 @smalllisp
3126 @group
3127 (defvar my-mh-screen-saved nil
3128 "Set to non-@code{nil} when MH-E window configuration shown.")
3129 (defvar my-normal-screen nil "Normal window configuration.")
3130 (defvar my-mh-screen nil "MH-E window configuration.")
3131
3132 (defun my-mh-rmail (&optional arg)
3133 "Toggle between MH-E and normal screen configurations.
3134 With non-@code{nil} or prefix argument, @i{inc} mailbox as well
3135 when going into mail."
3136 (interactive "P") ; @r{user callable function, P=prefix arg}
3137 (setq my-mh-screen-saved ; @r{save state}
3138 (cond
3139 ;; @r{Bring up MH-E screen if arg or normal window configuration.}
3140 ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.}
3141 ((or arg (null my-mh-screen-saved))
3142 (setq my-normal-screen (current-window-configuration))
3143 (if (or arg (null (get-buffer "+inbox")))
3144 (mh-rmail)
3145 (set-window-configuration my-mh-screen))
3146 t) ; @r{set my-mh-screen-saved to @code{t}}
3147 ;; @r{Otherwise, save MH-E screen and restore normal screen.}
3148 (t
3149 (setq my-mh-screen (current-window-configuration))
3150 (set-window-configuration my-normal-screen)
3151 nil)))) ; @r{set my-mh-screen-saved to nil}
3152
3153 (global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}}
3154
3155 @i{Starting MH-E}
3156
3157 @end group
3158 @end smalllisp
3159
3160 If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved} is
3161 @code{nil} (meaning a non-MH-E window configuration), the current
3162 window configuration is saved, either the @samp{+inbox} buffer is
3163 displayed or @code{mh-rmail} is run, and the MH-E window configuration
3164 is shown. Otherwise, the MH-E window configuration is saved and the
3165 original configuration is displayed.
3166
3167 @node Folders, Sending Mail, Reading Mail, Top
3168 @chapter Organizing Your Mail with Folders
3169
3170 @cindex @samp{Folder} menu
3171 @cindex @samp{Message} menu
3172 @cindex folders
3173 @cindex menu, @samp{Folder}
3174 @cindex menu, @samp{Message}
3175 @cindex using folders
3176
3177 This chapter discusses the things you can do with folders within MH-E.
3178 The commands in this chapter are also found in the @samp{Folder} and
3179 @samp{Message} menus.
3180
3181 @table @kbd
3182 @kindex ?
3183 @findex mh-help
3184 @item ?
3185 Display cheat sheet for the MH-E commands (@code{mh-help}).
3186 @c -------------------------
3187 @kindex !
3188 @findex mh-refile-or-write-again
3189 @item !
3190 Repeat last output command (@code{mh-refile-or-write-again}).
3191 @c -------------------------
3192 @cindex @samp{Message > Copy Message to Folder...} menu item
3193 @cindex menu item, @samp{Message > Copy Message to Folder...}
3194 @kindex c
3195 @findex mh-copy-msg
3196 @item c
3197 Copy range to folder (@code{mh-copy-msg}).
3198 @c -------------------------
3199 @kindex F ?
3200 @findex mh-prefix-help
3201 @item F ?
3202 Display cheat sheet for the commands of the current prefix in
3203 minibuffer (@code{mh-prefix-help}).
3204 @c -------------------------
3205 @kindex F '
3206 @findex mh-index-ticked-messages
3207 @item F '
3208 Display ticked messages (@code{mh-index-ticked-messages}).
3209 @c -------------------------
3210 @kindex F c
3211 @findex mh-catchup
3212 @item F c
3213 Delete range from the @samp{unseen} sequence (@code{mh-catchup}).
3214 @c -------------------------
3215 @kindex F k
3216 @findex mh-kill-folder
3217 @item F k
3218 Remove folder (@code{mh-kill-folder}).
3219 @c -------------------------
3220 @cindex @samp{Folder > List Folders} menu item
3221 @cindex menu item, @samp{Folder > List Folders}
3222 @kindex F l
3223 @findex mh-list-folders
3224 @item F l
3225 List all folders (@code{mh-list-folders}).
3226 @c -------------------------
3227 @cindex @samp{Folder > View New Messages} menu item
3228 @cindex menu item, @samp{Folder > View New Messages}
3229 @kindex F n
3230 @findex mh-index-new-messages
3231 @item F n
3232 Display unseen messages (@code{mh-index-new-messages}).
3233 @c -------------------------
3234 @cindex @samp{Folder > Pack Folder} menu item
3235 @cindex menu item, @samp{Folder > Pack Folder}
3236 @kindex F p
3237 @findex mh-pack-folder
3238 @item F p
3239 Pack folder (@code{mh-pack-folder}).
3240 @c -------------------------
3241 @kindex F q
3242 @findex mh-index-sequenced-messages
3243 @item F q
3244 Display messages in any sequence (@code{mh-index-sequenced-messages}).
3245 @c -------------------------
3246 @cindex @samp{Folder > Rescan Folder} menu item
3247 @cindex menu item, @samp{Folder > Rescan Folder}
3248 @kindex F r
3249 @findex mh-rescan-folder
3250 @item F r
3251 Rescan folder (@code{mh-rescan-folder}).
3252 @c -------------------------
3253 @cindex @samp{Folder > Search...} menu item
3254 @cindex menu item, @samp{Folder > Search...}
3255 @kindex F s
3256 @findex mh-search
3257 @item F s
3258 Search your MH mail (@code{mh-search}).
3259 @c -------------------------
3260 @cindex @samp{Folder > Sort Folder} menu item
3261 @cindex menu item, @samp{Folder > Sort Folder}
3262 @kindex F S
3263 @findex mh-sort-folder
3264 @item F S
3265 Sort folder (@code{mh-sort-folder}).
3266 @c -------------------------
3267 @kindex F u
3268 @findex mh-undo-folder
3269 @item F u
3270 Undo all refiles and deletes in the current folder (@code{mh-undo-folder}).
3271 @c -------------------------
3272 @cindex @samp{Folder > Visit a Folder...} menu item
3273 @cindex menu item, @samp{Folder > Visit a Folder...}
3274 @kindex F v
3275 @findex mh-visit-folder
3276 @item F v
3277 Visit folder (@code{mh-visit-folder}).
3278 @c -------------------------
3279 @cindex @samp{Message > Refile Message} menu item
3280 @cindex menu item, @samp{Message > Refile Message}
3281 @kindex o
3282 @findex mh-refile-msg
3283 @item o
3284 Refile (output) range into folder (@code{mh-refile-msg}).
3285 @c -------------------------
3286 @cindex @samp{Folder > Quit MH-E} menu item
3287 @cindex menu item, @samp{Folder > Quit MH-E}
3288 @kindex q
3289 @findex mh-quit
3290 @item q
3291 Quit the current MH-E folder (@code{mh-quit}).
3292 @c -------------------------
3293 @cindex @samp{Folder > Toggle Show/Folder} menu item
3294 @cindex menu item, @samp{Folder > Toggle Show/Folder}
3295 @kindex t
3296 @findex mh-toggle-showing
3297 @item t
3298 Toggle between MH-Folder and MH-Folder Show modes
3299 (@code{mh-toggle-showing}).
3300 @c -------------------------
3301 @cindex @samp{Message > Undo Delete/Refile} menu item
3302 @cindex menu item, @samp{Message > Undo Delete/Refile}
3303 @kindex u
3304 @findex mh-undo
3305 @item u
3306 Undo pending deletes or refiles in range (@code{mh-undo}).
3307 @c -------------------------
3308 @cindex @samp{Message > Execute Delete/Refile} menu item
3309 @cindex menu item, @samp{Message > Execute Delete/Refile}
3310 @kindex x
3311 @findex mh-execute-commands
3312 @item x
3313 Process outstanding delete and refile requests
3314 (@code{mh-execute-commands}).
3315 @end table
3316
3317 @cindex @samp{mh-folder} customization group
3318 @cindex customization group, @samp{mh-folder}
3319
3320 The @samp{mh-folder} customization group is used to tune these
3321 commands.
3322
3323 @vtable @code
3324 @item mh-new-messages-folders
3325 Folders searched for the @samp{unseen} sequence (default:
3326 @code{Inbox}).
3327 @c -------------------------
3328 @item mh-ticked-messages-folders
3329 Folders searched for @code{mh-tick-seq} (default: @code{t}).
3330 @c -------------------------
3331 @item mh-large-folder
3332 The number of messages that indicates a large folder (default: 200).
3333 @c -------------------------
3334 @item mh-recenter-summary-flag
3335 On means to recenter the summary window (default: @samp{off}).
3336 @c -------------------------
3337 @item mh-recursive-folders-flag
3338 On means that commands which operate on folders do so recursively
3339 (default: @samp{off}).
3340 @c -------------------------
3341 @item mh-sortm-args
3342 Additional arguments for @command{sortm} (default: @code{nil}).
3343 @end vtable
3344
3345 The following hooks are available.
3346
3347 @vtable @code
3348 @item mh-after-commands-processed-hook
3349 Hook run by @kbd{x} after performing outstanding refile and delete
3350 requests (default: @code{nil}).
3351 @c -------------------------
3352 @item mh-before-commands-processed-hook
3353 Hook run by @kbd{x} before performing outstanding refile and delete
3354 requests (default: @code{nil}).
3355 @c -------------------------
3356 @item mh-before-quit-hook
3357 Hook run by q before quitting MH-E (default: @code{nil}).
3358 @c -------------------------
3359 @item mh-folder-mode-hook
3360 Hook run by @code{mh-folder-mode} when visiting a new folder (default:
3361 @code{nil}).
3362 @c -------------------------
3363 @item mh-kill-folder-suppress-prompt-hook
3364 Abnormal hook run at the beginning of @code{mh-kill-folder} (default:
3365 @code{'mh-search-p}).
3366 @c -------------------------
3367 @item mh-quit-hook
3368 Hook run by q after quitting MH-E (default: @code{nil}).
3369 @c -------------------------
3370 @item mh-refile-msg-hook
3371 Hook run by o after marking each message for refiling (default:
3372 @code{nil}).
3373 @end vtable
3374
3375 The following faces are available for customizing the appearance of
3376 the MH-Folder buffer. @xref{Scan Line Formats}.
3377
3378 @vtable @code
3379 @item mh-folder-address
3380 Recipient face.
3381 @c -------------------------
3382 @item mh-folder-body
3383 Body text face.
3384 @c -------------------------
3385 @item mh-folder-cur-msg-number
3386 Current message number face.
3387 @c -------------------------
3388 @item mh-folder-date
3389 Date face.
3390 @c -------------------------
3391 @item mh-folder-deleted
3392 Deleted message face.
3393 @c -------------------------
3394 @item mh-folder-followup
3395 @samp{Re:} face.
3396 @c -------------------------
3397 @item mh-folder-msg-number
3398 Message number face.
3399 @c -------------------------
3400 @item mh-folder-refiled
3401 Refiled message face.
3402 @c -------------------------
3403 @vindex mh-scan-format-nmh
3404 @vindex mh-scan-sent-to-me-sender-regexp
3405 @item mh-folder-sent-to-me-hint
3406 Fontification hint face in messages sent directly to us. The detection
3407 of messages sent to us is governed by the scan format
3408 @code{mh-scan-format-nmh} and regular expression
3409 @code{mh-scan-sent-to-me-sender-regexp}.
3410 @c -------------------------
3411 @vindex mh-scan-format-nmh
3412 @vindex mh-scan-sent-to-me-sender-regexp
3413 @item mh-folder-scan-format
3414 Sender face in messages sent directly to us. The detection of messages
3415 sent to us is governed by the scan format @code{mh-scan-format-nmh}
3416 and regular expression @code{mh-scan-sent-to-me-sender-regexp}.
3417 @c -------------------------
3418 @item mh-folder-subject
3419 Subject face.
3420 @c -------------------------
3421 @item mh-folder-tick
3422 Ticked message face.
3423 @c -------------------------
3424 @item mh-folder-to
3425 @samp{To:} face.
3426 @end vtable
3427
3428 @vindex mh-folder-mode-hook
3429
3430 The hook @code{mh-folder-mode-hook} is called when visiting a new
3431 folder in MH-Folder mode. This could be used to set your own key
3432 bindings, for example:
3433
3434 @vindex mh-folder-mode-hook, example
3435
3436 @smalllisp
3437 @group
3438 (defvar my-mh-init-done nil
3439 "Non-@code{nil} when one-time MH-E settings made.")
3440
3441 (defun my-mh-folder-mode-hook ()
3442 "Hook to set key bindings in MH-Folder mode."
3443 (if (not my-mh-init-done) ; @r{only need to bind the keys once }
3444 (progn
3445 (local-set-key "//" 'my-search-msg)
3446 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}}
3447 (setq my-mh-init-done t))))
3448
3449 (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
3450
3451 (defun my-search-msg ()
3452 "Search for a regexp in the current message."
3453 (interactive) ; @r{user function}
3454 (save-window-excursion
3455 (other-window 1) ; @r{go to next window}
3456 (isearch-forward-regexp))) ; @r{string search; hit return}
3457 ; @r{ when done}
3458
3459 @i{Create additional key bindings via mh-folder-mode-hook}
3460
3461 @end group
3462 @end smalllisp
3463
3464 @cindex @command{folder}
3465 @cindex @command{refile}
3466 @cindex MH commands, @command{folder}
3467 @cindex MH commands, @command{refile}
3468 @findex mh-refile-msg
3469 @kindex o
3470 @vindex mh-refile-msg-hook
3471
3472 MH-E has analogies for each of the MH @command{folder} and
3473 @command{refile} commands@footnote{See the sections
3474 @uref{@value{MH-BOOK-HOME}/fol.htm#Youfol, Your Current Folder:
3475 folder} and @uref{@value{MH-BOOK-HOME}/fol.htm#Movref, Moving and
3476 Linking Messages: refile} in the MH book.}. To refile a message in
3477 another folder, use the command @kbd{o} (@code{mh-refile-msg})
3478 (mnemonic: ``output''). You are prompted for the folder name
3479 (@pxref{Folder Selection}). Note that this command can also be used to
3480 create folders. If you specify a folder that does not exist, you will
3481 be prompted to create it. The hook @code{mh-refile-msg-hook} is called
3482 after a message is marked to be refiled.
3483
3484 @findex mh-write-msg-to-file
3485 @kindex !
3486
3487 If you are refiling several messages into the same folder, you can use
3488 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the
3489 last refile or write (for the description of @kbd{>}
3490 (@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a
3491 range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob
3492 @key{RET}}, @pxref{Ranges}).
3493
3494 @cindex expunging refiles and deletes
3495 @cindex undoing refiles and deletes
3496 @findex mh-undo
3497 @kindex u
3498
3499 If you've deleted a message or refiled it, but changed your mind, you
3500 can cancel the action before you've executed it. Use @kbd{u}
3501 (@code{mh-undo}) to undo a refile on or deletion of a single message.
3502 You can also undo refiles and deletes for messages that are found in a
3503 given range (@pxref{Ranges}).
3504
3505 @findex mh-undo-folder
3506 @kindex F u
3507
3508 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo
3509 all refiles and deletes in the current folder.
3510
3511 @findex mh-execute-commands
3512 @kindex x
3513
3514 If you've marked messages to be deleted or refiled and you want to go
3515 ahead and delete or refile the messages, use @kbd{x}
3516 (@code{mh-execute-commands}). Many MH-E commands that may affect the
3517 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if
3518 you want to process refiles or deletes first and then either run
3519 @kbd{x} for you or undo the pending refiles and deletes.
3520
3521 @kindex x
3522 @vindex mh-after-commands-processed-hook
3523 @vindex mh-before-commands-processed-hook
3524
3525 The command @kbd{x} runs @code{mh-before-commands-processed-hook}
3526 before the commands are processed and
3527 @code{mh-after-commands-processed-hook} after the commands are
3528 processed. Variables that are useful with the former hook include
3529 @code{mh-delete-list} and @code{mh-refile-list} which can be used to
3530 see which changes will be made to the current folder,
3531 @code{mh-current-folder}. Variables that are useful with the latter
3532 hook include @code{mh-folders-changed}, which lists which folders were
3533 affected by deletes and refiles. This list will always include the
3534 current folder @code{mh-current-folder}.
3535
3536 @findex mh-copy-msg
3537 @kindex c
3538 @kindex o
3539
3540 If you wish to copy a message to another folder, you can use the
3541 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
3542 to @command{refile}(1)). Like the command @kbd{o}, this command
3543 prompts you for the name of the target folder and you can specify a
3544 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy
3545 takes place immediately. The original copy remains in the current
3546 folder.
3547
3548 @cindex junk mail
3549 @cindex MH-Folder mode
3550 @cindex MH-Folder Show mode
3551 @cindex modes, MH-Folder
3552 @cindex modes, MH-Folder Show
3553 @cindex spam
3554 @findex mh-toggle-showing
3555 @kindex t
3556
3557 The command @kbd{t} (@code{mh-toggle-showing}) switches between
3558 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
3559 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off
3560 the associated show buffer so that you can perform operations on the
3561 messages quickly without reading them. This is an excellent way to
3562 prune out your junk mail or to refile a group of messages to another
3563 folder for later examination.
3564
3565 @cindex MH-Folder mode
3566 @cindex MH-Show mode
3567 @cindex modes, MH-Folder
3568 @cindex modes, MH-Show
3569 @cindex moving between messages
3570 @kindex t
3571 @vindex mh-recenter-summary-flag
3572
3573 When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder
3574 mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
3575 alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil}
3576 value causes the toggle to display as many scan lines as possible,
3577 with the cursor at the middle. The effect of
3578 @code{mh-recenter-summary-flag} is rather useful, but it can be
3579 annoying on a slow network connection.
3580
3581 @findex mh-visit-folder
3582 @kindex F v
3583 @vindex mh-large-folder
3584
3585 When you want to read the messages that you have refiled into folders,
3586 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the
3587 folder. You are prompted for the folder name. The folder buffer will
3588 show just unseen messages if there are any; otherwise, it will show
3589 all the messages in the buffer as long there are fewer than
3590 @code{mh-large-folder} messages. If there are more, then you are
3591 prompted for a range of messages to scan. You can provide a prefix
3592 argument in order to specify a range of messages to show when you
3593 visit the folder (@pxref{Ranges}). In this case, regions are not used
3594 to specify the range and @code{mh-large-folder} is ignored. Note that
3595 this command can also be used to create folders. If you specify a
3596 folder that does not exist, you will be prompted to create it.
3597
3598 @findex mh-search
3599 @kindex F s
3600
3601 If you forget where you've refiled your messages, you can find them
3602 using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3603
3604 @cindex @command{procmail}
3605 @cindex @samp{unseen} sequence
3606 @cindex sequence, @samp{unseen}
3607 @cindex Unix commands, @command{procmail}
3608 @cindex unseen messages, viewing
3609 @findex mh-index-new-messages
3610 @kindex F n
3611 @vindex mh-new-messages-folders
3612
3613 If you use a program such as @command{procmail} to file your incoming
3614 mail automatically, you can display new, unseen, messages using the
3615 command @kbd{F n} (@code{mh-index-new-messages}). All messages in the
3616 @samp{unseen} sequence from the folders in
3617 @code{mh-new-messages-folders} are listed. However, this list of
3618 folders can be overridden with a prefix argument: with a prefix
3619 argument, enter a space-separated list of folders, or nothing to
3620 search all folders.
3621
3622 @cindex @samp{tick} sequence
3623 @cindex sequence, @samp{tick}
3624 @cindex ticked messages, viewing
3625 @findex mh-index-ticked-messages
3626 @kindex F '
3627 @vindex mh-ticked-messages-folders
3628
3629 If you have ticked messages (@pxref{Sequences}), you can display them
3630 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
3631 messages in the @samp{tick} sequence from the folders in
3632 @code{mh-ticked-messages-folders} are listed. With a prefix argument,
3633 enter a space-separated list of folders, or nothing to search all
3634 folders.
3635
3636 @findex mh-index-sequenced-messages
3637 @kindex F q
3638 @vindex mh-new-messages-folders
3639
3640 You can display messages in any sequence with the command @kbd{F q}
3641 (@code{mh-index-sequenced-messages}). All messages from the folders in
3642 @code{mh-new-messages-folders} in the sequence you provide are listed.
3643 With a prefix argument, enter a space-separated list of folders at the
3644 prompt, or nothing to search all folders.
3645
3646 @vindex mh-new-messages-folders
3647 @vindex mh-recursive-folders-flag
3648 @vindex mh-ticked-messages-folders
3649
3650 Set the options @code{mh-new-messages-folders} and
3651 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the
3652 @samp{+inbox} folder or @samp{All} to search all of the top level
3653 folders. Otherwise, list the folders that should be searched with the
3654 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
3655
3656 @cindex buffers, @samp{*MH-E Folders*}
3657 @cindex @samp{*MH-E Folders*}
3658 @findex mh-kill-folder
3659 @findex mh-list-folders
3660 @findex mh-pack-folder
3661 @findex mh-rescan-folder
3662 @findex mh-sort-folder
3663 @kindex F k
3664 @kindex F l
3665 @kindex F p
3666 @kindex F r
3667 @kindex F S
3668
3669 Other commands you can perform on folders include: @kbd{F l}
3670 (@code{mh-list-folders}), to place a listing of all the folders in
3671 your mail directory in a buffer called @samp{*MH-E Folders*}
3672 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove
3673 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by
3674 date (see @command{sortm}(1) to see how to sort by other criteria);
3675 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps
3676 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}),
3677 to rescan the folder, which is useful to grab all messages in your
3678 @samp{+inbox} after processing your new mail for the first time. If
3679 you don't want to rescan the entire folder, the commands @kbd{F r} or
3680 @kbd{F p} will accept a range (@pxref{Ranges}).
3681
3682 @kindex @key{TAB}
3683 @vindex mh-recursive-folders-flag
3684
3685 By default, operations on folders work only one level at a time. Set
3686 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
3687 folders. This mostly means that you'll be able to see all your folders
3688 when you press @key{TAB} when prompted for a folder name.
3689
3690 @findex mh-search-p
3691 @kindex k
3692 @vindex mh-kill-folder-suppress-prompt-hooks
3693
3694 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
3695 hook run at the beginning of the command @kbd{k}. The hook functions
3696 are called with no arguments and should return a non-nil value to
3697 suppress the normal prompt when you remove a folder. This is useful
3698 for folders that are easily regenerated. The default value of
3699 @code{mh-search-p} suppresses the prompt on folders generated by
3700 searching.
3701
3702 @sp 1
3703 @center @strong{NOTE}
3704
3705 @quotation
3706 Use this hook with care. If there is a bug in your hook which returns
3707 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
3708 @code{+inbox} folder, you will not be happy.
3709 @end quotation
3710 @sp 1
3711
3712 @cindex @command{sortm}
3713 @cindex @file{.mh_profile}
3714 @cindex files, @file{.mh_profile}
3715 @cindex MH commands, @command{sortm}
3716 @cindex MH profile component, @samp{sortm:}
3717 @cindex @samp{sortm:} MH profile component
3718 @kindex F S
3719 @vindex mh-sortm-args
3720
3721 The option @code{mh-sortm-args} holds extra arguments to pass on to
3722 the command @command{sortm}@footnote{See the section
3723 @uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the
3724 MH book.} when a prefix argument is used with @kbd{F S}. Normally
3725 default arguments to @command{sortm} are specified in the MH profile.
3726 This option may be used to provide an alternate view. For example,
3727 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting.
3728
3729 @cindex exiting
3730 @cindex quitting
3731 @findex mh-quit
3732 @kindex q
3733
3734 When you want to quit using MH-E and go back to editing, you can use
3735 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
3736 current MH-E folder and restores the buffers that were present when
3737 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working
3738 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E }
3739 (@pxref{Miscellaneous}). You can later restore your MH-E session by
3740 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
3741 again.
3742
3743 @findex mh-execute-commands
3744 @kindex q
3745 @vindex mh-before-quit-hook
3746 @vindex mh-before-quit-hook, example
3747 @vindex mh-quit-hook
3748 @vindex mh-quit-hook, example
3749
3750 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3751 called by @kbd{q}. The former one is called before the quit occurs, so
3752 you might use it to perform any MH-E operations; you could perform
3753 some query and abort the quit or call @code{mh-execute-commands}, for
3754 example. The latter is not run in an MH-E context, so you might use it
3755 to modify the window setup. If you find that @kbd{q} buries a lot of
3756 buffers that you would rather remove, you can use both
3757 @code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that.
3758
3759 @smalllisp
3760 @group
3761 (defvar my-mh-folder-buffer-to-delete nil
3762 "Folder buffer that is being quit.")
3763
3764 (defun my-mh-before-quit-hook ()
3765 "Save folder buffer that is to be deleted."
3766 (setq my-mh-folder-buffer-to-delete (current-buffer)))
3767
3768 (defun my-mh-quit-hook ()
3769 "Kill folder buffer rather than just bury it."
3770 (set-buffer my-mh-folder-buffer-to-delete)
3771 (if (get-buffer mh-show-buffer)
3772 (kill-buffer mh-show-buffer))
3773 (kill-buffer (current-buffer)))
3774
3775 @i{Kill MH-Folder buffer instead of burying it}
3776 @end group
3777 @end smalllisp
3778
3779 @cindex folders, renaming
3780 @cindex renaming folders
3781 @findex dired
3782 @findex dired-do-rename
3783
3784 You can use dired to manipulate the folders themselves. For example, I
3785 renamed my @samp{+out} folder to the more common @samp{+outbox} by
3786 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}),
3787 moving my cursor to @samp{out} and using the command @kbd{R}
3788 (@code{dired-do-rename}).
3789
3790 @node Sending Mail, Editing Drafts, Folders, Top
3791 @chapter Sending Mail
3792
3793 @cindex sending mail
3794 @findex mh-smail
3795 @kindex M-x mh-smail
3796
3797 You can send a mail message in several ways. You can call @kbd{M-x
3798 mh-smail} directly, or from the command line like this:
3799
3800 @cindex starting from command line
3801
3802 @smallexample
3803 $ @kbd{emacs -f mh-smail}
3804 @end smallexample
3805
3806 @findex goto-address-at-point
3807 @vindex mail-user-agent
3808
3809 There are some commands that need to send a mail message, such as
3810 @code{goto-address-at-point}. You can configure Emacs to have these
3811 commands use MH-E by setting the option @code{mail-user-agent} to
3812 @samp{Emacs interface to MH}.
3813
3814 @cindex @samp{Message} menu
3815 @cindex menu, @samp{Message}
3816
3817 From within MH-E's MH-Folder mode, other methods of sending mail are
3818 available as well. These can also be found in the @samp{Message} menu.
3819
3820 @table @kbd
3821 @cindex @samp{Message > Edit Message Again} menu item
3822 @cindex menu item, @samp{Message > Edit Message Again}
3823 @kindex e
3824 @findex mh-edit-again
3825 @item e
3826 Edit a message to send it again (@code{mh-edit-again}).
3827 @c -------------------------
3828 @cindex @samp{Message > Re-edit a Bounced Message} menu item
3829 @cindex menu item, @samp{Message > Re-edit a Bounced Message}
3830 @kindex E
3831 @findex mh-extract-rejected-mail
3832 @item E
3833 Edit a message that was returned by the mail system
3834 (@code{mh-extract-rejected-mail}).
3835 @c -------------------------
3836 @cindex @samp{Message > Forward Message...} menu item
3837 @cindex menu item, @samp{Message > Forward Message...}
3838 @kindex f
3839 @findex mh-forward
3840 @item f
3841 Forward message (@code{mh-forward}).
3842 @c -------------------------
3843 @cindex @samp{Message > Reply to Message...} menu item
3844 @cindex menu item, @samp{Message > Reply to Message...}
3845 @kindex r
3846 @findex mh-reply
3847 @item r
3848 Reply to a message (@code{mh-reply}).
3849 @c -------------------------
3850 @cindex @samp{Message > Compose a New Message} menu item
3851 @cindex menu item, @samp{Message > Compose a New Message}
3852 @kindex s
3853 @findex mh-send
3854 @item s
3855 Compose a message (@code{mh-send}).
3856 @c -------------------------
3857 @cindex @samp{Message > Redistribute Message...} menu item
3858 @cindex menu item, @samp{Message > Redistribute Message...}
3859 @kindex M-d
3860 @findex mh-redistribute
3861 @item M-d
3862 Redistribute a message (@code{mh-redistribute}).
3863 @c -------------------------
3864 @findex mh-smail
3865 @item M-x mh-smail
3866 Compose a message with the MH mail system.
3867 @c -------------------------
3868 @findex mh-smail-other-window
3869 @item M-x mh-smail-other-window
3870 Compose a message with the MH mail system in other window.
3871 @end table
3872
3873 @cindex @samp{mh-sending-mail} customization group
3874 @cindex customization group, @samp{mh-sending-mail}
3875
3876 In addition, several options from the @samp{mh-sending-mail}
3877 customization group are useful when sending mail or replying to mail.
3878 They are summarized in the following table.
3879
3880 @vtable @code
3881 @item mh-compose-forward-as-mime-flag
3882 On means that messages are forwarded as attachments (default:
3883 @samp{on}).
3884 @c -------------------------
3885 @item mh-compose-letter-function
3886 Hook run when starting a new draft (default: @code{nil}).
3887 @c -------------------------
3888 @item mh-compose-prompt-flag
3889 On means prompt for header fields when composing a new draft (default:
3890 @samp{off}).
3891 @c -------------------------
3892 @item mh-forward-subject-format
3893 Format string for forwarded message subject (default: @code{"%s:
3894 %s"}).
3895 @c -------------------------
3896 @item mh-insert-x-mailer-flag
3897 On means append an @samp{X-Mailer:} header field to the header
3898 (default: @samp{on}).
3899 @c -------------------------
3900 @item mh-redist-full-contents-flag
3901 On means the @command{dist} command needs entire letter for
3902 redistribution (default: @samp{off}).
3903 @c -------------------------
3904 @item mh-reply-default-reply-to
3905 Sets the person or persons to whom a reply will be sent (default:
3906 @samp{Prompt}).
3907 @c -------------------------
3908 @item mh-reply-show-message-flag
3909 On means the MH-Show buffer is displayed using @kbd{r}
3910 (@code{mh-reply}) (default: @samp{on}).
3911 @end vtable
3912
3913 The following hooks are available.
3914
3915 @vtable @code
3916 @item mh-forward-hook
3917 Hook run by @code{mh-forward} on a forwarded letter (default:
3918 @code{nil}).
3919 @c -------------------------
3920 @item mh-letter-mode-hook
3921 Hook run by @code{mh-letter-mode} on a new letter (default:
3922 @code{nil}).
3923 @end vtable
3924
3925 The functions and options introduced here are explained in more detail
3926 in the following sections.
3927
3928 @menu
3929 * Composing::
3930 * Replying::
3931 * Forwarding::
3932 * Redistributing::
3933 * Editing Again::
3934 @end menu
3935
3936 @node Composing, Replying, Sending Mail, Sending Mail
3937 @section Composing
3938
3939 @cindex @file{.emacs}
3940 @cindex MH-Folder mode
3941 @cindex composing mail
3942 @cindex draft
3943 @cindex files, @file{.emacs}
3944 @cindex modes, MH-Folder
3945 @cindex sending mail
3946 @findex mh-smail
3947 @findex mh-smail-other-window
3948 @kindex M-x mh-smail
3949 @kindex M-x mh-smail-other-window
3950
3951 Outside of an MH-Folder buffer, you must call either @kbd{M-x
3952 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
3953 The former command always creates a two-window layout with the current
3954 buffer on top and the draft on the bottom. Use the latter command if
3955 you would rather preserve the window layout. You may find adding the
3956 following key bindings to @file{~/.emacs} useful:
3957
3958 @smalllisp
3959 (global-set-key "\C-xm" 'mh-smail)
3960 (global-set-key "\C-x4m" 'mh-smail-other-window)
3961 @end smalllisp
3962
3963 @cindex draft folder
3964 @cindex MH-Letter mode
3965 @cindex modes, MH-Letter
3966 @findex mh-send
3967 @kindex m
3968
3969 From within a MH-Folder buffer, you can simply use the command @kbd{m}
3970 (@code{mh-send}). However you invoke @code{mh-send}, your letter
3971 appears in an Emacs buffer whose mode is MH-Letter (to see what the
3972 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows
3973 you to edit your message, to check the validity of the recipients, to
3974 insert attachments and other messages into your message, and to send
3975 the message. We'll go more into depth about editing a
3976 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft
3977 folder} so that you can edit several drafts in parallel. To do so,
3978 create a folder named @samp{+drafts} for example, and add the profile
3979 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a
3980 message you're composing) in just a moment (@pxref{Editing Drafts}).
3981
3982 @vindex mh-compose-prompt-flag
3983
3984 If you prefer to be prompted for the recipient and subject fields
3985 before the MH-Letter buffer appears, turn on the option
3986 @code{mh-compose-prompt-flag}.
3987
3988 @cindex header field, @samp{X-Mailer:}
3989 @cindex @samp{X-Mailer:} header field
3990 @vindex mh-insert-x-mailer-flag
3991
3992 MH-E adds an @samp{X-Mailer:} header field to the header that includes
3993 the version of MH-E and Emacs that you are using. If you don't want to
3994 participate in our marketing, you can turn off the option
3995 @code{mh-insert-x-mailer-flag}.
3996
3997 @cindex @command{repl}
3998 @cindex @file{components}
3999 @cindex MH commands, @command{repl}
4000 @cindex MH-Letter mode
4001 @cindex Mail mode
4002 @cindex files, @file{components}
4003 @cindex modes, MH-Letter
4004 @cindex modes, Mail
4005 @vindex mail-mode-hook
4006 @vindex mh-letter-mode-hook
4007 @vindex text-mode-hook
4008
4009 Two hooks are provided to run commands on your freshly created draft.
4010 The first hook, @code{mh-letter-mode-hook}, allows you to do some
4011 processing before editing a letter@footnote{Actually, because
4012 MH-Letter mode inherits from Mail mode, the hooks
4013 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that
4014 order) before @code{mh-letter-mode-hook}.}. For example, you may wish
4015 to modify the header after @command{repl} has done its work, or you
4016 may have a complicated @file{components} file and need to tell MH-E
4017 where the cursor should go. Here's an example of how you would use
4018 this hook.
4019
4020 @findex mh-insert-signature, example
4021
4022 @smalllisp
4023 @group
4024 (defvar letter-mode-init-done-flag nil
4025 "Non-nil means one-time MH-E settings have been made.")
4026
4027 (defun my-mh-letter-mode-hook ()
4028 "Prepare letter for editing."
4029 (when (not letter-mode-init-done) ; @r{only need to bind the keys once}
4030 (local-set-key "\C-ctb" 'add-enriched-text)
4031 (local-set-key "\C-cti" 'add-enriched-text)
4032 (local-set-key "\C-ctf" 'add-enriched-text)
4033 (local-set-key "\C-cts" 'add-enriched-text)
4034 (local-set-key "\C-ctB" 'add-enriched-text)
4035 (local-set-key "\C-ctu" 'add-enriched-text)
4036 (local-set-key "\C-ctc" 'add-enriched-text)
4037 (setq letter-mode-init-done t))
4038 (save-excursion
4039 (goto-char (point-max)) ; @r{go to end of message to}
4040 (mh-insert-signature))) ; @r{insert signature}
4041
4042 @i{Prepare draft for editing via mh-letter-mode-hook}
4043
4044 @end group
4045 @end smalllisp
4046
4047 The function, @code{add-enriched-text} is defined in the example in
4048 @ref{Adding Attachments}.
4049
4050 @vindex mh-compose-letter-function
4051 @vindex mh-letter-mode-hook
4052
4053 The second hook, a function really, is
4054 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
4055 is called just before editing a new message; however, it is the last
4056 function called before you edit your message. The consequence of this
4057 is that you can write a function to write and send the message for
4058 you. This function is passed three arguments: the contents of the
4059 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields.
4060
4061 @node Replying, Forwarding, Composing, Sending Mail
4062 @section Replying to Mail
4063
4064 @cindex @command{mhl}
4065 @cindex @file{mhl.reply}
4066 @cindex MH commands, @command{mhl}
4067 @cindex files, @file{mhl.reply}
4068 @cindex replying
4069 @findex mh-reply
4070 @kindex r
4071
4072 To compose a reply to a message, use the @kbd{r} (@code{mh-reply})
4073 command.
4074
4075 When you reply to a message, you are first prompted with @samp{Reply
4076 to whom?}. You have several choices here.
4077
4078 @quotation
4079 @multitable @columnfractions .20 .80
4080 @c @headitem Response @tab Reply Goes To
4081 @c XXX @headitem not yet supported by SourceForge's texi2pdf.
4082 @item @b{Response} @tab @b{Reply Goes To}
4083 @c -------------------------
4084 @item @kbd{from}
4085 @tab
4086 The person who sent the message. This is the default, so @key{RET} is
4087 sufficient.
4088 @c -------------------------
4089 @item @kbd{to}
4090 @tab
4091 Replies to the sender, plus all recipients in the @samp{To:} header field.
4092 @c -------------------------
4093 @item @kbd{cc}@*@kbd{all}
4094 @tab
4095 Forms a reply to the addresses in the @samp{Mail-Followup-To:} header
4096 field if one exists; otherwise forms a reply to the sender, plus all
4097 recipients.
4098 @end multitable
4099 @end quotation
4100
4101 @cindex @command{repl}
4102 @cindex MH commands, @command{repl}
4103 @vindex mh-reply-default-reply-to
4104
4105 Depending on your answer, @command{repl}@footnote{See the section
4106 @uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
4107 the MH book.} is given a different argument to form your reply.
4108 Specifically, a choice of @kbd{from} or none at all runs @samp{repl
4109 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
4110 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you
4111 find that most of the time you specify one of these choices when you
4112 reply to a message, you can change the option
4113 @code{mh-reply-default-reply-to} from its default value of
4114 @samp{Prompt} to one of the choices listed above. You can always edit
4115 the recipients in the draft.
4116
4117 @cindex @samp{repl:} MH profile component
4118 @cindex MH profile component, @samp{repl:}
4119 @cindex MH-Letter mode
4120 @cindex MH-Show mode
4121 @cindex draft
4122 @cindex modes, MH-Letter
4123 @cindex modes, MH-Show
4124
4125 Two windows are then created. One window contains the message to which
4126 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
4127 (@pxref{Editing Drafts}), is in the other window. If the reply draft
4128 was not one that you expected, check the things that affect the
4129 behavior of @command{repl} which include the @samp{repl:} profile
4130 component and the @file{replcomps} and @file{replgroupcomps} files.
4131
4132 If you supply a prefix argument (as in @kbd{C-u r}), the message you
4133 are replying to is inserted in your reply after having first been run
4134 through @command{mhl} with the format file @file{mhl.reply}. See
4135 @command{mhl}(1) or the section
4136 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
4137 book to see how you can modify the default @file{mhl.reply} file.
4138
4139 @vindex mh-yank-behavior
4140
4141 Alternatively, you can customize the option @code{mh-yank-behavior}
4142 and choose one of its @samp{Automatically} variants to do the same
4143 thing. @xref{Inserting Letter}. If you do so, the prefix argument has
4144 no effect.
4145
4146 Another way to include the message automatically in your draft is to
4147 use @samp{repl: -filter repl.filter} in your MH profile.
4148
4149 @vindex mh-reply-show-message-flag
4150
4151 If you include the message automatically, you can hide the MH-Show
4152 buffer by turning off the option @code{mh-reply-show-message-flag}.
4153
4154 If you wish to customize the header or other parts of the reply draft,
4155 please see @command{repl}(1) and @code{mh-format}(5).
4156
4157 @node Forwarding, Redistributing, Replying, Sending Mail
4158 @section Forwarding Mail
4159
4160 @cindex @command{forw}
4161 @cindex draft
4162 @cindex forwarding
4163 @cindex MH commands, @command{forw}
4164 @findex mh-forward
4165 @kindex f
4166 @vindex mh-forward-hook
4167
4168 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
4169 are prompted for the @samp{To:} and @samp{cc:} recipients. You are
4170 given a draft to edit that looks like it would if you had run the MH
4171 command @command{forw}@footnote{See the section
4172 @uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in
4173 the MH book.}. You can then add some text (@pxref{Editing Drafts}).
4174 You can forward several messages by using a range (@pxref{Ranges}).
4175 All of the messages in the range are inserted into your draft. The
4176 hook @code{mh-forward-hook} is called on the draft.
4177
4178 @cindex @file{.mh_profile}
4179 @cindex files, @file{.mh_profile}
4180 @cindex MH profile component, @samp{forw:}
4181 @cindex @samp{forw:} MH profile component
4182 @vindex mh-compose-forward-as-mime-flag
4183
4184 By default, the option @code{mh-compose-forward-as-mime-flag} is on
4185 which means that the forwarded messages are included as attachments.
4186 If you would prefer to forward your messages verbatim (as text,
4187 inline), then turn off this option. Forwarding messages verbatim works
4188 well for short, textual messages, but your recipient won't be able to
4189 view any non-textual attachments that were in the forwarded message.
4190 Be aware that if you have @samp{forw: -mime} in your MH profile, then
4191 forwarded messages will always be included as attachments regardless
4192 of the settings of @code{mh-compose-forward-as-mime-flag}.
4193
4194 @vindex mh-forward-subject-format
4195
4196 The format of the @samp{Subject:} header field for forwarded messages
4197 is controlled by the option @code{mh-forward-subject-format}. This
4198 option is a string which includes two escapes (@samp{%s}). The first
4199 @samp{%s} is replaced with the sender of the original message, and the
4200 second one is replaced with the original @samp{Subject:}. The default
4201 value of @code{"%s: %s"} takes a message with the header:
4202
4203 @smallexample
4204 @group
4205 To: Bill Wohler <wohler@@stop.mail-abuse.org>
4206 Subject: Re: 49er football
4207 From: Greg DesBrisay <gd@@stop.mail-abuse.org>
4208 @end group
4209 @end smallexample
4210
4211 and creates a subject header field of:
4212
4213 @smallexample
4214 Subject: Greg DesBrisay: Re: 49er football
4215 @end smallexample
4216
4217 @node Redistributing, Editing Again, Forwarding, Sending Mail
4218 @section Redistributing Your Mail
4219
4220 @cindex @command{dist}
4221 @cindex MH commands, @command{dist}
4222 @cindex redistributing
4223 @findex mh-redistribute
4224 @kindex M-d
4225
4226 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function
4227 to forwarding mail, but it does not allow you to edit the message, nor
4228 does it add your name to the @samp{From:} header field. It appears to
4229 the recipient as if the message had come from the original sender.
4230 When you run this command, you are prompted for the recipients.
4231
4232 @findex mh-edit-again
4233 @kindex e
4234
4235 For more information on redistributing messages, see
4236 @command{dist}(1). Also investigate the command @kbd{e}
4237 (@code{mh-edit-again}) for another way to redistribute messages
4238 (@pxref{Editing Again}).
4239
4240 @cindex @command{send}
4241 @cindex MH commands, @command{send}
4242 @vindex mh-redist-full-contents-flag
4243
4244 The option @code{mh-redist-full-contents-flag} must be turned on if
4245 @command{dist}@footnote{See the section
4246 @uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with
4247 dist} in the MH book.} requires the whole letter for redistribution,
4248 which is the case if @command{send}@footnote{See the section
4249 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
4250 in the MH book.} is compiled with the @sc{berk} option (which many
4251 people abhor). If you find that MH will not allow you to redistribute
4252 a message that has been redistributed before, turn off this option.
4253
4254 @node Editing Again, , Redistributing, Sending Mail
4255 @section Editing Old Drafts and Bounced Messages
4256
4257 @cindex @file{draft}
4258 @cindex files, @file{draft}
4259 @cindex re-editing drafts
4260 @findex mh-edit-again
4261 @kindex F v drafts
4262 @kindex e
4263 @kindex n
4264
4265 If you don't complete a draft for one reason or another, and if the
4266 draft buffer is no longer available, you can pick your draft up again
4267 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft
4268 folder, your last @file{draft} file will be used. If you use draft
4269 folders, you'll need to visit the draft folder with @kbd{F v drafts
4270 @key{RET}}, use @kbd{n} to move to the appropriate message, and then
4271 use @kbd{e} to prepare the message for editing.
4272
4273 @kindex e
4274
4275 The @kbd{e} command can also be used to take messages that were sent
4276 to you and to send them to more people.
4277
4278 @cindex Mailer-Daemon
4279 @findex mh-extract-rejected-mail
4280 @kindex C-c C-c
4281 @kindex E
4282
4283 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
4284 complained that your mail wasn't posted for some reason or another. In
4285 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare
4286 the message for editing by removing the @i{Mailer-Daemon} envelope and
4287 unneeded header fields. Fix whatever addressing problem you had, and
4288 send the message again with @kbd{C-c C-c}.
4289
4290 @node Editing Drafts, Aliases, Sending Mail, Top
4291 @chapter Editing a Draft
4292
4293 @cindex @samp{Letter} menu
4294 @cindex MH-Letter mode
4295 @cindex draft
4296 @cindex editing draft
4297 @cindex menu, @samp{Letter}
4298 @cindex modes, MH-Letter
4299
4300 When you edit a message that you want to send (called a @dfn{draft} in
4301 this case), the mode used is MH-Letter. This mode provides several
4302 commands in addition to the normal Emacs editing commands to help you
4303 edit your draft. These can also be found in the @samp{Letter} menu.
4304
4305 @table @kbd
4306 @kindex @key{SPC}
4307 @findex mh-letter-complete-or-space
4308 @item @key{SPC}
4309 Perform completion or insert space (@code{mh-letter-complete-or-space}).
4310 @c -------------------------
4311 @kindex M-@key{TAB}
4312 @findex mh-letter-complete
4313 @item M-@key{TAB}
4314 Perform completion on header field or word preceding point
4315 (@code{mh-letter-complete}).
4316 @c -------------------------
4317 @kindex , (comma)
4318 @findex mh-letter-confirm-address
4319 @item , (comma)
4320 Flash alias expansion (@code{mh-letter-confirm-address}).
4321 @c -------------------------
4322 @kindex @key{TAB}
4323 @findex mh-letter-next-header-field-or-indent
4324 @item @key{TAB}
4325 Cycle to next field (@code{mh-letter-next-header-field-or-indent}).
4326 @c -------------------------
4327 @kindex S-@key{TAB}
4328 @findex mh-letter-previous-header-field
4329 @item S-@key{TAB}
4330 Cycle to the previous header field
4331 (@code{mh-letter-previous-header-field}).
4332 @c -------------------------
4333 @kindex C-c ?
4334 @findex mh-help
4335 @item C-c ?
4336 Display cheat sheet for the MH-E commands (@code{mh-help}).
4337 @c -------------------------
4338 @cindex @samp{Letter > Send This Draft} menu item
4339 @cindex menu item, @samp{Letter > Send This Draft}
4340 @kindex C-c C-c
4341 @findex mh-send-letter
4342 @item C-c C-c
4343 Save draft and send message (@code{mh-send-letter}).
4344 @c -------------------------
4345 @kindex C-c C-d
4346 @findex mh-insert-identity
4347 @item C-c C-d
4348 Insert fields specified by the given identity
4349 (@code{mh-insert-identity}). @xref{Identities}.
4350 @c -------------------------
4351 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item
4352 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)}
4353 @kindex C-c C-e
4354 @findex mh-mh-to-mime
4355 @item C-c C-e
4356 Compose @sc{mime} message from MH-style directives
4357 (@code{mh-mh-to-mime}).
4358 @c -------------------------
4359 @kindex C-c C-f C-a
4360 @kindex C-c C-f a
4361 @findex mh-to-field
4362 @item C-c C-f C-a
4363 @itemx C-c C-f a
4364 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
4365 @c -------------------------
4366 @kindex C-c C-f C-b
4367 @kindex C-c C-f b
4368 @item C-c C-f C-b
4369 @itemx C-c C-f b
4370 Move to @samp{Bcc:} header field (@code{mh-to-field}).
4371 @c -------------------------
4372 @kindex C-c C-f C-c
4373 @kindex C-c C-f c
4374 @item C-c C-f C-c
4375 @itemx C-c C-f c
4376 Move to @samp{Cc:} header field (@code{mh-to-field}).
4377 @c -------------------------
4378 @kindex C-c C-f C-d
4379 @kindex C-c C-f d
4380 @item C-c C-f C-d
4381 @itemx C-c C-f d
4382 Move to @samp{Dcc:} header field (@code{mh-to-field}).
4383 @c -------------------------
4384 @kindex C-c C-f C-f
4385 @kindex C-c C-f f
4386 @findex mh-to-fcc
4387 @item C-c C-f C-f
4388 @itemx C-c C-f f
4389 Move to @samp{Fcc:} header field (@code{mh-to-fcc}).
4390 @c -------------------------
4391 @kindex C-c C-f C-l
4392 @kindex C-c C-f l
4393 @item C-c C-f C-l
4394 @itemx C-c C-f l
4395 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
4396 @c -------------------------
4397 @kindex C-c C-f C-m
4398 @kindex C-c C-f m
4399 @item C-c C-f C-m
4400 @itemx C-c C-f m
4401 Move to @samp{From:} header field (@code{mh-to-field}).
4402 @c -------------------------
4403 @kindex C-c C-f C-r
4404 @kindex C-c C-f r
4405 @item C-c C-f C-r
4406 @itemx C-c C-f r
4407 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
4408 @c -------------------------
4409 @kindex C-c C-f C-s
4410 @kindex C-c C-f s
4411 @item C-c C-f C-s
4412 @itemx C-c C-f s
4413 Move to @samp{Subject:} header field (@code{mh-to-field}).
4414 @c -------------------------
4415 @kindex C-c C-f C-t
4416 @kindex C-c C-f t
4417 @item C-c C-f C-t
4418 @itemx C-c C-f t
4419 Move to @samp{To:} header field (@code{mh-to-field}).
4420 @c -------------------------
4421 @cindex @samp{Letter > Insert a Message...} menu item
4422 @cindex menu item, @samp{Letter > Insert a Message...}
4423 @kindex C-c C-i
4424 @findex mh-insert-letter
4425 @item C-c C-i
4426 Insert a message (@code{mh-insert-letter}).
4427 @c -------------------------
4428 @kindex C-c C-m C-e
4429 @findex mh-mml-secure-message-encrypt
4430 @item C-c C-m C-e
4431 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4432 @c -------------------------
4433 @cindex @samp{Letter > Compose Forward...} menu item
4434 @cindex menu item, @samp{Letter > Compose Forward...}
4435 @kindex C-c C-m C-f
4436 @kindex C-c C-m f
4437 @findex mh-compose-forward
4438 @item C-c C-m C-f
4439 @itemx C-c C-m f
4440 Add tag to forward a message (@code{mh-compose-forward}).
4441 @c -------------------------
4442 @cindex @samp{Letter > Compose Get File (MH)...} menu item
4443 @cindex menu item, @samp{Letter > Compose Get File (MH)...}
4444 @kindex C-c C-m C-g
4445 @kindex C-c C-m g
4446 @findex mh-mh-compose-anon-ftp
4447 @item C-c C-m C-g
4448 @itemx C-c C-m g
4449 Add tag to include anonymous ftp reference to a file
4450 (@code{mh-mh-compose-anon-ftp}).
4451 @c -------------------------
4452 @cindex @samp{Letter > Compose Insertion...} menu item
4453 @cindex menu item, @samp{Letter > Compose Insertion...}
4454 @kindex C-c C-m C-i
4455 @kindex C-c C-m i
4456 @findex mh-compose-insertion
4457 @item C-c C-m C-i
4458 @itemx C-c C-m i
4459 Add tag to include a file such as an image or sound
4460 (@code{mh-compose-insertion}).
4461 @c -------------------------
4462 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item
4463 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)}
4464 @kindex C-c C-m C-m
4465 @kindex C-c C-m m
4466 @findex mh-mml-to-mime
4467 @item C-c C-m C-m
4468 @itemx C-c C-m m
4469 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}).
4470 @c -------------------------
4471 @kindex C-c C-m C-n
4472 @kindex C-c C-m n
4473 @findex mh-mml-unsecure-message
4474 @item C-c C-m C-n
4475 @itemx C-c C-m n
4476 Remove any secure message tags (@code{mh-mml-unsecure-message}).
4477 @c -------------------------
4478 @kindex C-c C-m C-s
4479 @findex mh-mml-secure-message-sign
4480 @item C-c C-m C-s
4481 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4482 @c -------------------------
4483 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item
4484 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...}
4485 @kindex C-c C-m C-t
4486 @kindex C-c C-m t
4487 @findex mh-mh-compose-external-compressed-tar
4488 @item C-c C-m C-t
4489 @itemx C-c C-m t
4490 Add tag to include anonymous ftp reference to a compressed tar file
4491 (@code{mh-mh-compose-external-compressed-tar}).
4492 @c -------------------------
4493 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item
4494 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)}
4495 @kindex C-c C-m C-u
4496 @kindex C-c C-m u
4497 @findex mh-mh-to-mime-undo
4498 @item C-c C-m C-u
4499 @itemx C-c C-m u
4500 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}).
4501 @c -------------------------
4502 @kindex C-c C-m C-x
4503 @kindex C-c C-m x
4504 @findex mh-mh-compose-external-type
4505 @item C-c C-m C-x
4506 @itemx C-c C-m x
4507 Add tag to refer to a remote file
4508 (@code{mh-mh-compose-external-type}).
4509 @c -------------------------
4510 @kindex C-c C-m e e
4511 @findex mh-mml-secure-message-encrypt
4512 @item C-c C-m e e
4513 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4514 @c -------------------------
4515 @kindex C-c C-m e s
4516 @findex mh-mml-secure-message-signencrypt
4517 @item C-c C-m e s
4518 Add tag to encrypt and sign the message@*
4519 (@code{mh-mml-secure-message-signencrypt}).
4520 @c -------------------------
4521 @kindex C-c C-m s e
4522 @findex mh-mml-secure-message-signencrypt
4523 @item C-c C-m s e
4524 Add tag to encrypt and sign the message@*
4525 (@code{mh-mml-secure-message-signencrypt}).
4526 @c -------------------------
4527 @kindex C-c C-m s s
4528 @findex mh-mml-secure-message-sign
4529 @item C-c C-m s s
4530 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4531 @c -------------------------
4532 @cindex @samp{Letter > Split Current Line} menu item
4533 @cindex menu item, @samp{Letter > Split Current Line}
4534 @kindex C-c C-o
4535 @findex mh-open-line
4536 @item C-c C-o
4537 Insert a newline and leave point before it (@code{mh-open-line}).
4538 @c -------------------------
4539 @cindex @samp{Letter > Kill This Draft} menu item
4540 @cindex menu item, @samp{Letter > Kill This Draft}
4541 @kindex C-c C-q
4542 @findex mh-fully-kill-draft
4543 @item C-c C-q
4544 Quit editing and delete draft message (@code{mh-fully-kill-draft}).
4545 @c -------------------------
4546 @cindex @samp{Letter > Insert Signature} menu item
4547 @cindex menu item, @samp{Letter > Insert Signature}
4548 @kindex C-c C-s
4549 @findex mh-insert-signature
4550 @item C-c C-s
4551 Insert signature in message (@code{mh-insert-signature}).
4552 @c -------------------------
4553 @kindex C-c C-t
4554 @findex mh-letter-toggle-header-field-display
4555 @item C-c C-t
4556 Toggle display of header field at point
4557 (@code{mh-letter-toggle-header-field-display}).
4558 @c -------------------------
4559 @cindex @samp{Letter > Check Recipient} menu item
4560 @cindex menu item, @samp{Letter > Check Recipient}
4561 @kindex C-c C-w
4562 @findex mh-check-whom
4563 @item C-c C-w
4564 Verify recipients, showing expansion of any aliases
4565 (@code{mh-check-whom}).
4566 @c -------------------------
4567 @cindex @samp{Letter > Yank Current Message} menu item
4568 @cindex menu item, @samp{Letter > Yank Current Message}
4569 @kindex C-c C-y
4570 @findex mh-yank-cur-msg
4571 @item C-c C-y
4572 Insert the current message into the draft buffer
4573 (@code{mh-yank-cur-msg}).
4574 @c -------------------------
4575 @kindex C-c M-d
4576 @findex mh-insert-auto-fields
4577 @item C-c M-d
4578 Insert custom fields if recipient is found in
4579 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}).
4580 @xref{Identities}.
4581 @end table
4582
4583 @cindex @samp{mh-letter} customization group
4584 @cindex customization group, @samp{mh-letter}
4585
4586 Several options from the @samp{mh-letter} customization group are used
4587 while editing a draft.
4588
4589 @vtable @code
4590 @item mh-compose-insertion
4591 Type of @sc{mime} message tags in messages (default: @samp{MML} if
4592 available; otherwise @samp{MH}).
4593 @c -------------------------
4594 @item mh-compose-skipped-header-fields
4595 List of header fields to skip over when navigating in draft (default:
4596 @code{'("From"} @code{"Organization"} @code{"References"}
4597 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"}
4598 @code{"X-Image-URL"} @code{"X-Mailer")}.
4599 @c -------------------------
4600 @item mh-compose-space-does-completion-flag
4601 On means @key{SPC} does completion in message header (default:
4602 @samp{off}).
4603 @c -------------------------
4604 @item mh-delete-yanked-msg-window-flag
4605 On means delete any window displaying the message (default: @samp{off}).
4606 @c -------------------------
4607 @item mh-extract-from-attribution-verb
4608 Verb to use for attribution when a message is yanked by @kbd{C-c C-y}
4609 (default: @code{"wrote:"}).
4610 @c -------------------------
4611 @item mh-ins-buf-prefix
4612 String to put before each line of a yanked or inserted message
4613 (default: @code{"> "}).
4614 @c -------------------------
4615 @item mh-letter-complete-function
4616 Function to call when completing outside of address or folder fields
4617 (default: @code{ispell-complete-word}).
4618 @c -------------------------
4619 @item mh-letter-fill-column
4620 Fill column to use in MH-Letter mode (default: 72).
4621 @c -------------------------
4622 @item mh-mml-method-default
4623 Default method to use in security tags (default: @samp{PGP (MIME)} if
4624 support for it is available; otherwise @samp{None}).
4625 @c -------------------------
4626 @item mh-signature-file-name
4627 Source of user's signature (default: @code{"~/.signature"}).
4628 @c -------------------------
4629 @item mh-signature-separator-flag
4630 On means a signature separator should be inserted (default:
4631 @samp{on}).
4632 @c -------------------------
4633 @item mh-x-face-file
4634 File containing X-Face or Face header field to insert in outgoing mail.
4635 (default: @code{"~/.face"}).
4636 @c -------------------------
4637 @item mh-yank-behavior
4638 Controls which part of a message is yanked by @kbd{C-c C-y} (default:
4639 @samp{Body With Attribution}).
4640 @end vtable
4641
4642 The following hooks are available.
4643
4644 @vtable @code
4645 @item mail-citation-hook
4646 Hook for modifying a citation just inserted in the mail buffer
4647 (default: @code{nil}).
4648 @c -------------------------
4649 @item mh-before-send-letter-hook
4650 Hook run at the beginning of the @kbd{C-c C-c} command (default:
4651 @samp{nil}).
4652 @c -------------------------
4653 @item mh-mh-to-mime-hook
4654 Hook run on the formatted letter by @kbd{C-c C-e} (default:
4655 @samp{nil}).
4656 @c -------------------------
4657 @item mh-insert-signature-hook
4658 Hook run by @kbd{C-c C-s} after signature has been inserted (default:
4659 @code{nil}).
4660 @end vtable
4661
4662 The following face is available.
4663
4664 @vtable @code
4665 @item mh-letter-header-field
4666 Editable header field value face in draft buffers.
4667 @end vtable
4668
4669 The commands and options introduced here are explained in more
4670 detail in the following sections.
4671
4672 @menu
4673 * Editing Message::
4674 * Inserting Letter::
4675 * Inserting Messages::
4676 * Signature::
4677 * Picture::
4678 * Adding Attachments::
4679 * Sending PGP::
4680 * Checking Recipients::
4681 * Sending Message::
4682 * Killing Draft::
4683 @end menu
4684
4685 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts
4686 @section Editing the Message
4687
4688 @cindex @samp{Bcc:} header field
4689 @cindex @samp{Cc:} header field
4690 @cindex @samp{Dcc:} header field
4691 @cindex @samp{From:} header field
4692 @cindex @samp{Mail-Followup-To:} header field
4693 @cindex @samp{Mail-Reply-To:} header field
4694 @cindex @samp{Reply-To:} header field
4695 @cindex @samp{Subject:} header field
4696 @cindex @samp{To:} header field
4697 @cindex editing header
4698 @cindex header field, @samp{Bcc:}
4699 @cindex header field, @samp{Cc:}
4700 @cindex header field, @samp{Dcc:}
4701 @cindex header field, @samp{From:}
4702 @cindex header field, @samp{Mail-Followup-To:}
4703 @cindex header field, @samp{Mail-Reply-To:}
4704 @cindex header field, @samp{Reply-To:}
4705 @cindex header field, @samp{Subject:}
4706 @cindex header field, @samp{To:}
4707 @findex mh-to-field
4708 @kindex C-c C-f C-t
4709 @kindex C-c C-f t
4710
4711 Because the header is part of the message, you can edit the header
4712 fields as you wish. However, several convenience commands exist to
4713 help you create and edit them. For example, the command @kbd{C-c C-f
4714 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the
4715 cursor to the @samp{To:} header field, creating it if necessary. The
4716 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:},
4717 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To},
4718 @samp{Bcc:}, and @samp{Dcc:} header fields are similar.
4719
4720 @findex mh-to-fcc
4721 @kindex C-c C-f C-f
4722 @kindex C-c C-f f
4723
4724 One command behaves differently from the others, namely, @kbd{C-c C-f
4725 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command
4726 will prompt you for the folder name in which to file a copy of the
4727 draft. @xref{Folder Selection}.
4728
4729 @findex indent-relative
4730 @findex mh-letter-next-header-field-or-indent
4731 @findex mh-letter-previous-header-field
4732 @kindex @key{TAB}
4733 @kindex S-@key{TAB}
4734 @vindex mh-compose-skipped-header-fields
4735 @vindex mh-letter-header-field
4736
4737 Within the header of the message, the command@* @key{TAB}
4738 (@code{mh-letter-next-header-field-or-indent}) moves between fields
4739 that are highlighted with the face @code{mh-letter-header-field},
4740 skipping those fields listed in
4741 @code{mh-compose-skipped-header-fields}. After the last field, this
4742 command then moves point to the message body before cycling back to
4743 the first field. If point is already past the first line of the
4744 message body, then this command indents by calling
4745 @code{indent-relative} with the given prefix argument. The command
4746 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves
4747 backwards between the fields and cycles to the body of the message
4748 after the first field. Unlike the command @key{TAB}, it will always
4749 take point to the last field from anywhere in the body.
4750
4751 @cindex alias completion
4752 @cindex completion
4753 @cindex spell check
4754 @findex ispell-complete-word
4755 @findex mh-letter-complete
4756 @findex mh-letter-complete-or-space
4757 @findex mh-letter-confirm-address
4758 @kindex , (comma)
4759 @kindex @key{SPC}
4760 @kindex M-@key{TAB}
4761 @vindex mh-alias-flash-on-comma
4762 @vindex mh-compose-space-does-completion-flag
4763 @vindex mh-letter-complete-function
4764
4765 If the field contains addresses (for example, @samp{To:} or
4766 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command
4767 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias
4768 completion (@pxref{Aliases}). In the body of the message,
4769 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead,
4770 which is set to @samp{'ispell-complete-word} by default. The command
4771 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument
4772 that is passed to the @code{mh-letter-complete-function}. In addition,
4773 turn on the option @code{mh-compose-space-does-completion-flag} to use
4774 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform
4775 completion in the header as well; use a prefix argument to specify
4776 more than one space. Addresses are separated by a comma; when you
4777 press the comma, the command @code{mh-letter-confirm-address} flashes
4778 the alias expansion in the minibuffer if
4779 @code{mh-alias-flash-on-comma} is turned on.
4780
4781 @c XXX Document the replacement for the inaccessible 'long argument.
4782
4783 @findex mh-letter-toggle-header-field-display
4784 @kindex C-c C-t
4785
4786 Use the command @kbd{C-c C-t}
4787 @code{mh-letter-toggle-header-field-display} to display truncated
4788 header fields. This command is a toggle so entering it again will hide
4789 the field. This command takes a prefix argument: if negative then the
4790 field is hidden, if positive then the field is displayed (for example,
4791 @kbd{C-u C-c C-t}).
4792
4793 Be sure to leave a row of dashes or a blank line between the header
4794 and the body of the message.
4795
4796 @vindex mh-letter-fill-column
4797
4798 The body of the message is edited as you would edit any Emacs buffer
4799 although there are a few commands and options to assist you. You can
4800 change the fill column in MH-Letter mode with the option
4801 @code{mh-letter-fill-column}. By default, this option is 72 to allow
4802 others to quote your message without line wrapping.
4803
4804 @cindex filling paragraphs
4805 @cindex paragraphs, filling
4806 @findex fill-paragraph
4807 @kindex M-q
4808 @vindex mh-ins-buf-prefix
4809
4810 You'll often include messages that were sent from user agents that
4811 haven't yet realized that paragraphs consist of more than a single
4812 line. This makes for long lines that wrap in an ugly fashion. You'll
4813 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these
4814 quoted messages, even if they are nested, just as long as all of the
4815 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting
4816 Letter}). For example, let's assume you have the following in your
4817 draft:
4818
4819 @smallexample
4820 @group
4821 > Hopefully this gives you an idea of what I'm currently doing. I'm \
4822 not sure yet whether I'm completely satisfied with my setup, but \
4823 it's worked okay for me so far.
4824 @end group
4825 @end smallexample
4826
4827 Running @kbd{M-q} on this paragraph produces:
4828
4829 @smallexample
4830 @group
4831 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4832 > sure yet whether I'm completely satisfied with my setup, but it's
4833 > worked okay for me so far.
4834 @end group
4835 @end smallexample
4836
4837 @findex mh-open-line
4838 @findex open-line
4839 @kindex C-c C-o
4840 @kindex C-o
4841
4842 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the
4843 command @kbd{C-o} (@code{open-line}) in that it inserts a newline
4844 after point. It differs in that it also inserts the right number of
4845 quoting characters and spaces so that the next line begins in the same
4846 column as it was. This is useful when breaking up paragraphs in
4847 replies. For example, if this command was used when point was after
4848 the first period in the paragraph above, the result would be this:
4849
4850 @smallexample
4851 @group
4852 > Hopefully this gives you an idea of what I'm currently doing.
4853
4854 > I'm not
4855 > sure yet whether I'm completely satisfied with my setup, but it's
4856 > worked okay for me so far.
4857 @end group
4858 @end smallexample
4859
4860 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
4861 @section Inserting Letter to Which You're Replying
4862
4863 @cindex inserting messages
4864 @cindex replying to messages
4865 @cindex yanking messages
4866 @findex mh-yank-cur-msg
4867 @kindex C-c C-y
4868 @vindex mh-ins-buf-prefix
4869
4870 It is often useful to insert a snippet of text from a letter that
4871 someone mailed to provide some context for your reply. The command
4872 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an
4873 attribution, yanking a portion of text from the message to which
4874 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
4875 before each line.
4876
4877 @smallexample
4878 @group
4879 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4880
4881 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4882 > sure yet whether I'm completely satisfied with my setup, but it's
4883 > worked okay for me so far.
4884 @end group
4885 @end smallexample
4886
4887 @vindex mh-extract-from-attribution-verb
4888
4889 The attribution consists of the sender's name and email address
4890 followed by the content of the option
4891 @code{mh-extract-from-attribution-verb}. This option can be set to
4892 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use
4893 the @samp{Custom String} menu item to enter your own verb.
4894
4895 @vindex mail-citation-hook
4896 @vindex mh-ins-buf-prefix
4897 @vindex mh-yank-behavior
4898
4899 The prefix @code{"> "} is the default setting for the option
4900 @code{mh-ins-buf-prefix}. I suggest that you not modify this option
4901 since it is used by many mailers and news readers: messages are far
4902 easier to read if several included messages have all been indented by
4903 the same string. This prefix is not inserted if you use one of the
4904 supercite flavors of @code{mh-yank-behavior} or you have added a
4905 @code{mail-citation-hook} as described below.
4906
4907 @vindex mh-delete-yanked-msg-window-flag
4908
4909 You can also turn on the @code{mh-delete-yanked-msg-window-flag}
4910 option to delete the window containing the original message after
4911 yanking it to make more room on your screen for your reply.
4912
4913 @cindex Emacs, packages, supercite
4914 @cindex supercite package
4915 @kindex r
4916 @vindex mail-citation-hook
4917 @vindex mh-yank-behavior
4918
4919 You can control how the message to which you are replying is yanked
4920 into your reply using @code{mh-yank-behavior}. To include the entire
4921 message, including the entire header, use @samp{Body and
4922 Header}@footnote{If you'd rather have the header cleaned up, use
4923 @kbd{C-u r} instead of @kbd{r} when replying
4924 (@pxref{Replying}).}@footnote{In the past you would use this setting
4925 and set @code{mail-citation-hook} to @samp{supercite}, but this usage
4926 is now deprecated in favor of the @samp{Invoke supercite} setting.}.
4927 Use @samp{Body} to yank just the body without the header. To yank only
4928 the portion of the message following the point, set this option to
4929 @samp{Below Point}.
4930
4931 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a
4932 full-bodied, full-featured, citation package that comes standard with
4933 Emacs.} to pass the entire message and header through supercite.
4934
4935 @vindex mh-extract-from-attribution-verb
4936
4937 If the @samp{Body With Attribution} setting is used, then the message
4938 minus the header is yanked and a simple attribution line is added at
4939 the top using the value of the option
4940 @code{mh-extract-from-attribution-verb}. This is the default.
4941
4942 @kindex C-c C-y
4943 @vindex mh-delete-yanked-msg-window-flag
4944
4945 If the @samp{Invoke supercite} or @samp{Body With Attribution}
4946 settings are used, the @samp{-noformat} argument is passed to the
4947 @command{repl} program to override a @samp{-filter} or @samp{-format}
4948 argument. These settings also have @samp{Automatically} variants that
4949 perform the action automatically when you reply so that you don't need
4950 to use @kbd{C-c C-y} at all. Note that this automatic action is only
4951 performed if the show buffer matches the message being replied to.
4952 People who use the automatic variants tend to turn on the option
4953 @code{mh-delete-yanked-msg-window-flag} as well so that the show
4954 window is never displayed.
4955
4956 @vindex mh-yank-behavior
4957
4958 If the show buffer has a region, the option @code{mh-yank-behavior} is
4959 ignored unless its value is one of @samp{Attribution} variants in
4960 which case the attribution is added to the yanked region.
4961
4962 @findex trivial-cite
4963 @vindex mail-citation-hook
4964 @vindex mh-ins-buf-prefix
4965 @vindex mh-yank-behavior
4966
4967 If this isn't enough, you can gain full control over the appearance of
4968 the included text by setting @code{mail-citation-hook} to a function
4969 that modifies it. This hook is ignored if the option
4970 @code{mh-yank-behavior} is set to one of the supercite flavors.
4971 Otherwise, this option controls how much of the message is passed to
4972 the hook. The function can find the citation between point and mark
4973 and it should leave point and mark around the modified citation text
4974 for the next hook function. The standard prefix
4975 @code{mh-ins-buf-prefix} is not added if this hook is set.
4976
4977 @cindex Emacs, packages, trivial-cite
4978 @cindex trivial-cite package
4979 @vindex mh-yank-behavior
4980
4981 For example, if you use the hook function
4982 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
4983 @code{trivial-cite}} (which is NOT part of Emacs), set
4984 @code{mh-yank-behavior} to @samp{Body and Header}.
4985
4986 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts
4987 @section Inserting Messages
4988
4989 @cindex inserting messages
4990 @findex mh-insert-letter
4991 @findex mh-yank-behavior
4992 @kindex C-c C-i
4993 @vindex mh-ins-buf-prefix
4994 @vindex mh-invisible-header-fields-compiled
4995 @vindex mh-yank-behavior
4996
4997 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
4998 This command prompts you for the folder and message number, which
4999 defaults to the current message in that folder. It then inserts the
5000 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless
5001 @code{mh-yank-behavior} is set to one of the supercite flavors in
5002 which case supercite is used to format the message. Certain
5003 undesirable header fields (see
5004 @code{mh-invisible-header-fields-compiled}) are removed before
5005 insertion.
5006
5007 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is
5008 left intact, the message is not indented, and @samp{> } is not
5009 inserted before each line. This command leaves the mark before the
5010 letter and point after it.
5011
5012 @node Signature, Picture, Inserting Messages, Editing Drafts
5013 @section Inserting Your Signature
5014
5015 @cindex signature
5016 @findex mh-insert-signature
5017 @kindex C-c C-s
5018
5019 You can insert your signature at the current cursor location with the
5020 command @kbd{C-c C-s} (@code{mh-insert-signature}).
5021
5022 @cindex files, @file{.signature}
5023 @cindex @file{.signature}
5024 @cindex vCard
5025 @vindex mh-signature-file-name
5026
5027 By default, the text of your signature is taken from the file
5028 @file{~/.signature}. You can read from other sources by changing the
5029 option @code{mh-signature-file-name}. This file may contain a
5030 @dfn{vCard} in which case an attachment is added with the vCard.
5031
5032 @findex mh-signature-separator-p
5033 @vindex mh-signature-file-name
5034 @vindex mh-signature-separator
5035 @vindex mh-signature-separator-regexp
5036
5037 The option @code{mh-signature-file-name} may also be a symbol, in
5038 which case that function is called. You may not want a signature
5039 separator to be added for you; instead you may want to insert one
5040 yourself. Options that you may find useful to do this include
5041 @code{mh-signature-separator} (when inserting a signature separator)
5042 and @code{mh-signature-separator-regexp} (for finding said separator).
5043 The function @code{mh-signature-separator-p}, which reports @code{t}
5044 if the buffer contains a separator, may be useful as well.
5045
5046 @cindex signature separator
5047 @vindex mh-signature-separator-flag
5048
5049 A signature separator (@code{"-- "}) will be added if the signature
5050 block does not contain one and @code{mh-signature-separator-flag} is
5051 on. It is not recommended that you change this option since various
5052 mail user agents, including MH-E, use the separator to present the
5053 signature differently, and to suppress the signature when replying or
5054 yanking a letter into a draft.
5055
5056 @vindex mh-insert-signature-hook
5057 @vindex mh-signature-file-name
5058
5059 The hook @code{mh-insert-signature-hook} is run after the signature is
5060 inserted. Hook functions may access the actual name of the file or the
5061 function used to insert the signature with
5062 @code{mh-signature-file-name}.
5063
5064 The signature can also be inserted using Identities.
5065 @xref{Identities}.
5066
5067 @node Picture, Adding Attachments, Signature, Editing Drafts
5068 @section Inserting Your Picture
5069
5070 @cindex @file{.face}
5071 @cindex files, @file{.face}
5072 @vindex mh-x-face-file
5073
5074 You can insert your picture in the header of your mail message so that
5075 recipients see your face in the @samp{From:} header field if their
5076 mail user agent is sophisticated enough. In MH-E, this is done by
5077 placing your image in the file named by the option
5078 @code{mh-x-face-file} which is @file{~/.face} by default.
5079
5080 @cindex @samp{Face:} header field
5081 @cindex @samp{X-Face:} header field
5082 @cindex @samp{X-Image-URL:} header field
5083 @cindex header field, @samp{Face:}
5084 @cindex header field, @samp{X-Face:}
5085 @cindex header field, @samp{X-Image-URL:}
5086
5087 If the file starts with either of the strings @samp{X-Face:},
5088 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the
5089 message header verbatim. Otherwise it is assumed that the file
5090 contains the value of the @samp{X-Face:} header field.
5091
5092 @cindex @command{compface}
5093 @cindex Unix commands, @command{compface}
5094
5095 The @samp{X-Face:} header field, which is a low-resolution, black and
5096 white image, can be generated using the
5097 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
5098 @command{compface}} command. The @uref{http://www.dairiki.org/xface/,
5099 @cite{Online X-Face Converter}} is a useful resource for quick
5100 conversion of images into @samp{X-Face:} header fields.
5101
5102 Use the @uref{http://quimby.gnus.org/circus/face/make-face,
5103 @command{make-face}} script to convert a JPEG image to the higher
5104 resolution, color, @samp{Face:} header field.
5105
5106 The URL of any image can be used for the @samp{X-Image-URL:} field and
5107 no processing of the image is required.
5108
5109 @vindex mh-x-face-file
5110
5111 To prevent the setting of any of these header fields, either set
5112 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file
5113 defined by this option doesn't exist.
5114
5115 @xref{Viewing}, to see how these header fields are displayed in MH-E.
5116
5117 @node Adding Attachments, Sending PGP, Picture, Editing Drafts
5118 @section Adding Attachments
5119
5120 @cindex @command{mhbuild}
5121 @cindex @command{mhn}
5122 @cindex MH commands, @command{mhbuild}
5123 @cindex MH commands, @command{mhn}
5124 @cindex MIME
5125 @cindex multimedia mail
5126
5127 MH-E has the capability to create multimedia messages. It uses the
5128 @sc{mime} (Multipurpose Internet Mail Extensions)
5129 protocol@footnote{@sc{mime} is defined in
5130 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The
5131 @sc{mime} protocol allows you to incorporate images, sound, video,
5132 binary files, and even commands that fetch a file with @samp{ftp} when
5133 your recipient reads the message!
5134
5135 @kindex C-c C-m
5136
5137 If you were to create a multimedia message with plain MH commands, you
5138 would insert @command{mhbuild} or @command{mhn} directives (henceforth
5139 called @dfn{MH-style directives} into your draft and use the
5140 @command{mhbuild} command in nmh or @command{mhn} command in MH and
5141 GNU mailutils to expand them. MH-E works in much the same way,
5142 although it provides a handful of commands prefixed with @kbd{C-c C-m}
5143 to insert the directives so you don't need to remember the syntax of
5144 them. Remember: you can always add MH-style directives by
5145 hand@footnote{See the section
5146 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5147 the MH book.}.
5148
5149 @cindex MIME Meta Language (MML)
5150 @cindex MML
5151 @vindex mh-compose-insertion
5152
5153 In addition to MH-style directives, MH-E also supports MML (@sc{mime}
5154 Meta Language) tags@footnote{
5155 @ifinfo
5156 @c Although the third argument should default to the
5157 @c first, makeinfo goes to the wrong Info file without it being
5158 @c different--it seems to be getting our own Composing node.
5159 @xref{Composing,,Composing with MML,emacs-mime}.
5160 @end ifinfo
5161 @ifnotinfo
5162 See the section Composing in
5163 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME
5164 Manual}}.
5165 @end ifnotinfo
5166 }. The option @code{mh-compose-insertion} can be used to choose
5167 between them. By default, this option is set to @samp{MML} if it is
5168 supported since it provides a lot more functionality. This option can
5169 also be set to @samp{MH} if MH-style directives are preferred.
5170
5171 @cindex media types
5172 @cindex MIME, media types
5173
5174 The MH-E @sc{mime} commands require a @dfn{media type} for each body
5175 part or attachment. For example, a PDF document is of type
5176 @samp{application/pdf} and an HTML document is of type
5177 @samp{text/html}. Some commands fill in the media type for you,
5178 whereas others require you to enter one.
5179
5180 @cindex @command{file}
5181 @cindex @file{/etc/mime.types}
5182 @cindex files, @file{/etc/mime.types}
5183 @cindex Unix commands, @command{file}
5184 @findex mailcap-mime-types
5185
5186 In the cases where MH-E can do so, it will determine the media type
5187 automatically. It uses the @command{file} command to do this. Failing
5188 that, the Emacs function @code{mailcap-mime-types} is used to provide
5189 a list from which to choose. This function usually reads the file
5190 @file{/etc/mime.types}.
5191
5192 Whether the media type is chosen automatically, or you choose it from
5193 a list, use the type that seems to match best the file that you are
5194 including. In the case of binaries, the media type
5195 @samp{application/x-executable} can be useful. If you can't find an
5196 appropriate media type, use @samp{text/plain} for text messages and
5197 @samp{application/octet-stream} for everything else.
5198
5199 @cindex content description
5200 @cindex MIME, content description
5201
5202 You are also sometimes asked for a @dfn{content description}. This is
5203 simply an optional brief phrase, in your own words, that describes the
5204 object. If you don't care to enter a content description, just press
5205 return and none will be included; however, a reader may skip over
5206 multimedia fields unless the content description is compelling.
5207
5208 You can also create your own @sc{mime} body parts. In the following
5209 example, I describe how you can create and edit a @samp{text/enriched}
5210 body part to liven up your plain text messages with boldface,
5211 underlining, and italics. I include an Emacs function which inserts
5212 enriched text tags.
5213
5214 @smalllisp
5215 @group
5216 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic")
5217 ("u" . "underline")
5218 ("s" . "smaller") ("B" . "bigger")
5219 ("f" . "fixed")
5220 ("c" . "center"))
5221 "Alist of (final-character . tag) choices for add-enriched-text.
5222 Additional types can be found in RFC 1563.")
5223
5224 (defun add-enriched-text (begin end)
5225 "Add enriched text tags around region.
5226 The tag used comes from the list enriched-text-types and is
5227 specified by the last keystroke of the command. When called from Lisp,
5228 arguments are BEGIN and END@."
5229 (interactive "r")
5230 ;; @r{Set type to the tag indicated by the last keystroke.}
5231 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`}))
5232 enriched-text-types))))
5233 (save-restriction ; @r{restores state from narrow-to-region}
5234 (narrow-to-region begin end) ; @r{narrow view to region}
5235 (goto-char (point-min)) ; @r{move to beginning of text}
5236 (insert "<" type ">") ; @r{insert beginning tag}
5237 (goto-char (point-max)) ; @r{move to end of text}
5238 (insert "</" type ">")))) ; @r{insert terminating tag}
5239 @i{Emacs function for entering enriched text}
5240
5241 @end group
5242 @end smalllisp
5243
5244 To use the function @code{add-enriched-text}, first add it to
5245 @file{~/.emacs} and create key bindings for it (@pxref{Composing}).
5246
5247 Then, in your plain text message, set the mark with @kbd{C-@@} or
5248 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t
5249 b}. This adds @samp{<bold>} where you set the mark and adds
5250 @samp{</bold>} at the location of your cursor, giving you something
5251 like: @samp{You should be <bold>very</bold>}.
5252
5253 Before sending this message, use @kbd{C-c C-m C-m}
5254 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e}
5255 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add
5256 MIME header fields. Then replace @samp{text/plain} with
5257 @samp{text/enriched} in the @samp{Content-Type:} header field.
5258
5259 You may also be interested in investigating @code{sgml-mode}.
5260
5261 @subheading Including Files
5262
5263 @cindex attachments, inserting
5264 @cindex images
5265 @cindex MIME, images
5266 @cindex MIME, sound
5267 @cindex MIME, video
5268 @cindex sound
5269 @cindex video
5270 @findex mh-compose-insertion
5271 @kindex C-c C-m C-i
5272 @kindex C-c C-m i
5273 @vindex mh-compose-insertion
5274
5275 Binaries, images, sound, and video can be inserted in your message
5276 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You
5277 are prompted for the filename containing the object, the media type if
5278 it cannot be determined automatically, and a content description. If
5279 you're using MH-style directives, you will also be prompted for
5280 additional attributes.
5281
5282 @subheading Forwarding Multimedia Messages
5283
5284 @findex mh-compose-forward
5285 @kindex C-c C-m C-f
5286 @kindex C-c C-m f
5287
5288 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m
5289 C-f} (@code{mh-compose-forward}). You are prompted for a content
5290 description, the name of the folder in which the messages to forward
5291 are located, and a range of messages, which defaults to the current
5292 message in that folder. @xref{Ranges}.
5293
5294 @subheading Including an FTP Reference
5295
5296 @cindex @command{ftp}
5297 @cindex MIME, @command{ftp}
5298 @cindex Unix commands, @command{ftp}
5299 @findex mh-mh-compose-anon-ftp
5300 @kindex C-c C-m C-g
5301 @kindex C-c C-m g
5302
5303 You can have your message initiate an @command{ftp} transfer when the
5304 recipient reads the message. To do this, use the command @kbd{C-c C-m
5305 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote
5306 host and filename, the media type, and the content description.
5307
5308 @subheading Including tar Files
5309
5310 @cindex @command{ftp}
5311 @cindex @command{tar}
5312 @cindex MIME, @command{ftp}
5313 @cindex MIME, @command{tar}
5314 @cindex Unix commands, @command{ftp}
5315 @cindex Unix commands, @command{tar}
5316 @findex mh-mh-compose-anon-ftp
5317 @findex mh-mh-compose-external-compressed-tar
5318 @kindex C-c C-m C-g
5319 @kindex C-c C-m C-t
5320 @kindex C-c C-m t
5321
5322 If the remote file is a compressed tar file, you can use @kbd{C-c C-m
5323 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition
5324 to retrieving the file via anonymous @emph{ftp} as per the command
5325 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also
5326 be uncompressed and untarred. You are prompted for the remote host and
5327 filename and the content description.
5328
5329 @subheading Including Other External Files
5330
5331 @findex mh-mh-compose-external-type
5332 @kindex C-c C-m C-x
5333 @kindex C-c C-m x
5334
5335 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is
5336 a general utility for referencing external files. In fact, all of the
5337 other commands that insert tags to access external files call this
5338 command. You are prompted for the access type, remote host and
5339 filename, and content type. If you provide a prefix argument, you are
5340 also prompted for a content description, attributes, parameters, and a
5341 comment.
5342
5343 @subheading Previewing Multimedia Messages
5344
5345 When you are finished editing a @sc{mime} message, it might look like this:
5346
5347 @cartouche
5348 @smallexample
5349 3 t08/24 root received fax files on Wed Aug 24 11:00:
5350 4+t08/24 To:wohler Test<<This is a test message to get the
5351
5352
5353
5354
5355
5356 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------------
5357 To: wohler
5358 cc:
5359 Subject: Test of MIME
5360 --------
5361 Here is the SETI@@Home logo:
5362
5363 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm"
5364 disposition=inline description="SETI@@home logo">
5365 <#/part>
5366 --:** @{draft@} All L8 (MH-Letter)----------------------------------
5367
5368 @end smallexample
5369 @end cartouche
5370 @i{MH-E @sc{mime} draft}
5371
5372 @findex mh-mml-to-mime
5373 @kindex C-c C-m C-m
5374 @kindex C-c C-m m
5375
5376 Typically, you send a message with attachments just like any other
5377 message (@pxref{Sending Message}).
5378
5379 @findex mh-mml-to-mime
5380 @kindex C-c C-m C-m
5381
5382 However, you may take a sneak preview of the @sc{mime} encoding if you
5383 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}).
5384 The following screen shows the @sc{mime} encoding specified by the
5385 tags. You can see why mail user agents are usually built to hide these
5386 details from the user.
5387
5388 @cartouche
5389 @smallexample
5390 To: wohler
5391 cc:
5392 Subject: Test of MIME
5393 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
5394 MIME-Version: 1.0
5395 Content-Type: multipart/mixed; boundary="=-=-="
5396 --------
5397 --=-=-=
5398
5399 Here is the SETI@@Home logo:
5400
5401
5402 --=-=-=
5403 Content-Type: image/x-xpm
5404 Content-Disposition: inline; filename=setiathome.xpm
5405 Content-Transfer-Encoding: base64
5406 Content-Description: SETI@@home logo
5407
5408 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N
5409 --:-- @{draft@} Top L1 (MH-Letter)----------------------------------
5410
5411 @end smallexample
5412 @end cartouche
5413 @i{MH-E @sc{mime} draft ready to send}
5414
5415 @cindex undo effects of mh-mml-to-mime
5416
5417 This action can be undone by running @kbd{C-_} (@code{undo}).
5418
5419 @cindex @command{mhbuild}
5420 @cindex @command{mhn}
5421 @cindex MH commands, @command{mhbuild}
5422 @cindex MH commands, @command{mhn}
5423 @cindex undo effects of mh-mh-to-mime
5424 @findex mh-mh-to-mime
5425 @findex mh-mh-to-mime-undo
5426 @kindex C-c C-e
5427 @kindex C-c C-m C-m
5428 @kindex C-c C-m C-u
5429 @kindex C-c C-m u
5430
5431 If you're using MH-style directives, use @kbd{C-c C-e}
5432 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the
5433 command @command{mhbuild} (@command{mhn}) on the message which expands
5434 the tags@footnote{See the section
5435 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5436 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u}
5437 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup
5438 file. You are prompted to confirm this action, but you can avoid the
5439 confirmation by adding an argument (for example, @kbd{C-u C-c C-m
5440 C-u}).
5441
5442 @kindex C-c C-e
5443 @vindex mh-mh-to-mime-args
5444
5445 If you wish to pass additional arguments to @command{mhbuild}
5446 (@command{mhn}) to affect how it builds your message, use the option
5447 @code{mh-mh-to-mime-args}. For example, you can build a consistency
5448 check into the message by setting @code{mh-mh-to-mime-args} to
5449 @samp{-check}. The recipient of your message can then run
5450 @samp{mhbuild -check} on the message---@command{mhbuild}
5451 (@command{mhn}) will complain if the message has been corrupted on the
5452 way. The command @kbd{C-c C-e} only consults this option when given a
5453 prefix argument (as in @kbd{C-u C-c C-e}).
5454
5455 @kindex C-c C-e
5456 @vindex mh-mh-to-mime-hook
5457
5458 The hook @code{mh-mh-to-mime-hook} is called after the message has
5459 been formatted by @kbd{C-c C-e}.
5460
5461 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts
5462 @section Signing and Encrypting Messages
5463
5464 @cindex signing messages
5465 @cindex encrypting messages
5466 @cindex RFC 3156
5467
5468 MH-E can sign and encrypt messages as defined in
5469 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you
5470 should choose to sign or encrypt your message, use one of the
5471 following commands to do so any time before sending your message.
5472
5473 @findex mh-mml-secure-message-encrypt
5474 @findex mh-mml-secure-message-sign
5475 @findex mh-mml-secure-message-signencrypt
5476 @kindex C-c C-m C-e
5477 @kindex C-c C-m C-s
5478 @kindex C-c C-m e e
5479 @kindex C-c C-m e s
5480 @kindex C-c C-m s e
5481 @kindex C-c C-m s s
5482
5483 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign})
5484 inserts the following tag:
5485
5486 @smallexample
5487 <#secure method=pgpmime mode=sign>
5488 @end smallexample
5489
5490 This is used to sign your message digitally. Likewise, the command
5491 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the
5492 following tag:
5493
5494 @smallexample
5495 <#secure method=pgpmime mode=encrypt>
5496 @end smallexample
5497
5498 This is used to encrypt your message. Finally, the command @kbd{C-c
5499 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the
5500 following tag:
5501
5502 @smallexample
5503 <#secure method=pgpmime mode=signencrypt>
5504 @end smallexample
5505
5506 @findex mh-mml-unsecure-message
5507 @kindex C-c C-m C-n
5508 @kindex C-c C-m n
5509 @vindex mh-mml-method-default
5510
5511 This is used to sign and encrypt your message. In each of these cases,
5512 a proper multipart message is created for you when you send the
5513 message. Use the command @kbd{C-c C-m C-n}
5514 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix
5515 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the
5516 possible security methods (see @code{mh-mml-method-default}).
5517
5518 @vindex mh-mml-method-default
5519
5520 The option @code{mh-mml-method-default} is used to select between a
5521 variety of mail security mechanisms. The default is @samp{PGP (MIME)}
5522 if it is supported; otherwise, the default is @samp{None}. Other
5523 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}.
5524
5525 @cindex @samp{pgg} customization group
5526 @cindex PGG
5527 @cindex customization group, @samp{pgg}
5528
5529 The @samp{pgg} customization group may have some settings which may
5530 interest you.
5531 @iftex
5532 See @cite{The PGG Manual}.
5533 @end iftex
5534 @ifinfo
5535 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
5536 @end ifinfo
5537 @ifhtml
5538 See
5539 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
5540 @cite{The PGG Manual}}.
5541 @end ifhtml
5542
5543 @cindex header field, @samp{Fcc:}
5544 @cindex @samp{Fcc:} header field
5545 @vindex pgg-encrypt-for-me
5546
5547 In particular, I turn on the option @code{pgg-encrypt-for-me} so that
5548 all messages I encrypt are encrypted with my public key as well. If
5549 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header
5550 field, this setting is vital so that you can read the mail you write!
5551
5552 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts
5553 @section Checking Recipients
5554
5555 @cindex @samp{*MH-E Recipients*}
5556 @cindex @command{whom}
5557 @cindex MH commands, @command{whom}
5558 @cindex buffers, @samp{*MH-E Recipients*}
5559 @cindex checking recipients
5560 @cindex recipients, checking
5561 @findex mh-check-whom
5562 @kindex C-c C-w
5563
5564 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so
5565 you can check the actual address(es) in the alias. A new buffer named
5566 @samp{*MH-E Recipients*} is created with the output of @command{whom}
5567 (@pxref{Miscellaneous})@footnote{See the section
5568 @uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the
5569 whatnow Program} in the MH book.}.
5570
5571 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
5572 @section Sending a Message
5573
5574 @cindex buffers, @samp{*MH-E Mail Delivery*}
5575 @cindex @samp{*MH-E Mail Delivery*}
5576 @cindex sending mail
5577 @findex mh-send-letter
5578 @kindex C-c C-c
5579
5580 When you are all through editing a message, you send it with the
5581 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix
5582 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the
5583 delivery; this output can be found in a buffer called @samp{*MH-E Mail
5584 Delivery*} (@pxref{Miscellaneous}).
5585
5586 @cindex sending mail
5587 @cindex spell check
5588 @findex ispell-message
5589 @kindex C-c C-c
5590 @vindex mh-before-send-letter-hook
5591
5592 The hook @code{mh-before-send-letter-hook} is run at the beginning of
5593 the command @kbd{C-c C-c}. For example, if you want to check your
5594 spelling in your message before sending, add the function
5595 @code{ispell-message}.
5596
5597 @cindex @command{send}
5598 @cindex MH commands, @command{send}
5599 @vindex mh-send-prog
5600
5601 In case the MH @command{send} program@footnote{See the section
5602 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
5603 in the MH book.} is installed under a different name, use
5604 @code{mh-send-prog} to tell MH-E the name.
5605
5606 @node Killing Draft, , Sending Message, Editing Drafts
5607 @section Killing the Draft
5608
5609 @cindex killing draft
5610 @findex kill-buffer
5611 @findex mh-fully-kill-draft
5612 @kindex C-c C-q
5613 @kindex C-x k
5614
5615 If for some reason you are not happy with the draft, you can use the
5616 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft
5617 buffer and delete the draft message. Use the command @kbd{C-x k}
5618 (@code{kill-buffer}) if you don't want to delete the draft message.
5619
5620 @node Aliases, Identities, Editing Drafts, Top
5621 @chapter Aliases
5622
5623 @cindex aliases
5624
5625 MH aliases are used in the same way in MH-E as they are in MH. Any
5626 alias listed as a recipient will be expanded when the message is sent.
5627 This chapter discusses other things you can do with aliases in MH-E.
5628
5629 @cindex MH-Letter mode
5630 @cindex modes, MH-Letter
5631
5632 The following commands are available in MH-Letter mode with the
5633 exception of @code{mh-alias-reload} which can be called from anywhere.
5634
5635 @table @kbd
5636 @kindex @key{SPC}
5637 @findex mh-letter-complete-or-space
5638 @item @key{SPC}
5639 Perform completion or insert space (@code{mh-letter-complete-or-space}).
5640 @c -------------------------
5641 @kindex M-@key{TAB}
5642 @findex mh-letter-complete
5643 @item M-@key{TAB}
5644 Perform completion on header field or word preceding point
5645 (@code{mh-letter-complete}).
5646 @c -------------------------
5647 @findex mh-alias-apropos
5648 @item mh-alias-apropos
5649 Show all aliases or addresses that match a regular expression.
5650 @c -------------------------
5651 @findex mh-alias-grab-from-field
5652 @item mh-alias-grab-from-field
5653 Add alias for the sender of the current message
5654 @c -------------------------
5655 @findex mh-alias-reload
5656 @item mh-alias-reload
5657 Reload MH aliases.
5658 @end table
5659
5660 @cindex @samp{mh-alias} customization group
5661 @cindex customization group, @samp{mh-alias}
5662
5663 The @samp{mh-alias} customization group contains options associated
5664 with aliases.
5665
5666 @vtable @code
5667 @item mh-alias-completion-ignore-case-flag
5668 On means don't consider case significant in MH alias completion
5669 (default: @samp{on}).
5670 @c -------------------------
5671 @item mh-alias-expand-aliases-flag
5672 On means to expand aliases entered in the minibuffer (default:
5673 @samp{off}).
5674 @c -------------------------
5675 @item mh-alias-flash-on-comma
5676 Specify whether to flash address or warn on translation (default: @samp{Flash
5677 but Don't Warn If No Alias}).
5678 @c -------------------------
5679 @item mh-alias-insert-file
5680 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile
5681 Profile Component}).
5682 @c -------------------------
5683 @item mh-alias-insertion-location
5684 Specifies where new aliases are entered in alias files (default:
5685 @samp{Alphabetical}).
5686 @c -------------------------
5687 @item mh-alias-local-users
5688 If @samp{on}, local users are added to alias completion (default:
5689 @samp{on}).
5690 @c -------------------------
5691 @item mh-alias-local-users-prefix
5692 String prefixed to the real names of users from the password file
5693 (default: @code{"local."}.
5694 @c -------------------------
5695 @item mh-alias-passwd-gecos-comma-separator-flag
5696 On means the GECOS field in the password file uses a comma separator
5697 (default: @samp{on}).
5698 @end vtable
5699
5700 The following hook is available.
5701
5702 @vtable @code
5703 @item mh-alias-reloaded-hook
5704 Hook run by @code{mh-alias-reload} after loading aliases (default:
5705 @code{nil}).
5706 @end vtable
5707
5708 @subheading Adding Addresses to Draft
5709
5710 You can use aliases when you are adding recipients to a message.
5711
5712 @findex minibuffer-complete
5713 @kindex @key{TAB}
5714 @vindex mh-alias-expand-aliases-flag
5715 @vindex mh-compose-prompt-flag
5716
5717 In order to use minibuffer prompting for recipients and the subject
5718 line in the minibuffer, turn on the option
5719 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the
5720 @key{TAB} (@code{minibuffer-complete}) command to complete aliases
5721 (and optionally local logins) when prompted for the recipients. Turn
5722 on the option @code{mh-alias-expand-aliases-flag} if you want these
5723 aliases to be expanded to their respective addresses in the draft.
5724
5725 @findex mh-letter-complete
5726 @findex mh-letter-complete-or-space
5727 @kindex @key{SPC}
5728 @kindex M-@key{TAB}
5729
5730 Otherwise, you can complete aliases in the header of the draft with
5731 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC}
5732 (@code{mh-letter-complete-or-space}).
5733
5734 @vindex mh-alias-completion-ignore-case-flag
5735
5736 As MH ignores case in the aliases, so too does MH-E. However, you may
5737 turn off the option @code{mh-alias-completion-ignore-case-flag} to
5738 make case significant which can be used to segregate completion of
5739 your aliases. You might use uppercase for mailing lists and lowercase
5740 for people. For example, you might have:
5741
5742 @smallexample
5743 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org>
5744 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org>
5745 @end smallexample
5746
5747 When this option is turned off, if you were to type @kbd{M} in the
5748 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list;
5749 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then
5750 you'd get Mark's address. Note that this option affects completion
5751 only. If you were to enter @kbd{Mark.Baushke}, it would still be
5752 identified with your @samp{mark.baushke} alias.
5753
5754 @findex mh-alias-minibuffer-confirm-address
5755 @findex mh-letter-confirm-address
5756 @vindex mh-alias-flash-on-comma
5757 @vindex mh-compose-prompt-flag
5758
5759 To verify that the alias you've entered is valid, the alias will be
5760 displayed in the minibuffer when you type a comma
5761 (@code{mh-letter-confirm-address} or
5762 @code{mh-alias-minibuffer-confirm-address} if the option
5763 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This
5764 behavior can be controlled with the option
5765 @code{mh-alias-flash-on-comma} which provides three choices:
5766 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No
5767 Alias}, and @samp{Don't Flash Nor Warn If No Alias}.
5768
5769 For another way to verify the alias expansion, see @ref{Checking
5770 Recipients}.
5771
5772 @subheading Loading Aliases
5773
5774 @cindex @command{ali}
5775 @cindex @file{/etc/nmh/MailAliases}
5776 @cindex @samp{Aliasfile:} MH profile component
5777 @cindex MH commands, @command{ali}
5778 @cindex MH profile component, @samp{Aliasfile:}
5779 @cindex files, @file{/etc/nmh/MailAliases}
5780
5781 MH-E loads aliases for completion and folder name hints from various
5782 places. It uses the MH command @command{ali}@footnote{See the section
5783 @uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to
5784 read aliases from the files listed in the profile component
5785 @samp{Aliasfile:} as well as system-wide aliases (for example,
5786 @file{/etc/nmh/MailAliases}).
5787
5788 @cindex @file{/etc/passwd}
5789 @cindex files, @file{/etc/passwd}
5790
5791 In addition, aliases are created from @file{/etc/passwd} entries with
5792 a user ID larger than a magical number, typically 200. This can be a
5793 handy tool on a machine where you and co-workers exchange messages.
5794 These aliases have the form @samp{local.@var{first.last}} if a real
5795 name is present in the password file. Otherwise, the alias will have
5796 the form @samp{local.@var{login}}.
5797
5798 @vindex mh-alias-local-users-prefix
5799
5800 The prefix @samp{local.} can be modified via the option
5801 @code{mh-alias-local-users-prefix}. This option can also be set to
5802 @samp{Use Login}.
5803
5804 For example, consider the following password file entry:
5805
5806 @smallexample
5807 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
5808 @end smallexample
5809
5810 @vindex mh-alias-local-users-prefix
5811
5812 The following settings of option @code{mh-alias-local-users-prefix}
5813 will produce the associated aliases:
5814
5815 @table @code
5816 @item "local."
5817 local.peter.galbraith
5818 @c -------------------------
5819 @item ""
5820 peter.galbraith
5821 @c -------------------------
5822 @item Use Login
5823 psg
5824 @end table
5825
5826 @vindex mh-alias-passwd-gecos-comma-separator-flag
5827
5828 In the example above, commas are used to separate different values
5829 within the so-called GECOS field. This is a fairly common usage.
5830 However, in the rare case that the GECOS field in your password file
5831 is not separated by commas and whose contents may contain commas, you
5832 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag}
5833 off.
5834
5835 @cindex NIS, obtaining local aliases from
5836 @cindex @samp{ypcat passwd}
5837 @vindex mh-alias-local-users
5838
5839 If you're on a system with thousands of users you don't know, and the
5840 loading of local aliases slows MH-E down noticeably, then the local
5841 alias feature can be disabled by turning off the option
5842 @code{mh-alias-local-users}. This option also takes a string which is
5843 executed to generate the password file. For example, use @samp{ypcat
5844 passwd} to obtain the NIS password file.
5845
5846 @findex mh-alias-reload
5847 @kindex M-x mh-alias-reload
5848 @vindex mh-alias-reloaded-hook
5849
5850 Since aliases are updated frequently, MH-E reloads aliases
5851 automatically whenever an alias lookup occurs if an alias source has
5852 changed. However, you can reload your aliases manually by calling the
5853 command @kbd{M-x mh-alias-reload} directly. This command runs
5854 @code{mh-alias-reloaded-hook} after the aliases have been loaded.
5855
5856 @subheading Adding Aliases
5857
5858 In the past, you have manually added aliases to your alias file(s)
5859 listed in your @samp{Aliasfile:} profile component. MH-E provides
5860 other methods for maintaining your alias file(s).
5861
5862 @findex mh-alias-add-alias
5863 @kindex M-x mh-alias-add-alias
5864
5865 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt
5866 you for the alias and address that you would like to add. If the alias
5867 exists already, you will have the choice of inserting the new alias
5868 before or after the old alias. In the former case, this alias will be
5869 used when sending mail to this alias. In the latter case, the alias
5870 serves as an additional folder name hint when filing messages
5871 (@pxref{Folder Selection}).
5872
5873 Earlier, the alias prefix @samp{local} was presented. You can use
5874 other prefixes to organize your aliases or disambiguate entries. You
5875 might use prefixes for locales, jobs, or activities. For example, I
5876 have:
5877
5878 @smallexample
5879 @group
5880 ; Work
5881 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com>
5882 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com>
5883 ...
5884 ; Sport
5885 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com>
5886 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com>
5887 ...
5888 ; Personal
5889 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com>
5890 ...
5891 @end group
5892 @end smallexample
5893
5894 Using prefixes instead of postfixes helps you explore aliases during
5895 completion. If you forget the name of an old dive buddy, you can enter
5896 @samp{div} and then @key{SPC} to get a listing of all your dive buddies.
5897
5898 @kindex M-x mh-alias-add-address-under-point
5899 @kindex M-x mh-alias-grab-from-field
5900
5901 An alias for the sender of the current message is added automatically
5902 by clicking on the @samp{Grab From alias} tool bar button or by running
5903 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other
5904 recipients of the current message are added by placing your cursor
5905 over the desired recipient and giving the @kbd{M-x
5906 mh-alias-add-address-under-point} command.
5907
5908 @vindex mh-alias-insert-file
5909 @vindex mh-alias-insertion-location
5910
5911 The options @code{mh-alias-insert-file} and
5912 @code{mh-alias-insertion-location} controls how and where these aliases
5913 are inserted.
5914
5915 @vindex mh-alias-insert-file
5916
5917 The default setting of option @code{mh-alias-insert-file} is @samp{Use
5918 Aliasfile Profile Component}. This option can also hold the name of a
5919 file or a list a file names. If this option is set to a list of file
5920 names, or the @samp{Aliasfile:} profile component contains more than
5921 one file name, MH-E will prompt for one of them.
5922
5923 @vindex mh-alias-insertion-location
5924
5925 The option @code{mh-alias-insertion-location} is set to
5926 @samp{Alphabetical} by default. If you organize your alias file in
5927 other ways, then the settings @samp{Top} and @samp{Bottom} might be
5928 more appropriate.
5929
5930 @subheading Querying Aliases
5931
5932 @cindex regular expressions, @code{mh-alias-apropos}
5933 @findex mh-alias-apropos
5934 @kindex M-x mh-alias-apropos
5935
5936 If you can't quite remember an alias, you can use @kbd{M-x
5937 mh-alias-apropos} to show all aliases or addresses that match a
5938 regular expression
5939 @ifnothtml
5940 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
5941 GNU Emacs Manual}).
5942 @end ifnothtml
5943 @ifhtml
5944 (see the section
5945 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
5946 Syntax of Regular Expressions} in
5947 @cite{The GNU Emacs Manual}).
5948 @end ifhtml
5949
5950 @node Identities, Speedbar, Aliases, Top
5951 @chapter Identities
5952
5953 @cindex identities
5954 @cindex multiple personalities
5955
5956 MH-E supports the concept of multiple personalities or identities.
5957 This means that you can easily have a different header and signature
5958 at home and at work.
5959
5960 @cindex @samp{Identity} menu
5961 @cindex menu, @samp{Identity}
5962
5963 A couple of commands are used to insert identities in MH-Letter mode
5964 which are also found in the @samp{Identity} menu.
5965
5966 @table @kbd
5967 @kindex C-c C-d
5968 @findex mh-insert-identity
5969 @item C-c C-d
5970 Insert fields specified by given identity (@code{mh-insert-identity}).
5971 @c -------------------------
5972 @cindex @samp{Identity > Insert Auto Fields} menu item
5973 @cindex menu item, @samp{Identity > Insert Auto Fields}
5974 @kindex C-c M-d
5975 @findex mh-insert-auto-fields
5976 @item C-c M-d
5977 Insert custom fields if recipient found in @code{mh-auto-fields-list}
5978 (@code{mh-insert-auto-fields}).
5979 @end table
5980
5981 @cindex @samp{mh-identity} customization group
5982 @cindex customization group, @samp{mh-identity}
5983
5984 The @samp{mh-identity} customization group contains the following
5985 options.
5986
5987 @vtable @code
5988 @item mh-auto-fields-list
5989 List of recipients for which header lines are automatically inserted
5990 (default: @code{nil}).
5991 @c -------------------------
5992 @item mh-auto-fields-prompt-flag
5993 On means to prompt before sending if fields inserted (default:
5994 @samp{on})
5995 @c -------------------------
5996 @item mh-identity-default
5997 Default identity to use when @code{mh-letter-mode} is called (default:
5998 @samp{None}).
5999 @c -------------------------
6000 @item mh-identity-handlers
6001 Handler functions for fields in @code{mh-identity-list}.
6002 @c -------------------------
6003 @item mh-identity-list
6004 List of identities (default: @code{nil}).
6005 @end vtable
6006
6007 Some of the common header fields that people change depending on the
6008 context are the @samp{From:} and @samp{Organization:} fields, as well
6009 as the signature.
6010
6011 @vindex mh-identity-list
6012
6013 This is done by customizing the option @code{mh-identity-list}. In the
6014 customization buffer for this option, click on the @samp{INS} button
6015 and enter a label such as @samp{Home} or @samp{Work}. Then click on
6016 the @samp{INS} button with the label @samp{Add at least one item
6017 below}. The @samp{Value Menu} has the following menu items:
6018
6019 @table @samp
6020 @cindex header field, @samp{From:}
6021 @cindex @samp{From:} header field
6022 @item From Field
6023 Specify an alternate @samp{From:} header field. You must include a
6024 valid email address. A standard format is @samp{First Last
6025 <login@@host.domain>}. If you use an initial with a period, then you
6026 must quote your name as in @samp{"First I. Last"
6027 <login@@host.domain>}.
6028 @c -------------------------
6029 @cindex header field, @samp{Organization:}
6030 @cindex @samp{Organization:} header field
6031 @item Organization Field
6032 People usually list the name of the company where they work here.
6033 @c -------------------------
6034 @item Other Field
6035 Set any arbitrary header field and value here. Unless the header field
6036 is a standard one, precede the name of your field's label with
6037 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}.
6038 @c -------------------------
6039 @item Attribution Verb
6040 This value overrides the setting of
6041 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}.
6042 @c -------------------------
6043 @cindex signature
6044 @vindex mh-signature-file-name
6045 @item Signature
6046 Set your signature with this item. You can specify the contents of
6047 @code{mh-signature-file-name}, a file, or a function.
6048 @xref{Signature}.
6049 @c -------------------------
6050 @item GPG Key ID
6051 Specify a different key to sign or encrypt messages.
6052 @end table
6053
6054 @cindex Identity menu
6055 @cindex menu, Identity
6056 @findex mh-insert-identity
6057 @kindex C-c C-d
6058
6059 You can select the identities you have added via the menu called
6060 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c
6061 C-d} (@code{mh-insert-identity}). To clear the fields and signature
6062 added by the identity, select the @samp{None} identity.
6063
6064 @cindex menu item, @samp{Identity > Customize Identities}
6065 @cindex menu item, @samp{Identity > Save as Default}
6066 @cindex menu item, @samp{Identity > Set Default for Session}
6067 @cindex @samp{Identity > Customize Identities} menu item
6068 @cindex @samp{Identity > Save as Default} menu item
6069 @cindex @samp{Identity > Set Default for Session} menu item
6070 @vindex mh-identity-default
6071
6072 The @samp{Identity} menu contains two other items to save you from
6073 having to set the identity on every message. The menu item @samp{Set
6074 Default for Session} can be used to set the default identity to the
6075 current identity until you exit Emacs. The menu item @samp{Save as
6076 Default} sets the option @code{mh-identity-default} to the current
6077 identity setting. You can also customize the option
6078 @code{mh-identity-default} in the usual fashion. If you find that you
6079 need to add another identity, the menu item @samp{Customize
6080 Identities} is available for your convenience.
6081
6082 @cindex regular expressions, @code{mh-auto-fields-list}
6083 @vindex mh-auto-fields-list
6084
6085 The option @code{mh-auto-fields-list} can also be used to set the
6086 identity depending on the recipient to provide even more control. To
6087 customize @code{mh-auto-fields-list}, click on the @samp{INS} button
6088 and enter a regular expression for the recipient's address
6089 @ifnothtml
6090 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
6091 GNU Emacs Manual}).
6092 @end ifnothtml
6093 @ifhtml
6094 (see the section
6095 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
6096 Syntax of Regular Expressions} in
6097 @cite{The GNU Emacs Manual}).
6098 @end ifhtml
6099 Click on the @samp{INS} button with the @samp{Add at least one item
6100 below} label. The @samp{Value Menu} contains the following menu items:
6101
6102 @table @samp
6103 @item Identity
6104 Select an identity from those configured in @code{mh-identity-list}.
6105 All of the information for that identity will be added if the
6106 recipient matches.
6107 @c -------------------------
6108 @cindex @samp{Fcc:} header field
6109 @cindex header field, @samp{Fcc:}
6110 @item Fcc Field
6111 Insert an @samp{Fcc:} header field with the folder you provide. When
6112 you send the message, MH will put a copy of your message in this
6113 folder.
6114 @c -------------------------
6115 @cindex @samp{Mail-Followup-To:} header field
6116 @cindex header field, @samp{Mail-Followup-To:}
6117 @item Mail-Followup-To Field
6118 Insert an @samp{Mail-Followup-To:} header field with the recipients
6119 you provide. If the recipient's mail user agent supports this header
6120 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then
6121 their replies will go to the addresses listed. This is useful if their
6122 replies go both to the list and to you and you don't have a mechanism
6123 to suppress duplicates. If you reply to someone not on the list, you
6124 must either remove the @samp{Mail-Followup-To:} field, or ensure the
6125 recipient is also listed there so that he receives replies to your
6126 reply.
6127 @c -------------------------
6128 @item Other Field
6129 Other header fields may be added using this menu item.
6130 @end table
6131
6132 @findex mh-insert-auto-fields
6133 @kindex C-c M-d
6134 @vindex mh-auto-fields-prompt-flag
6135
6136 These fields can only be added after the recipient is known. Because
6137 you can continue to add recipients as you edit the draft, MH-E waits
6138 until the message is sent to perform the auto-insertions. This seems
6139 strange at first, but you'll get used to it. There are two ways to
6140 help you feel that the desired fields are added. The first is the
6141 action when the message is sent: if any fields are added
6142 automatically, you are given a chance to see and to confirm these
6143 fields before the message is actually sent. You can do away with this
6144 confirmation by turning off the option
6145 @code{mh-auto-fields-prompt-flag}. The second method is manual: once
6146 the header contains one or more recipients, you may run the command
6147 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the
6148 @samp{Identity -> Insert Auto Fields} menu item to insert these fields
6149 manually. However, if you use this command, the automatic insertion
6150 when the message is sent is disabled.
6151
6152 @vindex mh-auto-fields-list
6153 @vindex mh-identity-list
6154
6155 You should avoid using the same header field in
6156 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions
6157 that may apply to the same message as the result is undefined.
6158
6159 @vindex mh-identity-handlers
6160 @vindex mh-identity-list
6161
6162 The option @code{mh-identity-handlers} is used to change the way that
6163 fields, signatures, and attributions in @code{mh-identity-list} are
6164 added. To customize @code{mh-identity-handlers}, replace the name of
6165 an existing handler function associated with the field you want to
6166 change with the name of a function you have written. You can also
6167 click on an @samp{INS} button and insert a field of your choice and
6168 the name of the function you have written to handle it.
6169
6170 @vindex mh-identity-list
6171
6172 The @samp{Field} field can be any field that you've used in your
6173 @code{mh-identity-list}. The special fields @samp{:attribution-verb},
6174 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the
6175 @code{mh-identity-list} choices @samp{Attribution Verb},
6176 @samp{Signature}, and @samp{GPG Key ID} respectively.
6177
6178 The handler associated with the @samp{:default} field is used when no
6179 other field matches.
6180
6181 The handler functions are passed two or three arguments: the field
6182 itself (for example, @samp{From}), or one of the special fields (for
6183 example, @samp{:signature}), and the action @samp{'remove} or
6184 @samp{'add}. If the action is @samp{'add}, an additional argument
6185 containing the value for the field is given.
6186
6187 @node Speedbar, Menu Bar, Identities, Top
6188 @chapter The Speedbar
6189
6190 @cindex folder navigation
6191 @cindex speedbar
6192 @findex mh-visit-folder
6193 @kindex F v
6194 @kindex M-x speedbar
6195 @kindex Mouse-2
6196
6197 You can also use the speedbar
6198 @ifnothtml
6199 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},)
6200 @end ifnothtml
6201 @ifhtml
6202 (see the section
6203 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html,
6204 Speedbar Frames} in @cite{The GNU Emacs Manual})
6205 @end ifhtml
6206 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar
6207 @key{RET}}. You will see a new frame appear with all of your MH
6208 folders. Folders with unseen messages appear in boldface. Click on a
6209 folder name with @kbd{Mouse-2} to visit that folder in a similar
6210 fashion to the command @kbd{F v} (@code{mh-visit-folder})
6211 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the
6212 sub-folders of that folder.
6213
6214 The speedbar can be manipulated with the keyboard as well. Use the
6215 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move
6216 the cursor over the desired folder and then use the shortcuts for the
6217 menu items listed in the table below.
6218
6219 @table @samp
6220 @findex mh-speed-view
6221 @item Visit Folder (@key{RET})
6222 Visits the selected folder just as if you had used @kbd{F v}
6223 (@code{mh-speed-view}).
6224 @c -------------------------
6225 @findex mh-speed-expand-folder
6226 @item Expand Nested Folders (@kbd{+})
6227 Expands the selected folder in the speedbar, exposing the children
6228 folders inside it (@code{mh-speed-expand-folder}).
6229 @c -------------------------
6230 @findex mh-speed-contract-folder
6231 @item Contract Nested Folders (@kbd{-})
6232 Contracts or collapses the selected folder in the speedbar, hiding the
6233 children folders inside it (@code{mh-speed-contract-folder}).
6234 @c -------------------------
6235 @findex mh-speed-refresh
6236 @item Refresh Speedbar (@kbd{r})
6237 Regenerates the list of folders in the speedbar. Run this command if
6238 you've added or deleted a folder, or want to update the unseen message
6239 count before the next automatic update (@code{mh-speed-refresh}).
6240 @end table
6241
6242 @findex delete-frame
6243 @kindex C-x 5 0
6244 @kindex Mouse-3
6245
6246 You can click on @kbd{Mouse-3} to bring up a context menu that
6247 contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
6248 (@code{delete-frame}).
6249
6250 @cindex @command{flists}
6251 @cindex MH commands, @command{flists}
6252 @cindex @samp{mh-speedbar} customization group
6253 @cindex customization group, @samp{mh-speedbar}
6254
6255 The MH-E speedbar uses the MH command @command{flists}@footnote{See
6256 the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for
6257 Sequences with flist} in the MH book.} to generate the list of
6258 folders. The @samp{mh-speedbar} customization group contains the
6259 following option which controls how often the speedbar calls
6260 @command{flists}.
6261
6262 @vtable @code
6263 @item mh-speed-update-interval
6264 Time between speedbar updates in seconds (default: 60). Set to 0 to
6265 disable automatic update.
6266 @end vtable
6267
6268 You can modify the appearance of the folders in the speedbar by
6269 customizing the following faces.
6270
6271 @vtable @code
6272 @item mh-speedbar-folder
6273 Basic folder face.
6274 @c -------------------------
6275 @item mh-speedbar-folder-with-unseen-messages
6276 Folder face when folder contains unread messages.
6277 @c -------------------------
6278 @item mh-speedbar-selected-folder
6279 Selected folder face.
6280 @c -------------------------
6281 @item mh-speedbar-selected-folder-with-unseen-messages
6282 Selected folder face when folder contains unread messages.
6283 @end vtable
6284
6285 @node Menu Bar, Tool Bar, Speedbar, Top
6286 @chapter The Menu Bar
6287
6288 @cindex @samp{Folder} menu
6289 @cindex @samp{Identity} menu
6290 @cindex @samp{Letter} menu
6291 @cindex @samp{Message} menu
6292 @cindex @samp{Search} menu
6293 @cindex @samp{Sequence} menu
6294 @cindex Folder menu
6295 @cindex Identity menu
6296 @cindex Letter menu
6297 @cindex MH-Folder mode
6298 @cindex MH-Letter mode
6299 @cindex MH-Search mode
6300 @cindex Message menu
6301 @cindex Search menu
6302 @cindex Sequence menu
6303 @cindex menu bar
6304 @cindex menu, Folder
6305 @cindex menu, Identity
6306 @cindex menu, Letter
6307 @cindex menu, Message
6308 @cindex menu, Search
6309 @cindex menu, Sequence
6310 @cindex menu, @samp{Folder}
6311 @cindex menu, @samp{Identity}
6312 @cindex menu, @samp{Letter}
6313 @cindex menu, @samp{Message}
6314 @cindex menu, @samp{Search}
6315 @cindex menu, @samp{Sequence}
6316 @cindex modes, MH-Folder
6317 @cindex modes, MH-Letter
6318 @cindex modes, MH-Search
6319
6320 For those of you who prefer to mouse and menu instead of using the
6321 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its
6322 functions. The MH-Folder buffer adds the @samp{Folder},
6323 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds
6324 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds
6325 the @samp{Search} menu. There's no need to list the actual items here,
6326 as you can more easily see them for yourself, and the functions are
6327 already described elsewhere in this manual.
6328
6329 For a description of the menu bar, please
6330 @ifnothtml
6331 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}.
6332 @end ifnothtml
6333 @ifhtml
6334 see the section
6335 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html,
6336 The Menu Bar} in @cite{The GNU Emacs Manual}.
6337 @end ifhtml
6338
6339 The Emacs manual describes how to get online help for a particular
6340 menu item. You can also look up a menu item in the index of this
6341 manual in two ways: all of the menu items are listed alphabetically,
6342 and you can also browse all of the items under the index entry
6343 @samp{menu item}.
6344
6345 @node Tool Bar, Searching, Menu Bar, Top
6346 @chapter The Tool Bar
6347
6348 @cindex tool bar
6349
6350 Emacs also provides a graphical tool bar. For a description of the
6351 tool bar, please
6352 @ifnothtml
6353 @xref{Tool Bars, , Tool Bars, emacs, The GNU Emacs Manual}.
6354 @end ifnothtml
6355 @ifhtml
6356 see the section
6357 @uref{http://www.gnu.org/software/emacs/manual/html_node/Tool-Bars.html,
6358 Tool Bars} in @cite{The GNU Emacs Manual}.
6359 @end ifhtml
6360
6361 @cindex @samp{mh-tool-bar} customization group
6362 @cindex customization group, @samp{mh-tool-bar}
6363
6364 MH-E adds several icons to this tool bar; you can modify the MH-E
6365 aspects of the tool bar via the @samp{mh-tool-bar} customization group.
6366
6367 @vtable @code
6368 @item mh-tool-bar-folder-buttons
6369 List of buttons to include in MH-Folder tool bar (default: a checklist
6370 too long to list here).
6371 @c -------------------------
6372 @item mh-tool-bar-letter-buttons
6373 List of buttons to include in MH-Letter tool bar (default: a checklist
6374 too long to list here).
6375 @c -------------------------
6376 @item mh-tool-bar-search-function
6377 Function called by the tool bar search button (default:
6378 @code{mh-search}).
6379 @c -------------------------
6380 @item mh-xemacs-tool-bar-position
6381 Tool bar location (default: @samp{Same As Default Tool Bar}).
6382 @c -------------------------
6383 @item mh-xemacs-use-tool-bar-flag
6384 If on, use tool bar (default: on, if supported).
6385 @end vtable
6386
6387 In GNU Emacs, icons for some of MH-E's functions are added to the tool
6388 bar. In XEmacs, you have the opportunity to create a separate tool bar for
6389 the MH-E icons.
6390
6391 @vindex mh-tool-bar-folder-buttons
6392 @vindex mh-tool-bar-letter-buttons
6393
6394 In either case, you can select which of these functions you'd like to
6395 see by customizing the options @code{mh-tool-bar-folder-buttons} and
6396 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former
6397 customizes the tool bar in MH-Folder mode and the latter in MH-Letter
6398 mode. Both of these options present you with a list of functions;
6399 check the functions whose icons you want to see and clear the check
6400 boxes for those you don't.
6401
6402 @findex mh-search
6403 @vindex mh-tool-bar-search-function
6404
6405 The function associated with the searching icon can be set via the
6406 option @code{mh-tool-bar-search-function}. By default, this is set to
6407 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other
6408 Function} from the @samp{Value Menu} and enter a function of your own
6409 choosing.
6410
6411 @vindex mh-xemacs-use-tool-bar-flag
6412
6413 XEmacs provides a couple of extra options. The first,
6414 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E
6415 icons at all. By default, this option is turned on if the window
6416 system supports tool bars. If your system doesn't support tool bars,
6417 then you won't be able to turn on this option.
6418
6419 @vindex mh-xemacs-tool-bar-position
6420
6421 The second extra option is @code{mh-xemacs-tool-bar-position} which
6422 controls the placement of the tool bar along the four edges of the
6423 frame. You can choose from one of @samp{Same As Default Tool Bar},
6424 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this
6425 variable is set to anything other than @samp{Same As Default Tool Bar}
6426 and the default tool bar is in a different location, then two tool
6427 bars will be displayed: the MH-E tool bar and the default tool bar.
6428
6429 @node Searching, Threading, Tool Bar, Top
6430 @chapter Searching Through Messages
6431
6432 @cindex @samp{Search} menu
6433 @cindex menu, @samp{Search}
6434 @cindex searching
6435 @findex mh-search
6436 @kindex F s
6437
6438 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which
6439 helps you find messages that lie buried in your folders
6440 (@pxref{Folders}). This chapter covers this command in more detail.
6441 Several commands are used to compose the search criteria and to start
6442 searching. A couple of them can be found in the @samp{Search} menu.
6443
6444 @table @kbd
6445 @kindex C-c ?
6446 @findex mh-help
6447 @item C-c ?
6448 Display cheat sheet for the MH-E commands (@code{mh-help}).
6449 @c -------------------------
6450 @cindex @samp{Search > Perform Search} menu item
6451 @cindex menu item, @samp{Search > Perform Search}
6452 @kindex C-c C-c
6453 @findex mh-index-do-search
6454 @item C-c C-c
6455 Find messages using @code{mh-search-program}
6456 (@code{mh-index-do-search}).
6457 @c -------------------------
6458 @cindex @samp{Search > Search with pick} menu item
6459 @cindex menu item, @samp{Search > Search with pick}
6460 @kindex C-c C-p
6461 @findex mh-pick-do-search
6462 @item C-c C-p
6463 Find messages using @command{pick} (@code{mh-pick-do-search}).
6464 @c -------------------------
6465 @kindex C-c ?
6466 @findex mh-help
6467 @item C-c ?
6468 Display cheat sheet for the MH-E commands (@code{mh-help}).
6469 @c -------------------------
6470 @kindex C-c C-f C-a
6471 @kindex C-c C-f a
6472 @findex mh-to-field
6473 @item C-c C-f a
6474 @itemx C-c C-f C-a
6475 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
6476 @c -------------------------
6477 @kindex C-c C-f C-b
6478 @kindex C-c C-f b
6479 @item C-c C-f b
6480 @itemx C-c C-f C-b
6481 Move to @samp{Bcc:} header field (@code{mh-to-field}).
6482 @c -------------------------
6483 @kindex C-c C-f C-c
6484 @kindex C-c C-f c
6485 @item C-c C-f c
6486 @itemx C-c C-f C-c
6487 Move to @samp{Cc:} header field (@code{mh-to-field}).
6488 @c -------------------------
6489 @kindex C-c C-f C-d
6490 @kindex C-c C-f d
6491 @item C-c C-f d
6492 @itemx C-c C-f C-d
6493 Move to @samp{Dcc:} header field (@code{mh-to-field}).
6494 @c -------------------------
6495 @kindex C-c C-f C-f
6496 @kindex C-c C-f f
6497 @item C-c C-f f
6498 @itemx C-c C-f C-f
6499 Move to @samp{Fcc:} header field (@code{mh-to-field}).
6500 @c -------------------------
6501 @kindex C-c C-f C-l
6502 @kindex C-c C-f l
6503 @item C-c C-f l
6504 @itemx C-c C-f C-l
6505 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
6506 @c -------------------------
6507 @kindex C-c C-f C-m
6508 @kindex C-c C-f m
6509 @item C-c C-f m
6510 @itemx C-c C-f C-m
6511 Move to @samp{From:} header field (@code{mh-to-field}).
6512 @c -------------------------
6513 @kindex C-c C-f C-r
6514 @kindex C-c C-f r
6515 @item C-c C-f r
6516 @itemx C-c C-f C-r
6517 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
6518 @c -------------------------
6519 @kindex C-c C-f C-s
6520 @kindex C-c C-f s
6521 @item C-c C-f s
6522 @itemx C-c C-f C-s
6523 Move to @samp{Subject:} header field (@code{mh-to-field}).
6524 @c -------------------------
6525 @kindex C-c C-f C-t
6526 @kindex C-c C-f t
6527 @item C-c C-f t
6528 @itemx C-c C-f C-t
6529 Move to @samp{To:} header field (@code{mh-to-field}).
6530 @end table
6531
6532 Another few commands are available in the MH-Folder buffer resulting
6533 from a search.
6534
6535 @table @kbd
6536 @kindex @key{TAB}
6537 @findex mh-index-next-folder
6538 @item @key{TAB}
6539 Jump to the next folder marker (@code{mh-index-next-folder}).
6540 @c -------------------------
6541 @kindex S-@key{TAB}
6542 @findex mh-index-previous-folder
6543 @item S-@key{TAB}
6544 Jump to the previous folder marker (@code{mh-index-previous-folder}).
6545 @c -------------------------
6546 @kindex v
6547 @findex mh-index-visit-folder
6548 @item v
6549 Visit original folder from where the message at point was found
6550 (@code{mh-index-visit-folder}).
6551 @end table
6552
6553 @cindex @samp{mh-search} customization group
6554 @cindex customization group, @samp{mh-search}
6555
6556 There is one option from the @samp{mh-search} customization group used
6557 in searching.
6558
6559 @vtable @code
6560 @item mh-search-program
6561 Search program that MH-E shall use (default: @samp{Auto-detect}).
6562 @end vtable
6563
6564 The following hook is available.
6565
6566 @vtable @code
6567 @item mh-search-mode-hook
6568 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}).
6569 @end vtable
6570
6571 The following face is available.
6572
6573 @vtable @code
6574 @item mh-search-folder
6575 Folder heading face in MH-Folder buffers created by searches.
6576 @end vtable
6577
6578 @findex mh-search-folder
6579 @kindex F s
6580
6581 The command @kbd{F s} (@code{mh-search-folder}) helps you find
6582 messages in your entire corpus of mail. You can search for messages to
6583 or from a particular person or about a particular subject. In fact,
6584 you can also search for messages containing selected strings in any
6585 arbitrary header field or any string found within the messages.
6586
6587 @cindex @command{pick}
6588 @cindex MH commands, @command{pick}
6589
6590 Out of the box, MH-E uses @command{pick} to find messages. With a
6591 little extra effort, you can set an indexing program which rewards you
6592 with extremely quick results. The drawback is that sometimes the index
6593 does not contain the words you're looking for. You can still use
6594 @command{pick} in these situations.
6595
6596 You are prompted for the folder to search. This can be @samp{all} to
6597 search all folders. Note that the search works recursively on the
6598 listed folder.
6599
6600 @cindex MH-Search mode
6601 @cindex modes, MH-Search
6602
6603 Next, an MH-Search buffer appears where you can enter search criteria.
6604
6605 @cartouche
6606 @smallexample
6607 From:
6608 To:
6609 Cc:
6610 Date:
6611 Subject:
6612 --------
6613 #
6614
6615
6616
6617
6618
6619
6620
6621
6622 --:** search-pattern All L7 (MH-Search)---------------------------
6623 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
6624 @end smallexample
6625 @end cartouche
6626 @i{Search window}
6627
6628 @cindex @command{pick}
6629 @cindex MH commands, @command{pick}
6630
6631 Edit this template by entering your search criteria in an appropriate
6632 header field that is already there, or create a new field yourself. If
6633 the string you're looking for could be anywhere in a message, then
6634 place the string underneath the row of dashes.
6635
6636 As an example, let's say that we want to find messages from Ginnean
6637 about horseback riding in the Kosciusko National Park (Australia)
6638 during January, 1994. Normally we would start with a broad search and
6639 narrow it down if necessary to produce a manageable amount of data,
6640 but we'll cut to the chase and create a fairly restrictive set of
6641 criteria as follows:
6642
6643 @smallexample
6644 @group
6645 From: ginnean
6646 To:
6647 Cc:
6648 Date: Jan 1994
6649 Subject:
6650 --------
6651 horse
6652 kosciusko
6653 @end group
6654 @end smallexample
6655
6656 @findex mh-to-field
6657 @kindex C-c C-f C-t
6658
6659 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f
6660 C-t} (@code{mh-to-field}) to help you fill in the blanks.
6661 @xref{Editing Message}.
6662
6663 @kindex F s
6664 @vindex mh-search-mode-hook
6665
6666 If you find that you do the same thing over and over when editing the
6667 search template, you may wish to bind some shortcuts to keys. This can
6668 be done with the variable @code{mh-search-mode-hook}, which is called
6669 when @kbd{F s} is run on a new pattern.
6670
6671 @findex mh-index-do-search
6672 @findex mh-pick-do-search
6673 @kindex C-c C-c
6674 @kindex C-c C-p
6675
6676 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}).
6677 Sometimes you're searching for text that is either not indexed, or
6678 hasn't been indexed yet. In this case you can override the default
6679 method with the pick method by running the command @kbd{C-c C-p}
6680 (@code{mh-pick-do-search}).
6681
6682 @cindex folders, @samp{+mhe-index}
6683 @cindex @samp{+mhe-index}
6684 @findex mh-index-next-folder
6685 @findex mh-index-previous-folder
6686 @kindex @key{TAB}
6687 @kindex S-@key{TAB}
6688 @vindex mh-search-folder
6689
6690 The messages that are found are put in a temporary sub-folder of
6691 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This
6692 buffer is special because it displays messages from multiple folders;
6693 each set of messages from a given folder has a heading with the folder
6694 name. The appearance of the heading can be modified by customizing the
6695 face @code{mh-search-folder}. You can jump back and forth between the
6696 headings using the commands @kbd{@key{TAB}}
6697 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}}
6698 (@code{mh-index-previous-folder}).
6699
6700 @findex mh-index-visit-folder
6701 @findex mh-rescan-folder
6702 @kindex F r
6703 @kindex v
6704
6705 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be
6706 used to visit the folder of the message at point. Initially, only the
6707 messages that matched the search criteria are displayed in the folder.
6708 While the temporary buffer has its own set of message numbers, the
6709 actual messages numbers are shown in the visited folder. Thus, the
6710 command @kbd{v} is useful to find the actual message number of an
6711 interesting message, or to view surrounding messages with the command
6712 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}.
6713
6714 @findex mh-kill-folder
6715 @kindex F k
6716
6717 Because this folder is temporary, you'll probably get in the habit of
6718 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}).
6719 @xref{Folders}.
6720
6721 @kindex F s
6722
6723 You can regenerate the results by running @kbd{F s} with a prefix
6724 argument.
6725
6726 @cindex @command{procmail}
6727 @cindex Unix commands, @command{procmail}
6728 @cindex @samp{X-MHE-Checksum:} header field
6729 @cindex header field, @samp{X-MHE-Checksum:}
6730
6731 Note: This command uses an @samp{X-MHE-Checksum:} header field to
6732 cache the MD5 checksum of a message. This means that if an incoming
6733 message already contains an @samp{X-MHE-Checksum:} field, that message
6734 might not be found by this command. The following @command{procmail}
6735 recipe avoids this problem by renaming the existing header field:
6736
6737 @smallexample
6738 @group
6739 :0 wf
6740 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum"
6741 @end group
6742 @end smallexample
6743
6744 @xref{Limits}, for an alternative interface to searching.
6745
6746 @section Configuring Indexed Searches
6747
6748 @cindex @command{grep}
6749 @cindex @command{mairix}
6750 @cindex @command{namazu}
6751 @cindex @command{pick}
6752 @cindex @command{swish++}
6753 @cindex @command{swish-e}
6754 @cindex Unix commands, @command{grep}
6755 @cindex Unix commands, @command{mairix}
6756 @cindex Unix commands, @command{namazu}
6757 @cindex Unix commands, @command{pick}
6758 @cindex Unix commands, @command{swish++}
6759 @cindex Unix commands, @command{swish-e}
6760 @findex mh-search
6761 @kindex F s
6762 @vindex mh-search-program
6763
6764 The command @kbd{F s} (@code{mh-search}) runs the command defined by
6765 the option @code{mh-search-program}. The default value is
6766 @samp{Auto-detect} which means that MH-E will automatically choose one
6767 of @command{swish++}, @command{swish-e}, @command{mairix},
6768 @command{namazu}, @command{pick} and @command{grep} in that order. If,
6769 for example, you have both @command{swish++} and @command{mairix}
6770 installed and you want to use @command{mairix}, then you can set this
6771 option to @samp{mairix}.
6772
6773 The following sub-sections describe how to set up the various indexing
6774 programs to use with MH-E.
6775
6776 @subsection swish++
6777
6778 @cindex @command{swish++}
6779 @cindex Unix commands, @command{swish++}
6780
6781 In the examples below, replace @file{/home/user/Mail} with the path to
6782 your MH directory.
6783
6784 First create the directory @file{/home/user/Mail/.swish++}. Then
6785 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the
6786 following contents:
6787
6788 @smallexample
6789 @group
6790 IncludeMeta Bcc Cc Comments Content-Description From Keywords
6791 IncludeMeta Newsgroups Resent-To Subject To
6792 IncludeMeta Message-Id References In-Reply-To
6793 IncludeFile Mail *
6794 IndexFile /home/user/Mail/.swish++/swish++.index
6795 @end group
6796 @end smallexample
6797
6798 Use the following command line to generate the swish index. Run this
6799 daily from cron:
6800
6801 @smallexample
6802 @group
6803 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \
6804 -o -path /home/user/Mail/.swish++ -prune \
6805 -o -name "[0-9]*" -print \
6806 | index -c /home/user/Mail/.swish++/swish++.conf -
6807 @end group
6808 @end smallexample
6809
6810 This command does not index the folders that hold the results of your
6811 searches in @samp{+mhe-index} since they tend to be ephemeral and the
6812 original messages are indexed anyway.
6813
6814 @cindex @command{index}
6815 @cindex Unix commands, @command{index}
6816 @cindex @command{index++}
6817 @cindex Unix commands, @command{index++}
6818
6819 On some systems (Debian GNU/Linux, for example), use @command{index++}
6820 instead of @command{index}.
6821
6822 @subsection swish
6823
6824 @cindex @command{swish-e}
6825 @cindex Unix commands, @command{swish-e}
6826
6827 In the examples below, replace @file{/home/user/Mail} with the path to
6828 your MH directory.
6829
6830 First create the directory @file{/home/user/Mail/.swish}. Then create
6831 the file @file{/home/user/Mail/.swish/config} with the following
6832 contents:
6833
6834 @smallexample
6835 @group
6836 DefaultContents TXT*
6837 IndexDir /home/user/Mail
6838 IndexFile /home/user/Mail/.swish/index
6839 IndexName "Mail Index"
6840 IndexDescription "Mail Index"
6841 IndexPointer "http://nowhere"
6842 IndexAdmin "nobody"
6843 #MetaNames automatic
6844 IndexReport 3
6845 FollowSymLinks no
6846 UseStemming no
6847 IgnoreTotalWordCountWhenRanking yes
6848 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
6849 BeginCharacters abcdefghijklmnopqrstuvwxyz
6850 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
6851 IgnoreLimit 50 1000
6852 IndexComments 0
6853 FileRules filename contains \D
6854 FileRules pathname contains /home/user/Mail/.swish
6855 FileRules pathname contains /home/user/Mail/mhe-index
6856 FileRules filename is index
6857 @end group
6858 @end smallexample
6859
6860 This configuration does not index the folders that hold the results of
6861 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6862 the original messages are indexed anyway.
6863
6864 If there are any directories you would like to ignore, append lines
6865 like the following to @file{config}:
6866
6867 @smallexample
6868 FileRules pathname contains /home/user/Mail/scripts
6869 @end smallexample
6870
6871 @cindex @command{swish-e}
6872 @cindex Unix commands, @command{swish-e}
6873
6874 Use the following command line to generate the swish index. Run this
6875 daily from cron:
6876
6877 @smallexample
6878 swish-e -c /home/user/Mail/.swish/config
6879 @end smallexample
6880
6881 @subsection mairix
6882
6883 @cindex @command{mairix}
6884 @cindex Unix commands, @command{mairix}
6885
6886 In the examples below, replace @file{/home/user/Mail} with the path to
6887 your MH directory.
6888
6889 First create the directory @file{/home/user/Mail/.mairix}. Then create
6890 the file @file{/home/user/Mail/.mairix/config} with the following
6891 contents:
6892
6893 @smallexample
6894 @group
6895 base=/home/user/Mail
6896
6897 # List of folders that should be indexed. 3 dots at the end means there
6898 # are subfolders within the folder
6899 mh=archive...:inbox:drafts:news:sent:trash
6900
6901 vfolder_format=raw
6902 database=/home/user/Mail/mairix/database
6903 @end group
6904 @end smallexample
6905
6906 Use the following command line to generate the mairix index. Run this daily
6907 from cron:
6908
6909 @smallexample
6910 mairix -f /home/user/Mail/.mairix/config
6911 @end smallexample
6912
6913 @subsection namazu
6914
6915 @cindex @command{namazu}
6916 @cindex Unix commands, @command{namazu}
6917
6918 In the examples below, replace @file{/home/user/Mail} with the path to
6919 your MH directory.
6920
6921 First create the directory @file{/home/user/Mail/.namazu}. Then create
6922 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following
6923 contents:
6924
6925 @smallexample
6926 @group
6927 package conf; # Don't remove this line!
6928 $ADDRESS = 'user@@localhost';
6929 $ALLOW_FILE = "[0-9]*";
6930 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)";
6931 @end group
6932 @end smallexample
6933
6934 This configuration does not index the folders that hold the results of
6935 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6936 the original messages are indexed anyway.
6937
6938 Use the following command line to generate the namazu index. Run this
6939 daily from cron:
6940
6941 @smallexample
6942 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
6943 /home/user/Mail
6944 @end smallexample
6945
6946 @subsection pick
6947
6948 @cindex @command{pick}
6949 @cindex MH commands, @command{pick}
6950
6951 This search method does not require any setup.
6952
6953 Read @command{pick}(1) or the section
6954 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
6955 the MH book to find out more about how to enter the criteria.
6956
6957 @subsection grep
6958
6959 @cindex @command{grep}
6960 @cindex Unix commands, @command{grep}
6961
6962 This search method does not require any setup.
6963
6964 Unlike the other search methods, this method does not use the
6965 MH-Search buffer. Instead, you simply enter a regular expression in
6966 the minibuffer. For help in constructing regular expressions, see your
6967 man page for @command{grep}.
6968
6969 @node Threading, Limits, Searching, Top
6970 @chapter Viewing Message Threads
6971
6972 @cindex threading
6973
6974 MH-E groups messages by @dfn{threads} which are messages that are part
6975 of the same discussion and usually all have the same @samp{Subject:}
6976 header field. Other ways to organize messages in a folder include
6977 limiting (@pxref{Limits}) or using full-text indexed searches
6978 (@pxref{Searching}).
6979
6980 @cindex root, in threads
6981 @cindex siblings, in threads
6982 @cindex ancestor, in threads
6983
6984 A thread begins with a single message called a @dfn{root}. All replies
6985 to the same message are @dfn{siblings} of each other. Any message that
6986 has replies to it is an @dfn{ancestor} of those replies.
6987
6988 There are several commands that you can use to navigate and operate on
6989 threads.
6990
6991 @table @kbd
6992 @kindex T ?
6993 @findex mh-prefix-help
6994 @item T ?
6995 Display cheat sheet for the commands of the current prefix in
6996 minibuffer (@code{mh-prefix-help}).
6997 @c -------------------------
6998 @kindex T o
6999 @findex mh-thread-refile
7000 @item T o
7001 Refile (output) thread into folder (@code{mh-thread-refile}).
7002 @c -------------------------
7003 @kindex T d
7004 @findex mh-thread-delete
7005 @item T d
7006 Delete thread (@code{mh-thread-delete}).
7007 @c -------------------------
7008 @kindex T t
7009 @findex mh-toggle-threads
7010 @item T t
7011 Toggle threaded view of folder (@code{mh-toggle-threads}).
7012 @c -------------------------
7013 @kindex T n
7014 @findex mh-thread-next-sibling
7015 @item T n
7016 Display next sibling (@code{mh-thread-next-sibling}).
7017 @c -------------------------
7018 @kindex T p
7019 @findex mh-thread-previous-sibling
7020 @item T p
7021 Display previous sibling (@code{mh-thread-previous-sibling}).
7022 @c -------------------------
7023 @kindex T u
7024 @findex mh-thread-ancestor
7025 @item T u
7026 Display ancestor of current message (@code{mh-thread-ancestor}).
7027 @end table
7028
7029 @cindex @samp{mh-thread} customization group
7030 @cindex customization group, @samp{mh-thread}
7031
7032 The @samp{mh-thread} customization group contains one option.
7033
7034 @vtable @code
7035 @item mh-show-threads-flag
7036 On means new folders start in threaded mode (default: @samp{off}).
7037 @end vtable
7038
7039 @findex mh-toggle-threads
7040 @kindex T t
7041 @vindex mh-large-folder
7042 @vindex mh-show-threads-flag
7043
7044 Threading large number of messages can be time consuming so the option
7045 @code{mh-show-threads-flag} is turned off by default. If you turn on
7046 this option, then threading will be done only if the number of
7047 messages being threaded is less than @code{mh-large-folder}. In any
7048 event, threading can be turned on (and off) with the command @kbd{T t}
7049 (@code{mh-toggle-threads}).
7050
7051 @findex mh-thread-ancestor
7052 @findex mh-thread-next-sibling
7053 @findex mh-thread-previous-sibling
7054 @kindex T n
7055 @kindex T p
7056 @kindex T u
7057
7058 There are a few commands to help you navigate threads. If you do not
7059 care for the way a particular thread has turned, you can move up the
7060 chain of messages with the command @kbd{T u}
7061 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n}
7062 (@code{mh-thread-next-sibling} or @kbd{T p}
7063 (@code{mh-thread-previous-sibling}) to jump to the next or previous
7064 sibling, skipping the sub-threads. The command @kbd{T u} can also take
7065 a prefix argument to jump to the message that started everything.
7066
7067 @findex mh-delete-subject-or-thread
7068 @findex mh-thread-delete
7069 @findex mh-thread-refile
7070 @kindex k
7071 @kindex T d
7072 @kindex T o
7073
7074 There are threaded equivalents for the commands that delete and refile
7075 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the
7076 current message and all its children. Similarly, the command @kbd{T d}
7077 (@code{mh-thread-delete}) deletes the current message and all its
7078 children. These commands do not refile or delete sibling messages.
7079 @xref{Navigating}, for a description of the similar command @kbd{k}
7080 (@code{mh-delete-subject-or-thread}).
7081
7082 @vindex mh-large-folder
7083
7084 If you find that threading is too slow, it may be that you have
7085 @code{mh-large-folder} set too high. Also, threading is one of the few
7086 features of MH-E that really benefits from compiling. If you haven't
7087 compiled MH-E, I encourage you to do so@footnote{If you're not sure if
7088 MH-E has been byte-compiled, you could try running @samp{locate
7089 mh-thread.elc} or otherwise find MH-E on your system and ensure that
7090 @file{mh-thread.elc} exists. If you have multiple versions and you
7091 find that one is compiled but the other is not, then go into your
7092 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and
7093 ensure that the byte-compiled version appears first in the
7094 @code{load-path}. If you find that MH-E is not compiled and you
7095 installed MH-E yourself, please refer to the installation directions
7096 in the file @file{README} in the distribution.}.
7097
7098 @node Limits, Sequences, Threading, Top
7099 @chapter Limiting Display
7100
7101 @cindex limits
7102 @cindex filters
7103
7104 Another way to organize messages in a folder besides threading
7105 (@pxref{Threading}) or using full-text indexed searches
7106 (@pxref{Searching}) is by limiting the folder display to messages that
7107 are similar to the current message.
7108
7109 @table @kbd
7110 @kindex / ?
7111 @findex mh-prefix-help
7112 @item / ?
7113 Display cheat sheet for the commands of the current prefix in
7114 minibuffer (@code{mh-prefix-help}).
7115 @c -------------------------
7116 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7117 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7118 @kindex / '
7119 @findex mh-narrow-to-tick
7120 @item / '
7121 Limit to messages in the @samp{tick} sequence
7122 (@code{mh-narrow-to-tick}).
7123 @c -------------------------
7124 @kindex / c
7125 @findex mh-narrow-to-cc
7126 @item / c
7127 Limit to messages with the same @samp{Cc:} field
7128 (@code{mh-narrow-to-cc}).
7129 @c -------------------------
7130 @kindex / m
7131 @findex mh-narrow-to-from
7132 @item / m
7133 Limit to messages with the same @samp{From:} field
7134 (@code{mh-narrow-to-from}).
7135 @c -------------------------
7136 @kindex / g
7137 @findex mh-narrow-to-range
7138 @item / g
7139 Limit to range (@code{mh-narrow-to-range}).
7140 @c -------------------------
7141 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item
7142 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence}
7143 @kindex / s
7144 @findex mh-narrow-to-subject
7145 @item / s
7146 Limit to messages with the same @samp{Subject:} field
7147 (@code{mh-narrow-to-subject}).
7148 @c -------------------------
7149 @kindex / t
7150 @findex mh-narrow-to-to
7151 @item / t
7152 Limit to messages with the same @samp{To:} field
7153 (@code{mh-narrow-to-to}).
7154 @c -------------------------
7155 @cindex @samp{Sequence > Widen from Sequence} menu item
7156 @cindex menu item, @samp{Sequence > Widen from Sequence}
7157 @kindex / w
7158 @findex mh-widen
7159 @item / w
7160 Remove last restriction (@code{mh-widen}).
7161 @end table
7162
7163 All of the limiting commands above refine the display in some way.
7164
7165 @cindex @command{pick}
7166 @cindex MH commands, @command{pick}
7167 @findex mh-narrow-to-cc
7168 @findex mh-narrow-to-from
7169 @findex mh-narrow-to-subject
7170 @findex mh-narrow-to-to
7171 @kindex / c
7172 @kindex / m
7173 @kindex / s
7174 @kindex / t
7175
7176 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m}
7177 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}),
7178 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to
7179 messages matching the content of the respective field in the current
7180 message. However, you can give any of these a prefix argument to edit
7181 the @command{pick} expression used to narrow the view@footnote{See
7182 @command{pick}(1) or the section
7183 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
7184 the MH book.}.
7185
7186 @cindex @samp{tick} sequence
7187 @cindex sequence, @samp{tick}
7188 @cindex ticked messages, viewing
7189 @findex mh-narrow-to-range
7190 @findex mh-narrow-to-tick
7191 @kindex / '
7192 @kindex / g
7193
7194 You can also limit the display to messages in the @samp{tick} sequence
7195 with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
7196 @xref{Sequences}, for information on putting message into the
7197 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range})
7198 command to limit the display to messages in a range (@pxref{Ranges}).
7199
7200 @findex mh-widen
7201 @kindex / w
7202
7203 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen})
7204 command. Give this command a prefix argument to remove all limits.
7205
7206 @node Sequences, Junk, Limits, Top
7207 @chapter Using Sequences
7208
7209 @cindex @samp{Sequence} menu
7210 @cindex menu, @samp{Sequence}
7211 @cindex sequences
7212
7213 For the whole scoop on MH sequences, refer to
7214 @samp{mh-sequence}(5)@footnote{See the section
7215 @uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH
7216 book.}. As you've read, several of the MH-E commands can operate on a
7217 sequence, which is a shorthand for a range or group of messages. For
7218 example, you might want to forward several messages to a friend or
7219 colleague. Here's how to manipulate sequences. These commands are also
7220 available in the @samp{Sequence} menu.
7221
7222 @table @kbd
7223 @cindex @samp{Sequence > Toggle Tick Mark} menu item
7224 @cindex menu item, @samp{Sequence > Toggle Tick Mark}
7225 @kindex '
7226 @findex mh-toggle-tick
7227 @item '
7228 Toggle tick mark of range (@code{mh-toggle-tick}).
7229 @c -------------------------
7230 @kindex S ?
7231 @findex mh-prefix-help
7232 @item S ?
7233 Display cheat sheet for the commands of the current prefix in
7234 minibuffer (@code{mh-prefix-help}).
7235 @c -------------------------
7236 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7237 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7238 @kindex S '
7239 @findex mh-narrow-to-tick
7240 @item S '
7241 Limit to ticked messages (@code{mh-narrow-to-tick}).
7242 @c -------------------------
7243 @cindex @samp{Sequence > Delete Message from Sequence...} menu item
7244 @cindex menu item, @samp{Sequence > Delete Message from Sequence...}
7245 @kindex S d
7246 @findex mh-delete-msg-from-seq
7247 @item S d
7248 Delete range from sequence (@code{mh-delete-msg-from-seq}).
7249 @c -------------------------
7250 @cindex @samp{Sequence > Delete Sequence...} menu item
7251 @cindex menu item, @samp{Sequence > Delete Sequence...}
7252 @kindex S k
7253 @findex mh-delete-seq
7254 @item S k
7255 Delete sequence (@code{mh-delete-seq}).
7256 @c -------------------------
7257 @cindex @samp{Sequence > List Sequences in Folder...} menu item
7258 @cindex menu item, @samp{Sequence > List Sequences in Folder...}
7259 @kindex S l
7260 @findex mh-list-sequences
7261 @item S l
7262 List all sequences in folder (@code{mh-list-sequences}).
7263 @c -------------------------
7264 @cindex @samp{Sequence > Narrow to Sequence...} menu item
7265 @cindex menu item, @samp{Sequence > Narrow to Sequence...}
7266 @kindex S n
7267 @findex mh-narrow-to-seq
7268 @item S n
7269 Restrict display to messages in sequence (@code{mh-narrow-to-seq}).
7270 @c -------------------------
7271 @cindex @samp{Sequence > Add Message to Sequence...} menu item
7272 @cindex menu item, @samp{Sequence > Add Message to Sequence...}
7273 @kindex S p
7274 @findex mh-put-msg-in-seq
7275 @item S p
7276 Add range to sequence (@code{mh-put-msg-in-seq}).
7277 @c -------------------------
7278 @cindex @samp{Sequence > List Sequences for Message} menu item
7279 @cindex menu item, @samp{Sequence > List Sequences for Message}
7280 @kindex S s
7281 @findex mh-msg-is-in-seq
7282 @item S s
7283 Display the sequences in which the current message appears
7284 (@code{mh-msg-is-in-seq}).
7285 @c -------------------------
7286 @cindex @samp{Sequence > Widen from Sequence} menu item
7287 @cindex menu item, @samp{Sequence > Widen from Sequence}
7288 @kindex S w
7289 @findex mh-widen
7290 @item S w
7291 Remove last restriction (@code{mh-widen}).
7292 @c -------------------------
7293 @findex mh-update-sequences
7294 @item M-x mh-update-sequences
7295 Flush MH-E's state out to MH@.
7296 @end table
7297
7298 @cindex @samp{mh-sequences} customization group
7299 @cindex customization group, @samp{mh-sequences}
7300
7301 The @samp{mh-sequences} customization group contains the options
7302 associated with sequences.
7303
7304 @vtable @code
7305 @item mh-refile-preserves-sequences-flag
7306 On means that sequences are preserved when messages are refiled
7307 (default: @samp{on}).
7308 @c -------------------------
7309 @item mh-tick-seq
7310 The name of the MH sequence for ticked messages (default: @samp{'tick}).
7311 @c -------------------------
7312 @item mh-update-sequences-after-mh-show-flag
7313 On means flush MH sequences to disk after message is shown (default:
7314 @samp{on}).
7315 @end vtable
7316
7317 The following hook is available.
7318
7319 @vtable @code
7320 @item mh-unseen-updated-hook
7321 Hook run after the unseen sequence has been updated (default: @code{nil}).
7322 @end vtable
7323
7324 @cindex @command{pick}
7325 @cindex MH commands, @command{pick}
7326 @findex mh-put-msg-in-seq
7327 @kindex S p
7328
7329 To place a message in a sequence, use @kbd{S p}
7330 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all
7331 the messages in a sequence to another sequence (for example, @kbd{C-u
7332 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}).
7333
7334 @cindex @samp{tick} sequence
7335 @cindex sequence, @samp{tick}
7336 @cindex ticking messages
7337 @findex mh-index-ticked-messages
7338 @findex mh-toggle-tick
7339 @kindex '
7340 @kindex F '
7341 @kindex S p
7342
7343 One specific use of the @kbd{S p} command is @kbd{'}
7344 (@code{mh-toggle-tick}) which adds messages to the @samp{tick}
7345 sequence. This sequence can be viewed later with the @kbd{F '}
7346 (@code{mh-index-ticked-messages}) command (@pxref{Folders}).
7347
7348 @vindex mh-tick-seq
7349
7350 You can customize the option @code{mh-tick-seq} if you already use the
7351 @samp{tick} sequence for your own use. You can also disable all of the
7352 ticking functions by choosing the @samp{Disable Ticking} item but
7353 there isn't much advantage to that.
7354
7355 @cindex MH-Folder mode
7356 @cindex modes, MH-Folder
7357 @findex mh-narrow-to-seq
7358 @findex mh-narrow-to-tick
7359 @findex mh-widen
7360 @kindex S '
7361 @kindex S n
7362 @kindex S w
7363
7364 Once you've placed some messages in a sequence, you may wish to narrow
7365 the field of view to just those messages in the sequence you've
7366 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are
7367 prompted for the name of the sequence. What this does is show only
7368 those messages that are in the selected sequence in the MH-Folder
7369 buffer. In addition, it limits further MH-E searches to just those
7370 messages. To narrow the view to the messages in the @samp{tick}
7371 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to
7372 widen the view to all your messages again, use @kbd{S w}
7373 (@code{mh-widen}).
7374
7375 @cindex buffers, @samp{*MH-E Sequences*}
7376 @cindex @samp{*MH-E Sequences*}
7377 @findex mh-list-sequences
7378 @findex mh-msg-is-in-seq
7379 @kindex S l
7380 @kindex S s
7381
7382 You can see which sequences in which a message appears with the
7383 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to
7384 display the sequences in which another message appears (as in @kbd{C-u
7385 42 S s @key{RET}}). Or, you can list all sequences in a selected
7386 folder (default is current folder) with @kbd{S l}
7387 (@code{mh-list-sequences}). The list appears in a buffer named
7388 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}).
7389
7390 @cindex MH profile component, @samp{Previous-Sequence:}
7391 @cindex @samp{cur} sequence
7392 @cindex @samp{Previous-Sequence:} MH profile component
7393 @cindex sequence, @samp{cur}
7394 @cindex sequence, @samp{Previous-Sequence}
7395 @vindex mh-refile-preserves-sequences-flag
7396
7397 If a message is in any sequence (except
7398 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and
7399 @samp{cur}) when it is refiled, then it will still be in those
7400 sequences in the destination folder. If this behavior is not desired,
7401 then turn off the option @code{mh-refile-preserves-sequences-flag}.
7402
7403 @findex mh-delete-msg-from-seq
7404 @findex mh-delete-seq
7405 @kindex d
7406 @kindex S d
7407 @kindex S k
7408
7409 If you want to remove a message (or range, @pxref{Ranges}) from a
7410 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want
7411 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In
7412 the latter case you are prompted for the sequence to delete. Note that
7413 this deletes only the sequence, not the messages in the sequence. If
7414 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading
7415 Mail}).
7416
7417 @cindex @samp{Unseen-Sequence:} MH profile component
7418 @cindex @samp{cur} sequence
7419 @cindex @samp{tick} sequence
7420 @cindex MH profile component, @samp{Unseen-Sequence:}
7421 @cindex sequence, @samp{Unseen-Sequence}
7422 @cindex sequence, @samp{cur}
7423 @cindex sequence, @samp{tick}
7424 @findex mh-update-sequences
7425 @kindex M-x mh-update-sequences
7426 @kindex q
7427 @kindex x
7428 @vindex mh-tick-seq
7429 @vindex mh-update-sequences-after-mh-show-flag
7430
7431 Three sequences are maintained internally by MH-E and pushed out to MH
7432 when a message is shown. They include the sequence specified by your
7433 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the
7434 sequence listed by the option @code{mh-tick-seq} which is @samp{tick}
7435 by default. If you do not like this behavior, turn off the option
7436 @code{mh-update-sequences-after-mh-show-flag}. You can then update the
7437 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x
7438 mh-update-sequences} commands.
7439
7440 @vindex mh-seen-list
7441 @vindex mh-unseen-updated-hook
7442
7443 The hook @code{mh-unseen-updated-hook} is run after the unseen
7444 sequence has been updated. The variable @code{mh-seen-list} can be
7445 used by this hook to obtain the list of messages which were removed
7446 from the unseen sequence.
7447
7448 @cindex @command{mark}
7449 @cindex MH commands, @command{mark}
7450 @kindex S n
7451 @kindex S w
7452
7453 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
7454 command dealing with sequences is @command{mark}@footnote{See the
7455 section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks
7456 with mark} in the MH book.}.
7457
7458 @node Junk, Miscellaneous, Sequences, Top
7459 @chapter Dealing With Junk Mail
7460
7461 @cindex Marshall Rose
7462 @cindex junk mail
7463 @cindex spam
7464
7465 Marshall Rose once wrote a paper on MH entitled, @cite{How to process
7466 200 messages a day and still get some real work done}. This chapter
7467 could be entitled, @cite{How to process 1000 spams a day and still get
7468 some real work done}.
7469
7470 @cindex blacklisting
7471 @cindex ham
7472 @cindex viruses
7473 @cindex whitelisting
7474 @cindex worms
7475
7476 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for
7477 any unwanted message which includes spam, @dfn{viruses}, and
7478 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying
7479 a sender as one who sends junk mail is called @dfn{blacklisting}; the
7480 opposite is called @dfn{whitelisting}.
7481
7482 @table @kbd
7483 @kindex J ?
7484 @findex mh-prefix-help
7485 @item J ?
7486 Display cheat sheet for the commands of the current prefix in
7487 minibuffer (@code{mh-prefix-help}).
7488 @c -------------------------
7489 @kindex J b
7490 @findex mh-junk-blacklist
7491 @item J b
7492 Blacklist range as spam (@code{mh-junk-blacklist}).
7493 @c -------------------------
7494 @kindex J w
7495 @findex mh-junk-whitelist
7496 @item J w
7497 Whitelist range as ham (@code{mh-junk-whitelist}).
7498 @c -------------------------
7499 @item @code{mh-spamassassin-identify-spammers}
7500 Identify spammers who are repeat offenders.
7501 @end table
7502
7503 @cindex @samp{mh-junk} customization group
7504 @cindex customization group, @samp{mh-junk}
7505
7506 The following table lists the options from the @samp{mh-junk}
7507 customization group.
7508
7509 @vtable @code
7510 @item mh-junk-background
7511 If on, spam programs are run in background (default: @samp{off}).
7512 @c -------------------------
7513 @item mh-junk-disposition
7514 Disposition of junk mail (default: @samp{Delete Spam}).
7515 @c -------------------------
7516 @item mh-junk-program
7517 Spam program that MH-E should use (default: @samp{Auto-detect}).
7518 @end vtable
7519
7520 @cindex SpamProbe
7521 @cindex Spamassassin
7522 @cindex bogofilter
7523 @cindex spam filters, SpamProbe
7524 @cindex spam filters, Spamassassin
7525 @cindex spam filters, bogofilter
7526
7527 MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin},
7528 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or
7529 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck
7530 away. This chapter describes briefly how to configure these programs
7531 to work well with MH-E and how to use MH-E's interface that provides
7532 continuing education for these programs.
7533
7534 @vindex mh-junk-program
7535
7536 The default setting of the option @code{mh-junk-program} is
7537 @samp{Auto-detect} which means that MH-E will automatically choose one
7538 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for
7539 example, you have both SpamAssassin and bogofilter installed and you
7540 want to use bogofilter, then you can set this option to
7541 @samp{Bogofilter}.
7542
7543 @findex mh-junk-blacklist
7544 @kindex J b
7545 @vindex mh-junk-disposition
7546
7547 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam
7548 program in use with the content of the range (@pxref{Ranges}) and then
7549 handles the message(s) as specified by the option
7550 @code{mh-junk-disposition}. By default, this option is set to
7551 @samp{Delete Spam} but you can also specify the name of the folder
7552 which is useful for building a corpus of spam for training purposes.
7553
7554 @findex mh-junk-whitelist
7555 @kindex J w
7556
7557 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist})
7558 reclassifies a range of messages (@pxref{Ranges}) as ham if it were
7559 incorrectly classified as spam. It then refiles the message into the
7560 @file{+inbox} folder.
7561
7562 @vindex mh-junk-background
7563
7564 By default, the programs are run in the foreground, but this can be
7565 slow when junking large numbers of messages. If you have enough memory
7566 or don't junk that many messages at the same time, you might try
7567 turning on the option @code{mh-junk-background}.
7568
7569 The following sections discuss the various counter-spam measures that
7570 MH-E can work with.
7571
7572 @cindex @file{.procmailrc}
7573 @cindex files, @file{.procmailrc}
7574
7575 @subheading SpamAssassin
7576
7577 @cindex Spamassassin
7578 @cindex spam filters, Spamassassin
7579
7580 SpamAssassin is one of the more popular spam filtering programs. Get
7581 it from your local distribution or from the
7582 @uref{http://spamassassin.apache.org/, SpamAssassin web site}.
7583
7584 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}:
7585
7586 @cindex @command{spamc}
7587 @cindex @samp{X-Spam-Level:} header field
7588 @cindex @samp{X-Spam-Status:} header field
7589 @cindex header field, @samp{X-Spam-Level:}
7590 @cindex header field, @samp{X-Spam-Status:}
7591
7592 @smallexample
7593 MAILDIR=$HOME/`mhparam Path`
7594
7595 # Fight spam with SpamAssassin.
7596 :0fw
7597 | spamc
7598
7599 # Anything with a spam level of 10 or more is junked immediately.
7600 :0:
7601 * ^X-Spam-Level: ..........
7602 /dev/null
7603
7604 :0:
7605 * ^X-Spam-Status: Yes
7606 spam/.
7607 @end smallexample
7608
7609 If you don't use @command{spamc}, use @samp{spamassassin -P -a}.
7610
7611 Note that one of the recipes above throws away messages with a score
7612 greater than or equal to 10. Here's how you can determine a value that
7613 works best for you.
7614
7615 First, run @samp{spamassassin -t} on every mail message in your
7616 archive and use @command{gnumeric} to verify that the average plus the
7617 standard deviation of good mail is under 5, the SpamAssassin default
7618 for ``spam''.
7619
7620 Using @command{gnumeric}, sort the messages by score and view the
7621 messages with the highest score. Determine the score which encompasses
7622 all of your interesting messages and add a couple of points to be
7623 conservative. Add that many dots to the @samp{X-Spam-Level:} header
7624 field above to send messages with that score down the drain.
7625
7626 In the example above, messages with a score of 5-9 are set aside in
7627 the @samp{+spam} folder for later review. The major weakness of
7628 rules-based filters is a plethora of false positives so it is
7629 worthwhile to check.
7630
7631 @findex mh-junk-blacklist
7632 @findex mh-junk-whitelist
7633 @kindex J b
7634 @kindex J w
7635
7636 If SpamAssassin classifies a message incorrectly, or is unsure, you can
7637 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and
7638 @kbd{J w} (@code{mh-junk-whitelist}).
7639
7640 @cindex @command{sa-learn}
7641 @cindex @file{.spamassassin/user_prefs}
7642 @cindex files, @file{.spamassassin/user_prefs}
7643
7644 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a
7645 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs},
7646 deletes the message, and sends the message to the Razor, so that
7647 others might not see this spam. If the @command{sa-learn} command is
7648 available, the message is also recategorized as spam.
7649
7650 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a
7651 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If
7652 the @command{sa-learn} command is available, the message is also
7653 recategorized as ham.
7654
7655 Over time, you'll observe that the same host or domain occurs
7656 repeatedly in the @samp{blacklist_from} entries, so you might think
7657 that you could avoid future spam by blacklisting all mail from a
7658 particular domain. The utility function
7659 @code{mh-spamassassin-identify-spammers} helps you do precisely that.
7660 This function displays a frequency count of the hosts and domains in
7661 the @samp{blacklist_from} entries from the last blank line in
7662 @file{~/.spamassassin/user_prefs} to the end of the file. This
7663 information can be used so that you can replace multiple
7664 @samp{blacklist_from} entries with a single wildcard entry such as:
7665
7666 @smallexample
7667 blacklist_from *@@*amazingoffersdirect2u.com
7668 @end smallexample
7669
7670 In versions of SpamAssassin (2.50 and on) that support a Bayesian
7671 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program
7672 @command{sa-learn} to recategorize the message as spam. Neither MH-E,
7673 nor SpamAssassin, rebuilds the database after adding words, so you
7674 will need to run @samp{sa-learn --rebuild} periodically. This can be
7675 done by adding the following to your @file{crontab}:
7676
7677 @smallexample
7678 0 * * * * sa-learn --rebuild > /dev/null 2>&1
7679 @end smallexample
7680
7681 @subheading Bogofilter
7682
7683 @cindex bogofilter
7684 @cindex spam filters, bogofilter
7685
7686 Bogofilter is a Bayesian spam filtering program. Get it from your
7687 local distribution or from the
7688 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}.
7689
7690 Bogofilter is taught by running:
7691
7692 @smallexample
7693 bogofilter -n < good-message
7694 @end smallexample
7695
7696 on every good message, and
7697
7698 @smallexample
7699 bogofilter -s < spam-message
7700 @end smallexample
7701
7702 @cindex full training
7703
7704 on every spam message. This is called a @dfn{full training}; three
7705 other training methods are described in the FAQ that is distributed
7706 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of
7707 each type of message to start doing a good job.
7708
7709 To use bogofilter, add the following recipes to @file{~/.procmailrc}:
7710
7711 @cindex @samp{X-Bogosity:} header field
7712 @cindex header field, @samp{X-Bogosity:}
7713
7714 @smallexample
7715 MAILDIR=$HOME/`mhparam Path`
7716
7717 # Fight spam with Bogofilter.
7718 :0fw
7719 | bogofilter -3 -e -p
7720
7721 :0:
7722 * ^X-Bogosity: Yes, tests=bogofilter
7723 spam/.
7724
7725 :0:
7726 * ^X-Bogosity: Unsure, tests=bogofilter
7727 spam/unsure/.
7728 @end smallexample
7729
7730 @findex mh-junk-blacklist
7731 @findex mh-junk-whitelist
7732 @kindex J b
7733 @kindex J w
7734
7735 If bogofilter classifies a message incorrectly, or is unsure, you can
7736 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J
7737 w} (@code{mh-junk-whitelist}) to update bogofilter's training.
7738
7739 The @cite{Bogofilter FAQ} suggests that you run the following
7740 occasionally to shrink the database:
7741
7742 @smallexample
7743 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new
7744 mv wordlist.db wordlist.db.prv
7745 mv wordlist.db.new wordlist.db
7746 @end smallexample
7747
7748 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune
7749 bogofilter.
7750
7751 @subheading SpamProbe
7752
7753 @cindex SpamProbe
7754 @cindex spam filters, SpamProbe
7755
7756 SpamProbe is a Bayesian spam filtering program. Get it from your local
7757 distribution or from the @uref{http://spamprobe.sourceforge.net,
7758 SpamProbe web site}.
7759
7760 To use SpamProbe, add the following recipes to @file{~/.procmailrc}:
7761
7762 @cindex @command{formail}
7763 @cindex @samp{X-SpamProbe:} header field
7764 @cindex header field, @samp{X-SpamProbe:}
7765
7766 @smallexample
7767 MAILDIR=$HOME/`mhparam Path`
7768
7769 # Fight spam with SpamProbe.
7770 :0
7771 SCORE=| spamprobe receive
7772
7773 :0 wf
7774 | formail -I "X-SpamProbe: $SCORE"
7775
7776 :0:
7777 *^X-SpamProbe: SPAM
7778 spam/.
7779 @end smallexample
7780
7781 @findex mh-junk-blacklist
7782 @findex mh-junk-whitelist
7783 @kindex J b
7784 @kindex J w
7785
7786 If SpamProbe classifies a message incorrectly, you can use the MH-E
7787 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w}
7788 (@code{mh-junk-whitelist}) to update SpamProbe's training.
7789
7790 @subheading Other Things You Can Do
7791
7792 There are a couple of things that you can add to @file{~/.procmailrc}
7793 in order to filter out a lot of spam and viruses. The first is to
7794 eliminate any message with a Windows executable (which is most likely
7795 a virus). The second is to eliminate mail in character sets that you
7796 can't read.
7797
7798 @cindex @samp{Content-Transfer-Encoding:} header field
7799 @cindex @samp{Content-Type:} header field
7800 @cindex @samp{Subject:} header field
7801 @cindex header field, @samp{Content-Transfer-Encoding:}
7802 @cindex header field, @samp{Content-Type:}
7803 @cindex header field, @samp{Subject:}
7804
7805 @smallexample
7806 MAILDIR=$HOME/`mhparam Path`
7807
7808 #
7809 # Filter messages with win32 executables/virii.
7810 #
7811 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg
7812 # pattern. The string "this program cannot be run in MS-DOS mode"
7813 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false
7814 # positives (Roland Smith via Pete from the bogofilter mailing list).
7815 #
7816 :0 B:
7817 * ^Content-Transfer-Encoding:.*base64
7818 * ^TVqQAAMAAAAEAAAA//8AALg
7819 * 4fug4AtAnNIbg
7820 spam/exe/.
7821
7822 #
7823 # Filter mail in unreadable character sets (from the Bogofilter FAQ).
7824 #
7825 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987'
7826
7827 :0:
7828 * 1^0 $ ^Subject:.*=\?($UNREADABLE)
7829 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE)
7830 spam/unreadable/.
7831
7832 :0:
7833 * ^Content-Type:.*multipart
7834 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE)
7835 spam/unreadable/.
7836 @end smallexample
7837
7838 @node Miscellaneous, Scan Line Formats, Junk, Top
7839 @chapter Miscellaneous Commands, Variables, and Buffers
7840
7841 This chapter covers the following command and the various MH-E
7842 buffers,
7843
7844 @ftable @code
7845 @item mh-version
7846 Display version information about MH-E and the MH mail handling
7847 system.
7848 @end ftable
7849
7850 @cindex buffers, @samp{*MH-E Info*}
7851 @cindex MH-E version
7852 @cindex @samp{*MH-E Info*}
7853 @cindex version
7854 @kindex M-x mh-version
7855
7856 One command worth noting is @kbd{M-x mh-version}. You can compare the
7857 version this command prints to the latest release (@pxref{Getting
7858 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named
7859 @samp{*MH-E Info*}, should usually be included with any bug report you
7860 submit (@pxref{Bug Reports}).
7861
7862 @subheading MH-E Buffers
7863
7864 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates
7865 several other buffers. They are:
7866
7867 @table @samp
7868 @cindex @samp{*MH-E Folders*}
7869 @cindex buffers, @samp{*MH-E Folders*}
7870 @findex mh-list-folders
7871 @item *MH-E Folders*
7872 @kindex F l
7873 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}).
7874 @xref{Folders}.
7875 @c -------------------------
7876 @cindex @samp{*MH-E Help*}
7877 @cindex buffers, @samp{*MH-E Help*}
7878 @findex mh-help
7879 @item *MH-E Help*
7880 @kindex ?
7881 @kindex C-c ?
7882 This buffer contains the output of @kbd{?} (@code{mh-help}) and
7883 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}.
7884 @c -------------------------
7885 @cindex @samp{*MH-E Info*}
7886 @cindex buffers, @samp{*MH-E Info*}
7887 @item *MH-E Info*
7888 This buffer contains the output of @kbd{M-x mh-version @key{RET}}.
7889 @c -------------------------
7890 @cindex @samp{*MH-E Log*}
7891 @cindex buffers, @samp{*MH-E Log*}
7892 @item *MH-E Log*
7893 This buffer contains the last 100 lines of the output of the various
7894 MH commands.
7895 @c -------------------------
7896 @cindex @samp{*MH-E Mail Delivery*}
7897 @cindex buffers, @samp{*MH-E Mail Delivery*}
7898 @item *MH-E Mail Delivery*
7899 This buffer contains the transcript of a mail delivery. @xref{Sending
7900 Message}.
7901 @c -------------------------
7902 @cindex @samp{*MH-E Recipients*}
7903 @cindex buffers, @samp{*MH-E Recipients*}
7904 @findex mh-check-whom
7905 @item *MH-E Recipients*
7906 @kindex C-c C-w
7907 This buffer contains the output of @kbd{C-c C-w}
7908 (@code{mh-check-whom}) and is killed when draft is sent.
7909 @xref{Checking Recipients}.
7910 @c -------------------------
7911 @cindex @samp{*MH-E Sequences*}
7912 @cindex buffers, @samp{*MH-E Sequences*}
7913 @item *MH-E Sequences*
7914 This buffer contains the output of @kbd{S l}
7915 (@code{mh-list-sequences}). @xref{Sequences}.
7916 @c -------------------------
7917 @cindex @samp{*mh-temp*}
7918 @cindex buffers, @samp{*mh-temp*}
7919 @item *mh-temp*
7920 This is a scratch, ephemeral, buffer used by MH-E functions. Note that
7921 it is hidden because the first character in the name is a space.
7922 You'll generally not have any need for this buffer.
7923 @end table
7924
7925 @node Scan Line Formats, Procmail, Miscellaneous, Top
7926 @appendix Scan Line Formats
7927
7928 @cindex scan line formats
7929
7930 This appendix discusses how MH-E creates, parses, and manipulates scan
7931 lines. If you have your own MH scan or inc format files, you
7932 @strong{can} teach MH-E how to handle them, but it isn't easy as
7933 you'll see.
7934
7935 @cindex @samp{mh-scan-line-formats} customization group
7936 @cindex customization group, @samp{mh-scan-line-formats}
7937
7938 This table lists the options in the @samp{mh-scan-line-formats}
7939 customization group.
7940
7941 @vtable @code
7942 @item mh-adaptive-cmd-note-flag
7943 On means that the message number width is determined dynamically
7944 (default: @samp{on}).
7945 @c -------------------------
7946 @item mh-scan-format-file
7947 Specifies the format file to pass to the scan program (default:
7948 @samp{Use MH-E scan Format}).
7949 @c -------------------------
7950 @item mh-scan-prog
7951 Program used to scan messages (default: @code{"scan"}).
7952 @end vtable
7953
7954 @vindex mh-adaptive-cmd-note-flag
7955
7956 There are a couple of caveats when creating your own scan format file.
7957 First, MH-E will not work if your scan lines do not include message
7958 numbers. It will work poorly if you don't dedicate a column for
7959 showing the current message and notations. You won't be able to use
7960 the option @code{mh-adaptive-cmd-note-flag} or the threading features
7961 (@pxref{Threading}).
7962
7963 @cindex message numbers
7964 @findex mh-set-cmd-note
7965 @vindex mh-adaptive-cmd-note-flag
7966 @vindex mh-scan-format-file
7967
7968 If you've created your own format to handle long message numbers,
7969 you'll be pleased to know you no longer need it since MH-E adapts its
7970 internal format based upon the largest message number if
7971 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer
7972 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag}
7973 and call @code{mh-set-cmd-note} with the width specified by your
7974 format file (see @code{mh-scan-format-file}). For example, the default
7975 width is 4, so you would use @samp{(mh-set-cmd-note 4)}.
7976
7977 @vindex mh-adaptive-cmd-note-flag
7978 @vindex mh-scan-format-file
7979 @vindex mh-scan-format-mh
7980 @vindex mh-scan-format-nmh
7981
7982 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E
7983 scan Format}. This means that the format string will be taken from the
7984 either @code{mh-scan-format-mh} or @code{mh-scan-format-nmh} depending
7985 on whether MH or nmh (or GNU mailutils) is in use. This setting also
7986 enables you to turn on the option @code{mh-adaptive-cmd-note-flag}.
7987 You can also set this option to @samp{Use Default scan Format} to get
7988 the same output as you would get if you ran @command{scan} from the
7989 shell. If you have a format file that you want MH-E to use but not MH,
7990 you can set this option to @samp{Specify a scan Format File} and enter
7991 the name of your format file.
7992
7993 @vindex mh-scan-format-file
7994 @vindex mh-scan-format-mh
7995 @vindex mh-scan-format-nmh
7996
7997 The scan format that MH-E uses when @code{mh-scan-format-file} is set
7998 to its default of @samp{Use MH-E scan Format} is held in the variables
7999 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on
8000 whether you are using nmh (or GNU mailutils) or not. Typically, you
8001 create your own format files rather than modifying these variables.
8002 The value of @code{mh-scan-format-nmh} is:
8003
8004 @smallexample
8005 (concat
8006 "%4(msg)"
8007 "%<(cur)+%| %>"
8008 "%<@{replied@}-"
8009 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>"
8010 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>"
8011 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>"
8012 "%?(nonnull(comp@{newsgroups@}))n%>"
8013 "%<(zero) %>"
8014 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>"
8015 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>"
8016 "%<(zero)%17(decode(friendly@{from@}))%> "
8017 "%(decode@{subject@})%<@{body@}<<%@{body@}%>")
8018 @end smallexample
8019
8020 @cindex decoding RFC 2047
8021 @cindex RFC 2047, decoding
8022 @vindex mh-scan-format-mh
8023
8024 The setting for @code{mh-scan-format-mh} is similar, except that MH
8025 doesn't have the function @code{decode} (which is used to decode RFC
8026 2047 encodings).
8027
8028 @cindex notations, scan line
8029 @cindex scan line notations
8030
8031 These strings are passed to the @command{scan} program via the
8032 @option{-format} argument. The formats are identical to the defaults
8033 except that additional hints for fontification have been added to the
8034 existing notations in the fifth column (remember that in Emacs, the
8035 columns start at 0). The values of the fifth column, in priority
8036 order, are: @samp{-} if the message has been replied to, @samp{t} if
8037 an address in the @samp{To:} field matches one of the mailboxes of the
8038 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if
8039 the @samp{Bcc:} field matches, and @samp{n} if a non-empty
8040 @samp{Newsgroups:} field is present.
8041
8042 @cindex @command{scan}
8043 @cindex MH commands, @command{scan}
8044 @vindex mh-progs
8045 @vindex mh-scan-prog
8046
8047 The name of the program that generates a listing of one line per
8048 message is held in @code{mh-scan-prog} (default: @code{"scan"}).
8049 Unless this variable contains an absolute pathname, it is assumed to
8050 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
8051 link another program to @command{scan} (see @samp{mh-profile}(5)) to
8052 produce a different type of listing@footnote{See the section
8053 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
8054 pick Ranges Sequences} in the MH book.}.
8055
8056 @cindex regular expressions, scan line formats
8057 @findex mh-set-cmd-note
8058 @findex setq
8059
8060 If you change the format of the scan lines you'll need to tell MH-E
8061 how to parse the new format. As you will see, quite a lot of variables
8062 are involved to do that. Use @kbd{M-x apropos @key{RET}
8063 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You
8064 will also have to call @code{mh-set-cmd-note} if your notations are
8065 not in column 4 (columns in Emacs start with 0). Note that unlike most
8066 of the user options described in this manual, these are variables and
8067 must be set with @code{setq} instead of in a customization buffer. For
8068 help with regular expressions, see
8069 @ifnothtml
8070 @ref{Regexps, , Syntax of Regular Expressions, emacs, The
8071 GNU Emacs Manual}.
8072 @end ifnothtml
8073 @ifhtml
8074 section
8075 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
8076 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}.
8077 @end ifhtml
8078
8079 The first variable has to do with pruning out garbage.
8080
8081 @vtable @code
8082 @cindex @command{inc}
8083 @cindex MH commands, @command{inc}
8084 @cindex @command{scan}
8085 @cindex MH commands, @command{scan}
8086 @item mh-scan-valid-regexp
8087 This regular expression describes a valid scan line. This is used to
8088 eliminate error messages that are occasionally produced by
8089 @command{inc}@footnote{See the section
8090 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
8091 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
8092 @end vtable
8093
8094 Next, many variables control how the scan lines are parsed.
8095
8096 @vtable @code
8097 @vindex mh-folder-body
8098 @vindex mh-folder-font-lock-keywords
8099 @item mh-scan-body-regexp
8100 This regular expression matches the message body fragment. Note that
8101 the default setting of @code{mh-folder-font-lock-keywords} expects
8102 this expression to contain at least one parenthesized expression which
8103 matches the body text as in the default of
8104 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not
8105 correct, the body fragment will not be highlighted with the face
8106 @code{mh-folder-body}.
8107 @c -------------------------
8108 @vindex mh-folder-cur-msg-number
8109 @vindex mh-folder-font-lock-keywords
8110 @vindex mh-note-cur
8111 @item mh-scan-cur-msg-number-regexp
8112 This regular expression matches the current message. It must match
8113 from the beginning of the line. Note that the default setting of
8114 @code{mh-folder-font-lock-keywords} expects this expression to contain
8115 at least one parenthesized expression which matches the message number
8116 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This
8117 expression includes the leading space and current message marker
8118 @samp{+} within the parenthesis since it looks better to highlight
8119 these items as well. The highlighting is done with the face
8120 @code{mh-folder-cur-msg-number}. This regular expression should be
8121 correct as it is needed by non-fontification functions. See also
8122 @code{mh-note-cur}.
8123 @c -------------------------
8124 @vindex mh-folder-date
8125 @vindex mh-folder-font-lock-keywords
8126 @vindex mh-scan-sent-to-me-sender-regexp
8127 @item mh-scan-date-regexp
8128 This regular expression matches a valid date. It must @strong{not} be
8129 anchored to the beginning or the end of the line. Note that the
8130 default setting of @code{mh-folder-font-lock-keywords} expects this
8131 expression to contain only one parenthesized expression which matches
8132 the date field as in the default of
8133 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is
8134 not correct, the date will not be highlighted with the face
8135 @code{mh-folder-date}.
8136 @c -------------------------
8137 @vindex mh-folder-deleted
8138 @vindex mh-folder-font-lock-keywords
8139 @vindex mh-note-deleted
8140 @item mh-scan-deleted-msg-regexp
8141 This regular expression matches deleted messages. It must match from
8142 the beginning of the line. Note that the default setting of
8143 @code{mh-folder-font-lock-keywords} expects this expression to contain
8144 at least one parenthesized expression which matches the message number
8145 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression
8146 includes the leading space within the parenthesis since it looks
8147 better to highlight it as well. The highlighting is done with the face
8148 @code{mh-folder-deleted}. This regular expression should be correct as
8149 it is needed by non-fontification functions. See also
8150 @code{mh-note-deleted}.
8151 @c -------------------------
8152 @vindex mh-folder-font-lock-keywords
8153 @vindex mh-folder-msg-number
8154 @item mh-scan-good-msg-regexp
8155 This regular expression matches ``good'' messages. It must match from
8156 the beginning of the line. Note that the default setting of
8157 @code{mh-folder-font-lock-keywords} expects this expression to contain
8158 at least one parenthesized expression which matches the message number
8159 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This
8160 expression includes the leading space within the parenthesis since it
8161 looks better to highlight it as well. The highlighting is done with
8162 the face @code{mh-folder-msg-number}. This regular expression should
8163 be correct as it is needed by non-fontification functions.
8164 @c -------------------------
8165 @vindex mh-scan-format-file
8166 @item mh-scan-msg-format-regexp
8167 This regular expression finds the message number width in a scan
8168 format. Note that the message number must be placed in a parenthesized
8169 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This
8170 variable is only consulted if @code{mh-scan-format-file} is set to
8171 @samp{Use MH-E scan Format}.
8172 @c -------------------------
8173 @vindex mh-scan-format-file
8174 @item mh-scan-msg-format-string
8175 This is a format string for the width of the message number in a scan
8176 format. Use @samp{0%d} for zero-filled message numbers. This variable
8177 is only consulted if @code{mh-scan-format-file} is set to @samp{Use
8178 MH-E scan Format} (default: @code{"%d"}).
8179 @c -------------------------
8180 @item mh-scan-msg-number-regexp
8181 This regular expression extracts the message number. It must match
8182 from the beginning of the line. Note that the message number must be
8183 placed in a parenthesized expression as in the default of @w{@code{"^
8184 *\\([0-9]+\\)"}}.
8185 @c -------------------------
8186 @item mh-scan-msg-overflow-regexp
8187 This regular expression matches overflowed message numbers (default:
8188 @code{"^[?0-9][0-9]"}).
8189 @c -------------------------
8190 @item mh-scan-msg-search-regexp
8191 This regular expression matches a particular message. It is a format
8192 string; use @samp{%d} to represent the location of the message number
8193 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}.
8194 @c -------------------------
8195 @vindex mh-folder-address
8196 @vindex mh-folder-font-lock-keywords
8197 @vindex mh-folder-to
8198 @item mh-scan-rcpt-regexp
8199 This regular expression specifies the recipient in messages you sent.
8200 Note that the default setting of @code{mh-folder-font-lock-keywords}
8201 expects this expression to contain two parenthesized expressions. The
8202 first is expected to match the @samp{To:} that the default scan format
8203 file generates. The second is expected to match the recipient's name
8204 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this
8205 regular expression is not correct, the @samp{To:} string will not be
8206 highlighted with the face @code{mh-folder-to} and the recipient will not be
8207 highlighted with the face @code{mh-folder-address}.
8208 @c -------------------------
8209 @vindex mh-folder-font-lock-keywords
8210 @vindex mh-folder-refiled
8211 @vindex mh-note-refiled
8212 @item mh-scan-refiled-msg-regexp
8213 This regular expression matches refiled messages. It must match from
8214 the beginning of the line. Note that the default setting of
8215 @code{mh-folder-font-lock-keywords} expects this expression to contain
8216 at least one parenthesized expression which matches the message number
8217 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression
8218 includes the leading space within the parenthesis since it looks
8219 better to highlight it as well. The highlighting is done with the face
8220 @code{mh-folder-refiled}. This regular expression should be correct as
8221 it is needed by non-fontification functions. See also
8222 @code{mh-note-refiled}.
8223 @c -------------------------
8224 @vindex mh-folder-font-lock-keywords
8225 @vindex mh-folder-sent-to-me-sender
8226 @vindex mh-mh-folder-sent-to-me-hint
8227 @vindex mh-scan-format-nmh
8228 @item mh-scan-sent-to-me-sender-regexp
8229 This regular expression matches messages sent to us. Note that the
8230 default setting of @code{mh-folder-font-lock-keywords} expects this
8231 expression to contain at least two parenthesized expressions. The
8232 first should match the fontification hint (see
8233 @code{mh-scan-format-nmh}) and the second should match the user name
8234 as in the default of
8235 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}.
8236 If this regular expression is not correct, the notation hints will not
8237 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and
8238 the sender will not be highlighted with the face
8239 @code{mh-folder-sent-to-me-sender}.
8240 @c -------------------------
8241 @vindex mh-folder-followup
8242 @vindex mh-folder-font-lock-keywords
8243 @vindex mh-folder-subject
8244 @item mh-scan-subject-regexp
8245 This regular expression matches the subject. It must match from the
8246 beginning of the line. Note that the default setting of
8247 @samp{mh-folder-font-lock-keywords} expects this expression to contain
8248 at least three parenthesized expressions. The first is expected to
8249 match the @samp{Re:} string, if any, and is highlighted with the face
8250 @code{mh-folder-followup}. The second matches an optional bracketed
8251 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a
8252 sub-expression of the first expression). The third is expected to
8253 match the subject line itself which is highlighted with the face
8254 @code{mh-folder-subject}. For example, the default is
8255 @w{@code{"^ *[0-9]+........[ ]*...................}}@*
8256 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}.
8257 This regular expression should be correct as it is needed by
8258 non-fontification functions. Note that this example is broken up on
8259 two lines for readability, but is actually a single string.
8260 @end vtable
8261
8262 Finally, there are a slew of variables that control how MH-E annotates
8263 the scan lines.
8264
8265 @vtable @code
8266 @findex mh-set-cmd-note
8267 @vindex mh-adaptive-cmd-note-flag
8268 @item mh-cmd-note
8269 Column for notations (default: 4). This variable should be set with
8270 the function @code{mh-set-cmd-note}. This variable may be updated
8271 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following
8272 variables contain the notational characters. Note that columns in
8273 Emacs start with 0.
8274 @c -------------------------
8275 @item mh-note-copied
8276 Messages that have been copied are marked by this character (default:
8277 @code{?C}).
8278 @c -------------------------
8279 @vindex mh-scan-cur-msg-number-regexp
8280 @item mh-note-cur
8281 The current message (in MH, not in MH-E) is marked by this character
8282 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}.
8283 @c -------------------------
8284 @vindex mh-scan-deleted-msg-regexp
8285 @item mh-note-deleted
8286 Messages that have been deleted are marked by this character (default:
8287 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}.
8288 @c -------------------------
8289 @item mh-note-dist
8290 Messages that have been redistributed are marked by this character
8291 (default: @code{?R}).
8292 @c -------------------------
8293 @item mh-note-forw
8294 Messages that have been forwarded are marked by this character
8295 (default: @code{?F}).
8296 @c -------------------------
8297 @item mh-note-printed
8298 Messages that have been printed are marked by this character (default:
8299 @code{?P}).
8300 @c -------------------------
8301 @vindex mh-scan-refiled-msg-regexp
8302 @item mh-note-refiled
8303 Messages that have been refiled are marked by this character (default:
8304 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}.
8305 @c -------------------------
8306 @item mh-note-repl
8307 Messages that have been replied to are marked by this character
8308 (default: @code{?-}).
8309 @c -------------------------
8310 @item mh-note-seq
8311 Messages in a user-defined sequence are marked by this character
8312 (default: @code{?%}). Messages in the @samp{search} sequence are
8313 marked by this character as well.
8314 @end vtable
8315
8316 For example, let's say I have the following in @file{scan.format}
8317 which displays the sender, the subject, and the message number. This
8318 format places a @samp{+} after the message number for the current
8319 message according to MH; it also uses that column for notations.
8320
8321 @smallexample
8322 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %>
8323 @end smallexample
8324
8325 @vindex mh-adaptive-cmd-note-flag
8326 @vindex mh-scan-format-file
8327 @vindex mh-scan-format-file, example
8328
8329 The first thing you have to do is tell MH-E to use this file.
8330 Customize @code{mh-scan-format-file} and set its value to @samp{Use
8331 Default scan Format}. If you didn't get already turn off
8332 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first.
8333
8334 Next, tell MH-E what a valid scan line looks like so that you can at
8335 least display the output of scan in your MH-Folder buffer.
8336
8337 @vindex mh-scan-valid-regexp, example
8338
8339 @smalllisp
8340 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$")
8341 @end smalllisp
8342
8343 Now, in order to get rid of the @samp{Cursor not pointing to message}
8344 message, you need to tell MH-E how to access the message number. You
8345 should also see why MH-E requires that you include a message number in
8346 the first place.
8347
8348 @vindex mh-scan-msg-number-regexp, example
8349 @vindex mh-scan-msg-search-regexp, example
8350
8351 @smalllisp
8352 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8353 (setq mh-scan-msg-search-regexp " %d[+D^ ]$")
8354 @end smalllisp
8355
8356 In order to get the next and previous commands working, add this.
8357
8358 @vindex mh-scan-good-msg-regexp, example
8359
8360 @smalllisp
8361 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8362 @end smalllisp
8363
8364 Note that the current message isn't marked with a @samp{+} when moving
8365 between the next and previous messages. Here is the code required to
8366 get this working.
8367
8368 @vindex set-mh-cmd-note, example
8369 @vindex mh-scan-cur-msg-number-regexp, example
8370
8371 @smalllisp
8372 (set-mh-cmd-note 76)
8373 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$")
8374 @end smalllisp
8375
8376 Finally, add the following to delete and refile messages.
8377
8378 @vindex mh-scan-deleted-msg-regexp, example
8379 @vindex mh-scan-refiled-msg-regexp, example
8380
8381 @smalllisp
8382 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$")
8383 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$")
8384 @end smalllisp
8385
8386 This is just a bare minimum; it's best to adjust all of the regular
8387 expressions to ensure that MH-E and highlighting perform well.
8388
8389 @node Procmail, Odds and Ends, Scan Line Formats, Top
8390 @appendix Reading Mailing Lists Effectively
8391
8392 @cindex @command{procmail}
8393 @cindex @command{slocal}
8394 @cindex Gnus
8395 @cindex MH commands, @command{slocal}
8396 @cindex Unix commands, @command{procmail}
8397 @cindex mailing lists, reading
8398
8399 This appendix explains how to use @uref{http://www.procmail.org/,
8400 procmail} to file mail from mailing lists into folders which can then
8401 be read easily with MH-E@footnote{The MH equivalent, @command{slocal},
8402 can be used as well, but procmail is more flexible and more packages
8403 exist for procmail than for slocal.}. Some mailing lists have such
8404 high traffic that Gnus must be used and I discuss how to use Gnus
8405 side-by-side with MH-E.
8406
8407 @cindex @file{.procmailrc}
8408 @cindex files, @file{.procmailrc}
8409
8410 First, I'll describe how to put mail from your mailing lists directly
8411 into an MH folder using @command{procmail}. First, add the following
8412 to @file{~/.procmailrc}. While the logging variables aren't strictly
8413 necessary, they are extremely useful.
8414
8415 @smallexample
8416 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam.
8417 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin
8418 [3]
8419 [4] # Point LOGFILE at the actual log file.
8420 [5] LOGFILE=$HOME/.procmail.log
8421 [6]
8422 [7] # This setting provides just the right amount of information.
8423 [8] LOGABSTRACT=all
8424 [9]
8425 [10] # Uncomment the following line to see how your patterns match.
8426 [11] #VERBOSE=yes
8427 [12]
8428 [13] # Place mail sent to any MH-E mailing list in +mh-e.
8429 [14] :0 w: mh-e$LOCKEXT
8430 [15] * ^TO.*mh-e-.*@.*sourceforge.net
8431 [16] | myrcvstore -create +mh-e
8432 @end smallexample
8433
8434 @cindex @command{rcvstore}
8435 @cindex MH commands, @command{rcvstore}
8436
8437 Line 14 creates a lock file in your mail directory based upon the name
8438 of the folder. This is done because @command{rcvstore} does not
8439 perform locking. While this lock file will prevent @command{procmail}
8440 from writing to a folder concurrently, there is a slight chance that
8441 you might lose a message if you're performing operations on a folder
8442 at the same time @command{rcvstore} is placing a message there. You
8443 have been warned. Now that that disclaimer is out of the way, note
8444 that I've been using this set-up for over a decade and haven't lost
8445 anything to my knowledge@footnote{See
8446 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166,
8447 Savannah issue #4361} to see if @command{rcvstore} locking is still an
8448 issue.}.
8449
8450 @cindex @samp{Unseen-Sequence:} MH profile component
8451 @cindex MH profile component, @samp{Unseen-Sequence:}
8452
8453 Line 16 uses the following script, @code{myrcvstore}, to massage the
8454 message as described in the comment and file the message in the given
8455 folder@footnote{The @samp{-create} argument wasn't always the default
8456 to @command{rcvstore}.}.
8457
8458 @smallexample
8459 #! /bin/sh
8460
8461 # Accepts a message on standard input and passes it through rcvstore
8462 # after first passing it through any filters. All arguments are passed
8463 # on to rcvstore.
8464
8465 # Force the "From user date" to become part of header. One reason this
8466 # is done is because the presence of the From field confuses dist so
8467 # that dist adds a new header, rather than using the existing header.
8468 # Note that this should not be done for any message that goes into a
8469 # Gnus incoming file (Gnus will thrown an error) nor should it be
8470 # applied to any message that goes to the system mailbox because the
8471 # entire mailbox will be incorporated as a single message.
8472 formail -c -z -R 'From ' X-Envelope-From: |
8473 rcvstore $@@
8474 @end smallexample
8475
8476 If your version of @command{rcvstore} doesn't add messages to the
8477 @samp{unseen} sequence by default, add the following line to your MH
8478 profile:
8479
8480 @smallexample
8481 Unseen-Sequence: unseen
8482 @end smallexample
8483
8484 Now view your new messages with the speedbar (@pxref{Speedbar}) or with
8485 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}.
8486
8487 If you're on a mailing list that is so voluminous that it is
8488 impossible to read every message, it usually better to read the
8489 mailing list like a newsgroup in a news reader. Emacs has a built-in
8490 newsreader called Gnus. The remainder of this appendix talks about how
8491 to use Gnus with an MH message store. The version of Gnus that was
8492 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should
8493 work but versions prior to 5.8 use different options.
8494
8495 This table contains a list of Gnus options that you will have to
8496 modify. Note that for them to become accessible, you'll have to load
8497 @file{nnml.el} first. This can be done with @kbd{M-x load-library
8498 @key{RET} nnml @key{RET}}.
8499
8500 @vtable @code
8501 @item gnus-secondary-select-methods
8502 Select the @samp{nnml} value. This select method uses directories for
8503 folders and individual files for messages, just like MH. You do not
8504 have to set an address.
8505 @c -------------------------
8506 @item mail-sources
8507 Select the @samp{Several files in a directory} value, check the
8508 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find
8509 your mail.
8510 @c -------------------------
8511 @vindex mail-user-agent
8512 @item message-mail-user-agent
8513 In order to send mail within Gnus using MH-E, set this option to
8514 @samp{mail-user-agent} and set the @code{mail-user-agent} option to
8515 @samp{Emacs interface to MH}.
8516 @c -------------------------
8517 @item nnmail-keep-last-article
8518 Since Gnus keeps track of which messages you have read, it would be
8519 bad if Gnus expired the last message, for example, message 100, and
8520 @command{rcvstore} gave the next new message number 1. Gnus would then
8521 ignore it since it thinks that you've read messages 1-100. Turning on
8522 this option ensures that the last message is never removed thereby
8523 eliminating this problem.
8524 @end vtable
8525
8526 Next add the following to @file{~/.procmailrc}. If you don't subscribe
8527 to the GnuCash mailing list, substitute one to which you are
8528 subscribed.
8529
8530 @smallexample
8531 MAILDIR=$HOME/`mhparam Path`
8532 # Place mail sent to the GnuCash mailing list in gnucash.spool, where
8533 # Gnus will pick it up.
8534 :0:
8535 * ^TO.*gnucash.*@.*gnucash.org
8536 gnucash.spool
8537 @end smallexample
8538
8539 Wait for some messages to appear in @file{gnucash.spool} and run Gnus
8540 with @kbd{M-x gnus @key{RET}}. To view the folder created in the
8541 example above, you would tell Gnus about it the first time only with
8542 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is
8543 known as @samp{+gnucash}.
8544
8545 @node Odds and Ends, History, Procmail, Top
8546 @appendix Odds and Ends
8547
8548 This appendix covers a few topics that don't fit elsewhere. Here I
8549 tell you how to report bugs and how to get on the MH-E mailing lists.
8550 I also point out some additional sources of information.
8551
8552 @menu
8553 * Bug Reports::
8554 * Mailing Lists::
8555 * MH FAQ and Support::
8556 * Getting MH-E::
8557 @end menu
8558
8559 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends
8560 @appendixsec Bug Reports
8561
8562 @cindex bugs
8563 @cindex SourceForge
8564 @kindex M-x mh-version
8565
8566 Bug reports should be filed at
8567 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=113357,
8568 SourceForge}. You need to be a SourceForge user to submit bug reports,
8569 but this is easy enough to do that it shouldn't be a restriction for
8570 you. Please include the output of @kbd{M-x mh-version}
8571 (@pxref{Miscellaneous}) in any bug report you send unless you're 110%
8572 positive we won't ask for it.
8573
8574 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends
8575 @appendixsec MH-E Mailing Lists
8576
8577 @cindex SourceForge
8578 @cindex mailing lists
8579
8580 There are several mailing lists for MH-E. They are @i{mh-e-users at
8581 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net},
8582 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view
8583 the archives at @uref{https://sourceforge.net/mail/?group_id=13357,
8584 SourceForge}. Do not report bugs on these lists; please submit them
8585 via SourceForge (@pxref{Bug Reports}).
8586
8587 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends
8588 @appendixsec MH FAQ and Support
8589
8590 @cindex FAQ
8591 @cindex MH FAQ
8592
8593 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently
8594 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup
8595 @samp{comp.mail.mh}. While very little is there that deals with MH-E
8596 specifically, there is an incredible wealth of material about MH
8597 itself which you will find useful.
8598
8599 @cindex support
8600
8601 You can find FAQs on MH-E at the
8602 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=213357,
8603 Support Requests} page on SourceForge. If you don't find the answer to
8604 your question, file a support request and your question will become a
8605 new FAQ!
8606
8607 @node Getting MH-E, , MH FAQ and Support, Odds and Ends
8608 @appendixsec Getting MH-E
8609
8610 @cindex MH-E, obtaining
8611 @cindex getting MH-E
8612 @cindex obtaining MH-E
8613
8614 Because MH-E is undergoing a phase of sustained growth, the version of
8615 MH-E in your Emacs is likely to be out of date although it is most
8616 likely to be more up to date than the copy that comes with the MH
8617 distribution in @file{miscellany/mh-e}.
8618
8619 @cindex change log
8620 @cindex release notes
8621
8622 New MH-E releases are always available for downloading at
8623 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8624 SourceForge} before they appear in an Emacs release. You can read the
8625 release notes on that page to determine if the given release of MH-E
8626 is already installed in your version of Emacs. You can also read the
8627 change log to see if you are interested in what the given release of
8628 MH-E has to offer (although we have no doubt that you will be
8629 extremely interested in all new releases).
8630
8631 @cindex Debian
8632
8633 If you use Debian, you can install the Debian
8634 @uref{http://packages.debian.org/unstable/mail/mh-e, mh-e package}
8635 instead.
8636
8637 @cindex files, @samp{MH-E-NEWS}
8638 @cindex files, @samp{README}
8639 @cindex news
8640 @cindex @samp{MH-E-NEWS}
8641 @cindex @samp{README}
8642 @kindex M-x mh-version
8643
8644 After you download and extract the MH-E tarball, read the
8645 @file{README} file and @file{MH-E-NEWS}. These correspond to the
8646 release notes and change log mentioned above. The file @file{README}
8647 contains instructions on installing MH-E. If you're already running
8648 Emacs, please quit that session and start again to load in the new
8649 MH-E. Check that you're running the new version with the command
8650 @kbd{M-x mh-version}.
8651
8652 @cindex contributed software
8653 @cindex manual
8654 @cindex documentation
8655
8656 In addition to the mh-e package, the
8657 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8658 SourceForge} site also contains doc and contrib packages. The former
8659 is the latest release of this manual, and the latter contains a few
8660 contributed packages you might find useful.
8661
8662 @node History, GFDL, Odds and Ends, Top
8663 @appendix History of MH-E
8664
8665 @cindex Bill Wohler
8666 @cindex Brian Reid
8667 @cindex Gildea, Stephen
8668 @cindex Jim Larus
8669 @cindex Larus, Jim
8670 @cindex MH-E, versions
8671 @cindex Reid, Brian
8672 @cindex SourceForge
8673 @cindex Stephen Gildea
8674 @cindex Wohler, Bill
8675 @cindex history of MH-E
8676 @cindex versions of MH-E
8677
8678 MH-E was originally written by Brian Reid in 1983 and has changed
8679 hands several times since then. Jim Larus wanted to do something
8680 similar for GNU Emacs, and ended up completely rewriting it that same
8681 year. In 1989, Stephen Gildea picked it up and added many
8682 improvements. Bill Wohler then took over in 2000 and moved its
8683 development to @uref{http://sourceforge.net/, SourceForge} where it
8684 lives today.
8685
8686 @menu
8687 * From Brian Reid::
8688 * From Jim Larus::
8689 * From Stephen Gildea::
8690 * From Bill Wohler::
8691 @end menu
8692
8693 @node From Brian Reid, From Jim Larus, History, History
8694 @appendixsec From Brian Reid
8695
8696 @cindex Brian Reid
8697 @cindex Reid, Brian
8698
8699 One day in 1983 I got the flu and had to stay home from work for three
8700 days with nothing to do. I used that time to write MHE@. The
8701 fundamental idea behind MHE was that it was a ``puppeteer'' driving
8702 the MH programs underneath it. MH had a model that the editor was
8703 supposed to run as a sub-process of the mailer, which seemed to me at
8704 the time to be the tail wagging the dog. So I turned it around and
8705 made the editor drive the MH programs. I made sure that the UCI people
8706 (who were maintaining MH at the time) took in my changes and made them
8707 stick.
8708
8709 Today, I still use my own version of MHE because I don't at all like
8710 the way that GNU MH-E works and I've never gotten to be good enough at
8711 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs
8712 version of MHE and the GNU Emacs version of MH-E have almost nothing
8713 in common except similar names. They work differently, have different
8714 conceptual models, and have different key bindings@footnote{After
8715 reading this article, I questioned Brian about his version of MHE, and
8716 received some great ideas for improving MH-E such as a dired-like
8717 method of selecting folders; and removing the prompting when sending
8718 mail, filling in the blanks in the draft buffer instead. I passed them
8719 on to Stephen Gildea, the current maintainer, and he was excited about
8720 the ideas as well. Perhaps one day, MH-E will again resemble MHE
8721 (draft form editing was introduced in version 7.4).}.
8722
8723 Brian Reid, June 1994
8724
8725 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History
8726 @appendixsec From Jim Larus
8727
8728 @cindex Jim Larus
8729 @cindex Larus, Jim
8730
8731 Brian Reid, while at CMU or shortly after going to Stanford wrote a
8732 mail reading program called MHE for Gosling Emacs. It had much the
8733 same structure as MH-E (i.e., invoked MH programs), though it was
8734 simpler and the commands were slightly different. Unfortunately, I no
8735 longer have a copy so the differences are lost in the mists of time.
8736
8737 In '82-83, I was working at BBN and wrote a lot of mlisp code in
8738 Gosling Emacs to make it look more like Tennex Emacs. One of the
8739 packages that I picked up and improved was Reid's mail system. In '83,
8740 I went back to Berkeley. About that time, Stallman's first version of
8741 GNU Emacs came out and people started to move to it from Gosling Emacs
8742 (as I recall, the transition took a year or two). I decided to port
8743 Reid's MHE and used the mlisp to Emacs Lisp translator that came with
8744 GNU Emacs. It did a lousy job and the resulting code didn't work, so I
8745 bit the bullet and rewrote the code by hand (it was a lot smaller and
8746 simpler then, so it took only a day or two).
8747
8748 Soon after that, MH-E became part of the standard Emacs distribution
8749 and suggestions kept dribbling in for improvements. MH-E soon reached
8750 sufficient functionality to keep me happy, but I kept on improving it
8751 because I was a graduate student with plenty of time on my hands and
8752 it was more fun than my dissertation. In retrospect, the one thing
8753 that I regret is not writing any documentation, which seriously
8754 limited the use and appeal of the package.
8755
8756 @cindex @command{xmh}, in MH-E history
8757
8758 In '89, I came to Wisconsin as a professor and decided not to work on
8759 MH-E. It was stable, except for minor bugs, and had enough
8760 functionality, so I let it be for a few years. Stephen Gildea of BBN
8761 began to pester me about the bugs, but I ignored them. In 1990, he
8762 went off to the X Consortium, said good bye, and said that he would
8763 now be using @command{xmh}. A few months later, he came back and said
8764 that he couldn't stand @command{xmh} and could I put a few more bug fixes
8765 into MH-E. At that point, I had no interest in fixing MH-E, so I gave
8766 the responsibility of maintenance to him and he has done a fine job
8767 since then.
8768
8769 Jim Larus, June 1994
8770
8771 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History
8772 @appendixsec From Stephen Gildea
8773
8774 @cindex Gildea, Stephen
8775 @cindex Stephen Gildea
8776
8777 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before
8778 me. In my previous job, I had been using RMAIL, but as my folders tend
8779 to run large, I was frustrated with the speed of RMAIL@. However, I
8780 stuck with it because I wanted the GNU Emacs interface. I am very
8781 familiar and comfortable with the Emacs interface (with just a few
8782 modifications of my own) and dislike having to use applications with
8783 embedded editors; they never live up to Emacs.
8784
8785 MH is the mail reader of choice at BBN, so I converted to it. Since I
8786 didn't want to give up using an Emacs interface, I started using MH-E.
8787 As is my wont, I started hacking on it almost immediately. I first
8788 used version 3.4m. One of the first features I added was to treat the
8789 folder buffer as a file-visiting buffer: you could lock it, save it,
8790 and be warned of unsaved changes when killing it. I also worked to
8791 bring its functionality a little closer to RMAIL@. Jim Larus was very
8792 cooperative about merging in my changes, and my efforts first appeared
8793 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided
8794 MH-E was too slow and optimized it a lot. Version, 3.7, distributed
8795 with Emacs 18.56 in 1990, was noticeably faster.
8796
8797 When I moved to the X Consortium I became the first person there to
8798 not use xmh. (There is now one other engineer there using MH-E.) About
8799 this point I took over maintenance of MH-E from Jim and was finally
8800 able to add some features Jim hadn't accepted, such as the backward
8801 searching undo. My first release was 3.8 (Emacs 18.58) in 1992.
8802
8803 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0.
8804 Version 4.0 added many new features, including background folder
8805 collection and support for composing @sc{mime} messages. (Reading
8806 @sc{mime} messages remains to be done, alas.) While writing this book,
8807 Bill Wohler gave MH-E its closest examination ever, uncovering bugs
8808 and inconsistencies that required a new major version to fix, and so
8809 version 5 was released.
8810
8811 Stephen Gildea, June 1994
8812
8813 @node From Bill Wohler, , From Stephen Gildea, History
8814 @appendixsec From Bill Wohler
8815
8816 @cindex Wohler, Bill
8817 @cindex Bill Wohler
8818
8819 The preface originally included the following text which I use to
8820 begin my story:
8821
8822 @quotation
8823 But it's important to note a brief history of MH-E.
8824
8825 @w{Version 3} was prevalent through the @w{Emacs 18} and early
8826 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}),
8827 which introduced several new and changed commands. Next, @w{Version
8828 5.0} was released, which fixed some bugs and incompatibilities, and
8829 was incorporated into @w{Emacs 19.29}.
8830 @end quotation
8831
8832 After a long break, Stephen handed the reins over to me in 2000. I
8833 moved the project to a new site called SourceForge and organized a
8834 great team of developers. Our first release in late 2001 was version
8835 6. It appeared around the time of Emacs 21.2 and had menus and tool
8836 bar buttons.
8837
8838 Then, indexed searches, improved MIME handling, a speedbar, multiple
8839 identities, alias completion, an index view of unseen messages, spam
8840 software support, Face and X-Image-URL header field support, Fcc
8841 completion, arbitrary range handling, and draft form editing were
8842 introduced in the version 7 series around the time of Emacs 21.4
8843 (2004). Still, Emacs itself contained version 5 of MH-E released back
8844 in 1994.
8845
8846 Version 8 development was mostly driven by the rewrite of the manual.
8847 It also brought mailutils support, S/MIME support, picon support, and
8848 an improved interface for hiding header fields. The CVS repository was
8849 migrated from SourceForge to Savannah (only for those files that were
8850 already part of Emacs) and the software was completely reorganized to
8851 push back two decades of entropy. Version 8 will appear in Emacs 22.1,
8852 expected to be released in 2006.
8853
8854 Bill Wohler, February 2006
8855
8856 @node GFDL, GPL, History, Top
8857 @appendix GNU FREE DOCUMENTATION LICENSE
8858 @center Version 1.2, November 2002
8859
8860 @display
8861 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
8862 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
8863
8864 Everyone is permitted to copy and distribute verbatim copies
8865 of this license document, but changing it is not allowed.
8866 @end display
8867 @sp 1
8868 @enumerate 0
8869 @item
8870 PREAMBLE
8871
8872 The purpose of this License is to make a manual, textbook, or other
8873 functional and useful document ``free'' in the sense of freedom: to
8874 assure everyone the effective freedom to copy and redistribute it,
8875 with or without modifying it, either commercially or noncommercially.
8876 Secondarily, this License preserves for the author and publisher a way
8877 to get credit for their work, while not being considered responsible
8878 for modifications made by others.
8879
8880 This License is a kind of ``copyleft'', which means that derivative
8881 works of the document must themselves be free in the same sense. It
8882 complements the GNU General Public License, which is a copyleft
8883 license designed for free software.
8884
8885 We have designed this License in order to use it for manuals for free
8886 software, because free software needs free documentation: a free
8887 program should come with manuals providing the same freedoms that the
8888 software does. But this License is not limited to software manuals;
8889 it can be used for any textual work, regardless of subject matter or
8890 whether it is published as a printed book. We recommend this License
8891 principally for works whose purpose is instruction or reference.
8892
8893 @sp 1
8894 @item
8895 APPLICABILITY AND DEFINITIONS
8896
8897 This License applies to any manual or other work, in any medium, that
8898 contains a notice placed by the copyright holder saying it can be
8899 distributed under the terms of this License. Such a notice grants a
8900 world-wide, royalty-free license, unlimited in duration, to use that
8901 work under the conditions stated herein. The ``Document'', below,
8902 refers to any such manual or work. Any member of the public is a
8903 licensee, and is addressed as ``you''. You accept the license if you
8904 copy, modify or distribute the work in a way requiring permission
8905 under copyright law.
8906
8907 A ``Modified Version'' of the Document means any work containing the
8908 Document or a portion of it, either copied verbatim, or with
8909 modifications and/or translated into another language.
8910
8911 A ``Secondary Section'' is a named appendix or a front-matter section of
8912 the Document that deals exclusively with the relationship of the
8913 publishers or authors of the Document to the Document's overall subject
8914 (or to related matters) and contains nothing that could fall directly
8915 within that overall subject. (Thus, if the Document is in part a
8916 textbook of mathematics, a Secondary Section may not explain any
8917 mathematics.) The relationship could be a matter of historical
8918 connection with the subject or with related matters, or of legal,
8919 commercial, philosophical, ethical or political position regarding
8920 them.
8921
8922 The ``Invariant Sections'' are certain Secondary Sections whose titles
8923 are designated, as being those of Invariant Sections, in the notice
8924 that says that the Document is released under this License. If a
8925 section does not fit the above definition of Secondary then it is not
8926 allowed to be designated as Invariant. The Document may contain zero
8927 Invariant Sections. If the Document does not identify any Invariant
8928 Sections then there are none.
8929
8930 The ``Cover Texts'' are certain short passages of text that are listed,
8931 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
8932 the Document is released under this License. A Front-Cover Text may
8933 be at most 5 words, and a Back-Cover Text may be at most 25 words.
8934
8935 A ``Transparent'' copy of the Document means a machine-readable copy,
8936 represented in a format whose specification is available to the
8937 general public, that is suitable for revising the document
8938 straightforwardly with generic text editors or (for images composed of
8939 pixels) generic paint programs or (for drawings) some widely available
8940 drawing editor, and that is suitable for input to text formatters or
8941 for automatic translation to a variety of formats suitable for input
8942 to text formatters. A copy made in an otherwise Transparent file
8943 format whose markup, or absence of markup, has been arranged to thwart
8944 or discourage subsequent modification by readers is not Transparent.
8945 An image format is not Transparent if used for any substantial amount
8946 of text. A copy that is not ``Transparent'' is called ``Opaque.''
8947
8948
8949 Examples of suitable formats for Transparent copies include plain
8950 ASCII without markup, Texinfo input format, LaTeX input format, SGML
8951 or XML using a publicly available DTD, and standard-conforming simple
8952 HTML, PostScript or PDF designed for human modification. Examples of
8953 transparent image formats include PNG, XCF and JPG. Opaque formats
8954 include proprietary formats that can be read and edited only by
8955 proprietary word processors, SGML or XML for which the DTD and/or
8956 processing tools are not generally available, and the
8957 machine-generated HTML, PostScript or PDF produced by some word
8958 processors for output purposes only.
8959
8960 The ``Title Page'' means, for a printed book, the title page itself,
8961 plus such following pages as are needed to hold, legibly, the material
8962 this License requires to appear in the title page. For works in
8963 formats which do not have any title page as such, ``Title Page'' means
8964 the text near the most prominent appearance of the work's title,
8965 preceding the beginning of the body of the text.
8966
8967 A section ``Entitled XYZ'' means a named subunit of the Document whose
8968 title either is precisely XYZ or contains XYZ in parentheses following
8969 text that translates XYZ in another language. (Here XYZ stands for a
8970 specific section name mentioned below, such as ``Acknowledgements'',
8971 ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
8972 of such a section when you modify the Document means that it remains a
8973 section ``Entitled XYZ'' according to this definition.
8974
8975 The Document may include Warranty Disclaimers next to the notice which
8976 states that this License applies to the Document. These Warranty
8977 Disclaimers are considered to be included by reference in this
8978 License, but only as regards disclaiming warranties: any other
8979 implication that these Warranty Disclaimers may have is void and has
8980 no effect on the meaning of this License.
8981 @sp 1
8982 @item
8983 VERBATIM COPYING
8984
8985 You may copy and distribute the Document in any medium, either
8986 commercially or noncommercially, provided that this License, the
8987 copyright notices, and the license notice saying this License applies
8988 to the Document are reproduced in all copies, and that you add no other
8989 conditions whatsoever to those of this License. You may not use
8990 technical measures to obstruct or control the reading or further
8991 copying of the copies you make or distribute. However, you may accept
8992 compensation in exchange for copies. If you distribute a large enough
8993 number of copies you must also follow the conditions in section 3.
8994
8995 You may also lend copies, under the same conditions stated above, and
8996 you may publicly display copies.
8997 @sp 1
8998 @item
8999 COPYING IN QUANTITY
9000
9001 If you publish printed copies (or copies in media that commonly have
9002 printed covers) of the Document, numbering more than 100, and the
9003 Document's license notice requires Cover Texts, you must enclose the
9004 copies in covers that carry, clearly and legibly, all these Cover
9005 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
9006 the back cover. Both covers must also clearly and legibly identify
9007 you as the publisher of these copies. The front cover must present
9008 the full title with all words of the title equally prominent and
9009 visible. You may add other material on the covers in addition.
9010 Copying with changes limited to the covers, as long as they preserve
9011 the title of the Document and satisfy these conditions, can be treated
9012 as verbatim copying in other respects.
9013
9014 If the required texts for either cover are too voluminous to fit
9015 legibly, you should put the first ones listed (as many as fit
9016 reasonably) on the actual cover, and continue the rest onto adjacent
9017 pages.
9018
9019 If you publish or distribute Opaque copies of the Document numbering
9020 more than 100, you must either include a machine-readable Transparent
9021 copy along with each Opaque copy, or state in or with each Opaque copy
9022 a computer-network location from which the general network-using
9023 public has access to download using public-standard network protocols
9024 a complete Transparent copy of the Document, free of added material.
9025 If you use the latter option, you must take reasonably prudent steps,
9026 when you begin distribution of Opaque copies in quantity, to ensure
9027 that this Transparent copy will remain thus accessible at the stated
9028 location until at least one year after the last time you distribute an
9029 Opaque copy (directly or through your agents or retailers) of that
9030 edition to the public.
9031
9032 It is requested, but not required, that you contact the authors of the
9033 Document well before redistributing any large number of copies, to give
9034 them a chance to provide you with an updated version of the Document.
9035 @sp 1
9036 @item
9037 MODIFICATIONS
9038
9039 You may copy and distribute a Modified Version of the Document under
9040 the conditions of sections 2 and 3 above, provided that you release
9041 the Modified Version under precisely this License, with the Modified
9042 Version filling the role of the Document, thus licensing distribution
9043 and modification of the Modified Version to whoever possesses a copy
9044 of it. In addition, you must do these things in the Modified Version:
9045
9046 A. Use in the Title Page (and on the covers, if any) a title distinct
9047 from that of the Document, and from those of previous versions
9048 (which should, if there were any, be listed in the History section
9049 of the Document). You may use the same title as a previous version
9050 if the original publisher of that version gives permission.@*
9051 B. List on the Title Page, as authors, one or more persons or entities
9052 responsible for authorship of the modifications in the Modified
9053 Version, together with at least five of the principal authors of the
9054 Document (all of its principal authors, if it has fewer than five),
9055 unless they release you from this requirement.@*
9056 C. State on the Title page the name of the publisher of the
9057 Modified Version, as the publisher.@*
9058 D. Preserve all the copyright notices of the Document.@*
9059 E. Add an appropriate copyright notice for your modifications
9060 adjacent to the other copyright notices.@*
9061 F. Include, immediately after the copyright notices, a license notice
9062 giving the public permission to use the Modified Version under the
9063 terms of this License, in the form shown in the Addendum below.@*
9064 G. Preserve in that license notice the full lists of Invariant Sections
9065 and required Cover Texts given in the Document's license notice.@*
9066 H. Include an unaltered copy of this License.@*
9067 I. Preserve the section Entitled ``History'', Preserve its Title, and add
9068 to it an item stating at least the title, year, new authors, and
9069 publisher of the Modified Version as given on the Title Page. If
9070 there is no section Entitled ``History'' in the Document, create one
9071 stating the title, year, authors, and publisher of the Document as
9072 given on its Title Page, then add an item describing the Modified
9073 Version as stated in the previous sentence.@*
9074 J. Preserve the network location, if any, given in the Document for
9075 public access to a Transparent copy of the Document, and likewise
9076 the network locations given in the Document for previous versions
9077 it was based on. These may be placed in the ``History'' section.
9078 You may omit a network location for a work that was published at
9079 least four years before the Document itself, or if the original
9080 publisher of the version it refers to gives permission.@*
9081 K. For any section Entitled ``Acknowledgements'' or ``Dedications'',
9082 Preserve the Title of the section, and preserve in the section all
9083 the substance and tone of each of the contributor acknowledgements
9084 and/or dedications given therein.@*
9085 L. Preserve all the Invariant Sections of the Document,
9086 unaltered in their text and in their titles. Section numbers
9087 or the equivalent are not considered part of the section titles.@*
9088 M. Delete any section Entitled ``Endorsements.'' Such a section
9089 may not be included in the Modified Version.@*
9090 N. Do not retitle any existing section to be Entitled ``Endorsements''
9091 or to conflict in title with any Invariant Section.@*
9092 O. Preserve any Warranty Disclaimers.@*
9093 @sp 1
9094 If the Modified Version includes new front-matter sections or
9095 appendices that qualify as Secondary Sections and contain no material
9096 copied from the Document, you may at your option designate some or all
9097 of these sections as invariant. To do this, add their titles to the
9098 list of Invariant Sections in the Modified Version's license notice.
9099 These titles must be distinct from any other section titles.
9100
9101 You may add a section Entitled ``Endorsements'', provided it contains
9102 nothing but endorsements of your Modified Version by various
9103 parties--for example, statements of peer review or that the text has
9104 been approved by an organization as the authoritative definition of a
9105 standard.
9106
9107 You may add a passage of up to five words as a Front-Cover Text, and a
9108 passage of up to 25 words as a Back-Cover Text, to the end of the list
9109 of Cover Texts in the Modified Version. Only one passage of
9110 Front-Cover Text and one of Back-Cover Text may be added by (or
9111 through arrangements made by) any one entity. If the Document already
9112 includes a cover text for the same cover, previously added by you or
9113 by arrangement made by the same entity you are acting on behalf of,
9114 you may not add another; but you may replace the old one, on explicit
9115 permission from the previous publisher that added the old one.
9116
9117 The author(s) and publisher(s) of the Document do not by this License
9118 give permission to use their names for publicity for or to assert or
9119 imply endorsement of any Modified Version.
9120 @sp 1
9121 @item
9122 COMBINING DOCUMENTS
9123
9124 You may combine the Document with other documents released under this
9125 License, under the terms defined in section 4 above for modified
9126 versions, provided that you include in the combination all of the
9127 Invariant Sections of all of the original documents, unmodified, and
9128 list them all as Invariant Sections of your combined work in its
9129 license notice, and that you preserve all their Warranty Disclaimers.
9130
9131 The combined work need only contain one copy of this License, and
9132 multiple identical Invariant Sections may be replaced with a single
9133 copy. If there are multiple Invariant Sections with the same name but
9134 different contents, make the title of each such section unique by
9135 adding at the end of it, in parentheses, the name of the original
9136 author or publisher of that section if known, or else a unique number.
9137 Make the same adjustment to the section titles in the list of
9138 Invariant Sections in the license notice of the combined work.
9139
9140 In the combination, you must combine any sections Entitled ``History''
9141 in the various original documents, forming one section Entitled
9142 ``History''; likewise combine any sections Entitled ``Acknowledgements'',
9143 and any sections Entitled ``Dedications.'' You must delete all sections
9144 Entitled ``Endorsements.''
9145 @sp 1
9146 @item
9147 COLLECTIONS OF DOCUMENTS
9148
9149 You may make a collection consisting of the Document and other documents
9150 released under this License, and replace the individual copies of this
9151 License in the various documents with a single copy that is included in
9152 the collection, provided that you follow the rules of this License for
9153 verbatim copying of each of the documents in all other respects.
9154
9155 You may extract a single document from such a collection, and distribute
9156 it individually under this License, provided you insert a copy of this
9157 License into the extracted document, and follow this License in all
9158 other respects regarding verbatim copying of that document.
9159 @sp 1
9160 @item
9161 AGGREGATION WITH INDEPENDENT WORKS
9162
9163 A compilation of the Document or its derivatives with other separate
9164 and independent documents or works, in or on a volume of a storage or
9165 distribution medium, is called an ``aggregate'' if the copyright
9166 resulting from the compilation is not used to limit the legal rights
9167 of the compilation's users beyond what the individual works permit.
9168 When the Document is included in an aggregate, this License does not
9169 apply to the other works in the aggregate which are not themselves
9170 derivative works of the Document.
9171
9172 If the Cover Text requirement of section 3 is applicable to these
9173 copies of the Document, then if the Document is less than one half of
9174 the entire aggregate, the Document's Cover Texts may be placed on
9175 covers that bracket the Document within the aggregate, or the
9176 electronic equivalent of covers if the Document is in electronic form.
9177 Otherwise they must appear on printed covers that bracket the whole
9178 aggregate.
9179 @sp 1
9180 @item
9181 TRANSLATION
9182
9183 Translation is considered a kind of modification, so you may
9184 distribute translations of the Document under the terms of section 4.
9185 Replacing Invariant Sections with translations requires special
9186 permission from their copyright holders, but you may include
9187 translations of some or all Invariant Sections in addition to the
9188 original versions of these Invariant Sections. You may include a
9189 translation of this License, and all the license notices in the
9190 Document, and any Warranty Disclaimers, provided that you also include
9191 the original English version of this License and the original versions
9192 of those notices and disclaimers. In case of a disagreement between
9193 the translation and the original version of this License or a notice
9194 or disclaimer, the original version will prevail.
9195
9196 If a section in the Document is Entitled ``Acknowledgements'',
9197 ``Dedications'', or ``History'', the requirement (section 4) to Preserve
9198 its Title (section 1) will typically require changing the actual
9199 title.
9200 @sp 1
9201 @item
9202 TERMINATION
9203
9204 You may not copy, modify, sublicense, or distribute the Document except
9205 as expressly provided for under this License. Any other attempt to
9206 copy, modify, sublicense or distribute the Document is void, and will
9207 automatically terminate your rights under this License. However,
9208 parties who have received copies, or rights, from you under this
9209 License will not have their licenses terminated so long as such
9210 parties remain in full compliance.
9211 @sp 1
9212 @item
9213 FUTURE REVISIONS OF THIS LICENSE
9214
9215 The Free Software Foundation may publish new, revised versions
9216 of the GNU Free Documentation License from time to time. Such new
9217 versions will be similar in spirit to the present version, but may
9218 differ in detail to address new problems or concerns. See
9219 http://www.gnu.org/copyleft/.
9220
9221 Each version of the License is given a distinguishing version number.
9222 If the Document specifies that a particular numbered version of this
9223 License ``or any later version'' applies to it, you have the option of
9224 following the terms and conditions either of that specified version or
9225 of any later version that has been published (not as a draft) by the
9226 Free Software Foundation. If the Document does not specify a version
9227 number of this License, you may choose any version ever published (not
9228 as a draft) by the Free Software Foundation.
9229
9230 @end enumerate
9231
9232 @unnumberedsec ADDENDUM: How to use this License for your documents
9233
9234 To use this License in a document you have written, include a copy of
9235 the License in the document and put the following copyright and
9236 license notices just after the title page:
9237
9238 @smallexample
9239 @group
9240 Copyright (C) @var{year} @var{your name}.
9241 Permission is granted to copy, distribute and/or modify this document
9242 under the terms of the GNU Free Documentation License, Version 1.2
9243 or any later version published by the Free Software Foundation;
9244 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
9245 A copy of the license is included in the section entitled ``GNU
9246 Free Documentation License''.
9247 @end group
9248 @end smallexample
9249
9250 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
9251 replace the ``with...Texts.'' line with this:
9252
9253 @smallexample
9254 @group
9255 with the Invariant Sections being @var{list their titles}, with the
9256 Front-Cover Texts being @var{list}, and with the Back-Cover Texts being
9257 @var{list}.
9258 @end group
9259 @end smallexample
9260
9261 If you have Invariant Sections without Cover Texts, or some other
9262 combination of the three, merge those two alternatives to suit the
9263 situation.
9264
9265 If your document contains nontrivial examples of program code, we
9266 recommend releasing these examples in parallel under your choice of
9267 free software license, such as the GNU General Public License,
9268 to permit their use in free software.
9269
9270 @node GPL, Key Index, GFDL, Top
9271 @appendix GNU GENERAL PUBLIC LICENSE
9272 @center Version 2, June 1991
9273
9274 @display
9275 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
9276 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
9277
9278 Everyone is permitted to copy and distribute verbatim copies
9279 of this license document, but changing it is not allowed.
9280 @end display
9281
9282 @unnumberedsec Preamble
9283
9284 The licenses for most software are designed to take away your
9285 freedom to share and change it. By contrast, the GNU General Public
9286 License is intended to guarantee your freedom to share and change free
9287 software---to make sure the software is free for all its users. This
9288 General Public License applies to most of the Free Software
9289 Foundation's software and to any other program whose authors commit to
9290 using it. (Some other Free Software Foundation software is covered by
9291 the GNU Library General Public License instead.) You can apply it to
9292 your programs, too.
9293
9294 When we speak of free software, we are referring to freedom, not
9295 price. Our General Public Licenses are designed to make sure that you
9296 have the freedom to distribute copies of free software (and charge for
9297 this service if you wish), that you receive source code or can get it
9298 if you want it, that you can change the software or use pieces of it
9299 in new free programs; and that you know you can do these things.
9300
9301 To protect your rights, we need to make restrictions that forbid
9302 anyone to deny you these rights or to ask you to surrender the rights.
9303 These restrictions translate to certain responsibilities for you if you
9304 distribute copies of the software, or if you modify it.
9305
9306 For example, if you distribute copies of such a program, whether
9307 gratis or for a fee, you must give the recipients all the rights that
9308 you have. You must make sure that they, too, receive or can get the
9309 source code. And you must show them these terms so they know their
9310 rights.
9311
9312 We protect your rights with two steps: (1) copyright the software, and
9313 (2) offer you this license which gives you legal permission to copy,
9314 distribute and/or modify the software.
9315
9316 Also, for each author's protection and ours, we want to make certain
9317 that everyone understands that there is no warranty for this free
9318 software. If the software is modified by someone else and passed on, we
9319 want its recipients to know that what they have is not the original, so
9320 that any problems introduced by others will not reflect on the original
9321 authors' reputations.
9322
9323 Finally, any free program is threatened constantly by software
9324 patents. We wish to avoid the danger that redistributors of a free
9325 program will individually obtain patent licenses, in effect making the
9326 program proprietary. To prevent this, we have made it clear that any
9327 patent must be licensed for everyone's free use or not licensed at all.
9328
9329 The precise terms and conditions for copying, distribution and
9330 modification follow.
9331
9332 @iftex
9333 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9334 @end iftex
9335 @ifinfo
9336 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9337 @end ifinfo
9338
9339 @enumerate 0
9340 @item
9341 This License applies to any program or other work which contains
9342 a notice placed by the copyright holder saying it may be distributed
9343 under the terms of this General Public License. The ``Program,'' below,
9344 refers to any such program or work, and a ``work based on the Program''
9345 means either the Program or any derivative work under copyright law:
9346 that is to say, a work containing the Program or a portion of it,
9347 either verbatim or with modifications and/or translated into another
9348 language. (Hereinafter, translation is included without limitation in
9349 the term ``modification.'') Each licensee is addressed as ``you.''
9350
9351 Activities other than copying, distribution and modification are not
9352 covered by this License; they are outside its scope. The act of
9353 running the Program is not restricted, and the output from the Program
9354 is covered only if its contents constitute a work based on the
9355 Program (independent of having been made by running the Program).
9356 Whether that is true depends on what the Program does.
9357
9358 @item
9359 You may copy and distribute verbatim copies of the Program's
9360 source code as you receive it, in any medium, provided that you
9361 conspicuously and appropriately publish on each copy an appropriate
9362 copyright notice and disclaimer of warranty; keep intact all the
9363 notices that refer to this License and to the absence of any warranty;
9364 and give any other recipients of the Program a copy of this License
9365 along with the Program.
9366
9367 You may charge a fee for the physical act of transferring a copy, and
9368 you may at your option offer warranty protection in exchange for a fee.
9369
9370 @item
9371 You may modify your copy or copies of the Program or any portion
9372 of it, thus forming a work based on the Program, and copy and
9373 distribute such modifications or work under the terms of Section 1
9374 above, provided that you also meet all of these conditions:
9375
9376 @enumerate a
9377 @item
9378 You must cause the modified files to carry prominent notices
9379 stating that you changed the files and the date of any change.
9380
9381 @item
9382 You must cause any work that you distribute or publish, that in
9383 whole or in part contains or is derived from the Program or any
9384 part thereof, to be licensed as a whole at no charge to all third
9385 parties under the terms of this License.
9386
9387 @item
9388 If the modified program normally reads commands interactively
9389 when run, you must cause it, when started running for such
9390 interactive use in the most ordinary way, to print or display an
9391 announcement including an appropriate copyright notice and a
9392 notice that there is no warranty (or else, saying that you provide
9393 a warranty) and that users may redistribute the program under
9394 these conditions, and telling the user how to view a copy of this
9395 License. (Exception: if the Program itself is interactive but
9396 does not normally print such an announcement, your work based on
9397 the Program is not required to print an announcement.)
9398 @end enumerate
9399
9400 These requirements apply to the modified work as a whole. If
9401 identifiable sections of that work are not derived from the Program,
9402 and can be reasonably considered independent and separate works in
9403 themselves, then this License, and its terms, do not apply to those
9404 sections when you distribute them as separate works. But when you
9405 distribute the same sections as part of a whole which is a work based
9406 on the Program, the distribution of the whole must be on the terms of
9407 this License, whose permissions for other licensees extend to the
9408 entire whole, and thus to each and every part regardless of who wrote it.
9409
9410 Thus, it is not the intent of this section to claim rights or contest
9411 your rights to work written entirely by you; rather, the intent is to
9412 exercise the right to control the distribution of derivative or
9413 collective works based on the Program.
9414
9415 In addition, mere aggregation of another work not based on the Program
9416 with the Program (or with a work based on the Program) on a volume of
9417 a storage or distribution medium does not bring the other work under
9418 the scope of this License.
9419
9420 @item
9421 You may copy and distribute the Program (or a work based on it,
9422 under Section 2) in object code or executable form under the terms of
9423 Sections 1 and 2 above provided that you also do one of the following:
9424
9425 @enumerate a
9426 @item
9427 Accompany it with the complete corresponding machine-readable
9428 source code, which must be distributed under the terms of Sections
9429 1 and 2 above on a medium customarily used for software interchange; or,
9430
9431 @item
9432 Accompany it with a written offer, valid for at least three
9433 years, to give any third party, for a charge no more than your
9434 cost of physically performing source distribution, a complete
9435 machine-readable copy of the corresponding source code, to be
9436 distributed under the terms of Sections 1 and 2 above on a medium
9437 customarily used for software interchange; or,
9438
9439 @item
9440 Accompany it with the information you received as to the offer
9441 to distribute corresponding source code. (This alternative is
9442 allowed only for noncommercial distribution and only if you
9443 received the program in object code or executable form with such
9444 an offer, in accord with Subsection b above.)
9445 @end enumerate
9446
9447 The source code for a work means the preferred form of the work for
9448 making modifications to it. For an executable work, complete source
9449 code means all the source code for all modules it contains, plus any
9450 associated interface definition files, plus the scripts used to
9451 control compilation and installation of the executable. However, as a
9452 special exception, the source code distributed need not include
9453 anything that is normally distributed (in either source or binary
9454 form) with the major components (compiler, kernel, and so on) of the
9455 operating system on which the executable runs, unless that component
9456 itself accompanies the executable.
9457
9458 If distribution of executable or object code is made by offering
9459 access to copy from a designated place, then offering equivalent
9460 access to copy the source code from the same place counts as
9461 distribution of the source code, even though third parties are not
9462 compelled to copy the source along with the object code.
9463
9464 @item
9465 You may not copy, modify, sublicense, or distribute the Program
9466 except as expressly provided under this License. Any attempt
9467 otherwise to copy, modify, sublicense or distribute the Program is
9468 void, and will automatically terminate your rights under this License.
9469 However, parties who have received copies, or rights, from you under
9470 this License will not have their licenses terminated so long as such
9471 parties remain in full compliance.
9472
9473 @item
9474 You are not required to accept this License, since you have not
9475 signed it. However, nothing else grants you permission to modify or
9476 distribute the Program or its derivative works. These actions are
9477 prohibited by law if you do not accept this License. Therefore, by
9478 modifying or distributing the Program (or any work based on the
9479 Program), you indicate your acceptance of this License to do so, and
9480 all its terms and conditions for copying, distributing or modifying
9481 the Program or works based on it.
9482
9483 @item
9484 Each time you redistribute the Program (or any work based on the
9485 Program), the recipient automatically receives a license from the
9486 original licensor to copy, distribute or modify the Program subject to
9487 these terms and conditions. You may not impose any further
9488 restrictions on the recipients' exercise of the rights granted herein.
9489 You are not responsible for enforcing compliance by third parties to
9490 this License.
9491
9492 @item
9493 If, as a consequence of a court judgment or allegation of patent
9494 infringement or for any other reason (not limited to patent issues),
9495 conditions are imposed on you (whether by court order, agreement or
9496 otherwise) that contradict the conditions of this License, they do not
9497 excuse you from the conditions of this License. If you cannot
9498 distribute so as to satisfy simultaneously your obligations under this
9499 License and any other pertinent obligations, then as a consequence you
9500 may not distribute the Program at all. For example, if a patent
9501 license would not permit royalty-free redistribution of the Program by
9502 all those who receive copies directly or indirectly through you, then
9503 the only way you could satisfy both it and this License would be to
9504 refrain entirely from distribution of the Program.
9505
9506 If any portion of this section is held invalid or unenforceable under
9507 any particular circumstance, the balance of the section is intended to
9508 apply and the section as a whole is intended to apply in other
9509 circumstances.
9510
9511 It is not the purpose of this section to induce you to infringe any
9512 patents or other property right claims or to contest validity of any
9513 such claims; this section has the sole purpose of protecting the
9514 integrity of the free software distribution system, which is
9515 implemented by public license practices. Many people have made
9516 generous contributions to the wide range of software distributed
9517 through that system in reliance on consistent application of that
9518 system; it is up to the author/donor to decide if he or she is willing
9519 to distribute software through any other system and a licensee cannot
9520 impose that choice.
9521
9522 This section is intended to make thoroughly clear what is believed to
9523 be a consequence of the rest of this License.
9524
9525 @item
9526 If the distribution and/or use of the Program is restricted in
9527 certain countries either by patents or by copyrighted interfaces, the
9528 original copyright holder who places the Program under this License
9529 may add an explicit geographical distribution limitation excluding
9530 those countries, so that distribution is permitted only in or among
9531 countries not thus excluded. In such case, this License incorporates
9532 the limitation as if written in the body of this License.
9533
9534 @item
9535 The Free Software Foundation may publish revised and/or new versions
9536 of the General Public License from time to time. Such new versions will
9537 be similar in spirit to the present version, but may differ in detail to
9538 address new problems or concerns.
9539
9540 Each version is given a distinguishing version number. If the Program
9541 specifies a version number of this License which applies to it and ``any
9542 later version,'' you have the option of following the terms and conditions
9543 either of that version or of any later version published by the Free
9544 Software Foundation. If the Program does not specify a version number of
9545 this License, you may choose any version ever published by the Free Software
9546 Foundation.
9547
9548 @item
9549 If you wish to incorporate parts of the Program into other free
9550 programs whose distribution conditions are different, write to the author
9551 to ask for permission. For software which is copyrighted by the Free
9552 Software Foundation, write to the Free Software Foundation; we sometimes
9553 make exceptions for this. Our decision will be guided by the two goals
9554 of preserving the free status of all derivatives of our free software and
9555 of promoting the sharing and reuse of software generally.
9556
9557 @iftex
9558 @heading NO WARRANTY
9559 @end iftex
9560 @ifinfo
9561 @center NO WARRANTY
9562 @end ifinfo
9563
9564 @item
9565 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
9566 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
9567 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
9568 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
9569 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9570 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
9571 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
9572 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
9573 REPAIR OR CORRECTION.
9574
9575 @item
9576 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
9577 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
9578 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
9579 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
9580 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
9581 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
9582 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
9583 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
9584 POSSIBILITY OF SUCH DAMAGES.
9585 @end enumerate
9586
9587 @iftex
9588 @heading END OF TERMS AND CONDITIONS
9589 @end iftex
9590 @ifinfo
9591 @center END OF TERMS AND CONDITIONS
9592 @end ifinfo
9593
9594 @page
9595 @unnumberedsec How to Apply These Terms to Your New Programs
9596
9597 If you develop a new program, and you want it to be of the greatest
9598 possible use to the public, the best way to achieve this is to make it
9599 free software which everyone can redistribute and change under these terms.
9600
9601 To do so, attach the following notices to the program. It is safest
9602 to attach them to the start of each source file to most effectively
9603 convey the exclusion of warranty; and each file should have at least
9604 the ``copyright'' line and a pointer to where the full notice is found.
9605
9606 @smallexample
9607 @var{one line to give the program's name and an idea of what it does.}
9608 Copyright (C) 19@var{yy} @var{name of author}
9609
9610 This program is free software; you can redistribute it and/or
9611 modify it under the terms of the GNU General Public License
9612 as published by the Free Software Foundation; either version 2
9613 of the License, or (at your option) any later version.
9614
9615 This program is distributed in the hope that it will be useful,
9616 but WITHOUT ANY WARRANTY; without even the implied warranty of
9617 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
9618 GNU General Public License for more details.
9619
9620 You should have received a copy of the GNU General Public License along
9621 with this program; if not, write to the Free Software Foundation, Inc.,
9622 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9623 @end smallexample
9624
9625 Also add information on how to contact you by electronic and paper mail.
9626
9627 If the program is interactive, make it output a short notice like this
9628 when it starts in an interactive mode:
9629
9630 @smallexample
9631 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
9632 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
9633 type `show w'. This is free software, and you are welcome
9634 to redistribute it under certain conditions; type `show c'
9635 for details.
9636 @end smallexample
9637
9638 The hypothetical commands @samp{show w} and @samp{show c} should show
9639 the appropriate parts of the General Public License. Of course, the
9640 commands you use may be called something other than @samp{show w} and
9641 @samp{show c}; they could even be mouse-clicks or menu items---whatever
9642 suits your program.
9643
9644 You should also get your employer (if you work as a programmer) or your
9645 school, if any, to sign a ``copyright disclaimer'' for the program, if
9646 necessary. Here is a sample; alter the names:
9647
9648 @smallexample
9649 @group
9650 Yoyodyne, Inc., hereby disclaims all copyright
9651 interest in the program `Gnomovision'
9652 (which makes passes at compilers) written
9653 by James Hacker.
9654
9655 @var{signature of Ty Coon}, 1 April 1989
9656 Ty Coon, President of Vice
9657 @end group
9658 @end smallexample
9659
9660 This General Public License does not permit incorporating your program into
9661 proprietary programs. If your program is a subroutine library, you may
9662 consider it more useful to permit linking proprietary applications with the
9663 library. If this is what you want to do, use the GNU Library General
9664 Public License instead of this License.
9665
9666 @node Key Index, Command Index, GPL, Top
9667 @unnumbered Key (Character) Index
9668 @printindex ky
9669
9670 @node Command Index, Option Index, Key Index, Top
9671 @unnumbered Command Index
9672 @printindex fn
9673
9674 @node Option Index, Concept Index, Command Index, Top
9675 @unnumbered Option (Variable) Index
9676 @printindex vr
9677
9678 @node Concept Index, , Option Index, Top
9679 @unnumbered Concept Index
9680 @printindex cp
9681
9682 @bye
9683
9684 @c Ispell Helpers
9685 @c
9686 @c The following are words that ispell should ignore that would not
9687 @c normally be in a dictionary (global or personal). Be careful not to
9688 @c include words here that could potentially be typos of other words
9689 @c (such as url, elisp, or MHE).
9690 @c
9691 @c LocalWords: CTRL ESC SPC f's
9692 @c LocalWords: addr Aliasfile alist
9693 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's
9694 @c LocalWords: cmd CMU contrib cron
9695 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw
9696 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm
9697 @c LocalWords: ImageMagick inbox ispell keychain
9698 @c LocalWords: Larus licensor LocalWords lookup lpr
9699 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp
9700 @c LocalWords: MML msg multipart
9701 @c LocalWords: Namazu NIS nenscript nnml num
9702 @c LocalWords: packmbox passphrase pathname prev procmail prog repl
9703 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's
9704 @c LocalWords: sublicense supercite speedbar
9705 @c LocalWords: Tennex texi texinfo Thelen thelenm
9706 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat
9707 @c
9708 @c See http://www.oreilly.com/oreilly/author/stylesheet.html.
9709 @c See http://en.wikipedia.org/.
9710 @c
9711 @c Note the lowercase mh which is needed to avoid hits in the
9712 @c functions and variables. Occasionally, check for accidental
9713 @c inclusion of mh in text by uncommenting the following and executing
9714 @c it with C-x C-e. You want to see "Search failed"
9715 @c (let ((case-fold-search nil))
9716 @c (goto-char (point-min))
9717 @c (search-forward-regexp "^mh\\( \\|$\\)"))
9718 @c
9719 @c An extremely useful setting for texinfo-mode-hook is:
9720 @c (add-to-list
9721 @c 'ispell-skip-region-alist
9722 @c (list
9723 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)"
9724 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|"
9725 @c "@[@{}.]\\|"
9726 @c "[^@]\\|"
9727 @c "@\\(end \\)?group\\|"
9728 @c "@\\(end \\)?cartouche\\)+"
9729 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|"
9730 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|"
9731 @c "^@end [a-z]+$\\|"
9732 @c "^@\\([fv]\\|print\\)index .*$\\|"
9733 @c "@uref{[^,]+,\\|"
9734 @c "@[a-z]+\\|"
9735 @c "/[a-z.]+[/}]\\)")))))
9736 @c
9737 @c Cross References
9738 @c
9739 @c See existing cross-references to the Emacs manual and the Emacs
9740 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU
9741 @c Emacs Lisp Reference Manual'' respectively).
9742
9743 @c @ftable Sorting
9744 @c
9745 @c As per index (sort of): Punctuation, keyboard characters (such as
9746 @c RET and BS) upper and lowercase mixed (lower comes before
9747 @c uppercase), control characters go with uppercase C, meta characters
9748 @c go with uppercase M.
9749 @c In some cases, the sort isn't strictly ASCII.
9750 @c For example, SPC (mh-page-msg) reads better before BS
9751 @c (mh-previous-page) and . (mh-show) is better before ,
9752 @c (mh-header-display).
9753
9754 @c @vtable Sorting
9755 @c
9756 @c Alphabetical, pull hooks into their own table.
9757
9758 @c Local Variables:
9759 @c sentence-end-double-space: nil
9760 @c End:
9761
9762 @ignore
9763 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef
9764 @end ignore