]> code.delx.au - gnu-emacs/blob - man/mh-e.texi
@copyright{}, no indentation in @copying{}
[gnu-emacs] / man / mh-e.texi
1 \input texinfo @c -*-texinfo-*-
2 @c
3 @c Note: This document requires makeinfo version 4.6 or greater to build.
4 @c
5 @c %**start of header
6 @setfilename ../info/mh-e
7 @settitle The MH-E Manual
8 @c %**end of header
9
10 @c Version of the software and manual.
11 @set VERSION 7.93
12 @c Edition of the manual. It is either empty for the first edition or
13 @c has the form ", nth Edition" (without the quotes).
14 @set EDITION , 5th Edition
15 @set UPDATED 2006-03-19
16 @set UPDATE-MONTH March, 2006
17
18 @c Other variables.
19 @set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh
20 @set MH-E-HOME http://mh-e.sourceforge.net/
21
22 @c Copyright
23 @copying
24 This is version @value{VERSION}@value{EDITION} of @cite{The MH-E
25 Manual}, last updated @value{UPDATED}.
26
27 Copyright @copyright{} 1995, 2001, 2002, 2003, 2005, 2006 Free
28 Software Foundation, Inc.
29
30 @quotation
31 The MH-E manual is free documentation; you can redistribute it and/or
32 modify it under the terms of either:
33
34 @enumerate a
35 @item
36 the GNU Free Documentation License, Version 1.2 or any later version
37 published by the Free Software Foundation; with no Invariant Sections,
38 no Front-Cover Texts, and no Back-Cover Texts.
39
40 @item
41 the GNU General Public License as published by the Free Software
42 Foundation; either version 2, or (at your option) any later version.
43 @end enumerate
44
45 The MH-E manual is distributed in the hope that it will be useful, but
46 WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48 General Public License or GNU Free Documentation License for more
49 details.
50
51 The GNU General Public License and the GNU Free Documentation License
52 appear as appendices to this document. You may also request copies by
53 writing to the Free Software Foundation, Inc., 51 Franklin Street,
54 Fifth Floor, Boston, MA 02110-1301, USA.
55 @end quotation
56 @end copying
57
58 @c Info Directory Entry
59 @dircategory Emacs
60 @direntry
61 * MH-E: (mh-e). Emacs interface to the MH mail system.
62 @end direntry
63
64 @c Title Page
65 @setchapternewpage odd
66 @titlepage
67 @title The MH-E Manual
68 @subtitle Version @value{VERSION}@value{EDITION}
69 @subtitle @value{UPDATE-MONTH}
70 @author Bill Wohler
71
72 @c Copyright Page
73 @page
74 @vskip 0pt plus 1filll
75 @insertcopying
76 @end titlepage
77
78 @ifnottex
79 @html
80 <!--
81 @end html
82 @node Top, Preface, (dir), (dir)
83 @top The MH-E Manual
84 @html
85 -->
86 @end html
87 @insertcopying
88 @end ifnottex
89
90 @c Table of Contents
91 @contents
92
93 @html
94 <!--
95 @end html
96
97 @menu
98 * Preface:: Preface
99 * Conventions:: GNU Emacs Terms and Conventions
100 * Getting Started:: Getting Started
101 * Tour Through MH-E:: Tour Through MH-E
102 * Using This Manual:: Using This Manual
103 * Incorporating Mail:: Incorporating Mail
104 * Reading Mail:: Reading Mail
105 * Folders:: Organizing Your Mail with Folders
106 * Sending Mail:: Sending Mail
107 * Editing Drafts:: Editing a Draft
108 * Aliases:: Aliases
109 * Identities:: Identities
110 * Speedbar:: The Speedbar
111 * Menu Bar:: The Menu Bar
112 * Tool Bar:: The Tool Bar
113 * Searching:: Searching Through Messages
114 * Threading:: Viewing Message Threads
115 * Limits:: Limiting Display
116 * Sequences:: Using Sequences
117 * Junk:: Dealing With Junk Mail
118 * Miscellaneous:: Miscellaneous Commands, Variables, and Buffers
119 * Scan Line Formats:: Scan Line Formats
120 * Procmail:: Reading Mailing Lists Effectively
121 * Odds and Ends:: Odds and Ends
122 * History:: History of MH-E
123 * GFDL:: GNU Free Documentation License
124 * GPL:: GNU Public License
125 * Key Index:: Key (Character) Index
126 * Command Index:: Command Index
127 * Option Index:: Option (Variable) Index
128 * Concept Index:: Concept Index
129
130 @detailmenu
131 --- The Detailed Node Listing ---
132
133 Tour Through MH-E
134
135 * Sending Mail Tour::
136 * Reading Mail Tour::
137 * Processing Mail Tour::
138 * Leaving MH-E::
139 * More About MH-E::
140
141 Using This Manual
142
143 * Options::
144 * Ranges::
145 * Folder Selection::
146
147 Reading Your Mail
148
149 * Viewing::
150 * Viewing Attachments::
151 * HTML::
152 * Digests::
153 * Reading PGP::
154 * Printing::
155 * Files and Pipes::
156 * Navigating::
157 * Miscellaneous Commands and Options::
158
159 Sending Mail
160
161 * Composing::
162 * Replying::
163 * Forwarding::
164 * Redistributing::
165 * Editing Again::
166
167 Editing a Draft
168
169 * Editing Message::
170 * Inserting Letter::
171 * Inserting Messages::
172 * Signature::
173 * Picture::
174 * Adding Attachments::
175 * Sending PGP::
176 * Checking Recipients::
177 * Sending Message::
178 * Killing Draft::
179
180 Odds and Ends
181
182 * Bug Reports::
183 * Mailing Lists::
184 * MH FAQ and Support::
185 * Getting MH-E::
186
187 History of MH-E
188
189 * From Brian Reid::
190 * From Jim Larus::
191 * From Stephen Gildea::
192 * From Bill Wohler::
193
194 @end detailmenu
195 @end menu
196
197 @html
198 -->
199 @end html
200
201 @node Preface, Conventions, Top, Top
202 @unnumbered Preface
203
204 @cindex Emacs
205 @cindex Unix commands, Emacs
206 @cindex preface
207
208 This manual introduces another interface to the MH mail system that is
209 accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is
210 easy to use. I don't assume that you know GNU Emacs or even MH at this
211 point, since I didn't know either of them when I discovered MH-E.
212 However, MH-E was the tip of the iceberg, and I discovered more and
213 more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of
214 them.
215
216 The MH-E package is distributed with GNU Emacs@footnote{Version
217 @value{VERSION} of MH-E will appear in GNU Emacs 22.1. It is supported
218 in GNU Emacs 21, as well as XEmacs 21 (except for versions
219 21.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher,
220 all versions of nmh, and GNU mailutils 0.4 and higher.}, so you
221 shouldn't have to do anything special to use it. This manual covers
222 MH-E version @value{VERSION}. To help you decide which version you
223 have, see @ref{Getting Started}.
224
225 @findex help-with-tutorial
226 @kindex C-h t
227
228 If you don't already use GNU Emacs but want to learn more, you can
229 read an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
230 (@code{help-with-tutorial}). (To learn about this notation, see
231 @ref{Conventions}.) If you want to take the plunge, consult the
232 @iftex
233 @cite{GNU Emacs Manual},
234 @end iftex
235 @ifinfo
236 @ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual},
237 @end ifinfo
238 @ifhtml
239 @uref{http://www.gnu.org/software/emacs/manual/html_node/,
240 @cite{GNU Emacs Manual}},
241 @end ifhtml
242 from the Free Software Foundation.
243
244 If more information is needed, you can go to the Unix manual pages of
245 the individual MH commands. When the name is not obvious, I'll guide
246 you to a relevant MH manual page that describes the action more fully.
247
248 @cindex info
249 @kindex C-h i
250
251 This manual is available in both Info and online formats. The Info
252 version is distributed with Emacs and can be accessed with the
253 @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i
254 m mh-e @key{RET}}). The online version is available at
255 @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great
256 online resource is the book @uref{http://www.ics.uci.edu/~mh/book/,
257 @cite{MH & nmh: Email for Users & Programmers}} (also known as
258 @dfn{the MH book}).
259
260 I hope you enjoy this manual! If you have any comments, or suggestions
261 for this document, please let me know.
262
263 @cindex Bill Wohler
264 @cindex Wohler, Bill
265
266 @noindent
267 Bill Wohler <@i{wohler at newt.com}>@*
268 8 February 1995@*
269 24 February 2006
270
271 @node Conventions, Getting Started, Preface, Top
272 @chapter GNU Emacs Terms and Conventions
273
274 @cindex Emacs
275 @cindex Emacs, conventions
276 @cindex Emacs, terms
277 @cindex Unix commands, Emacs
278 @cindex conventions, Emacs
279 @cindex terms, Emacs
280
281 If you're an experienced Emacs user, you can skip the following
282 conventions and definition of terms and go directly to the next
283 section (@pxref{Getting Started}).
284
285 @cindex Emacs commands
286 @cindex MH commands
287 @cindex Unix commands
288 @cindex commands
289 @cindex commands, MH
290 @cindex commands, Unix
291 @cindex commands, shell
292 @cindex functions
293 @cindex shell commands
294
295 In general, @dfn{functions} in this text refer to Emacs Lisp functions
296 that one would call from within Emacs Lisp programs (for example,
297 @code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those
298 things that are run by the user, such as @kbd{i} or @kbd{M-x
299 mh-inc-folder}. Programs outside of Emacs are specifically called MH
300 commands, shell commands, or Unix commands.
301
302 @cindex conventions, key names
303 @cindex key names
304
305 The conventions for key names are as follows:
306
307 @table @kbd
308 @item C-x
309 Hold down the @key{CTRL} (Control) key and press the @kbd{x} key.
310 @c -------------------------
311 @item M-x
312 Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key.
313
314 Since some keyboards don't have a @key{META} key, you can generate
315 @kbd{M-x}, for example, by pressing @key{ESC} (Escape),
316 @emph{releasing it}, and then pressing the @kbd{x} key.
317 @c -------------------------
318 @item @key{RET}
319 Press the @key{RETURN} or @key{ENTER} key. This is normally used to
320 complete a command.
321 @c -------------------------
322 @item @key{SPC}
323 Press the space bar.
324 @c -------------------------
325 @item @key{TAB}
326 Press the @key{TAB} key.
327 @c -------------------------
328 @item @key{DEL}
329 Press the @key{DELETE} key.
330 @c -------------------------
331 @item @key{BS}
332 Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or
333 earlier of Emacs, you will need to use the @key{DEL} key.}.
334 @end table
335
336 @cindex Emacs, prefix argument
337 @cindex prefix argument
338 @kindex C-u
339
340 A @dfn{prefix argument} allows you to pass an argument to any Emacs
341 function. To pass an argument, type @kbd{C-u} before the Emacs command
342 or keystroke. Numeric arguments can be passed as well. For example, to
343 insert five f's, use @kbd{C-u 5 f}. There is a default of four when
344 using @kbd{C-u}, and you can use multiple prefix arguments to provide
345 arguments of powers of four. To continue our example, you could insert
346 four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with
347 @kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative
348 arguments can also be inserted with the @key{META} key. Examples
349 include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which
350 specifies a negative argument with no particular value.
351
352 @sp 1
353 @center @strong{NOTE}
354
355 @quotation
356 The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder
357 mode (@pxref{Reading Mail Tour}). In this mode, simply enter the
358 numerical argument before entering the command.
359 @end quotation
360 @sp 1
361
362 @cindex @file{.emacs}
363 @cindex Emacs, variables
364 @cindex files, @file{.emacs}
365 @cindex variables
366 @findex setq
367
368 Emacs uses @dfn{variables} to hold values. These can be changed via
369 calls to the function @code{setq} in @file{~/.emacs}.
370
371 @cindex Emacs, options
372 @cindex options
373 @findex customize-group
374 @findex customize-option
375
376 Variables in MH-E that are normally modified by the user are called
377 @dfn{options} and are modified through the customize functions (such
378 as @kbd{M-x customize-option} or @kbd{M-x customize-group}).
379 @ifnothtml
380 @xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
381 GNU Emacs Manual}.
382 @end ifnothtml
383 @ifhtml
384 See section
385 @uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html,
386 Easy Customization} in @cite{The GNU Emacs Manual}.
387 @end ifhtml
388 @xref{Options}.
389
390 @cindex Emacs, faces
391 @cindex faces
392 @cindex highlighting
393 @findex customize-face
394
395 You can specify various styles for displaying text using @dfn{faces}.
396 MH-E provides a set of faces that you can use to personalize the look
397 of your MH-E buffers. Use the command @kbd{M-x customize-face} to do
398 this.
399 @ifnothtml
400 @xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
401 GNU Emacs Manual}.
402 @end ifnothtml
403 @ifhtml
404 See section
405 @uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html,
406 Face Customization} in @cite{The GNU Emacs Manual}.
407 @end ifhtml
408
409 @cindex abnormal hooks
410 @cindex hooks
411 @cindex normal hooks
412 @findex add-hook
413 @findex customize-option
414
415 Commands often offer @dfn{hooks} which enable you to extend or modify
416 the way a command works.
417 @ifnothtml
418 @ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU
419 Emacs Manual}
420 @end ifnothtml
421 @ifhtml
422 See section
423 @uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html,
424 Hooks} in @cite{The GNU Emacs Manual}
425 @end ifhtml
426 for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
427 MH-E uses normal hooks in nearly all cases, so you can assume that we
428 are talking about normal hooks unless we explicitly mention that a
429 hook is abnormal. We also follow the conventions described in that
430 section: the name of the abnormal hooks end in @code{-hooks} and all
431 the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
432 either @code{customize-option} or @code{add-hook}.
433
434 @cindex Emacs, mark
435 @cindex Emacs, point
436 @cindex Emacs, region
437 @cindex mark
438 @cindex point
439 @cindex region
440 @kindex C-@@
441 @kindex C-@key{SPC}
442
443 There are several other terms that are used in Emacs that you should
444 know. The @dfn{point} is where the cursor currently is. You can save
445 your current place in the file by setting a @dfn{mark}. This operation
446 is useful in several ways. The mark can be later used when defining a
447 @dfn{region}, which is the text between the point and mark. Many
448 commands operate on regions, such as those for deleting text or
449 filling paragraphs. A mark can be set with @kbd{C-@@} (or
450 @kbd{C-@key{SPC}}).
451
452 @cindex completion
453 @cindex Emacs, completion
454 @cindex Emacs, file completion
455 @cindex Emacs, folder completion
456 @cindex Emacs, minibuffer
457 @cindex file completion
458 @cindex folder completion
459 @cindex minibuffer
460 @kindex SPC
461 @kindex TAB
462
463 The @dfn{minibuffer} is the bottom line of the Emacs window, where all
464 prompting and multiple-character input is directed. You can use
465 @dfn{completion} to enter values such as folders. Completion means
466 that Emacs fills in text for you when you type @key{SPC} or @key{TAB}.
467 A second @key{SPC} or @key{TAB} will list all possibilities at that
468 point.
469 @ifnothtml
470 @xref{Completion, , Completion, emacs, The GNU Emacs Manual}.
471 @end ifnothtml
472 @ifhtml
473 See the section
474 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
475 Completion} in @cite{The GNU Emacs Manual}.
476 @end ifhtml
477 Note that @key{SPC} cannot be used for completing filenames and
478 folders.
479
480 @findex help-with-tutorial
481 @kindex C-h t
482 @kindex M-x
483
484 The minibuffer is also where you enter Emacs function names after
485 typing @kbd{M-x}. For example, in the preface, I mentioned that you
486 could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What
487 this means is that you can get a tutorial by typing either @kbd{C-h t}
488 or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted
489 for @samp{help-with-tutorial} in the minibuffer after typing
490 @kbd{M-x}.
491
492 @cindex ~
493
494 The @samp{~} notation in filenames represents your home directory.
495 This notation is used by many shells including @command{bash},
496 @code{tcsh}, and @command{csh}. It is analogous to the environment
497 variable @samp{$HOME}. For example, @file{~/.emacs} can be written
498 @file{$HOME/.emacs} or using the absolute path as in
499 @file{/home/wohler/.emacs} instead.
500
501 @cindex Emacs, interrupting
502 @cindex Emacs, quitting
503 @cindex interrupting
504 @cindex quitting
505
506 @i{In case of trouble:} Emacs can be interrupted at any time with
507 @kbd{C-g}. For example, if you've started a command that requests that
508 you enter something in the minibuffer, but then you change your mind,
509 type @kbd{C-g} and you'll be back where you started. If you want to
510 exit Emacs entirely, use @kbd{C-x C-c}.
511
512 @node Getting Started, Tour Through MH-E, Conventions, Top
513 @chapter Getting Started
514
515 @cindex MH-E, versions
516 @cindex history
517 @cindex versions of MH-E
518
519 Because there are many old versions of MH-E out there, it is important
520 to know which version you have. I'll be talking about @w{Version 8}
521 which is pretty close to @w{Version 6} and @w{Version 7}. It differs
522 from @w{Version 4} and @w{Version 5} and is vastly different from
523 @w{Version 3}. @xref{History}.
524
525 @findex mh-version
526
527 To determine which version of MH-E that you have, enter @kbd{M-x
528 mh-version @key{RET}}. Hopefully it says that you're running
529 @w{Version @value{VERSION}} which is the latest version as of this
530 printing.
531
532 If your version is much older than this, please consider upgrading.
533 You can have your system administrator upgrade the system-wide
534 version, or you can install your own personal version. It's really
535 quite easy. @xref{Getting MH-E}, for instructions for getting and
536 installing MH-E.
537
538 If the @code{mh-version} command displays @samp{No MH variant
539 detected}, then you need to install MH or tell MH-E where to find
540 MH@footnote{In very old versions of MH-E, you may get the error
541 message, @samp{Cannot find the commands `inc' and `mhl' and the file
542 `components'} if MH-E can't find MH. In this case, you need to update
543 MH-E, and you may need to install MH too. However, newer versions of
544 MH-E are better at finding MH if it is on your system.}.
545
546 @cindex @command{mhparam}
547 @cindex MH commands, @command{mhparam}
548 @vindex exec-path
549 @vindex mh-path
550 @vindex mh-sys-path
551 @vindex mh-variant
552 @vindex mh-variant-in-use
553
554 The option @code{mh-variant} specifies the variant used by MH-E
555 (@pxref{Options}). The default setting of this option is
556 @samp{Auto-detect} which means that MH-E will automatically choose the
557 first of nmh, MH, or GNU mailutils that it finds in the directories
558 listed in @code{mh-path} (which you can customize),
559 @code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at
560 all, you may have to customize @code{mh-path} and add the directory in
561 which the command @command{mhparam} is located. If, on the other hand,
562 you have both nmh and mailutils installed (for example) and
563 @code{mh-variant-in-use} was initialized to nmh but you want to use
564 mailutils, then you can set @code{mh-variant} to @samp{mailutils}.
565
566 @vindex mh-flists-present-flag
567 @vindex mh-lib
568 @vindex mh-lib-progs
569 @vindex mh-progs
570
571 When @code{mh-variant} is changed, MH-E resets @code{mh-progs},
572 @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and
573 @code{mh-variant-in-use} accordingly.
574
575 @cindex @file{.emacs}
576 @cindex files, @file{.emacs}
577
578 @sp 1
579 @center @strong{NOTE}
580
581 @quotation
582 Prior to version 8, it was often necessary to set some of these
583 variables in @file{~/.emacs}; now it is no longer necessary and can
584 actually cause problems.
585 @end quotation
586 @sp 1
587
588 @cindex @command{install-mh}
589 @cindex MH commands, @command{install-mh}
590
591 If you've never run MH before, you need to run @command{install-mh}
592 from the shell before you continue. This sets up your personal MH
593 environment@footnote{See the section
594 @uref{@value{MH-BOOK-HOME}/setup.htm, Setting Up MH} in the MH book.}.
595 If you don't, you'll be greeted with the error message: @samp{Install
596 MH and run install-mh before running MH-E}.
597
598 @cindex @samp{Path:} MH profile component
599 @cindex MH profile
600 @cindex MH profile component
601 @cindex MH profile component, @samp{Path:}
602
603 Your MH environment includes your @dfn{MH profile} which is found in
604 the file @file{~/.mh_profile}. This file contains a number of @dfn{MH
605 profile components}. For example, the @samp{Path:} MH profile
606 component contains the path to your mail directory, which is
607 @file{~/Mail} by default.
608
609 @cindex MH profile component, @samp{Draft-Folder:}
610 @cindex MH profile component, @samp{Path:}
611 @cindex MH profile component, @samp{Previous-Sequence:}
612 @cindex MH profile component, @samp{Unseen-Sequence:}
613 @cindex @samp{Draft-Folder:} MH profile component
614 @cindex @samp{Path:} MH profile component
615 @cindex @samp{Previous-Sequence:} MH profile component
616 @cindex @samp{Unseen-Sequence:} MH profile component
617 @findex mh-find-path
618 @vindex mh-draft-folder
619 @vindex mh-find-path-hook
620 @vindex mh-inbox
621 @vindex mh-previous-seq
622 @vindex mh-unseen-seq
623 @vindex mh-user-path
624
625 In addition to setting variables that point to MH itself, MH-E also
626 sets a handful of variables that point to where you keep your mail.
627 During initialization, the function @code{mh-find-path} sets
628 @code{mh-user-path} from your @samp{Path:} MH profile component (but
629 defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder}
630 from @samp{Draft-Folder:}, @code{mh-unseen-seq} from
631 @samp{Unseen-Sequence:}, @code{mh-previous-seq} from
632 @samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:}
633 (defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run
634 after these variables have been set. This hook can be used the change
635 the value of these variables if you need to run with different values
636 between MH and MH-E.
637
638 @node Tour Through MH-E, Using This Manual, Getting Started, Top
639 @chapter Tour Through MH-E
640
641 @cindex introduction
642 @cindex tour
643 @cindex tutorial
644
645 This chapter introduces some of the terms you'll need to know and then
646 takes you on a tour of MH-E@footnote{The keys mentioned in these
647 chapters refer to the default key bindings. If you've changed the
648 bindings, refer to the command summaries at the beginning of each
649 chapter for a mapping between default key bindings and function
650 names.}. When you're done, you'll be able to send, read, and file
651 mail, which is all that a lot of people ever do. But if you're the
652 curious or adventurous type, read the rest of the manual to be able to
653 use all the features of MH-E. I suggest you read this chapter first to
654 get the big picture, and then you can read the manual as you wish.
655
656 @menu
657 * Sending Mail Tour::
658 * Reading Mail Tour::
659 * Processing Mail Tour::
660 * Leaving MH-E::
661 * More About MH-E::
662 @end menu
663
664 @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E
665 @section Sending Mail
666
667 @cindex MH-Letter mode
668 @cindex mode
669 @cindex modes, MH-Letter
670 @cindex sending mail
671 @findex mh-smail
672 @kindex M-x mh-smail
673
674 Let's start our tour by sending ourselves a message which we can later
675 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
676 to send messages. Your message appears in an Emacs buffer whose
677 mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a
678 particular type of text.} is MH-Letter.
679
680 Enter your login name in the @samp{To:} header field. Press the
681 @key{TAB} twice to move the cursor past the @samp{Cc:} field, since no
682 carbon copies are to be sent, and on to the @samp{Subject:} field.
683 Enter @kbd{Test} or anything else that comes to mind.
684
685 Press @key{TAB} again to move the cursor to the body of the message.
686 Enter some text, using normal Emacs commands. You should now have
687 something like this@footnote{If you're running Emacs under the X
688 Window System, then you would also see a menu bar and a tool bar. I've
689 left out the menu bar and tool bar in all of the example screens.}:
690
691 @cartouche
692 @smallexample
693
694
695
696
697
698
699 --:-- *scratch* All L1 (Lisp Interaction)-------------------------
700 To: wohler
701 cc:
702 Subject: Test
703 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
704 --------
705 This is a test message to get the wheels churning...#
706
707
708 --:** @{draft@} All L5 (MH-Letter)----------------------------------
709 Type C-c C-c to send message, C-C ? for help
710 @end smallexample
711 @end cartouche
712 @i{MH-E message composition window}
713
714 Note the line of dashes that separates the header and the body of the
715 message. It is essential that these dashes (or a blank line) are
716 present or the body of your message will be considered to be part of
717 the header.
718
719 @cindex help
720 @findex describe-mode
721 @kindex C-c ?
722 @kindex C-c C-c
723 @kindex C-h m
724
725 There are several commands specific to MH-Letter mode@footnote{You can
726 get quick help for the commands used most often with @kbd{C-c ?} or
727 more complete help with the @kbd{C-h m} (@code{describe-mode})
728 command.}, but at this time we'll only use @kbd{C-c C-c} to send your
729 message. Type @kbd{C-c C-c} now. That's all there is to it!
730
731 @node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E
732 @section Receiving Mail
733
734 @cindex @command{inc}
735 @cindex @command{scan}
736 @cindex MH commands, @command{inc}
737 @cindex MH commands, @command{scan}
738 @cindex MH-Folder mode
739 @cindex modes, MH-Folder
740 @cindex reading mail
741 @findex mh-rmail
742 @kindex M-x mh-rmail
743
744 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
745 This incorporates the new mail and puts the output from
746 @command{inc}@footnote{See the section
747 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
748 prev} in the MH book.} (called @dfn{scan lines} after the MH program
749 @command{scan}@footnote{See the section
750 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
751 pick Ranges Sequences} in the MH book.} which prints a one-line
752 summary of each message) into a buffer called @samp{+inbox} whose
753 major mode is MH-Folder.
754
755 @findex mh-rmail
756 @kindex F r
757 @kindex M-x mh-rmail
758
759 @sp 1
760 @center @strong{NOTE}
761
762 @quotation
763
764 The @kbd{M-x mh-rmail} command will show you only new mail, not mail
765 you have already read. If you were to run this tour again, you would
766 use @kbd{F r} to pull all your messages into MH-E.
767 @end quotation
768 @sp 1
769
770 @kindex @key{RET}
771 @kindex n
772 @kindex p
773
774 You should see the scan line for your message, and perhaps others. Use
775 @kbd{n} or @kbd{p} to move the cursor to your test message and type
776 @key{RET} to read your message. You should see something like:
777
778 @cartouche
779 @smallexample
780 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
781 # 4+t08/24 To:wohler Test<<This is a test message to get the wheels
782
783 -:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------
784 To: wohler
785 Subject: Test
786 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
787 Date: Fri, 17 Mar 2006 10:49:11 -0800
788 From: Bill Wohler <wohler@@stop.mail-abuse.org>
789
790 This is a test message to get the wheels churning...
791
792
793
794 --:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
795
796 @end smallexample
797 @end cartouche
798 @i{After incorporating new messages}
799
800 @kindex @key{DEL}
801 @kindex @key{SPC}
802
803 If you typed a long message, you can view subsequent pages with
804 @key{SPC} and previous pages with @key{DEL}.
805
806 @node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E
807 @section Processing Mail
808
809 @cindex processing mail
810 @kindex @key{RET}
811 @kindex r
812
813 The first thing we want to do is reply to the message that we sent
814 ourselves. Ensure that the cursor is still on the same line as your
815 test message and type @kbd{r}. You are prompted in the minibuffer with
816 @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply
817 to the original sender only, to the sender and primary recipients, or
818 to the sender and all recipients. You can press @key{TAB} to see these
819 choices. If you simply press @key{RET}, you'll reply only to the
820 sender. Press @key{RET} now.
821
822 You'll find yourself in an Emacs buffer similar to that when you were
823 sending the original message, like this:
824
825 @cartouche
826 @smallexample
827 To:
828 cc:
829 Subject: Re: Test
830 In-reply-to: <31054.1142621351@@stop.mail-abuse.org>
831 References: <31054.1142621351@@stop.mail-abuse.org>
832 Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org>
833 message dated "Fri, 17 Mar 2006 10:49:11 -0800."
834 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
835 --------
836 #
837
838 --:-- @{draft@} All L10 (MH-Letter)----------------------------------
839 To: wohler
840 Subject: Test
841 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
842 Date: Fri, 17 Mar 2006 10:49:11 -0800
843 From: Bill Wohler <wohler@@stop.mail-abuse.org>
844
845 This is a test message to get the wheels churning...
846
847 --:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
848 Type C-c C-c to send message, C-c ? for help
849 @end smallexample
850 @end cartouche
851 @i{Composition window during reply}
852
853 @findex backward-char
854 @findex forward-char
855 @findex next-line
856 @findex previous-line
857 @kindex C-b
858 @kindex C-c C-c
859 @kindex C-c C-f C-t
860 @kindex C-f
861 @kindex C-n
862 @kindex C-p
863 @kindex @key{BS}
864
865 By default, MH will not add you to the address list of your replies,
866 so if you find that the @samp{To:} header field is missing, don't
867 worry. In this case, type @kbd{C-c C-f C-t} to create and go to the
868 @samp{To:} field, where you can type your login name again. You can
869 move around with the arrow keys or with @kbd{C-p}
870 (@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b}
871 (@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can
872 delete the previous character with @key{BS}. When you're finished
873 editing your message, send it with @kbd{C-c C-c} as before.
874
875 @cindex @command{refile}
876 @cindex MH commands, @command{refile}
877 @cindex folders
878 @kindex @key{SPC}
879 @kindex o
880
881 You'll often want to save messages that were sent to you in an
882 organized fashion. This is done with @dfn{folders}. You can use
883 folders to keep messages from your friends, or messages related to a
884 particular topic. With your cursor in the MH-Folder buffer and
885 positioned on the message you sent to yourself, type @kbd{o} to output
886 (@command{refile} in MH parlance) that message to a folder. Enter
887 @kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y}
888 (or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note
889 that a @samp{^} (caret) appears next to the message number, which
890 means that the message has been marked for refiling but has not yet
891 been refiled. We'll talk about how the refile is actually carried out
892 in a moment.
893
894 @cindex MH-Folder mode
895 @cindex modes, MH-Folder
896 @kindex d
897 @kindex i
898 @kindex @key{RET}
899 @kindex n
900 @kindex p
901 @kindex x
902
903 Your previous reply is now waiting in the system mailbox. You
904 incorporate this mail into your MH-Folder buffer named @samp{+inbox}
905 with the @kbd{i} command. Do this now. After the mail is incorporated,
906 use @kbd{n} or @kbd{p} to move the cursor to the new message, and read
907 it with @key{RET}. Let's delete this message by typing @kbd{d}. Note
908 that a @samp{D} appears next to the message number. This means that
909 the message is marked for deletion but is not yet deleted. To perform
910 the deletion (and the refile we did previously), use the @kbd{x}
911 command.
912
913 @findex mh-smail
914 @kindex m
915 @kindex M-x mh-smail
916
917 If you want to send another message you can use @kbd{m} instead of
918 @kbd{M-x mh-smail}. So go ahead, send some mail to your friends!
919
920 @cindex help
921 @cindex prefix characters
922 @findex describe-mode
923 @kindex ?
924 @kindex C-h m
925 @kindex F ?
926
927 You can get a quick reminder about these commands by typing @kbd{?}.
928 This lists several @dfn{prefix characters}. To list the commands
929 available via the prefix characters, type the prefix character
930 followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is
931 available with the @kbd{C-h m} (@code{describe-mode}) command.
932
933 @node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E
934 @section Leaving MH-E
935
936 @cindex Emacs, quitting
937 @cindex quitting
938 @kindex C-x C-c
939 @kindex x
940
941 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c}
942 to exit @command{emacs}. If you exited without running @kbd{x} in the
943 @samp{+inbox} buffer, Emacs will offer to save it for you. Type
944 @kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to
945 perform any refiles and deletes that you did there.
946
947 @findex mh-rmail
948 @kindex C-x b
949 @kindex C-x k
950 @kindex M-x mh-rmail
951 @kindex q
952
953 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
954 the MH-E folder or delete it entirely with @kbd{C-x k}. You can then
955 later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}.
956
957 @cindex @command{packf}
958 @cindex MH commands, @command{packf}
959 @cindex exporting folders
960 @cindex folders, exporting
961 @cindex mbox-style folder
962
963 On the other hand, if you no longer want to use MH and MH-E, you can
964 take your mail with you. You can copy all of your mail into a single
965 file, mbox-style, by using the MH command @command{packf}. For
966 example, to create a file called @file{msgbox} with the messages in
967 your @samp{+inbox} folder, use @samp{packf +inbox}. The
968 @command{packf} command will append the messages to the file if it
969 already exists, so you can use @samp{folders -recurse -fast} in a
970 script to copy all of your messages into a single file, or using the
971 @samp{-file} argument, a file for each folder.
972
973 @node More About MH-E, , Leaving MH-E, Tour Through MH-E
974 @section More About MH-E
975
976 These are the basic commands to get you going, but there are plenty
977 more. If you think that MH-E is for you, read the rest of the manual
978 to find out how you can:
979
980 @itemize @bullet
981 @item
982 Print your messages (@pxref{Printing}).
983 @c -------------------------
984 @item
985 Edit messages and include your signature (@pxref{Editing Drafts}).
986 @c -------------------------
987 @item
988 Forward messages (@pxref{Forwarding}).
989 @c -------------------------
990 @item
991 Read digests (@pxref{Digests}).
992 @c -------------------------
993 @item
994 Edit bounced messages (@pxref{Editing Again}).
995 @c -------------------------
996 @item
997 Send multimedia messages (@pxref{Adding Attachments}).
998 @c -------------------------
999 @item
1000 Read HTML messages (@pxref{HTML}).
1001 @c -------------------------
1002 @item
1003 Use aliases and identities (see @ref{Aliases}, @pxref{Identities}).
1004 @c -------------------------
1005 @item
1006 Create different views of your mail (see @ref{Threading}, @pxref{Limits}).
1007 @c -------------------------
1008 @item
1009 Deal with junk mail (@pxref{Junk}).
1010 @c -------------------------
1011 @item
1012 Handle signed and encrypted messages (see @ref{Reading PGP},
1013 @pxref{Sending PGP}).
1014 @c -------------------------
1015 @item
1016 Process mail that was sent with @command{shar} or @command{uuencode}
1017 (@pxref{Files and Pipes}).
1018 @c -------------------------
1019 @item
1020 Use sequences conveniently (@pxref{Sequences}).
1021 @c -------------------------
1022 @item
1023 Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool
1024 Bar}, @pxref{Menu Bar}).
1025 @c -------------------------
1026 @item
1027 Show header fields in different fonts (@pxref{Reading Mail}).
1028 @c -------------------------
1029 @item
1030 Find previously refiled messages (@pxref{Searching}).
1031 @c -------------------------
1032 @item
1033 Place messages in a file (@pxref{Files and Pipes}).
1034 @end itemize
1035
1036 Remember that you can also use MH commands when you're not running
1037 MH-E (and when you are!).
1038
1039 @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top
1040 @chapter Using This Manual
1041
1042 This chapter begins the meat of the manual which goes into more detail
1043 about every MH-E command and option.
1044
1045 @cindex Emacs, info
1046 @cindex Emacs, online help
1047 @cindex info
1048 @cindex online help
1049 @findex describe-mode
1050 @findex mh-help
1051 @kindex ?
1052 @kindex C-c ?
1053 @kindex C-h C-h
1054 @kindex C-h C-k i
1055 @kindex C-h i
1056 @kindex C-h m
1057
1058 There are many commands, but don't get intimidated. There are command
1059 summaries at the beginning of each chapter. In case you have or would
1060 like to rebind the keys, the command summaries also list the
1061 associated Emacs Lisp function. Furthermore, even if you're stranded
1062 on a desert island with a laptop and are without your manuals, you can
1063 get a summary of all these commands with GNU Emacs online help: use
1064 @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands,
1065 @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This
1066 help appears in a buffer called @samp{*MH-E Help*}
1067 (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h
1068 i} to read this manual via Info. The online help is quite good; try
1069 running @kbd{C-h C-h}. This brings up a list of available help topics,
1070 one of which displays the documentation for a given key (like @kbd{C-h
1071 k C-n}). Another useful help feature is to view the manual section
1072 that describes a given key (such as @kbd{C-h C-k i}). In addition,
1073 review @ref{Conventions}, if any of the GNU Emacs conventions are
1074 strange to you.
1075
1076 In addition to all of the commands, it is also possible to reconfigure
1077 MH-E to fit the needs of even the most demanding user. The following
1078 chapters also describe all of the options, show the defaults, and make
1079 recommendations for customization.
1080
1081 However, when customizing your mail environment, first try to change
1082 what you want in MH, and only change MH-E if changing MH is not
1083 possible. That way you will get the same behavior inside and outside
1084 GNU Emacs. Note that MH-E does not provide hooks for customizations
1085 that can be done in MH; this omission is intentional.
1086
1087 @cindex Emacs Lisp Manual
1088 @cindex Emacs, Emacs Lisp Manual
1089 @cindex Emacs, info
1090 @cindex Emacs, online help
1091 @cindex info
1092 @cindex online help
1093
1094 I hope I've included enough examples here to get you well on your way.
1095 If you want to explore Emacs Lisp further, a programming manual does
1096 exist,
1097 @c Yes, some of the stuff in the following sections is redundant, but
1098 @c TeX barfs if the @ifs are inside the @footnote.
1099 @iftex
1100 @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
1101 online in the Info system by typing @kbd{C-h i m Emacs Lisp
1102 @key{RET}}. It is also available online at @*
1103 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1104 can also order a printed manual, which has the desirable side-effect
1105 of helping to support the Free Software Foundation which made all this
1106 great software available. You can find an order form by running
1107 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1108 gnu.org}.}
1109 @end iftex
1110 @ifinfo
1111 @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU
1112 Emacs Lisp Reference Manual}, which may be available online in the
1113 Info system. It is also available online at
1114 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1115 can also order a printed manual, which has the desirable side-effect
1116 of helping to support the Free Software Foundation which made all this
1117 great software available. You can find an order form by running
1118 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1119 gnu.org}.}
1120 @end ifinfo
1121 @ifhtml
1122 @footnote{The
1123 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/,
1124 The GNU Emacs Lisp Reference Manual} may also be available online in
1125 the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can
1126 also order a printed manual, which has the desirable side-effect of
1127 helping to support the Free Software Foundation which made all this
1128 great software available. You can find an order form by running
1129 @kbd{C-h C-d}, or you can request an order form from @i{gnu at
1130 gnu.org}.}
1131 @end ifhtml
1132 and you can look at the code itself for examples. Look in the Emacs
1133 Lisp directory on your system (such as
1134 @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
1135 files there. When calling MH-E and other Emacs Lisp functions directly
1136 from Emacs Lisp code, you'll need to know the correct arguments. Use
1137 the online help for this. For example, try @kbd{C-h f
1138 mh-execute-commands @key{RET}}. If you write your own functions,
1139 please do not prefix your symbols (variables and functions) with
1140 @samp{mh-}. This prefix is reserved for the MH-E package. To avoid
1141 conflicts with existing MH-E symbols, use a prefix like @samp{my-} or
1142 your initials.
1143
1144 @menu
1145 * Options::
1146 * Ranges::
1147 * Folder Selection::
1148 @end menu
1149
1150 @node Options, Ranges, Using This Manual, Using This Manual
1151 @section Options
1152
1153 @cindex Emacs, customizing
1154 @cindex Emacs, setting options
1155 @cindex customizing MH-E
1156 @cindex setting options
1157 @findex customize-option
1158 @vindex mh-lpr-command-format, example
1159
1160 Many string or integer options are easy to modify using @kbd{M-x
1161 customize-option}. For example, to modify the option that controls
1162 printing, you would run @kbd{M-x customize-option @key{RET}
1163 mh-lpr-command-format @key{RET}}. In the buffer that appears, modify
1164 the string to the right of the variable. For example, you may change
1165 the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then
1166 use the @samp{State} combo box and select @samp{Save for Future
1167 Sessions}. To read more about @code{mh-lpr-command-format}, see
1168 @ref{Printing}.
1169
1170 @cindex nil
1171 @cindex off, option
1172 @cindex on, option
1173 @cindex option, turning on and off
1174 @cindex t
1175 @findex customize-option
1176 @vindex mh-bury-show-buffer-flag, example
1177
1178 Options can also hold boolean values. In Emacs Lisp, the boolean
1179 values are @code{nil}, which means false, and @code{t}, which means
1180 true. The @code{customize-option} function makes it easy to change
1181 boolean values; simply click on the toggle button in the customize
1182 buffer to switch between @samp{on} (@code{t}) and @samp{off}
1183 (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag}
1184 to @samp{off} to keep the MH-Show buffer at the top of the buffer
1185 stack. Use the @samp{State} combo box and choose @samp{Set for Current
1186 Session} to see how the option affects the show buffer. Then choose
1187 the @samp{Erase Customization} menu item to reset the option to the
1188 default, which places the MH-Show buffer at the bottom of the buffer
1189 stack.
1190
1191 @vindex mh-mhl-format-file, example
1192
1193 The text usually says to turn on an option by setting it to a
1194 @emph{non-@code{nil}} value, because sometimes values other than
1195 @samp{on} are meaningful. An example of this is the variable
1196 @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as
1197 hooks, involve a little more Emacs Lisp programming expertise.
1198
1199 @cindex customization group, @samp{mh}
1200 @cindex @samp{mh} customization group
1201 @findex customize-group
1202 @findex mh-customize
1203
1204 You can browse all of the MH-E options with the @code{customize-group}
1205 function. Try entering @kbd{M-x customize-group @key{RET} mh
1206 @key{RET}} to view the top-level options as well as buttons for all of
1207 the MH-E customization groups. Another way to view the MH-E
1208 customization group is to use @kbd{M-x mh-customize @key{RET}}.
1209
1210 @node Ranges, Folder Selection, Options, Using This Manual
1211 @section Ranges
1212
1213 @c Sync with mh-folder-mode docstring.
1214
1215 @cindex message abbreviations
1216 @cindex message ranges
1217 @cindex ranges
1218
1219 Many commands that operate on individual messages, such as
1220 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE}
1221 argument. This argument can be used in several ways.
1222
1223 @kindex C-u, with ranges
1224
1225 If you provide the prefix argument @kbd{C-u} to these commands, then
1226 you will be prompted for the message range. This can be any valid MH
1227 range which can include messages, sequences (@pxref{Sequences}), and
1228 the abbreviations (described in the @command{mh}(1) man page):
1229
1230 @table @samp
1231 @item <num1>-<num2>
1232 Indicates all messages in the range <num1> to <num2>, inclusive. The
1233 range must be nonempty.
1234 @c -------------------------
1235 @item <num>:N
1236 @item <num>:+N
1237 @itemx <num>:-N
1238 Up to N messages beginning with (or ending with) message num. Num may
1239 be any of the predefined symbols: first, prev, cur, next or last.
1240 @c -------------------------
1241 @item first:N
1242 @itemx prev:N
1243 @itemx next:N
1244 @itemx last:N
1245 The first, previous, next or last messages, if they exist.
1246 @c -------------------------
1247 @item all
1248 All of the messages.
1249 @end table
1250
1251 For example, a range that shows all of these things is @samp{1 2 3
1252 5-10 last:5 unseen}.
1253
1254 @vindex transient-mark-mode
1255
1256 If the option @code{transient-mark-mode} is turned on and you set a
1257 region in the MH-Folder buffer, then the MH-E command will perform the
1258 operation on all messages in that region.
1259
1260 @cindex @samp{mh-range} customization group
1261 @cindex customization group, @samp{mh-range}
1262
1263 The @samp{mh-range} customization group contains a single option which
1264 affects how ranges are interpreted.
1265
1266 @vtable @code
1267 @item mh-interpret-number-as-range-flag
1268 On means interpret a number as a range (default: @samp{on}).
1269 @end vtable
1270
1271 @vindex mh-interpret-number-as-range-flag
1272
1273 Since one of the most frequent ranges used is @samp{last:N}, MH-E will
1274 interpret input such as @samp{200} as @samp{last:200} if the
1275 @code{mh-interpret-number-as-range-flag} option is on (which is the
1276 default). If you need to scan just the message 200, then use the range
1277 @samp{200:1} or @samp{200-200}.
1278
1279 @node Folder Selection, , Ranges, Using This Manual
1280 @section Folder Selection
1281
1282 @cindex completion, folders
1283 @cindex folders, completion
1284 @cindex folders, selecting
1285
1286 When you choose a folder in MH-E via a command such as @kbd{o}
1287 (@code{mh-refile-msg}), completion is used to enter the folder
1288 @ifnothtml
1289 (@pxref{Completion, , , emacs, The GNU Emacs Manual}).
1290 @end ifnothtml
1291 @ifhtml
1292 (see the section
1293 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
1294 Completion} in @cite{The GNU Emacs Manual}).
1295 @end ifhtml
1296 In addition, MH-E has several ways of choosing a suitable default so
1297 that the folder can often be selected with a single @key{RET} key.
1298
1299 @cindex customization group, @samp{mh-folder-selection}
1300 @cindex @samp{mh-folder-selection} customization group
1301
1302 The @samp{mh-folder-selection} customization group contains some
1303 options which are used to help with this.
1304
1305 @vtable @code
1306 @item mh-default-folder-for-message-function
1307 Function to select a default folder for refiling or @samp{Fcc:}
1308 (default: @code{nil}).
1309 @c -------------------------
1310 @item mh-default-folder-list
1311 List of addresses and folders (default: @code{nil}).
1312 @c -------------------------
1313 @item mh-default-folder-must-exist-flag
1314 On means guessed folder name must exist to be used (default:
1315 @samp{on}).
1316 @c -------------------------
1317 @item mh-default-folder-prefix
1318 Prefix used for folder names generated from aliases (default: @code{""}).
1319 @end vtable
1320
1321 @vindex mh-default-folder-for-message-function
1322
1323 You can set the option @code{mh-default-folder-for-message-function}
1324 to a function that provides a default folder for the message to be
1325 refiled. When this function is called, the current buffer contains the
1326 message being refiled and point is at the start of the message. This
1327 function should return the default folder as a string with a leading
1328 @samp{+} sign. It can also return @code{nil} so that the last folder
1329 name is used as the default, or an empty string to suppress the
1330 default entirely.
1331
1332 Otherwise, the name of the destination folder is derived from the
1333 sender as follows:
1334
1335 @enumerate
1336 @vindex mh-default-folder-list
1337 @item
1338 The folder name associated with the first address found in the list
1339 @code{mh-default-folder-list} is used. Each element in this list
1340 contains a @samp{Check Recipient} item. If this item is turned on,
1341 then the address is checked against the recipient instead of the
1342 sender. This is useful for mailing lists.
1343 @c -------------------------
1344 @vindex mh-default-folder-prefix
1345 @item
1346 An alias prefixed by @code{mh-default-folder-prefix} corresponding to
1347 the address is used. The prefix is used to prevent clutter in your
1348 mail directory. @xref{Aliases}.
1349 @end enumerate
1350
1351 @vindex mh-default-folder-must-exist-flag
1352
1353 If the derived folder does not exist, and
1354 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last
1355 folder name used is suggested. This is useful if you get mail from
1356 various people for whom you have an alias, but file them all in the
1357 same project folder.
1358
1359 @node Incorporating Mail, Reading Mail, Using This Manual, Top
1360 @chapter Incorporating Your Mail
1361
1362 @cindex @samp{Folder} menu
1363 @cindex incorporating
1364 @cindex menu, @samp{Folder}
1365
1366 This chapter talks about getting mail from your system mailbox into
1367 your MH @samp{+inbox} folder. The following command accomplishes that
1368 and is found in the @samp{Folder} menu.
1369
1370 @table @kbd
1371 @cindex @samp{Folder > Incorporate New Mail} menu item
1372 @cindex menu item, @samp{Folder > Incorporate New Mail}
1373 @findex mh-inc-folder
1374 @kindex i
1375 @item i
1376 Incorporate new mail into a folder (@code{mh-inc-folder}).
1377 @end table
1378
1379 @cindex @samp{mh-inc} customization group
1380 @cindex customization group, @samp{mh-inc}
1381
1382 The following options in the @samp{mh-inc} customization group are
1383 used.
1384
1385 @vtable @code
1386 @item mh-inc-prog
1387 Program to incorporate mail (default: @code{"inc"}).
1388 @c -------------------------
1389 @item mh-inc-spool-list
1390 Alternate spool files (default: @code{nil}).
1391 @end vtable
1392
1393 The following hook is available.
1394
1395 @vtable @code
1396 @findex mh-inc-folder
1397 @item mh-inc-folder-hook
1398 Hook run by @code{mh-inc-folder} after incorporating mail into a
1399 folder (default: @code{nil}).
1400 @end vtable
1401
1402 @cindex @samp{+inbox}
1403 @findex mh-inc-folder
1404 @kindex i
1405
1406 If at any time you receive new mail, incorporate the new mail into
1407 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note
1408 that @kbd{i} will display the @samp{+inbox} buffer, even if there
1409 isn't any new mail. You can incorporate mail from any file into the
1410 current folder by specifying a prefix argument; you'll be prompted for
1411 the name of the file to use as well as the destination folder (for
1412 example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}).
1413
1414 @cindex @file{.emacs}
1415 @cindex Emacs, notification of new mail
1416 @cindex files, @file{.emacs}
1417 @cindex new mail
1418 @cindex notification of new mail
1419
1420 Emacs can notify you when you have new mail by displaying @samp{Mail}
1421 in the mode line. To enable this behavior, and to have a clock in the
1422 mode line as well, add the following to @file{~/.emacs}:
1423
1424 @findex display-time
1425
1426 @smalllisp
1427 (display-time)
1428 @end smalllisp
1429
1430 @cindex @command{inc}
1431 @cindex incorporating
1432 @cindex MH commands, @command{inc}
1433 @vindex mh-inc-prog
1434 @vindex mh-progs
1435
1436 The name of the program that incorporates new mail is stored in
1437 @code{mh-inc-prog}; it is @code{"inc"} by default. This program
1438 generates a one-line summary for each of the new messages. Unless it
1439 is an absolute pathname, the file is assumed to be in the
1440 @code{mh-progs} directory (@pxref{Getting Started}). You may also link
1441 a file to @command{inc} that uses a different format (see
1442 @samp{mh-profile}(5), and sections
1443 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
1444 prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in
1445 the MH book). You'll then need to modify several variables
1446 appropriately (@pxref{Scan Line Formats}).
1447
1448 @vindex mh-inc-spool-list
1449
1450 You can use the @code{mh-inc-spool-list} variable to direct MH-E to
1451 retrieve mail from arbitrary spool files other than your system
1452 mailbox, file it in folders other than your @samp{+inbox}, and assign
1453 key bindings to incorporate this mail.
1454
1455 @cindex @command{procmail}
1456 @cindex @file{.procmailrc}
1457 @cindex Unix commands, @command{procmail}
1458 @cindex files, @file{.procmailrc}
1459
1460 Suppose you are subscribed to the @i{mh-e-devel} mailing list and you
1461 use @command{procmail} to filter this mail into @file{~/mail/mh-e}
1462 with the following recipe in @file{.procmailrc}:
1463
1464 @smallexample
1465 MAILDIR=$HOME/mail
1466 :0:
1467 * ^From mh-e-devel-admin@@stop.mail-abuse.org
1468 mh-e
1469 @end smallexample
1470
1471 @findex mh-inc-spool-*
1472 @kindex I *
1473
1474 In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an
1475 @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option,
1476 and click on the @samp{INS} button. Enter a @samp{Spool File} of
1477 @samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key
1478 Binding} of @samp{m}.
1479
1480 @cindex @command{emacsclient}
1481 @cindex @command{gnuclient}
1482 @cindex @command{xbuffy}
1483 @cindex @samp{gnuserv}
1484 @cindex Unix commands, @command{emacsclient}
1485 @cindex Unix commands, @command{gnuclient}
1486 @cindex Unix commands, @command{xbuffy}
1487
1488 You can use @command{xbuffy} to automate the incorporation of this
1489 mail using the Emacs 22 command @command{emacsclient} as follows:
1490
1491 @smallexample
1492 box ~/mail/mh-e
1493 title mh-e
1494 origMode
1495 polltime 10
1496 headertime 0
1497 command emacsclient --eval '(mh-inc-spool-mh-e)'
1498 @end smallexample
1499
1500 In XEmacs, the command @command{gnuclient} is used in a similar
1501 fashion.
1502
1503 @findex mh-inc-folder
1504 @kindex i
1505 @vindex mh-inc-folder-hook
1506
1507 You can set the hook @code{mh-inc-folder-hook}, which is called after
1508 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder})
1509 command. A good use of this hook is to rescan the whole folder either
1510 after running @kbd{M-x mh-rmail} the first time or when you've changed
1511 the message numbers from outside of MH-E.
1512
1513 @findex mh-execute-commands
1514 @findex mh-rescan-folder, example
1515 @findex mh-show, example
1516 @vindex mh-inc-folder-hook, example
1517
1518 @smalllisp
1519 @group
1520 (defun my-mh-inc-folder-hook ()
1521 "Hook to rescan folder after incorporating mail."
1522 (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,}
1523 (mh-execute-commands)) ; @r{carry them out}
1524 (mh-rescan-folder) ; @r{synchronize with +inbox}
1525 (mh-show)) ; @r{show the current message}
1526
1527 (add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook)
1528
1529 @i{Rescan folder after incorporating new mail via mh-inc-folder-hook}
1530
1531 @end group
1532 @end smalllisp
1533
1534 @node Reading Mail, Folders, Incorporating Mail, Top
1535 @chapter Reading Your Mail
1536
1537 @cindex @samp{+inbox}
1538 @cindex MH-Folder mode
1539 @cindex MH-Show mode
1540 @cindex modes, MH-Folder
1541 @cindex modes, MH-Show
1542 @cindex reading mail
1543 @findex mh-rmail
1544 @kindex M-x mh-rmail
1545 @kindex F r
1546 @kindex F v
1547
1548 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This
1549 command incorporates your mail and creates a buffer called
1550 @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows
1551 you only new mail, not mail you have already read@footnote{If you want
1552 to see your old mail as well, use @kbd{F r} to pull all your messages
1553 into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will
1554 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u
1555 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}.
1556
1557 @cindex @command{scan}
1558 @cindex @samp{Message} menu
1559 @cindex MH commands, @command{scan}
1560 @cindex menu, @samp{Message}
1561 @cindex scan lines
1562
1563 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line
1564 summaries of each incorporated message. You can perform most MH
1565 commands on these messages via one- or two-letter commands in either
1566 the MH-Folder or MH-Show buffers or by using the @samp{Message} menu.
1567 See @command{scan}(1) for a description of the contents of the scan
1568 lines, and see the Figure in @ref{Reading Mail Tour}, for an example.
1569
1570 @table @kbd
1571 @kindex ?
1572 @findex mh-help
1573 @item ?
1574 Display cheat sheet for the MH-E commands (@code{mh-help}).
1575 @c -------------------------
1576 @cindex @samp{Message > Show Message} menu item
1577 @cindex menu item, @samp{Message > Show Message}
1578 @kindex @key{RET}
1579 @findex mh-show
1580 @item @key{RET}
1581 Display message (@code{mh-show}).
1582 @c -------------------------
1583 @cindex @samp{Message > Show Message with Header} menu item
1584 @cindex menu item, @samp{Message > Show Message with Header}
1585 @kindex , (comma)
1586 @findex mh-header-display
1587 @item , (comma)
1588 Display message with all header fields (@code{mh-header-display}).
1589 @c -------------------------
1590 @kindex ; (semicolon)
1591 @findex mh-toggle-mh-decode-mime-flag
1592 @item ; (semicolon)
1593 Toggle the value of @code{mh-decode-mime-flag}
1594 (@code{mh-toggle-mh-decode-mime-flag}).
1595 @c -------------------------
1596 @kindex @key{SPC}
1597 @findex mh-page-msg
1598 @item @key{SPC}
1599 Display next page in message (@code{mh-page-msg}).
1600 @c -------------------------
1601 @kindex @key{BS}
1602 @findex mh-previous-page
1603 @item @key{BS}
1604 Display previous page in message (@code{mh-previous-page}).
1605 @c -------------------------
1606 @cindex @samp{Message > Write Message to File...} menu item
1607 @cindex menu item, @samp{Message > Write Message to File...}
1608 @kindex >
1609 @findex mh-write-msg-to-file
1610 @item >
1611 Append message to end of file (@code{mh-write-msg-to-file}).
1612 @c -------------------------
1613 @cindex @samp{Message > Pipe Message to Command...} menu item
1614 @cindex menu item, @samp{Message > Pipe Message to Command...}
1615 @kindex |
1616 @findex mh-pipe-msg
1617 @item |
1618 Pipe message through shell command (@code{mh-pipe-msg}).
1619 @c -------------------------
1620 @kindex C-d
1621 @findex mh-delete-msg-no-motion
1622 @item C-d
1623 Delete range, don't move to next message
1624 (@code{mh-delete-msg-no-motion}).
1625 @c -------------------------
1626 @cindex @samp{Message > Delete Message} menu item
1627 @cindex menu item, @samp{Message > Delete Message}
1628 @kindex d
1629 @findex mh-delete-msg
1630 @item d
1631 Delete range (@code{mh-delete-msg}).
1632 @c -------------------------
1633 @kindex D ?
1634 @findex mh-prefix-help
1635 @item D ?
1636 Display cheat sheet for the commands of the current prefix in
1637 minibuffer (@code{mh-prefix-help}).
1638 @c -------------------------
1639 @kindex D @key{SPC}
1640 @findex mh-page-digest
1641 @item D @key{SPC}
1642 Display next message in digest (@code{mh-page-digest}).
1643 @c -------------------------
1644 @kindex D @key{BS}
1645 @findex mh-page-digest-backwards
1646 @item D @key{BS}
1647 Display previous message in digest (@code{mh-page-digest-backwards}).
1648 @c -------------------------
1649 @cindex @samp{Message > Burst Digest Message} menu item
1650 @cindex menu item, @samp{Message > Burst Digest Message}
1651 @kindex D b
1652 @findex mh-burst-digest
1653 @item D b
1654 Break up digest into separate messages (@code{mh-burst-digest}).
1655 @c -------------------------
1656 @cindex @samp{Message > Go to Message by Number...} menu item
1657 @cindex menu item, @samp{Message > Go to Message by Number...}
1658 @kindex g
1659 @findex mh-goto-msg
1660 @item g
1661 Go to a message (@code{mh-goto-msg}).
1662 @c -------------------------
1663 @kindex k
1664 @findex mh-delete-subject-or-thread
1665 @item k
1666 Delete messages with same subject or thread
1667 (@code{mh-delete-subject-or-thread}).
1668 @c -------------------------
1669 @kindex K ?
1670 @findex mh-prefix-help
1671 @item K ?
1672 Display cheat sheet for the commands of the current prefix in
1673 minibuffer (@code{mh-prefix-help}).
1674 @c -------------------------
1675 @kindex K @key{TAB}
1676 @findex mh-next-button
1677 @item K @key{TAB}
1678 Go to the next button (@code{mh-next-button}).
1679 @c -------------------------
1680 @kindex K S-@key{TAB}
1681 @findex mh-prev-button
1682 @item K S-@key{TAB}
1683 Go to the previous button (@code{mh-prev-button}).
1684 @c -------------------------
1685 @kindex K a
1686 @findex mh-mime-save-parts
1687 @item K a
1688 Save attachments (@code{mh-mime-save-parts}).
1689 @c -------------------------
1690 @kindex K e
1691 @findex mh-display-with-external-viewer
1692 @item K e
1693 View attachment externally (@code{mh-display-with-external-viewer}).
1694 @c -------------------------
1695 @kindex K i
1696 @findex mh-folder-inline-mime-part
1697 @item K i
1698 Show attachment verbatim (@code{mh-folder-inline-mime-part}).
1699 @c -------------------------
1700 @kindex K o
1701 @findex mh-folder-save-mime-part
1702 @item K o
1703 Save (output) attachment (@code{mh-folder-save-mime-part}).
1704 @c -------------------------
1705 @kindex K t
1706 @findex mh-toggle-mime-buttons
1707 @item K t
1708 Toggle option @code{mh-display-buttons-for-inline-parts-flag}
1709 (@code{mh-toggle-mime-buttons}).
1710 @c -------------------------
1711 @kindex K v
1712 @findex mh-folder-toggle-mime-part
1713 @item K v
1714 View attachment (@code{mh-folder-toggle-mime-part}).
1715 @c -------------------------
1716 @cindex @samp{Message > Modify Message} menu item
1717 @cindex menu item, @samp{Message > Modify Message}
1718 @kindex M
1719 @findex mh-modify
1720 @item M
1721 Edit message (@code{mh-modify}).
1722 @c -------------------------
1723 @cindex @samp{Message > Go to First Message} menu item
1724 @cindex menu item, @samp{Message > Go to First Message}
1725 @kindex M-<
1726 @findex mh-first-msg
1727 @item M-<
1728 Display first message (@code{mh-first-msg}).
1729 @c -------------------------
1730 @cindex @samp{Message > Go to Last Message} menu item
1731 @cindex menu item, @samp{Message > Go to Last Message}
1732 @kindex M->
1733 @findex mh-last-msg
1734 @item M->
1735 Display last message (@code{mh-last-msg}).
1736 @c -------------------------
1737 @kindex M-n
1738 @findex mh-next-unread-msg
1739 @item M-n
1740 Display next unread message (@code{mh-next-unread-msg}).
1741 @c -------------------------
1742 @kindex M-p
1743 @findex mh-previous-unread-msg
1744 @item M-p
1745 Display previous unread message (@code{mh-previous-unread-msg}).
1746 @c -------------------------
1747 @cindex @samp{Message > Next Message} menu item
1748 @cindex menu item, @samp{Message > Next Message}
1749 @kindex n
1750 @findex mh-next-undeleted-msg
1751 @item n
1752 Display next message (@code{mh-next-undeleted-msg}).
1753 @c -------------------------
1754 @cindex @samp{Message > Previous Message} menu item
1755 @cindex menu item, @samp{Message > Previous Message}
1756 @kindex p
1757 @findex mh-previous-undeleted-msg
1758 @item p
1759 Display previous message (@code{mh-previous-undeleted-msg}).
1760 @c -------------------------
1761 @kindex P ?
1762 @findex mh-prefix-help
1763 @item P ?
1764 Display cheat sheet for the commands of the current prefix in
1765 minibuffer (@code{mh-prefix-help}).
1766 @c -------------------------
1767 @kindex P C
1768 @findex mh-ps-print-toggle-color
1769 @item P C
1770 Toggle whether color is used in printing messages
1771 (@code{mh-ps-print-toggle-color}).
1772 @c -------------------------
1773 @kindex P F
1774 @findex mh-ps-print-toggle-faces
1775 @item P F
1776 Toggle whether printing is done with faces or not
1777 (@code{mh-ps-print-toggle-faces}).
1778 @c -------------------------
1779 @kindex P f
1780 @findex mh-ps-print-msg-file
1781 @item P f
1782 Print range to file (@code{mh-ps-print-msg-file}).
1783 @c -------------------------
1784 @cindex @samp{Message > Print Message} menu item
1785 @cindex menu item, @samp{Message > Print Message}
1786 @kindex P l
1787 @findex mh-print-msg
1788 @item P l
1789 Print range the old fashioned way
1790 (@code{mh-print-msg}).
1791 @c -------------------------
1792 @kindex P p
1793 @findex mh-ps-print-msg
1794 @item P p
1795 Print range (@code{mh-ps-print-msg}).
1796 @c -------------------------
1797 @kindex X ?
1798 @findex mh-prefix-help
1799 @item X ?
1800 Display cheat sheet for the commands of the current prefix in
1801 minibuffer (@code{mh-prefix-help}).
1802 @c -------------------------
1803 @cindex @samp{Message > Unpack Uuencoded Message...} menu item
1804 @cindex menu item, @samp{Message > Unpack Uuencoded Message...}
1805 @kindex X s
1806 @kindex X u
1807 @findex mh-store-msg
1808 @item X s
1809 @itemx X u
1810 Unpack message created with @command{uudecode} or @command{shar}
1811 (@code{mh-store-msg}).
1812 @c -------------------------
1813 @kindex Mouse-2
1814 @findex mh-show-mouse
1815 @item Mouse-2
1816 Move point to mouse event and show message (@code{mh-show-mouse}).
1817 @end table
1818
1819 Within the MH-Show buffer, the following command is defined.
1820
1821 @table @kbd
1822 @kindex @key{RET}
1823 @kindex Mouse-1
1824 @kindex Mouse-2
1825 @findex mh-press-button
1826 @item @key{RET}
1827 @itemx Mouse-1
1828 @itemx Mouse-2
1829 View contents of button (@code{mh-press-button}).
1830 @end table
1831
1832 @cindex @samp{mh-show} customization group
1833 @cindex customization group, @samp{mh-show}
1834
1835 The following table lists options in the @samp{mh-show} customization
1836 group that are used while reading mail.
1837
1838 @vtable @code
1839 @item mh-bury-show-buffer-flag
1840 On means show buffer is buried (default: @samp{on}).
1841 @c -------------------------
1842 @item mh-clean-message-header-flag
1843 On means remove extraneous header fields (default: @samp{on}).
1844 @c -------------------------
1845 @item mh-decode-mime-flag
1846 On means attachments are handled (default: @samp{on} if the Gnus
1847 @samp{mm-decode} package is present).
1848 @c -------------------------
1849 @item mh-display-buttons-for-alternatives-flag
1850 On means display buttons for all alternative attachments (default:
1851 @samp{off}).
1852 @c -------------------------
1853 @item mh-display-buttons-for-inline-parts-flag
1854 On means display buttons for all inline attachments (default:
1855 @samp{off}).
1856 @c -------------------------
1857 @item mh-do-not-confirm-flag
1858 On means non-reversible commands do not prompt for confirmation
1859 (default: @samp{off}).
1860 @c -------------------------
1861 @item mh-fetch-x-image-url
1862 Control fetching of @samp{X-Image-URL:} header field image (default:
1863 @samp{Never Fetch}).
1864 @c -------------------------
1865 @item mh-graphical-smileys-flag
1866 On means graphical smileys are displayed (default: @samp{on}).
1867 @c -------------------------
1868 @item mh-graphical-emphasis-flag
1869 On means graphical emphasis is displayed (default: @samp{on}).
1870 @c -------------------------
1871 @item mh-highlight-citation-style
1872 Style for highlighting citations (default: @samp{Multicolor}).
1873 @c -------------------------
1874 @item mh-invisible-header-fields-default
1875 List of hidden header fields (default: a checklist too long to list
1876 here).
1877 @c -------------------------
1878 @item mh-invisible-header-fields
1879 Additional header fields to hide (default: @code{nil}).
1880 @c -------------------------
1881 @item mh-lpr-command-format
1882 Command used to print (default: @code{"lpr -J '%s'"}).
1883 @c -------------------------
1884 @item mh-max-inline-image-height
1885 Maximum inline image height if @samp{Content-Disposition:} is not
1886 present (default: 0).
1887 @c -------------------------
1888 @item mh-max-inline-image-width
1889 Maximum inline image width if @samp{Content-Disposition:} is not
1890 present(default: 0).
1891 @c -------------------------
1892 @item mh-mhl-format-file
1893 Specifies the format file to pass to the @command{mhl} program
1894 (default: @samp{Use Default mhl Format (Printing Only)}).
1895 @c -------------------------
1896 @item mh-mime-save-parts-default-directory
1897 Default directory to use for @kbd{K a}.
1898 @c -------------------------
1899 @item mh-print-background-flag
1900 On means messages should be printed in the background (default:
1901 @samp{off}).
1902 @c -------------------------
1903 @item mh-show-buffer-mode-line-buffer-id
1904 Format string to produce @code{mode-line-buffer-identification} for
1905 show buffers (default: @code{" @{show-%s@} %d"}).
1906 @c -------------------------
1907 @item mh-show-maximum-size
1908 Maximum size of message (in bytes) to display automatically (default:
1909 0).
1910 @c -------------------------
1911 @item mh-show-use-xface-flag
1912 On means display face images in MH-Show buffers (default: @samp{on}).
1913 @c -------------------------
1914 @item mh-store-default-directory
1915 Default directory for @kbd{X s} (default: @samp{Current}).
1916 @c -------------------------
1917 @item mh-summary-height
1918 Number of lines in MH-Folder buffer (including the mode line)
1919 (default: depends on size of frame).
1920 @end vtable
1921
1922 The following hooks are available.
1923
1924 @vtable @code
1925 @item mh-delete-msg-hook
1926 Hook run after marking each message for deletion (default: @code{nil}).
1927 @c -------------------------
1928 @item mh-show-hook
1929 Hook run after @key{RET} shows a message (default: @code{nil}).
1930 @c -------------------------
1931 @item mh-show-mode-hook
1932 Hook run upon entry to @code{mh-show-mode} (default: @code{nil}).
1933 @end vtable
1934
1935 The following faces are available.
1936
1937 @vtable @code
1938 @item mh-show-cc
1939 Face used to highlight @samp{cc:} header fields.
1940 @c -------------------------
1941 @item mh-show-date
1942 Face used to highlight @samp{Date:} header fields.
1943 @c -------------------------
1944 @item mh-show-from
1945 Face used to highlight @samp{From:} header fields.
1946 @c -------------------------
1947 @item mh-show-header
1948 Face used to deemphasize less interesting header fields.
1949 @c -------------------------
1950 @item mh-show-pgg-bad
1951 Bad PGG signature face.
1952 @c -------------------------
1953 @item mh-show-pgg-good
1954 Good PGG signature face.
1955 @c -------------------------
1956 @item mh-show-pgg-unknown
1957 Unknown or untrusted PGG signature face.
1958 @c -------------------------
1959 @item mh-show-signature
1960 Signature face.
1961 @c -------------------------
1962 @item mh-show-subject
1963 Face used to highlight @samp{Subject:} header fields.
1964 @c -------------------------
1965 @item mh-show-to
1966 Face used to highlight @samp{To:} header fields.
1967 @c -------------------------
1968 @item mh-show-xface
1969 X-Face image face.
1970 @end vtable
1971
1972 The functions and variables introduced here are explained in more
1973 detail in the following sections.
1974
1975 @menu
1976 * Viewing::
1977 * Viewing Attachments::
1978 * HTML::
1979 * Digests::
1980 * Reading PGP::
1981 * Printing::
1982 * Files and Pipes::
1983 * Navigating::
1984 * Miscellaneous Commands and Options::
1985 @end menu
1986
1987 @node Viewing, Viewing Attachments, Reading Mail, Reading Mail
1988 @section Viewing Your Mail
1989
1990 @findex mh-header-display
1991 @findex mh-page-msg
1992 @findex mh-previous-page
1993 @findex mh-show
1994 @findex mh-show-mouse
1995 @kindex , (comma)
1996 @kindex . (period)
1997 @kindex @key{BS}
1998 @kindex @key{RET}
1999 @kindex @key{SPC}
2000 @kindex Mouse-2
2001
2002 The command @key{RET} (@code{mh-show}) displays the message that the
2003 cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the
2004 message that the mouse cursor is on. If the message is already
2005 displayed, it scrolls to the beginning of the message. Use @key{SPC}
2006 (@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move
2007 forwards and backwards one page at a time through the message. You can
2008 give either of these commands a prefix argument that specifies the
2009 number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC}
2010 command will also show the next undeleted message if it is used at the
2011 bottom of a message. MH-E normally hides a lot of the superfluous
2012 header fields that mailers add to a message, but if you wish to see
2013 all of them, use the command @kbd{,} (comma;
2014 @code{mh-header-display}).
2015
2016 @vindex mh-show-maximum-size
2017
2018 The option @code{mh-show-maximum-size} provides an opportunity to skip
2019 over large messages which may be slow to load. The default value of 0
2020 means that all message are shown regardless of size.
2021
2022 A litany of options control what displayed messages look like.
2023
2024 @vindex mh-show-cc
2025 @vindex mh-show-date
2026 @vindex mh-show-from
2027 @vindex mh-show-header
2028 @vindex mh-show-subject
2029 @vindex mh-show-to
2030
2031 First, the appearance of the header fields can be modified by
2032 customizing the associated face: @code{mh-show-to}, @code{mh-show-cc},
2033 @code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}.
2034 The face @code{mh-show-header} is used to deemphasize the other, less
2035 interesting, header fields.
2036
2037 @cindex regular expressions, @code{mh-invisible-header-fields}
2038 @vindex mh-clean-message-header-flag
2039 @vindex mh-invisible-header-fields
2040 @vindex mh-invisible-header-fields-default
2041
2042 Normally messages are delivered with a handful of uninteresting header
2043 fields. These are hidden by turning on the option
2044 @code{mh-clean-message-header-flag} (which it is by default). The
2045 header fields listed in the option
2046 @code{mh-invisible-header-fields-default} are hidden, although you can
2047 check off any field that you would like to see. Header fields that you
2048 would like to hide that aren't listed can be added to the option
2049 @code{mh-invisible-header-fields} with a couple of caveats. Regular
2050 expressions are not allowed. Unique fields should have a @samp{:}
2051 suffix; otherwise, the element can be used to render invisible an
2052 entire class of fields that start with the same prefix. If you think a
2053 header field should be generally ignored, report a bug (@pxref{Bug
2054 Reports}).
2055
2056 @cindex header field, @samp{Face:}
2057 @cindex header field, @samp{X-Face:}
2058 @cindex header field, @samp{X-Image-URL:}
2059 @cindex @samp{Face:} header field
2060 @cindex @samp{X-Face:} header field
2061 @cindex @samp{X-Image-URL:} header field
2062 @vindex mh-show-use-xface-flag
2063
2064 MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and
2065 @samp{X-Image-URL:} header fields. If any of these fields occur in the
2066 header of your message, the sender's face will appear in the
2067 @samp{From:} header field. If more than one of these fields appear,
2068 then the first field found in the order @samp{Face:}, @samp{X-Face:},
2069 and @samp{X-Image-URL:} will be used. The option
2070 @code{mh-show-use-xface-flag} is used to turn this feature on and off.
2071 This feature will be turned on by default if your system supports it.
2072
2073 The first header field used, if present, is the Gnus-specific
2074 @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU
2075 Emacs 21 and XEmacs. For more information, see
2076 @uref{http://quimby.gnus.org/circus/face/}.}.
2077
2078 @cindex @command{uncompface}
2079 @cindex Emacs, packages, x-face
2080 @cindex Unix commands, @command{uncompface}
2081 @cindex x-face package
2082 @vindex mh-show-xface
2083
2084 Next is the traditional @samp{X-Face:} header field@footnote{The
2085 display of this field requires the
2086 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
2087 @command{uncompface} program}. Recent versions of XEmacs have internal
2088 support for @samp{X-Face:} images. If your version of XEmacs does not,
2089 then you'll need both @command{uncompface} and the
2090 @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E
2091 renders the foreground and background of the image using the
2092 associated attributes of the face @code{mh-show-xface}.
2093
2094 @cindex @command{convert}
2095 @cindex @command{wget}
2096 @cindex ImageMagick
2097 @cindex Unix commands, @command{convert}
2098 @cindex Unix commands, @command{wget}
2099 @vindex mh-fetch-x-image-url
2100
2101 Finally, MH-E will display images referenced by the
2102 @samp{X-Image-URL:} header field if neither the @samp{Face:} nor the
2103 @samp{X-Face:} fields are present@footnote{The display of the images
2104 requires the @uref{http://www.gnu.org/software/wget/wget.html,
2105 @command{wget} program} to fetch the image and the @command{convert}
2106 program from the @uref{http://www.imagemagick.org/, ImageMagick
2107 suite}.}. Of the three header fields this is the most efficient in
2108 terms of network usage since the image doesn't need to be transmitted
2109 with every single mail. The option @code{mh-fetch-x-image-url}
2110 controls the fetching of the @samp{X-Image-URL:} header field image
2111 with the following values:
2112
2113 @table @samp
2114 @item Ask Before Fetching
2115 You are prompted before the image is fetched. MH-E will remember your
2116 reply and will either use the already fetched image the next time the
2117 same URL is encountered or silently skip it if you didn't fetch it the
2118 first time. This is a good setting.
2119 @c -------------------------
2120 @item Never Fetch
2121 Images are never fetched and only displayed if they are already
2122 present in the cache. This is the default.
2123 @end table
2124
2125 There isn't a value of @samp{Always Fetch} for privacy and DOS (denial
2126 of service) reasons. For example, fetching a URL can tip off a spammer
2127 that you've read his email (which is why you shouldn't blindly answer
2128 yes if you've set this option to @samp{Ask Before Fetching}). Someone
2129 may also flood your network and fill your disk drive by sending a
2130 torrent of messages, each specifying a unique URL to a very large
2131 file.
2132
2133 @cindex @file{.mhe-x-image-cache}
2134 @cindex files, @file{.mhe-x-image-cache}
2135
2136 The cache of images is found in the directory
2137 @file{.mhe-x-image-cache} within your MH directory. You can add your
2138 own face to the @samp{From:} field too. @xref{Picture}.
2139
2140 @cindex @command{mhl}
2141 @cindex MH commands, @command{mhl}
2142 @vindex mh-mhl-format-file
2143
2144 Normally MH-E takes care of displaying messages itself (rather than
2145 calling an MH program to do the work). If you'd rather have
2146 @command{mhl} display the message (within MH-E), change the option
2147 @code{mh-mhl-format-file} from its default value of @samp{Use Default
2148 mhl Format (Printing Only)}. You can set this option to @samp{Use
2149 Default mhl Format} to get the same output as you would get if you ran
2150 @command{mhl} from the shell. If you have a format file that you want
2151 MH-E to use, you can set this option to @samp{Specify an mhl Format
2152 File} and enter the name of your format file (@command{mhl}(1) or
2153 section @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in
2154 the MH book tells you how to write one). Your format file should
2155 specify a non-zero value for @samp{overflowoffset} to allow MH-E to
2156 parse the header. Note that @command{mhl} is always used for printing
2157 and forwarding; in this case, the value of @code{mh-mhl-format-file}
2158 is consulted if you have specified a format file.
2159
2160 @cindex citations, highlighting
2161 @cindex highlighting citations
2162 @vindex mh-highlight-citation-style
2163
2164 If the sender of the message has cited other messages in his message,
2165 then MH-E will highlight these citations to emphasize the sender's
2166 actual response. The option @code{mh-highlight-citation-style} can be
2167 customized to change the highlighting style. The @samp{Multicolor}
2168 method uses a different color for each indentation while the
2169 @samp{Monotone} method highlights all citations in red. To disable
2170 highlighting of citations entirely, choose @samp{None}.
2171
2172 @cindex URLs, highlighting
2173 @cindex email addresses, highlighting
2174 @cindex highlighting URLs
2175 @cindex highlighting email addresses
2176 @cindex links, following
2177 @findex goto-address-at-point
2178 @kindex C-c @key{RET}
2179 @kindex Mouse-2
2180 @vindex goto-address-highlight-p
2181
2182 Email addresses and URLs in the message are highlighted if the option
2183 @code{goto-address-highlight-p} is on, which it is by default. To view
2184 the web page for a highlighted URL or to send a message using a
2185 highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}
2186 (@code{goto-address-at-point}). @xref{Sending Mail}, to see how to
2187 configure Emacs to send the message using MH-E.
2188
2189 @cindex boldface, showing
2190 @cindex emphasis
2191 @cindex italics, showing
2192 @cindex smileys
2193 @cindex typesetting
2194 @cindex underline, showing
2195 @vindex gnus-emphasis-alist
2196 @vindex mh-decode-mime-flag
2197 @vindex mh-graphical-emphasis-flag
2198 @vindex mh-graphical-smileys-flag
2199
2200 It is a long standing custom to inject body language using a
2201 cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can
2202 render these as graphical widgets if the option
2203 @code{mh-graphical-smileys-flag} is turned on, which it is by default.
2204 Smileys include patterns such as :-) and ;-). Similarly, a few
2205 typesetting features are indicated in ASCII text with certain
2206 characters. If your terminal supports it, MH-E can render these
2207 typesetting directives naturally if the option
2208 @code{mh-graphical-emphasis-flag} is turned on, which it is by
2209 default. For example, _underline_ will be
2210 @ifhtml
2211 @html
2212 <u>underlined</u>,
2213 @end html
2214 @end ifhtml
2215 @ifnothtml
2216 underlined,
2217 @end ifnothtml
2218 *bold* will appear in @b{bold}, /italics/ will appear in @i{italics},
2219 and so on. See the option @code{gnus-emphasis-alist} for the whole
2220 list. Both of these options are disabled if the option
2221 @code{mh-decode-mime-flag} is turned off. @xref{Viewing Attachments}.
2222
2223 @cindex signature separator
2224 @cindex vCard
2225 @vindex mh-show-signature
2226
2227 MH-E normally renders signatures and vCards in italics so that the
2228 body of the message stands out more. MH-E depends on the presence of
2229 the @dfn{signature separator} (@code{"-- "}) to do this. You can also
2230 customize the face @code{mh-show-signature} so the appearance of the
2231 signature block is more to your liking.
2232
2233 @vindex mh-show-hook
2234 @vindex mh-show-mode-hook
2235
2236 Two hooks can be used to control how messages are displayed. The first
2237 hook, @code{mh-show-mode-hook}, is called early on in the process of
2238 the message display. It is usually used to perform some action on the
2239 message's content. The second hook, @code{mh-show-hook}, is the last
2240 thing called after messages are displayed. It's used to affect the
2241 behavior of MH-E in general or when @code{mh-show-mode-hook} is too
2242 early.
2243
2244 @cindex MH-Show mode
2245 @cindex modes, MH-Show
2246 @vindex mh-show-buffer-mode-line-buffer-id
2247
2248 For those who like to modify their mode lines, use
2249 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in
2250 the MH-Show buffers. Place the two escape strings @samp{%s} and
2251 @samp{%d}, which will display the folder name and the message number,
2252 respectively, somewhere in the string in that order. The default value
2253 of @code{"@{show-%s@} %d"} yields a mode line of
2254
2255 @smallexample
2256 -----@{show-+inbox@} 4 (MH-Show)--Bot--------------------------------
2257 @end smallexample
2258
2259 @node Viewing Attachments, HTML, Viewing, Reading Mail
2260 @section Viewing Attachments
2261
2262 @cindex attachments
2263 @cindex body parts
2264 @cindex @command{mhshow}
2265 @cindex @command{show}
2266 @cindex MH commands, @command{mhshow}
2267 @cindex MH commands, @command{show}
2268 @cindex MIME
2269 @cindex multimedia mail
2270
2271 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
2272 Mail Extensions) messages which are simply messages with additional
2273 @dfn{body parts} or @dfn{attachments}. You can use the MH commands
2274 @command{show}@footnote{See the section
2275 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
2276 prev} in the MH book.} or @command{mhshow}@footnote{See the section
2277 @uref{@value{MH-BOOK-HOME}/usimim.htm#ReMIMa, Reading MIME Mail} in
2278 the MH book.} from the shell to read @sc{mime} messages@footnote{You
2279 can call them directly from Emacs if you're running the X Window
2280 System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can
2281 leave out the @samp{xterm -e} if you use @command{mhlist} or
2282 @command{mhstore}.}.
2283
2284 @cindex Emacs, packages, mm-decode
2285 @cindex mm-decode package
2286 @findex mh-toggle-mh-decode-mime-flag
2287 @kindex ; (semicolon)
2288 @vindex mh-decode-mime-flag
2289
2290 MH-E can handle attachments as well if the Gnus @samp{mm-decode}
2291 package is present. If so, the option @code{mh-decode-mime-flag} will
2292 be on. Otherwise, you'll see the @sc{mime} body parts rather than text
2293 or attachments. There isn't much point in turning off the option
2294 @code{mh-decode-mime-flag}; however, you can inspect it if it appears
2295 that the body parts are not being interpreted correctly or toggle it
2296 with the command @kbd{;} (semicolon;
2297 @code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This
2298 option also controls the display of quoted-printable messages and
2299 other graphical widgets. @xref{Viewing}.
2300
2301 @cindex buttons
2302
2303 Attachments in MH-E are indicated by @dfn{buttons} like this:
2304
2305 @smallexample
2306 [1. image/jpeg; foo.jpg]...
2307 @end smallexample
2308
2309 @findex mh-next-button
2310 @findex mh-press-button
2311 @findex mh-prev-button
2312 @kindex @key{RET}
2313 @kindex K @key{TAB}
2314 @kindex K S-@key{TAB}
2315 @kindex Mouse-1
2316 @kindex Mouse-2
2317
2318 To view the contents of the button, use either @kbd{Mouse-1} or
2319 @kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when
2320 the cursor is over the button. This command is a toggle so if you use
2321 it again on the same attachment, it is hidden. If Emacs does not know
2322 how to display the attachment, then Emacs offers to save the
2323 attachment in a file. To move the cursor to the next button, use the
2324 command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the
2325 buffer is reached then the search wraps over to the start of the
2326 buffer. To move the cursor to the previous button, use the command
2327 @kbd{K S-@key{TAB}} (@code{mh-prev-button}). If the beginning of the
2328 buffer is reached then the search wraps over to the end of the buffer.
2329
2330 @cindex attachments, viewing
2331 @cindex viewing attachments
2332 @findex mh-folder-toggle-mime-part
2333 @kindex K v
2334
2335 Another way to view the contents of a button is to use the command
2336 @kbd{K v} (@code{mh-folder-toggle-mime-part}). This command displays
2337 (or hides) the attachment associated with the button under the cursor.
2338 If the cursor is not located over a button, then the cursor first
2339 moves to the next button, wrapping to the beginning of the message if
2340 necessary. This command has the advantage over the previous commands
2341 of working from the MH-Folder buffer. You can also provide a numeric
2342 prefix argument (as in @kbd{4 K v}) to view the attachment labeled
2343 with that number. If Emacs does not know how to display the
2344 attachment, then Emacs offers to save the attachment in a file.
2345
2346 @cindex @file{/etc/mailcap}
2347 @cindex files, @file{/etc/mailcap}
2348 @findex mailcap-mime-info
2349 @findex mh-display-with-external-viewer
2350 @kindex K e
2351
2352 If Emacs does not know how to view an attachment, you could save it
2353 into a file and then run some program to open it. It is easier,
2354 however, to launch the program directly from MH-E with the command
2355 @kbd{K e} (@code{mh-display-with-external-viewer}). While you'll most
2356 likely use this to view spreadsheets and documents, it is also useful
2357 to use your browser to view HTML attachments with higher fidelity than
2358 what Emacs can provide. This command displays the attachment
2359 associated with the button under the cursor. If the cursor is not
2360 located over a button, then the cursor first moves to the next button,
2361 wrapping to the beginning of the message if necessary. You can provide
2362 a numeric prefix argument (as in @kbd{4 K e}) to view the attachment
2363 labeled with that number. This command tries to provide a reasonable
2364 default for the viewer by calling the Emacs function
2365 @code{mailcap-mime-info}. This function usually reads the file
2366 @file{/etc/mailcap}.
2367
2368 @cindex attachments, saving
2369 @cindex saving attachments
2370 @findex mh-folder-save-mime-part
2371 @kindex K o
2372
2373 Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save
2374 attachments (the mnemonic is ``output''). This command saves the
2375 attachment associated with the button under the cursor. If the cursor
2376 is not located over a button, then the cursor first moves to the next
2377 button, wrapping to the beginning of the message if necessary. You can
2378 also provide a numeric prefix argument (as in @kbd{3 K o}) to save the
2379 attachment labeled with that number. This command prompts you for a
2380 filename and suggests a specific name if it is available.
2381
2382 @cindex @command{mhn}
2383 @cindex @command{mhstore}
2384 @cindex MH commands, @command{mhn}
2385 @cindex MH commands, @command{mhstore}
2386 @findex mh-mime-save-parts
2387 @kindex K a
2388 @vindex mh-mime-save-parts-default-directory
2389
2390 You can save all of the attachments at once with the command @kbd{K a}
2391 (@code{mh-mime-save-parts}). The attachments are saved in the
2392 directory specified by the option
2393 @code{mh-mime-save-parts-default-directory} unless you use a prefix
2394 argument (as in @kbd{C-u K a}) in which case you are prompted for the
2395 directory. These directories may be superseded by MH profile
2396 components, since this function calls on @command{mhstore}
2397 (@command{mhn}) to do the work.
2398
2399 @vindex mh-mime-save-parts-default-directory
2400
2401 The default value for the option
2402 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so
2403 that you are always prompted for the directory in which to save the
2404 attachments. However, if you usually use the same directory within a
2405 session, then you can set this option to @samp{Prompt the First Time}
2406 to avoid the prompt each time. you can make this directory permanent
2407 by choosing @samp{Directory} and entering the directory's name.
2408
2409 @cindex attachments, inline
2410 @cindex inline attachments
2411 @findex mh-toggle-mime-buttons
2412 @kindex K t
2413 @vindex mh-display-buttons-for-inline-parts-flag
2414
2415 The sender can request that attachments should be viewed inline so
2416 that they do not really appear like an attachment at all to the
2417 reader. Most of the time, this is desirable, so by default MH-E
2418 suppresses the buttons for inline attachments. On the other hand, you
2419 may receive code or HTML which the sender has added to his message as
2420 inline attachments so that you can read them in MH-E. In this case, it
2421 is useful to see the buttons so that you know you don't have to cut
2422 and paste the code into a file; you can simply save the attachment. If
2423 you want to make the buttons visible for inline attachments, you can
2424 use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle
2425 the visibility of these buttons. You can turn on these buttons
2426 permanently by turning on the option
2427 @code{mh-display-buttons-for-inline-parts-flag}.
2428
2429 MH-E cannot display all attachments inline however. It can display
2430 text (including @sc{html}) and images.
2431
2432 @cindex header field, @samp{Content-Disposition:}
2433 @cindex inline images
2434 @cindex @samp{Content-Disposition:} header field
2435 @vindex mh-max-inline-image-height
2436 @vindex mh-max-inline-image-width
2437
2438 Some older mail programs do not insert the needed
2439 plumbing@footnote{This plumbing is the @samp{Content-Disposition:}
2440 header field.} to tell MH-E whether to display the attachments inline
2441 or not. If this is the case, MH-E will display these images inline if
2442 they are smaller than the window. However, you might want to allow
2443 larger images to be displayed inline. To do this, you can change the
2444 options @code{mh-max-inline-image-width} and
2445 @code{mh-max-inline-image-height} from their default value of zero to
2446 a large number. The size of your screen is a good choice for these
2447 numbers.
2448
2449 @cindex alternatives
2450 @cindex attachments, alternatives
2451 @vindex mh-display-buttons-for-alternatives-flag
2452
2453 Sometimes, a mail program will produce multiple alternatives of an
2454 attachment in increasing degree of faithfulness to the original
2455 content. By default, only the preferred alternative is displayed. If
2456 the option @code{mh-display-buttons-for-alternatives-flag} is on, then
2457 the preferred part is shown inline and buttons are shown for each of
2458 the other alternatives.
2459
2460 @kindex K i
2461 @findex mh-folder-inline-mime-part
2462
2463 You can view the raw contents of an attachment with the command @kbd{K
2464 i} (@code{mh-folder-inline-mime-part}). This command displays (or
2465 hides) the contents of the attachment associated with the button under
2466 the cursor verbatim. If the cursor is not located over a button, then
2467 the cursor first moves to the next button, wrapping to the beginning
2468 of the message if necessary. You can also provide a numeric prefix
2469 argument (as in @kbd{4 K i}) to view the attachment labeled with that
2470 number.
2471
2472 For additional information on buttons, see
2473 @ifinfo
2474 @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}.
2475 @end ifinfo
2476 @ifnotinfo
2477 the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101,
2478 Article Buttons} and
2479 @uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands}
2480 in the @cite{The Gnus Manual}.
2481 @end ifnotinfo
2482
2483 @node HTML, Digests, Viewing Attachments, Reading Mail
2484 @section HTML
2485
2486 @cindex HTML
2487 @cindex Gnus
2488
2489 MH-E can display messages that have been sent in HTML@footnote{This
2490 feature depends on a version of Gnus that is at least 5.10.}. The
2491 content of the message will appear in the MH-Show buffer as you would
2492 expect if the entire message is HTML, or there is an inline HTML body
2493 part. However, if there is an HTML body part that is an attachment,
2494 then you'll see a button like this:
2495
2496 @smallexample
2497 [1. text/html; foo.html]...
2498 @end smallexample
2499
2500 To see how to read the contents of this body part, see @ref{Viewing
2501 Attachments}.
2502
2503 @vindex mm-text-html-renderer
2504
2505 The browser that MH-E uses is determined by the option
2506 @code{mm-text-html-renderer}. The default setting is set automatically
2507 based upon the presence of a known browser on your system. If you wish
2508 to use a different browser, then set this option accordingly. See the
2509 documentation for the browser you use for additional information on
2510 how to use it. In particular, find and disable the option to render
2511 images as this can tip off spammers that the email address they have
2512 used is valid.
2513
2514 @vindex mm-text-html-renderer
2515
2516 If you're confused about which @code{mm-text-html-renderer} to use,
2517 here's a brief description of each, sorted by popularity, that
2518 includes the results of a quick poll of MH-E users from 2005-12-23.
2519
2520 @table @asis
2521 @cindex browser, @samp{w3m}
2522 @cindex @samp{w3m}
2523 @kindex Mouse-2
2524 @kindex S-Mouse-2
2525 @item @samp{w3m} 7
2526 The @samp{w3m} browser requires an external program. It's quick,
2527 produces pretty nice output, and best of all, it's the only browser
2528 that highlights links. These can be clicked with @kbd{Mouse-2} to view
2529 the content of the link in @samp{w3m} or with @kbd{S-Mouse-2} to view
2530 the content of the link in an external browser. The @samp{w3m} browser
2531 handles tables well and actually respects the table's width parameter
2532 (which can cause text to wrap if the author didn't anticipate that the
2533 page would be viewed in Emacs).
2534 @c -------------------------
2535 @cindex browser, @samp{w3m-standalone}
2536 @cindex @samp{w3m-standalone}
2537 @item @samp{w3m-standalone} 3
2538 This browser, along with @samp{nil} for the external browser, are the
2539 only choices that work without having to download a separate lisp
2540 package or external program. This browser is quick, but does not show
2541 links. It handles simple tables but some tables get rendered much
2542 wider than the Emacs frame. This browser was the only one not to
2543 handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did
2544 render @samp{&reg;}.
2545 @c -------------------------
2546 @cindex browser, @samp{links}
2547 @cindex @samp{links}
2548 @item @samp{links} 1
2549 The @samp{links} browser requires an external program. It's quick, and
2550 produces nicer output than @samp{lynx} on single column mails in
2551 tables. However, it doesn't show links and it doesn't do as nice a job
2552 on multi-column tables as some lines wrap. At least it fits in 80
2553 columns and thus seems better than @samp{w3} and
2554 @samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R).
2555 @c -------------------------
2556 @cindex browser, @samp{lynx}
2557 @cindex @samp{lynx}
2558 @item @samp{lynx} 1
2559 The @samp{lynx} browser requires an external program. It's quick and
2560 produces pretty decent output but it doesn't show links. It doesn't
2561 seem to do multi-column tables which makes output much cleaner. It
2562 centers the output and wraps long lines more than most. Handles
2563 @samp{&reg;}.
2564 @c -------------------------
2565 @item @samp{nil} 1
2566 This choice obviously requires an external browser. Like
2567 @samp{w3m-standalone}, it works out of the box. With this setting,
2568 HTML messages have a button for the body part which you can view with
2569 @kbd{K v} (@code{mh-folder-toggle-mime-part}).
2570 @c -------------------------
2571 @cindex browser, @samp{w3}
2572 @cindex @samp{w3}
2573 @item @samp{w3} 0
2574 This choice does not require an external program as all of the
2575 rendering is done in lisp. You do need to get the package separately.
2576 This browser is @strong{slow}, and doesn't appear to have been updated
2577 since 2001 and the author hasn't responded to my emails. It displays
2578 unknown tags instead of hiding them, so you get to see all the
2579 Microsoft crap in certain messages. Tends to make multi-column tables
2580 wider than even a full-screen Emacs can handle. Like @samp{w3m}, you
2581 can follow links, but you have to find them first as they are not
2582 highlighted. Performs well on single-column tables and handles escapes
2583 such as @samp{&reg;}.
2584 @c -------------------------
2585 @cindex browser, @samp{html2text}
2586 @cindex @samp{html2text}
2587 @item @samp{html2text} 0
2588 The @samp{html2text} browser requires an external program. I noticed
2589 that it can do some nasty things with simple HTML mails (like filling
2590 the entire message as if it were one paragraph, including signature).
2591 On another message, it displayed half of the HTML tags for some
2592 reason.
2593 @end table
2594
2595 @vindex mm-text-html-renderer
2596
2597 For a couple more sources of information about
2598 @code{mm-text-html-renderer},
2599 @ifinfo
2600 @xref{Display Customization,,,emacs-mime}, and the documentation for
2601 the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},).
2602 @end ifinfo
2603 @ifnotinfo
2604 see section @uref{http://www.gnus.org/manual/emacs-mime_6.html,
2605 Display Customization} in the @cite{The Emacs MIME Manual} and the the
2606 documentation for the Gnus command @kbd{W h} (see section
2607 @uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the
2608 @cite{The Gnus Manual}).
2609 @end ifnotinfo
2610
2611 @node Digests, Reading PGP, HTML, Reading Mail
2612 @section Digests
2613
2614 @cindex digests
2615 @findex mh-page-digest
2616 @findex mh-page-digest-backwards
2617 @kindex D @key{BS}
2618 @kindex D @key{SPC}
2619 @kindex @key{BS}
2620 @kindex @key{SPC}
2621
2622 A digest is a message that contains other messages. Special MH-E
2623 commands let you read digests conveniently. You can use @key{SPC} and
2624 @key{BS} to page through the digest as if it were a normal message,
2625 but if you wish to skip to the next message in the digest, use
2626 @kbd{D @key{SPC}} (@code{mh-page-digest}). To return to a previous message,
2627 use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
2628
2629 @cindex @command{burst}
2630 @cindex MH commands, @command{burst}
2631 @cindex MH-Folder Show mode
2632 @cindex modes, MH-Folder Show
2633 @findex mh-burst-digest
2634 @kindex d
2635 @kindex D b
2636 @kindex t
2637
2638 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
2639 command uses the MH command @command{burst}@footnote{See the section
2640 @uref{@value{MH-BOOK-HOME}/burdig.htm, Bursting Messages} in the MH
2641 book.} to break out each message in the digest into its own message.
2642 Using this command, you can quickly delete unwanted messages, like
2643 this: Once the digest is split up, toggle out of MH-Folder Show mode
2644 with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen
2645 and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail})
2646 to quickly delete messages that you don't want to read (based on the
2647 @samp{Subject:} header field). You can also burst the digest to reply
2648 directly to the people who posted the messages in the digest. One
2649 problem you may encounter is that the @samp{From:} header fields are
2650 preceded with a @samp{>} so that your reply can't create the
2651 @samp{To:} field correctly. In this case, you must correct the
2652 @samp{To:} field yourself. This is described later (@pxref{Editing
2653 Drafts}).
2654
2655 @node Reading PGP, Printing, Digests, Reading Mail
2656 @section Signed and Encrypted Messages
2657
2658 @cindex GPG
2659 @cindex GnuPG
2660 @cindex Gnus
2661 @cindex OpenPGP
2662 @cindex PGP
2663 @cindex RFC 3156
2664 @cindex encrypted messages
2665 @cindex security
2666 @cindex signed messages
2667
2668 You can read encrypted or signed PGP or GPG messages with
2669 MH-E@footnote{This feature depends on post-5.10 versions of Gnus.
2670 @cite{MIME Security with OpenPGP} is documented in
2671 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However,
2672 MH-E can also decrypt old-style PGP messages that are not in MIME
2673 format.}. This section assumes that you already have a good
2674 understanding of GPG and have set up your keys appropriately.
2675
2676 If someone sends you a signed message, here is what you'll see:
2677
2678 @smallexample
2679 @group
2680 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2681 This is a signed message.
2682
2683 [[End of PGP Signed Part]]
2684 @end group
2685 @end smallexample
2686
2687 @cindex keychain
2688 @cindex key server
2689 @cindex signed messages
2690
2691 If the key for the given signature is not in your keychain, you'll be
2692 given the opportunity to fetch the key from a key server and verify
2693 the key. If the message is really large, the verification process can
2694 take a long time. You can press @kbd{C-g} at any time to
2695 cancel@footnote{Unfortunately in the current version, the validation
2696 process doesn't display a message so it appears that MH-E has hung. We
2697 hope that this will be fixed in the future.}.
2698
2699 If the signature doesn't check out, you might see something like this:
2700
2701 @smallexample
2702 @group
2703 [[PGP Signed Part:Failed]]
2704 This is a signed message.
2705 This is garbage added after the signature was made.
2706
2707 [[End of PGP Signed Part]]
2708 @end group
2709 @end smallexample
2710
2711 @cindex decrypting messages
2712
2713 If someone sends you an encrypted message, MH-E will ask for your
2714 passphrase to decrypt the message. You should see something like this:
2715
2716 @smallexample
2717 @group
2718 [[PGP Encrypted Part:OK]]
2719
2720 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2721 This is the secret message.
2722
2723 [[End of PGP Signed Part]]
2724
2725 [[End of PGP Encrypted Part]]
2726 @end group
2727 @end smallexample
2728
2729 If there is a problem decrypting the message, the button will say:
2730
2731 @smallexample
2732 [[PGP Encrypted Part:Failed]]
2733 @end smallexample
2734
2735 You can read the contents of this button using the methods described in
2736 @ref{Viewing Attachments}. If the message were corrupted, you'd see
2737 this:
2738
2739 @smallexample
2740 [[PGP Encrypted Part:Failed]
2741 Invalid base64 data]
2742 @end smallexample
2743
2744 If your passphrase were incorrect, you'd see something like this:
2745
2746 @smallexample
2747 [GNUPG:] ENC_TO CD9C88BB610BD9AD 1 0
2748 [GNUPG:] USERID_HINT CD9C88BB610BD9AD Bill Wohler <wohler@@stop.mail-abuse.org>
2749 [GNUPG:] NEED_PASSPHRASE CD9C88BB610BD9AD CD9C88BB610BD9AD 1 0
2750 [GNUPG:] BAD_PASSPHRASE CD9C88BB610BD9AD
2751 gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09
2752 "Bill Wohler <wohler@@stop.mail-abuse.org>"
2753 gpg: public key decryption failed: bad passphrase
2754 [GNUPG:] BEGIN_DECRYPTION
2755 [GNUPG:] DECRYPTION_FAILED
2756 gpg: decryption failed: secret key not available
2757 [GNUPG:] END_DECRYPTION
2758
2759 gpg exited abnormally: '2'
2760 @end smallexample
2761
2762 @vindex mh-show-pgg-bad
2763 @vindex mh-show-pgg-good
2764 @vindex mh-show-pgg-unknown
2765
2766 The appearance of the buttons is controlled by the faces
2767 @code{mh-show-pgg-good}, @code{mh-show-pgg-bad}, and
2768 @code{mh-show-pgg-unknown} depending on the validity of the signature.
2769 The latter is used whether the signature is unknown or untrusted.
2770
2771 @cindex @samp{pgg} customization group
2772 @cindex PGG
2773 @cindex customization group, @samp{pgg}
2774
2775 The @samp{pgg} customization group may have some settings which may
2776 interest you.
2777 @iftex
2778 See @cite{The PGG Manual}.
2779 @end iftex
2780 @ifinfo
2781 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
2782 @end ifinfo
2783 @ifhtml
2784 See
2785 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
2786 @cite{The PGG Manual}}.
2787 @end ifhtml
2788
2789 @node Printing, Files and Pipes, Reading PGP, Reading Mail
2790 @section Printing Your Mail
2791
2792 @cindex printing
2793 @findex mh-ps-print-msg
2794 @findex mh-ps-print-msg-file
2795 @kindex P f
2796 @kindex P p
2797 @vindex mh-lpr-command-format
2798 @vindex mh-print-background-flag
2799
2800 To print messages in MH-E, use the command @kbd{P p}
2801 (@code{mh-ps-print-msg}). You can print all the messages in a range
2802 (as in @kbd{C-u P p 1 3 5-7 last:5 frombob @key{RET}},
2803 @pxref{Ranges}). You can also send the output to a file with @kbd{P f}
2804 (@code{mh-ps-print-msg-file}). This command will print inline text
2805 attachments but will not decrypt messages. However, when a message is
2806 displayed in an MH-Show buffer, then that buffer is used verbatim for
2807 printing with the caveat that only text attachments, if opened inline,
2808 are printed. Therefore, encrypted messages can be printed by showing
2809 and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not
2810 use the options @code{mh-lpr-command-format} or
2811 @code{mh-print-background-flag}, described below.
2812
2813 @findex mh-ps-print-toggle-color
2814 @kindex P C
2815 @vindex ps-print-color-p
2816
2817 Colors are emulated on black-and-white printers with shades of gray.
2818 This might produce illegible output, even if your screen colors only
2819 use shades of gray. If this is the case, try using the command @kbd{P
2820 C} (@code{mh-ps-print-toggle-color}) to toggle between color, no
2821 color, and a black and white representation of the colors and see
2822 which works best. You change this setting permanently by customizing
2823 the option @code{ps-print-color-p}.
2824
2825 @findex mh-ps-print-toggle-faces
2826 @kindex P F
2827
2828 Another related function is the command @kbd{P F}
2829 (@code{mh-ps-print-toggle-faces}). This command toggles between using
2830 faces and not. When faces are enabled, the printed message will look
2831 very similar to the message in the MH-Show buffer.
2832
2833 @cindex ps-print package
2834 @cindex Emacs, packages, ps-print
2835
2836 MH-E uses the @samp{ps-print} package to do the printing, so you can
2837 customize the printing further by going to the @samp{ps-print}
2838 customization group.
2839
2840 @cindex @command{lpr}
2841 @cindex @command{mhl}
2842 @cindex MH commands, @command{mhl}
2843 @cindex Unix commands, @command{lpr}
2844 @findex mh-print-msg
2845 @kindex P l
2846
2847 An alternative to using the @samp{ps-print} package is the command
2848 @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or
2849 @i{l}pr). You can print all the messages in a range. The message is
2850 formatted with @command{mhl}@footnote{See the section
2851 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
2852 book.} and printed with the @command{lpr} command.
2853
2854 @kindex P f
2855 @kindex P l
2856 @kindex P p
2857 @vindex mh-lpr-command-format
2858 @vindex mh-print-background-flag
2859
2860 The command @kbd{P l} uses two options. The option
2861 @code{mh-lpr-command-format} contains the Unix command line which
2862 performs the actual printing. The string can contain one escape,
2863 @samp{%s}, which is replaced by the name of the folder and the message
2864 number and is useful for print job names. The default setting is
2865 @code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb
2866 -P"} which produces a nice header and adds a bit of margin so the text
2867 fits within my printer's margins. Normally messages are printed in the
2868 foreground. If this is slow on your system, you may elect to turn on
2869 the option @code{mh-print-background-flag} to print in the background.
2870 If you do this, do not delete the message until it is printed or else
2871 the output may be truncated. These options are not used by the
2872 commands @kbd{P p} or @kbd{P f}.
2873
2874 @node Files and Pipes, Navigating, Printing, Reading Mail
2875 @section Files and Pipes
2876
2877 @cindex files
2878 @cindex pipes
2879 @findex mh-refile-or-write-again
2880 @findex mh-write-msg-to-file
2881 @kindex >
2882 @kindex !
2883
2884 MH-E does offer a couple of commands that are not a part of MH@. The
2885 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to
2886 a file. You are prompted for the filename. If the file already exists,
2887 the message is appended to it. You can also write the message to the
2888 file without the header by specifying a prefix argument (such as
2889 @kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file
2890 can be made with the command @kbd{!}
2891 (@code{mh-refile-or-write-again}).
2892
2893 @findex mh-pipe-msg
2894 @kindex |
2895 @kindex l
2896
2897 You can also pipe the message through a Unix shell command with the
2898 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix
2899 command through which you wish to run your message. If you give a
2900 prefix argument to this command, the message header is included in the
2901 text passed to the command (the contrived example @kbd{C-u | lpr}
2902 would be done with the @kbd{l} command instead).
2903
2904 @cindex @command{shar}
2905 @cindex @command{uuencode}
2906 @cindex Unix commands, @command{shar}
2907 @cindex Unix commands, @command{uuencode}
2908 @findex mh-store-msg
2909 @kindex X s
2910 @vindex mh-store-default-directory
2911
2912 If the message is a shell archive @command{shar} or has been run
2913 through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to
2914 extract the body of the message. The default directory for extraction
2915 is the current directory; however, you have a chance to specify a
2916 different extraction directory. The next time you use this command,
2917 the default directory is the last directory you used. If you would
2918 like to change the initial default directory, customize the option
2919 @code{mh-store-default-directory}, change the value from
2920 @samp{Current} to @samp{Directory}, and then enter the name of the
2921 directory for storing the content of these messages.
2922
2923 @findex mh-store-buffer
2924 @kindex @key{RET}
2925 @kindex X s
2926
2927 By the way, @kbd{X s} calls the Emacs Lisp function
2928 @code{mh-store-buffer}. I mention this because you can use it directly
2929 if you're editing a buffer that contains a file that has been run
2930 through @command{uuencode} or @command{shar}. For example, you can
2931 extract the contents of the current buffer in your home directory by
2932 typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}.
2933
2934 @node Navigating, Miscellaneous Commands and Options, Files and Pipes, Reading Mail
2935 @section Navigating
2936
2937 @cindex moving between messages
2938 @cindex navigation
2939 @findex mh-first-msg
2940 @findex mh-goto-msg
2941 @findex mh-last-msg
2942 @findex mh-next-undeleted-msg
2943 @findex mh-next-unread-msg
2944 @findex mh-previous-undeleted-msg
2945 @findex mh-previous-unread-msg
2946 @kindex g
2947 @kindex M-<
2948 @kindex M->
2949 @kindex M-n
2950 @kindex M-p
2951 @kindex n
2952 @kindex p
2953
2954 To move on to the next message, use the command @kbd{n}
2955 (@code{mh-next-undeleted-msg}); use @kbd{p}
2956 (@code{mh-previous-undeleted-msg}) to read the previous message. To
2957 move to the next unread message, use @kbd{M-n}
2958 (@code{mh-next-unread-msg}); use @kbd{M-p}
2959 (@code{mh-previous-unread-msg}) to move to the previous unread
2960 message. These commands can be given a prefix argument to specify how
2961 many messages to skip (for example, @kbd{5 n}). You can also move to a
2962 specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the
2963 message number either before or after typing @kbd{g}. In the latter
2964 case, Emacs prompts you. Finally, you can go to the first or last
2965 message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->}
2966 (@code{mh-last-msg}) respectively.
2967
2968 @cindex MH-Folder mode
2969 @cindex modes, MH-Folder
2970 @findex next-line
2971 @findex previous-line
2972 @kindex C-n
2973 @kindex C-p
2974 @kindex @key{RET}
2975
2976 You can also use the Emacs commands @kbd{C-p} (@code{previous-line})
2977 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in
2978 the MH-Folder window. These commands can be used in conjunction with
2979 @key{RET} to look at deleted or refiled messages.
2980
2981 @cindex deleting messages
2982 @findex mh-delete-msg
2983 @kindex d
2984 @kindex n
2985 @kindex p
2986
2987 To mark a message for deletion, use the command @kbd{d}
2988 (@code{mh-delete-msg}). A @samp{D} is placed by the message in the
2989 scan window, and the next undeleted message is displayed. If the
2990 previous command had been @kbd{p}, then the next message displayed is
2991 the first undeleted message previous to the message just deleted. Use
2992 @kbd{n} to force subsequent @kbd{d} commands to move forward to the
2993 next undeleted message after deleting the message under the cursor.
2994 You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5
2995 frombob @key{RET}}, @pxref{Ranges}).
2996
2997 @findex mh-delete-msg-no-motion
2998 @kindex C-d
2999
3000 The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the
3001 message (or messages in range) for deletion but leaves the cursor at
3002 the current message in case you wish to perform other operations on
3003 the message.
3004
3005 @findex mh-delete-subject
3006 @findex mh-delete-subject-or-thread
3007 @findex mh-thread-delete
3008 @findex mh-undo
3009 @kindex k
3010 @kindex T d
3011 @kindex u
3012
3013 And to delete more messages faster, you can use @kbd{k}
3014 (@code{mh-delete-subject-or-thread}) to delete all the messages with
3015 the same subject as the current message. This command puts these
3016 messages in a sequence named @samp{subject}. You can undo this action
3017 by using @kbd{u} (@code{mh-undo}) with a prefix argument and then
3018 specifying the @samp{subject} sequence. However, if the buffer is
3019 displaying a threaded view of the folder then @kbd{k} behaves like
3020 @kbd{T d} (@code{mh-thread-delete}). @xref{Threading}.
3021
3022 @findex mh-execute-commands
3023 @kindex x
3024
3025 However you mark a message for deletion, the command @kbd{x}
3026 (@code{mh-execute-commands}) actually carries out the deletion
3027 (@pxref{Folders}).
3028
3029 @vindex mh-delete-msg-hook
3030
3031 The hook @code{mh-delete-msg-hook} is called after you mark a message
3032 for deletion. For example, a past maintainer of MH-E used this once
3033 when he kept statistics on his mail usage.
3034
3035 @node Miscellaneous Commands and Options, , Navigating, Reading Mail
3036 @section Miscellaneous Commands and Options
3037
3038 This section contains a few more miscellaneous commands and options.
3039
3040 @cindex editing message
3041 @findex mh-modify
3042 @kindex M
3043
3044 There are times when you need to edit a message. For example, you may
3045 need to fix a broken Content-Type header field. You can do this with
3046 the command @kbd{M} (@code{mh-modify}). It displays the raw message in
3047 an editable buffer. When you are done editing, save and kill the
3048 buffer as you would any other.
3049
3050 @findex mh-kill-folder
3051 @findex mh-pack-folder
3052 @vindex mh-do-not-confirm-flag
3053
3054 Commands such as @code{mh-pack-folder} prompt to confirm whether to
3055 process outstanding moves and deletes or not before continuing.
3056 Turning on the option @code{mh-do-not-confirm-flag} means that these
3057 actions will be performed---which is usually desired but cannot be
3058 retracted---without question@footnote{In previous versions of MH-E,
3059 this option suppressed the confirmation in @code{mh-kill-folder}.
3060 Since this kept most users from setting this option,
3061 @code{mh-kill-folder} was modified in version 6.0 to always ask for
3062 confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}.
3063 @xref{Folders}.}.
3064
3065 @cindex MH-Folder mode
3066 @cindex modes, MH-Folder
3067 @vindex mh-summary-height
3068
3069 The option @code{mh-summary-height} controls the number of scan lines
3070 displayed in the MH-Folder window, including the mode line. The
3071 default value of this option is @samp{Automatic} which means that the
3072 MH-Folder buffer will maintain the same proportional size if the frame
3073 is resized. If you'd prefer a fixed height, then choose the
3074 @samp{Fixed Size} option and enter the number of lines you'd like to
3075 see.
3076
3077 @vindex mh-bury-show-buffer-flag
3078
3079 Normally the buffer for displaying messages is buried at the bottom at
3080 the buffer stack. You may wish to disable this feature by turning off
3081 the option @code{mh-bury-show-buffer-flag}. One advantage of not
3082 burying the show buffer is that one can delete the show buffer more
3083 easily in an electric buffer list because of its proximity to its
3084 associated MH-Folder buffer. Try running @kbd{M-x
3085 electric-buffer-list} to see what I mean.
3086
3087 @cindex @file{.emacs}
3088 @cindex files, @file{.emacs}
3089 @cindex reading mail
3090
3091 Before we leave this section, I'll include a function that I use as a
3092 front end to MH-E@footnote{Stephen Gildea's favorite binding is
3093 @kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your
3094 working window configuration, which may be quite involved---windows
3095 filled with source, compilation output, man pages, and other
3096 documentation---and your MH-E window configuration. Like the rest of
3097 the customization described in this section, simply add the following
3098 code to @file{~/.emacs}.
3099
3100 @iftex
3101 @filbreak
3102 @end iftex
3103
3104 @findex mh-rmail, example
3105
3106 @smalllisp
3107 @group
3108 (defvar my-mh-screen-saved nil
3109 "Set to non-@code{nil} when MH-E window configuration shown.")
3110 (defvar my-normal-screen nil "Normal window configuration.")
3111 (defvar my-mh-screen nil "MH-E window configuration.")
3112
3113 (defun my-mh-rmail (&optional arg)
3114 "Toggle between MH-E and normal screen configurations.
3115 With non-@code{nil} or prefix argument, @i{inc} mailbox as well
3116 when going into mail."
3117 (interactive "P") ; @r{user callable function, P=prefix arg}
3118 (setq my-mh-screen-saved ; @r{save state}
3119 (cond
3120 ;; @r{Bring up MH-E screen if arg or normal window configuration.}
3121 ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.}
3122 ((or arg (null my-mh-screen-saved))
3123 (setq my-normal-screen (current-window-configuration))
3124 (if (or arg (null (get-buffer "+inbox")))
3125 (mh-rmail)
3126 (set-window-configuration my-mh-screen))
3127 t) ; @r{set my-mh-screen-saved to @code{t}}
3128 ;; @r{Otherwise, save MH-E screen and restore normal screen.}
3129 (t
3130 (setq my-mh-screen (current-window-configuration))
3131 (set-window-configuration my-normal-screen)
3132 nil)))) ; @r{set my-mh-screen-saved to nil}
3133
3134 (global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}}
3135
3136 @i{Starting MH-E}
3137
3138 @end group
3139 @end smalllisp
3140
3141 If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved} is
3142 @code{nil} (meaning a non-MH-E window configuration), the current
3143 window configuration is saved, either the @samp{+inbox} buffer is
3144 displayed or @code{mh-rmail} is run, and the MH-E window configuration
3145 is shown. Otherwise, the MH-E window configuration is saved and the
3146 original configuration is displayed.
3147
3148 @node Folders, Sending Mail, Reading Mail, Top
3149 @chapter Organizing Your Mail with Folders
3150
3151 @cindex @samp{Folder} menu
3152 @cindex @samp{Message} menu
3153 @cindex folders
3154 @cindex menu, @samp{Folder}
3155 @cindex menu, @samp{Message}
3156 @cindex using folders
3157
3158 This chapter discusses the things you can do with folders within MH-E.
3159 The commands in this chapter are also found in the @samp{Folder} and
3160 @samp{Message} menus.
3161
3162 @table @kbd
3163 @kindex ?
3164 @findex mh-help
3165 @item ?
3166 Display cheat sheet for the MH-E commands (@code{mh-help}).
3167 @c -------------------------
3168 @kindex !
3169 @findex mh-refile-or-write-again
3170 @item !
3171 Repeat last output command (@code{mh-refile-or-write-again}).
3172 @c -------------------------
3173 @cindex @samp{Message > Copy Message to Folder...} menu item
3174 @cindex menu item, @samp{Message > Copy Message to Folder...}
3175 @kindex c
3176 @findex mh-copy-msg
3177 @item c
3178 Copy range to folder (@code{mh-copy-msg}).
3179 @c -------------------------
3180 @kindex F ?
3181 @findex mh-prefix-help
3182 @item F ?
3183 Display cheat sheet for the commands of the current prefix in
3184 minibuffer (@code{mh-prefix-help}).
3185 @c -------------------------
3186 @kindex F '
3187 @findex mh-index-ticked-messages
3188 @item F '
3189 Display ticked messages (@code{mh-index-ticked-messages}).
3190 @c -------------------------
3191 @kindex F c
3192 @findex mh-catchup
3193 @item F c
3194 Delete range from the @samp{unseen} sequence (@code{mh-catchup}).
3195 @c -------------------------
3196 @kindex F k
3197 @findex mh-kill-folder
3198 @item F k
3199 Remove folder (@code{mh-kill-folder}).
3200 @c -------------------------
3201 @cindex @samp{Folder > List Folders} menu item
3202 @cindex menu item, @samp{Folder > List Folders}
3203 @kindex F l
3204 @findex mh-list-folders
3205 @item F l
3206 List all folders (@code{mh-list-folders}).
3207 @c -------------------------
3208 @cindex @samp{Folder > View New Messages} menu item
3209 @cindex menu item, @samp{Folder > View New Messages}
3210 @kindex F n
3211 @findex mh-index-new-messages
3212 @item F n
3213 Display unseen messages (@code{mh-index-new-messages}).
3214 @c -------------------------
3215 @cindex @samp{Folder > Pack Folder} menu item
3216 @cindex menu item, @samp{Folder > Pack Folder}
3217 @kindex F p
3218 @findex mh-pack-folder
3219 @item F p
3220 Pack folder (@code{mh-pack-folder}).
3221 @c -------------------------
3222 @kindex F q
3223 @findex mh-index-sequenced-messages
3224 @item F q
3225 Display messages in any sequence (@code{mh-index-sequenced-messages}).
3226 @c -------------------------
3227 @cindex @samp{Folder > Rescan Folder} menu item
3228 @cindex menu item, @samp{Folder > Rescan Folder}
3229 @kindex F r
3230 @findex mh-rescan-folder
3231 @item F r
3232 Rescan folder (@code{mh-rescan-folder}).
3233 @c -------------------------
3234 @cindex @samp{Folder > Search...} menu item
3235 @cindex menu item, @samp{Folder > Search...}
3236 @kindex F s
3237 @findex mh-search
3238 @item F s
3239 Search your MH mail (@code{mh-search}).
3240 @c -------------------------
3241 @cindex @samp{Folder > Sort Folder} menu item
3242 @cindex menu item, @samp{Folder > Sort Folder}
3243 @kindex F S
3244 @findex mh-sort-folder
3245 @item F S
3246 Sort folder (@code{mh-sort-folder}).
3247 @c -------------------------
3248 @kindex F u
3249 @findex mh-undo-folder
3250 @item F u
3251 Undo all refiles and deletes in the current folder (@code{mh-undo-folder}).
3252 @c -------------------------
3253 @cindex @samp{Folder > Visit a Folder...} menu item
3254 @cindex menu item, @samp{Folder > Visit a Folder...}
3255 @kindex F v
3256 @findex mh-visit-folder
3257 @item F v
3258 Visit folder (@code{mh-visit-folder}).
3259 @c -------------------------
3260 @cindex @samp{Message > Refile Message} menu item
3261 @cindex menu item, @samp{Message > Refile Message}
3262 @kindex o
3263 @findex mh-refile-msg
3264 @item o
3265 Refile (output) range into folder (@code{mh-refile-msg}).
3266 @c -------------------------
3267 @cindex @samp{Folder > Quit MH-E} menu item
3268 @cindex menu item, @samp{Folder > Quit MH-E}
3269 @kindex q
3270 @findex mh-quit
3271 @item q
3272 Quit the current MH-E folder (@code{mh-quit}).
3273 @c -------------------------
3274 @cindex @samp{Folder > Toggle Show/Folder} menu item
3275 @cindex menu item, @samp{Folder > Toggle Show/Folder}
3276 @kindex t
3277 @findex mh-toggle-showing
3278 @item t
3279 Toggle between MH-Folder and MH-Folder Show modes
3280 (@code{mh-toggle-showing}).
3281 @c -------------------------
3282 @cindex @samp{Message > Undo Delete/Refile} menu item
3283 @cindex menu item, @samp{Message > Undo Delete/Refile}
3284 @kindex u
3285 @findex mh-undo
3286 @item u
3287 Undo pending deletes or refiles in range (@code{mh-undo}).
3288 @c -------------------------
3289 @cindex @samp{Message > Execute Delete/Refile} menu item
3290 @cindex menu item, @samp{Message > Execute Delete/Refile}
3291 @kindex x
3292 @findex mh-execute-commands
3293 @item x
3294 Process outstanding delete and refile requests
3295 (@code{mh-execute-commands}).
3296 @end table
3297
3298 @cindex @samp{mh-folder} customization group
3299 @cindex customization group, @samp{mh-folder}
3300
3301 The @samp{mh-folder} customization group is used to tune these
3302 commands.
3303
3304 @vtable @code
3305 @item mh-new-messages-folders
3306 Folders searched for the @samp{unseen} sequence (default:
3307 @code{Inbox}).
3308 @c -------------------------
3309 @item mh-ticked-messages-folders
3310 Folders searched for @code{mh-tick-seq} (default: @code{t}).
3311 @c -------------------------
3312 @item mh-large-folder
3313 The number of messages that indicates a large folder (default: 200).
3314 @c -------------------------
3315 @item mh-recenter-summary-flag
3316 On means to recenter the summary window (default: @samp{off}).
3317 @c -------------------------
3318 @item mh-recursive-folders-flag
3319 On means that commands which operate on folders do so recursively
3320 (default: @samp{off}).
3321 @c -------------------------
3322 @item mh-sortm-args
3323 Additional arguments for @command{sortm} (default: @code{nil}).
3324 @end vtable
3325
3326 The following hooks are available.
3327
3328 @vtable @code
3329 @item mh-after-commands-processed-hook
3330 Hook run by @kbd{x} after performing outstanding refile and delete
3331 requests (default: @code{nil}).
3332 @c -------------------------
3333 @item mh-before-commands-processed-hook
3334 Hook run by @kbd{x} before performing outstanding refile and delete
3335 requests (default: @code{nil}).
3336 @c -------------------------
3337 @item mh-before-quit-hook
3338 Hook run by q before quitting MH-E (default: @code{nil}).
3339 @c -------------------------
3340 @item mh-folder-mode-hook
3341 Hook run by @code{mh-folder-mode} when visiting a new folder (default:
3342 @code{nil}).
3343 @c -------------------------
3344 @item mh-kill-folder-suppress-prompt-hook
3345 Abnormal hook run at the beginning of @code{mh-kill-folder} (default:
3346 @code{'mh-search-p}).
3347 @c -------------------------
3348 @item mh-quit-hook
3349 Hook run by q after quitting MH-E (default: @code{nil}).
3350 @c -------------------------
3351 @item mh-refile-msg-hook
3352 Hook run by o after marking each message for refiling (default:
3353 @code{nil}).
3354 @end vtable
3355
3356 The following faces are available for customizing the appearance of
3357 the MH-Folder buffer. @xref{Scan Line Formats}.
3358
3359 @vtable @code
3360 @item mh-folder-address
3361 Recipient face.
3362 @c -------------------------
3363 @item mh-folder-body
3364 Body text face.
3365 @c -------------------------
3366 @item mh-folder-cur-msg-number
3367 Current message number face.
3368 @c -------------------------
3369 @item mh-folder-date
3370 Date face.
3371 @c -------------------------
3372 @item mh-folder-deleted
3373 Deleted message face.
3374 @c -------------------------
3375 @item mh-folder-followup
3376 @samp{Re:} face.
3377 @c -------------------------
3378 @item mh-folder-msg-number
3379 Message number face.
3380 @c -------------------------
3381 @item mh-folder-refiled
3382 Refiled message face.
3383 @c -------------------------
3384 @vindex mh-scan-format-nmh
3385 @vindex mh-scan-sent-to-me-sender-regexp
3386 @item mh-folder-sent-to-me-hint
3387 Fontification hint face in messages sent directly to us. The detection
3388 of messages sent to us is governed by the scan format
3389 @code{mh-scan-format-nmh} and regular expression
3390 @code{mh-scan-sent-to-me-sender-regexp}.
3391 @c -------------------------
3392 @vindex mh-scan-format-nmh
3393 @vindex mh-scan-sent-to-me-sender-regexp
3394 @item mh-folder-scan-format
3395 Sender face in messages sent directly to us. The detection of messages
3396 sent to us is governed by the scan format @code{mh-scan-format-nmh}
3397 and regular expression @code{mh-scan-sent-to-me-sender-regexp}.
3398 @c -------------------------
3399 @item mh-folder-subject
3400 Subject face.
3401 @c -------------------------
3402 @item mh-folder-tick
3403 Ticked message face.
3404 @c -------------------------
3405 @item mh-folder-to
3406 @samp{To:} face.
3407 @end vtable
3408
3409 @vindex mh-folder-mode-hook
3410
3411 The hook @code{mh-folder-mode-hook} is called when visiting a new
3412 folder in MH-Folder mode. This could be used to set your own key
3413 bindings, for example:
3414
3415 @vindex mh-folder-mode-hook, example
3416
3417 @smalllisp
3418 @group
3419 (defvar my-mh-init-done nil
3420 "Non-@code{nil} when one-time MH-E settings made.")
3421
3422 (defun my-mh-folder-mode-hook ()
3423 "Hook to set key bindings in MH-Folder mode."
3424 (if (not my-mh-init-done) ; @r{only need to bind the keys once }
3425 (progn
3426 (local-set-key "//" 'my-search-msg)
3427 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}}
3428 (setq my-mh-init-done t))))
3429
3430 (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
3431
3432 (defun my-search-msg ()
3433 "Search for a regexp in the current message."
3434 (interactive) ; @r{user function}
3435 (save-window-excursion
3436 (other-window 1) ; @r{go to next window}
3437 (isearch-forward-regexp))) ; @r{string search; hit return}
3438 ; @r{ when done}
3439
3440 @i{Create additional key bindings via mh-folder-mode-hook}
3441
3442 @end group
3443 @end smalllisp
3444
3445 @cindex @command{folder}
3446 @cindex @command{refile}
3447 @cindex MH commands, @command{folder}
3448 @cindex MH commands, @command{refile}
3449 @findex mh-refile-msg
3450 @kindex o
3451 @vindex mh-refile-msg-hook
3452
3453 MH-E has analogies for each of the MH @command{folder} and
3454 @command{refile} commands@footnote{See the sections
3455 @uref{@value{MH-BOOK-HOME}/fol.htm#Youfol, Your Current Folder:
3456 folder} and @uref{@value{MH-BOOK-HOME}/fol.htm#Movref, Moving and
3457 Linking Messages: refile} in the MH book.}. To refile a message in
3458 another folder, use the command @kbd{o} (@code{mh-refile-msg})
3459 (mnemonic: ``output''). You are prompted for the folder name
3460 (@pxref{Folder Selection}). Note that this command can also be used to
3461 create folders. If you specify a folder that does not exist, you will
3462 be prompted to create it. The hook @code{mh-refile-msg-hook} is called
3463 after a message is marked to be refiled.
3464
3465 @findex mh-write-msg-to-file
3466 @kindex !
3467
3468 If you are refiling several messages into the same folder, you can use
3469 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the
3470 last refile or write (for the description of @kbd{>}
3471 (@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a
3472 range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob
3473 @key{RET}}, @pxref{Ranges}).
3474
3475 @cindex expunging refiles and deletes
3476 @cindex undoing refiles and deletes
3477 @findex mh-undo
3478 @kindex u
3479
3480 If you've deleted a message or refiled it, but changed your mind, you
3481 can cancel the action before you've executed it. Use @kbd{u}
3482 (@code{mh-undo}) to undo a refile on or deletion of a single message.
3483 You can also undo refiles and deletes for messages that are found in a
3484 given range (@pxref{Ranges}).
3485
3486 @findex mh-undo-folder
3487 @kindex F u
3488
3489 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo
3490 all refiles and deletes in the current folder.
3491
3492 @findex mh-execute-commands
3493 @kindex x
3494
3495 If you've marked messages to be deleted or refiled and you want to go
3496 ahead and delete or refile the messages, use @kbd{x}
3497 (@code{mh-execute-commands}). Many MH-E commands that may affect the
3498 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if
3499 you want to process refiles or deletes first and then either run
3500 @kbd{x} for you or undo the pending refiles and deletes.
3501
3502 @kindex x
3503 @vindex mh-after-commands-processed-hook
3504 @vindex mh-before-commands-processed-hook
3505
3506 The command @kbd{x} runs @code{mh-before-commands-processed-hook}
3507 before the commands are processed and
3508 @code{mh-after-commands-processed-hook} after the commands are
3509 processed. Variables that are useful with the former hook include
3510 @code{mh-delete-list} and @code{mh-refile-list} which can be used to
3511 see which changes will be made to the current folder,
3512 @code{mh-current-folder}. Variables that are useful with the latter
3513 hook include @code{mh-folders-changed}, which lists which folders were
3514 affected by deletes and refiles. This list will always include the
3515 current folder @code{mh-current-folder}.
3516
3517 @findex mh-copy-msg
3518 @kindex c
3519 @kindex o
3520
3521 If you wish to copy a message to another folder, you can use the
3522 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
3523 to @command{refile}(1)). Like the command @kbd{o}, this command
3524 prompts you for the name of the target folder and you can specify a
3525 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy
3526 takes place immediately. The original copy remains in the current
3527 folder.
3528
3529 @cindex junk mail
3530 @cindex MH-Folder mode
3531 @cindex MH-Folder Show mode
3532 @cindex modes, MH-Folder
3533 @cindex modes, MH-Folder Show
3534 @cindex spam
3535 @findex mh-toggle-showing
3536 @kindex t
3537
3538 The command @kbd{t} (@code{mh-toggle-showing}) switches between
3539 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
3540 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off
3541 the associated show buffer so that you can perform operations on the
3542 messages quickly without reading them. This is an excellent way to
3543 prune out your junk mail or to refile a group of messages to another
3544 folder for later examination.
3545
3546 @cindex MH-Folder mode
3547 @cindex MH-Show mode
3548 @cindex modes, MH-Folder
3549 @cindex modes, MH-Show
3550 @cindex moving between messages
3551 @kindex t
3552 @vindex mh-recenter-summary-flag
3553
3554 When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder
3555 mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
3556 alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil}
3557 value causes the toggle to display as many scan lines as possible,
3558 with the cursor at the middle. The effect of
3559 @code{mh-recenter-summary-flag} is rather useful, but it can be
3560 annoying on a slow network connection.
3561
3562 @findex mh-visit-folder
3563 @kindex F v
3564 @vindex mh-large-folder
3565
3566 When you want to read the messages that you have refiled into folders,
3567 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the
3568 folder. You are prompted for the folder name. The folder buffer will
3569 show just unseen messages if there are any; otherwise, it will show
3570 all the messages in the buffer as long there are fewer than
3571 @code{mh-large-folder} messages. If there are more, then you are
3572 prompted for a range of messages to scan. You can provide a prefix
3573 argument in order to specify a range of messages to show when you
3574 visit the folder (@pxref{Ranges}). In this case, regions are not used
3575 to specify the range and @code{mh-large-folder} is ignored. Note that
3576 this command can also be used to create folders. If you specify a
3577 folder that does not exist, you will be prompted to create it.
3578
3579 @findex mh-search
3580 @kindex F s
3581
3582 If you forget where you've refiled your messages, you can find them
3583 using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3584
3585 @cindex @command{procmail}
3586 @cindex @samp{unseen} sequence
3587 @cindex sequence, @samp{unseen}
3588 @cindex Unix commands, @command{procmail}
3589 @cindex unseen messages, viewing
3590 @findex mh-index-new-messages
3591 @kindex F n
3592 @vindex mh-new-messages-folders
3593
3594 If you use a program such as @command{procmail} to file your incoming
3595 mail automatically, you can display new, unseen, messages using the
3596 command @kbd{F n} (@code{mh-index-new-messages}). All messages in the
3597 @samp{unseen} sequence from the folders in
3598 @code{mh-new-messages-folders} are listed. However, this list of
3599 folders can be overridden with a prefix argument: with a prefix
3600 argument, enter a space-separated list of folders, or nothing to
3601 search all folders.
3602
3603 @cindex @samp{tick} sequence
3604 @cindex sequence, @samp{tick}
3605 @cindex ticked messages, viewing
3606 @findex mh-index-ticked-messages
3607 @kindex F '
3608 @vindex mh-ticked-messages-folders
3609
3610 If you have ticked messages (@pxref{Sequences}), you can display them
3611 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
3612 messages in the @samp{tick} sequence from the folders in
3613 @code{mh-ticked-messages-folders} are listed. With a prefix argument,
3614 enter a space-separated list of folders, or nothing to search all
3615 folders.
3616
3617 @findex mh-index-sequenced-messages
3618 @kindex F q
3619 @vindex mh-new-messages-folders
3620
3621 You can display messages in any sequence with the command @kbd{F q}
3622 (@code{mh-index-sequenced-messages}). All messages from the folders in
3623 @code{mh-new-messages-folders} in the sequence you provide are listed.
3624 With a prefix argument, enter a space-separated list of folders at the
3625 prompt, or nothing to search all folders.
3626
3627 @vindex mh-new-messages-folders
3628 @vindex mh-recursive-folders-flag
3629 @vindex mh-ticked-messages-folders
3630
3631 Set the options @code{mh-new-messages-folders} and
3632 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the
3633 @samp{+inbox} folder or @samp{All} to search all of the top level
3634 folders. Otherwise, list the folders that should be searched with the
3635 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
3636
3637 @cindex buffers, @samp{*MH-E Folders*}
3638 @cindex @samp{*MH-E Folders*}
3639 @findex mh-kill-folder
3640 @findex mh-list-folders
3641 @findex mh-pack-folder
3642 @findex mh-rescan-folder
3643 @findex mh-sort-folder
3644 @kindex F k
3645 @kindex F l
3646 @kindex F p
3647 @kindex F r
3648 @kindex F S
3649
3650 Other commands you can perform on folders include: @kbd{F l}
3651 (@code{mh-list-folders}), to place a listing of all the folders in
3652 your mail directory in a buffer called @samp{*MH-E Folders*}
3653 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove
3654 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by
3655 date (see @command{sortm}(1) to see how to sort by other criteria);
3656 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps
3657 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}),
3658 to rescan the folder, which is useful to grab all messages in your
3659 @samp{+inbox} after processing your new mail for the first time. If
3660 you don't want to rescan the entire folder, the commands @kbd{F r} or
3661 @kbd{F p} will accept a range (@pxref{Ranges}).
3662
3663 @kindex @key{TAB}
3664 @vindex mh-recursive-folders-flag
3665
3666 By default, operations on folders work only one level at a time. Set
3667 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
3668 folders. This mostly means that you'll be able to see all your folders
3669 when you press @key{TAB} when prompted for a folder name.
3670
3671 @findex mh-search-p
3672 @kindex k
3673 @vindex mh-kill-folder-suppress-prompt-hooks
3674
3675 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
3676 hook run at the beginning of the command @kbd{k}. The hook functions
3677 are called with no arguments and should return a non-nil value to
3678 suppress the normal prompt when you remove a folder. This is useful
3679 for folders that are easily regenerated. The default value of
3680 @code{mh-search-p} suppresses the prompt on folders generated by
3681 searching.
3682
3683 @sp 1
3684 @center @strong{NOTE}
3685
3686 @quotation
3687 Use this hook with care. If there is a bug in your hook which returns
3688 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
3689 @code{+inbox} folder, you will not be happy.
3690 @end quotation
3691 @sp 1
3692
3693 @cindex @command{sortm}
3694 @cindex @file{.mh_profile}
3695 @cindex files, @file{.mh_profile}
3696 @cindex MH commands, @command{sortm}
3697 @cindex MH profile component, @samp{sortm:}
3698 @cindex @samp{sortm:} MH profile component
3699 @kindex F S
3700 @vindex mh-sortm-args
3701
3702 The option @code{mh-sortm-args} holds extra arguments to pass on to
3703 the command @command{sortm}@footnote{See the section
3704 @uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the
3705 MH book.} when a prefix argument is used with @kbd{F S}. Normally
3706 default arguments to @command{sortm} are specified in the MH profile.
3707 This option may be used to provide an alternate view. For example,
3708 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting.
3709
3710 @cindex exiting
3711 @cindex quitting
3712 @findex mh-quit
3713 @kindex q
3714
3715 When you want to quit using MH-E and go back to editing, you can use
3716 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
3717 current MH-E folder and restores the buffers that were present when
3718 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working
3719 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E }
3720 (@pxref{Miscellaneous}). You can later restore your MH-E session by
3721 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
3722 again.
3723
3724 @findex mh-execute-commands
3725 @kindex q
3726 @vindex mh-before-quit-hook
3727 @vindex mh-quit-hook
3728
3729 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3730 called by @kbd{q}. The former one is called before the quit occurs, so
3731 you might use it to perform any MH-E operations; you could perform
3732 some query and abort the quit or call @code{mh-execute-commands}, for
3733 example. The latter is not run in an MH-E context, so you might use it
3734 to modify the window setup. For example, if the window configuration
3735 was saved as in the example in @ref{Miscellaneous Commands and
3736 Options}, you would also want to set @code{mh-quit-hook} to the
3737 following:
3738
3739 @c XXX Replace this with my example for killing the mail buffers.
3740
3741 @vindex mh-quit-hook, example
3742
3743 @smalllisp
3744 @group
3745 (defun my-mh-quit-hook ()
3746 "Clear window configuration variables as the MH window is gone."
3747 (setq my-mh-screen-saved nil)
3748 (setq my-mh-screen nil)
3749 (if my-normal-screen
3750 (set-window-configuration my-normal-screen))
3751 (setq my-normal-screen nil))
3752
3753 @i{Clean up window setup in mh-quit-hook}
3754 @end group
3755 @end smalllisp
3756
3757 @cindex folders, renaming
3758 @cindex renaming folders
3759 @findex dired
3760 @findex dired-do-rename
3761
3762 You can use dired to manipulate the folders themselves. For example, I
3763 renamed my @samp{+out} folder to the more common @samp{+outbox} by
3764 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}),
3765 moving my cursor to @samp{out} and using the command @kbd{R}
3766 (@code{dired-do-rename}).
3767
3768 @node Sending Mail, Editing Drafts, Folders, Top
3769 @chapter Sending Mail
3770
3771 @cindex sending mail
3772 @findex mh-smail
3773 @kindex M-x mh-smail
3774
3775 You can send a mail message in several ways. You can call @kbd{M-x
3776 mh-smail} directly, or from the command line like this:
3777
3778 @cindex starting from command line
3779
3780 @smallexample
3781 $ @kbd{emacs -f mh-smail}
3782 @end smallexample
3783
3784 @findex goto-address-at-point
3785 @vindex mail-user-agent
3786
3787 There are some commands that need to send a mail message, such as
3788 @code{goto-address-at-point}. You can configure Emacs to have these
3789 commands use MH-E by setting the option @code{mail-user-agent} to
3790 @samp{Emacs interface to MH}.
3791
3792 @cindex @samp{Message} menu
3793 @cindex menu, @samp{Message}
3794
3795 From within MH-E's MH-Folder mode, other methods of sending mail are
3796 available as well. These can also be found in the @samp{Message} menu.
3797
3798 @table @kbd
3799 @cindex @samp{Message > Edit Message Again} menu item
3800 @cindex menu item, @samp{Message > Edit Message Again}
3801 @kindex e
3802 @findex mh-edit-again
3803 @item e
3804 Edit a message to send it again (@code{mh-edit-again}).
3805 @c -------------------------
3806 @cindex @samp{Message > Re-edit a Bounced Message} menu item
3807 @cindex menu item, @samp{Message > Re-edit a Bounced Message}
3808 @kindex E
3809 @findex mh-extract-rejected-mail
3810 @item E
3811 Edit a message that was returned by the mail system
3812 (@code{mh-extract-rejected-mail}).
3813 @c -------------------------
3814 @cindex @samp{Message > Forward Message...} menu item
3815 @cindex menu item, @samp{Message > Forward Message...}
3816 @kindex f
3817 @findex mh-forward
3818 @item f
3819 Forward message (@code{mh-forward}).
3820 @c -------------------------
3821 @cindex @samp{Message > Reply to Message...} menu item
3822 @cindex menu item, @samp{Message > Reply to Message...}
3823 @kindex r
3824 @findex mh-reply
3825 @item r
3826 Reply to a message (@code{mh-reply}).
3827 @c -------------------------
3828 @cindex @samp{Message > Compose a New Message} menu item
3829 @cindex menu item, @samp{Message > Compose a New Message}
3830 @kindex s
3831 @findex mh-send
3832 @item s
3833 Compose a message (@code{mh-send}).
3834 @c -------------------------
3835 @cindex @samp{Message > Redistribute Message...} menu item
3836 @cindex menu item, @samp{Message > Redistribute Message...}
3837 @kindex M-d
3838 @findex mh-redistribute
3839 @item M-d
3840 Redistribute a message (@code{mh-redistribute}).
3841 @c -------------------------
3842 @findex mh-smail
3843 @item M-x mh-smail
3844 Compose a message with the MH mail system.
3845 @c -------------------------
3846 @findex mh-smail-other-window
3847 @item M-x mh-smail-other-window
3848 Compose a message with the MH mail system in other window.
3849 @end table
3850
3851 @cindex @samp{mh-sending-mail} customization group
3852 @cindex customization group, @samp{mh-sending-mail}
3853
3854 In addition, several options from the @samp{mh-sending-mail}
3855 customization group are useful when sending mail or replying to mail.
3856 They are summarized in the following table.
3857
3858 @vtable @code
3859 @item mh-compose-forward-as-mime-flag
3860 On means that messages are forwarded as attachments (default:
3861 @samp{on}).
3862 @c -------------------------
3863 @item mh-compose-letter-function
3864 Hook run when starting a new draft (default: @code{nil}).
3865 @c -------------------------
3866 @item mh-compose-prompt-flag
3867 On means prompt for header fields when composing a new draft (default:
3868 @samp{off}).
3869 @c -------------------------
3870 @item mh-forward-subject-format
3871 Format string for forwarded message subject (default: @code{"%s:
3872 %s"}).
3873 @c -------------------------
3874 @item mh-insert-x-mailer-flag
3875 On means append an @samp{X-Mailer:} header field to the header
3876 (default: @samp{on}).
3877 @c -------------------------
3878 @item mh-redist-full-contents-flag
3879 On means the @command{dist} command needs entire letter for
3880 redistribution (default: @samp{off}).
3881 @c -------------------------
3882 @item mh-reply-default-reply-to
3883 Sets the person or persons to whom a reply will be sent (default:
3884 @samp{Prompt}).
3885 @c -------------------------
3886 @item mh-reply-show-message-flag
3887 On means the MH-Show buffer is displayed using @kbd{r}
3888 (@code{mh-reply}) (default: @samp{on}).
3889 @end vtable
3890
3891 The following hooks are available.
3892
3893 @vtable @code
3894 @item mh-forward-hook
3895 Hook run by @code{mh-forward} on a forwarded letter (default:
3896 @code{nil}).
3897 @c -------------------------
3898 @item mh-letter-mode-hook
3899 Hook run by @code{mh-letter-mode} on a new letter (default:
3900 @code{nil}).
3901 @end vtable
3902
3903 The functions and options introduced here are explained in more detail
3904 in the following sections.
3905
3906 @menu
3907 * Composing::
3908 * Replying::
3909 * Forwarding::
3910 * Redistributing::
3911 * Editing Again::
3912 @end menu
3913
3914 @node Composing, Replying, Sending Mail, Sending Mail
3915 @section Composing
3916
3917 @cindex @file{.emacs}
3918 @cindex MH-Folder mode
3919 @cindex composing mail
3920 @cindex draft
3921 @cindex files, @file{.emacs}
3922 @cindex modes, MH-Folder
3923 @cindex sending mail
3924 @findex mh-smail
3925 @findex mh-smail-other-window
3926 @kindex M-x mh-smail
3927 @kindex M-x mh-smail-other-window
3928
3929 Outside of an MH-Folder buffer, you must call either @kbd{M-x
3930 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
3931 The former command always creates a two-window layout with the current
3932 buffer on top and the draft on the bottom. Use the latter command if
3933 you would rather preserve the window layout. You may find adding the
3934 following key bindings to @file{~/.emacs} useful:
3935
3936 @smalllisp
3937 (global-set-key "\C-xm" 'mh-smail)
3938 (global-set-key "\C-x4m" 'mh-smail-other-window)
3939 @end smalllisp
3940
3941 @cindex draft folder
3942 @cindex MH-Letter mode
3943 @cindex modes, MH-Letter
3944 @findex mh-send
3945 @kindex m
3946
3947 From within a MH-Folder buffer, you can simply use the command @kbd{m}
3948 (@code{mh-send}). However you invoke @code{mh-send}, your letter
3949 appears in an Emacs buffer whose mode is MH-Letter (to see what the
3950 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows
3951 you to edit your message, to check the validity of the recipients, to
3952 insert attachments and other messages into your message, and to send
3953 the message. We'll go more into depth about editing a
3954 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft
3955 folder} so that you can edit several drafts in parallel. To do so,
3956 create a folder named @samp{+drafts} for example, and add the profile
3957 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a
3958 message you're composing) in just a moment (@pxref{Editing Drafts}).
3959
3960 @vindex mh-compose-prompt-flag
3961
3962 If you prefer to be prompted for the recipient and subject fields
3963 before the MH-Letter buffer appears, turn on the option
3964 @code{mh-compose-prompt-flag}.
3965
3966 @cindex header field, @samp{X-Mailer:}
3967 @cindex @samp{X-Mailer:} header field
3968 @vindex mh-insert-x-mailer-flag
3969
3970 MH-E adds an @samp{X-Mailer:} header field to the header that includes
3971 the version of MH-E and Emacs that you are using. If you don't want to
3972 participate in our marketing, you can turn off the option
3973 @code{mh-insert-x-mailer-flag}.
3974
3975 @cindex @command{repl}
3976 @cindex @file{components}
3977 @cindex MH commands, @command{repl}
3978 @cindex MH-Letter mode
3979 @cindex Mail mode
3980 @cindex files, @file{components}
3981 @cindex modes, MH-Letter
3982 @cindex modes, Mail
3983 @vindex mail-mode-hook
3984 @vindex mh-letter-mode-hook
3985 @vindex text-mode-hook
3986
3987 Two hooks are provided to run commands on your freshly created draft.
3988 The first hook, @code{mh-letter-mode-hook}, allows you to do some
3989 processing before editing a letter@footnote{Actually, because
3990 MH-Letter mode inherits from Mail mode, the hooks
3991 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that
3992 order) before @code{mh-letter-mode-hook}.}. For example, you may wish
3993 to modify the header after @command{repl} has done its work, or you
3994 may have a complicated @file{components} file and need to tell MH-E
3995 where the cursor should go. Here's an example of how you would use
3996 this hook.
3997
3998 @findex mh-insert-signature, example
3999
4000 @smalllisp
4001 @group
4002 (defvar letter-mode-init-done-flag nil
4003 "Non-nil means one-time MH-E settings have been made.")
4004
4005 (defun my-mh-letter-mode-hook ()
4006 "Prepare letter for editing."
4007 (when (not letter-mode-init-done) ; @r{only need to bind the keys once}
4008 (local-set-key "\C-ctb" 'add-enriched-text)
4009 (local-set-key "\C-cti" 'add-enriched-text)
4010 (local-set-key "\C-ctf" 'add-enriched-text)
4011 (local-set-key "\C-cts" 'add-enriched-text)
4012 (local-set-key "\C-ctB" 'add-enriched-text)
4013 (local-set-key "\C-ctu" 'add-enriched-text)
4014 (local-set-key "\C-ctc" 'add-enriched-text)
4015 (setq letter-mode-init-done t))
4016 (save-excursion
4017 (goto-char (point-max)) ; @r{go to end of message to}
4018 (mh-insert-signature))) ; @r{insert signature}
4019
4020 @i{Prepare draft for editing via mh-letter-mode-hook}
4021
4022 @end group
4023 @end smalllisp
4024
4025 The function, @code{add-enriched-text} is defined in the example in
4026 @ref{Adding Attachments}.
4027
4028 @vindex mh-compose-letter-function
4029 @vindex mh-letter-mode-hook
4030
4031 The second hook, a function really, is
4032 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
4033 is called just before editing a new message; however, it is the last
4034 function called before you edit your message. The consequence of this
4035 is that you can write a function to write and send the message for
4036 you. This function is passed three arguments: the contents of the
4037 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields.
4038
4039 @node Replying, Forwarding, Composing, Sending Mail
4040 @section Replying to Mail
4041
4042 @cindex @command{mhl}
4043 @cindex @file{mhl.reply}
4044 @cindex MH commands, @command{mhl}
4045 @cindex files, @file{mhl.reply}
4046 @cindex replying
4047 @findex mh-reply
4048 @kindex r
4049
4050 To compose a reply to a message, use the @kbd{r} (@code{mh-reply})
4051 command.
4052
4053 When you reply to a message, you are first prompted with @samp{Reply
4054 to whom?}. You have several choices here.
4055
4056 @quotation
4057 @multitable @columnfractions .20 .80
4058 @c @headitem Response @tab Reply Goes To
4059 @c XXX @headitem not yet supported by SourceForge's texi2pdf.
4060 @item @b{Response} @tab @b{Reply Goes To}
4061 @c -------------------------
4062 @item @kbd{from}
4063 @tab
4064 The person who sent the message. This is the default, so @key{RET} is
4065 sufficient.
4066 @c -------------------------
4067 @item @kbd{to}
4068 @tab
4069 Replies to the sender, plus all recipients in the @samp{To:} header field.
4070 @c -------------------------
4071 @item @kbd{cc}@*@kbd{all}
4072 @tab
4073 Forms a reply to the addresses in the @samp{Mail-Followup-To:} header
4074 field if one exists; otherwise forms a reply to the sender, plus all
4075 recipients.
4076 @end multitable
4077 @end quotation
4078
4079 @cindex @command{repl}
4080 @cindex MH commands, @command{repl}
4081 @vindex mh-reply-default-reply-to
4082
4083 Depending on your answer, @command{repl}@footnote{See the section
4084 @uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
4085 the MH book.} is given a different argument to form your reply.
4086 Specifically, a choice of @kbd{from} or none at all runs @samp{repl
4087 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
4088 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you
4089 find that most of the time you specify one of these choices when you
4090 reply to a message, you can change the option
4091 @code{mh-reply-default-reply-to} from its default value of
4092 @samp{Prompt} to one of the choices listed above. You can always edit
4093 the recipients in the draft.
4094
4095 @cindex @samp{repl:} MH profile component
4096 @cindex MH profile component, @samp{repl:}
4097 @cindex MH-Letter mode
4098 @cindex MH-Show mode
4099 @cindex draft
4100 @cindex modes, MH-Letter
4101 @cindex modes, MH-Show
4102
4103 Two windows are then created. One window contains the message to which
4104 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
4105 (@pxref{Editing Drafts}), is in the other window. If the reply draft
4106 was not one that you expected, check the things that affect the
4107 behavior of @command{repl} which include the @samp{repl:} profile
4108 component and the @file{replcomps} and @file{replgroupcomps} files.
4109
4110 If you supply a prefix argument (as in @kbd{C-u r}), the message you
4111 are replying to is inserted in your reply after having first been run
4112 through @command{mhl} with the format file @file{mhl.reply}. See
4113 @command{mhl}(1) or the section
4114 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
4115 book to see how you can modify the default @file{mhl.reply} file.
4116
4117 @vindex mh-yank-behavior
4118
4119 Alternatively, you can customize the option @code{mh-yank-behavior}
4120 and choose one of its @samp{Automatically} variants to do the same
4121 thing. @xref{Inserting Letter}. If you do so, the prefix argument has
4122 no effect.
4123
4124 Another way to include the message automatically in your draft is to
4125 use @samp{repl: -filter repl.filter} in your MH profile.
4126
4127 @vindex mh-reply-show-message-flag
4128
4129 If you include the message automatically, you can hide the MH-Show
4130 buffer by turning off the option @code{mh-reply-show-message-flag}.
4131
4132 If you wish to customize the header or other parts of the reply draft,
4133 please see @command{repl}(1) and @code{mh-format}(5).
4134
4135 @node Forwarding, Redistributing, Replying, Sending Mail
4136 @section Forwarding Mail
4137
4138 @cindex @command{forw}
4139 @cindex draft
4140 @cindex forwarding
4141 @cindex MH commands, @command{forw}
4142 @findex mh-forward
4143 @kindex f
4144 @vindex mh-forward-hook
4145
4146 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
4147 are prompted for the @samp{To:} and @samp{cc:} recipients. You are
4148 given a draft to edit that looks like it would if you had run the MH
4149 command @command{forw}@footnote{See the section
4150 @uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in
4151 the MH book.}. You can then add some text (@pxref{Editing Drafts}).
4152 You can forward several messages by using a range (@pxref{Ranges}).
4153 All of the messages in the range are inserted into your draft. The
4154 hook @code{mh-forward-hook} is called on the draft.
4155
4156 @cindex @file{.mh_profile}
4157 @cindex files, @file{.mh_profile}
4158 @cindex MH profile component, @samp{forw:}
4159 @cindex @samp{forw:} MH profile component
4160 @vindex mh-compose-forward-as-mime-flag
4161
4162 By default, the option @code{mh-compose-forward-as-mime-flag} is on
4163 which means that the forwarded messages are included as attachments.
4164 If you would prefer to forward your messages verbatim (as text,
4165 inline), then turn off this option. Forwarding messages verbatim works
4166 well for short, textual messages, but your recipient won't be able to
4167 view any non-textual attachments that were in the forwarded message.
4168 Be aware that if you have @samp{forw: -mime} in your MH profile, then
4169 forwarded messages will always be included as attachments regardless
4170 of the settings of @code{mh-compose-forward-as-mime-flag}.
4171
4172 @vindex mh-forward-subject-format
4173
4174 The format of the @samp{Subject:} header field for forwarded messages
4175 is controlled by the option @code{mh-forward-subject-format}. This
4176 option is a string which includes two escapes (@samp{%s}). The first
4177 @samp{%s} is replaced with the sender of the original message, and the
4178 second one is replaced with the original @samp{Subject:}. The default
4179 value of @code{"%s: %s"} takes a message with the header:
4180
4181 @smallexample
4182 @group
4183 To: Bill Wohler <wohler@@stop.mail-abuse.org>
4184 Subject: Re: 49er football
4185 From: Greg DesBrisay <gd@@stop.mail-abuse.org>
4186 @end group
4187 @end smallexample
4188
4189 and creates a subject header field of:
4190
4191 @smallexample
4192 Subject: Greg DesBrisay: Re: 49er football
4193 @end smallexample
4194
4195 @node Redistributing, Editing Again, Forwarding, Sending Mail
4196 @section Redistributing Your Mail
4197
4198 @cindex @command{dist}
4199 @cindex MH commands, @command{dist}
4200 @cindex redistributing
4201 @findex mh-redistribute
4202 @kindex M-d
4203
4204 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function
4205 to forwarding mail, but it does not allow you to edit the message, nor
4206 does it add your name to the @samp{From:} header field. It appears to
4207 the recipient as if the message had come from the original sender.
4208 When you run this command, you are prompted for the recipients.
4209
4210 @findex mh-edit-again
4211 @kindex e
4212
4213 For more information on redistributing messages, see
4214 @command{dist}(1). Also investigate the command @kbd{e}
4215 (@code{mh-edit-again}) for another way to redistribute messages
4216 (@pxref{Editing Again}).
4217
4218 @cindex @command{send}
4219 @cindex MH commands, @command{send}
4220 @vindex mh-redist-full-contents-flag
4221
4222 The option @code{mh-redist-full-contents-flag} must be turned on if
4223 @command{dist}@footnote{See the section
4224 @uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with
4225 dist} in the MH book.} requires the whole letter for redistribution,
4226 which is the case if @command{send}@footnote{See the section
4227 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
4228 in the MH book.} is compiled with the @sc{berk} option (which many
4229 people abhor). If you find that MH will not allow you to redistribute
4230 a message that has been redistributed before, turn off this option.
4231
4232 @node Editing Again, , Redistributing, Sending Mail
4233 @section Editing Old Drafts and Bounced Messages
4234
4235 @cindex @file{draft}
4236 @cindex files, @file{draft}
4237 @cindex re-editing drafts
4238 @findex mh-edit-again
4239 @kindex F v drafts
4240 @kindex e
4241 @kindex n
4242
4243 If you don't complete a draft for one reason or another, and if the
4244 draft buffer is no longer available, you can pick your draft up again
4245 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft
4246 folder, your last @file{draft} file will be used. If you use draft
4247 folders, you'll need to visit the draft folder with @kbd{F v drafts
4248 @key{RET}}, use @kbd{n} to move to the appropriate message, and then
4249 use @kbd{e} to prepare the message for editing.
4250
4251 @kindex e
4252
4253 The @kbd{e} command can also be used to take messages that were sent
4254 to you and to send them to more people.
4255
4256 @cindex Mailer-Daemon
4257 @findex mh-extract-rejected-mail
4258 @kindex C-c C-c
4259 @kindex E
4260
4261 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
4262 complained that your mail wasn't posted for some reason or another. In
4263 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare
4264 the message for editing by removing the @i{Mailer-Daemon} envelope and
4265 unneeded header fields. Fix whatever addressing problem you had, and
4266 send the message again with @kbd{C-c C-c}.
4267
4268 @node Editing Drafts, Aliases, Sending Mail, Top
4269 @chapter Editing a Draft
4270
4271 @cindex @samp{Letter} menu
4272 @cindex MH-Letter mode
4273 @cindex draft
4274 @cindex editing draft
4275 @cindex menu, @samp{Letter}
4276 @cindex modes, MH-Letter
4277
4278 When you edit a message that you want to send (called a @dfn{draft} in
4279 this case), the mode used is MH-Letter. This mode provides several
4280 commands in addition to the normal Emacs editing commands to help you
4281 edit your draft. These can also be found in the @samp{Letter} menu.
4282
4283 @table @kbd
4284 @kindex @key{SPC}
4285 @findex mh-letter-complete-or-space
4286 @item @key{SPC}
4287 Perform completion or insert space (@code{mh-letter-complete-or-space}).
4288 @c -------------------------
4289 @kindex M-@key{TAB}
4290 @findex mh-letter-complete
4291 @item M-@key{TAB}
4292 Perform completion on header field or word preceding point
4293 (@code{mh-letter-complete}).
4294 @c -------------------------
4295 @kindex , (comma)
4296 @findex mh-letter-confirm-address
4297 @item , (comma)
4298 Flash alias expansion (@code{mh-letter-confirm-address}).
4299 @c -------------------------
4300 @kindex @key{TAB}
4301 @findex mh-letter-next-header-field-or-indent
4302 @item @key{TAB}
4303 Cycle to next field (@code{mh-letter-next-header-field-or-indent}).
4304 @c -------------------------
4305 @kindex S-@key{TAB}
4306 @findex mh-letter-previous-header-field
4307 @item S-@key{TAB}
4308 Cycle to the previous header field
4309 (@code{mh-letter-previous-header-field}).
4310 @c -------------------------
4311 @kindex C-c ?
4312 @findex mh-help
4313 @item C-c ?
4314 Display cheat sheet for the MH-E commands (@code{mh-help}).
4315 @c -------------------------
4316 @cindex @samp{Letter > Send This Draft} menu item
4317 @cindex menu item, @samp{Letter > Send This Draft}
4318 @kindex C-c C-c
4319 @findex mh-send-letter
4320 @item C-c C-c
4321 Save draft and send message (@code{mh-send-letter}).
4322 @c -------------------------
4323 @kindex C-c C-d
4324 @findex mh-insert-identity
4325 @item C-c C-d
4326 Insert fields specified by the given identity
4327 (@code{mh-insert-identity}). @xref{Identities}.
4328 @c -------------------------
4329 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item
4330 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)}
4331 @kindex C-c C-e
4332 @findex mh-mh-to-mime
4333 @item C-c C-e
4334 Compose @sc{mime} message from MH-style directives
4335 (@code{mh-mh-to-mime}).
4336 @c -------------------------
4337 @kindex C-c C-f C-a
4338 @kindex C-c C-f a
4339 @findex mh-to-field
4340 @item C-c C-f C-a
4341 @itemx C-c C-f a
4342 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
4343 @c -------------------------
4344 @kindex C-c C-f C-b
4345 @kindex C-c C-f b
4346 @item C-c C-f C-b
4347 @itemx C-c C-f b
4348 Move to @samp{Bcc:} header field (@code{mh-to-field}).
4349 @c -------------------------
4350 @kindex C-c C-f C-c
4351 @kindex C-c C-f c
4352 @item C-c C-f C-c
4353 @itemx C-c C-f c
4354 Move to @samp{Cc:} header field (@code{mh-to-field}).
4355 @c -------------------------
4356 @kindex C-c C-f C-d
4357 @kindex C-c C-f d
4358 @item C-c C-f C-d
4359 @itemx C-c C-f d
4360 Move to @samp{Dcc:} header field (@code{mh-to-field}).
4361 @c -------------------------
4362 @kindex C-c C-f C-f
4363 @kindex C-c C-f f
4364 @findex mh-to-fcc
4365 @item C-c C-f C-f
4366 @itemx C-c C-f f
4367 Move to @samp{Fcc:} header field (@code{mh-to-fcc}).
4368 @c -------------------------
4369 @kindex C-c C-f C-l
4370 @kindex C-c C-f l
4371 @item C-c C-f C-l
4372 @itemx C-c C-f l
4373 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
4374 @c -------------------------
4375 @kindex C-c C-f C-m
4376 @kindex C-c C-f m
4377 @item C-c C-f C-m
4378 @itemx C-c C-f m
4379 Move to @samp{From:} header field (@code{mh-to-field}).
4380 @c -------------------------
4381 @kindex C-c C-f C-r
4382 @kindex C-c C-f r
4383 @item C-c C-f C-r
4384 @itemx C-c C-f r
4385 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
4386 @c -------------------------
4387 @kindex C-c C-f C-s
4388 @kindex C-c C-f s
4389 @item C-c C-f C-s
4390 @itemx C-c C-f s
4391 Move to @samp{Subject:} header field (@code{mh-to-field}).
4392 @c -------------------------
4393 @kindex C-c C-f C-t
4394 @kindex C-c C-f t
4395 @item C-c C-f C-t
4396 @itemx C-c C-f t
4397 Move to @samp{To:} header field (@code{mh-to-field}).
4398 @c -------------------------
4399 @cindex @samp{Letter > Insert a Message...} menu item
4400 @cindex menu item, @samp{Letter > Insert a Message...}
4401 @kindex C-c C-i
4402 @findex mh-insert-letter
4403 @item C-c C-i
4404 Insert a message (@code{mh-insert-letter}).
4405 @c -------------------------
4406 @kindex C-c C-m C-e
4407 @findex mh-mml-secure-message-encrypt
4408 @item C-c C-m C-e
4409 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4410 @c -------------------------
4411 @cindex @samp{Letter > Compose Forward...} menu item
4412 @cindex menu item, @samp{Letter > Compose Forward...}
4413 @kindex C-c C-m C-f
4414 @kindex C-c C-m f
4415 @findex mh-compose-forward
4416 @item C-c C-m C-f
4417 @itemx C-c C-m f
4418 Add tag to forward a message (@code{mh-compose-forward}).
4419 @c -------------------------
4420 @cindex @samp{Letter > Compose Get File (MH)...} menu item
4421 @cindex menu item, @samp{Letter > Compose Get File (MH)...}
4422 @kindex C-c C-m C-g
4423 @kindex C-c C-m g
4424 @findex mh-mh-compose-anon-ftp
4425 @item C-c C-m C-g
4426 @itemx C-c C-m g
4427 Add tag to include anonymous ftp reference to a file
4428 (@code{mh-mh-compose-anon-ftp}).
4429 @c -------------------------
4430 @cindex @samp{Letter > Compose Insertion...} menu item
4431 @cindex menu item, @samp{Letter > Compose Insertion...}
4432 @kindex C-c C-m C-i
4433 @kindex C-c C-m i
4434 @findex mh-compose-insertion
4435 @item C-c C-m C-i
4436 @itemx C-c C-m i
4437 Add tag to include a file such as an image or sound
4438 (@code{mh-compose-insertion}).
4439 @c -------------------------
4440 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item
4441 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)}
4442 @kindex C-c C-m C-m
4443 @kindex C-c C-m m
4444 @findex mh-mml-to-mime
4445 @item C-c C-m C-m
4446 @itemx C-c C-m m
4447 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}).
4448 @c -------------------------
4449 @kindex C-c C-m C-n
4450 @kindex C-c C-m n
4451 @findex mh-mml-unsecure-message
4452 @item C-c C-m C-n
4453 @itemx C-c C-m n
4454 Remove any secure message tags (@code{mh-mml-unsecure-message}).
4455 @c -------------------------
4456 @kindex C-c C-m C-s
4457 @findex mh-mml-secure-message-sign
4458 @item C-c C-m C-s
4459 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4460 @c -------------------------
4461 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item
4462 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...}
4463 @kindex C-c C-m C-t
4464 @kindex C-c C-m t
4465 @findex mh-mh-compose-external-compressed-tar
4466 @item C-c C-m C-t
4467 @itemx C-c C-m t
4468 Add tag to include anonymous ftp reference to a compressed tar file
4469 (@code{mh-mh-compose-external-compressed-tar}).
4470 @c -------------------------
4471 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item
4472 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)}
4473 @kindex C-c C-m C-u
4474 @kindex C-c C-m u
4475 @findex mh-mh-to-mime-undo
4476 @item C-c C-m C-u
4477 @itemx C-c C-m u
4478 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}).
4479 @c -------------------------
4480 @kindex C-c C-m C-x
4481 @kindex C-c C-m x
4482 @findex mh-mh-compose-external-type
4483 @item C-c C-m C-x
4484 @itemx C-c C-m x
4485 Add tag to refer to a remote file
4486 (@code{mh-mh-compose-external-type}).
4487 @c -------------------------
4488 @kindex C-c C-m e e
4489 @findex mh-mml-secure-message-encrypt
4490 @item C-c C-m e e
4491 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4492 @c -------------------------
4493 @kindex C-c C-m e s
4494 @findex mh-mml-secure-message-signencrypt
4495 @item C-c C-m e s
4496 Add tag to encrypt and sign the message@*
4497 (@code{mh-mml-secure-message-signencrypt}).
4498 @c -------------------------
4499 @kindex C-c C-m s e
4500 @findex mh-mml-secure-message-signencrypt
4501 @item C-c C-m s e
4502 Add tag to encrypt and sign the message@*
4503 (@code{mh-mml-secure-message-signencrypt}).
4504 @c -------------------------
4505 @kindex C-c C-m s s
4506 @findex mh-mml-secure-message-sign
4507 @item C-c C-m s s
4508 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4509 @c -------------------------
4510 @cindex @samp{Letter > Split Current Line} menu item
4511 @cindex menu item, @samp{Letter > Split Current Line}
4512 @kindex C-c C-o
4513 @findex mh-open-line
4514 @item C-c C-o
4515 Insert a newline and leave point before it (@code{mh-open-line}).
4516 @c -------------------------
4517 @cindex @samp{Letter > Kill This Draft} menu item
4518 @cindex menu item, @samp{Letter > Kill This Draft}
4519 @kindex C-c C-q
4520 @findex mh-fully-kill-draft
4521 @item C-c C-q
4522 Quit editing and delete draft message (@code{mh-fully-kill-draft}).
4523 @c -------------------------
4524 @cindex @samp{Letter > Insert Signature} menu item
4525 @cindex menu item, @samp{Letter > Insert Signature}
4526 @kindex C-c C-s
4527 @findex mh-insert-signature
4528 @item C-c C-s
4529 Insert signature in message (@code{mh-insert-signature}).
4530 @c -------------------------
4531 @kindex C-c C-t
4532 @findex mh-letter-toggle-header-field-display
4533 @item C-c C-t
4534 Toggle display of header field at point
4535 (@code{mh-letter-toggle-header-field-display}).
4536 @c -------------------------
4537 @cindex @samp{Letter > Check Recipient} menu item
4538 @cindex menu item, @samp{Letter > Check Recipient}
4539 @kindex C-c C-w
4540 @findex mh-check-whom
4541 @item C-c C-w
4542 Verify recipients, showing expansion of any aliases
4543 (@code{mh-check-whom}).
4544 @c -------------------------
4545 @cindex @samp{Letter > Yank Current Message} menu item
4546 @cindex menu item, @samp{Letter > Yank Current Message}
4547 @kindex C-c C-y
4548 @findex mh-yank-cur-msg
4549 @item C-c C-y
4550 Insert the current message into the draft buffer
4551 (@code{mh-yank-cur-msg}).
4552 @c -------------------------
4553 @kindex C-c M-d
4554 @findex mh-insert-auto-fields
4555 @item C-c M-d
4556 Insert custom fields if recipient is found in
4557 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}).
4558 @xref{Identities}.
4559 @end table
4560
4561 @cindex @samp{mh-letter} customization group
4562 @cindex customization group, @samp{mh-letter}
4563
4564 Several options from the @samp{mh-letter} customization group are used
4565 while editing a draft.
4566
4567 @vtable @code
4568 @item mh-compose-insertion
4569 Type of @sc{mime} message tags in messages (default: @samp{MML} if
4570 available; otherwise @samp{MH}).
4571 @c -------------------------
4572 @item mh-compose-skipped-header-fields
4573 List of header fields to skip over when navigating in draft (default:
4574 @code{'("From"} @code{"Organization"} @code{"References"}
4575 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"}
4576 @code{"X-Image-URL"} @code{"X-Mailer")}.
4577 @c -------------------------
4578 @item mh-compose-space-does-completion-flag
4579 On means @key{SPC} does completion in message header (default:
4580 @samp{off}).
4581 @c -------------------------
4582 @item mh-delete-yanked-msg-window-flag
4583 On means delete any window displaying the message (default: @samp{off}).
4584 @c -------------------------
4585 @item mh-extract-from-attribution-verb
4586 Verb to use for attribution when a message is yanked by @kbd{C-c C-y}
4587 (default: @code{"wrote:"}).
4588 @c -------------------------
4589 @item mh-ins-buf-prefix
4590 String to put before each line of a yanked or inserted message
4591 (default: @code{"> "}).
4592 @c -------------------------
4593 @item mh-letter-complete-function
4594 Function to call when completing outside of address or folder fields
4595 (default: @code{ispell-complete-word}).
4596 @c -------------------------
4597 @item mh-letter-fill-column
4598 Fill column to use in MH-Letter mode (default: 72).
4599 @c -------------------------
4600 @item mh-mml-method-default
4601 Default method to use in security tags (default: @samp{PGP (MIME)} if
4602 support for it is available; otherwise @samp{None}).
4603 @c -------------------------
4604 @item mh-signature-file-name
4605 Source of user's signature (default: @code{"~/.signature"}).
4606 @c -------------------------
4607 @item mh-signature-separator-flag
4608 On means a signature separator should be inserted (default:
4609 @samp{on}).
4610 @c -------------------------
4611 @item mh-x-face-file
4612 File containing X-Face or Face header field to insert in outgoing mail.
4613 (default: @code{"~/.face"}).
4614 @c -------------------------
4615 @item mh-yank-behavior
4616 Controls which part of a message is yanked by @kbd{C-c C-y} (default:
4617 @samp{Body With Attribution}).
4618 @end vtable
4619
4620 The following hooks are available.
4621
4622 @vtable @code
4623 @item mail-citation-hook
4624 Hook for modifying a citation just inserted in the mail buffer
4625 (default: @code{nil}).
4626 @c -------------------------
4627 @item mh-before-send-letter-hook
4628 Hook run at the beginning of the @kbd{C-c C-c} command (default:
4629 @samp{nil}).
4630 @c -------------------------
4631 @item mh-mh-to-mime-hook
4632 Hook run on the formatted letter by @kbd{C-c C-e} (default:
4633 @samp{nil}).
4634 @c -------------------------
4635 @item mh-insert-signature-hook
4636 Hook run by @kbd{C-c C-s} after signature has been inserted (default:
4637 @code{nil}).
4638 @end vtable
4639
4640 The following face is available.
4641
4642 @vtable @code
4643 @item mh-letter-header-field
4644 Editable header field value face in draft buffers.
4645 @end vtable
4646
4647 The commands and options introduced here are explained in more
4648 detail in the following sections.
4649
4650 @menu
4651 * Editing Message::
4652 * Inserting Letter::
4653 * Inserting Messages::
4654 * Signature::
4655 * Picture::
4656 * Adding Attachments::
4657 * Sending PGP::
4658 * Checking Recipients::
4659 * Sending Message::
4660 * Killing Draft::
4661 @end menu
4662
4663 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts
4664 @section Editing the Message
4665
4666 @cindex @samp{Bcc:} header field
4667 @cindex @samp{Cc:} header field
4668 @cindex @samp{Dcc:} header field
4669 @cindex @samp{From:} header field
4670 @cindex @samp{Mail-Followup-To:} header field
4671 @cindex @samp{Mail-Reply-To:} header field
4672 @cindex @samp{Reply-To:} header field
4673 @cindex @samp{Subject:} header field
4674 @cindex @samp{To:} header field
4675 @cindex editing header
4676 @cindex header field, @samp{Bcc:}
4677 @cindex header field, @samp{Cc:}
4678 @cindex header field, @samp{Dcc:}
4679 @cindex header field, @samp{From:}
4680 @cindex header field, @samp{Mail-Followup-To:}
4681 @cindex header field, @samp{Mail-Reply-To:}
4682 @cindex header field, @samp{Reply-To:}
4683 @cindex header field, @samp{Subject:}
4684 @cindex header field, @samp{To:}
4685 @findex mh-to-field
4686 @kindex C-c C-f C-t
4687 @kindex C-c C-f t
4688
4689 Because the header is part of the message, you can edit the header
4690 fields as you wish. However, several convenience commands exist to
4691 help you create and edit them. For example, the command @kbd{C-c C-f
4692 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the
4693 cursor to the @samp{To:} header field, creating it if necessary. The
4694 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:},
4695 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To},
4696 @samp{Bcc:}, and @samp{Dcc:} header fields are similar.
4697
4698 @findex mh-to-fcc
4699 @kindex C-c C-f C-f
4700 @kindex C-c C-f f
4701
4702 One command behaves differently from the others, namely, @kbd{C-c C-f
4703 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command
4704 will prompt you for the folder name in which to file a copy of the
4705 draft. @xref{Folder Selection}.
4706
4707 @findex indent-relative
4708 @findex mh-letter-next-header-field-or-indent
4709 @findex mh-letter-previous-header-field
4710 @kindex @key{TAB}
4711 @kindex S-@key{TAB}
4712 @vindex mh-compose-skipped-header-fields
4713 @vindex mh-letter-header-field
4714
4715 Within the header of the message, the command@* @key{TAB}
4716 (@code{mh-letter-next-header-field-or-indent}) moves between fields
4717 that are highlighted with the face @code{mh-letter-header-field},
4718 skipping those fields listed in
4719 @code{mh-compose-skipped-header-fields}. After the last field, this
4720 command then moves point to the message body before cycling back to
4721 the first field. If point is already past the first line of the
4722 message body, then this command indents by calling
4723 @code{indent-relative} with the given prefix argument. The command
4724 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves
4725 backwards between the fields and cycles to the body of the message
4726 after the first field. Unlike the command @key{TAB}, it will always
4727 take point to the last field from anywhere in the body.
4728
4729 @cindex alias completion
4730 @cindex completion
4731 @cindex spell check
4732 @findex ispell-complete-word
4733 @findex mh-letter-complete
4734 @findex mh-letter-complete-or-space
4735 @findex mh-letter-confirm-address
4736 @kindex , (comma)
4737 @kindex @key{SPC}
4738 @kindex M-@key{TAB}
4739 @vindex mh-alias-flash-on-comma
4740 @vindex mh-compose-space-does-completion-flag
4741 @vindex mh-letter-complete-function
4742
4743 If the field contains addresses (for example, @samp{To:} or
4744 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command
4745 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias
4746 completion (@pxref{Aliases}). In the body of the message,
4747 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead,
4748 which is set to @samp{'ispell-complete-word} by default. The command
4749 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument
4750 that is passed to the @code{mh-letter-complete-function}. In addition,
4751 turn on the option @code{mh-compose-space-does-completion-flag} to use
4752 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform
4753 completion in the header as well; use a prefix argument to specify
4754 more than one space. Addresses are separated by a comma; when you
4755 press the comma, the command @code{mh-letter-confirm-address} flashes
4756 the alias expansion in the minibuffer if
4757 @code{mh-alias-flash-on-comma} is turned on.
4758
4759 @c XXX Document the replacement for the inaccessible 'long argument.
4760
4761 @findex mh-letter-toggle-header-field-display
4762 @kindex C-c C-t
4763
4764 Use the command @kbd{C-c C-t}
4765 @code{mh-letter-toggle-header-field-display} to display truncated
4766 header fields. This command is a toggle so entering it again will hide
4767 the field. This command takes a prefix argument: if negative then the
4768 field is hidden, if positive then the field is displayed (for example,
4769 @kbd{C-u C-c C-t}).
4770
4771 Be sure to leave a row of dashes or a blank line between the header
4772 and the body of the message.
4773
4774 @vindex mh-letter-fill-column
4775
4776 The body of the message is edited as you would edit any Emacs buffer
4777 although there are a few commands and options to assist you. You can
4778 change the fill column in MH-Letter mode with the option
4779 @code{mh-letter-fill-column}. By default, this option is 72 to allow
4780 others to quote your message without line wrapping.
4781
4782 @cindex filling paragraphs
4783 @cindex paragraphs, filling
4784 @findex fill-paragraph
4785 @kindex M-q
4786 @vindex mh-ins-buf-prefix
4787
4788 You'll often include messages that were sent from user agents that
4789 haven't yet realized that paragraphs consist of more than a single
4790 line. This makes for long lines that wrap in an ugly fashion. You'll
4791 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these
4792 quoted messages, even if they are nested, just as long as all of the
4793 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting
4794 Letter}). For example, let's assume you have the following in your
4795 draft:
4796
4797 @smallexample
4798 @group
4799 > Hopefully this gives you an idea of what I'm currently doing. I'm \
4800 not sure yet whether I'm completely satisfied with my setup, but \
4801 it's worked okay for me so far.
4802 @end group
4803 @end smallexample
4804
4805 Running @kbd{M-q} on this paragraph produces:
4806
4807 @smallexample
4808 @group
4809 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4810 > sure yet whether I'm completely satisfied with my setup, but it's
4811 > worked okay for me so far.
4812 @end group
4813 @end smallexample
4814
4815 @findex mh-open-line
4816 @findex open-line
4817 @kindex C-c C-o
4818 @kindex C-o
4819
4820 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the
4821 command @kbd{C-o} (@code{open-line}) in that it inserts a newline
4822 after point. It differs in that it also inserts the right number of
4823 quoting characters and spaces so that the next line begins in the same
4824 column as it was. This is useful when breaking up paragraphs in
4825 replies. For example, if this command was used when point was after
4826 the first period in the paragraph above, the result would be this:
4827
4828 @smallexample
4829 @group
4830 > Hopefully this gives you an idea of what I'm currently doing.
4831
4832 > I'm not
4833 > sure yet whether I'm completely satisfied with my setup, but it's
4834 > worked okay for me so far.
4835 @end group
4836 @end smallexample
4837
4838 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
4839 @section Inserting Letter to Which You're Replying
4840
4841 @cindex inserting messages
4842 @cindex replying to messages
4843 @cindex yanking messages
4844 @findex mh-yank-cur-msg
4845 @kindex C-c C-y
4846 @vindex mh-ins-buf-prefix
4847
4848 It is often useful to insert a snippet of text from a letter that
4849 someone mailed to provide some context for your reply. The command
4850 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an
4851 attribution, yanking a portion of text from the message to which
4852 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
4853 before each line.
4854
4855 @smallexample
4856 @group
4857 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4858
4859 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4860 > sure yet whether I'm completely satisfied with my setup, but it's
4861 > worked okay for me so far.
4862 @end group
4863 @end smallexample
4864
4865 @vindex mh-extract-from-attribution-verb
4866
4867 The attribution consists of the sender's name and email address
4868 followed by the content of the option
4869 @code{mh-extract-from-attribution-verb}. This option can be set to
4870 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use
4871 the @samp{Custom String} menu item to enter your own verb.
4872
4873 @vindex mail-citation-hook
4874 @vindex mh-ins-buf-prefix
4875 @vindex mh-yank-behavior
4876
4877 The prefix @code{"> "} is the default setting for the option
4878 @code{mh-ins-buf-prefix}. I suggest that you not modify this option
4879 since it is used by many mailers and news readers: messages are far
4880 easier to read if several included messages have all been indented by
4881 the same string. This prefix is not inserted if you use one of the
4882 supercite flavors of @code{mh-yank-behavior} or you have added a
4883 @code{mail-citation-hook} as described below.
4884
4885 @vindex mh-delete-yanked-msg-window-flag
4886
4887 You can also turn on the @code{mh-delete-yanked-msg-window-flag}
4888 option to delete the window containing the original message after
4889 yanking it to make more room on your screen for your reply.
4890
4891 @cindex Emacs, packages, supercite
4892 @cindex supercite package
4893 @kindex r
4894 @vindex mail-citation-hook
4895 @vindex mh-yank-behavior
4896
4897 You can control how the message to which you are replying is yanked
4898 into your reply using @code{mh-yank-behavior}. To include the entire
4899 message, including the entire header, use @samp{Body and
4900 Header}@footnote{If you'd rather have the header cleaned up, use
4901 @kbd{C-u r} instead of @kbd{r} when replying
4902 (@pxref{Replying}).}@footnote{In the past you would use this setting
4903 and set @code{mail-citation-hook} to @samp{supercite}, but this usage
4904 is now deprecated in favor of the @samp{Invoke supercite} setting.}.
4905 Use @samp{Body} to yank just the body without the header. To yank only
4906 the portion of the message following the point, set this option to
4907 @samp{Below Point}.
4908
4909 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a
4910 full-bodied, full-featured, citation package that comes standard with
4911 Emacs.} to pass the entire message and header through supercite.
4912
4913 @vindex mh-extract-from-attribution-verb
4914
4915 If the @samp{Body With Attribution} setting is used, then the message
4916 minus the header is yanked and a simple attribution line is added at
4917 the top using the value of the option
4918 @code{mh-extract-from-attribution-verb}. This is the default.
4919
4920 @kindex C-c C-y
4921 @vindex mh-delete-yanked-msg-window-flag
4922
4923 If the @samp{Invoke supercite} or @samp{Body With Attribution}
4924 settings are used, the @samp{-noformat} argument is passed to the
4925 @command{repl} program to override a @samp{-filter} or @samp{-format}
4926 argument. These settings also have @samp{Automatically} variants that
4927 perform the action automatically when you reply so that you don't need
4928 to use @kbd{C-c C-y} at all. Note that this automatic action is only
4929 performed if the show buffer matches the message being replied to.
4930 People who use the automatic variants tend to turn on the option
4931 @code{mh-delete-yanked-msg-window-flag} as well so that the show
4932 window is never displayed.
4933
4934 @vindex mh-yank-behavior
4935
4936 If the show buffer has a region, the option @code{mh-yank-behavior} is
4937 ignored unless its value is one of @samp{Attribution} variants in
4938 which case the attribution is added to the yanked region.
4939
4940 @findex trivial-cite
4941 @vindex mail-citation-hook
4942 @vindex mh-ins-buf-prefix
4943 @vindex mh-yank-behavior
4944
4945 If this isn't enough, you can gain full control over the appearance of
4946 the included text by setting @code{mail-citation-hook} to a function
4947 that modifies it. This hook is ignored if the option
4948 @code{mh-yank-behavior} is set to one of the supercite flavors.
4949 Otherwise, this option controls how much of the message is passed to
4950 the hook. The function can find the citation between point and mark
4951 and it should leave point and mark around the modified citation text
4952 for the next hook function. The standard prefix
4953 @code{mh-ins-buf-prefix} is not added if this hook is set.
4954
4955 @cindex Emacs, packages, trivial-cite
4956 @cindex trivial-cite package
4957 @vindex mh-yank-behavior
4958
4959 For example, if you use the hook function
4960 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
4961 @code{trivial-cite}} (which is NOT part of Emacs), set
4962 @code{mh-yank-behavior} to @samp{Body and Header}.
4963
4964 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts
4965 @section Inserting Messages
4966
4967 @cindex inserting messages
4968 @findex mh-insert-letter
4969 @findex mh-yank-behavior
4970 @kindex C-c C-i
4971 @vindex mh-ins-buf-prefix
4972 @vindex mh-invisible-header-fields-compiled
4973 @vindex mh-yank-behavior
4974
4975 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
4976 This command prompts you for the folder and message number, which
4977 defaults to the current message in that folder. It then inserts the
4978 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless
4979 @code{mh-yank-behavior} is set to one of the supercite flavors in
4980 which case supercite is used to format the message. Certain
4981 undesirable header fields (see
4982 @code{mh-invisible-header-fields-compiled}) are removed before
4983 insertion.
4984
4985 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is
4986 left intact, the message is not indented, and @samp{> } is not
4987 inserted before each line. This command leaves the mark before the
4988 letter and point after it.
4989
4990 @node Signature, Picture, Inserting Messages, Editing Drafts
4991 @section Inserting Your Signature
4992
4993 @cindex signature
4994 @findex mh-insert-signature
4995 @kindex C-c C-s
4996
4997 You can insert your signature at the current cursor location with the
4998 command @kbd{C-c C-s} (@code{mh-insert-signature}).
4999
5000 @cindex files, @file{.signature}
5001 @cindex @file{.signature}
5002 @cindex vCard
5003 @vindex mh-signature-file-name
5004
5005 By default, the text of your signature is taken from the file
5006 @file{~/.signature}. You can read from other sources by changing the
5007 option @code{mh-signature-file-name}. This file may contain a
5008 @dfn{vCard} in which case an attachment is added with the vCard.
5009
5010 @findex mh-signature-separator-p
5011 @vindex mh-signature-file-name
5012 @vindex mh-signature-separator
5013 @vindex mh-signature-separator-regexp
5014
5015 The option @code{mh-signature-file-name} may also be a symbol, in
5016 which case that function is called. You may not want a signature
5017 separator to be added for you; instead you may want to insert one
5018 yourself. Options that you may find useful to do this include
5019 @code{mh-signature-separator} (when inserting a signature separator)
5020 and @code{mh-signature-separator-regexp} (for finding said separator).
5021 The function @code{mh-signature-separator-p}, which reports @code{t}
5022 if the buffer contains a separator, may be useful as well.
5023
5024 @cindex signature separator
5025 @vindex mh-signature-separator-flag
5026
5027 A signature separator (@code{"-- "}) will be added if the signature
5028 block does not contain one and @code{mh-signature-separator-flag} is
5029 on. It is not recommended that you change this option since various
5030 mail user agents, including MH-E, use the separator to present the
5031 signature differently, and to suppress the signature when replying or
5032 yanking a letter into a draft.
5033
5034 @vindex mh-insert-signature-hook
5035 @vindex mh-signature-file-name
5036
5037 The hook @code{mh-insert-signature-hook} is run after the signature is
5038 inserted. Hook functions may access the actual name of the file or the
5039 function used to insert the signature with
5040 @code{mh-signature-file-name}.
5041
5042 The signature can also be inserted using Identities.
5043 @xref{Identities}.
5044
5045 @node Picture, Adding Attachments, Signature, Editing Drafts
5046 @section Inserting Your Picture
5047
5048 @cindex @file{.face}
5049 @cindex files, @file{.face}
5050 @vindex mh-x-face-file
5051
5052 You can insert your picture in the header of your mail message so that
5053 recipients see your face in the @samp{From:} header field if their
5054 mail user agent is sophisticated enough. In MH-E, this is done by
5055 placing your image in the file named by the option
5056 @code{mh-x-face-file} which is @file{~/.face} by default.
5057
5058 @cindex @samp{Face:} header field
5059 @cindex @samp{X-Face:} header field
5060 @cindex @samp{X-Image-URL:} header field
5061 @cindex header field, @samp{Face:}
5062 @cindex header field, @samp{X-Face:}
5063 @cindex header field, @samp{X-Image-URL:}
5064
5065 If the file starts with either of the strings @samp{X-Face:},
5066 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the
5067 message header verbatim. Otherwise it is assumed that the file
5068 contains the value of the @samp{X-Face:} header field.
5069
5070 @cindex @command{compface}
5071 @cindex Unix commands, @command{compface}
5072
5073 The @samp{X-Face:} header field, which is a low-resolution, black and
5074 white image, can be generated using the
5075 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
5076 @command{compface}} command. The @uref{http://www.dairiki.org/xface/,
5077 @cite{Online X-Face Converter}} is a useful resource for quick
5078 conversion of images into @samp{X-Face:} header fields.
5079
5080 Use the @uref{http://quimby.gnus.org/circus/face/make-face,
5081 @command{make-face}} script to convert a JPEG image to the higher
5082 resolution, color, @samp{Face:} header field.
5083
5084 The URL of any image can be used for the @samp{X-Image-URL:} field and
5085 no processing of the image is required.
5086
5087 @vindex mh-x-face-file
5088
5089 To prevent the setting of any of these header fields, either set
5090 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file
5091 defined by this option doesn't exist.
5092
5093 @xref{Viewing}, to see how these header fields are displayed in MH-E.
5094
5095 @node Adding Attachments, Sending PGP, Picture, Editing Drafts
5096 @section Adding Attachments
5097
5098 @cindex @command{mhbuild}
5099 @cindex @command{mhn}
5100 @cindex MH commands, @command{mhbuild}
5101 @cindex MH commands, @command{mhn}
5102 @cindex MIME
5103 @cindex multimedia mail
5104
5105 MH-E has the capability to create multimedia messages. It uses the
5106 @sc{mime} (Multipurpose Internet Mail Extensions)
5107 protocol@footnote{@sc{mime} is defined in
5108 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The
5109 @sc{mime} protocol allows you to incorporate images, sound, video,
5110 binary files, and even commands that fetch a file with @samp{ftp} when
5111 your recipient reads the message!
5112
5113 @kindex C-c C-m
5114
5115 If you were to create a multimedia message with plain MH commands, you
5116 would insert @command{mhbuild} or @command{mhn} directives (henceforth
5117 called @dfn{MH-style directives} into your draft and use the
5118 @command{mhbuild} command in nmh or @command{mhn} command in MH and
5119 GNU mailutils to expand them. MH-E works in much the same way,
5120 although it provides a handful of commands prefixed with @kbd{C-c C-m}
5121 to insert the directives so you don't need to remember the syntax of
5122 them. Remember: you can always add MH-style directives by
5123 hand@footnote{See the section
5124 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5125 the MH book.}.
5126
5127 @cindex MIME Meta Language (MML)
5128 @cindex MML
5129 @vindex mh-compose-insertion
5130
5131 In addition to MH-style directives, MH-E also supports MML (@sc{mime}
5132 Meta Language) tags@footnote{
5133 @ifinfo
5134 @c Although the third argument should default to the
5135 @c first, makeinfo goes to the wrong Info file without it being
5136 @c different--it seems to be getting our own Composing node.
5137 @xref{Composing,,Composing with MML,emacs-mime}.
5138 @end ifinfo
5139 @ifnotinfo
5140 See the section Composing in
5141 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME
5142 Manual}}.
5143 @end ifnotinfo
5144 }. The option @code{mh-compose-insertion} can be used to choose
5145 between them. By default, this option is set to @samp{MML} if it is
5146 supported since it provides a lot more functionality. This option can
5147 also be set to @samp{MH} if MH-style directives are preferred.
5148
5149 @cindex media types
5150 @cindex MIME, media types
5151
5152 The MH-E @sc{mime} commands require a @dfn{media type} for each body
5153 part or attachment. For example, a PDF document is of type
5154 @samp{application/pdf} and an HTML document is of type
5155 @samp{text/html}. Some commands fill in the media type for you,
5156 whereas others require you to enter one.
5157
5158 @cindex @command{file}
5159 @cindex @file{/etc/mime.types}
5160 @cindex files, @file{/etc/mime.types}
5161 @cindex Unix commands, @command{file}
5162 @findex mailcap-mime-types
5163
5164 In the cases where MH-E can do so, it will determine the media type
5165 automatically. It uses the @command{file} command to do this. Failing
5166 that, the Emacs function @code{mailcap-mime-types} is used to provide
5167 a list from which to choose. This function usually reads the file
5168 @file{/etc/mime.types}.
5169
5170 Whether the media type is chosen automatically, or you choose it from
5171 a list, use the type that seems to match best the file that you are
5172 including. In the case of binaries, the media type
5173 @samp{application/x-executable} can be useful. If you can't find an
5174 appropriate media type, use @samp{text/plain} for text messages and
5175 @samp{application/octet-stream} for everything else.
5176
5177 @cindex content description
5178 @cindex MIME, content description
5179
5180 You are also sometimes asked for a @dfn{content description}. This is
5181 simply an optional brief phrase, in your own words, that describes the
5182 object. If you don't care to enter a content description, just press
5183 return and none will be included; however, a reader may skip over
5184 multimedia fields unless the content description is compelling.
5185
5186 You can also create your own @sc{mime} body parts. In the following
5187 example, I describe how you can create and edit a @samp{text/enriched}
5188 body part to liven up your plain text messages with boldface,
5189 underlining, and italics. I include an Emacs function which inserts
5190 enriched text tags.
5191
5192 @smalllisp
5193 @group
5194 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic")
5195 ("u" . "underline")
5196 ("s" . "smaller") ("B" . "bigger")
5197 ("f" . "fixed")
5198 ("c" . "center"))
5199 "Alist of (final-character . tag) choices for add-enriched-text.
5200 Additional types can be found in RFC 1563.")
5201
5202 (defun add-enriched-text (begin end)
5203 "Add enriched text tags around region.
5204 The tag used comes from the list enriched-text-types and is
5205 specified by the last keystroke of the command. When called from Lisp,
5206 arguments are BEGIN and END@."
5207 (interactive "r")
5208 ;; @r{Set type to the tag indicated by the last keystroke.}
5209 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`}))
5210 enriched-text-types))))
5211 (save-restriction ; @r{restores state from narrow-to-region}
5212 (narrow-to-region begin end) ; @r{narrow view to region}
5213 (goto-char (point-min)) ; @r{move to beginning of text}
5214 (insert "<" type ">") ; @r{insert beginning tag}
5215 (goto-char (point-max)) ; @r{move to end of text}
5216 (insert "</" type ">")))) ; @r{insert terminating tag}
5217 @i{Emacs function for entering enriched text}
5218
5219 @end group
5220 @end smalllisp
5221
5222 To use the function @code{add-enriched-text}, first add it to
5223 @file{~/.emacs} and create key bindings for it (@pxref{Composing}).
5224
5225 Then, in your plain text message, set the mark with @kbd{C-@@} or
5226 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t
5227 b}. This adds @samp{<bold>} where you set the mark and adds
5228 @samp{</bold>} at the location of your cursor, giving you something
5229 like: @samp{You should be <bold>very</bold>}.
5230
5231 Before sending this message, use @kbd{C-c C-m C-m}
5232 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e}
5233 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add
5234 MIME header fields. Then replace @samp{text/plain} with
5235 @samp{text/enriched} in the @samp{Content-Type:} header field.
5236
5237 You may also be interested in investigating @code{sgml-mode}.
5238
5239 @subheading Including Files
5240
5241 @cindex attachments, inserting
5242 @cindex images
5243 @cindex MIME, images
5244 @cindex MIME, sound
5245 @cindex MIME, video
5246 @cindex sound
5247 @cindex video
5248 @findex mh-compose-insertion
5249 @kindex C-c C-m C-i
5250 @kindex C-c C-m i
5251 @vindex mh-compose-insertion
5252
5253 Binaries, images, sound, and video can be inserted in your message
5254 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You
5255 are prompted for the filename containing the object, the media type if
5256 it cannot be determined automatically, and a content description. If
5257 you're using MH-style directives, you will also be prompted for
5258 additional attributes.
5259
5260 @subheading Forwarding Multimedia Messages
5261
5262 @findex mh-compose-forward
5263 @kindex C-c C-m C-f
5264 @kindex C-c C-m f
5265
5266 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m
5267 C-f} (@code{mh-compose-forward}). You are prompted for a content
5268 description, the name of the folder in which the messages to forward
5269 are located, and a range of messages, which defaults to the current
5270 message in that folder. @xref{Ranges}.
5271
5272 @subheading Including an FTP Reference
5273
5274 @cindex @command{ftp}
5275 @cindex MIME, @command{ftp}
5276 @cindex Unix commands, @command{ftp}
5277 @findex mh-mh-compose-anon-ftp
5278 @kindex C-c C-m C-g
5279 @kindex C-c C-m g
5280
5281 You can have your message initiate an @command{ftp} transfer when the
5282 recipient reads the message. To do this, use the command @kbd{C-c C-m
5283 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote
5284 host and filename, the media type, and the content description.
5285
5286 @subheading Including tar Files
5287
5288 @cindex @command{ftp}
5289 @cindex @command{tar}
5290 @cindex MIME, @command{ftp}
5291 @cindex MIME, @command{tar}
5292 @cindex Unix commands, @command{ftp}
5293 @cindex Unix commands, @command{tar}
5294 @findex mh-mh-compose-anon-ftp
5295 @findex mh-mh-compose-external-compressed-tar
5296 @kindex C-c C-m C-g
5297 @kindex C-c C-m C-t
5298 @kindex C-c C-m t
5299
5300 If the remote file is a compressed tar file, you can use @kbd{C-c C-m
5301 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition
5302 to retrieving the file via anonymous @emph{ftp} as per the command
5303 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also
5304 be uncompressed and untarred. You are prompted for the remote host and
5305 filename and the content description.
5306
5307 @subheading Including Other External Files
5308
5309 @findex mh-mh-compose-external-type
5310 @kindex C-c C-m C-x
5311 @kindex C-c C-m x
5312
5313 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is
5314 a general utility for referencing external files. In fact, all of the
5315 other commands that insert tags to access external files call this
5316 command. You are prompted for the access type, remote host and
5317 filename, and content type. If you provide a prefix argument, you are
5318 also prompted for a content description, attributes, parameters, and a
5319 comment.
5320
5321 @subheading Previewing Multimedia Messages
5322
5323 When you are finished editing a @sc{mime} message, it might look like this:
5324
5325 @cartouche
5326 @smallexample
5327 3 t08/24 root received fax files on Wed Aug 24 11:00:
5328 4+t08/24 To:wohler Test<<This is a test message to get the
5329
5330
5331
5332
5333
5334 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------------
5335 To: wohler
5336 cc:
5337 Subject: Test of MIME
5338 --------
5339 Here is the SETI@@Home logo:
5340
5341 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm"
5342 disposition=inline description="SETI@@home logo">
5343 <#/part>
5344 --:** @{draft@} All L8 (MH-Letter)----------------------------------
5345
5346 @end smallexample
5347 @end cartouche
5348 @i{MH-E @sc{mime} draft}
5349
5350 @findex mh-mml-to-mime
5351 @kindex C-c C-m C-m
5352 @kindex C-c C-m m
5353
5354 Typically, you send a message with attachments just like any other
5355 message (@pxref{Sending Message}).
5356
5357 @findex mh-mml-to-mime
5358 @kindex C-c C-m C-m
5359
5360 However, you may take a sneak preview of the @sc{mime} encoding if you
5361 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}).
5362 The following screen shows the @sc{mime} encoding specified by the
5363 tags. You can see why mail user agents are usually built to hide these
5364 details from the user.
5365
5366 @cartouche
5367 @smallexample
5368 To: wohler
5369 cc:
5370 Subject: Test of MIME
5371 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
5372 MIME-Version: 1.0
5373 Content-Type: multipart/mixed; boundary="=-=-="
5374 --------
5375 --=-=-=
5376
5377 Here is the SETI@@Home logo:
5378
5379
5380 --=-=-=
5381 Content-Type: image/x-xpm
5382 Content-Disposition: inline; filename=setiathome.xpm
5383 Content-Transfer-Encoding: base64
5384 Content-Description: SETI@@home logo
5385
5386 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N
5387 --:-- @{draft@} Top L1 (MH-Letter)----------------------------------
5388
5389 @end smallexample
5390 @end cartouche
5391 @i{MH-E @sc{mime} draft ready to send}
5392
5393 @cindex undo effects of mh-mml-to-mime
5394
5395 This action can be undone by running @kbd{C-_} (@code{undo}).
5396
5397 @cindex @command{mhbuild}
5398 @cindex @command{mhn}
5399 @cindex MH commands, @command{mhbuild}
5400 @cindex MH commands, @command{mhn}
5401 @cindex undo effects of mh-mh-to-mime
5402 @findex mh-mh-to-mime
5403 @findex mh-mh-to-mime-undo
5404 @kindex C-c C-e
5405 @kindex C-c C-m C-m
5406 @kindex C-c C-m C-u
5407 @kindex C-c C-m u
5408
5409 If you're using MH-style directives, use @kbd{C-c C-e}
5410 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the
5411 command @command{mhbuild} (@command{mhn}) on the message which expands
5412 the tags@footnote{See the section
5413 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5414 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u}
5415 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup
5416 file. You are prompted to confirm this action, but you can avoid the
5417 confirmation by adding an argument (for example, @kbd{C-u C-c C-m
5418 C-u}).
5419
5420 @kindex C-c C-e
5421 @vindex mh-mh-to-mime-args
5422
5423 If you wish to pass additional arguments to @command{mhbuild}
5424 (@command{mhn}) to affect how it builds your message, use the option
5425 @code{mh-mh-to-mime-args}. For example, you can build a consistency
5426 check into the message by setting @code{mh-mh-to-mime-args} to
5427 @samp{-check}. The recipient of your message can then run
5428 @samp{mhbuild -check} on the message---@command{mhbuild}
5429 (@command{mhn}) will complain if the message has been corrupted on the
5430 way. The command @kbd{C-c C-e} only consults this option when given a
5431 prefix argument (as in @kbd{C-u C-c C-e}).
5432
5433 @kindex C-c C-e
5434 @vindex mh-mh-to-mime-hook
5435
5436 The hook @code{mh-mh-to-mime-hook} is called after the message has
5437 been formatted by @kbd{C-c C-e}.
5438
5439 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts
5440 @section Signing and Encrypting Messages
5441
5442 @cindex signing messages
5443 @cindex encrypting messages
5444 @cindex RFC 3156
5445
5446 MH-E can sign and encrypt messages as defined in
5447 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you
5448 should choose to sign or encrypt your message, use one of the
5449 following commands to do so any time before sending your message.
5450
5451 @findex mh-mml-secure-message-encrypt
5452 @findex mh-mml-secure-message-sign
5453 @findex mh-mml-secure-message-signencrypt
5454 @kindex C-c C-m C-e
5455 @kindex C-c C-m C-s
5456 @kindex C-c C-m e e
5457 @kindex C-c C-m e s
5458 @kindex C-c C-m s e
5459 @kindex C-c C-m s s
5460
5461 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign})
5462 inserts the following tag:
5463
5464 @smallexample
5465 <#secure method=pgpmime mode=sign>
5466 @end smallexample
5467
5468 This is used to sign your message digitally. Likewise, the command
5469 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the
5470 following tag:
5471
5472 @smallexample
5473 <#secure method=pgpmime mode=encrypt>
5474 @end smallexample
5475
5476 This is used to encrypt your message. Finally, the command @kbd{C-c
5477 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the
5478 following tag:
5479
5480 @smallexample
5481 <#secure method=pgpmime mode=signencrypt>
5482 @end smallexample
5483
5484 @findex mh-mml-unsecure-message
5485 @kindex C-c C-m C-n
5486 @kindex C-c C-m n
5487 @vindex mh-mml-method-default
5488
5489 This is used to sign and encrypt your message. In each of these cases,
5490 a proper multipart message is created for you when you send the
5491 message. Use the command @kbd{C-c C-m C-n}
5492 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix
5493 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the
5494 possible security methods (see @code{mh-mml-method-default}).
5495
5496 @vindex mh-mml-method-default
5497
5498 The option @code{mh-mml-method-default} is used to select between a
5499 variety of mail security mechanisms. The default is @samp{PGP (MIME)}
5500 if it is supported; otherwise, the default is @samp{None}. Other
5501 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}.
5502
5503 @cindex @samp{pgg} customization group
5504 @cindex PGG
5505 @cindex customization group, @samp{pgg}
5506
5507 The @samp{pgg} customization group may have some settings which may
5508 interest you.
5509 @iftex
5510 See @cite{The PGG Manual}.
5511 @end iftex
5512 @ifinfo
5513 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
5514 @end ifinfo
5515 @ifhtml
5516 See
5517 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
5518 @cite{The PGG Manual}}.
5519 @end ifhtml
5520
5521 @cindex header field, @samp{Fcc:}
5522 @cindex @samp{Fcc:} header field
5523 @vindex pgg-encrypt-for-me
5524
5525 In particular, I turn on the option @code{pgg-encrypt-for-me} so that
5526 all messages I encrypt are encrypted with my public key as well. If
5527 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header
5528 field, this setting is vital so that you can read the mail you write!
5529
5530 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts
5531 @section Checking Recipients
5532
5533 @cindex @samp{*MH-E Recipients*}
5534 @cindex @command{whom}
5535 @cindex MH commands, @command{whom}
5536 @cindex buffers, @samp{*MH-E Recipients*}
5537 @cindex checking recipients
5538 @cindex recipients, checking
5539 @findex mh-check-whom
5540 @kindex C-c C-w
5541
5542 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so
5543 you can check the actual address(es) in the alias. A new buffer named
5544 @samp{*MH-E Recipients*} is created with the output of @command{whom}
5545 (@pxref{Miscellaneous})@footnote{See the section
5546 @uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the
5547 whatnow Program} in the MH book.}.
5548
5549 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
5550 @section Sending a Message
5551
5552 @cindex buffers, @samp{*MH-E Mail Delivery*}
5553 @cindex @samp{*MH-E Mail Delivery*}
5554 @cindex sending mail
5555 @findex mh-send-letter
5556 @kindex C-c C-c
5557
5558 When you are all through editing a message, you send it with the
5559 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix
5560 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the
5561 delivery; this output can be found in a buffer called @samp{*MH-E Mail
5562 Delivery*} (@pxref{Miscellaneous}).
5563
5564 @cindex sending mail
5565 @cindex spell check
5566 @findex ispell-message
5567 @kindex C-c C-c
5568 @vindex mh-before-send-letter-hook
5569
5570 The hook @code{mh-before-send-letter-hook} is run at the beginning of
5571 the command @kbd{C-c C-c}. For example, if you want to check your
5572 spelling in your message before sending, add the function
5573 @code{ispell-message}.
5574
5575 @cindex @command{send}
5576 @cindex MH commands, @command{send}
5577 @vindex mh-send-prog
5578
5579 In case the MH @command{send} program@footnote{See the section
5580 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
5581 in the MH book.} is installed under a different name, use
5582 @code{mh-send-prog} to tell MH-E the name.
5583
5584 @node Killing Draft, , Sending Message, Editing Drafts
5585 @section Killing the Draft
5586
5587 @cindex killing draft
5588 @findex kill-buffer
5589 @findex mh-fully-kill-draft
5590 @kindex C-c C-q
5591 @kindex C-x k
5592
5593 If for some reason you are not happy with the draft, you can use the
5594 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft
5595 buffer and delete the draft message. Use the command @kbd{C-x k}
5596 (@code{kill-buffer}) if you don't want to delete the draft message.
5597
5598 @node Aliases, Identities, Editing Drafts, Top
5599 @chapter Aliases
5600
5601 @cindex aliases
5602
5603 MH aliases are used in the same way in MH-E as they are in MH. Any
5604 alias listed as a recipient will be expanded when the message is sent.
5605 This chapter discusses other things you can do with aliases in MH-E.
5606
5607 @cindex MH-Letter mode
5608 @cindex modes, MH-Letter
5609
5610 The following commands are available in MH-Letter mode with the
5611 exception of @code{mh-alias-reload} which can be called from anywhere.
5612
5613 @table @kbd
5614 @kindex @key{SPC}
5615 @findex mh-letter-complete-or-space
5616 @item @key{SPC}
5617 Perform completion or insert space (@code{mh-letter-complete-or-space}).
5618 @c -------------------------
5619 @kindex M-@key{TAB}
5620 @findex mh-letter-complete
5621 @item M-@key{TAB}
5622 Perform completion on header field or word preceding point
5623 (@code{mh-letter-complete}).
5624 @c -------------------------
5625 @findex mh-alias-apropos
5626 @item mh-alias-apropos
5627 Show all aliases or addresses that match a regular expression.
5628 @c -------------------------
5629 @findex mh-alias-grab-from-field
5630 @item mh-alias-grab-from-field
5631 Add alias for the sender of the current message
5632 @c -------------------------
5633 @findex mh-alias-reload
5634 @item mh-alias-reload
5635 Reload MH aliases.
5636 @end table
5637
5638 @cindex @samp{mh-alias} customization group
5639 @cindex customization group, @samp{mh-alias}
5640
5641 The @samp{mh-alias} customization group contains options associated
5642 with aliases.
5643
5644 @vtable @code
5645 @item mh-alias-completion-ignore-case-flag
5646 On means don't consider case significant in MH alias completion
5647 (default: @samp{on}).
5648 @c -------------------------
5649 @item mh-alias-expand-aliases-flag
5650 On means to expand aliases entered in the minibuffer (default:
5651 @samp{off}).
5652 @c -------------------------
5653 @item mh-alias-flash-on-comma
5654 Specify whether to flash address or warn on translation (default: @samp{Flash
5655 but Don't Warn If No Alias}).
5656 @c -------------------------
5657 @item mh-alias-insert-file
5658 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile
5659 Profile Component}).
5660 @c -------------------------
5661 @item mh-alias-insertion-location
5662 Specifies where new aliases are entered in alias files (default:
5663 @samp{Alphabetical}).
5664 @c -------------------------
5665 @item mh-alias-local-users
5666 If @samp{on}, local users are added to alias completion (default:
5667 @samp{on}).
5668 @c -------------------------
5669 @item mh-alias-local-users-prefix
5670 String prefixed to the real names of users from the password file
5671 (default: @code{"local."}.
5672 @c -------------------------
5673 @item mh-alias-passwd-gecos-comma-separator-flag
5674 On means the GECOS field in the password file uses a comma separator
5675 (default: @samp{on}).
5676 @end vtable
5677
5678 The following hook is available.
5679
5680 @vtable @code
5681 @item mh-alias-reloaded-hook
5682 Hook run by @code{mh-alias-reload} after loading aliases (default:
5683 @code{nil}).
5684 @end vtable
5685
5686 @subheading Adding Addresses to Draft
5687
5688 You can use aliases when you are adding recipients to a message.
5689
5690 @findex minibuffer-complete
5691 @kindex @key{TAB}
5692 @vindex mh-alias-expand-aliases-flag
5693 @vindex mh-compose-prompt-flag
5694
5695 In order to use minibuffer prompting for recipients and the subject
5696 line in the minibuffer, turn on the option
5697 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the
5698 @key{TAB} (@code{minibuffer-complete}) command to complete aliases
5699 (and optionally local logins) when prompted for the recipients. Turn
5700 on the option @code{mh-alias-expand-aliases-flag} if you want these
5701 aliases to be expanded to their respective addresses in the draft.
5702
5703 @findex mh-letter-complete
5704 @findex mh-letter-complete-or-space
5705 @kindex @key{SPC}
5706 @kindex M-@key{TAB}
5707
5708 Otherwise, you can complete aliases in the header of the draft with
5709 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC}
5710 (@code{mh-letter-complete-or-space}).
5711
5712 @vindex mh-alias-completion-ignore-case-flag
5713
5714 As MH ignores case in the aliases, so too does MH-E. However, you may
5715 turn off the option @code{mh-alias-completion-ignore-case-flag} to
5716 make case significant which can be used to segregate completion of
5717 your aliases. You might use uppercase for mailing lists and lowercase
5718 for people. For example, you might have:
5719
5720 @smallexample
5721 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org>
5722 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org>
5723 @end smallexample
5724
5725 When this option is turned off, if you were to type @kbd{M} in the
5726 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list;
5727 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then
5728 you'd get Mark's address. Note that this option affects completion
5729 only. If you were to enter @kbd{Mark.Baushke}, it would still be
5730 identified with your @samp{mark.baushke} alias.
5731
5732 @findex mh-alias-minibuffer-confirm-address
5733 @findex mh-letter-confirm-address
5734 @vindex mh-alias-flash-on-comma
5735 @vindex mh-compose-prompt-flag
5736
5737 To verify that the alias you've entered is valid, the alias will be
5738 displayed in the minibuffer when you type a comma
5739 (@code{mh-letter-confirm-address} or
5740 @code{mh-alias-minibuffer-confirm-address} if the option
5741 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This
5742 behavior can be controlled with the option
5743 @code{mh-alias-flash-on-comma} which provides three choices:
5744 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No
5745 Alias}, and @samp{Don't Flash Nor Warn If No Alias}.
5746
5747 For another way to verify the alias expansion, see @ref{Checking
5748 Recipients}.
5749
5750 @subheading Loading Aliases
5751
5752 @cindex @command{ali}
5753 @cindex @file{/etc/nmh/MailAliases}
5754 @cindex @samp{Aliasfile:} MH profile component
5755 @cindex MH commands, @command{ali}
5756 @cindex MH profile component, @samp{Aliasfile:}
5757 @cindex files, @file{/etc/nmh/MailAliases}
5758
5759 MH-E loads aliases for completion and folder name hints from various
5760 places. It uses the MH command @command{ali}@footnote{See the section
5761 @uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to
5762 read aliases from the files listed in the profile component
5763 @samp{Aliasfile:} as well as system-wide aliases (for example,
5764 @file{/etc/nmh/MailAliases}).
5765
5766 @cindex @file{/etc/passwd}
5767 @cindex files, @file{/etc/passwd}
5768
5769 In addition, aliases are created from @file{/etc/passwd} entries with
5770 a user ID larger than a magical number, typically 200. This can be a
5771 handy tool on a machine where you and co-workers exchange messages.
5772 These aliases have the form @samp{local.@var{first.last}} if a real
5773 name is present in the password file. Otherwise, the alias will have
5774 the form @samp{local.@var{login}}.
5775
5776 @vindex mh-alias-local-users-prefix
5777
5778 The prefix @samp{local.} can be modified via the option
5779 @code{mh-alias-local-users-prefix}. This option can also be set to
5780 @samp{Use Login}.
5781
5782 For example, consider the following password file entry:
5783
5784 @smallexample
5785 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
5786 @end smallexample
5787
5788 @vindex mh-alias-local-users-prefix
5789
5790 The following settings of option @code{mh-alias-local-users-prefix}
5791 will produce the associated aliases:
5792
5793 @table @code
5794 @item "local."
5795 local.peter.galbraith
5796 @c -------------------------
5797 @item ""
5798 peter.galbraith
5799 @c -------------------------
5800 @item Use Login
5801 psg
5802 @end table
5803
5804 @vindex mh-alias-passwd-gecos-comma-separator-flag
5805
5806 In the example above, commas are used to separate different values
5807 within the so-called GECOS field. This is a fairly common usage.
5808 However, in the rare case that the GECOS field in your password file
5809 is not separated by commas and whose contents may contain commas, you
5810 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag}
5811 off.
5812
5813 @cindex NIS, obtaining local aliases from
5814 @cindex @samp{ypcat passwd}
5815 @vindex mh-alias-local-users
5816
5817 If you're on a system with thousands of users you don't know, and the
5818 loading of local aliases slows MH-E down noticeably, then the local
5819 alias feature can be disabled by turning off the option
5820 @code{mh-alias-local-users}. This option also takes a string which is
5821 executed to generate the password file. For example, use @samp{ypcat
5822 passwd} to obtain the NIS password file.
5823
5824 @findex mh-alias-reload
5825 @kindex M-x mh-alias-reload
5826 @vindex mh-alias-reloaded-hook
5827
5828 Since aliases are updated frequently, MH-E reloads aliases
5829 automatically whenever an alias lookup occurs if an alias source has
5830 changed. However, you can reload your aliases manually by calling the
5831 command @kbd{M-x mh-alias-reload} directly. This command runs
5832 @code{mh-alias-reloaded-hook} after the aliases have been loaded.
5833
5834 @subheading Adding Aliases
5835
5836 In the past, you have manually added aliases to your alias file(s)
5837 listed in your @samp{Aliasfile:} profile component. MH-E provides
5838 other methods for maintaining your alias file(s).
5839
5840 @findex mh-alias-add-alias
5841 @kindex M-x mh-alias-add-alias
5842
5843 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt
5844 you for the alias and address that you would like to add. If the alias
5845 exists already, you will have the choice of inserting the new alias
5846 before or after the old alias. In the former case, this alias will be
5847 used when sending mail to this alias. In the latter case, the alias
5848 serves as an additional folder name hint when filing messages
5849 (@pxref{Folder Selection}).
5850
5851 Earlier, the alias prefix @samp{local} was presented. You can use
5852 other prefixes to organize your aliases or disambiguate entries. You
5853 might use prefixes for locales, jobs, or activities. For example, I
5854 have:
5855
5856 @smallexample
5857 @group
5858 ; Work
5859 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com>
5860 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com>
5861 ...
5862 ; Sport
5863 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com>
5864 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com>
5865 ...
5866 ; Personal
5867 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com>
5868 ...
5869 @end group
5870 @end smallexample
5871
5872 Using prefixes instead of postfixes helps you explore aliases during
5873 completion. If you forget the name of an old dive buddy, you can enter
5874 @samp{div} and then @key{SPC} to get a listing of all your dive buddies.
5875
5876 @kindex M-x mh-alias-add-address-under-point
5877 @kindex M-x mh-alias-grab-from-field
5878
5879 An alias for the sender of the current message is added automatically
5880 by clicking on the @samp{Grab From alias} tool bar button or by running
5881 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other
5882 recipients of the current message are added by placing your cursor
5883 over the desired recipient and giving the @kbd{M-x
5884 mh-alias-add-address-under-point} command.
5885
5886 @vindex mh-alias-insert-file
5887 @vindex mh-alias-insertion-location
5888
5889 The options @code{mh-alias-insert-file} and
5890 @code{mh-alias-insertion-location} controls how and where these aliases
5891 are inserted.
5892
5893 @vindex mh-alias-insert-file
5894
5895 The default setting of option @code{mh-alias-insert-file} is @samp{Use
5896 Aliasfile Profile Component}. This option can also hold the name of a
5897 file or a list a file names. If this option is set to a list of file
5898 names, or the @samp{Aliasfile:} profile component contains more than
5899 one file name, MH-E will prompt for one of them.
5900
5901 @vindex mh-alias-insertion-location
5902
5903 The option @code{mh-alias-insertion-location} is set to
5904 @samp{Alphabetical} by default. If you organize your alias file in
5905 other ways, then the settings @samp{Top} and @samp{Bottom} might be
5906 more appropriate.
5907
5908 @subheading Querying Aliases
5909
5910 @cindex regular expressions, @code{mh-alias-apropos}
5911 @findex mh-alias-apropos
5912 @kindex M-x mh-alias-apropos
5913
5914 If you can't quite remember an alias, you can use @kbd{M-x
5915 mh-alias-apropos} to show all aliases or addresses that match a
5916 regular expression
5917 @ifnothtml
5918 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
5919 GNU Emacs Manual}).
5920 @end ifnothtml
5921 @ifhtml
5922 (see the section
5923 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
5924 Syntax of Regular Expressions} in
5925 @cite{The GNU Emacs Manual}).
5926 @end ifhtml
5927
5928 @node Identities, Speedbar, Aliases, Top
5929 @chapter Identities
5930
5931 @cindex identities
5932 @cindex multiple personalities
5933
5934 MH-E supports the concept of multiple personalities or identities.
5935 This means that you can easily have a different header and signature
5936 at home and at work.
5937
5938 @cindex @samp{Identity} menu
5939 @cindex menu, @samp{Identity}
5940
5941 A couple of commands are used to insert identities in MH-Letter mode
5942 which are also found in the @samp{Identity} menu.
5943
5944 @table @kbd
5945 @kindex C-c C-d
5946 @findex mh-insert-identity
5947 @item C-c C-d
5948 Insert fields specified by given identity (@code{mh-insert-identity}).
5949 @c -------------------------
5950 @cindex @samp{Identity > Insert Auto Fields} menu item
5951 @cindex menu item, @samp{Identity > Insert Auto Fields}
5952 @kindex C-c M-d
5953 @findex mh-insert-auto-fields
5954 @item C-c M-d
5955 Insert custom fields if recipient found in @code{mh-auto-fields-list}
5956 (@code{mh-insert-auto-fields}).
5957 @end table
5958
5959 @cindex @samp{mh-identity} customization group
5960 @cindex customization group, @samp{mh-identity}
5961
5962 The @samp{mh-identity} customization group contains the following
5963 options.
5964
5965 @vtable @code
5966 @item mh-auto-fields-list
5967 List of recipients for which header lines are automatically inserted
5968 (default: @code{nil}).
5969 @c -------------------------
5970 @item mh-auto-fields-prompt-flag
5971 On means to prompt before sending if fields inserted (default:
5972 @samp{on})
5973 @c -------------------------
5974 @item mh-identity-default
5975 Default identity to use when @code{mh-letter-mode} is called (default:
5976 @samp{None}).
5977 @c -------------------------
5978 @item mh-identity-handlers
5979 Handler functions for fields in @code{mh-identity-list}.
5980 @c -------------------------
5981 @item mh-identity-list
5982 List of identities (default: @code{nil}).
5983 @end vtable
5984
5985 Some of the common header fields that people change depending on the
5986 context are the @samp{From:} and @samp{Organization:} fields, as well
5987 as the signature.
5988
5989 @vindex mh-identity-list
5990
5991 This is done by customizing the option @code{mh-identity-list}. In the
5992 customization buffer for this option, click on the @samp{INS} button
5993 and enter a label such as @samp{Home} or @samp{Work}. Then click on
5994 the @samp{INS} button with the label @samp{Add at least one item
5995 below}. The @samp{Value Menu} has the following menu items:
5996
5997 @table @samp
5998 @cindex header field, @samp{From:}
5999 @cindex @samp{From:} header field
6000 @item From Field
6001 Specify an alternate @samp{From:} header field. You must include a
6002 valid email address. A standard format is @samp{First Last
6003 <login@@host.domain>}. If you use an initial with a period, then you
6004 must quote your name as in @samp{"First I. Last"
6005 <login@@host.domain>}.
6006 @c -------------------------
6007 @cindex header field, @samp{Organization:}
6008 @cindex @samp{Organization:} header field
6009 @item Organization Field
6010 People usually list the name of the company where they work here.
6011 @c -------------------------
6012 @item Other Field
6013 Set any arbitrary header field and value here. Unless the header field
6014 is a standard one, precede the name of your field's label with
6015 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}.
6016 @c -------------------------
6017 @item Attribution Verb
6018 This value overrides the setting of
6019 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}.
6020 @c -------------------------
6021 @cindex signature
6022 @vindex mh-signature-file-name
6023 @item Signature
6024 Set your signature with this item. You can specify the contents of
6025 @code{mh-signature-file-name}, a file, or a function.
6026 @xref{Signature}.
6027 @c -------------------------
6028 @item GPG Key ID
6029 Specify a different key to sign or encrypt messages.
6030 @end table
6031
6032 @cindex Identity menu
6033 @cindex menu, Identity
6034 @findex mh-insert-identity
6035 @kindex C-c C-d
6036
6037 You can select the identities you have added via the menu called
6038 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c
6039 C-d} (@code{mh-insert-identity}). To clear the fields and signature
6040 added by the identity, select the @samp{None} identity.
6041
6042 @cindex menu item, @samp{Identity > Customize Identities}
6043 @cindex menu item, @samp{Identity > Save as Default}
6044 @cindex menu item, @samp{Identity > Set Default for Session}
6045 @cindex @samp{Identity > Customize Identities} menu item
6046 @cindex @samp{Identity > Save as Default} menu item
6047 @cindex @samp{Identity > Set Default for Session} menu item
6048 @vindex mh-identity-default
6049
6050 The @samp{Identity} menu contains two other items to save you from
6051 having to set the identity on every message. The menu item @samp{Set
6052 Default for Session} can be used to set the default identity to the
6053 current identity until you exit Emacs. The menu item @samp{Save as
6054 Default} sets the option @code{mh-identity-default} to the current
6055 identity setting. You can also customize the option
6056 @code{mh-identity-default} in the usual fashion. If you find that you
6057 need to add another identity, the menu item @samp{Customize
6058 Identities} is available for your convenience.
6059
6060 @cindex regular expressions, @code{mh-auto-fields-list}
6061 @vindex mh-auto-fields-list
6062
6063 The option @code{mh-auto-fields-list} can also be used to set the
6064 identity depending on the recipient to provide even more control. To
6065 customize @code{mh-auto-fields-list}, click on the @samp{INS} button
6066 and enter a regular expression for the recipient's address
6067 @ifnothtml
6068 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
6069 GNU Emacs Manual}).
6070 @end ifnothtml
6071 @ifhtml
6072 (see the section
6073 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
6074 Syntax of Regular Expressions} in
6075 @cite{The GNU Emacs Manual}).
6076 @end ifhtml
6077 Click on the @samp{INS} button with the @samp{Add at least one item
6078 below} label. The @samp{Value Menu} contains the following menu items:
6079
6080 @table @samp
6081 @item Identity
6082 Select an identity from those configured in @code{mh-identity-list}.
6083 All of the information for that identity will be added if the
6084 recipient matches.
6085 @c -------------------------
6086 @cindex @samp{Fcc:} header field
6087 @cindex header field, @samp{Fcc:}
6088 @item Fcc Field
6089 Insert an @samp{Fcc:} header field with the folder you provide. When
6090 you send the message, MH will put a copy of your message in this
6091 folder.
6092 @c -------------------------
6093 @cindex @samp{Mail-Followup-To:} header field
6094 @cindex header field, @samp{Mail-Followup-To:}
6095 @item Mail-Followup-To Field
6096 Insert an @samp{Mail-Followup-To:} header field with the recipients
6097 you provide. If the recipient's mail user agent supports this header
6098 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then
6099 their replies will go to the addresses listed. This is useful if their
6100 replies go both to the list and to you and you don't have a mechanism
6101 to suppress duplicates. If you reply to someone not on the list, you
6102 must either remove the @samp{Mail-Followup-To:} field, or ensure the
6103 recipient is also listed there so that he receives replies to your
6104 reply.
6105 @c -------------------------
6106 @item Other Field
6107 Other header fields may be added using this menu item.
6108 @end table
6109
6110 @findex mh-insert-auto-fields
6111 @kindex C-c M-d
6112 @vindex mh-auto-fields-prompt-flag
6113
6114 These fields can only be added after the recipient is known. Because
6115 you can continue to add recipients as you edit the draft, MH-E waits
6116 until the message is sent to perform the auto-insertions. This seems
6117 strange at first, but you'll get used to it. There are two ways to
6118 help you feel that the desired fields are added. The first is the
6119 action when the message is sent: if any fields are added
6120 automatically, you are given a chance to see and to confirm these
6121 fields before the message is actually sent. You can do away with this
6122 confirmation by turning off the option
6123 @code{mh-auto-fields-prompt-flag}. The second method is manual: once
6124 the header contains one or more recipients, you may run the command
6125 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the
6126 @samp{Identity -> Insert Auto Fields} menu item to insert these fields
6127 manually. However, if you use this command, the automatic insertion
6128 when the message is sent is disabled.
6129
6130 @vindex mh-auto-fields-list
6131 @vindex mh-identity-list
6132
6133 You should avoid using the same header field in
6134 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions
6135 that may apply to the same message as the result is undefined.
6136
6137 @vindex mh-identity-handlers
6138 @vindex mh-identity-list
6139
6140 The option @code{mh-identity-handlers} is used to change the way that
6141 fields, signatures, and attributions in @code{mh-identity-list} are
6142 added. To customize @code{mh-identity-handlers}, replace the name of
6143 an existing handler function associated with the field you want to
6144 change with the name of a function you have written. You can also
6145 click on an @samp{INS} button and insert a field of your choice and
6146 the name of the function you have written to handle it.
6147
6148 @vindex mh-identity-list
6149
6150 The @samp{Field} field can be any field that you've used in your
6151 @code{mh-identity-list}. The special fields @samp{:attribution-verb},
6152 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the
6153 @code{mh-identity-list} choices @samp{Attribution Verb},
6154 @samp{Signature}, and @samp{GPG Key ID} respectively.
6155
6156 The handler associated with the @samp{:default} field is used when no
6157 other field matches.
6158
6159 The handler functions are passed two or three arguments: the field
6160 itself (for example, @samp{From}), or one of the special fields (for
6161 example, @samp{:signature}), and the action @samp{'remove} or
6162 @samp{'add}. If the action is @samp{'add}, an additional argument
6163 containing the value for the field is given.
6164
6165 @node Speedbar, Menu Bar, Identities, Top
6166 @chapter The Speedbar
6167
6168 @cindex folder navigation
6169 @cindex speedbar
6170 @findex mh-visit-folder
6171 @kindex F v
6172 @kindex M-x speedbar
6173 @kindex Mouse-2
6174
6175 You can also use the speedbar
6176 @ifnothtml
6177 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},)
6178 @end ifnothtml
6179 @ifhtml
6180 (see the section
6181 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html,
6182 Speedbar Frames} in @cite{The GNU Emacs Manual})
6183 @end ifhtml
6184 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar
6185 @key{RET}}. You will see a new frame appear with all of your MH
6186 folders. Folders with unseen messages appear in boldface. Click on a
6187 folder name with @kbd{Mouse-2} to visit that folder in a similar
6188 fashion to the command @kbd{F v} (@code{mh-visit-folder})
6189 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the
6190 sub-folders of that folder.
6191
6192 The speedbar can be manipulated with the keyboard as well. Use the
6193 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move
6194 the cursor over the desired folder and then use the shortcuts for the
6195 menu items listed in the table below.
6196
6197 @table @samp
6198 @findex mh-speed-view
6199 @item Visit Folder (@key{RET})
6200 Visits the selected folder just as if you had used @kbd{F v}
6201 (@code{mh-speed-view}).
6202 @c -------------------------
6203 @findex mh-speed-expand-folder
6204 @item Expand Nested Folders (@kbd{+})
6205 Expands the selected folder in the speedbar, exposing the children
6206 folders inside it (@code{mh-speed-expand-folder}).
6207 @c -------------------------
6208 @findex mh-speed-contract-folder
6209 @item Contract Nested Folders (@kbd{-})
6210 Contracts or collapses the selected folder in the speedbar, hiding the
6211 children folders inside it (@code{mh-speed-contract-folder}).
6212 @c -------------------------
6213 @findex mh-speed-refresh
6214 @item Refresh Speedbar (@kbd{r})
6215 Regenerates the list of folders in the speedbar. Run this command if
6216 you've added or deleted a folder, or want to update the unseen message
6217 count before the next automatic update (@code{mh-speed-refresh}).
6218 @end table
6219
6220 @findex delete-frame
6221 @kindex C-x 5 0
6222 @kindex Mouse-3
6223
6224 You can click on @kbd{Mouse-3} to bring up a context menu that
6225 contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
6226 (@code{delete-frame}).
6227
6228 @cindex @command{flists}
6229 @cindex MH commands, @command{flists}
6230 @cindex @samp{mh-speedbar} customization group
6231 @cindex customization group, @samp{mh-speedbar}
6232
6233 The MH-E speedbar uses the MH command @command{flists}@footnote{See
6234 the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for
6235 Sequences with flist} in the MH book.} to generate the list of
6236 folders. The @samp{mh-speedbar} customization group contains the
6237 following option which controls how often the speedbar calls
6238 @command{flists}.
6239
6240 @vtable @code
6241 @item mh-speed-update-interval
6242 Time between speedbar updates in seconds (default: 60). Set to 0 to
6243 disable automatic update.
6244 @end vtable
6245
6246 You can modify the appearance of the folders in the speedbar by
6247 customizing the following faces.
6248
6249 @vtable @code
6250 @item mh-speedbar-folder
6251 Basic folder face.
6252 @c -------------------------
6253 @item mh-speedbar-folder-with-unseen-messages
6254 Folder face when folder contains unread messages.
6255 @c -------------------------
6256 @item mh-speedbar-selected-folder
6257 Selected folder face.
6258 @c -------------------------
6259 @item mh-speedbar-selected-folder-with-unseen-messages
6260 Selected folder face when folder contains unread messages.
6261 @end vtable
6262
6263 @node Menu Bar, Tool Bar, Speedbar, Top
6264 @chapter The Menu Bar
6265
6266 @cindex @samp{Folder} menu
6267 @cindex @samp{Identity} menu
6268 @cindex @samp{Letter} menu
6269 @cindex @samp{Message} menu
6270 @cindex @samp{Search} menu
6271 @cindex @samp{Sequence} menu
6272 @cindex Folder menu
6273 @cindex Identity menu
6274 @cindex Letter menu
6275 @cindex MH-Folder mode
6276 @cindex MH-Letter mode
6277 @cindex MH-Search mode
6278 @cindex Message menu
6279 @cindex Search menu
6280 @cindex Sequence menu
6281 @cindex menu bar
6282 @cindex menu, Folder
6283 @cindex menu, Identity
6284 @cindex menu, Letter
6285 @cindex menu, Message
6286 @cindex menu, Search
6287 @cindex menu, Sequence
6288 @cindex menu, @samp{Folder}
6289 @cindex menu, @samp{Identity}
6290 @cindex menu, @samp{Letter}
6291 @cindex menu, @samp{Message}
6292 @cindex menu, @samp{Search}
6293 @cindex menu, @samp{Sequence}
6294 @cindex modes, MH-Folder
6295 @cindex modes, MH-Letter
6296 @cindex modes, MH-Search
6297
6298 For those of you who prefer to mouse and menu instead of using the
6299 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its
6300 functions. The MH-Folder buffer adds the @samp{Folder},
6301 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds
6302 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds
6303 the @samp{Search} menu. There's no need to list the actual items here,
6304 as you can more easily see them for yourself, and the functions are
6305 already described elsewhere in this manual.
6306
6307 For a description of the menu bar, please
6308 @ifnothtml
6309 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}.
6310 @end ifnothtml
6311 @ifhtml
6312 see the section
6313 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html,
6314 The Menu Bar} in @cite{The GNU Emacs Manual}.
6315 @end ifhtml
6316
6317 The Emacs manual describes how to get online help for a particular
6318 menu item. You can also look up a menu item in the index of this
6319 manual in two ways: all of the menu items are listed alphabetically,
6320 and you can also browse all of the items under the index entry
6321 @samp{menu item}.
6322
6323 @node Tool Bar, Searching, Menu Bar, Top
6324 @chapter The Tool Bar
6325
6326 @cindex tool bar
6327
6328 Emacs also provides a graphical tool bar. For a description of the
6329 tool bar, please
6330 @ifnothtml
6331 @xref{Tool Bars, , Tool Bars, 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/Tool-Bars.html,
6336 Tool Bars} in @cite{The GNU Emacs Manual}.
6337 @end ifhtml
6338
6339 @cindex @samp{mh-tool-bar} customization group
6340 @cindex customization group, @samp{mh-tool-bar}
6341
6342 MH-E adds several icons to this tool bar; you can modify the MH-E
6343 aspects of the tool bar via the @samp{mh-tool-bar} customization group.
6344
6345 @vtable @code
6346 @item mh-tool-bar-folder-buttons
6347 List of buttons to include in MH-Folder tool bar (default: a checklist
6348 too long to list here).
6349 @c -------------------------
6350 @item mh-tool-bar-letter-buttons
6351 List of buttons to include in MH-Letter tool bar (default: a checklist
6352 too long to list here).
6353 @c -------------------------
6354 @item mh-tool-bar-search-function
6355 Function called by the tool bar search button (default:
6356 @code{mh-search}).
6357 @c -------------------------
6358 @item mh-xemacs-tool-bar-position
6359 Tool bar location (default: @samp{Same As Default Tool Bar}).
6360 @c -------------------------
6361 @item mh-xemacs-use-tool-bar-flag
6362 If on, use tool bar (default: on, if supported).
6363 @end vtable
6364
6365 In GNU Emacs, icons for some of MH-E's functions are added to the tool
6366 bar. In XEmacs, you have the opportunity to create a separate tool bar for
6367 the MH-E icons.
6368
6369 @vindex mh-tool-bar-folder-buttons
6370 @vindex mh-tool-bar-letter-buttons
6371
6372 In either case, you can select which of these functions you'd like to
6373 see by customizing the options @code{mh-tool-bar-folder-buttons} and
6374 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former
6375 customizes the tool bar in MH-Folder mode and the latter in MH-Letter
6376 mode. Both of these options present you with a list of functions;
6377 check the functions whose icons you want to see and clear the check
6378 boxes for those you don't.
6379
6380 @findex mh-search
6381 @vindex mh-tool-bar-search-function
6382
6383 The function associated with the searching icon can be set via the
6384 option @code{mh-tool-bar-search-function}. By default, this is set to
6385 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other
6386 Function} from the @samp{Value Menu} and enter a function of your own
6387 choosing.
6388
6389 @vindex mh-xemacs-use-tool-bar-flag
6390
6391 XEmacs provides a couple of extra options. The first,
6392 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E
6393 icons at all. By default, this option is turned on if the window
6394 system supports tool bars. If your system doesn't support tool bars,
6395 then you won't be able to turn on this option.
6396
6397 @vindex mh-xemacs-tool-bar-position
6398
6399 The second extra option is @code{mh-xemacs-tool-bar-position} which
6400 controls the placement of the tool bar along the four edges of the
6401 frame. You can choose from one of @samp{Same As Default Tool Bar},
6402 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this
6403 variable is set to anything other than @samp{Same As Default Tool Bar}
6404 and the default tool bar is in a different location, then two tool
6405 bars will be displayed: the MH-E tool bar and the default tool bar.
6406
6407 @node Searching, Threading, Tool Bar, Top
6408 @chapter Searching Through Messages
6409
6410 @cindex @samp{Search} menu
6411 @cindex menu, @samp{Search}
6412 @cindex searching
6413 @findex mh-search
6414 @kindex F s
6415
6416 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which
6417 helps you find messages that lie buried in your folders
6418 (@pxref{Folders}). This chapter covers this command in more detail.
6419 Several commands are used to compose the search criteria and to start
6420 searching. A couple of them can be found in the @samp{Search} menu.
6421
6422 @table @kbd
6423 @kindex C-c ?
6424 @findex mh-help
6425 @item C-c ?
6426 Display cheat sheet for the MH-E commands (@code{mh-help}).
6427 @c -------------------------
6428 @cindex @samp{Search > Perform Search} menu item
6429 @cindex menu item, @samp{Search > Perform Search}
6430 @kindex C-c C-c
6431 @findex mh-index-do-search
6432 @item C-c C-c
6433 Find messages using @code{mh-search-program}
6434 (@code{mh-index-do-search}).
6435 @c -------------------------
6436 @cindex @samp{Search > Search with pick} menu item
6437 @cindex menu item, @samp{Search > Search with pick}
6438 @kindex C-c C-p
6439 @findex mh-pick-do-search
6440 @item C-c C-p
6441 Find messages using @command{pick} (@code{mh-pick-do-search}).
6442 @c -------------------------
6443 @kindex C-c ?
6444 @findex mh-help
6445 @item C-c ?
6446 Display cheat sheet for the MH-E commands (@code{mh-help}).
6447 @c -------------------------
6448 @kindex C-c C-f C-a
6449 @kindex C-c C-f a
6450 @findex mh-to-field
6451 @item C-c C-f a
6452 @itemx C-c C-f C-a
6453 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
6454 @c -------------------------
6455 @kindex C-c C-f C-b
6456 @kindex C-c C-f b
6457 @item C-c C-f b
6458 @itemx C-c C-f C-b
6459 Move to @samp{Bcc:} header field (@code{mh-to-field}).
6460 @c -------------------------
6461 @kindex C-c C-f C-c
6462 @kindex C-c C-f c
6463 @item C-c C-f c
6464 @itemx C-c C-f C-c
6465 Move to @samp{Cc:} header field (@code{mh-to-field}).
6466 @c -------------------------
6467 @kindex C-c C-f C-d
6468 @kindex C-c C-f d
6469 @item C-c C-f d
6470 @itemx C-c C-f C-d
6471 Move to @samp{Dcc:} header field (@code{mh-to-field}).
6472 @c -------------------------
6473 @kindex C-c C-f C-f
6474 @kindex C-c C-f f
6475 @item C-c C-f f
6476 @itemx C-c C-f C-f
6477 Move to @samp{Fcc:} header field (@code{mh-to-field}).
6478 @c -------------------------
6479 @kindex C-c C-f C-l
6480 @kindex C-c C-f l
6481 @item C-c C-f l
6482 @itemx C-c C-f C-l
6483 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
6484 @c -------------------------
6485 @kindex C-c C-f C-m
6486 @kindex C-c C-f m
6487 @item C-c C-f m
6488 @itemx C-c C-f C-m
6489 Move to @samp{From:} header field (@code{mh-to-field}).
6490 @c -------------------------
6491 @kindex C-c C-f C-r
6492 @kindex C-c C-f r
6493 @item C-c C-f r
6494 @itemx C-c C-f C-r
6495 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
6496 @c -------------------------
6497 @kindex C-c C-f C-s
6498 @kindex C-c C-f s
6499 @item C-c C-f s
6500 @itemx C-c C-f C-s
6501 Move to @samp{Subject:} header field (@code{mh-to-field}).
6502 @c -------------------------
6503 @kindex C-c C-f C-t
6504 @kindex C-c C-f t
6505 @item C-c C-f t
6506 @itemx C-c C-f C-t
6507 Move to @samp{To:} header field (@code{mh-to-field}).
6508 @end table
6509
6510 Another few commands are available in the MH-Folder buffer resulting
6511 from a search.
6512
6513 @table @kbd
6514 @kindex @key{TAB}
6515 @findex mh-index-next-folder
6516 @item @key{TAB}
6517 Jump to the next folder marker (@code{mh-index-next-folder}).
6518 @c -------------------------
6519 @kindex S-@key{TAB}
6520 @findex mh-index-previous-folder
6521 @item S-@key{TAB}
6522 Jump to the previous folder marker (@code{mh-index-previous-folder}).
6523 @c -------------------------
6524 @kindex v
6525 @findex mh-index-visit-folder
6526 @item v
6527 Visit original folder from where the message at point was found
6528 (@code{mh-index-visit-folder}).
6529 @end table
6530
6531 @cindex @samp{mh-search} customization group
6532 @cindex customization group, @samp{mh-search}
6533
6534 There is one option from the @samp{mh-search} customization group used
6535 in searching.
6536
6537 @vtable @code
6538 @item mh-search-program
6539 Search program that MH-E shall use (default: @samp{Auto-detect}).
6540 @end vtable
6541
6542 The following hook is available.
6543
6544 @vtable @code
6545 @item mh-search-mode-hook
6546 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}).
6547 @end vtable
6548
6549 The following face is available.
6550
6551 @vtable @code
6552 @item mh-search-folder
6553 Folder heading face in MH-Folder buffers created by searches.
6554 @end vtable
6555
6556 @findex mh-search-folder
6557 @kindex F s
6558
6559 The command @kbd{F s} (@code{mh-search-folder}) helps you find
6560 messages in your entire corpus of mail. You can search for messages to
6561 or from a particular person or about a particular subject. In fact,
6562 you can also search for messages containing selected strings in any
6563 arbitrary header field or any string found within the messages.
6564
6565 @cindex @command{pick}
6566 @cindex MH commands, @command{pick}
6567
6568 Out of the box, MH-E uses @command{pick} to find messages. With a
6569 little extra effort, you can set an indexing program which rewards you
6570 with extremely quick results. The drawback is that sometimes the index
6571 does not contain the words you're looking for. You can still use
6572 @command{pick} in these situations.
6573
6574 You are prompted for the folder to search. This can be @samp{all} to
6575 search all folders. Note that the search works recursively on the
6576 listed folder.
6577
6578 @cindex MH-Search mode
6579 @cindex modes, MH-Search
6580
6581 Next, an MH-Search buffer appears where you can enter search criteria.
6582
6583 @cartouche
6584 @smallexample
6585 From:
6586 To:
6587 Cc:
6588 Date:
6589 Subject:
6590 --------
6591 #
6592
6593
6594
6595
6596
6597
6598
6599
6600 --:** search-pattern All L7 (MH-Search)---------------------------
6601 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
6602 @end smallexample
6603 @end cartouche
6604 @i{Search window}
6605
6606 @cindex @command{pick}
6607 @cindex MH commands, @command{pick}
6608
6609 Edit this template by entering your search criteria in an appropriate
6610 header field that is already there, or create a new field yourself. If
6611 the string you're looking for could be anywhere in a message, then
6612 place the string underneath the row of dashes.
6613
6614 As an example, let's say that we want to find messages from Ginnean
6615 about horseback riding in the Kosciusko National Park (Australia)
6616 during January, 1994. Normally we would start with a broad search and
6617 narrow it down if necessary to produce a manageable amount of data,
6618 but we'll cut to the chase and create a fairly restrictive set of
6619 criteria as follows:
6620
6621 @smallexample
6622 @group
6623 From: ginnean
6624 To:
6625 Cc:
6626 Date: Jan 1994
6627 Subject:
6628 --------
6629 horse
6630 kosciusko
6631 @end group
6632 @end smallexample
6633
6634 @findex mh-to-field
6635 @kindex C-c C-f C-t
6636
6637 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f
6638 C-t} (@code{mh-to-field}) to help you fill in the blanks.
6639 @xref{Editing Message}.
6640
6641 @kindex F s
6642 @vindex mh-search-mode-hook
6643
6644 If you find that you do the same thing over and over when editing the
6645 search template, you may wish to bind some shortcuts to keys. This can
6646 be done with the variable @code{mh-search-mode-hook}, which is called
6647 when @kbd{F s} is run on a new pattern.
6648
6649 @findex mh-index-do-search
6650 @findex mh-pick-do-search
6651 @kindex C-c C-c
6652 @kindex C-c C-p
6653
6654 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}).
6655 Sometimes you're searching for text that is either not indexed, or
6656 hasn't been indexed yet. In this case you can override the default
6657 method with the pick method by running the command @kbd{C-c C-p}
6658 (@code{mh-pick-do-search}).
6659
6660 @cindex folders, @samp{+mhe-index}
6661 @cindex @samp{+mhe-index}
6662 @findex mh-index-next-folder
6663 @findex mh-index-previous-folder
6664 @kindex @key{TAB}
6665 @kindex S-@key{TAB}
6666 @vindex mh-search-folder
6667
6668 The messages that are found are put in a temporary sub-folder of
6669 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This
6670 buffer is special because it displays messages from multiple folders;
6671 each set of messages from a given folder has a heading with the folder
6672 name. The appearance of the heading can be modified by customizing the
6673 face @code{mh-search-folder}. You can jump back and forth between the
6674 headings using the commands @kbd{@key{TAB}}
6675 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}}
6676 (@code{mh-index-previous-folder}).
6677
6678 @findex mh-index-visit-folder
6679 @findex mh-rescan-folder
6680 @kindex F r
6681 @kindex v
6682
6683 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be
6684 used to visit the folder of the message at point. Initially, only the
6685 messages that matched the search criteria are displayed in the folder.
6686 While the temporary buffer has its own set of message numbers, the
6687 actual messages numbers are shown in the visited folder. Thus, the
6688 command @kbd{v} is useful to find the actual message number of an
6689 interesting message, or to view surrounding messages with the command
6690 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}.
6691
6692 @findex mh-kill-folder
6693 @kindex F k
6694
6695 Because this folder is temporary, you'll probably get in the habit of
6696 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}).
6697 @xref{Folders}.
6698
6699 @kindex F s
6700
6701 You can regenerate the results by running @kbd{F s} with a prefix
6702 argument.
6703
6704 @cindex @command{procmail}
6705 @cindex Unix commands, @command{procmail}
6706 @cindex @samp{X-MHE-Checksum:} header field
6707 @cindex header field, @samp{X-MHE-Checksum:}
6708
6709 Note: This command uses an @samp{X-MHE-Checksum:} header field to
6710 cache the MD5 checksum of a message. This means that if an incoming
6711 message already contains an @samp{X-MHE-Checksum:} field, that message
6712 might not be found by this command. The following @command{procmail}
6713 recipe avoids this problem by renaming the existing header field:
6714
6715 @smallexample
6716 @group
6717 :0 wf
6718 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum"
6719 @end group
6720 @end smallexample
6721
6722 @xref{Limits}, for an alternative interface to searching.
6723
6724 @section Configuring Indexed Searches
6725
6726 @cindex @command{grep}
6727 @cindex @command{mairix}
6728 @cindex @command{namazu}
6729 @cindex @command{pick}
6730 @cindex @command{swish++}
6731 @cindex @command{swish-e}
6732 @cindex Unix commands, @command{grep}
6733 @cindex Unix commands, @command{mairix}
6734 @cindex Unix commands, @command{namazu}
6735 @cindex Unix commands, @command{pick}
6736 @cindex Unix commands, @command{swish++}
6737 @cindex Unix commands, @command{swish-e}
6738 @findex mh-search
6739 @kindex F s
6740 @vindex mh-search-program
6741
6742 The command @kbd{F s} (@code{mh-search}) runs the command defined by
6743 the option @code{mh-search-program}. The default value is
6744 @samp{Auto-detect} which means that MH-E will automatically choose one
6745 of @command{swish++}, @command{swish-e}, @command{mairix},
6746 @command{namazu}, @command{pick} and @command{grep} in that order. If,
6747 for example, you have both @command{swish++} and @command{mairix}
6748 installed and you want to use @command{mairix}, then you can set this
6749 option to @samp{mairix}.
6750
6751 The following sub-sections describe how to set up the various indexing
6752 programs to use with MH-E.
6753
6754 @subsection swish++
6755
6756 @cindex @command{swish++}
6757 @cindex Unix commands, @command{swish++}
6758
6759 In the examples below, replace @file{/home/user/Mail} with the path to
6760 your MH directory.
6761
6762 First create the directory @file{/home/user/Mail/.swish++}. Then
6763 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the
6764 following contents:
6765
6766 @smallexample
6767 @group
6768 IncludeMeta Bcc Cc Comments Content-Description From Keywords
6769 IncludeMeta Newsgroups Resent-To Subject To
6770 IncludeMeta Message-Id References In-Reply-To
6771 IncludeFile Mail *
6772 IndexFile /home/user/Mail/.swish++/swish++.index
6773 @end group
6774 @end smallexample
6775
6776 Use the following command line to generate the swish index. Run this
6777 daily from cron:
6778
6779 @smallexample
6780 @group
6781 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \
6782 -o -path /home/user/Mail/.swish++ -prune \
6783 -o -name "[0-9]*" -print \
6784 | index -c /home/user/Mail/.swish++/swish++.conf -
6785 @end group
6786 @end smallexample
6787
6788 This command does not index the folders that hold the results of your
6789 searches in @samp{+mhe-index} since they tend to be ephemeral and the
6790 original messages are indexed anyway.
6791
6792 @cindex @command{index}
6793 @cindex Unix commands, @command{index}
6794 @cindex @command{index++}
6795 @cindex Unix commands, @command{index++}
6796
6797 On some systems (Debian GNU/Linux, for example), use @command{index++}
6798 instead of @command{index}.
6799
6800 @subsection swish
6801
6802 @cindex @command{swish-e}
6803 @cindex Unix commands, @command{swish-e}
6804
6805 In the examples below, replace @file{/home/user/Mail} with the path to
6806 your MH directory.
6807
6808 First create the directory @file{/home/user/Mail/.swish}. Then create
6809 the file @file{/home/user/Mail/.swish/config} with the following
6810 contents:
6811
6812 @smallexample
6813 @group
6814 DefaultContents TXT*
6815 IndexDir /home/user/Mail
6816 IndexFile /home/user/Mail/.swish/index
6817 IndexName "Mail Index"
6818 IndexDescription "Mail Index"
6819 IndexPointer "http://nowhere"
6820 IndexAdmin "nobody"
6821 #MetaNames automatic
6822 IndexReport 3
6823 FollowSymLinks no
6824 UseStemming no
6825 IgnoreTotalWordCountWhenRanking yes
6826 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
6827 BeginCharacters abcdefghijklmnopqrstuvwxyz
6828 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
6829 IgnoreLimit 50 1000
6830 IndexComments 0
6831 FileRules filename contains \D
6832 FileRules pathname contains /home/user/Mail/.swish
6833 FileRules pathname contains /home/user/Mail/mhe-index
6834 FileRules filename is index
6835 @end group
6836 @end smallexample
6837
6838 This configuration does not index the folders that hold the results of
6839 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6840 the original messages are indexed anyway.
6841
6842 If there are any directories you would like to ignore, append lines
6843 like the following to @file{config}:
6844
6845 @smallexample
6846 FileRules pathname contains /home/user/Mail/scripts
6847 @end smallexample
6848
6849 @cindex @command{swish-e}
6850 @cindex Unix commands, @command{swish-e}
6851
6852 Use the following command line to generate the swish index. Run this
6853 daily from cron:
6854
6855 @smallexample
6856 swish-e -c /home/user/Mail/.swish/config
6857 @end smallexample
6858
6859 @subsection mairix
6860
6861 @cindex @command{mairix}
6862 @cindex Unix commands, @command{mairix}
6863
6864 In the examples below, replace @file{/home/user/Mail} with the path to
6865 your MH directory.
6866
6867 First create the directory @file{/home/user/Mail/.mairix}. Then create
6868 the file @file{/home/user/Mail/.mairix/config} with the following
6869 contents:
6870
6871 @smallexample
6872 @group
6873 base=/home/user/Mail
6874
6875 # List of folders that should be indexed. 3 dots at the end means there
6876 # are subfolders within the folder
6877 mh=archive...:inbox:drafts:news:sent:trash
6878
6879 vfolder_format=raw
6880 database=/home/user/Mail/mairix/database
6881 @end group
6882 @end smallexample
6883
6884 Use the following command line to generate the mairix index. Run this daily
6885 from cron:
6886
6887 @smallexample
6888 mairix -f /home/user/Mail/.mairix/config
6889 @end smallexample
6890
6891 @subsection namazu
6892
6893 @cindex @command{namazu}
6894 @cindex Unix commands, @command{namazu}
6895
6896 In the examples below, replace @file{/home/user/Mail} with the path to
6897 your MH directory.
6898
6899 First create the directory @file{/home/user/Mail/.namazu}. Then create
6900 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following
6901 contents:
6902
6903 @smallexample
6904 @group
6905 package conf; # Don't remove this line!
6906 $ADDRESS = 'user@@localhost';
6907 $ALLOW_FILE = "[0-9]*";
6908 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)";
6909 @end group
6910 @end smallexample
6911
6912 This configuration does not index the folders that hold the results of
6913 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6914 the original messages are indexed anyway.
6915
6916 Use the following command line to generate the namazu index. Run this
6917 daily from cron:
6918
6919 @smallexample
6920 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
6921 /home/user/Mail
6922 @end smallexample
6923
6924 @subsection pick
6925
6926 @cindex @command{pick}
6927 @cindex MH commands, @command{pick}
6928
6929 This search method does not require any setup.
6930
6931 Read @command{pick}(1) or the section
6932 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
6933 the MH book to find out more about how to enter the criteria.
6934
6935 @subsection grep
6936
6937 @cindex @command{grep}
6938 @cindex Unix commands, @command{grep}
6939
6940 This search method does not require any setup.
6941
6942 Unlike the other search methods, this method does not use the
6943 MH-Search buffer. Instead, you simply enter a regular expression in
6944 the minibuffer. For help in constructing regular expressions, see your
6945 man page for @command{grep}.
6946
6947 @node Threading, Limits, Searching, Top
6948 @chapter Viewing Message Threads
6949
6950 @cindex threading
6951
6952 MH-E groups messages by @dfn{threads} which are messages that are part
6953 of the same discussion and usually all have the same @samp{Subject:}
6954 header field. Other ways to organize messages in a folder include
6955 limiting (@pxref{Limits}) or using full-text indexed searches
6956 (@pxref{Searching}).
6957
6958 @cindex root, in threads
6959 @cindex siblings, in threads
6960 @cindex ancestor, in threads
6961
6962 A thread begins with a single message called a @dfn{root}. All replies
6963 to the same message are @dfn{siblings} of each other. Any message that
6964 has replies to it is an @dfn{ancestor} of those replies.
6965
6966 There are several commands that you can use to navigate and operate on
6967 threads.
6968
6969 @table @kbd
6970 @kindex T ?
6971 @findex mh-prefix-help
6972 @item T ?
6973 Display cheat sheet for the commands of the current prefix in
6974 minibuffer (@code{mh-prefix-help}).
6975 @c -------------------------
6976 @kindex T o
6977 @findex mh-thread-refile
6978 @item T o
6979 Refile (output) thread into folder (@code{mh-thread-refile}).
6980 @c -------------------------
6981 @kindex T d
6982 @findex mh-thread-delete
6983 @item T d
6984 Delete thread (@code{mh-thread-delete}).
6985 @c -------------------------
6986 @kindex T t
6987 @findex mh-toggle-threads
6988 @item T t
6989 Toggle threaded view of folder (@code{mh-toggle-threads}).
6990 @c -------------------------
6991 @kindex T n
6992 @findex mh-thread-next-sibling
6993 @item T n
6994 Display next sibling (@code{mh-thread-next-sibling}).
6995 @c -------------------------
6996 @kindex T p
6997 @findex mh-thread-previous-sibling
6998 @item T p
6999 Display previous sibling (@code{mh-thread-previous-sibling}).
7000 @c -------------------------
7001 @kindex T u
7002 @findex mh-thread-ancestor
7003 @item T u
7004 Display ancestor of current message (@code{mh-thread-ancestor}).
7005 @end table
7006
7007 @cindex @samp{mh-thread} customization group
7008 @cindex customization group, @samp{mh-thread}
7009
7010 The @samp{mh-thread} customization group contains one option.
7011
7012 @vtable @code
7013 @item mh-show-threads-flag
7014 On means new folders start in threaded mode (default: @samp{off}).
7015 @end vtable
7016
7017 @findex mh-toggle-threads
7018 @kindex T t
7019 @vindex mh-large-folder
7020 @vindex mh-show-threads-flag
7021
7022 Threading large number of messages can be time consuming so the option
7023 @code{mh-show-threads-flag} is turned off by default. If you turn on
7024 this option, then threading will be done only if the number of
7025 messages being threaded is less than @code{mh-large-folder}. In any
7026 event, threading can be turned on (and off) with the command @kbd{T t}
7027 (@code{mh-toggle-threads}).
7028
7029 @findex mh-thread-ancestor
7030 @findex mh-thread-next-sibling
7031 @findex mh-thread-previous-sibling
7032 @kindex T n
7033 @kindex T p
7034 @kindex T u
7035
7036 There are a few commands to help you navigate threads. If you do not
7037 care for the way a particular thread has turned, you can move up the
7038 chain of messages with the command @kbd{T u}
7039 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n}
7040 (@code{mh-thread-next-sibling} or @kbd{T p}
7041 (@code{mh-thread-previous-sibling}) to jump to the next or previous
7042 sibling, skipping the sub-threads. The command @kbd{T u} can also take
7043 a prefix argument to jump to the message that started everything.
7044
7045 @findex mh-delete-subject-or-thread
7046 @findex mh-thread-delete
7047 @findex mh-thread-refile
7048 @kindex k
7049 @kindex T d
7050 @kindex T o
7051
7052 There are threaded equivalents for the commands that delete and refile
7053 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the
7054 current message and all its children. Similarly, the command @kbd{T d}
7055 (@code{mh-thread-delete}) deletes the current message and all its
7056 children. These commands do not refile or delete sibling messages.
7057 @xref{Navigating}, for a description of the similar command @kbd{k}
7058 (@code{mh-delete-subject-or-thread}).
7059
7060 @vindex mh-large-folder
7061
7062 If you find that threading is too slow, it may be that you have
7063 @code{mh-large-folder} set too high. Also, threading is one of the few
7064 features of MH-E that really benefits from compiling. If you haven't
7065 compiled MH-E, I encourage you to do so@footnote{If you're not sure if
7066 MH-E has been byte-compiled, you could try running @samp{locate
7067 mh-thread.elc} or otherwise find MH-E on your system and ensure that
7068 @file{mh-thread.elc} exists. If you have multiple versions and you
7069 find that one is compiled but the other is not, then go into your
7070 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and
7071 ensure that the byte-compiled version appears first in the
7072 @code{load-path}. If you find that MH-E is not compiled and you
7073 installed MH-E yourself, please refer to the installation directions
7074 in the file @file{README} in the distribution.}.
7075
7076 @node Limits, Sequences, Threading, Top
7077 @chapter Limiting Display
7078
7079 @cindex limits
7080 @cindex filters
7081
7082 Another way to organize messages in a folder besides threading
7083 (@pxref{Threading}) or using full-text indexed searches
7084 (@pxref{Searching}) is by limiting the folder display to messages that
7085 are similar to the current message.
7086
7087 @table @kbd
7088 @kindex / ?
7089 @findex mh-prefix-help
7090 @item / ?
7091 Display cheat sheet for the commands of the current prefix in
7092 minibuffer (@code{mh-prefix-help}).
7093 @c -------------------------
7094 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7095 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7096 @kindex / '
7097 @findex mh-narrow-to-tick
7098 @item / '
7099 Limit to messages in the @samp{tick} sequence
7100 (@code{mh-narrow-to-tick}).
7101 @c -------------------------
7102 @kindex / c
7103 @findex mh-narrow-to-cc
7104 @item / c
7105 Limit to messages with the same @samp{Cc:} field
7106 (@code{mh-narrow-to-cc}).
7107 @c -------------------------
7108 @kindex / m
7109 @findex mh-narrow-to-from
7110 @item / m
7111 Limit to messages with the same @samp{From:} field
7112 (@code{mh-narrow-to-from}).
7113 @c -------------------------
7114 @kindex / g
7115 @findex mh-narrow-to-range
7116 @item / g
7117 Limit to range (@code{mh-narrow-to-range}).
7118 @c -------------------------
7119 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item
7120 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence}
7121 @kindex / s
7122 @findex mh-narrow-to-subject
7123 @item / s
7124 Limit to messages with the same @samp{Subject:} field
7125 (@code{mh-narrow-to-subject}).
7126 @c -------------------------
7127 @kindex / t
7128 @findex mh-narrow-to-to
7129 @item / t
7130 Limit to messages with the same @samp{To:} field
7131 (@code{mh-narrow-to-to}).
7132 @c -------------------------
7133 @cindex @samp{Sequence > Widen from Sequence} menu item
7134 @cindex menu item, @samp{Sequence > Widen from Sequence}
7135 @kindex / w
7136 @findex mh-widen
7137 @item / w
7138 Remove last restriction (@code{mh-widen}).
7139 @end table
7140
7141 All of the limiting commands above refine the display in some way.
7142
7143 @cindex @command{pick}
7144 @cindex MH commands, @command{pick}
7145 @findex mh-narrow-to-cc
7146 @findex mh-narrow-to-from
7147 @findex mh-narrow-to-subject
7148 @findex mh-narrow-to-to
7149 @kindex / c
7150 @kindex / m
7151 @kindex / s
7152 @kindex / t
7153
7154 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m}
7155 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}),
7156 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to
7157 messages matching the content of the respective field in the current
7158 message. However, you can give any of these a prefix argument to edit
7159 the @command{pick} expression used to narrow the view@footnote{See
7160 @command{pick}(1) or the section
7161 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
7162 the MH book.}.
7163
7164 @cindex @samp{tick} sequence
7165 @cindex sequence, @samp{tick}
7166 @cindex ticked messages, viewing
7167 @findex mh-narrow-to-range
7168 @findex mh-narrow-to-tick
7169 @kindex / '
7170 @kindex / g
7171
7172 You can also limit the display to messages in the @samp{tick} sequence
7173 with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
7174 @xref{Sequences}, for information on putting message into the
7175 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range})
7176 command to limit the display to messages in a range (@pxref{Ranges}).
7177
7178 @findex mh-widen
7179 @kindex / w
7180
7181 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen})
7182 command. Give this command a prefix argument to remove all limits.
7183
7184 @node Sequences, Junk, Limits, Top
7185 @chapter Using Sequences
7186
7187 @cindex @samp{Sequence} menu
7188 @cindex menu, @samp{Sequence}
7189 @cindex sequences
7190
7191 For the whole scoop on MH sequences, refer to
7192 @samp{mh-sequence}(5)@footnote{See the section
7193 @uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH
7194 book.}. As you've read, several of the MH-E commands can operate on a
7195 sequence, which is a shorthand for a range or group of messages. For
7196 example, you might want to forward several messages to a friend or
7197 colleague. Here's how to manipulate sequences. These commands are also
7198 available in the @samp{Sequence} menu.
7199
7200 @table @kbd
7201 @cindex @samp{Sequence > Toggle Tick Mark} menu item
7202 @cindex menu item, @samp{Sequence > Toggle Tick Mark}
7203 @kindex '
7204 @findex mh-toggle-tick
7205 @item '
7206 Toggle tick mark of range (@code{mh-toggle-tick}).
7207 @c -------------------------
7208 @kindex S ?
7209 @findex mh-prefix-help
7210 @item S ?
7211 Display cheat sheet for the commands of the current prefix in
7212 minibuffer (@code{mh-prefix-help}).
7213 @c -------------------------
7214 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7215 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7216 @kindex S '
7217 @findex mh-narrow-to-tick
7218 @item S '
7219 Limit to ticked messages (@code{mh-narrow-to-tick}).
7220 @c -------------------------
7221 @cindex @samp{Sequence > Delete Message from Sequence...} menu item
7222 @cindex menu item, @samp{Sequence > Delete Message from Sequence...}
7223 @kindex S d
7224 @findex mh-delete-msg-from-seq
7225 @item S d
7226 Delete range from sequence (@code{mh-delete-msg-from-seq}).
7227 @c -------------------------
7228 @cindex @samp{Sequence > Delete Sequence...} menu item
7229 @cindex menu item, @samp{Sequence > Delete Sequence...}
7230 @kindex S k
7231 @findex mh-delete-seq
7232 @item S k
7233 Delete sequence (@code{mh-delete-seq}).
7234 @c -------------------------
7235 @cindex @samp{Sequence > List Sequences in Folder...} menu item
7236 @cindex menu item, @samp{Sequence > List Sequences in Folder...}
7237 @kindex S l
7238 @findex mh-list-sequences
7239 @item S l
7240 List all sequences in folder (@code{mh-list-sequences}).
7241 @c -------------------------
7242 @cindex @samp{Sequence > Narrow to Sequence...} menu item
7243 @cindex menu item, @samp{Sequence > Narrow to Sequence...}
7244 @kindex S n
7245 @findex mh-narrow-to-seq
7246 @item S n
7247 Restrict display to messages in sequence (@code{mh-narrow-to-seq}).
7248 @c -------------------------
7249 @cindex @samp{Sequence > Add Message to Sequence...} menu item
7250 @cindex menu item, @samp{Sequence > Add Message to Sequence...}
7251 @kindex S p
7252 @findex mh-put-msg-in-seq
7253 @item S p
7254 Add range to sequence (@code{mh-put-msg-in-seq}).
7255 @c -------------------------
7256 @cindex @samp{Sequence > List Sequences for Message} menu item
7257 @cindex menu item, @samp{Sequence > List Sequences for Message}
7258 @kindex S s
7259 @findex mh-msg-is-in-seq
7260 @item S s
7261 Display the sequences in which the current message appears
7262 (@code{mh-msg-is-in-seq}).
7263 @c -------------------------
7264 @cindex @samp{Sequence > Widen from Sequence} menu item
7265 @cindex menu item, @samp{Sequence > Widen from Sequence}
7266 @kindex S w
7267 @findex mh-widen
7268 @item S w
7269 Remove last restriction (@code{mh-widen}).
7270 @c -------------------------
7271 @findex mh-update-sequences
7272 @item M-x mh-update-sequences
7273 Flush MH-E's state out to MH@.
7274 @end table
7275
7276 @cindex @samp{mh-sequences} customization group
7277 @cindex customization group, @samp{mh-sequences}
7278
7279 The @samp{mh-sequences} customization group contains the options
7280 associated with sequences.
7281
7282 @vtable @code
7283 @item mh-refile-preserves-sequences-flag
7284 On means that sequences are preserved when messages are refiled
7285 (default: @samp{on}).
7286 @c -------------------------
7287 @item mh-tick-seq
7288 The name of the MH sequence for ticked messages (default: @samp{'tick}).
7289 @c -------------------------
7290 @item mh-update-sequences-after-mh-show-flag
7291 On means flush MH sequences to disk after message is shown (default:
7292 @samp{on}).
7293 @end vtable
7294
7295 The following hook is available.
7296
7297 @vtable @code
7298 @item mh-unseen-updated-hook
7299 Hook run after the unseen sequence has been updated (default: @code{nil}).
7300 @end vtable
7301
7302 @cindex @command{pick}
7303 @cindex MH commands, @command{pick}
7304 @findex mh-put-msg-in-seq
7305 @kindex S p
7306
7307 To place a message in a sequence, use @kbd{S p}
7308 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all
7309 the messages in a sequence to another sequence (for example, @kbd{C-u
7310 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}).
7311
7312 @cindex @samp{tick} sequence
7313 @cindex sequence, @samp{tick}
7314 @cindex ticking messages
7315 @findex mh-index-ticked-messages
7316 @findex mh-toggle-tick
7317 @kindex '
7318 @kindex F '
7319 @kindex S p
7320
7321 One specific use of the @kbd{S p} command is @kbd{'}
7322 (@code{mh-toggle-tick}) which adds messages to the @samp{tick}
7323 sequence. This sequence can be viewed later with the @kbd{F '}
7324 (@code{mh-index-ticked-messages}) command (@pxref{Folders}).
7325
7326 @vindex mh-tick-seq
7327
7328 You can customize the option @code{mh-tick-seq} if you already use the
7329 @samp{tick} sequence for your own use. You can also disable all of the
7330 ticking functions by choosing the @samp{Disable Ticking} item but
7331 there isn't much advantage to that.
7332
7333 @cindex MH-Folder mode
7334 @cindex modes, MH-Folder
7335 @findex mh-narrow-to-seq
7336 @findex mh-narrow-to-tick
7337 @findex mh-widen
7338 @kindex S '
7339 @kindex S n
7340 @kindex S w
7341
7342 Once you've placed some messages in a sequence, you may wish to narrow
7343 the field of view to just those messages in the sequence you've
7344 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are
7345 prompted for the name of the sequence. What this does is show only
7346 those messages that are in the selected sequence in the MH-Folder
7347 buffer. In addition, it limits further MH-E searches to just those
7348 messages. To narrow the view to the messages in the @samp{tick}
7349 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to
7350 widen the view to all your messages again, use @kbd{S w}
7351 (@code{mh-widen}).
7352
7353 @cindex buffers, @samp{*MH-E Sequences*}
7354 @cindex @samp{*MH-E Sequences*}
7355 @findex mh-list-sequences
7356 @findex mh-msg-is-in-seq
7357 @kindex S l
7358 @kindex S s
7359
7360 You can see which sequences in which a message appears with the
7361 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to
7362 display the sequences in which another message appears (as in @kbd{C-u
7363 42 S s @key{RET}}). Or, you can list all sequences in a selected
7364 folder (default is current folder) with @kbd{S l}
7365 (@code{mh-list-sequences}). The list appears in a buffer named
7366 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}).
7367
7368 @cindex MH profile component, @samp{Previous-Sequence:}
7369 @cindex @samp{cur} sequence
7370 @cindex @samp{Previous-Sequence:} MH profile component
7371 @cindex sequence, @samp{cur}
7372 @cindex sequence, @samp{Previous-Sequence}
7373 @vindex mh-refile-preserves-sequences-flag
7374
7375 If a message is in any sequence (except
7376 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and
7377 @samp{cur}) when it is refiled, then it will still be in those
7378 sequences in the destination folder. If this behavior is not desired,
7379 then turn off the option @code{mh-refile-preserves-sequences-flag}.
7380
7381 @findex mh-delete-msg-from-seq
7382 @findex mh-delete-seq
7383 @kindex d
7384 @kindex S d
7385 @kindex S k
7386
7387 If you want to remove a message (or range, @pxref{Ranges}) from a
7388 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want
7389 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In
7390 the latter case you are prompted for the sequence to delete. Note that
7391 this deletes only the sequence, not the messages in the sequence. If
7392 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading
7393 Mail}).
7394
7395 @cindex @samp{Unseen-Sequence:} MH profile component
7396 @cindex @samp{cur} sequence
7397 @cindex @samp{tick} sequence
7398 @cindex MH profile component, @samp{Unseen-Sequence:}
7399 @cindex sequence, @samp{Unseen-Sequence}
7400 @cindex sequence, @samp{cur}
7401 @cindex sequence, @samp{tick}
7402 @findex mh-update-sequences
7403 @kindex M-x mh-update-sequences
7404 @kindex q
7405 @kindex x
7406 @vindex mh-tick-seq
7407 @vindex mh-update-sequences-after-mh-show-flag
7408
7409 Three sequences are maintained internally by MH-E and pushed out to MH
7410 when a message is shown. They include the sequence specified by your
7411 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the
7412 sequence listed by the option @code{mh-tick-seq} which is @samp{tick}
7413 by default. If you do not like this behavior, turn off the option
7414 @code{mh-update-sequences-after-mh-show-flag}. You can then update the
7415 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x
7416 mh-update-sequences} commands.
7417
7418 @vindex mh-seen-list
7419 @vindex mh-unseen-updated-hook
7420
7421 The hook @code{mh-unseen-updated-hook} is run after the unseen
7422 sequence has been updated. The variable @code{mh-seen-list} can be
7423 used by this hook to obtain the list of messages which were removed
7424 from the unseen sequence.
7425
7426 @cindex @command{mark}
7427 @cindex MH commands, @command{mark}
7428 @kindex S n
7429 @kindex S w
7430
7431 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
7432 command dealing with sequences is @command{mark}@footnote{See the
7433 section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks
7434 with mark} in the MH book.}.
7435
7436 @node Junk, Miscellaneous, Sequences, Top
7437 @chapter Dealing With Junk Mail
7438
7439 @cindex Marshall Rose
7440 @cindex junk mail
7441 @cindex spam
7442
7443 Marshall Rose once wrote a paper on MH entitled, @cite{How to process
7444 200 messages a day and still get some real work done}. This chapter
7445 could be entitled, @cite{How to process 1000 spams a day and still get
7446 some real work done}.
7447
7448 @cindex blacklisting
7449 @cindex ham
7450 @cindex viruses
7451 @cindex whitelisting
7452 @cindex worms
7453
7454 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for
7455 any unwanted message which includes spam, @dfn{viruses}, and
7456 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying
7457 a sender as one who sends junk mail is called @dfn{blacklisting}; the
7458 opposite is called @dfn{whitelisting}.
7459
7460 @table @kbd
7461 @kindex J ?
7462 @findex mh-prefix-help
7463 @item J ?
7464 Display cheat sheet for the commands of the current prefix in
7465 minibuffer (@code{mh-prefix-help}).
7466 @c -------------------------
7467 @kindex J b
7468 @findex mh-junk-blacklist
7469 @item J b
7470 Blacklist range as spam (@code{mh-junk-blacklist}).
7471 @c -------------------------
7472 @kindex J w
7473 @findex mh-junk-whitelist
7474 @item J w
7475 Whitelist range as ham (@code{mh-junk-whitelist}).
7476 @c -------------------------
7477 @item @code{mh-spamassassin-identify-spammers}
7478 Identify spammers who are repeat offenders.
7479 @end table
7480
7481 @cindex @samp{mh-junk} customization group
7482 @cindex customization group, @samp{mh-junk}
7483
7484 The following table lists the options from the @samp{mh-junk}
7485 customization group.
7486
7487 @vtable @code
7488 @item mh-junk-background
7489 If on, spam programs are run in background (default: @samp{off}).
7490 @c -------------------------
7491 @item mh-junk-disposition
7492 Disposition of junk mail (default: @samp{Delete Spam}).
7493 @c -------------------------
7494 @item mh-junk-program
7495 Spam program that MH-E should use (default: @samp{Auto-detect}).
7496 @end vtable
7497
7498 @cindex SpamProbe
7499 @cindex Spamassassin
7500 @cindex bogofilter
7501 @cindex spam filters, SpamProbe
7502 @cindex spam filters, Spamassassin
7503 @cindex spam filters, bogofilter
7504
7505 MH-E depends on @uref{http://www.spamassassin.org/, SpamAssassin},
7506 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or
7507 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck
7508 away. This chapter describes briefly how to configure these programs
7509 to work well with MH-E and how to use MH-E's interface that provides
7510 continuing education for these programs.
7511
7512 @vindex mh-junk-program
7513
7514 The default setting of the option @code{mh-junk-program} is
7515 @samp{Auto-detect} which means that MH-E will automatically choose one
7516 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for
7517 example, you have both SpamAssassin and bogofilter installed and you
7518 want to use bogofilter, then you can set this option to
7519 @samp{Bogofilter}.
7520
7521 @findex mh-junk-blacklist
7522 @kindex J b
7523 @vindex mh-junk-disposition
7524
7525 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam
7526 program in use with the content of the range (@pxref{Ranges}) and then
7527 handles the message(s) as specified by the option
7528 @code{mh-junk-disposition}. By default, this option is set to
7529 @samp{Delete Spam} but you can also specify the name of the folder
7530 which is useful for building a corpus of spam for training purposes.
7531
7532 @findex mh-junk-whitelist
7533 @kindex J w
7534
7535 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist})
7536 reclassifies a range of messages (@pxref{Ranges}) as ham if it were
7537 incorrectly classified as spam. It then refiles the message into the
7538 @file{+inbox} folder.
7539
7540 @vindex mh-junk-background
7541
7542 By default, the programs are run in the foreground, but this can be
7543 slow when junking large numbers of messages. If you have enough memory
7544 or don't junk that many messages at the same time, you might try
7545 turning on the option @code{mh-junk-background}.
7546
7547 The following sections discuss the various counter-spam measures that
7548 MH-E can work with.
7549
7550 @cindex @file{.procmailrc}
7551 @cindex files, @file{.procmailrc}
7552
7553 @subheading SpamAssassin
7554
7555 @cindex Spamassassin
7556 @cindex spam filters, Spamassassin
7557
7558 SpamAssassin is one of the more popular spam filtering programs. Get
7559 it from your local distribution or from the
7560 @uref{http://spamassassin.org/, SpamAssassin web site}.
7561
7562 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}:
7563
7564 @cindex @command{spamc}
7565 @cindex @samp{X-Spam-Level:} header field
7566 @cindex @samp{X-Spam-Status:} header field
7567 @cindex header field, @samp{X-Spam-Level:}
7568 @cindex header field, @samp{X-Spam-Status:}
7569
7570 @smallexample
7571 MAILDIR=$HOME/`mhparam Path`
7572
7573 # Fight spam with SpamAssassin.
7574 :0fw
7575 | spamc
7576
7577 # Anything with a spam level of 10 or more is junked immediately.
7578 :0:
7579 * ^X-Spam-Level: ..........
7580 /dev/null
7581
7582 :0:
7583 * ^X-Spam-Status: Yes
7584 spam/.
7585 @end smallexample
7586
7587 If you don't use @command{spamc}, use @samp{spamassassin -P -a}.
7588
7589 Note that one of the recipes above throws away messages with a score
7590 greater than or equal to 10. Here's how you can determine a value that
7591 works best for you.
7592
7593 First, run @samp{spamassassin -t} on every mail message in your
7594 archive and use @command{gnumeric} to verify that the average plus the
7595 standard deviation of good mail is under 5, the SpamAssassin default
7596 for ``spam''.
7597
7598 Using @command{gnumeric}, sort the messages by score and view the
7599 messages with the highest score. Determine the score which encompasses
7600 all of your interesting messages and add a couple of points to be
7601 conservative. Add that many dots to the @samp{X-Spam-Level:} header
7602 field above to send messages with that score down the drain.
7603
7604 In the example above, messages with a score of 5-9 are set aside in
7605 the @samp{+spam} folder for later review. The major weakness of
7606 rules-based filters is a plethora of false positives so it is
7607 worthwhile to check.
7608
7609 @findex mh-junk-blacklist
7610 @findex mh-junk-whitelist
7611 @kindex J b
7612 @kindex J w
7613
7614 If SpamAssassin classifies a message incorrectly, or is unsure, you can
7615 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and
7616 @kbd{J w} (@code{mh-junk-whitelist}).
7617
7618 @cindex @command{sa-learn}
7619 @cindex @file{.spamassassin/user_prefs}
7620 @cindex files, @file{.spamassassin/user_prefs}
7621
7622 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a
7623 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs},
7624 deletes the message, and sends the message to the Razor, so that
7625 others might not see this spam. If the @command{sa-learn} command is
7626 available, the message is also recategorized as spam.
7627
7628 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a
7629 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If
7630 the @command{sa-learn} command is available, the message is also
7631 recategorized as ham.
7632
7633 Over time, you'll observe that the same host or domain occurs
7634 repeatedly in the @samp{blacklist_from} entries, so you might think
7635 that you could avoid future spam by blacklisting all mail from a
7636 particular domain. The utility function
7637 @code{mh-spamassassin-identify-spammers} helps you do precisely that.
7638 This function displays a frequency count of the hosts and domains in
7639 the @samp{blacklist_from} entries from the last blank line in
7640 @file{~/.spamassassin/user_prefs} to the end of the file. This
7641 information can be used so that you can replace multiple
7642 @samp{blacklist_from} entries with a single wildcard entry such as:
7643
7644 @smallexample
7645 blacklist_from *@@*amazingoffersdirect2u.com
7646 @end smallexample
7647
7648 In versions of SpamAssassin (2.50 and on) that support a Bayesian
7649 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program
7650 @command{sa-learn} to recategorize the message as spam. Neither MH-E,
7651 nor SpamAssassin, rebuilds the database after adding words, so you
7652 will need to run @samp{sa-learn --rebuild} periodically. This can be
7653 done by adding the following to your @file{crontab}:
7654
7655 @smallexample
7656 0 * * * * sa-learn --rebuild > /dev/null 2>&1
7657 @end smallexample
7658
7659 @subheading Bogofilter
7660
7661 @cindex bogofilter
7662 @cindex spam filters, bogofilter
7663
7664 Bogofilter is a Bayesian spam filtering program. Get it from your
7665 local distribution or from the
7666 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}.
7667
7668 Bogofilter is taught by running:
7669
7670 @smallexample
7671 bogofilter -n < good-message
7672 @end smallexample
7673
7674 on every good message, and
7675
7676 @smallexample
7677 bogofilter -s < spam-message
7678 @end smallexample
7679
7680 @cindex full training
7681
7682 on every spam message. This is called a @dfn{full training}; three
7683 other training methods are described in the FAQ that is distributed
7684 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of
7685 each type of message to start doing a good job.
7686
7687 To use bogofilter, add the following recipes to @file{~/.procmailrc}:
7688
7689 @cindex @samp{X-Bogosity:} header field
7690 @cindex header field, @samp{X-Bogosity:}
7691
7692 @smallexample
7693 MAILDIR=$HOME/`mhparam Path`
7694
7695 # Fight spam with Bogofilter.
7696 :0fw
7697 | bogofilter -3 -e -p
7698
7699 :0:
7700 * ^X-Bogosity: Yes, tests=bogofilter
7701 spam/.
7702
7703 :0:
7704 * ^X-Bogosity: Unsure, tests=bogofilter
7705 spam/unsure/.
7706 @end smallexample
7707
7708 @findex mh-junk-blacklist
7709 @findex mh-junk-whitelist
7710 @kindex J b
7711 @kindex J w
7712
7713 If bogofilter classifies a message incorrectly, or is unsure, you can
7714 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J
7715 w} (@code{mh-junk-whitelist}) to update bogofilter's training.
7716
7717 The @cite{Bogofilter FAQ} suggests that you run the following
7718 occasionally to shrink the database:
7719
7720 @smallexample
7721 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new
7722 mv wordlist.db wordlist.db.prv
7723 mv wordlist.db.new wordlist.db
7724 @end smallexample
7725
7726 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune
7727 bogofilter.
7728
7729 @subheading SpamProbe
7730
7731 @cindex SpamProbe
7732 @cindex spam filters, SpamProbe
7733
7734 SpamProbe is a Bayesian spam filtering program. Get it from your local
7735 distribution or from the @uref{http://spamprobe.sourceforge.net,
7736 SpamProbe web site}.
7737
7738 To use SpamProbe, add the following recipes to @file{~/.procmailrc}:
7739
7740 @cindex @command{formail}
7741 @cindex @samp{X-SpamProbe:} header field
7742 @cindex header field, @samp{X-SpamProbe:}
7743
7744 @smallexample
7745 MAILDIR=$HOME/`mhparam Path`
7746
7747 # Fight spam with SpamProbe.
7748 :0
7749 SCORE=| spamprobe receive
7750
7751 :0 wf
7752 | formail -I "X-SpamProbe: $SCORE"
7753
7754 :0:
7755 *^X-SpamProbe: SPAM
7756 spam/.
7757 @end smallexample
7758
7759 @findex mh-junk-blacklist
7760 @findex mh-junk-whitelist
7761 @kindex J b
7762 @kindex J w
7763
7764 If SpamProbe classifies a message incorrectly, you can use the MH-E
7765 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w}
7766 (@code{mh-junk-whitelist}) to update SpamProbe's training.
7767
7768 @subheading Other Things You Can Do
7769
7770 There are a couple of things that you can add to @file{~/.procmailrc}
7771 in order to filter out a lot of spam and viruses. The first is to
7772 eliminate any message with a Windows executable (which is most likely
7773 a virus). The second is to eliminate mail in character sets that you
7774 can't read.
7775
7776 @cindex @samp{Content-Transfer-Encoding:} header field
7777 @cindex @samp{Content-Type:} header field
7778 @cindex @samp{Subject:} header field
7779 @cindex header field, @samp{Content-Transfer-Encoding:}
7780 @cindex header field, @samp{Content-Type:}
7781 @cindex header field, @samp{Subject:}
7782
7783 @smallexample
7784 MAILDIR=$HOME/`mhparam Path`
7785
7786 #
7787 # Filter messages with win32 executables/virii.
7788 #
7789 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg
7790 # pattern. The string "this program cannot be run in MS-DOS mode"
7791 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false
7792 # positives (Roland Smith via Pete from the bogofilter mailing list).
7793 #
7794 :0 B:
7795 * ^Content-Transfer-Encoding:.*base64
7796 * ^TVqQAAMAAAAEAAAA//8AALg
7797 * 4fug4AtAnNIbg
7798 spam/exe/.
7799
7800 #
7801 # Filter mail in unreadable character sets (from the Bogofilter FAQ).
7802 #
7803 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987'
7804
7805 :0:
7806 * 1^0 $ ^Subject:.*=\?($UNREADABLE)
7807 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE)
7808 spam/unreadable/.
7809
7810 :0:
7811 * ^Content-Type:.*multipart
7812 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE)
7813 spam/unreadable/.
7814 @end smallexample
7815
7816 @node Miscellaneous, Scan Line Formats, Junk, Top
7817 @chapter Miscellaneous Commands, Variables, and Buffers
7818
7819 This chapter covers the following command and the various MH-E
7820 buffers,
7821
7822 @ftable @code
7823 @item mh-version
7824 Display version information about MH-E and the MH mail handling
7825 system.
7826 @end ftable
7827
7828 @cindex buffers, @samp{*MH-E Info*}
7829 @cindex MH-E version
7830 @cindex @samp{*MH-E Info*}
7831 @cindex version
7832 @kindex M-x mh-version
7833
7834 One command worth noting is @kbd{M-x mh-version}. You can compare the
7835 version this command prints to the latest release (@pxref{Getting
7836 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named
7837 @samp{*MH-E Info*}, should usually be included with any bug report you
7838 submit (@pxref{Bug Reports}).
7839
7840 @subheading MH-E Buffers
7841
7842 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates
7843 several other buffers. They are:
7844
7845 @table @samp
7846 @cindex @samp{*MH-E Folders*}
7847 @cindex buffers, @samp{*MH-E Folders*}
7848 @findex mh-list-folders
7849 @item *MH-E Folders*
7850 @kindex F l
7851 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}).
7852 @xref{Folders}.
7853 @c -------------------------
7854 @cindex @samp{*MH-E Help*}
7855 @cindex buffers, @samp{*MH-E Help*}
7856 @findex mh-help
7857 @item *MH-E Help*
7858 @kindex ?
7859 @kindex C-c ?
7860 This buffer contains the output of @kbd{?} (@code{mh-help}) and
7861 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}.
7862 @c -------------------------
7863 @cindex @samp{*MH-E Info*}
7864 @cindex buffers, @samp{*MH-E Info*}
7865 @item *MH-E Info*
7866 This buffer contains the output of @kbd{M-x mh-version @key{RET}}.
7867 @c -------------------------
7868 @cindex @samp{*MH-E Log*}
7869 @cindex buffers, @samp{*MH-E Log*}
7870 @item *MH-E Log*
7871 This buffer contains the last 100 lines of the output of the various
7872 MH commands.
7873 @c -------------------------
7874 @cindex @samp{*MH-E Mail Delivery*}
7875 @cindex buffers, @samp{*MH-E Mail Delivery*}
7876 @item *MH-E Mail Delivery*
7877 This buffer contains the transcript of a mail delivery. @xref{Sending
7878 Message}.
7879 @c -------------------------
7880 @cindex @samp{*MH-E Recipients*}
7881 @cindex buffers, @samp{*MH-E Recipients*}
7882 @findex mh-check-whom
7883 @item *MH-E Recipients*
7884 @kindex C-c C-w
7885 This buffer contains the output of @kbd{C-c C-w}
7886 (@code{mh-check-whom}) and is killed when draft is sent.
7887 @xref{Checking Recipients}.
7888 @c -------------------------
7889 @cindex @samp{*MH-E Sequences*}
7890 @cindex buffers, @samp{*MH-E Sequences*}
7891 @item *MH-E Sequences*
7892 This buffer contains the output of @kbd{S l}
7893 (@code{mh-list-sequences}). @xref{Sequences}.
7894 @c -------------------------
7895 @cindex @samp{*mh-temp*}
7896 @cindex buffers, @samp{*mh-temp*}
7897 @item *mh-temp*
7898 This is a scratch, ephemeral, buffer used by MH-E functions. Note that
7899 it is hidden because the first character in the name is a space.
7900 You'll generally not have any need for this buffer.
7901 @end table
7902
7903 @node Scan Line Formats, Procmail, Miscellaneous, Top
7904 @appendix Scan Line Formats
7905
7906 @cindex scan line formats
7907
7908 This appendix discusses how MH-E creates, parses, and manipulates scan
7909 lines. If you have your own MH scan or inc format files, you
7910 @strong{can} teach MH-E how to handle them, but it isn't easy as
7911 you'll see.
7912
7913 @cindex @samp{mh-scan-line-formats} customization group
7914 @cindex customization group, @samp{mh-scan-line-formats}
7915
7916 This table lists the options in the @samp{mh-scan-line-formats}
7917 customization group.
7918
7919 @vtable @code
7920 @item mh-adaptive-cmd-note-flag
7921 On means that the message number width is determined dynamically
7922 (default: @samp{on}).
7923 @c -------------------------
7924 @item mh-scan-format-file
7925 Specifies the format file to pass to the scan program (default:
7926 @samp{Use MH-E scan Format}).
7927 @c -------------------------
7928 @item mh-scan-prog
7929 Program used to scan messages (default: @code{"scan"}).
7930 @end vtable
7931
7932 @vindex mh-adaptive-cmd-note-flag
7933
7934 There are a couple of caveats when creating your own scan format file.
7935 First, MH-E will not work if your scan lines do not include message
7936 numbers. It will work poorly if you don't dedicate a column for
7937 showing the current message and notations. You won't be able to use
7938 the option @code{mh-adaptive-cmd-note-flag} or the threading features
7939 (@pxref{Threading}).
7940
7941 @cindex message numbers
7942 @findex mh-set-cmd-note
7943 @vindex mh-adaptive-cmd-note-flag
7944 @vindex mh-scan-format-file
7945
7946 If you've created your own format to handle long message numbers,
7947 you'll be pleased to know you no longer need it since MH-E adapts its
7948 internal format based upon the largest message number if
7949 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer
7950 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag}
7951 and call @code{mh-set-cmd-note} with the width specified by your
7952 format file (see @code{mh-scan-format-file}). For example, the default
7953 width is 4, so you would use @samp{(mh-set-cmd-note 4)}.
7954
7955 @vindex mh-adaptive-cmd-note-flag
7956 @vindex mh-scan-format-file
7957 @vindex mh-scan-format-mh
7958 @vindex mh-scan-format-nmh
7959
7960 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E
7961 scan Format}. This means that the format string will be taken from the
7962 either @code{mh-scan-format-mh} or @code{mh-scan-format-nmh} depending
7963 on whether MH or nmh (or GNU mailutils) is in use. This setting also
7964 enables you to turn on the option @code{mh-adaptive-cmd-note-flag}.
7965 You can also set this option to @samp{Use Default scan Format} to get
7966 the same output as you would get if you ran @command{scan} from the
7967 shell. If you have a format file that you want MH-E to use but not MH,
7968 you can set this option to @samp{Specify a scan Format File} and enter
7969 the name of your format file.
7970
7971 @vindex mh-scan-format-file
7972 @vindex mh-scan-format-mh
7973 @vindex mh-scan-format-nmh
7974
7975 The scan format that MH-E uses when @code{mh-scan-format-file} is set
7976 to its default of @samp{Use MH-E scan Format} is held in the variables
7977 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on
7978 whether you are using nmh (or GNU mailutils) or not. Typically, you
7979 create your own format files rather than modifying these variables.
7980 The value of @code{mh-scan-format-nmh} is:
7981
7982 @smallexample
7983 (concat
7984 "%4(msg)"
7985 "%<(cur)+%| %>"
7986 "%<@{replied@}-"
7987 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>"
7988 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>"
7989 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>"
7990 "%?(nonnull(comp@{newsgroups@}))n%>"
7991 "%<(zero) %>"
7992 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>"
7993 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>"
7994 "%<(zero)%17(decode(friendly@{from@}))%> "
7995 "%(decode@{subject@})%<@{body@}<<%@{body@}%>")
7996 @end smallexample
7997
7998 @cindex decoding RFC 2047
7999 @cindex RFC 2047, decoding
8000 @vindex mh-scan-format-mh
8001
8002 The setting for @code{mh-scan-format-mh} is similar, except that MH
8003 doesn't have the function @code{decode} (which is used to decode RFC
8004 2047 encodings).
8005
8006 @cindex notations, scan line
8007 @cindex scan line notations
8008
8009 These strings are passed to the @command{scan} program via the
8010 @option{-format} argument. The formats are identical to the defaults
8011 except that additional hints for fontification have been added to the
8012 existing notations in the fifth column (remember that in Emacs, the
8013 columns start at 0). The values of the fifth column, in priority
8014 order, are: @samp{-} if the message has been replied to, @samp{t} if
8015 an address in the @samp{To:} field matches one of the mailboxes of the
8016 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if
8017 the @samp{Bcc:} field matches, and @samp{n} if a non-empty
8018 @samp{Newsgroups:} field is present.
8019
8020 @cindex @command{scan}
8021 @cindex MH commands, @command{scan}
8022 @vindex mh-progs
8023 @vindex mh-scan-prog
8024
8025 The name of the program that generates a listing of one line per
8026 message is held in @code{mh-scan-prog} (default: @code{"scan"}).
8027 Unless this variable contains an absolute pathname, it is assumed to
8028 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
8029 link another program to @command{scan} (see @samp{mh-profile}(5)) to
8030 produce a different type of listing@footnote{See the section
8031 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
8032 pick Ranges Sequences} in the MH book.}.
8033
8034 @cindex regular expressions, scan line formats
8035 @findex mh-set-cmd-note
8036 @findex setq
8037
8038 If you change the format of the scan lines you'll need to tell MH-E
8039 how to parse the new format. As you will see, quite a lot of variables
8040 are involved to do that. Use @kbd{M-x apropos @key{RET}
8041 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You
8042 will also have to call @code{mh-set-cmd-note} if your notations are
8043 not in column 4 (columns in Emacs start with 0). Note that unlike most
8044 of the user options described in this manual, these are variables and
8045 must be set with @code{setq} instead of in a customization buffer. For
8046 help with regular expressions, see
8047 @ifnothtml
8048 @ref{Regexps, , Syntax of Regular Expressions, emacs, The
8049 GNU Emacs Manual}.
8050 @end ifnothtml
8051 @ifhtml
8052 section
8053 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
8054 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}.
8055 @end ifhtml
8056
8057 The first variable has to do with pruning out garbage.
8058
8059 @vtable @code
8060 @cindex @command{inc}
8061 @cindex MH commands, @command{inc}
8062 @cindex @command{scan}
8063 @cindex MH commands, @command{scan}
8064 @item mh-scan-valid-regexp
8065 This regular expression describes a valid scan line. This is used to
8066 eliminate error messages that are occasionally produced by
8067 @command{inc}@footnote{See the section
8068 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
8069 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
8070 @end vtable
8071
8072 Next, many variables control how the scan lines are parsed.
8073
8074 @vtable @code
8075 @vindex mh-folder-body
8076 @vindex mh-folder-font-lock-keywords
8077 @item mh-scan-body-regexp
8078 This regular expression matches the message body fragment. Note that
8079 the default setting of @code{mh-folder-font-lock-keywords} expects
8080 this expression to contain at least one parenthesized expression which
8081 matches the body text as in the default of
8082 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not
8083 correct, the body fragment will not be highlighted with the face
8084 @code{mh-folder-body}.
8085 @c -------------------------
8086 @vindex mh-folder-cur-msg-number
8087 @vindex mh-folder-font-lock-keywords
8088 @vindex mh-note-cur
8089 @item mh-scan-cur-msg-number-regexp
8090 This regular expression matches the current message. It must match
8091 from the beginning of the line. Note that the default setting of
8092 @code{mh-folder-font-lock-keywords} expects this expression to contain
8093 at least one parenthesized expression which matches the message number
8094 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This
8095 expression includes the leading space and current message marker
8096 @samp{+} within the parenthesis since it looks better to highlight
8097 these items as well. The highlighting is done with the face
8098 @code{mh-folder-cur-msg-number}. This regular expression should be
8099 correct as it is needed by non-fontification functions. See also
8100 @code{mh-note-cur}.
8101 @c -------------------------
8102 @vindex mh-folder-date
8103 @vindex mh-folder-font-lock-keywords
8104 @vindex mh-scan-sent-to-me-sender-regexp
8105 @item mh-scan-date-regexp
8106 This regular expression matches a valid date. It must @strong{not} be
8107 anchored to the beginning or the end of the line. Note that the
8108 default setting of @code{mh-folder-font-lock-keywords} expects this
8109 expression to contain only one parenthesized expression which matches
8110 the date field as in the default of
8111 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is
8112 not correct, the date will not be highlighted with the face
8113 @code{mh-folder-date}.
8114 @c -------------------------
8115 @vindex mh-folder-deleted
8116 @vindex mh-folder-font-lock-keywords
8117 @vindex mh-note-deleted
8118 @item mh-scan-deleted-msg-regexp
8119 This regular expression matches deleted messages. It must match from
8120 the beginning of the line. Note that the default setting of
8121 @code{mh-folder-font-lock-keywords} expects this expression to contain
8122 at least one parenthesized expression which matches the message number
8123 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression
8124 includes the leading space within the parenthesis since it looks
8125 better to highlight it as well. The highlighting is done with the face
8126 @code{mh-folder-deleted}. This regular expression should be correct as
8127 it is needed by non-fontification functions. See also
8128 @code{mh-note-deleted}.
8129 @c -------------------------
8130 @vindex mh-folder-font-lock-keywords
8131 @vindex mh-folder-msg-number
8132 @item mh-scan-good-msg-regexp
8133 This regular expression matches ``good'' messages. It must match from
8134 the beginning of the line. Note that the default setting of
8135 @code{mh-folder-font-lock-keywords} expects this expression to contain
8136 at least one parenthesized expression which matches the message number
8137 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This
8138 expression includes the leading space within the parenthesis since it
8139 looks better to highlight it as well. The highlighting is done with
8140 the face @code{mh-folder-msg-number}. This regular expression should
8141 be correct as it is needed by non-fontification functions.
8142 @c -------------------------
8143 @vindex mh-scan-format-file
8144 @item mh-scan-msg-format-regexp
8145 This regular expression finds the message number width in a scan
8146 format. Note that the message number must be placed in a parenthesized
8147 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This
8148 variable is only consulted if @code{mh-scan-format-file} is set to
8149 @samp{Use MH-E scan Format}.
8150 @c -------------------------
8151 @vindex mh-scan-format-file
8152 @item mh-scan-msg-format-string
8153 This is a format string for the width of the message number in a scan
8154 format. Use @samp{0%d} for zero-filled message numbers. This variable
8155 is only consulted if @code{mh-scan-format-file} is set to @samp{Use
8156 MH-E scan Format} (default: @code{"%d"}).
8157 @c -------------------------
8158 @item mh-scan-msg-number-regexp
8159 This regular expression extracts the message number. It must match
8160 from the beginning of the line. Note that the message number must be
8161 placed in a parenthesized expression as in the default of @w{@code{"^
8162 *\\([0-9]+\\)"}}.
8163 @c -------------------------
8164 @item mh-scan-msg-overflow-regexp
8165 This regular expression matches overflowed message numbers (default:
8166 @code{"^[?0-9][0-9]"}).
8167 @c -------------------------
8168 @item mh-scan-msg-search-regexp
8169 This regular expression matches a particular message. It is a format
8170 string; use @samp{%d} to represent the location of the message number
8171 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}.
8172 @c -------------------------
8173 @vindex mh-folder-address
8174 @vindex mh-folder-font-lock-keywords
8175 @vindex mh-folder-to
8176 @item mh-scan-rcpt-regexp
8177 This regular expression specifies the recipient in messages you sent.
8178 Note that the default setting of @code{mh-folder-font-lock-keywords}
8179 expects this expression to contain two parenthesized expressions. The
8180 first is expected to match the @samp{To:} that the default scan format
8181 file generates. The second is expected to match the recipient's name
8182 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this
8183 regular expression is not correct, the @samp{To:} string will not be
8184 highlighted with the face @code{mh-folder-to} and the recipient will not be
8185 highlighted with the face @code{mh-folder-address}.
8186 @c -------------------------
8187 @vindex mh-folder-font-lock-keywords
8188 @vindex mh-folder-refiled
8189 @vindex mh-note-refiled
8190 @item mh-scan-refiled-msg-regexp
8191 This regular expression matches refiled messages. It must match from
8192 the beginning of the line. Note that the default setting of
8193 @code{mh-folder-font-lock-keywords} expects this expression to contain
8194 at least one parenthesized expression which matches the message number
8195 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression
8196 includes the leading space within the parenthesis since it looks
8197 better to highlight it as well. The highlighting is done with the face
8198 @code{mh-folder-refiled}. This regular expression should be correct as
8199 it is needed by non-fontification functions. See also
8200 @code{mh-note-refiled}.
8201 @c -------------------------
8202 @vindex mh-folder-font-lock-keywords
8203 @vindex mh-folder-sent-to-me-sender
8204 @vindex mh-mh-folder-sent-to-me-hint
8205 @vindex mh-scan-format-nmh
8206 @item mh-scan-sent-to-me-sender-regexp
8207 This regular expression matches messages sent to us. Note that the
8208 default setting of @code{mh-folder-font-lock-keywords} expects this
8209 expression to contain at least two parenthesized expressions. The
8210 first should match the fontification hint (see
8211 @code{mh-scan-format-nmh}) and the second should match the user name
8212 as in the default of
8213 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}.
8214 If this regular expression is not correct, the notation hints will not
8215 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and
8216 the sender will not be highlighted with the face
8217 @code{mh-folder-sent-to-me-sender}.
8218 @c -------------------------
8219 @vindex mh-folder-followup
8220 @vindex mh-folder-font-lock-keywords
8221 @vindex mh-folder-subject
8222 @item mh-scan-subject-regexp
8223 This regular expression matches the subject. It must match from the
8224 beginning of the line. Note that the default setting of
8225 @samp{mh-folder-font-lock-keywords} expects this expression to contain
8226 at least three parenthesized expressions. The first is expected to
8227 match the @samp{Re:} string, if any, and is highlighted with the face
8228 @code{mh-folder-followup}. The second matches an optional bracketed
8229 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a
8230 sub-expression of the first expression). The third is expected to
8231 match the subject line itself which is highlighted with the face
8232 @code{mh-folder-subject}. For example, the default is
8233 @w{@code{"^ *[0-9]+........[ ]*...................}}@*
8234 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}.
8235 This regular expression should be correct as it is needed by
8236 non-fontification functions. Note that this example is broken up on
8237 two lines for readability, but is actually a single string.
8238 @end vtable
8239
8240 Finally, there are a slew of variables that control how MH-E annotates
8241 the scan lines.
8242
8243 @vtable @code
8244 @findex mh-set-cmd-note
8245 @vindex mh-adaptive-cmd-note-flag
8246 @item mh-cmd-note
8247 Column for notations (default: 4). This variable should be set with
8248 the function @code{mh-set-cmd-note}. This variable may be updated
8249 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following
8250 variables contain the notational characters. Note that columns in
8251 Emacs start with 0.
8252 @c -------------------------
8253 @item mh-note-copied
8254 Messages that have been copied are marked by this character (default:
8255 @code{?C}).
8256 @c -------------------------
8257 @vindex mh-scan-cur-msg-number-regexp
8258 @item mh-note-cur
8259 The current message (in MH, not in MH-E) is marked by this character
8260 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}.
8261 @c -------------------------
8262 @vindex mh-scan-deleted-msg-regexp
8263 @item mh-note-deleted
8264 Messages that have been deleted are marked by this character (default:
8265 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}.
8266 @c -------------------------
8267 @item mh-note-dist
8268 Messages that have been redistributed are marked by this character
8269 (default: @code{?R}).
8270 @c -------------------------
8271 @item mh-note-forw
8272 Messages that have been forwarded are marked by this character
8273 (default: @code{?F}).
8274 @c -------------------------
8275 @item mh-note-printed
8276 Messages that have been printed are marked by this character (default:
8277 @code{?P}).
8278 @c -------------------------
8279 @vindex mh-scan-refiled-msg-regexp
8280 @item mh-note-refiled
8281 Messages that have been refiled are marked by this character (default:
8282 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}.
8283 @c -------------------------
8284 @item mh-note-repl
8285 Messages that have been replied to are marked by this character
8286 (default: @code{?-}).
8287 @c -------------------------
8288 @item mh-note-seq
8289 Messages in a user-defined sequence are marked by this character
8290 (default: @code{?%}). Messages in the @samp{search} sequence are
8291 marked by this character as well.
8292 @end vtable
8293
8294 For example, let's say I have the following in @file{scan.format}
8295 which displays the sender, the subject, and the message number. This
8296 format places a @samp{+} after the message number for the current
8297 message according to MH; it also uses that column for notations.
8298
8299 @smallexample
8300 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %>
8301 @end smallexample
8302
8303 @vindex mh-adaptive-cmd-note-flag
8304 @vindex mh-scan-format-file
8305 @vindex mh-scan-format-file, example
8306
8307 The first thing you have to do is tell MH-E to use this file.
8308 Customize @code{mh-scan-format-file} and set its value to @samp{Use
8309 Default scan Format}. If you didn't get already turn off
8310 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first.
8311
8312 Next, tell MH-E what a valid scan line looks like so that you can at
8313 least display the output of scan in your MH-Folder buffer.
8314
8315 @vindex mh-scan-valid-regexp, example
8316
8317 @smalllisp
8318 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$")
8319 @end smalllisp
8320
8321 Now, in order to get rid of the @samp{Cursor not pointing to message}
8322 message, you need to tell MH-E how to access the message number. You
8323 should also see why MH-E requires that you include a message number in
8324 the first place.
8325
8326 @vindex mh-scan-msg-number-regexp, example
8327 @vindex mh-scan-msg-search-regexp, example
8328
8329 @smalllisp
8330 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8331 (setq mh-scan-msg-search-regexp " %d[+D^ ]$")
8332 @end smalllisp
8333
8334 In order to get the next and previous commands working, add this.
8335
8336 @vindex mh-scan-good-msg-regexp, example
8337
8338 @smalllisp
8339 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8340 @end smalllisp
8341
8342 Note that the current message isn't marked with a @samp{+} when moving
8343 between the next and previous messages. Here is the code required to
8344 get this working.
8345
8346 @vindex set-mh-cmd-note, example
8347 @vindex mh-scan-cur-msg-number-regexp, example
8348
8349 @smalllisp
8350 (set-mh-cmd-note 76)
8351 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$")
8352 @end smalllisp
8353
8354 Finally, add the following to delete and refile messages.
8355
8356 @vindex mh-scan-deleted-msg-regexp, example
8357 @vindex mh-scan-refiled-msg-regexp, example
8358
8359 @smalllisp
8360 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$")
8361 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$")
8362 @end smalllisp
8363
8364 This is just a bare minimum; it's best to adjust all of the regular
8365 expressions to ensure that MH-E and highlighting perform well.
8366
8367 @node Procmail, Odds and Ends, Scan Line Formats, Top
8368 @appendix Reading Mailing Lists Effectively
8369
8370 @cindex @command{procmail}
8371 @cindex @command{slocal}
8372 @cindex Gnus
8373 @cindex MH commands, @command{slocal}
8374 @cindex Unix commands, @command{procmail}
8375 @cindex mailing lists, reading
8376
8377 This appendix explains how to use @uref{http://www.procmail.org/,
8378 procmail} to file mail from mailing lists into folders which can then
8379 be read easily with MH-E@footnote{The MH equivalent, @command{slocal},
8380 can be used as well, but procmail is more flexible and more packages
8381 exist for procmail than for slocal.}. Some mailing lists have such
8382 high traffic that Gnus must be used and I discuss how to use Gnus
8383 side-by-side with MH-E.
8384
8385 @cindex @file{.procmailrc}
8386 @cindex files, @file{.procmailrc}
8387
8388 First, I'll describe how to put mail from your mailing lists directly
8389 into an MH folder using @command{procmail}. First, add the following
8390 to @file{~/.procmailrc}. While the logging variables aren't strictly
8391 necessary, they are extremely useful.
8392
8393 @smallexample
8394 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam.
8395 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin
8396 [3]
8397 [4] # Point LOGFILE at the actual log file.
8398 [5] LOGFILE=$HOME/.procmail.log
8399 [6]
8400 [7] # This setting provides just the right amount of information.
8401 [8] LOGABSTRACT=all
8402 [9]
8403 [10] # Uncomment the following line to see how your patterns match.
8404 [11] #VERBOSE=yes
8405 [12]
8406 [13] # Place mail sent to any MH-E mailing list in +mh-e.
8407 [14] :0 w: mh-e$LOCKEXT
8408 [15] * ^TO.*mh-e-.*@.*sourceforge.net
8409 [16] | myrcvstore -create +mh-e
8410 @end smallexample
8411
8412 @cindex @command{rcvstore}
8413 @cindex MH commands, @command{rcvstore}
8414
8415 Line 14 creates a lock file in your mail directory based upon the name
8416 of the folder. This is done because @command{rcvstore} does not
8417 perform locking. While this lock file will prevent @command{procmail}
8418 from writing to a folder concurrently, there is a slight chance that
8419 you might lose a message if you're performing operations on a folder
8420 at the same time @command{rcvstore} is placing a message there. You
8421 have been warned. Now that that disclaimer is out of the way, note
8422 that I've been using this set-up for over a decade and haven't lost
8423 anything to my knowledge@footnote{See
8424 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166,
8425 Savannah issue #4361} to see if @command{rcvstore} locking is still an
8426 issue.}.
8427
8428 @cindex @samp{Unseen-Sequence:} MH profile component
8429 @cindex MH profile component, @samp{Unseen-Sequence:}
8430
8431 Line 16 uses the following script, @code{myrcvstore}, to massage the
8432 message as described in the comment and file the message in the given
8433 folder@footnote{The @samp{-create} argument wasn't always the default
8434 to @command{rcvstore}.}.
8435
8436 @smallexample
8437 #! /bin/sh
8438
8439 # Accepts a message on standard input and passes it through rcvstore
8440 # after first passing it through any filters. All arguments are passed
8441 # on to rcvstore.
8442
8443 # Force the "From user date" to become part of header. One reason this
8444 # is done is because the presence of the From field confuses dist so
8445 # that dist adds a new header, rather than using the existing header.
8446 # Note that this should not be done for any message that goes into a
8447 # Gnus incoming file (Gnus will thrown an error) nor should it be
8448 # applied to any message that goes to the system mailbox because the
8449 # entire mailbox will be incorporated as a single message.
8450 formail -c -z -R 'From ' X-Envelope-From: |
8451 rcvstore $@@
8452 @end smallexample
8453
8454 If your version of @command{rcvstore} doesn't add messages to the
8455 @samp{unseen} sequence by default, add the following line to your MH
8456 profile:
8457
8458 @smallexample
8459 Unseen-Sequence: unseen
8460 @end smallexample
8461
8462 Now view your new messages with the speedbar (@pxref{Speedbar}) or with
8463 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}.
8464
8465 If you're on a mailing list that is so voluminous that it is
8466 impossible to read every message, it usually better to read the
8467 mailing list like a newsgroup in a news reader. Emacs has a built-in
8468 newsreader called Gnus. The remainder of this appendix talks about how
8469 to use Gnus with an MH message store. The version of Gnus that was
8470 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should
8471 work but versions prior to 5.8 use different options.
8472
8473 This table contains a list of Gnus options that you will have to
8474 modify. Note that for them to become accessible, you'll have to load
8475 @file{nnml.el} first. This can be done with @kbd{M-x load-library
8476 @key{RET} nnml @key{RET}}.
8477
8478 @vtable @code
8479 @item gnus-secondary-select-methods
8480 Select the @samp{nnml} value. This select method uses directories for
8481 folders and individual files for messages, just like MH. You do not
8482 have to set an address.
8483 @c -------------------------
8484 @item mail-sources
8485 Select the @samp{Several files in a directory} value, check the
8486 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find
8487 your mail.
8488 @c -------------------------
8489 @vindex mail-user-agent
8490 @item message-mail-user-agent
8491 In order to send mail within Gnus using MH-E, set this option to
8492 @samp{mail-user-agent} and set the @code{mail-user-agent} option to
8493 @samp{Emacs interface to MH}.
8494 @c -------------------------
8495 @item nnmail-keep-last-article
8496 Since Gnus keeps track of which messages you have read, it would be
8497 bad if Gnus expired the last message, for example, message 100, and
8498 @command{rcvstore} gave the next new message number 1. Gnus would then
8499 ignore it since it thinks that you've read messages 1-100. Turning on
8500 this option ensures that the last message is never removed thereby
8501 eliminating this problem.
8502 @end vtable
8503
8504 Next add the following to @file{~/.procmailrc}. If you don't subscribe
8505 to the GnuCash mailing list, substitute one to which you are
8506 subscribed.
8507
8508 @smallexample
8509 MAILDIR=$HOME/`mhparam Path`
8510 # Place mail sent to the GnuCash mailing list in gnucash.spool, where
8511 # Gnus will pick it up.
8512 :0:
8513 * ^TO.*gnucash.*@.*gnucash.org
8514 gnucash.spool
8515 @end smallexample
8516
8517 Wait for some messages to appear in @file{gnucash.spool} and run Gnus
8518 with @kbd{M-x gnus @key{RET}}. To view the folder created in the
8519 example above, you would tell Gnus about it the first time only with
8520 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is
8521 known as @samp{+gnucash}.
8522
8523 @node Odds and Ends, History, Procmail, Top
8524 @appendix Odds and Ends
8525
8526 This appendix covers a few topics that don't fit elsewhere. Here I
8527 tell you how to report bugs and how to get on the MH-E mailing lists.
8528 I also point out some additional sources of information.
8529
8530 @menu
8531 * Bug Reports::
8532 * Mailing Lists::
8533 * MH FAQ and Support::
8534 * Getting MH-E::
8535 @end menu
8536
8537 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends
8538 @appendixsec Bug Reports
8539
8540 @cindex bugs
8541 @cindex SourceForge
8542 @kindex M-x mh-version
8543
8544 Bug reports should be filed at
8545 @uref{https://sourceforge.net/bugs/?group_id=13357, SourceForge}. You
8546 need to be a SourceForge user to submit bug reports, but this is easy
8547 enough to do that it shouldn't be a restriction for you. Please
8548 include the output of @kbd{M-x mh-version} (@pxref{Miscellaneous}) in
8549 any bug report you send unless you're 110% positive we won't ask for
8550 it.
8551
8552 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends
8553 @appendixsec MH-E Mailing Lists
8554
8555 @cindex SourceForge
8556 @cindex mailing lists
8557
8558 There are several mailing lists for MH-E. They are @i{mh-e-users at
8559 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net},
8560 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view
8561 the archives at @uref{https://sourceforge.net/mail/?group_id=13357,
8562 SourceForge}. Do not report bugs on these lists; please submit them
8563 via SourceForge (@pxref{Bug Reports}).
8564
8565 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends
8566 @appendixsec MH FAQ and Support
8567
8568 @cindex FAQ
8569 @cindex MH FAQ
8570
8571 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently
8572 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup
8573 @samp{comp.mail.mh}. While very little is there that deals with MH-E
8574 specifically, there is an incredible wealth of material about MH
8575 itself which you will find useful.
8576
8577 @cindex support
8578
8579 You can find FAQs on MH-E at the
8580 @uref{https://sourceforge.net/support/?group_id=13357, Support
8581 Requests} page on SourceForge. If you don't find the answer to your
8582 question, file a support request and your question will become a new
8583 FAQ!
8584
8585 @node Getting MH-E, , MH FAQ and Support, Odds and Ends
8586 @appendixsec Getting MH-E
8587
8588 @cindex MH-E, obtaining
8589 @cindex getting MH-E
8590 @cindex obtaining MH-E
8591
8592 Because MH-E is undergoing a phase of sustained growth, the version of
8593 MH-E in your Emacs is likely to be out of date although it is most
8594 likely to be more up to date than the copy that comes with the MH
8595 distribution in @file{miscellany/mh-e}.
8596
8597 @cindex change log
8598 @cindex release notes
8599
8600 New MH-E releases are always available for downloading at
8601 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8602 SourceForge} before they appear in an Emacs release. You can read the
8603 release notes on that page to determine if the given release of MH-E
8604 is already installed in your version of Emacs. You can also read the
8605 change log to see if you are interested in what the given release of
8606 MH-E has to offer (although we have no doubt that you will be
8607 extremely interested in all new releases).
8608
8609 @cindex files, @samp{MH-E-NEWS}
8610 @cindex files, @samp{README}
8611 @cindex news
8612 @cindex @samp{MH-E-NEWS}
8613 @cindex @samp{README}
8614 @kindex M-x mh-version
8615
8616 After you download and extract the MH-E tarball, read the
8617 @file{README} file and @file{MH-E-NEWS}. These correspond to the
8618 release notes and change log mentioned above. The file @file{README}
8619 contains instructions on installing MH-E. If you're already running
8620 Emacs, please quit that session and start again to load in the new
8621 MH-E. Check that you're running the new version with the command
8622 @kbd{M-x mh-version}.
8623
8624 @cindex contributed software
8625 @cindex manual
8626 @cindex documentation
8627
8628 In addition to the mh-e package, the
8629 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8630 SourceForge} site also contains doc and contrib packages. The former
8631 is the latest release of this manual, and the latter contains a few
8632 contributed packages you might find useful.
8633
8634 @node History, GFDL, Odds and Ends, Top
8635 @appendix History of MH-E
8636
8637 @cindex Bill Wohler
8638 @cindex Brian Reid
8639 @cindex Gildea, Stephen
8640 @cindex Jim Larus
8641 @cindex Larus, Jim
8642 @cindex MH-E, versions
8643 @cindex Reid, Brian
8644 @cindex SourceForge
8645 @cindex Stephen Gildea
8646 @cindex Wohler, Bill
8647 @cindex history of MH-E
8648 @cindex versions of MH-E
8649
8650 MH-E was originally written by Brian Reid in 1983 and has changed
8651 hands several times since then. Jim Larus wanted to do something
8652 similar for GNU Emacs, and ended up completely rewriting it that same
8653 year. In 1989, Stephen Gildea picked it up and added many
8654 improvements. Bill Wohler then took over in 2000 and moved its
8655 development to @uref{http://sourceforge.net/, SourceForge} where it
8656 lives today.
8657
8658 @menu
8659 * From Brian Reid::
8660 * From Jim Larus::
8661 * From Stephen Gildea::
8662 * From Bill Wohler::
8663 @end menu
8664
8665 @node From Brian Reid, From Jim Larus, History, History
8666 @appendixsec From Brian Reid
8667
8668 @cindex Brian Reid
8669 @cindex Reid, Brian
8670
8671 One day in 1983 I got the flu and had to stay home from work for three
8672 days with nothing to do. I used that time to write MHE@. The
8673 fundamental idea behind MHE was that it was a ``puppeteer'' driving
8674 the MH programs underneath it. MH had a model that the editor was
8675 supposed to run as a sub-process of the mailer, which seemed to me at
8676 the time to be the tail wagging the dog. So I turned it around and
8677 made the editor drive the MH programs. I made sure that the UCI people
8678 (who were maintaining MH at the time) took in my changes and made them
8679 stick.
8680
8681 Today, I still use my own version of MHE because I don't at all like
8682 the way that GNU MH-E works and I've never gotten to be good enough at
8683 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs
8684 version of MHE and the GNU Emacs version of MH-E have almost nothing
8685 in common except similar names. They work differently, have different
8686 conceptual models, and have different key bindings@footnote{After
8687 reading this article, I questioned Brian about his version of MHE, and
8688 received some great ideas for improving MH-E such as a dired-like
8689 method of selecting folders; and removing the prompting when sending
8690 mail, filling in the blanks in the draft buffer instead. I passed them
8691 on to Stephen Gildea, the current maintainer, and he was excited about
8692 the ideas as well. Perhaps one day, MH-E will again resemble MHE
8693 (draft form editing was introduced in version 7.4).}.
8694
8695 Brian Reid, June 1994
8696
8697 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History
8698 @appendixsec From Jim Larus
8699
8700 @cindex Jim Larus
8701 @cindex Larus, Jim
8702
8703 Brian Reid, while at CMU or shortly after going to Stanford wrote a
8704 mail reading program called MHE for Gosling Emacs. It had much the
8705 same structure as MH-E (i.e., invoked MH programs), though it was
8706 simpler and the commands were slightly different. Unfortunately, I no
8707 longer have a copy so the differences are lost in the mists of time.
8708
8709 In '82-83, I was working at BBN and wrote a lot of mlisp code in
8710 Gosling Emacs to make it look more like Tennex Emacs. One of the
8711 packages that I picked up and improved was Reid's mail system. In '83,
8712 I went back to Berkeley. About that time, Stallman's first version of
8713 GNU Emacs came out and people started to move to it from Gosling Emacs
8714 (as I recall, the transition took a year or two). I decided to port
8715 Reid's MHE and used the mlisp to Emacs Lisp translator that came with
8716 GNU Emacs. It did a lousy job and the resulting code didn't work, so I
8717 bit the bullet and rewrote the code by hand (it was a lot smaller and
8718 simpler then, so it took only a day or two).
8719
8720 Soon after that, MH-E became part of the standard Emacs distribution
8721 and suggestions kept dribbling in for improvements. MH-E soon reached
8722 sufficient functionality to keep me happy, but I kept on improving it
8723 because I was a graduate student with plenty of time on my hands and
8724 it was more fun than my dissertation. In retrospect, the one thing
8725 that I regret is not writing any documentation, which seriously
8726 limited the use and appeal of the package.
8727
8728 @cindex @command{xmh}, in MH-E history
8729
8730 In '89, I came to Wisconsin as a professor and decided not to work on
8731 MH-E. It was stable, except for minor bugs, and had enough
8732 functionality, so I let it be for a few years. Stephen Gildea of BBN
8733 began to pester me about the bugs, but I ignored them. In 1990, he
8734 went off to the X Consortium, said good bye, and said that he would
8735 now be using @command{xmh}. A few months later, he came back and said
8736 that he couldn't stand @command{xmh} and could I put a few more bug fixes
8737 into MH-E. At that point, I had no interest in fixing MH-E, so I gave
8738 the responsibility of maintenance to him and he has done a fine job
8739 since then.
8740
8741 Jim Larus, June 1994
8742
8743 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History
8744 @appendixsec From Stephen Gildea
8745
8746 @cindex Gildea, Stephen
8747 @cindex Stephen Gildea
8748
8749 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before
8750 me. In my previous job, I had been using RMAIL, but as my folders tend
8751 to run large, I was frustrated with the speed of RMAIL@. However, I
8752 stuck with it because I wanted the GNU Emacs interface. I am very
8753 familiar and comfortable with the Emacs interface (with just a few
8754 modifications of my own) and dislike having to use applications with
8755 embedded editors; they never live up to Emacs.
8756
8757 MH is the mail reader of choice at BBN, so I converted to it. Since I
8758 didn't want to give up using an Emacs interface, I started using MH-E.
8759 As is my wont, I started hacking on it almost immediately. I first
8760 used version 3.4m. One of the first features I added was to treat the
8761 folder buffer as a file-visiting buffer: you could lock it, save it,
8762 and be warned of unsaved changes when killing it. I also worked to
8763 bring its functionality a little closer to RMAIL@. Jim Larus was very
8764 cooperative about merging in my changes, and my efforts first appeared
8765 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided
8766 MH-E was too slow and optimized it a lot. Version, 3.7, distributed
8767 with Emacs 18.56 in 1990, was noticeably faster.
8768
8769 When I moved to the X Consortium I became the first person there to
8770 not use xmh. (There is now one other engineer there using MH-E.) About
8771 this point I took over maintenance of MH-E from Jim and was finally
8772 able to add some features Jim hadn't accepted, such as the backward
8773 searching undo. My first release was 3.8 (Emacs 18.58) in 1992.
8774
8775 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0.
8776 Version 4.0 added many new features, including background folder
8777 collection and support for composing @sc{mime} messages. (Reading
8778 @sc{mime} messages remains to be done, alas.) While writing this book,
8779 Bill Wohler gave MH-E its closest examination ever, uncovering bugs
8780 and inconsistencies that required a new major version to fix, and so
8781 version 5 was released.
8782
8783 Stephen Gildea, June 1994
8784
8785 @node From Bill Wohler, , From Stephen Gildea, History
8786 @appendixsec From Bill Wohler
8787
8788 @cindex Wohler, Bill
8789 @cindex Bill Wohler
8790
8791 The preface originally included the following text which I use to
8792 begin my story:
8793
8794 @quotation
8795 But it's important to note a brief history of MH-E.
8796
8797 @w{Version 3} was prevalent through the @w{Emacs 18} and early
8798 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}),
8799 which introduced several new and changed commands. Next, @w{Version
8800 5.0} was released, which fixed some bugs and incompatibilities, and
8801 was incorporated into @w{Emacs 19.29}.
8802 @end quotation
8803
8804 After a long break, Stephen handed the reins over to me in 2000. I
8805 moved the project to a new site called SourceForge and organized a
8806 great team of developers. Our first release in late 2001 was version
8807 6. It appeared around the time of Emacs 21.2 and had menus and tool
8808 bar buttons.
8809
8810 Then, indexed searches, improved MIME handling, a speedbar, multiple
8811 identities, alias completion, an index view of unseen messages, spam
8812 software support, Face and X-Image-URL header field support, Fcc
8813 completion, arbitrary range handling, and draft form editing were
8814 introduced in the version 7 series around the time of Emacs 21.4
8815 (2004). Still, Emacs itself contained version 5 of MH-E released back
8816 in 1994.
8817
8818 Version 8 development was mostly driven by the rewrite of the manual.
8819 It also brought mailutils support, S/MIME support, picon support, and
8820 an improved interface for hiding header fields. The CVS repository was
8821 migrated from SourceForge to Savannah (only for those files that were
8822 already part of Emacs) and the software was completely reorganized to
8823 push back two decades of entropy. Version 8 will appear in Emacs 22.1,
8824 expected to be released in 2006.
8825
8826 Bill Wohler, February 2006
8827
8828 @node GFDL, GPL, History, Top
8829 @appendix GNU FREE DOCUMENTATION LICENSE
8830 @center Version 1.2, November 2002
8831
8832 @display
8833 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
8834 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
8835
8836 Everyone is permitted to copy and distribute verbatim copies
8837 of this license document, but changing it is not allowed.
8838 @end display
8839 @sp 1
8840 @enumerate 0
8841 @item
8842 PREAMBLE
8843
8844 The purpose of this License is to make a manual, textbook, or other
8845 functional and useful document ``free'' in the sense of freedom: to
8846 assure everyone the effective freedom to copy and redistribute it,
8847 with or without modifying it, either commercially or noncommercially.
8848 Secondarily, this License preserves for the author and publisher a way
8849 to get credit for their work, while not being considered responsible
8850 for modifications made by others.
8851
8852 This License is a kind of ``copyleft'', which means that derivative
8853 works of the document must themselves be free in the same sense. It
8854 complements the GNU General Public License, which is a copyleft
8855 license designed for free software.
8856
8857 We have designed this License in order to use it for manuals for free
8858 software, because free software needs free documentation: a free
8859 program should come with manuals providing the same freedoms that the
8860 software does. But this License is not limited to software manuals;
8861 it can be used for any textual work, regardless of subject matter or
8862 whether it is published as a printed book. We recommend this License
8863 principally for works whose purpose is instruction or reference.
8864
8865 @sp 1
8866 @item
8867 APPLICABILITY AND DEFINITIONS
8868
8869 This License applies to any manual or other work, in any medium, that
8870 contains a notice placed by the copyright holder saying it can be
8871 distributed under the terms of this License. Such a notice grants a
8872 world-wide, royalty-free license, unlimited in duration, to use that
8873 work under the conditions stated herein. The ``Document'', below,
8874 refers to any such manual or work. Any member of the public is a
8875 licensee, and is addressed as ``you''. You accept the license if you
8876 copy, modify or distribute the work in a way requiring permission
8877 under copyright law.
8878
8879 A ``Modified Version'' of the Document means any work containing the
8880 Document or a portion of it, either copied verbatim, or with
8881 modifications and/or translated into another language.
8882
8883 A ``Secondary Section'' is a named appendix or a front-matter section of
8884 the Document that deals exclusively with the relationship of the
8885 publishers or authors of the Document to the Document's overall subject
8886 (or to related matters) and contains nothing that could fall directly
8887 within that overall subject. (Thus, if the Document is in part a
8888 textbook of mathematics, a Secondary Section may not explain any
8889 mathematics.) The relationship could be a matter of historical
8890 connection with the subject or with related matters, or of legal,
8891 commercial, philosophical, ethical or political position regarding
8892 them.
8893
8894 The ``Invariant Sections'' are certain Secondary Sections whose titles
8895 are designated, as being those of Invariant Sections, in the notice
8896 that says that the Document is released under this License. If a
8897 section does not fit the above definition of Secondary then it is not
8898 allowed to be designated as Invariant. The Document may contain zero
8899 Invariant Sections. If the Document does not identify any Invariant
8900 Sections then there are none.
8901
8902 The ``Cover Texts'' are certain short passages of text that are listed,
8903 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
8904 the Document is released under this License. A Front-Cover Text may
8905 be at most 5 words, and a Back-Cover Text may be at most 25 words.
8906
8907 A ``Transparent'' copy of the Document means a machine-readable copy,
8908 represented in a format whose specification is available to the
8909 general public, that is suitable for revising the document
8910 straightforwardly with generic text editors or (for images composed of
8911 pixels) generic paint programs or (for drawings) some widely available
8912 drawing editor, and that is suitable for input to text formatters or
8913 for automatic translation to a variety of formats suitable for input
8914 to text formatters. A copy made in an otherwise Transparent file
8915 format whose markup, or absence of markup, has been arranged to thwart
8916 or discourage subsequent modification by readers is not Transparent.
8917 An image format is not Transparent if used for any substantial amount
8918 of text. A copy that is not ``Transparent'' is called ``Opaque.''
8919
8920
8921 Examples of suitable formats for Transparent copies include plain
8922 ASCII without markup, Texinfo input format, LaTeX input format, SGML
8923 or XML using a publicly available DTD, and standard-conforming simple
8924 HTML, PostScript or PDF designed for human modification. Examples of
8925 transparent image formats include PNG, XCF and JPG. Opaque formats
8926 include proprietary formats that can be read and edited only by
8927 proprietary word processors, SGML or XML for which the DTD and/or
8928 processing tools are not generally available, and the
8929 machine-generated HTML, PostScript or PDF produced by some word
8930 processors for output purposes only.
8931
8932 The ``Title Page'' means, for a printed book, the title page itself,
8933 plus such following pages as are needed to hold, legibly, the material
8934 this License requires to appear in the title page. For works in
8935 formats which do not have any title page as such, ``Title Page'' means
8936 the text near the most prominent appearance of the work's title,
8937 preceding the beginning of the body of the text.
8938
8939 A section ``Entitled XYZ'' means a named subunit of the Document whose
8940 title either is precisely XYZ or contains XYZ in parentheses following
8941 text that translates XYZ in another language. (Here XYZ stands for a
8942 specific section name mentioned below, such as ``Acknowledgements'',
8943 ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
8944 of such a section when you modify the Document means that it remains a
8945 section ``Entitled XYZ'' according to this definition.
8946
8947 The Document may include Warranty Disclaimers next to the notice which
8948 states that this License applies to the Document. These Warranty
8949 Disclaimers are considered to be included by reference in this
8950 License, but only as regards disclaiming warranties: any other
8951 implication that these Warranty Disclaimers may have is void and has
8952 no effect on the meaning of this License.
8953 @sp 1
8954 @item
8955 VERBATIM COPYING
8956
8957 You may copy and distribute the Document in any medium, either
8958 commercially or noncommercially, provided that this License, the
8959 copyright notices, and the license notice saying this License applies
8960 to the Document are reproduced in all copies, and that you add no other
8961 conditions whatsoever to those of this License. You may not use
8962 technical measures to obstruct or control the reading or further
8963 copying of the copies you make or distribute. However, you may accept
8964 compensation in exchange for copies. If you distribute a large enough
8965 number of copies you must also follow the conditions in section 3.
8966
8967 You may also lend copies, under the same conditions stated above, and
8968 you may publicly display copies.
8969 @sp 1
8970 @item
8971 COPYING IN QUANTITY
8972
8973 If you publish printed copies (or copies in media that commonly have
8974 printed covers) of the Document, numbering more than 100, and the
8975 Document's license notice requires Cover Texts, you must enclose the
8976 copies in covers that carry, clearly and legibly, all these Cover
8977 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
8978 the back cover. Both covers must also clearly and legibly identify
8979 you as the publisher of these copies. The front cover must present
8980 the full title with all words of the title equally prominent and
8981 visible. You may add other material on the covers in addition.
8982 Copying with changes limited to the covers, as long as they preserve
8983 the title of the Document and satisfy these conditions, can be treated
8984 as verbatim copying in other respects.
8985
8986 If the required texts for either cover are too voluminous to fit
8987 legibly, you should put the first ones listed (as many as fit
8988 reasonably) on the actual cover, and continue the rest onto adjacent
8989 pages.
8990
8991 If you publish or distribute Opaque copies of the Document numbering
8992 more than 100, you must either include a machine-readable Transparent
8993 copy along with each Opaque copy, or state in or with each Opaque copy
8994 a computer-network location from which the general network-using
8995 public has access to download using public-standard network protocols
8996 a complete Transparent copy of the Document, free of added material.
8997 If you use the latter option, you must take reasonably prudent steps,
8998 when you begin distribution of Opaque copies in quantity, to ensure
8999 that this Transparent copy will remain thus accessible at the stated
9000 location until at least one year after the last time you distribute an
9001 Opaque copy (directly or through your agents or retailers) of that
9002 edition to the public.
9003
9004 It is requested, but not required, that you contact the authors of the
9005 Document well before redistributing any large number of copies, to give
9006 them a chance to provide you with an updated version of the Document.
9007 @sp 1
9008 @item
9009 MODIFICATIONS
9010
9011 You may copy and distribute a Modified Version of the Document under
9012 the conditions of sections 2 and 3 above, provided that you release
9013 the Modified Version under precisely this License, with the Modified
9014 Version filling the role of the Document, thus licensing distribution
9015 and modification of the Modified Version to whoever possesses a copy
9016 of it. In addition, you must do these things in the Modified Version:
9017
9018 A. Use in the Title Page (and on the covers, if any) a title distinct
9019 from that of the Document, and from those of previous versions
9020 (which should, if there were any, be listed in the History section
9021 of the Document). You may use the same title as a previous version
9022 if the original publisher of that version gives permission.@*
9023 B. List on the Title Page, as authors, one or more persons or entities
9024 responsible for authorship of the modifications in the Modified
9025 Version, together with at least five of the principal authors of the
9026 Document (all of its principal authors, if it has fewer than five),
9027 unless they release you from this requirement.@*
9028 C. State on the Title page the name of the publisher of the
9029 Modified Version, as the publisher.@*
9030 D. Preserve all the copyright notices of the Document.@*
9031 E. Add an appropriate copyright notice for your modifications
9032 adjacent to the other copyright notices.@*
9033 F. Include, immediately after the copyright notices, a license notice
9034 giving the public permission to use the Modified Version under the
9035 terms of this License, in the form shown in the Addendum below.@*
9036 G. Preserve in that license notice the full lists of Invariant Sections
9037 and required Cover Texts given in the Document's license notice.@*
9038 H. Include an unaltered copy of this License.@*
9039 I. Preserve the section Entitled ``History'', Preserve its Title, and add
9040 to it an item stating at least the title, year, new authors, and
9041 publisher of the Modified Version as given on the Title Page. If
9042 there is no section Entitled ``History'' in the Document, create one
9043 stating the title, year, authors, and publisher of the Document as
9044 given on its Title Page, then add an item describing the Modified
9045 Version as stated in the previous sentence.@*
9046 J. Preserve the network location, if any, given in the Document for
9047 public access to a Transparent copy of the Document, and likewise
9048 the network locations given in the Document for previous versions
9049 it was based on. These may be placed in the ``History'' section.
9050 You may omit a network location for a work that was published at
9051 least four years before the Document itself, or if the original
9052 publisher of the version it refers to gives permission.@*
9053 K. For any section Entitled ``Acknowledgements'' or ``Dedications'',
9054 Preserve the Title of the section, and preserve in the section all
9055 the substance and tone of each of the contributor acknowledgements
9056 and/or dedications given therein.@*
9057 L. Preserve all the Invariant Sections of the Document,
9058 unaltered in their text and in their titles. Section numbers
9059 or the equivalent are not considered part of the section titles.@*
9060 M. Delete any section Entitled ``Endorsements.'' Such a section
9061 may not be included in the Modified Version.@*
9062 N. Do not retitle any existing section to be Entitled ``Endorsements''
9063 or to conflict in title with any Invariant Section.@*
9064 O. Preserve any Warranty Disclaimers.@*
9065 @sp 1
9066 If the Modified Version includes new front-matter sections or
9067 appendices that qualify as Secondary Sections and contain no material
9068 copied from the Document, you may at your option designate some or all
9069 of these sections as invariant. To do this, add their titles to the
9070 list of Invariant Sections in the Modified Version's license notice.
9071 These titles must be distinct from any other section titles.
9072
9073 You may add a section Entitled ``Endorsements'', provided it contains
9074 nothing but endorsements of your Modified Version by various
9075 parties--for example, statements of peer review or that the text has
9076 been approved by an organization as the authoritative definition of a
9077 standard.
9078
9079 You may add a passage of up to five words as a Front-Cover Text, and a
9080 passage of up to 25 words as a Back-Cover Text, to the end of the list
9081 of Cover Texts in the Modified Version. Only one passage of
9082 Front-Cover Text and one of Back-Cover Text may be added by (or
9083 through arrangements made by) any one entity. If the Document already
9084 includes a cover text for the same cover, previously added by you or
9085 by arrangement made by the same entity you are acting on behalf of,
9086 you may not add another; but you may replace the old one, on explicit
9087 permission from the previous publisher that added the old one.
9088
9089 The author(s) and publisher(s) of the Document do not by this License
9090 give permission to use their names for publicity for or to assert or
9091 imply endorsement of any Modified Version.
9092 @sp 1
9093 @item
9094 COMBINING DOCUMENTS
9095
9096 You may combine the Document with other documents released under this
9097 License, under the terms defined in section 4 above for modified
9098 versions, provided that you include in the combination all of the
9099 Invariant Sections of all of the original documents, unmodified, and
9100 list them all as Invariant Sections of your combined work in its
9101 license notice, and that you preserve all their Warranty Disclaimers.
9102
9103 The combined work need only contain one copy of this License, and
9104 multiple identical Invariant Sections may be replaced with a single
9105 copy. If there are multiple Invariant Sections with the same name but
9106 different contents, make the title of each such section unique by
9107 adding at the end of it, in parentheses, the name of the original
9108 author or publisher of that section if known, or else a unique number.
9109 Make the same adjustment to the section titles in the list of
9110 Invariant Sections in the license notice of the combined work.
9111
9112 In the combination, you must combine any sections Entitled ``History''
9113 in the various original documents, forming one section Entitled
9114 ``History''; likewise combine any sections Entitled ``Acknowledgements'',
9115 and any sections Entitled ``Dedications.'' You must delete all sections
9116 Entitled ``Endorsements.''
9117 @sp 1
9118 @item
9119 COLLECTIONS OF DOCUMENTS
9120
9121 You may make a collection consisting of the Document and other documents
9122 released under this License, and replace the individual copies of this
9123 License in the various documents with a single copy that is included in
9124 the collection, provided that you follow the rules of this License for
9125 verbatim copying of each of the documents in all other respects.
9126
9127 You may extract a single document from such a collection, and distribute
9128 it individually under this License, provided you insert a copy of this
9129 License into the extracted document, and follow this License in all
9130 other respects regarding verbatim copying of that document.
9131 @sp 1
9132 @item
9133 AGGREGATION WITH INDEPENDENT WORKS
9134
9135 A compilation of the Document or its derivatives with other separate
9136 and independent documents or works, in or on a volume of a storage or
9137 distribution medium, is called an ``aggregate'' if the copyright
9138 resulting from the compilation is not used to limit the legal rights
9139 of the compilation's users beyond what the individual works permit.
9140 When the Document is included in an aggregate, this License does not
9141 apply to the other works in the aggregate which are not themselves
9142 derivative works of the Document.
9143
9144 If the Cover Text requirement of section 3 is applicable to these
9145 copies of the Document, then if the Document is less than one half of
9146 the entire aggregate, the Document's Cover Texts may be placed on
9147 covers that bracket the Document within the aggregate, or the
9148 electronic equivalent of covers if the Document is in electronic form.
9149 Otherwise they must appear on printed covers that bracket the whole
9150 aggregate.
9151 @sp 1
9152 @item
9153 TRANSLATION
9154
9155 Translation is considered a kind of modification, so you may
9156 distribute translations of the Document under the terms of section 4.
9157 Replacing Invariant Sections with translations requires special
9158 permission from their copyright holders, but you may include
9159 translations of some or all Invariant Sections in addition to the
9160 original versions of these Invariant Sections. You may include a
9161 translation of this License, and all the license notices in the
9162 Document, and any Warranty Disclaimers, provided that you also include
9163 the original English version of this License and the original versions
9164 of those notices and disclaimers. In case of a disagreement between
9165 the translation and the original version of this License or a notice
9166 or disclaimer, the original version will prevail.
9167
9168 If a section in the Document is Entitled ``Acknowledgements'',
9169 ``Dedications'', or ``History'', the requirement (section 4) to Preserve
9170 its Title (section 1) will typically require changing the actual
9171 title.
9172 @sp 1
9173 @item
9174 TERMINATION
9175
9176 You may not copy, modify, sublicense, or distribute the Document except
9177 as expressly provided for under this License. Any other attempt to
9178 copy, modify, sublicense or distribute the Document is void, and will
9179 automatically terminate your rights under this License. However,
9180 parties who have received copies, or rights, from you under this
9181 License will not have their licenses terminated so long as such
9182 parties remain in full compliance.
9183 @sp 1
9184 @item
9185 FUTURE REVISIONS OF THIS LICENSE
9186
9187 The Free Software Foundation may publish new, revised versions
9188 of the GNU Free Documentation License from time to time. Such new
9189 versions will be similar in spirit to the present version, but may
9190 differ in detail to address new problems or concerns. See
9191 http://www.gnu.org/copyleft/.
9192
9193 Each version of the License is given a distinguishing version number.
9194 If the Document specifies that a particular numbered version of this
9195 License ``or any later version'' applies to it, you have the option of
9196 following the terms and conditions either of that specified version or
9197 of any later version that has been published (not as a draft) by the
9198 Free Software Foundation. If the Document does not specify a version
9199 number of this License, you may choose any version ever published (not
9200 as a draft) by the Free Software Foundation.
9201
9202 @end enumerate
9203
9204 @unnumberedsec ADDENDUM: How to use this License for your documents
9205
9206 To use this License in a document you have written, include a copy of
9207 the License in the document and put the following copyright and
9208 license notices just after the title page:
9209
9210 @smallexample
9211 @group
9212 Copyright (C) @var{year} @var{your name}.
9213 Permission is granted to copy, distribute and/or modify this document
9214 under the terms of the GNU Free Documentation License, Version 1.2
9215 or any later version published by the Free Software Foundation;
9216 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
9217 A copy of the license is included in the section entitled ``GNU
9218 Free Documentation License''.
9219 @end group
9220 @end smallexample
9221
9222 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
9223 replace the ``with...Texts.'' line with this:
9224
9225 @smallexample
9226 @group
9227 with the Invariant Sections being @var{list their titles}, with the
9228 Front-Cover Texts being @var{list}, and with the Back-Cover Texts being
9229 @var{list}.
9230 @end group
9231 @end smallexample
9232
9233 If you have Invariant Sections without Cover Texts, or some other
9234 combination of the three, merge those two alternatives to suit the
9235 situation.
9236
9237 If your document contains nontrivial examples of program code, we
9238 recommend releasing these examples in parallel under your choice of
9239 free software license, such as the GNU General Public License,
9240 to permit their use in free software.
9241
9242 @node GPL, Key Index, GFDL, Top
9243 @appendix GNU GENERAL PUBLIC LICENSE
9244 @center Version 2, June 1991
9245
9246 @display
9247 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
9248 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
9249
9250 Everyone is permitted to copy and distribute verbatim copies
9251 of this license document, but changing it is not allowed.
9252 @end display
9253
9254 @unnumberedsec Preamble
9255
9256 The licenses for most software are designed to take away your
9257 freedom to share and change it. By contrast, the GNU General Public
9258 License is intended to guarantee your freedom to share and change free
9259 software---to make sure the software is free for all its users. This
9260 General Public License applies to most of the Free Software
9261 Foundation's software and to any other program whose authors commit to
9262 using it. (Some other Free Software Foundation software is covered by
9263 the GNU Library General Public License instead.) You can apply it to
9264 your programs, too.
9265
9266 When we speak of free software, we are referring to freedom, not
9267 price. Our General Public Licenses are designed to make sure that you
9268 have the freedom to distribute copies of free software (and charge for
9269 this service if you wish), that you receive source code or can get it
9270 if you want it, that you can change the software or use pieces of it
9271 in new free programs; and that you know you can do these things.
9272
9273 To protect your rights, we need to make restrictions that forbid
9274 anyone to deny you these rights or to ask you to surrender the rights.
9275 These restrictions translate to certain responsibilities for you if you
9276 distribute copies of the software, or if you modify it.
9277
9278 For example, if you distribute copies of such a program, whether
9279 gratis or for a fee, you must give the recipients all the rights that
9280 you have. You must make sure that they, too, receive or can get the
9281 source code. And you must show them these terms so they know their
9282 rights.
9283
9284 We protect your rights with two steps: (1) copyright the software, and
9285 (2) offer you this license which gives you legal permission to copy,
9286 distribute and/or modify the software.
9287
9288 Also, for each author's protection and ours, we want to make certain
9289 that everyone understands that there is no warranty for this free
9290 software. If the software is modified by someone else and passed on, we
9291 want its recipients to know that what they have is not the original, so
9292 that any problems introduced by others will not reflect on the original
9293 authors' reputations.
9294
9295 Finally, any free program is threatened constantly by software
9296 patents. We wish to avoid the danger that redistributors of a free
9297 program will individually obtain patent licenses, in effect making the
9298 program proprietary. To prevent this, we have made it clear that any
9299 patent must be licensed for everyone's free use or not licensed at all.
9300
9301 The precise terms and conditions for copying, distribution and
9302 modification follow.
9303
9304 @iftex
9305 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9306 @end iftex
9307 @ifinfo
9308 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9309 @end ifinfo
9310
9311 @enumerate 0
9312 @item
9313 This License applies to any program or other work which contains
9314 a notice placed by the copyright holder saying it may be distributed
9315 under the terms of this General Public License. The ``Program,'' below,
9316 refers to any such program or work, and a ``work based on the Program''
9317 means either the Program or any derivative work under copyright law:
9318 that is to say, a work containing the Program or a portion of it,
9319 either verbatim or with modifications and/or translated into another
9320 language. (Hereinafter, translation is included without limitation in
9321 the term ``modification.'') Each licensee is addressed as ``you.''
9322
9323 Activities other than copying, distribution and modification are not
9324 covered by this License; they are outside its scope. The act of
9325 running the Program is not restricted, and the output from the Program
9326 is covered only if its contents constitute a work based on the
9327 Program (independent of having been made by running the Program).
9328 Whether that is true depends on what the Program does.
9329
9330 @item
9331 You may copy and distribute verbatim copies of the Program's
9332 source code as you receive it, in any medium, provided that you
9333 conspicuously and appropriately publish on each copy an appropriate
9334 copyright notice and disclaimer of warranty; keep intact all the
9335 notices that refer to this License and to the absence of any warranty;
9336 and give any other recipients of the Program a copy of this License
9337 along with the Program.
9338
9339 You may charge a fee for the physical act of transferring a copy, and
9340 you may at your option offer warranty protection in exchange for a fee.
9341
9342 @item
9343 You may modify your copy or copies of the Program or any portion
9344 of it, thus forming a work based on the Program, and copy and
9345 distribute such modifications or work under the terms of Section 1
9346 above, provided that you also meet all of these conditions:
9347
9348 @enumerate a
9349 @item
9350 You must cause the modified files to carry prominent notices
9351 stating that you changed the files and the date of any change.
9352
9353 @item
9354 You must cause any work that you distribute or publish, that in
9355 whole or in part contains or is derived from the Program or any
9356 part thereof, to be licensed as a whole at no charge to all third
9357 parties under the terms of this License.
9358
9359 @item
9360 If the modified program normally reads commands interactively
9361 when run, you must cause it, when started running for such
9362 interactive use in the most ordinary way, to print or display an
9363 announcement including an appropriate copyright notice and a
9364 notice that there is no warranty (or else, saying that you provide
9365 a warranty) and that users may redistribute the program under
9366 these conditions, and telling the user how to view a copy of this
9367 License. (Exception: if the Program itself is interactive but
9368 does not normally print such an announcement, your work based on
9369 the Program is not required to print an announcement.)
9370 @end enumerate
9371
9372 These requirements apply to the modified work as a whole. If
9373 identifiable sections of that work are not derived from the Program,
9374 and can be reasonably considered independent and separate works in
9375 themselves, then this License, and its terms, do not apply to those
9376 sections when you distribute them as separate works. But when you
9377 distribute the same sections as part of a whole which is a work based
9378 on the Program, the distribution of the whole must be on the terms of
9379 this License, whose permissions for other licensees extend to the
9380 entire whole, and thus to each and every part regardless of who wrote it.
9381
9382 Thus, it is not the intent of this section to claim rights or contest
9383 your rights to work written entirely by you; rather, the intent is to
9384 exercise the right to control the distribution of derivative or
9385 collective works based on the Program.
9386
9387 In addition, mere aggregation of another work not based on the Program
9388 with the Program (or with a work based on the Program) on a volume of
9389 a storage or distribution medium does not bring the other work under
9390 the scope of this License.
9391
9392 @item
9393 You may copy and distribute the Program (or a work based on it,
9394 under Section 2) in object code or executable form under the terms of
9395 Sections 1 and 2 above provided that you also do one of the following:
9396
9397 @enumerate a
9398 @item
9399 Accompany it with the complete corresponding machine-readable
9400 source code, which must be distributed under the terms of Sections
9401 1 and 2 above on a medium customarily used for software interchange; or,
9402
9403 @item
9404 Accompany it with a written offer, valid for at least three
9405 years, to give any third party, for a charge no more than your
9406 cost of physically performing source distribution, a complete
9407 machine-readable copy of the corresponding source code, to be
9408 distributed under the terms of Sections 1 and 2 above on a medium
9409 customarily used for software interchange; or,
9410
9411 @item
9412 Accompany it with the information you received as to the offer
9413 to distribute corresponding source code. (This alternative is
9414 allowed only for noncommercial distribution and only if you
9415 received the program in object code or executable form with such
9416 an offer, in accord with Subsection b above.)
9417 @end enumerate
9418
9419 The source code for a work means the preferred form of the work for
9420 making modifications to it. For an executable work, complete source
9421 code means all the source code for all modules it contains, plus any
9422 associated interface definition files, plus the scripts used to
9423 control compilation and installation of the executable. However, as a
9424 special exception, the source code distributed need not include
9425 anything that is normally distributed (in either source or binary
9426 form) with the major components (compiler, kernel, and so on) of the
9427 operating system on which the executable runs, unless that component
9428 itself accompanies the executable.
9429
9430 If distribution of executable or object code is made by offering
9431 access to copy from a designated place, then offering equivalent
9432 access to copy the source code from the same place counts as
9433 distribution of the source code, even though third parties are not
9434 compelled to copy the source along with the object code.
9435
9436 @item
9437 You may not copy, modify, sublicense, or distribute the Program
9438 except as expressly provided under this License. Any attempt
9439 otherwise to copy, modify, sublicense or distribute the Program is
9440 void, and will automatically terminate your rights under this License.
9441 However, parties who have received copies, or rights, from you under
9442 this License will not have their licenses terminated so long as such
9443 parties remain in full compliance.
9444
9445 @item
9446 You are not required to accept this License, since you have not
9447 signed it. However, nothing else grants you permission to modify or
9448 distribute the Program or its derivative works. These actions are
9449 prohibited by law if you do not accept this License. Therefore, by
9450 modifying or distributing the Program (or any work based on the
9451 Program), you indicate your acceptance of this License to do so, and
9452 all its terms and conditions for copying, distributing or modifying
9453 the Program or works based on it.
9454
9455 @item
9456 Each time you redistribute the Program (or any work based on the
9457 Program), the recipient automatically receives a license from the
9458 original licensor to copy, distribute or modify the Program subject to
9459 these terms and conditions. You may not impose any further
9460 restrictions on the recipients' exercise of the rights granted herein.
9461 You are not responsible for enforcing compliance by third parties to
9462 this License.
9463
9464 @item
9465 If, as a consequence of a court judgment or allegation of patent
9466 infringement or for any other reason (not limited to patent issues),
9467 conditions are imposed on you (whether by court order, agreement or
9468 otherwise) that contradict the conditions of this License, they do not
9469 excuse you from the conditions of this License. If you cannot
9470 distribute so as to satisfy simultaneously your obligations under this
9471 License and any other pertinent obligations, then as a consequence you
9472 may not distribute the Program at all. For example, if a patent
9473 license would not permit royalty-free redistribution of the Program by
9474 all those who receive copies directly or indirectly through you, then
9475 the only way you could satisfy both it and this License would be to
9476 refrain entirely from distribution of the Program.
9477
9478 If any portion of this section is held invalid or unenforceable under
9479 any particular circumstance, the balance of the section is intended to
9480 apply and the section as a whole is intended to apply in other
9481 circumstances.
9482
9483 It is not the purpose of this section to induce you to infringe any
9484 patents or other property right claims or to contest validity of any
9485 such claims; this section has the sole purpose of protecting the
9486 integrity of the free software distribution system, which is
9487 implemented by public license practices. Many people have made
9488 generous contributions to the wide range of software distributed
9489 through that system in reliance on consistent application of that
9490 system; it is up to the author/donor to decide if he or she is willing
9491 to distribute software through any other system and a licensee cannot
9492 impose that choice.
9493
9494 This section is intended to make thoroughly clear what is believed to
9495 be a consequence of the rest of this License.
9496
9497 @item
9498 If the distribution and/or use of the Program is restricted in
9499 certain countries either by patents or by copyrighted interfaces, the
9500 original copyright holder who places the Program under this License
9501 may add an explicit geographical distribution limitation excluding
9502 those countries, so that distribution is permitted only in or among
9503 countries not thus excluded. In such case, this License incorporates
9504 the limitation as if written in the body of this License.
9505
9506 @item
9507 The Free Software Foundation may publish revised and/or new versions
9508 of the General Public License from time to time. Such new versions will
9509 be similar in spirit to the present version, but may differ in detail to
9510 address new problems or concerns.
9511
9512 Each version is given a distinguishing version number. If the Program
9513 specifies a version number of this License which applies to it and ``any
9514 later version,'' you have the option of following the terms and conditions
9515 either of that version or of any later version published by the Free
9516 Software Foundation. If the Program does not specify a version number of
9517 this License, you may choose any version ever published by the Free Software
9518 Foundation.
9519
9520 @item
9521 If you wish to incorporate parts of the Program into other free
9522 programs whose distribution conditions are different, write to the author
9523 to ask for permission. For software which is copyrighted by the Free
9524 Software Foundation, write to the Free Software Foundation; we sometimes
9525 make exceptions for this. Our decision will be guided by the two goals
9526 of preserving the free status of all derivatives of our free software and
9527 of promoting the sharing and reuse of software generally.
9528
9529 @iftex
9530 @heading NO WARRANTY
9531 @end iftex
9532 @ifinfo
9533 @center NO WARRANTY
9534 @end ifinfo
9535
9536 @item
9537 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
9538 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
9539 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
9540 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
9541 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9542 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
9543 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
9544 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
9545 REPAIR OR CORRECTION.
9546
9547 @item
9548 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
9549 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
9550 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
9551 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
9552 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
9553 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
9554 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
9555 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
9556 POSSIBILITY OF SUCH DAMAGES.
9557 @end enumerate
9558
9559 @iftex
9560 @heading END OF TERMS AND CONDITIONS
9561 @end iftex
9562 @ifinfo
9563 @center END OF TERMS AND CONDITIONS
9564 @end ifinfo
9565
9566 @page
9567 @unnumberedsec How to Apply These Terms to Your New Programs
9568
9569 If you develop a new program, and you want it to be of the greatest
9570 possible use to the public, the best way to achieve this is to make it
9571 free software which everyone can redistribute and change under these terms.
9572
9573 To do so, attach the following notices to the program. It is safest
9574 to attach them to the start of each source file to most effectively
9575 convey the exclusion of warranty; and each file should have at least
9576 the ``copyright'' line and a pointer to where the full notice is found.
9577
9578 @smallexample
9579 @var{one line to give the program's name and an idea of what it does.}
9580 Copyright (C) 19@var{yy} @var{name of author}
9581
9582 This program is free software; you can redistribute it and/or
9583 modify it under the terms of the GNU General Public License
9584 as published by the Free Software Foundation; either version 2
9585 of the License, or (at your option) any later version.
9586
9587 This program is distributed in the hope that it will be useful,
9588 but WITHOUT ANY WARRANTY; without even the implied warranty of
9589 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
9590 GNU General Public License for more details.
9591
9592 You should have received a copy of the GNU General Public License along
9593 with this program; if not, write to the Free Software Foundation, Inc.,
9594 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9595 @end smallexample
9596
9597 Also add information on how to contact you by electronic and paper mail.
9598
9599 If the program is interactive, make it output a short notice like this
9600 when it starts in an interactive mode:
9601
9602 @smallexample
9603 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
9604 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
9605 type `show w'. This is free software, and you are welcome
9606 to redistribute it under certain conditions; type `show c'
9607 for details.
9608 @end smallexample
9609
9610 The hypothetical commands @samp{show w} and @samp{show c} should show
9611 the appropriate parts of the General Public License. Of course, the
9612 commands you use may be called something other than @samp{show w} and
9613 @samp{show c}; they could even be mouse-clicks or menu items---whatever
9614 suits your program.
9615
9616 You should also get your employer (if you work as a programmer) or your
9617 school, if any, to sign a ``copyright disclaimer'' for the program, if
9618 necessary. Here is a sample; alter the names:
9619
9620 @smallexample
9621 @group
9622 Yoyodyne, Inc., hereby disclaims all copyright
9623 interest in the program `Gnomovision'
9624 (which makes passes at compilers) written
9625 by James Hacker.
9626
9627 @var{signature of Ty Coon}, 1 April 1989
9628 Ty Coon, President of Vice
9629 @end group
9630 @end smallexample
9631
9632 This General Public License does not permit incorporating your program into
9633 proprietary programs. If your program is a subroutine library, you may
9634 consider it more useful to permit linking proprietary applications with the
9635 library. If this is what you want to do, use the GNU Library General
9636 Public License instead of this License.
9637
9638 @node Key Index, Command Index, GPL, Top
9639 @unnumbered Key (Character) Index
9640 @printindex ky
9641
9642 @node Command Index, Option Index, Key Index, Top
9643 @unnumbered Command Index
9644 @printindex fn
9645
9646 @node Option Index, Concept Index, Command Index, Top
9647 @unnumbered Option (Variable) Index
9648 @printindex vr
9649
9650 @node Concept Index, , Option Index, Top
9651 @unnumbered Concept Index
9652 @printindex cp
9653
9654 @bye
9655
9656 @c Ispell Helpers
9657 @c
9658 @c The following are words that ispell should ignore that would not
9659 @c normally be in a dictionary (global or personal). Be careful not to
9660 @c include words here that could potentially be typos of other words
9661 @c (such as url, elisp, or MHE).
9662 @c
9663 @c LocalWords: CTRL ESC SPC f's
9664 @c LocalWords: addr Aliasfile alist
9665 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's
9666 @c LocalWords: cmd CMU contrib cron
9667 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw
9668 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm
9669 @c LocalWords: ImageMagick inbox ispell keychain
9670 @c LocalWords: Larus licensor LocalWords lookup lpr
9671 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp
9672 @c LocalWords: MML msg multipart
9673 @c LocalWords: Namazu NIS nenscript nnml num
9674 @c LocalWords: packmbox passphrase pathname prev procmail prog repl
9675 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's
9676 @c LocalWords: sublicense supercite speedbar
9677 @c LocalWords: Tennex texi texinfo Thelen thelenm
9678 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat
9679 @c
9680 @c See http://www.oreilly.com/oreilly/author/stylesheet.html.
9681 @c See http://en.wikipedia.org/.
9682 @c
9683 @c Note the lowercase mh which is needed to avoid hits in the
9684 @c functions and variables. Occasionally, check for accidental
9685 @c inclusion of mh in text by uncommenting the following and executing
9686 @c it with C-x C-e. You want to see "Search failed"
9687 @c (let ((case-fold-search nil))
9688 @c (goto-char (point-min))
9689 @c (search-forward-regexp "^mh\\( \\|$\\)"))
9690 @c
9691 @c An extremely useful setting for texinfo-mode-hook is:
9692 @c (add-to-list
9693 @c 'ispell-skip-region-alist
9694 @c (list
9695 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)"
9696 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|"
9697 @c "@[@{}.]\\|"
9698 @c "[^@]\\|"
9699 @c "@\\(end \\)?group\\|"
9700 @c "@\\(end \\)?cartouche\\)+"
9701 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|"
9702 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|"
9703 @c "^@end [a-z]+$\\|"
9704 @c "^@\\([fv]\\|print\\)index .*$\\|"
9705 @c "@uref{[^,]+,\\|"
9706 @c "@[a-z]+\\|"
9707 @c "/[a-z.]+[/}]\\)")))))
9708 @c
9709 @c Cross References
9710 @c
9711 @c See existing cross-references to the Emacs manual and the Emacs
9712 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU
9713 @c Emacs Lisp Reference Manual'' respectively).
9714
9715 @c @ftable Sorting
9716 @c
9717 @c As per index (sort of): Punctuation, keyboard characters (such as
9718 @c RET and BS) upper and lowercase mixed (lower comes before
9719 @c uppercase), control characters go with uppercase C, meta characters
9720 @c go with uppercase M.
9721 @c In some cases, the sort isn't strictly ASCII.
9722 @c For example, SPC (mh-page-msg) reads better before BS
9723 @c (mh-previous-page) and . (mh-show) is better before ,
9724 @c (mh-header-display).
9725
9726 @c @vtable Sorting
9727 @c
9728 @c Alphabetical, pull hooks into their own table.
9729
9730 @c Local Variables:
9731 @c sentence-end-double-space: nil
9732 @c End:
9733
9734 @ignore
9735 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef
9736 @end ignore