]> code.delx.au - gnu-emacs/blob - man/mh-e.texi
c3f5c37de911969943735f77d5cd50dd170f8721
[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 , 4th Edition
15 @set UPDATED 2006-03-17
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,
28 2001, 2002, 2003, 2005, 2006 Free 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, which are
3501 lost.
3502
3503 @kindex x
3504 @vindex mh-after-commands-processed-hook
3505 @vindex mh-before-commands-processed-hook
3506
3507 The command @kbd{x} runs @code{mh-before-commands-processed-hook}
3508 before the commands are processed and
3509 @code{mh-after-commands-processed-hook} after the commands are
3510 processed. Variables that are useful with the former hook include
3511 @code{mh-delete-list} and @code{mh-refile-list} which can be used to
3512 see which changes will be made to the current folder,
3513 @code{mh-current-folder}. Variables that are useful with the latter
3514 hook include @code{mh-folders-changed}, which lists which folders were
3515 affected by deletes and refiles. This list will always include the
3516 current folder @code{mh-current-folder}.
3517
3518 @findex mh-copy-msg
3519 @kindex c
3520 @kindex o
3521
3522 If you wish to copy a message to another folder, you can use the
3523 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
3524 to @command{refile}(1)). Like the command @kbd{o}, this command
3525 prompts you for the name of the target folder and you can specify a
3526 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy
3527 takes place immediately. The original copy remains in the current
3528 folder.
3529
3530 @cindex junk mail
3531 @cindex MH-Folder mode
3532 @cindex MH-Folder Show mode
3533 @cindex modes, MH-Folder
3534 @cindex modes, MH-Folder Show
3535 @cindex spam
3536 @findex mh-toggle-showing
3537 @kindex t
3538
3539 The command @kbd{t} (@code{mh-toggle-showing}) switches between
3540 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
3541 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off
3542 the associated show buffer so that you can perform operations on the
3543 messages quickly without reading them. This is an excellent way to
3544 prune out your junk mail or to refile a group of messages to another
3545 folder for later examination.
3546
3547 @cindex MH-Folder mode
3548 @cindex MH-Show mode
3549 @cindex modes, MH-Folder
3550 @cindex modes, MH-Show
3551 @cindex moving between messages
3552 @kindex t
3553 @vindex mh-recenter-summary-flag
3554
3555 When you use @kbd{t} to toggle between show mode and scan mode, the
3556 MH-Show buffer is hidden and the MH-Folder buffer is left alone.
3557 Setting @code{mh-recenter-summary-flag} to a non-@code{nil} value
3558 causes the toggle to display as many scan lines as possible, with the
3559 cursor at the middle. The effect of @code{mh-recenter-summary-flag} is
3560 rather useful, but it can be 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 @command{rcvstore}
3587 @cindex MH commands, @command{rcvstore}
3588 @cindex @samp{unseen} sequence
3589 @cindex sequence, @samp{unseen}
3590 @cindex Unix commands, @command{procmail}
3591 @cindex unseen messages, viewing
3592 @findex mh-index-new-messages
3593 @kindex F n
3594 @vindex mh-new-messages-folders
3595
3596 If you use a program such as @command{procmail} to use
3597 @command{rcvstore} to file your incoming mail automatically, you can
3598 display new, unseen, messages using the command @kbd{F n}
3599 (@code{mh-index-new-messages}). All messages in the @samp{unseen}
3600 sequence from the folders in @code{mh-new-messages-folders} are
3601 listed. However, this list of folders can be overridden with a prefix
3602 argument: with a prefix argument, enter a space-separated list of
3603 folders, or nothing to search all folders.
3604
3605 @cindex @samp{tick} sequence
3606 @cindex sequence, @samp{tick}
3607 @cindex ticked messages, viewing
3608 @findex mh-index-ticked-messages
3609 @kindex F '
3610 @vindex mh-ticked-messages-folders
3611
3612 If you have ticked messages (@pxref{Sequences}), you can display them
3613 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
3614 messages in the @samp{tick} sequence from the folders in
3615 @code{mh-ticked-messages-folders} are listed. With a prefix argument,
3616 enter a space-separated list of folders, or nothing to search all
3617 folders.
3618
3619 @findex mh-index-sequenced-messages
3620 @kindex F q
3621 @vindex mh-new-messages-folders
3622
3623 You can display messages in any sequence with the command @kbd{F q}
3624 (@code{mh-index-sequenced-messages}). All messages from the folders in
3625 @code{mh-new-messages-folders} in the sequence you provide are listed.
3626 With a prefix argument, enter a space-separated list of folders at the
3627 prompt, or nothing to search all folders.
3628
3629 @vindex mh-new-messages-folders
3630 @vindex mh-recursive-folders-flag
3631 @vindex mh-ticked-messages-folders
3632
3633 Set the options @code{mh-new-messages-folders} and
3634 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the
3635 @samp{+inbox} folder or @samp{All} to search all of the top level
3636 folders. Otherwise, list the folders that should be searched with the
3637 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
3638
3639 @cindex buffers, @samp{*MH-E Folders*}
3640 @cindex @samp{*MH-E Folders*}
3641 @findex mh-kill-folder
3642 @findex mh-list-folders
3643 @findex mh-pack-folder
3644 @findex mh-rescan-folder
3645 @findex mh-sort-folder
3646 @kindex F k
3647 @kindex F l
3648 @kindex F p
3649 @kindex F r
3650 @kindex F S
3651
3652 Other commands you can perform on folders include: @kbd{F l}
3653 (@code{mh-list-folders}), to place a listing of all the folders in
3654 your mail directory in a buffer called @samp{*MH-E Folders*}
3655 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove
3656 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by
3657 date (see @command{sortm}(1) to see how to sort by other criteria);
3658 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps
3659 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}),
3660 to rescan the folder, which is useful to grab all messages in your
3661 @samp{+inbox} after processing your new mail for the first time. If
3662 you don't want to rescan the entire folder, the commands @kbd{F r} or
3663 @kbd{F p} will accept a range (@pxref{Ranges}).
3664
3665 @kindex @key{TAB}
3666 @vindex mh-recursive-folders-flag
3667
3668 By default, operations on folders work only one level at a time. Set
3669 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
3670 folders. This mostly means that you'll be able to see all your folders
3671 when you press @key{TAB} when prompted for a folder name.
3672
3673 @findex mh-search-p
3674 @kindex k
3675 @vindex mh-kill-folder-suppress-prompt-hooks
3676
3677 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
3678 hook run at the beginning of the command @kbd{k}. The hook functions
3679 are called with no arguments and should return a non-nil value to
3680 suppress the normal prompt when you remove a folder. This is useful
3681 for folders that are easily regenerated. The default value of
3682 @code{mh-search-p} suppresses the prompt on folders generated by
3683 searching.
3684
3685 @sp 1
3686 @center @strong{NOTE}
3687
3688 @quotation
3689 Use this hook with care. If there is a bug in your hook which returns
3690 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
3691 @code{+inbox} folder, you will not be happy.
3692 @end quotation
3693 @sp 1
3694
3695 @cindex @command{sortm}
3696 @cindex @file{.mh_profile}
3697 @cindex files, @file{.mh_profile}
3698 @cindex MH commands, @command{sortm}
3699 @cindex MH profile component, @samp{sortm:}
3700 @cindex @samp{sortm:} MH profile component
3701 @kindex F S
3702 @vindex mh-sortm-args
3703
3704 The option @code{mh-sortm-args} holds extra arguments to pass on to
3705 the command @command{sortm}@footnote{See the section
3706 @uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the
3707 MH book.} when a prefix argument is used with @kbd{F S}. Normally
3708 default arguments to @command{sortm} are specified in the MH profile.
3709 This option may be used to provide an alternate view. For example,
3710 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting.
3711
3712 @cindex exiting
3713 @cindex quitting
3714 @findex mh-quit
3715 @kindex q
3716
3717 When you want to quit using MH-E and go back to editing, you can use
3718 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
3719 current MH-E folder and restores the buffers that were present when
3720 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working
3721 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E }
3722 (@pxref{Miscellaneous}). You can later restore your MH-E session by
3723 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
3724 again.
3725
3726 @findex mh-execute-commands
3727 @kindex q
3728 @vindex mh-before-quit-hook
3729 @vindex mh-quit-hook
3730
3731 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3732 called by @kbd{q}. The former one is called before the quit occurs, so
3733 you might use it to perform any MH-E operations; you could perform
3734 some query and abort the quit or call @code{mh-execute-commands}, for
3735 example. The latter is not run in an MH-E context, so you might use it
3736 to modify the window setup. For example, if the window configuration
3737 was saved as in the example in @ref{Miscellaneous Commands and
3738 Options}, you would also want to set @code{mh-quit-hook} to the
3739 following:
3740
3741 @c XXX Replace this with my example for killing the mail buffers.
3742
3743 @vindex mh-quit-hook, example
3744
3745 @smalllisp
3746 @group
3747 (defun my-mh-quit-hook ()
3748 "Clear window configuration variables as the MH window is gone."
3749 (setq my-mh-screen-saved nil)
3750 (setq my-mh-screen nil)
3751 (if my-normal-screen
3752 (set-window-configuration my-normal-screen))
3753 (setq my-normal-screen nil))
3754
3755 @i{Clean up window setup in mh-quit-hook}
3756 @end group
3757 @end smalllisp
3758
3759 @cindex folders, renaming
3760 @cindex renaming folders
3761 @findex dired
3762 @findex dired-do-rename
3763
3764 You can use dired to manipulate the folders themselves. For example, I
3765 renamed my @samp{+out} folder to the more common @samp{+outbox} by
3766 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}),
3767 moving my cursor to @samp{out} and using the command @kbd{R}
3768 (@code{dired-do-rename}).
3769
3770 @node Sending Mail, Editing Drafts, Folders, Top
3771 @chapter Sending Mail
3772
3773 @cindex sending mail
3774 @findex mh-smail
3775 @kindex M-x mh-smail
3776
3777 You can send a mail message in several ways. You can call @kbd{M-x
3778 mh-smail} directly, or from the command line like this:
3779
3780 @cindex starting from command line
3781
3782 @smallexample
3783 $ @kbd{emacs -f mh-smail}
3784 @end smallexample
3785
3786 @findex goto-address-at-point
3787 @vindex mail-user-agent
3788
3789 There are some commands that need to send a mail message, such as
3790 @code{goto-address-at-point}. You can configure Emacs to have these
3791 commands use MH-E by setting the option @code{mail-user-agent} to
3792 @samp{Emacs interface to MH}.
3793
3794 @cindex @samp{Message} menu
3795 @cindex menu, @samp{Message}
3796
3797 From within MH-E's MH-Folder mode, other methods of sending mail are
3798 available as well. These can also be found in the @samp{Message} menu.
3799
3800 @table @kbd
3801 @cindex @samp{Message > Edit Message Again} menu item
3802 @cindex menu item, @samp{Message > Edit Message Again}
3803 @kindex e
3804 @findex mh-edit-again
3805 @item e
3806 Edit a message to send it again (@code{mh-edit-again}).
3807 @c -------------------------
3808 @cindex @samp{Message > Re-edit a Bounced Message} menu item
3809 @cindex menu item, @samp{Message > Re-edit a Bounced Message}
3810 @kindex E
3811 @findex mh-extract-rejected-mail
3812 @item E
3813 Edit a message that was returned by the mail system
3814 (@code{mh-extract-rejected-mail}).
3815 @c -------------------------
3816 @cindex @samp{Message > Forward Message...} menu item
3817 @cindex menu item, @samp{Message > Forward Message...}
3818 @kindex f
3819 @findex mh-forward
3820 @item f
3821 Forward message (@code{mh-forward}).
3822 @c -------------------------
3823 @cindex @samp{Message > Reply to Message...} menu item
3824 @cindex menu item, @samp{Message > Reply to Message...}
3825 @kindex r
3826 @findex mh-reply
3827 @item r
3828 Reply to a message (@code{mh-reply}).
3829 @c -------------------------
3830 @cindex @samp{Message > Compose a New Message} menu item
3831 @cindex menu item, @samp{Message > Compose a New Message}
3832 @kindex s
3833 @findex mh-send
3834 @item s
3835 Compose a message (@code{mh-send}).
3836 @c -------------------------
3837 @cindex @samp{Message > Redistribute Message...} menu item
3838 @cindex menu item, @samp{Message > Redistribute Message...}
3839 @kindex M-d
3840 @findex mh-redistribute
3841 @item M-d
3842 Redistribute a message (@code{mh-redistribute}).
3843 @c -------------------------
3844 @findex mh-smail
3845 @item M-x mh-smail
3846 Compose a message with the MH mail system.
3847 @c -------------------------
3848 @findex mh-smail-other-window
3849 @item M-x mh-smail-other-window
3850 Compose a message with the MH mail system in other window.
3851 @end table
3852
3853 @cindex @samp{mh-sending-mail} customization group
3854 @cindex customization group, @samp{mh-sending-mail}
3855
3856 In addition, several options from the @samp{mh-sending-mail}
3857 customization group are useful when sending mail or replying to mail.
3858 They are summarized in the following table.
3859
3860 @vtable @code
3861 @item mh-compose-forward-as-mime-flag
3862 On means that messages are forwarded as attachments (default:
3863 @samp{on}).
3864 @c -------------------------
3865 @item mh-compose-letter-function
3866 Hook run when starting a new draft (default: @code{nil}).
3867 @c -------------------------
3868 @item mh-compose-prompt-flag
3869 On means prompt for header fields when composing a new draft (default:
3870 @samp{off}).
3871 @c -------------------------
3872 @item mh-forward-subject-format
3873 Format string for forwarded message subject (default: @code{"%s:
3874 %s"}).
3875 @c -------------------------
3876 @item mh-insert-x-mailer-flag
3877 On means append an @samp{X-Mailer:} header field to the header
3878 (default: @samp{on}).
3879 @c -------------------------
3880 @item mh-redist-full-contents-flag
3881 On means the @command{dist} command needs entire letter for
3882 redistribution (default: @samp{off}).
3883 @c -------------------------
3884 @item mh-reply-default-reply-to
3885 Sets the person or persons to whom a reply will be sent (default:
3886 @samp{Prompt}).
3887 @c -------------------------
3888 @item mh-reply-show-message-flag
3889 On means the MH-Show buffer is displayed using @kbd{r}
3890 (@code{mh-reply}) (default: @samp{on}).
3891 @end vtable
3892
3893 The following hooks are available.
3894
3895 @vtable @code
3896 @item mh-forward-hook
3897 Hook run by @code{mh-forward} on a forwarded letter (default:
3898 @code{nil}).
3899 @c -------------------------
3900 @item mh-letter-mode-hook
3901 Hook run by @code{mh-letter-mode} on a new letter (default:
3902 @code{nil}).
3903 @end vtable
3904
3905 The functions and options introduced here are explained in more detail
3906 in the following sections.
3907
3908 @menu
3909 * Composing::
3910 * Replying::
3911 * Forwarding::
3912 * Redistributing::
3913 * Editing Again::
3914 @end menu
3915
3916 @node Composing, Replying, Sending Mail, Sending Mail
3917 @section Composing
3918
3919 @cindex @file{.emacs}
3920 @cindex MH-Folder mode
3921 @cindex composing mail
3922 @cindex draft
3923 @cindex files, @file{.emacs}
3924 @cindex modes, MH-Folder
3925 @cindex sending mail
3926 @findex mh-smail
3927 @findex mh-smail-other-window
3928 @kindex M-x mh-smail
3929 @kindex M-x mh-smail-other-window
3930
3931 Outside of an MH-Folder buffer, you must call either @kbd{M-x
3932 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
3933 The former command always creates a two-window layout with the current
3934 buffer on top and the draft on the bottom. Use the latter command if
3935 you would rather preserve the window layout. You may find adding the
3936 following key bindings to @file{~/.emacs} useful:
3937
3938 @smalllisp
3939 (global-set-key "\C-xm" 'mh-smail)
3940 (global-set-key "\C-x4m" 'mh-smail-other-window)
3941 @end smalllisp
3942
3943 @cindex draft folder
3944 @cindex MH-Letter mode
3945 @cindex modes, MH-Letter
3946 @findex mh-send
3947 @kindex m
3948
3949 From within a MH-Folder buffer, you can simply use the command @kbd{m}
3950 (@code{mh-send}). However you invoke @code{mh-send}, your letter
3951 appears in an Emacs buffer whose mode is MH-Letter (to see what the
3952 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows
3953 you to edit your message, to check the validity of the recipients, to
3954 insert attachments and other messages into your message, and to send
3955 the message. We'll go more into depth about editing a
3956 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft
3957 folder} so that you can edit several drafts in parallel. To do so,
3958 create a folder named @samp{+drafts} for example, and add the profile
3959 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a
3960 message you're composing) in just a moment (@pxref{Editing Drafts}).
3961
3962 @vindex mh-compose-prompt-flag
3963
3964 If you prefer to be prompted for the recipient and subject fields
3965 before the MH-Letter buffer appears, turn on the option
3966 @code{mh-compose-prompt-flag}.
3967
3968 @cindex header field, @samp{X-Mailer:}
3969 @cindex @samp{X-Mailer:} header field
3970 @vindex mh-insert-x-mailer-flag
3971
3972 MH-E adds an @samp{X-Mailer:} header field to the header that includes
3973 the version of MH-E and Emacs that you are using. If you don't want to
3974 participate in our marketing, you can turn off the option
3975 @code{mh-insert-x-mailer-flag}.
3976
3977 @cindex @command{repl}
3978 @cindex @file{components}
3979 @cindex MH commands, @command{repl}
3980 @cindex MH-Letter mode
3981 @cindex Mail mode
3982 @cindex files, @file{components}
3983 @cindex modes, MH-Letter
3984 @cindex modes, Mail
3985 @vindex mail-mode-hook
3986 @vindex mh-letter-mode-hook
3987 @vindex text-mode-hook
3988
3989 Two hooks are provided to run commands on your freshly created draft.
3990 The first hook, @code{mh-letter-mode-hook}, allows you to do some
3991 processing before editing a letter@footnote{Actually, because
3992 MH-Letter mode inherits from Mail mode, the hooks
3993 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that
3994 order) before @code{mh-letter-mode-hook}.}. For example, you may wish
3995 to modify the header after @command{repl} has done its work, or you
3996 may have a complicated @file{components} file and need to tell MH-E
3997 where the cursor should go. Here's an example of how you would use
3998 this hook.
3999
4000 @findex mh-insert-signature, example
4001
4002 @smalllisp
4003 @group
4004 (defvar letter-mode-init-done-flag nil
4005 "Non-nil means one-time MH-E settings have been made.")
4006
4007 (defun my-mh-letter-mode-hook ()
4008 "Prepare letter for editing."
4009 (when (not letter-mode-init-done) ; @r{only need to bind the keys once}
4010 (local-set-key "\C-ctb" 'add-enriched-text)
4011 (local-set-key "\C-cti" 'add-enriched-text)
4012 (local-set-key "\C-ctf" 'add-enriched-text)
4013 (local-set-key "\C-cts" 'add-enriched-text)
4014 (local-set-key "\C-ctB" 'add-enriched-text)
4015 (local-set-key "\C-ctu" 'add-enriched-text)
4016 (local-set-key "\C-ctc" 'add-enriched-text)
4017 (setq letter-mode-init-done t))
4018 (save-excursion
4019 (goto-char (point-max)) ; @r{go to end of message to}
4020 (mh-insert-signature))) ; @r{insert signature}
4021
4022 @i{Prepare draft for editing via mh-letter-mode-hook}
4023
4024 @end group
4025 @end smalllisp
4026
4027 The function, @code{add-enriched-text} is defined in the example in
4028 @ref{Adding Attachments}.
4029
4030 @vindex mh-compose-letter-function
4031 @vindex mh-letter-mode-hook
4032
4033 The second hook, a function really, is
4034 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
4035 is called just before editing a new message; however, it is the last
4036 function called before you edit your message. The consequence of this
4037 is that you can write a function to write and send the message for
4038 you. This function is passed three arguments: the contents of the
4039 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields.
4040
4041 @node Replying, Forwarding, Composing, Sending Mail
4042 @section Replying to Mail
4043
4044 @cindex @command{mhl}
4045 @cindex @file{mhl.reply}
4046 @cindex MH commands, @command{mhl}
4047 @cindex files, @file{mhl.reply}
4048 @cindex replying
4049 @findex mh-reply
4050 @kindex r
4051
4052 To compose a reply to a message, use the @kbd{r} (@code{mh-reply})
4053 command.
4054
4055 When you reply to a message, you are first prompted with @samp{Reply
4056 to whom?}. You have several choices here.
4057
4058 @smallexample
4059 @group
4060 @b{Response} @b{Reply Goes To}
4061
4062 @kbd{from} @r{The person who sent the message. This is the default,}
4063 @r{so @key{RET} is sufficient.}
4064
4065 @kbd{to} @r{Replies to the sender, plus all recipients in the}
4066 @r{@samp{To:} header field.}
4067
4068 @kbd{all}
4069 @kbd{cc} @r{Forms a reply to the sender, plus all recipients.}
4070 @end group
4071 @end smallexample
4072
4073 @cindex @command{repl}
4074 @cindex MH commands, @command{repl}
4075
4076 Depending on your answer, @command{repl}@footnote{See the section
4077 @uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
4078 the MH book.} is given a different argument to form your reply.
4079 Specifically, a choice of @kbd{from} or none at all runs @samp{repl
4080 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
4081 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}.
4082
4083 @cindex MH-Letter mode
4084 @cindex MH-Show mode
4085 @cindex draft
4086 @cindex modes, MH-Letter
4087 @cindex modes, MH-Show
4088
4089 Two windows are then created. One window contains the message to which
4090 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
4091 (@pxref{Editing Drafts}), is in the other window.
4092
4093 If you supply a prefix argument (as in @kbd{C-u r}), the message you
4094 are replying to is inserted in your reply after having first been run
4095 through @command{mhl} with the format file @file{mhl.reply}. See
4096 @command{mhl}(1) or the section
4097 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
4098 book to see how you can modify the default @file{mhl.reply} file.
4099
4100 @vindex mh-yank-behavior
4101
4102 Alternatively, you can customize the option @code{mh-yank-behavior}
4103 and choose one of its @samp{Automatically} variants to do the same
4104 thing. @xref{Inserting Letter}. If you do so, the prefix argument has
4105 no effect.
4106
4107 Another way to include the message automatically in your draft is to
4108 use @samp{repl: -filter repl.filter} in your MH profile.
4109
4110 @vindex mh-reply-show-message-flag
4111
4112 If you include the message automatically, you can hide the MH-Show
4113 buffer by turning off the option @code{mh-reply-show-message-flag}.
4114
4115 If you wish to customize the header or other parts of the reply draft,
4116 please see @command{repl}(1) and @code{mh-format}(5).
4117
4118 @vindex mh-reply-default-reply-to
4119
4120 The @code{mh-reply-default-reply-to} option is set to @samp{Prompt} by
4121 default so that you are prompted for the recipient of a reply. If you
4122 find that most of the time that you specify @kbd{cc} when you reply to
4123 a message, set this option to @samp{cc}. Other choices include
4124 @samp{from}, @samp{to}, or @samp{all}. You can always edit the
4125 recipients in the draft.
4126
4127 @node Forwarding, Redistributing, Replying, Sending Mail
4128 @section Forwarding Mail
4129
4130 @cindex @command{forw}
4131 @cindex draft
4132 @cindex forwarding
4133 @cindex MH commands, @command{forw}
4134 @findex mh-forward
4135 @kindex f
4136 @vindex mh-forward-hook
4137
4138 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
4139 are prompted for the @samp{To:} and @samp{cc:} recipients. You are
4140 given a draft to edit that looks like it would if you had run the MH
4141 command @command{forw}@footnote{See the section
4142 @uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in
4143 the MH book.}. You can then add some text (@pxref{Editing Drafts}).
4144 You can forward several messages by using a range (@pxref{Ranges}).
4145 All of the messages in the range are inserted into your draft. The
4146 hook @code{mh-forward-hook} is called on the draft.
4147
4148 @cindex @file{.mh_profile}
4149 @cindex files, @file{.mh_profile}
4150 @cindex MH profile component, @samp{forw:}
4151 @cindex @samp{forw:} MH profile component
4152 @vindex mh-compose-forward-as-mime-flag
4153
4154 By default, the option @code{mh-compose-forward-as-mime-flag} is on
4155 which means that the forwarded messages are included as attachments.
4156 If you would prefer to forward your messages verbatim (as text,
4157 inline), then turn off this option. Forwarding messages verbatim works
4158 well for short, textual messages, but your recipient won't be able to
4159 view any non-textual attachments that were in the forwarded message.
4160 Be aware that if you have @samp{forw: -mime} in your MH profile, then
4161 forwarded messages will always be included as attachments regardless
4162 of the settings of @code{mh-compose-forward-as-mime-flag}.
4163
4164 @vindex mh-forward-subject-format
4165
4166 The format of the @samp{Subject:} header field for forwarded messages
4167 is controlled by the option @code{mh-forward-subject-format}. This
4168 option is a string which includes two escapes (@samp{%s}). The first
4169 @samp{%s} is replaced with the sender of the original message, and the
4170 second one is replaced with the original @samp{Subject:}. The default
4171 value of @code{"%s: %s"} takes a message with the header:
4172
4173 @smallexample
4174 @group
4175 To: Bill Wohler <wohler@@stop.mail-abuse.org>
4176 Subject: Re: 49er football
4177 From: Greg DesBrisay <gd@@stop.mail-abuse.org>
4178 @end group
4179 @end smallexample
4180
4181 and creates a subject header field of:
4182
4183 @smallexample
4184 Subject: Greg DesBrisay: Re: 49er football
4185 @end smallexample
4186
4187 @node Redistributing, Editing Again, Forwarding, Sending Mail
4188 @section Redistributing Your Mail
4189
4190 @cindex @command{dist}
4191 @cindex MH commands, @command{dist}
4192 @cindex redistributing
4193 @findex mh-redistribute
4194 @kindex M-d
4195
4196 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function
4197 to forwarding mail, but it does not allow you to edit the message, nor
4198 does it add your name to the @samp{From:} header field. It appears to
4199 the recipient as if the message had come from the original sender.
4200 When you run this command, you are prompted for the recipients.
4201
4202 @findex mh-edit-again
4203 @kindex e
4204
4205 For more information on redistributing messages, see
4206 @command{dist}(1). Also investigate the command @kbd{e}
4207 (@code{mh-edit-again}) for another way to redistribute messages
4208 (@pxref{Editing Again}).
4209
4210 @cindex @command{send}
4211 @cindex MH commands, @command{send}
4212 @vindex mh-redist-full-contents-flag
4213
4214 The option @code{mh-redist-full-contents-flag} must be turned on if
4215 @command{dist}@footnote{See the section
4216 @uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with
4217 dist} in the MH book.} requires the whole letter for redistribution,
4218 which is the case if @command{send}@footnote{See the section
4219 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
4220 in the MH book.} is compiled with the @sc{berk} option (which many
4221 people abhor). If you find that MH will not allow you to redistribute
4222 a message that has been redistributed before, turn off this option.
4223
4224 @node Editing Again, , Redistributing, Sending Mail
4225 @section Editing Old Drafts and Bounced Messages
4226
4227 @cindex @file{draft}
4228 @cindex files, @file{draft}
4229 @cindex re-editing drafts
4230 @findex mh-edit-again
4231 @kindex F v drafts
4232 @kindex e
4233 @kindex n
4234
4235 If you don't complete a draft for one reason or another, and if the
4236 draft buffer is no longer available, you can pick your draft up again
4237 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft
4238 folder, your last @file{draft} file will be used. If you use draft
4239 folders, you'll need to visit the draft folder with @kbd{F v drafts
4240 @key{RET}}, use @kbd{n} to move to the appropriate message, and then
4241 use @kbd{e} to prepare the message for editing.
4242
4243 @kindex e
4244
4245 The @kbd{e} command can also be used to take messages that were sent
4246 to you and to send them to more people.
4247
4248 @cindex Mailer-Daemon
4249 @findex mh-extract-rejected-mail
4250 @kindex C-c C-c
4251 @kindex E
4252
4253 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
4254 complained that your mail wasn't posted for some reason or another. In
4255 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare
4256 the message for editing by removing the @i{Mailer-Daemon} envelope and
4257 unneeded header fields. Fix whatever addressing problem you had, and
4258 send the message again with @kbd{C-c C-c}.
4259
4260 @node Editing Drafts, Aliases, Sending Mail, Top
4261 @chapter Editing a Draft
4262
4263 @cindex @samp{Letter} menu
4264 @cindex MH-Letter mode
4265 @cindex draft
4266 @cindex editing draft
4267 @cindex menu, @samp{Letter}
4268 @cindex modes, MH-Letter
4269
4270 When you edit a message that you want to send (called a @dfn{draft} in
4271 this case), the mode used is MH-Letter. This mode provides several
4272 commands in addition to the normal Emacs editing commands to help you
4273 edit your draft. These can also be found in the @samp{Letter} menu.
4274
4275 @table @kbd
4276 @kindex @key{SPC}
4277 @findex mh-letter-complete-or-space
4278 @item @key{SPC}
4279 Perform completion or insert space (@code{mh-letter-complete-or-space}).
4280 @c -------------------------
4281 @kindex M-@key{TAB}
4282 @findex mh-letter-complete
4283 @item M-@key{TAB}
4284 Perform completion on header field or word preceding point
4285 (@code{mh-letter-complete}).
4286 @c -------------------------
4287 @kindex , (comma)
4288 @findex mh-letter-confirm-address
4289 @item , (comma)
4290 Flash alias expansion (@code{mh-letter-confirm-address}).
4291 @c -------------------------
4292 @kindex @key{TAB}
4293 @findex mh-letter-next-header-field-or-indent
4294 @item @key{TAB}
4295 Cycle to next field (@code{mh-letter-next-header-field-or-indent}).
4296 @c -------------------------
4297 @kindex S-@key{TAB}
4298 @findex mh-letter-previous-header-field
4299 @item S-@key{TAB}
4300 Cycle to the previous header field
4301 (@code{mh-letter-previous-header-field}).
4302 @c -------------------------
4303 @kindex C-c ?
4304 @findex mh-help
4305 @item C-c ?
4306 Display cheat sheet for the MH-E commands (@code{mh-help}).
4307 @c -------------------------
4308 @cindex @samp{Letter > Send This Draft} menu item
4309 @cindex menu item, @samp{Letter > Send This Draft}
4310 @kindex C-c C-c
4311 @findex mh-send-letter
4312 @item C-c C-c
4313 Save draft and send message (@code{mh-send-letter}).
4314 @c -------------------------
4315 @kindex C-c C-d
4316 @findex mh-insert-identity
4317 @item C-c C-d
4318 Insert fields specified by the given identity
4319 (@code{mh-insert-identity}). @xref{Identities}.
4320 @c -------------------------
4321 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item
4322 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)}
4323 @kindex C-c C-e
4324 @findex mh-mh-to-mime
4325 @item C-c C-e
4326 Compose @sc{mime} message from MH-style directives
4327 (@code{mh-mh-to-mime}).
4328 @c -------------------------
4329 @kindex C-c C-f C-a
4330 @kindex C-c C-f a
4331 @findex mh-to-field
4332 @item C-c C-f C-a
4333 @itemx C-c C-f a
4334 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
4335 @c -------------------------
4336 @kindex C-c C-f C-b
4337 @kindex C-c C-f b
4338 @item C-c C-f C-b
4339 @itemx C-c C-f b
4340 Move to @samp{Bcc:} header field (@code{mh-to-field}).
4341 @c -------------------------
4342 @kindex C-c C-f C-c
4343 @kindex C-c C-f c
4344 @item C-c C-f C-c
4345 @itemx C-c C-f c
4346 Move to @samp{Cc:} header field (@code{mh-to-field}).
4347 @c -------------------------
4348 @kindex C-c C-f C-d
4349 @kindex C-c C-f d
4350 @item C-c C-f C-d
4351 @itemx C-c C-f d
4352 Move to @samp{Dcc:} header field (@code{mh-to-field}).
4353 @c -------------------------
4354 @kindex C-c C-f C-f
4355 @kindex C-c C-f f
4356 @findex mh-to-fcc
4357 @item C-c C-f C-f
4358 @itemx C-c C-f f
4359 Move to @samp{Fcc:} header field (@code{mh-to-fcc}).
4360 @c -------------------------
4361 @kindex C-c C-f C-l
4362 @kindex C-c C-f l
4363 @item C-c C-f C-l
4364 @itemx C-c C-f l
4365 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
4366 @c -------------------------
4367 @kindex C-c C-f C-m
4368 @kindex C-c C-f m
4369 @item C-c C-f C-m
4370 @itemx C-c C-f m
4371 Move to @samp{From:} header field (@code{mh-to-field}).
4372 @c -------------------------
4373 @kindex C-c C-f C-r
4374 @kindex C-c C-f r
4375 @item C-c C-f C-r
4376 @itemx C-c C-f r
4377 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
4378 @c -------------------------
4379 @kindex C-c C-f C-s
4380 @kindex C-c C-f s
4381 @item C-c C-f C-s
4382 @itemx C-c C-f s
4383 Move to @samp{Subject:} header field (@code{mh-to-field}).
4384 @c -------------------------
4385 @kindex C-c C-f C-t
4386 @kindex C-c C-f t
4387 @item C-c C-f C-t
4388 @itemx C-c C-f t
4389 Move to @samp{To:} header field (@code{mh-to-field}).
4390 @c -------------------------
4391 @cindex @samp{Letter > Insert a Message...} menu item
4392 @cindex menu item, @samp{Letter > Insert a Message...}
4393 @kindex C-c C-i
4394 @findex mh-insert-letter
4395 @item C-c C-i
4396 Insert a message (@code{mh-insert-letter}).
4397 @c -------------------------
4398 @kindex C-c C-m C-e
4399 @findex mh-mml-secure-message-encrypt
4400 @item C-c C-m C-e
4401 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4402 @c -------------------------
4403 @cindex @samp{Letter > Compose Forward...} menu item
4404 @cindex menu item, @samp{Letter > Compose Forward...}
4405 @kindex C-c C-m C-f
4406 @kindex C-c C-m f
4407 @findex mh-compose-forward
4408 @item C-c C-m C-f
4409 @itemx C-c C-m f
4410 Add tag to forward a message (@code{mh-compose-forward}).
4411 @c -------------------------
4412 @cindex @samp{Letter > Compose Get File (MH)...} menu item
4413 @cindex menu item, @samp{Letter > Compose Get File (MH)...}
4414 @kindex C-c C-m C-g
4415 @kindex C-c C-m g
4416 @findex mh-mh-compose-anon-ftp
4417 @item C-c C-m C-g
4418 @itemx C-c C-m g
4419 Add tag to include anonymous ftp reference to a file
4420 (@code{mh-mh-compose-anon-ftp}).
4421 @c -------------------------
4422 @cindex @samp{Letter > Compose Insertion...} menu item
4423 @cindex menu item, @samp{Letter > Compose Insertion...}
4424 @kindex C-c C-m C-i
4425 @kindex C-c C-m i
4426 @findex mh-compose-insertion
4427 @item C-c C-m C-i
4428 @itemx C-c C-m i
4429 Add tag to include a file such as an image or sound
4430 (@code{mh-compose-insertion}).
4431 @c -------------------------
4432 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item
4433 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)}
4434 @kindex C-c C-m C-m
4435 @kindex C-c C-m m
4436 @findex mh-mml-to-mime
4437 @item C-c C-m C-m
4438 @itemx C-c C-m m
4439 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}).
4440 @c -------------------------
4441 @kindex C-c C-m C-n
4442 @kindex C-c C-m n
4443 @findex mh-mml-unsecure-message
4444 @item C-c C-m C-n
4445 @itemx C-c C-m n
4446 Remove any secure message tags (@code{mh-mml-unsecure-message}).
4447 @c -------------------------
4448 @kindex C-c C-m C-s
4449 @findex mh-mml-secure-message-sign
4450 @item C-c C-m C-s
4451 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4452 @c -------------------------
4453 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item
4454 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...}
4455 @kindex C-c C-m C-t
4456 @kindex C-c C-m t
4457 @findex mh-mh-compose-external-compressed-tar
4458 @item C-c C-m C-t
4459 @itemx C-c C-m t
4460 Add tag to include anonymous ftp reference to a compressed tar file
4461 (@code{mh-mh-compose-external-compressed-tar}).
4462 @c -------------------------
4463 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item
4464 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)}
4465 @kindex C-c C-m C-u
4466 @kindex C-c C-m u
4467 @findex mh-mh-to-mime-undo
4468 @item C-c C-m C-u
4469 @itemx C-c C-m u
4470 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}).
4471 @c -------------------------
4472 @kindex C-c C-m C-x
4473 @kindex C-c C-m x
4474 @findex mh-mh-compose-external-type
4475 @item C-c C-m C-x
4476 @itemx C-c C-m x
4477 Add tag to refer to a remote file
4478 (@code{mh-mh-compose-external-type}).
4479 @c -------------------------
4480 @kindex C-c C-m e e
4481 @findex mh-mml-secure-message-encrypt
4482 @item C-c C-m e e
4483 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4484 @c -------------------------
4485 @kindex C-c C-m e s
4486 @findex mh-mml-secure-message-signencrypt
4487 @item C-c C-m e s
4488 Add tag to encrypt and sign the message@*
4489 (@code{mh-mml-secure-message-signencrypt}).
4490 @c -------------------------
4491 @kindex C-c C-m s e
4492 @findex mh-mml-secure-message-signencrypt
4493 @item C-c C-m s e
4494 Add tag to encrypt and sign the message@*
4495 (@code{mh-mml-secure-message-signencrypt}).
4496 @c -------------------------
4497 @kindex C-c C-m s s
4498 @findex mh-mml-secure-message-sign
4499 @item C-c C-m s s
4500 Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4501 @c -------------------------
4502 @cindex @samp{Letter > Split Current Line} menu item
4503 @cindex menu item, @samp{Letter > Split Current Line}
4504 @kindex C-c C-o
4505 @findex mh-open-line
4506 @item C-c C-o
4507 Insert a newline and leave point before it (@code{mh-open-line}).
4508 @c -------------------------
4509 @cindex @samp{Letter > Kill This Draft} menu item
4510 @cindex menu item, @samp{Letter > Kill This Draft}
4511 @kindex C-c C-q
4512 @findex mh-fully-kill-draft
4513 @item C-c C-q
4514 Quit editing and delete draft message (@code{mh-fully-kill-draft}).
4515 @c -------------------------
4516 @cindex @samp{Letter > Insert Signature} menu item
4517 @cindex menu item, @samp{Letter > Insert Signature}
4518 @kindex C-c C-s
4519 @findex mh-insert-signature
4520 @item C-c C-s
4521 Insert signature in message (@code{mh-insert-signature}).
4522 @c -------------------------
4523 @kindex C-c C-t
4524 @findex mh-letter-toggle-header-field-display
4525 @item C-c C-t
4526 Toggle display of header field at point
4527 (@code{mh-letter-toggle-header-field-display}).
4528 @c -------------------------
4529 @cindex @samp{Letter > Check Recipient} menu item
4530 @cindex menu item, @samp{Letter > Check Recipient}
4531 @kindex C-c C-w
4532 @findex mh-check-whom
4533 @item C-c C-w
4534 Verify recipients, showing expansion of any aliases
4535 (@code{mh-check-whom}).
4536 @c -------------------------
4537 @cindex @samp{Letter > Yank Current Message} menu item
4538 @cindex menu item, @samp{Letter > Yank Current Message}
4539 @kindex C-c C-y
4540 @findex mh-yank-cur-msg
4541 @item C-c C-y
4542 Insert the current message into the draft buffer
4543 (@code{mh-yank-cur-msg}).
4544 @c -------------------------
4545 @kindex C-c M-d
4546 @findex mh-insert-auto-fields
4547 @item C-c M-d
4548 Insert custom fields if recipient is found in
4549 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}).
4550 @xref{Identities}.
4551 @end table
4552
4553 @cindex @samp{mh-letter} customization group
4554 @cindex customization group, @samp{mh-letter}
4555
4556 Several options from the @samp{mh-letter} customization group are used
4557 while editing a draft.
4558
4559 @vtable @code
4560 @item mh-compose-insertion
4561 Type of @sc{mime} message tags in messages (default: @samp{MML} if
4562 available; otherwise @samp{MH}).
4563 @c -------------------------
4564 @item mh-compose-skipped-header-fields
4565 List of header fields to skip over when navigating in draft (default:
4566 @code{'("From"} @code{"Organization"} @code{"References"}
4567 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"}
4568 @code{"X-Image-URL"} @code{"X-Mailer")}.
4569 @c -------------------------
4570 @item mh-compose-space-does-completion-flag
4571 On means @key{SPC} does completion in message header (default:
4572 @samp{off}).
4573 @c -------------------------
4574 @item mh-delete-yanked-msg-window-flag
4575 On means delete any window displaying the message (default: @samp{off}).
4576 @c -------------------------
4577 @item mh-extract-from-attribution-verb
4578 Verb to use for attribution when a message is yanked by @kbd{C-c C-y}
4579 (default: @code{"wrote:"}).
4580 @c -------------------------
4581 @item mh-ins-buf-prefix
4582 String to put before each line of a yanked or inserted message
4583 (default: @code{"> "}).
4584 @c -------------------------
4585 @item mh-letter-complete-function
4586 Function to call when completing outside of address or folder fields
4587 (default: @code{ispell-complete-word}).
4588 @c -------------------------
4589 @item mh-letter-fill-column
4590 Fill column to use in MH-Letter mode (default: 72).
4591 @c -------------------------
4592 @item mh-mml-method-default
4593 Default method to use in security tags (default: @samp{PGP (MIME)} if
4594 support for it is available; otherwise @samp{None}).
4595 @c -------------------------
4596 @item mh-signature-file-name
4597 Source of user's signature (default: @code{"~/.signature"}).
4598 @c -------------------------
4599 @item mh-signature-separator-flag
4600 On means a signature separator should be inserted (default:
4601 @samp{on}).
4602 @c -------------------------
4603 @item mh-x-face-file
4604 File containing X-Face or Face header field to insert in outgoing mail.
4605 (default: @code{"~/.face"}).
4606 @c -------------------------
4607 @item mh-yank-behavior
4608 Controls which part of a message is yanked by @kbd{C-c C-y} (default:
4609 @samp{Body With Attribution}).
4610 @end vtable
4611
4612 The following hooks are available.
4613
4614 @vtable @code
4615 @item mail-citation-hook
4616 Hook for modifying a citation just inserted in the mail buffer
4617 (default: @code{nil}).
4618 @c -------------------------
4619 @item mh-before-send-letter-hook
4620 Hook run at the beginning of the @kbd{C-c C-c} command (default:
4621 @samp{nil}).
4622 @c -------------------------
4623 @item mh-mh-to-mime-hook
4624 Hook run on the formatted letter by @kbd{C-c C-e} (default:
4625 @samp{nil}).
4626 @c -------------------------
4627 @item mh-insert-signature-hook
4628 Hook run by @kbd{C-c C-s} after signature has been inserted (default:
4629 @code{nil}).
4630 @end vtable
4631
4632 The following face is available.
4633
4634 @vtable @code
4635 @item mh-letter-header-field
4636 Editable header field value face in draft buffers.
4637 @end vtable
4638
4639 The commands and options introduced here are explained in more
4640 detail in the following sections.
4641
4642 @menu
4643 * Editing Message::
4644 * Inserting Letter::
4645 * Inserting Messages::
4646 * Signature::
4647 * Picture::
4648 * Adding Attachments::
4649 * Sending PGP::
4650 * Checking Recipients::
4651 * Sending Message::
4652 * Killing Draft::
4653 @end menu
4654
4655 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts
4656 @section Editing the Message
4657
4658 @cindex @samp{Bcc:} header field
4659 @cindex @samp{Cc:} header field
4660 @cindex @samp{Dcc:} header field
4661 @cindex @samp{From:} header field
4662 @cindex @samp{Mail-Followup-To:} header field
4663 @cindex @samp{Mail-Reply-To:} header field
4664 @cindex @samp{Reply-To:} header field
4665 @cindex @samp{Subject:} header field
4666 @cindex @samp{To:} header field
4667 @cindex editing header
4668 @cindex header field, @samp{Bcc:}
4669 @cindex header field, @samp{Cc:}
4670 @cindex header field, @samp{Dcc:}
4671 @cindex header field, @samp{From:}
4672 @cindex header field, @samp{Mail-Followup-To:}
4673 @cindex header field, @samp{Mail-Reply-To:}
4674 @cindex header field, @samp{Reply-To:}
4675 @cindex header field, @samp{Subject:}
4676 @cindex header field, @samp{To:}
4677 @findex mh-to-field
4678 @kindex C-c C-f C-t
4679 @kindex C-c C-f t
4680
4681 Because the header is part of the message, you can edit the header
4682 fields as you wish. However, several convenience commands exist to
4683 help you create and edit them. For example, the command @kbd{C-c C-f
4684 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the
4685 cursor to the @samp{To:} header field, creating it if necessary. The
4686 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:},
4687 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To},
4688 @samp{Bcc:}, and @samp{Dcc:} header fields are similar.
4689
4690 @findex mh-to-fcc
4691 @kindex C-c C-f C-f
4692 @kindex C-c C-f f
4693
4694 One command behaves differently from the others, namely, @kbd{C-c C-f
4695 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command
4696 will prompt you for the folder name in which to file a copy of the
4697 draft. @xref{Folder Selection}.
4698
4699 @findex indent-relative
4700 @findex mh-letter-next-header-field-or-indent
4701 @findex mh-letter-previous-header-field
4702 @kindex @key{TAB}
4703 @kindex S-@key{TAB}
4704 @vindex mh-compose-skipped-header-fields
4705 @vindex mh-letter-header-field
4706
4707 Within the header of the message, the command@* @key{TAB}
4708 (@code{mh-letter-next-header-field-or-indent}) moves between fields
4709 that are highlighted with the face @code{mh-letter-header-field},
4710 skipping those fields listed in
4711 @code{mh-compose-skipped-header-fields}. After the last field, this
4712 command then moves point to the message body before cycling back to
4713 the first field. If point is already past the first line of the
4714 message body, then this command indents by calling
4715 @code{indent-relative} with the given prefix argument. The command
4716 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves
4717 backwards between the fields and cycles to the body of the message
4718 after the first field. Unlike the command @key{TAB}, it will always
4719 take point to the last field from anywhere in the body.
4720
4721 @cindex alias completion
4722 @cindex completion
4723 @cindex spell check
4724 @findex ispell-complete-word
4725 @findex mh-letter-complete
4726 @findex mh-letter-complete-or-space
4727 @findex mh-letter-confirm-address
4728 @kindex , (comma)
4729 @kindex @key{SPC}
4730 @kindex M-@key{TAB}
4731 @vindex mh-alias-flash-on-comma
4732 @vindex mh-compose-space-does-completion-flag
4733 @vindex mh-letter-complete-function
4734
4735 If the field contains addresses (for example, @samp{To:} or
4736 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command
4737 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias
4738 completion (@pxref{Aliases}). In the body of the message,
4739 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead,
4740 which is set to @samp{'ispell-complete-word} by default. The command
4741 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument
4742 that is passed to the @code{mh-letter-complete-function}. In addition,
4743 turn on the option @code{mh-compose-space-does-completion-flag} to use
4744 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform
4745 completion in the header as well; use a prefix argument to specify
4746 more than one space. Addresses are separated by a comma; when you
4747 press the comma, the command @code{mh-letter-confirm-address} flashes
4748 the alias expansion in the minibuffer if
4749 @code{mh-alias-flash-on-comma} is turned on.
4750
4751 @c XXX Document the replacement for the inaccessible 'long argument.
4752
4753 @findex mh-letter-toggle-header-field-display
4754 @kindex C-c C-t
4755
4756 Use the command @kbd{C-c C-t}
4757 @code{mh-letter-toggle-header-field-display} to display truncated
4758 header fields. This command is a toggle so entering it again will hide
4759 the field. This command takes a prefix argument: if negative then the
4760 field is hidden, if positive then the field is displayed (for example,
4761 @kbd{C-u C-c C-t}).
4762
4763 Be sure to leave a row of dashes or a blank line between the header
4764 and the body of the message.
4765
4766 @vindex mh-letter-fill-column
4767
4768 The body of the message is edited as you would edit any Emacs buffer
4769 although there are a few commands and options to assist you. You can
4770 change the fill column in MH-Letter mode with the option
4771 @code{mh-letter-fill-column}. By default, this option is 72 to allow
4772 others to quote your message without line wrapping.
4773
4774 @cindex filling paragraphs
4775 @cindex paragraphs, filling
4776 @findex fill-paragraph
4777 @kindex M-q
4778 @vindex mh-ins-buf-prefix
4779
4780 You'll often include messages that were sent from user agents that
4781 haven't yet realized that paragraphs consist of more than a single
4782 line. This makes for long lines that wrap in an ugly fashion. You'll
4783 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these
4784 quoted messages, even if they are nested, just as long as all of the
4785 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting
4786 Letter}). For example, let's assume you have the following in your
4787 draft:
4788
4789 @smallexample
4790 @group
4791 > Hopefully this gives you an idea of what I'm currently doing. I'm \
4792 not sure yet whether I'm completely satisfied with my setup, but \
4793 it's worked okay for me so far.
4794 @end group
4795 @end smallexample
4796
4797 Running @kbd{M-q} on this paragraph produces:
4798
4799 @smallexample
4800 @group
4801 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4802 > sure yet whether I'm completely satisfied with my setup, but it's
4803 > worked okay for me so far.
4804 @end group
4805 @end smallexample
4806
4807 @findex mh-open-line
4808 @findex open-line
4809 @kindex C-c C-o
4810 @kindex C-o
4811
4812 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the
4813 command @kbd{C-o} (@code{open-line}) in that it inserts a newline
4814 after point. It differs in that it also inserts the right number of
4815 quoting characters and spaces so that the next line begins in the same
4816 column as it was. This is useful when breaking up paragraphs in
4817 replies. For example, if this command was used when point was after
4818 the first period in the paragraph above, the result would be this:
4819
4820 @smallexample
4821 @group
4822 > Hopefully this gives you an idea of what I'm currently doing.
4823
4824 > I'm not
4825 > sure yet whether I'm completely satisfied with my setup, but it's
4826 > worked okay for me so far.
4827 @end group
4828 @end smallexample
4829
4830 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
4831 @section Inserting Letter to Which You're Replying
4832
4833 @cindex inserting messages
4834 @cindex replying to messages
4835 @cindex yanking messages
4836 @findex mh-yank-cur-msg
4837 @kindex C-c C-y
4838 @vindex mh-ins-buf-prefix
4839
4840 It is often useful to insert a snippet of text from a letter that
4841 someone mailed to provide some context for your reply. The command
4842 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an
4843 attribution, yanking a portion of text from the message to which
4844 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
4845 before each line.
4846
4847 @smallexample
4848 @group
4849 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4850
4851 > Hopefully this gives you an idea of what I'm currently doing. I'm not
4852 > sure yet whether I'm completely satisfied with my setup, but it's
4853 > worked okay for me so far.
4854 @end group
4855 @end smallexample
4856
4857 @vindex mh-extract-from-attribution-verb
4858
4859 The attribution consists of the sender's name and email address
4860 followed by the content of the option
4861 @code{mh-extract-from-attribution-verb}. This option can be set to
4862 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use
4863 the @samp{Custom String} menu item to enter your own verb.
4864
4865 @vindex mail-citation-hook
4866 @vindex mh-ins-buf-prefix
4867 @vindex mh-yank-behavior
4868
4869 The prefix @code{"> "} is the default setting for the option
4870 @code{mh-ins-buf-prefix}. I suggest that you not modify this option
4871 since it is used by many mailers and news readers: messages are far
4872 easier to read if several included messages have all been indented by
4873 the same string. This prefix is not inserted if you use one of the
4874 supercite flavors of @code{mh-yank-behavior} or you have added a
4875 @code{mail-citation-hook} as described below.
4876
4877 @vindex mh-delete-yanked-msg-window-flag
4878
4879 You can also turn on the @code{mh-delete-yanked-msg-window-flag}
4880 option to delete the window containing the original message after
4881 yanking it to make more room on your screen for your reply.
4882
4883 @cindex Emacs, packages, supercite
4884 @cindex supercite package
4885 @kindex r
4886 @vindex mail-citation-hook
4887 @vindex mh-yank-behavior
4888
4889 You can control how the message to which you are replying is yanked
4890 into your reply using @code{mh-yank-behavior}. To include the entire
4891 message, including the entire header, use @samp{Body and
4892 Header}@footnote{If you'd rather have the header cleaned up, use
4893 @kbd{C-u r} instead of @kbd{r} when replying
4894 (@pxref{Replying}).}@footnote{In the past you would use this setting
4895 and set @code{mail-citation-hook} to @samp{supercite}, but this usage
4896 is now deprecated in favor of the @samp{Invoke supercite} setting.}.
4897 Use @samp{Body} to yank just the body without the header. To yank only
4898 the portion of the message following the point, set this option to
4899 @samp{Below Point}.
4900
4901 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a
4902 full-bodied, full-featured, citation package that comes standard with
4903 Emacs.} to pass the entire message and header through supercite.
4904
4905 @vindex mh-extract-from-attribution-verb
4906
4907 If the @samp{Body With Attribution} setting is used, then the message
4908 minus the header is yanked and a simple attribution line is added at
4909 the top using the value of the option
4910 @code{mh-extract-from-attribution-verb}. This is the default.
4911
4912 @kindex C-c C-y
4913 @vindex mh-delete-yanked-msg-window-flag
4914
4915 If the @samp{Invoke supercite} or @samp{Body With Attribution}
4916 settings are used, the @samp{-noformat} argument is passed to the
4917 @command{repl} program to override a @samp{-filter} or @samp{-format}
4918 argument. These settings also have @samp{Automatically} variants that
4919 perform the action automatically when you reply so that you don't need
4920 to use @kbd{C-c C-y} at all. Note that this automatic action is only
4921 performed if the show buffer matches the message being replied to.
4922 People who use the automatic variants tend to turn on the option
4923 @code{mh-delete-yanked-msg-window-flag} as well so that the show
4924 window is never displayed.
4925
4926 @vindex mh-yank-behavior
4927
4928 If the show buffer has a region, the option @code{mh-yank-behavior} is
4929 ignored unless its value is one of @samp{Attribution} variants in
4930 which case the attribution is added to the yanked region.
4931
4932 @findex trivial-cite
4933 @vindex mail-citation-hook
4934 @vindex mh-ins-buf-prefix
4935 @vindex mh-yank-behavior
4936
4937 If this isn't enough, you can gain full control over the appearance of
4938 the included text by setting @code{mail-citation-hook} to a function
4939 that modifies it. This hook is ignored if the option
4940 @code{mh-yank-behavior} is set to one of the supercite flavors.
4941 Otherwise, this option controls how much of the message is passed to
4942 the hook. The function can find the citation between point and mark
4943 and it should leave point and mark around the modified citation text
4944 for the next hook function. The standard prefix
4945 @code{mh-ins-buf-prefix} is not added if this hook is set.
4946
4947 @cindex Emacs, packages, trivial-cite
4948 @cindex trivial-cite package
4949 @vindex mh-yank-behavior
4950
4951 For example, if you use the hook function
4952 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
4953 @code{trivial-cite}} (which is NOT part of Emacs), set
4954 @code{mh-yank-behavior} to @samp{Body and Header}.
4955
4956 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts
4957 @section Inserting Messages
4958
4959 @cindex inserting messages
4960 @findex mh-insert-letter
4961 @findex mh-yank-behavior
4962 @kindex C-c C-i
4963 @vindex mh-ins-buf-prefix
4964 @vindex mh-invisible-header-fields-compiled
4965 @vindex mh-yank-behavior
4966
4967 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
4968 This command prompts you for the folder and message number, which
4969 defaults to the current message in that folder. It then inserts the
4970 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless
4971 @code{mh-yank-behavior} is set to one of the supercite flavors in
4972 which case supercite is used to format the message. Certain
4973 undesirable header fields (see
4974 @code{mh-invisible-header-fields-compiled}) are removed before
4975 insertion.
4976
4977 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is
4978 left intact, the message is not indented, and @samp{> } is not
4979 inserted before each line. This command leaves the mark before the
4980 letter and point after it.
4981
4982 @node Signature, Picture, Inserting Messages, Editing Drafts
4983 @section Inserting Your Signature
4984
4985 @cindex signature
4986 @findex mh-insert-signature
4987 @kindex C-c C-s
4988
4989 You can insert your signature at the current cursor location with the
4990 command @kbd{C-c C-s} (@code{mh-insert-signature}).
4991
4992 @cindex files, @file{.signature}
4993 @cindex @file{.signature}
4994 @cindex vCard
4995 @vindex mh-signature-file-name
4996
4997 By default, the text of your signature is taken from the file
4998 @file{~/.signature}. You can read from other sources by changing the
4999 option @code{mh-signature-file-name}. This file may contain a
5000 @dfn{vCard} in which case an attachment is added with the vCard.
5001
5002 @findex mh-signature-separator-p
5003 @vindex mh-signature-file-name
5004 @vindex mh-signature-separator
5005 @vindex mh-signature-separator-regexp
5006
5007 The option @code{mh-signature-file-name} may also be a symbol, in
5008 which case that function is called. You may not want a signature
5009 separator to be added for you; instead you may want to insert one
5010 yourself. Options that you may find useful to do this include
5011 @code{mh-signature-separator} (when inserting a signature separator)
5012 and @code{mh-signature-separator-regexp} (for finding said separator).
5013 The function @code{mh-signature-separator-p}, which reports @code{t}
5014 if the buffer contains a separator, may be useful as well.
5015
5016 @cindex signature separator
5017 @vindex mh-signature-separator-flag
5018
5019 A signature separator (@code{"-- "}) will be added if the signature
5020 block does not contain one and @code{mh-signature-separator-flag} is
5021 on. It is not recommended that you change this option since various
5022 mail user agents, including MH-E, use the separator to present the
5023 signature differently, and to suppress the signature when replying or
5024 yanking a letter into a draft.
5025
5026 @vindex mh-insert-signature-hook
5027 @vindex mh-signature-file-name
5028
5029 The hook @code{mh-insert-signature-hook} is run after the signature is
5030 inserted. Hook functions may access the actual name of the file or the
5031 function used to insert the signature with
5032 @code{mh-signature-file-name}.
5033
5034 The signature can also be inserted using Identities.
5035 @xref{Identities}.
5036
5037 @node Picture, Adding Attachments, Signature, Editing Drafts
5038 @section Inserting Your Picture
5039
5040 @cindex @file{.face}
5041 @cindex files, @file{.face}
5042 @vindex mh-x-face-file
5043
5044 You can insert your picture in the header of your mail message so that
5045 recipients see your face in the @samp{From:} header field if their
5046 mail user agent is sophisticated enough. In MH-E, this is done by
5047 placing your image in the file named by the option
5048 @code{mh-x-face-file} which is @file{~/.face} by default.
5049
5050 @cindex @samp{Face:} header field
5051 @cindex @samp{X-Face:} header field
5052 @cindex @samp{X-Image-URL:} header field
5053 @cindex header field, @samp{Face:}
5054 @cindex header field, @samp{X-Face:}
5055 @cindex header field, @samp{X-Image-URL:}
5056
5057 If the file starts with either of the strings @samp{X-Face:},
5058 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the
5059 message header verbatim. Otherwise it is assumed that the file
5060 contains the value of the @samp{X-Face:} header field.
5061
5062 @cindex @command{compface}
5063 @cindex Unix commands, @command{compface}
5064
5065 The @samp{X-Face:} header field, which is a low-resolution, black and
5066 white image, can be generated using the
5067 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
5068 @command{compface}} command. The @uref{http://www.dairiki.org/xface/,
5069 @cite{Online X-Face Converter}} is a useful resource for quick
5070 conversion of images into @samp{X-Face:} header fields.
5071
5072 Use the @uref{http://quimby.gnus.org/circus/face/make-face,
5073 @command{make-face}} script to convert a JPEG image to the higher
5074 resolution, color, @samp{Face:} header field.
5075
5076 The URL of any image can be used for the @samp{X-Image-URL:} field and
5077 no processing of the image is required.
5078
5079 @vindex mh-x-face-file
5080
5081 To prevent the setting of any of these header fields, either set
5082 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file
5083 defined by this option doesn't exist.
5084
5085 @xref{Viewing}, to see how these header fields are displayed in MH-E.
5086
5087 @node Adding Attachments, Sending PGP, Picture, Editing Drafts
5088 @section Adding Attachments
5089
5090 @cindex @command{mhbuild}
5091 @cindex @command{mhn}
5092 @cindex MH commands, @command{mhbuild}
5093 @cindex MH commands, @command{mhn}
5094 @cindex MIME
5095 @cindex multimedia mail
5096
5097 MH-E has the capability to create multimedia messages. It uses the
5098 @sc{mime} (Multipurpose Internet Mail Extensions)
5099 protocol@footnote{@sc{mime} is defined in
5100 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The
5101 @sc{mime} protocol allows you to incorporate images, sound, video,
5102 binary files, and even commands that fetch a file with @samp{ftp} when
5103 your recipient reads the message!
5104
5105 @kindex C-c C-m
5106
5107 If you were to create a multimedia message with plain MH commands, you
5108 would insert @command{mhbuild} or @command{mhn} directives (henceforth
5109 called @dfn{MH-style directives} into your draft and use the
5110 @command{mhbuild} command in nmh or @command{mhn} command in MH and
5111 GNU mailutils to expand them. MH-E works in much the same way,
5112 although it provides a handful of commands prefixed with @kbd{C-c C-m}
5113 to insert the directives so you don't need to remember the syntax of
5114 them. Remember: you can always add MH-style directives by
5115 hand@footnote{See the section
5116 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5117 the MH book.}.
5118
5119 @cindex MIME Meta Language (MML)
5120 @cindex MML
5121 @vindex mh-compose-insertion
5122
5123 In addition to MH-style directives, MH-E also supports MML (@sc{mime}
5124 Meta Language) tags@footnote{
5125 @ifinfo
5126 @c Although the third argument should default to the
5127 @c first, makeinfo goes to the wrong Info file without it being
5128 @c different--it seems to be getting our own Composing node.
5129 @xref{Composing,,Composing with MML,emacs-mime}.
5130 @end ifinfo
5131 @ifnotinfo
5132 See the section Composing in
5133 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME
5134 Manual}}.
5135 @end ifnotinfo
5136 }. The option @code{mh-compose-insertion} can be used to choose
5137 between them. By default, this option is set to @samp{MML} if it is
5138 supported since it provides a lot more functionality. This option can
5139 also be set to @samp{MH} if MH-style directives are preferred.
5140
5141 @cindex media types
5142 @cindex MIME, media types
5143
5144 The MH-E @sc{mime} commands require a @dfn{media type} for each body
5145 part or attachment. For example, a PDF document is of type
5146 @samp{application/pdf} and an HTML document is of type
5147 @samp{text/html}. Some commands fill in the media type for you,
5148 whereas others require you to enter one.
5149
5150 @cindex @command{file}
5151 @cindex @file{/etc/mime.types}
5152 @cindex files, @file{/etc/mime.types}
5153 @cindex Unix commands, @command{file}
5154 @findex mailcap-mime-types
5155
5156 In the cases where MH-E can do so, it will determine the media type
5157 automatically. It uses the @command{file} command to do this. Failing
5158 that, the Emacs function @code{mailcap-mime-types} is used to provide
5159 a list from which to choose. This function usually reads the file
5160 @file{/etc/mime.types}.
5161
5162 Whether the media type is chosen automatically, or you choose it from
5163 a list, use the type that seems to match best the file that you are
5164 including. In the case of binaries, the media type
5165 @samp{application/x-executable} can be useful. If you can't find an
5166 appropriate media type, use @samp{text/plain} for text messages and
5167 @samp{application/octet-stream} for everything else.
5168
5169 @cindex content description
5170 @cindex MIME, content description
5171
5172 You are also sometimes asked for a @dfn{content description}. This is
5173 simply an optional brief phrase, in your own words, that describes the
5174 object. If you don't care to enter a content description, just press
5175 return and none will be included; however, a reader may skip over
5176 multimedia fields unless the content description is compelling.
5177
5178 You can also create your own @sc{mime} body parts. In the following
5179 example, I describe how you can create and edit a @samp{text/enriched}
5180 body part to liven up your plain text messages with boldface,
5181 underlining, and italics. I include an Emacs function which inserts
5182 enriched text tags.
5183
5184 @smalllisp
5185 @group
5186 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic")
5187 ("u" . "underline")
5188 ("s" . "smaller") ("B" . "bigger")
5189 ("f" . "fixed")
5190 ("c" . "center"))
5191 "Alist of (final-character . tag) choices for add-enriched-text.
5192 Additional types can be found in RFC 1563.")
5193
5194 (defun add-enriched-text (begin end)
5195 "Add enriched text tags around region.
5196 The tag used comes from the list enriched-text-types and is
5197 specified by the last keystroke of the command. When called from Lisp,
5198 arguments are BEGIN and END@."
5199 (interactive "r")
5200 ;; @r{Set type to the tag indicated by the last keystroke.}
5201 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`}))
5202 enriched-text-types))))
5203 (save-restriction ; @r{restores state from narrow-to-region}
5204 (narrow-to-region begin end) ; @r{narrow view to region}
5205 (goto-char (point-min)) ; @r{move to beginning of text}
5206 (insert "<" type ">") ; @r{insert beginning tag}
5207 (goto-char (point-max)) ; @r{move to end of text}
5208 (insert "</" type ">")))) ; @r{insert terminating tag}
5209 @i{Emacs function for entering enriched text}
5210
5211 @end group
5212 @end smalllisp
5213
5214 To use the function @code{add-enriched-text}, first add it to
5215 @file{~/.emacs} and create key bindings for it (@pxref{Composing}).
5216
5217 Then, in your plain text message, set the mark with @kbd{C-@@} or
5218 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t
5219 b}. This adds @samp{<bold>} where you set the mark and adds
5220 @samp{</bold>} at the location of your cursor, giving you something
5221 like: @samp{You should be <bold>very</bold>}.
5222
5223 Before sending this message, use @kbd{C-c C-m C-m}
5224 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e}
5225 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add
5226 MIME header fields. Then replace @samp{text/plain} with
5227 @samp{text/enriched} in the @samp{Content-Type:} header field.
5228
5229 You may also be interested in investigating @code{sgml-mode}.
5230
5231 @subheading Including Files
5232
5233 @cindex attachments, inserting
5234 @cindex images
5235 @cindex MIME, images
5236 @cindex MIME, sound
5237 @cindex MIME, video
5238 @cindex sound
5239 @cindex video
5240 @findex mh-compose-insertion
5241 @kindex C-c C-m C-i
5242 @kindex C-c C-m i
5243 @vindex mh-compose-insertion
5244
5245 Binaries, images, sound, and video can be inserted in your message
5246 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You
5247 are prompted for the filename containing the object, the media type if
5248 it cannot be determined automatically, and a content description. If
5249 you're using MH-style directives, you will also be prompted for
5250 additional attributes.
5251
5252 @subheading Forwarding Multimedia Messages
5253
5254 @findex mh-compose-forward
5255 @kindex C-c C-m C-f
5256 @kindex C-c C-m f
5257
5258 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m
5259 C-f} (@code{mh-compose-forward}). You are prompted for a content
5260 description, the name of the folder in which the messages to forward
5261 are located, and a range of messages, which defaults to the current
5262 message in that folder. @xref{Ranges}.
5263
5264 @subheading Including an FTP Reference
5265
5266 @cindex @command{ftp}
5267 @cindex MIME, @command{ftp}
5268 @cindex Unix commands, @command{ftp}
5269 @findex mh-mh-compose-anon-ftp
5270 @kindex C-c C-m C-g
5271 @kindex C-c C-m g
5272
5273 You can have your message initiate an @command{ftp} transfer when the
5274 recipient reads the message. To do this, use the command @kbd{C-c C-m
5275 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote
5276 host and filename, the media type, and the content description.
5277
5278 @subheading Including tar Files
5279
5280 @cindex @command{ftp}
5281 @cindex @command{tar}
5282 @cindex MIME, @command{ftp}
5283 @cindex MIME, @command{tar}
5284 @cindex Unix commands, @command{ftp}
5285 @cindex Unix commands, @command{tar}
5286 @findex mh-mh-compose-anon-ftp
5287 @findex mh-mh-compose-external-compressed-tar
5288 @kindex C-c C-m C-g
5289 @kindex C-c C-m C-t
5290 @kindex C-c C-m t
5291
5292 If the remote file is a compressed tar file, you can use @kbd{C-c C-m
5293 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition
5294 to retrieving the file via anonymous @emph{ftp} as per the command
5295 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also
5296 be uncompressed and untarred. You are prompted for the remote host and
5297 filename and the content description.
5298
5299 @subheading Including Other External Files
5300
5301 @findex mh-mh-compose-external-type
5302 @kindex C-c C-m C-x
5303 @kindex C-c C-m x
5304
5305 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is
5306 a general utility for referencing external files. In fact, all of the
5307 other commands that insert tags to access external files call this
5308 command. You are prompted for the access type, remote host and
5309 filename, and content type. If you provide a prefix argument, you are
5310 also prompted for a content description, attributes, parameters, and a
5311 comment.
5312
5313 @subheading Previewing Multimedia Messages
5314
5315 When you are finished editing a @sc{mime} message, it might look like this:
5316
5317 @cartouche
5318 @smallexample
5319 3 t08/24 root received fax files on Wed Aug 24 11:00:
5320 4+t08/24 To:wohler Test<<This is a test message to get the
5321
5322
5323
5324
5325
5326 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------------
5327 To: wohler
5328 cc:
5329 Subject: Test of MIME
5330 --------
5331 Here is the SETI@@Home logo:
5332
5333 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm"
5334 disposition=inline description="SETI@@home logo">
5335 <#/part>
5336 --:** @{draft@} All L8 (MH-Letter)----------------------------------
5337
5338 @end smallexample
5339 @end cartouche
5340 @i{MH-E @sc{mime} draft}
5341
5342 @findex mh-mml-to-mime
5343 @kindex C-c C-m C-m
5344 @kindex C-c C-m m
5345
5346 Typically, you send a message with attachments just like any other
5347 message (@pxref{Sending Message}).
5348
5349 @findex mh-mml-to-mime
5350 @kindex C-c C-m C-m
5351
5352 However, you may take a sneak preview of the @sc{mime} encoding if you
5353 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}).
5354 The following screen shows the @sc{mime} encoding specified by the
5355 tags. You can see why mail user agents are usually built to hide these
5356 details from the user.
5357
5358 @cartouche
5359 @smallexample
5360 To: wohler
5361 cc:
5362 Subject: Test of MIME
5363 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
5364 MIME-Version: 1.0
5365 Content-Type: multipart/mixed; boundary="=-=-="
5366 --------
5367 --=-=-=
5368
5369 Here is the SETI@@Home logo:
5370
5371
5372 --=-=-=
5373 Content-Type: image/x-xpm
5374 Content-Disposition: inline; filename=setiathome.xpm
5375 Content-Transfer-Encoding: base64
5376 Content-Description: SETI@@home logo
5377
5378 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N
5379 --:-- @{draft@} Top L1 (MH-Letter)----------------------------------
5380
5381 @end smallexample
5382 @end cartouche
5383 @i{MH-E @sc{mime} draft ready to send}
5384
5385 @cindex undo effects of mh-mml-to-mime
5386
5387 This action can be undone by running @kbd{C-_} (@code{undo}).
5388
5389 @cindex @command{mhbuild}
5390 @cindex @command{mhn}
5391 @cindex MH commands, @command{mhbuild}
5392 @cindex MH commands, @command{mhn}
5393 @cindex undo effects of mh-mh-to-mime
5394 @findex mh-mh-to-mime
5395 @findex mh-mh-to-mime-undo
5396 @kindex C-c C-e
5397 @kindex C-c C-m C-m
5398 @kindex C-c C-m C-u
5399 @kindex C-c C-m u
5400
5401 If you're using MH-style directives, use @kbd{C-c C-e}
5402 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the
5403 command @command{mhbuild} (@command{mhn}) on the message which expands
5404 the tags@footnote{See the section
5405 @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
5406 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u}
5407 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup
5408 file. You are prompted to confirm this action, but you can avoid the
5409 confirmation by adding an argument (for example, @kbd{C-u C-c C-m
5410 C-u}).
5411
5412 @kindex C-c C-e
5413 @vindex mh-mh-to-mime-args
5414
5415 If you wish to pass additional arguments to @command{mhbuild}
5416 (@command{mhn}) to affect how it builds your message, use the option
5417 @code{mh-mh-to-mime-args}. For example, you can build a consistency
5418 check into the message by setting @code{mh-mh-to-mime-args} to
5419 @samp{-check}. The recipient of your message can then run
5420 @samp{mhbuild -check} on the message---@command{mhbuild}
5421 (@command{mhn}) will complain if the message has been corrupted on the
5422 way. The command @kbd{C-c C-e} only consults this option when given a
5423 prefix argument (as in @kbd{C-u C-c C-e}).
5424
5425 @kindex C-c C-e
5426 @vindex mh-mh-to-mime-hook
5427
5428 The hook @code{mh-mh-to-mime-hook} is called after the message has
5429 been formatted by @kbd{C-c C-e}.
5430
5431 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts
5432 @section Signing and Encrypting Messages
5433
5434 @cindex signing messages
5435 @cindex encrypting messages
5436 @cindex RFC 3156
5437
5438 MH-E can sign and encrypt messages as defined in
5439 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you
5440 should choose to sign or encrypt your message, use one of the
5441 following commands to do so any time before sending your message.
5442
5443 @findex mh-mml-secure-message-encrypt
5444 @findex mh-mml-secure-message-sign
5445 @findex mh-mml-secure-message-signencrypt
5446 @kindex C-c C-m C-e
5447 @kindex C-c C-m C-s
5448 @kindex C-c C-m e e
5449 @kindex C-c C-m e s
5450 @kindex C-c C-m s e
5451 @kindex C-c C-m s s
5452
5453 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign})
5454 inserts the following tag:
5455
5456 @smallexample
5457 <#secure method=pgpmime mode=sign>
5458 @end smallexample
5459
5460 This is used to sign your message digitally. Likewise, the command
5461 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the
5462 following tag:
5463
5464 @smallexample
5465 <#secure method=pgpmime mode=encrypt>
5466 @end smallexample
5467
5468 This is used to encrypt your message. Finally, the command @kbd{C-c
5469 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the
5470 following tag:
5471
5472 @smallexample
5473 <#secure method=pgpmime mode=signencrypt>
5474 @end smallexample
5475
5476 @findex mh-mml-unsecure-message
5477 @kindex C-c C-m C-n
5478 @kindex C-c C-m n
5479 @vindex mh-mml-method-default
5480
5481 This is used to sign and encrypt your message. In each of these cases,
5482 a proper multipart message is created for you when you send the
5483 message. Use the command @kbd{C-c C-m C-n}
5484 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix
5485 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the
5486 possible security methods (see @code{mh-mml-method-default}).
5487
5488 @vindex mh-mml-method-default
5489
5490 The option @code{mh-mml-method-default} is used to select between a
5491 variety of mail security mechanisms. The default is @samp{PGP (MIME)}
5492 if it is supported; otherwise, the default is @samp{None}. Other
5493 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}.
5494
5495 @cindex @samp{pgg} customization group
5496 @cindex PGG
5497 @cindex customization group, @samp{pgg}
5498
5499 The @samp{pgg} customization group may have some settings which may
5500 interest you.
5501 @iftex
5502 See @cite{The PGG Manual}.
5503 @end iftex
5504 @ifinfo
5505 @xref{Top, , The PGG Manual, pgg, The PGG Manual}.
5506 @end ifinfo
5507 @ifhtml
5508 See
5509 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
5510 @cite{The PGG Manual}}.
5511 @end ifhtml
5512
5513 @cindex header field, @samp{Fcc:}
5514 @cindex @samp{Fcc:} header field
5515 @vindex pgg-encrypt-for-me
5516
5517 In particular, I turn on the option @code{pgg-encrypt-for-me} so that
5518 all messages I encrypt are encrypted with my public key as well. If
5519 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header
5520 field, this setting is vital so that you can read the mail you write!
5521
5522 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts
5523 @section Checking Recipients
5524
5525 @cindex @samp{*MH-E Recipients*}
5526 @cindex @command{whom}
5527 @cindex MH commands, @command{whom}
5528 @cindex buffers, @samp{*MH-E Recipients*}
5529 @cindex checking recipients
5530 @cindex recipients, checking
5531 @findex mh-check-whom
5532 @kindex C-c C-w
5533
5534 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so
5535 you can check the actual address(es) in the alias. A new buffer named
5536 @samp{*MH-E Recipients*} is created with the output of @command{whom}
5537 (@pxref{Miscellaneous})@footnote{See the section
5538 @uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the
5539 whatnow Program} in the MH book.}.
5540
5541 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
5542 @section Sending a Message
5543
5544 @cindex buffers, @samp{*MH-E Mail Delivery*}
5545 @cindex @samp{*MH-E Mail Delivery*}
5546 @cindex sending mail
5547 @findex mh-send-letter
5548 @kindex C-c C-c
5549
5550 When you are all through editing a message, you send it with the
5551 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix
5552 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the
5553 delivery; this output can be found in a buffer called @samp{*MH-E Mail
5554 Delivery*} (@pxref{Miscellaneous}).
5555
5556 @cindex sending mail
5557 @cindex spell check
5558 @findex ispell-message
5559 @kindex C-c C-c
5560 @vindex mh-before-send-letter-hook
5561
5562 The hook @code{mh-before-send-letter-hook} is run at the beginning of
5563 the command @kbd{C-c C-c}. For example, if you want to check your
5564 spelling in your message before sending, add the function
5565 @code{ispell-message}.
5566
5567 @cindex @command{send}
5568 @cindex MH commands, @command{send}
5569 @vindex mh-send-prog
5570
5571 In case the MH @command{send} program@footnote{See the section
5572 @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
5573 in the MH book.} is installed under a different name, use
5574 @code{mh-send-prog} to tell MH-E the name.
5575
5576 @node Killing Draft, , Sending Message, Editing Drafts
5577 @section Killing the Draft
5578
5579 @cindex killing draft
5580 @findex kill-buffer
5581 @findex mh-fully-kill-draft
5582 @kindex C-c C-q
5583 @kindex C-x k
5584
5585 If for some reason you are not happy with the draft, you can use the
5586 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft
5587 buffer and delete the draft message. Use the command @kbd{C-x k}
5588 (@code{kill-buffer}) if you don't want to delete the draft message.
5589
5590 @node Aliases, Identities, Editing Drafts, Top
5591 @chapter Aliases
5592
5593 @cindex aliases
5594
5595 MH aliases are used in the same way in MH-E as they are in MH. Any
5596 alias listed as a recipient will be expanded when the message is sent.
5597 This chapter discusses other things you can do with aliases in MH-E.
5598
5599 @cindex MH-Letter mode
5600 @cindex modes, MH-Letter
5601
5602 The following commands are available in MH-Letter mode with the
5603 exception of @code{mh-alias-reload} which can be called from anywhere.
5604
5605 @table @kbd
5606 @kindex @key{SPC}
5607 @findex mh-letter-complete-or-space
5608 @item @key{SPC}
5609 Perform completion or insert space (@code{mh-letter-complete-or-space}).
5610 @c -------------------------
5611 @kindex M-@key{TAB}
5612 @findex mh-letter-complete
5613 @item M-@key{TAB}
5614 Perform completion on header field or word preceding point
5615 (@code{mh-letter-complete}).
5616 @c -------------------------
5617 @findex mh-alias-apropos
5618 @item mh-alias-apropos
5619 Show all aliases or addresses that match a regular expression.
5620 @c -------------------------
5621 @findex mh-alias-grab-from-field
5622 @item mh-alias-grab-from-field
5623 Add alias for the sender of the current message
5624 @c -------------------------
5625 @findex mh-alias-reload
5626 @item mh-alias-reload
5627 Reload MH aliases.
5628 @end table
5629
5630 @cindex @samp{mh-alias} customization group
5631 @cindex customization group, @samp{mh-alias}
5632
5633 The @samp{mh-alias} customization group contains options associated
5634 with aliases.
5635
5636 @vtable @code
5637 @item mh-alias-completion-ignore-case-flag
5638 On means don't consider case significant in MH alias completion
5639 (default: @samp{on}).
5640 @c -------------------------
5641 @item mh-alias-expand-aliases-flag
5642 On means to expand aliases entered in the minibuffer (default:
5643 @samp{off}).
5644 @c -------------------------
5645 @item mh-alias-flash-on-comma
5646 Specify whether to flash address or warn on translation (default: @samp{Flash
5647 but Don't Warn If No Alias}).
5648 @c -------------------------
5649 @item mh-alias-insert-file
5650 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile
5651 Profile Component}).
5652 @c -------------------------
5653 @item mh-alias-insertion-location
5654 Specifies where new aliases are entered in alias files (default:
5655 @samp{Alphabetical}).
5656 @c -------------------------
5657 @item mh-alias-local-users
5658 If @samp{on}, local users are added to alias completion (default:
5659 @samp{on}).
5660 @c -------------------------
5661 @item mh-alias-local-users-prefix
5662 String prefixed to the real names of users from the password file
5663 (default: @code{"local."}.
5664 @c -------------------------
5665 @item mh-alias-passwd-gecos-comma-separator-flag
5666 On means the GECOS field in the password file uses a comma separator
5667 (default: @samp{on}).
5668 @end vtable
5669
5670 The following hook is available.
5671
5672 @vtable @code
5673 @item mh-alias-reloaded-hook
5674 Hook run by @code{mh-alias-reload} after loading aliases (default:
5675 @code{nil}).
5676 @end vtable
5677
5678 @subheading Adding Addresses to Draft
5679
5680 You can use aliases when you are adding recipients to a message.
5681
5682 @findex minibuffer-complete
5683 @kindex @key{TAB}
5684 @vindex mh-alias-expand-aliases-flag
5685 @vindex mh-compose-prompt-flag
5686
5687 In order to use minibuffer prompting for recipients and the subject
5688 line in the minibuffer, turn on the option
5689 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the
5690 @key{TAB} (@code{minibuffer-complete}) command to complete aliases
5691 (and optionally local logins) when prompted for the recipients. Turn
5692 on the option @code{mh-alias-expand-aliases-flag} if you want these
5693 aliases to be expanded to their respective addresses in the draft.
5694
5695 @findex mh-letter-complete
5696 @findex mh-letter-complete-or-space
5697 @kindex @key{SPC}
5698 @kindex M-@key{TAB}
5699
5700 Otherwise, you can complete aliases in the header of the draft with
5701 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC}
5702 (@code{mh-letter-complete-or-space}).
5703
5704 @vindex mh-alias-completion-ignore-case-flag
5705
5706 As MH ignores case in the aliases, so too does MH-E. However, you may
5707 turn off the option @code{mh-alias-completion-ignore-case-flag} to
5708 make case significant which can be used to segregate completion of
5709 your aliases. You might use uppercase for mailing lists and lowercase
5710 for people. For example, you might have:
5711
5712 @smallexample
5713 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org>
5714 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org>
5715 @end smallexample
5716
5717 When this option is turned off, if you were to type @kbd{M} in the
5718 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list;
5719 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then
5720 you'd get Mark's address. Note that this option affects completion
5721 only. If you were to enter @kbd{Mark.Baushke}, it would still be
5722 identified with your @samp{mark.baushke} alias.
5723
5724 @findex mh-alias-minibuffer-confirm-address
5725 @findex mh-letter-confirm-address
5726 @vindex mh-alias-flash-on-comma
5727 @vindex mh-compose-prompt-flag
5728
5729 To verify that the alias you've entered is valid, the alias will be
5730 displayed in the minibuffer when you type a comma
5731 (@code{mh-letter-confirm-address} or
5732 @code{mh-alias-minibuffer-confirm-address} if the option
5733 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This
5734 behavior can be controlled with the option
5735 @code{mh-alias-flash-on-comma} which provides three choices:
5736 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No
5737 Alias}, and @samp{Don't Flash Nor Warn If No Alias}.
5738
5739 For another way to verify the alias expansion, see @ref{Checking
5740 Recipients}.
5741
5742 @subheading Loading Aliases
5743
5744 @cindex @command{ali}
5745 @cindex @file{/etc/nmh/MailAliases}
5746 @cindex @samp{Aliasfile:} MH profile component
5747 @cindex MH commands, @command{ali}
5748 @cindex MH profile component, @samp{Aliasfile:}
5749 @cindex files, @file{/etc/nmh/MailAliases}
5750
5751 MH-E loads aliases for completion and folder name hints from various
5752 places. It uses the MH command @command{ali}@footnote{See the section
5753 @uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to
5754 read aliases from the files listed in the profile component
5755 @samp{Aliasfile:} as well as system-wide aliases (for example,
5756 @file{/etc/nmh/MailAliases}).
5757
5758 @cindex @file{/etc/passwd}
5759 @cindex files, @file{/etc/passwd}
5760
5761 In addition, aliases are created from @file{/etc/passwd} entries with
5762 a user ID larger than a magical number, typically 200. This can be a
5763 handy tool on a machine where you and co-workers exchange messages.
5764 These aliases have the form @samp{local.@var{first.last}} if a real
5765 name is present in the password file. Otherwise, the alias will have
5766 the form @samp{local.@var{login}}.
5767
5768 @vindex mh-alias-local-users-prefix
5769
5770 The prefix @samp{local.} can be modified via the option
5771 @code{mh-alias-local-users-prefix}. This option can also be set to
5772 @samp{Use Login}.
5773
5774 For example, consider the following password file entry:
5775
5776 @smallexample
5777 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
5778 @end smallexample
5779
5780 @vindex mh-alias-local-users-prefix
5781
5782 The following settings of option @code{mh-alias-local-users-prefix}
5783 will produce the associated aliases:
5784
5785 @table @code
5786 @item "local."
5787 local.peter.galbraith
5788 @c -------------------------
5789 @item ""
5790 peter.galbraith
5791 @c -------------------------
5792 @item Use Login
5793 psg
5794 @end table
5795
5796 @vindex mh-alias-passwd-gecos-comma-separator-flag
5797
5798 In the example above, commas are used to separate different values
5799 within the so-called GECOS field. This is a fairly common usage.
5800 However, in the rare case that the GECOS field in your password file
5801 is not separated by commas and whose contents may contain commas, you
5802 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag}
5803 off.
5804
5805 @cindex NIS, obtaining local aliases from
5806 @cindex @samp{ypcat passwd}
5807 @vindex mh-alias-local-users
5808
5809 If you're on a system with thousands of users you don't know, and the
5810 loading of local aliases slows MH-E down noticeably, then the local
5811 alias feature can be disabled by turning off the option
5812 @code{mh-alias-local-users}. This option also takes a string which is
5813 executed to generate the password file. For example, use @samp{ypcat
5814 passwd} to obtain the NIS password file.
5815
5816 @findex mh-alias-reload
5817 @kindex M-x mh-alias-reload
5818 @vindex mh-alias-reloaded-hook
5819
5820 Since aliases are updated frequently, MH-E reloads aliases
5821 automatically whenever an alias lookup occurs if an alias source has
5822 changed. However, you can reload your aliases manually by calling the
5823 command @kbd{M-x mh-alias-reload} directly. This command runs
5824 @code{mh-alias-reloaded-hook} after the aliases have been loaded.
5825
5826 @subheading Adding Aliases
5827
5828 In the past, you have manually added aliases to your alias file(s)
5829 listed in your @samp{Aliasfile:} profile component. MH-E provides
5830 other methods for maintaining your alias file(s).
5831
5832 @findex mh-alias-add-alias
5833 @kindex M-x mh-alias-add-alias
5834
5835 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt
5836 you for the alias and address that you would like to add. If the alias
5837 exists already, you will have the choice of inserting the new alias
5838 before or after the old alias. In the former case, this alias will be
5839 used when sending mail to this alias. In the latter case, the alias
5840 serves as an additional folder name hint when filing messages
5841 (@pxref{Folder Selection}).
5842
5843 Earlier, the alias prefix @samp{local} was presented. You can use
5844 other prefixes to organize your aliases or disambiguate entries. You
5845 might use prefixes for locales, jobs, or activities. For example, I
5846 have:
5847
5848 @smallexample
5849 @group
5850 ; Work
5851 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com>
5852 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com>
5853 ...
5854 ; Sport
5855 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com>
5856 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com>
5857 ...
5858 ; Personal
5859 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com>
5860 ...
5861 @end group
5862 @end smallexample
5863
5864 Using prefixes instead of postfixes helps you explore aliases during
5865 completion. If you forget the name of an old dive buddy, you can enter
5866 @samp{div} and then @key{SPC} to get a listing of all your dive buddies.
5867
5868 @kindex M-x mh-alias-add-address-under-point
5869 @kindex M-x mh-alias-grab-from-field
5870
5871 An alias for the sender of the current message is added automatically
5872 by clicking on the @samp{Grab From alias} tool bar button or by running
5873 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other
5874 recipients of the current message are added by placing your cursor
5875 over the desired recipient and giving the @kbd{M-x
5876 mh-alias-add-address-under-point} command.
5877
5878 @vindex mh-alias-insert-file
5879 @vindex mh-alias-insertion-location
5880
5881 The options @code{mh-alias-insert-file} and
5882 @code{mh-alias-insertion-location} controls how and where these aliases
5883 are inserted.
5884
5885 @vindex mh-alias-insert-file
5886
5887 The default setting of option @code{mh-alias-insert-file} is @samp{Use
5888 Aliasfile Profile Component}. This option can also hold the name of a
5889 file or a list a file names. If this option is set to a list of file
5890 names, or the @samp{Aliasfile:} profile component contains more than
5891 one file name, MH-E will prompt for one of them.
5892
5893 @vindex mh-alias-insertion-location
5894
5895 The option @code{mh-alias-insertion-location} is set to
5896 @samp{Alphabetical} by default. If you organize your alias file in
5897 other ways, then the settings @samp{Top} and @samp{Bottom} might be
5898 more appropriate.
5899
5900 @subheading Querying Aliases
5901
5902 @cindex regular expressions, @code{mh-alias-apropos}
5903 @findex mh-alias-apropos
5904 @kindex M-x mh-alias-apropos
5905
5906 If you can't quite remember an alias, you can use @kbd{M-x
5907 mh-alias-apropos} to show all aliases or addresses that match a
5908 regular expression
5909 @ifnothtml
5910 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
5911 GNU Emacs Manual}).
5912 @end ifnothtml
5913 @ifhtml
5914 (see the section
5915 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
5916 Syntax of Regular Expressions} in
5917 @cite{The GNU Emacs Manual}).
5918 @end ifhtml
5919
5920 @node Identities, Speedbar, Aliases, Top
5921 @chapter Identities
5922
5923 @cindex identities
5924 @cindex multiple personalities
5925
5926 MH-E supports the concept of multiple personalities or identities.
5927 This means that you can easily have a different header and signature
5928 at home and at work.
5929
5930 @cindex @samp{Identity} menu
5931 @cindex menu, @samp{Identity}
5932
5933 A couple of commands are used to insert identities in MH-Letter mode
5934 which are also found in the @samp{Identity} menu.
5935
5936 @table @kbd
5937 @kindex C-c C-d
5938 @findex mh-insert-identity
5939 @item C-c C-d
5940 Insert fields specified by given identity (@code{mh-insert-identity}).
5941 @c -------------------------
5942 @cindex @samp{Identity > Insert Auto Fields} menu item
5943 @cindex menu item, @samp{Identity > Insert Auto Fields}
5944 @kindex C-c M-d
5945 @findex mh-insert-auto-fields
5946 @item C-c M-d
5947 Insert custom fields if recipient found in @code{mh-auto-fields-list}
5948 (@code{mh-insert-auto-fields}).
5949 @end table
5950
5951 @cindex @samp{mh-identity} customization group
5952 @cindex customization group, @samp{mh-identity}
5953
5954 The @samp{mh-identity} customization group contains the following
5955 options.
5956
5957 @vtable @code
5958 @item mh-auto-fields-list
5959 List of recipients for which header lines are automatically inserted
5960 (default: @code{nil}).
5961 @c -------------------------
5962 @item mh-auto-fields-prompt-flag
5963 On means to prompt before sending if fields inserted (default:
5964 @samp{on})
5965 @c -------------------------
5966 @item mh-identity-default
5967 Default identity to use when @code{mh-letter-mode} is called (default:
5968 @samp{None}).
5969 @c -------------------------
5970 @item mh-identity-handlers
5971 Handler functions for fields in @code{mh-identity-list}.
5972 @c -------------------------
5973 @item mh-identity-list
5974 List of identities (default: @code{nil}).
5975 @end vtable
5976
5977 Some of the common header fields that people change depending on the
5978 context are the @samp{From:} and @samp{Organization:} fields, as well
5979 as the signature.
5980
5981 @vindex mh-identity-list
5982
5983 This is done by customizing the option @code{mh-identity-list}. In the
5984 customization buffer for this option, click on the @samp{INS} button
5985 and enter a label such as @samp{Home} or @samp{Work}. Then click on
5986 the @samp{INS} button with the label @samp{Add at least one item
5987 below}. The @samp{Value Menu} has the following menu items:
5988
5989 @table @samp
5990 @cindex header field, @samp{From:}
5991 @cindex @samp{From:} header field
5992 @item From Field
5993 Specify an alternate @samp{From:} header field. You must include a
5994 valid email address. A standard format is @samp{First Last
5995 <login@@host.domain>}. If you use an initial with a period, then you
5996 must quote your name as in @samp{"First I. Last"
5997 <login@@host.domain>}.
5998 @c -------------------------
5999 @cindex header field, @samp{Organization:}
6000 @cindex @samp{Organization:} header field
6001 @item Organization Field
6002 People usually list the name of the company where they work here.
6003 @c -------------------------
6004 @item Other Field
6005 Set any arbitrary header field and value here. Unless the header field
6006 is a standard one, precede the name of your field's label with
6007 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}.
6008 @c -------------------------
6009 @item Attribution Verb
6010 This value overrides the setting of
6011 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}.
6012 @c -------------------------
6013 @cindex signature
6014 @vindex mh-signature-file-name
6015 @item Signature
6016 Set your signature with this item. You can specify the contents of
6017 @code{mh-signature-file-name}, a file, or a function.
6018 @xref{Signature}.
6019 @c -------------------------
6020 @item GPG Key ID
6021 Specify a different key to sign or encrypt messages.
6022 @end table
6023
6024 @cindex Identity menu
6025 @cindex menu, Identity
6026 @findex mh-insert-identity
6027 @kindex C-c C-d
6028
6029 You can select the identities you have added via the menu called
6030 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c
6031 C-d} (@code{mh-insert-identity}). To clear the fields and signature
6032 added by the identity, select the @samp{None} identity.
6033
6034 @cindex menu item, @samp{Identity > Customize Identities}
6035 @cindex menu item, @samp{Identity > Save as Default}
6036 @cindex menu item, @samp{Identity > Set Default for Session}
6037 @cindex @samp{Identity > Customize Identities} menu item
6038 @cindex @samp{Identity > Save as Default} menu item
6039 @cindex @samp{Identity > Set Default for Session} menu item
6040 @vindex mh-identity-default
6041
6042 The @samp{Identity} menu contains two other items to save you from
6043 having to set the identity on every message. The menu item @samp{Set
6044 Default for Session} can be used to set the default identity to the
6045 current identity until you exit Emacs. The menu item @samp{Save as
6046 Default} sets the option @code{mh-identity-default} to the current
6047 identity setting. You can also customize the option
6048 @code{mh-identity-default} in the usual fashion. If you find that you
6049 need to add another identity, the menu item @samp{Customize
6050 Identities} is available for your convenience.
6051
6052 @cindex regular expressions, @code{mh-auto-fields-list}
6053 @vindex mh-auto-fields-list
6054
6055 The option @code{mh-auto-fields-list} can also be used to set the
6056 identity depending on the recipient to provide even more control. To
6057 customize @code{mh-auto-fields-list}, click on the @samp{INS} button
6058 and enter a regular expression for the recipient's address
6059 @ifnothtml
6060 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
6061 GNU Emacs Manual}).
6062 @end ifnothtml
6063 @ifhtml
6064 (see the section
6065 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
6066 Syntax of Regular Expressions} in
6067 @cite{The GNU Emacs Manual}).
6068 @end ifhtml
6069 Click on the @samp{INS} button with the @samp{Add at least one item
6070 below} label. The @samp{Value Menu} contains the following menu items:
6071
6072 @table @samp
6073 @item Identity
6074 Select an identity from those configured in @code{mh-identity-list}.
6075 All of the information for that identity will be added if the
6076 recipient matches.
6077 @c -------------------------
6078 @cindex @samp{Fcc:} header field
6079 @cindex header field, @samp{Fcc:}
6080 @item Fcc Field
6081 Insert an @samp{Fcc:} header field with the folder you provide. When
6082 you send the message, MH will put a copy of your message in this
6083 folder.
6084 @c -------------------------
6085 @cindex @samp{Mail-Followup-To:} header field
6086 @cindex header field, @samp{Mail-Followup-To:}
6087 @item Mail-Followup-To Field
6088 Insert an @samp{Mail-Followup-To:} header field with the recipients
6089 you provide. If the recipient's mail user agent supports this header
6090 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then
6091 their replies will go to the addresses listed. This is useful if their
6092 replies go both to the list and to you and you don't have a mechanism
6093 to suppress duplicates. If you reply to someone not on the list, you
6094 must either remove the @samp{Mail-Followup-To:} field, or ensure the
6095 recipient is also listed there so that he receives replies to your
6096 reply.
6097 @c -------------------------
6098 @item Other Field
6099 Other header fields may be added using this menu item.
6100 @end table
6101
6102 @findex mh-insert-auto-fields
6103 @kindex C-c M-d
6104 @vindex mh-auto-fields-prompt-flag
6105
6106 These fields can only be added after the recipient is known. Because
6107 you can continue to add recipients as you edit the draft, MH-E waits
6108 until the message is sent to perform the auto-insertions. This seems
6109 strange at first, but you'll get used to it. There are two ways to
6110 help you feel that the desired fields are added. The first is the
6111 action when the message is sent: if any fields are added
6112 automatically, you are given a chance to see and to confirm these
6113 fields before the message is actually sent. You can do away with this
6114 confirmation by turning off the option
6115 @code{mh-auto-fields-prompt-flag}. The second method is manual: once
6116 the header contains one or more recipients, you may run the command
6117 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the
6118 @samp{Identity -> Insert Auto Fields} menu item to insert these fields
6119 manually. However, if you use this command, the automatic insertion
6120 when the message is sent is disabled.
6121
6122 @vindex mh-auto-fields-list
6123 @vindex mh-identity-list
6124
6125 You should avoid using the same header field in
6126 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions
6127 that may apply to the same message as the result is undefined.
6128
6129 @vindex mh-identity-handlers
6130 @vindex mh-identity-list
6131
6132 The option @code{mh-identity-handlers} is used to change the way that
6133 fields, signatures, and attributions in @code{mh-identity-list} are
6134 added. To customize @code{mh-identity-handlers}, replace the name of
6135 an existing handler function associated with the field you want to
6136 change with the name of a function you have written. You can also
6137 click on an @samp{INS} button and insert a field of your choice and
6138 the name of the function you have written to handle it.
6139
6140 @vindex mh-identity-list
6141
6142 The @samp{Field} field can be any field that you've used in your
6143 @code{mh-identity-list}. The special fields @samp{:attribution-verb},
6144 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the
6145 @code{mh-identity-list} choices @samp{Attribution Verb},
6146 @samp{Signature}, and @samp{GPG Key ID} respectively.
6147
6148 The handler associated with the @samp{:default} field is used when no
6149 other field matches.
6150
6151 The handler functions are passed two or three arguments: the field
6152 itself (for example, @samp{From}), or one of the special fields (for
6153 example, @samp{:signature}), and the action @samp{'remove} or
6154 @samp{'add}. If the action is @samp{'add}, an additional argument
6155 containing the value for the field is given.
6156
6157 @node Speedbar, Menu Bar, Identities, Top
6158 @chapter The Speedbar
6159
6160 @cindex folder navigation
6161 @cindex speedbar
6162 @findex mh-visit-folder
6163 @kindex F v
6164 @kindex M-x speedbar
6165 @kindex Mouse-2
6166
6167 You can also use the speedbar
6168 @ifnothtml
6169 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},)
6170 @end ifnothtml
6171 @ifhtml
6172 (see the section
6173 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html,
6174 Speedbar Frames} in @cite{The GNU Emacs Manual})
6175 @end ifhtml
6176 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar
6177 @key{RET}}. You will see a new frame appear with all of your MH
6178 folders. Folders with unseen messages appear in boldface. Click on a
6179 folder name with @kbd{Mouse-2} to visit that folder in a similar
6180 fashion to the command @kbd{F v} (@code{mh-visit-folder})
6181 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the
6182 sub-folders of that folder.
6183
6184 The speedbar can be manipulated with the keyboard as well. Use the
6185 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move
6186 the cursor over the desired folder and then use the shortcuts for the
6187 menu items listed in the table below.
6188
6189 @table @samp
6190 @findex mh-speed-view
6191 @item Visit Folder (@key{RET})
6192 Visits the selected folder just as if you had used @kbd{F v}
6193 (@code{mh-speed-view}).
6194 @c -------------------------
6195 @findex mh-speed-expand-folder
6196 @item Expand Nested Folders (@kbd{+})
6197 Expands the selected folder in the speedbar, exposing the children
6198 folders inside it (@code{mh-speed-expand-folder}).
6199 @c -------------------------
6200 @findex mh-speed-contract-folder
6201 @item Contract Nested Folders (@kbd{-})
6202 Contracts or collapses the selected folder in the speedbar, hiding the
6203 children folders inside it (@code{mh-speed-contract-folder}).
6204 @c -------------------------
6205 @findex mh-speed-refresh
6206 @item Refresh Speedbar (@kbd{r})
6207 Regenerates the list of folders in the speedbar. Run this command if
6208 you've added or deleted a folder, or want to update the unseen message
6209 count before the next automatic update (@code{mh-speed-refresh}).
6210 @end table
6211
6212 @findex delete-frame
6213 @kindex C-x 5 0
6214 @kindex Mouse-3
6215
6216 You can click on @kbd{Mouse-3} to bring up a context menu that
6217 contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
6218 (@code{delete-frame}).
6219
6220 @cindex @command{flists}
6221 @cindex MH commands, @command{flists}
6222 @cindex @samp{mh-speedbar} customization group
6223 @cindex customization group, @samp{mh-speedbar}
6224
6225 The MH-E speedbar uses the MH command @command{flists}@footnote{See
6226 the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for
6227 Sequences with flist} in the MH book.} to generate the list of
6228 folders. The @samp{mh-speedbar} customization group contains the
6229 following option which controls how often the speedbar calls
6230 @command{flists}.
6231
6232 @vtable @code
6233 @item mh-speed-update-interval
6234 Time between speedbar updates in seconds (default: 60). Set to 0 to
6235 disable automatic update.
6236 @end vtable
6237
6238 You can modify the appearance of the folders in the speedbar by
6239 customizing the following faces.
6240
6241 @vtable @code
6242 @item mh-speedbar-folder
6243 Basic folder face.
6244 @c -------------------------
6245 @item mh-speedbar-folder-with-unseen-messages
6246 Folder face when folder contains unread messages.
6247 @c -------------------------
6248 @item mh-speedbar-selected-folder
6249 Selected folder face.
6250 @c -------------------------
6251 @item mh-speedbar-selected-folder-with-unseen-messages
6252 Selected folder face when folder contains unread messages.
6253 @end vtable
6254
6255 @node Menu Bar, Tool Bar, Speedbar, Top
6256 @chapter The Menu Bar
6257
6258 @cindex @samp{Folder} menu
6259 @cindex @samp{Identity} menu
6260 @cindex @samp{Letter} menu
6261 @cindex @samp{Message} menu
6262 @cindex @samp{Search} menu
6263 @cindex @samp{Sequence} menu
6264 @cindex Folder menu
6265 @cindex Identity menu
6266 @cindex Letter menu
6267 @cindex MH-Folder mode
6268 @cindex MH-Letter mode
6269 @cindex MH-Search mode
6270 @cindex Message menu
6271 @cindex Search menu
6272 @cindex Sequence menu
6273 @cindex menu bar
6274 @cindex menu, Folder
6275 @cindex menu, Identity
6276 @cindex menu, Letter
6277 @cindex menu, Message
6278 @cindex menu, Search
6279 @cindex menu, Sequence
6280 @cindex menu, @samp{Folder}
6281 @cindex menu, @samp{Identity}
6282 @cindex menu, @samp{Letter}
6283 @cindex menu, @samp{Message}
6284 @cindex menu, @samp{Search}
6285 @cindex menu, @samp{Sequence}
6286 @cindex modes, MH-Folder
6287 @cindex modes, MH-Letter
6288 @cindex modes, MH-Search
6289
6290 For those of you who prefer to mouse and menu instead of using the
6291 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its
6292 functions. The MH-Folder buffer adds the @samp{Folder},
6293 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds
6294 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds
6295 the @samp{Search} menu. There's no need to list the actual items here,
6296 as you can more easily see them for yourself, and the functions are
6297 already described elsewhere in this manual.
6298
6299 For a description of the menu bar, please
6300 @ifnothtml
6301 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}.
6302 @end ifnothtml
6303 @ifhtml
6304 see the section
6305 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html,
6306 The Menu Bar} in @cite{The GNU Emacs Manual}.
6307 @end ifhtml
6308
6309 The Emacs manual describes how to get online help for a particular
6310 menu item. You can also look up a menu item in the index of this
6311 manual in two ways: all of the menu items are listed alphabetically,
6312 and you can also browse all of the items under the index entry
6313 @samp{menu item}.
6314
6315 @node Tool Bar, Searching, Menu Bar, Top
6316 @chapter The Tool Bar
6317
6318 @cindex tool bar
6319
6320 Emacs also provides a graphical tool bar. For a description of the
6321 tool bar, please
6322 @ifnothtml
6323 @xref{Tool Bars, , Tool Bars, emacs, The GNU Emacs Manual}.
6324 @end ifnothtml
6325 @ifhtml
6326 see the section
6327 @uref{http://www.gnu.org/software/emacs/manual/html_node/Tool-Bars.html,
6328 Tool Bars} in @cite{The GNU Emacs Manual}.
6329 @end ifhtml
6330
6331 @cindex @samp{mh-tool-bar} customization group
6332 @cindex customization group, @samp{mh-tool-bar}
6333
6334 MH-E adds several icons to this tool bar; you can modify the MH-E
6335 aspects of the tool bar via the @samp{mh-tool-bar} customization group.
6336
6337 @vtable @code
6338 @item mh-tool-bar-folder-buttons
6339 List of buttons to include in MH-Folder tool bar (default: a checklist
6340 too long to list here).
6341 @c -------------------------
6342 @item mh-tool-bar-letter-buttons
6343 List of buttons to include in MH-Letter tool bar (default: a checklist
6344 too long to list here).
6345 @c -------------------------
6346 @item mh-tool-bar-search-function
6347 Function called by the tool bar search button (default:
6348 @code{mh-search}).
6349 @c -------------------------
6350 @item mh-xemacs-tool-bar-position
6351 Tool bar location (default: @samp{Same As Default Tool Bar}).
6352 @c -------------------------
6353 @item mh-xemacs-use-tool-bar-flag
6354 If on, use tool bar (default: on, if supported).
6355 @end vtable
6356
6357 In GNU Emacs, icons for some of MH-E's functions are added to the tool
6358 bar. In XEmacs, you have the opportunity to create a separate tool bar for
6359 the MH-E icons.
6360
6361 @vindex mh-tool-bar-folder-buttons
6362 @vindex mh-tool-bar-letter-buttons
6363
6364 In either case, you can select which of these functions you'd like to
6365 see by customizing the options @code{mh-tool-bar-folder-buttons} and
6366 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former
6367 customizes the tool bar in MH-Folder mode and the latter in MH-Letter
6368 mode. Both of these options present you with a list of functions;
6369 check the functions whose icons you want to see and clear the check
6370 boxes for those you don't.
6371
6372 @findex mh-search
6373 @vindex mh-tool-bar-search-function
6374
6375 The function associated with the searching icon can be set via the
6376 option @code{mh-tool-bar-search-function}. By default, this is set to
6377 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other
6378 Function} from the @samp{Value Menu} and enter a function of your own
6379 choosing.
6380
6381 @vindex mh-xemacs-use-tool-bar-flag
6382
6383 XEmacs provides a couple of extra options. The first,
6384 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E
6385 icons at all. By default, this option is turned on if the window
6386 system supports tool bars. If your system doesn't support tool bars,
6387 then you won't be able to turn on this option.
6388
6389 @vindex mh-xemacs-tool-bar-position
6390
6391 The second extra option is @code{mh-xemacs-tool-bar-position} which
6392 controls the placement of the tool bar along the four edges of the
6393 frame. You can choose from one of @samp{Same As Default Tool Bar},
6394 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this
6395 variable is set to anything other than @samp{Same As Default Tool Bar}
6396 and the default tool bar is in a different location, then two tool
6397 bars will be displayed: the MH-E tool bar and the default tool bar.
6398
6399 @node Searching, Threading, Tool Bar, Top
6400 @chapter Searching Through Messages
6401
6402 @cindex @samp{Search} menu
6403 @cindex menu, @samp{Search}
6404 @cindex searching
6405 @findex mh-search
6406 @kindex F s
6407
6408 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which
6409 helps you find messages that lie buried in your folders
6410 (@pxref{Folders}). This chapter covers this command in more detail.
6411 Several commands are used to compose the search criteria and to start
6412 searching. A couple of them can be found in the @samp{Search} menu.
6413
6414 @table @kbd
6415 @kindex C-c ?
6416 @findex mh-help
6417 @item C-c ?
6418 Display cheat sheet for the MH-E commands (@code{mh-help}).
6419 @c -------------------------
6420 @cindex @samp{Search > Perform Search} menu item
6421 @cindex menu item, @samp{Search > Perform Search}
6422 @kindex C-c C-c
6423 @findex mh-index-do-search
6424 @item C-c C-c
6425 Find messages using @code{mh-search-program}
6426 (@code{mh-index-do-search}).
6427 @c -------------------------
6428 @cindex @samp{Search > Search with pick} menu item
6429 @cindex menu item, @samp{Search > Search with pick}
6430 @kindex C-c C-p
6431 @findex mh-pick-do-search
6432 @item C-c C-p
6433 Find messages using @command{pick} (@code{mh-pick-do-search}).
6434 @c -------------------------
6435 @kindex C-c ?
6436 @findex mh-help
6437 @item C-c ?
6438 Display cheat sheet for the MH-E commands (@code{mh-help}).
6439 @c -------------------------
6440 @kindex C-c C-f C-a
6441 @kindex C-c C-f a
6442 @findex mh-to-field
6443 @item C-c C-f a
6444 @itemx C-c C-f C-a
6445 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
6446 @c -------------------------
6447 @kindex C-c C-f C-b
6448 @kindex C-c C-f b
6449 @item C-c C-f b
6450 @itemx C-c C-f C-b
6451 Move to @samp{Bcc:} header field (@code{mh-to-field}).
6452 @c -------------------------
6453 @kindex C-c C-f C-c
6454 @kindex C-c C-f c
6455 @item C-c C-f c
6456 @itemx C-c C-f C-c
6457 Move to @samp{Cc:} header field (@code{mh-to-field}).
6458 @c -------------------------
6459 @kindex C-c C-f C-d
6460 @kindex C-c C-f d
6461 @item C-c C-f d
6462 @itemx C-c C-f C-d
6463 Move to @samp{Dcc:} header field (@code{mh-to-field}).
6464 @c -------------------------
6465 @kindex C-c C-f C-f
6466 @kindex C-c C-f f
6467 @item C-c C-f f
6468 @itemx C-c C-f C-f
6469 Move to @samp{Fcc:} header field (@code{mh-to-field}).
6470 @c -------------------------
6471 @kindex C-c C-f C-l
6472 @kindex C-c C-f l
6473 @item C-c C-f l
6474 @itemx C-c C-f C-l
6475 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
6476 @c -------------------------
6477 @kindex C-c C-f C-m
6478 @kindex C-c C-f m
6479 @item C-c C-f m
6480 @itemx C-c C-f C-m
6481 Move to @samp{From:} header field (@code{mh-to-field}).
6482 @c -------------------------
6483 @kindex C-c C-f C-r
6484 @kindex C-c C-f r
6485 @item C-c C-f r
6486 @itemx C-c C-f C-r
6487 Move to @samp{Reply-To:} header field (@code{mh-to-field}).
6488 @c -------------------------
6489 @kindex C-c C-f C-s
6490 @kindex C-c C-f s
6491 @item C-c C-f s
6492 @itemx C-c C-f C-s
6493 Move to @samp{Subject:} header field (@code{mh-to-field}).
6494 @c -------------------------
6495 @kindex C-c C-f C-t
6496 @kindex C-c C-f t
6497 @item C-c C-f t
6498 @itemx C-c C-f C-t
6499 Move to @samp{To:} header field (@code{mh-to-field}).
6500 @end table
6501
6502 Another few commands are available in the MH-Folder buffer resulting
6503 from a search.
6504
6505 @table @kbd
6506 @kindex @key{TAB}
6507 @findex mh-index-next-folder
6508 @item @key{TAB}
6509 Jump to the next folder marker (@code{mh-index-next-folder}).
6510 @c -------------------------
6511 @kindex S-@key{TAB}
6512 @findex mh-index-previous-folder
6513 @item S-@key{TAB}
6514 Jump to the previous folder marker (@code{mh-index-previous-folder}).
6515 @c -------------------------
6516 @kindex v
6517 @findex mh-index-visit-folder
6518 @item v
6519 Visit original folder from where the message at point was found
6520 (@code{mh-index-visit-folder}).
6521 @end table
6522
6523 @cindex @samp{mh-search} customization group
6524 @cindex customization group, @samp{mh-search}
6525
6526 There is one option from the @samp{mh-search} customization group used
6527 in searching.
6528
6529 @vtable @code
6530 @item mh-search-program
6531 Search program that MH-E shall use (default: @samp{Auto-detect}).
6532 @end vtable
6533
6534 The following hook is available.
6535
6536 @vtable @code
6537 @item mh-search-mode-hook
6538 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}).
6539 @end vtable
6540
6541 The following face is available.
6542
6543 @vtable @code
6544 @item mh-search-folder
6545 Folder heading face in MH-Folder buffers created by searches.
6546 @end vtable
6547
6548 @findex mh-search-folder
6549 @kindex F s
6550
6551 The command @kbd{F s} (@code{mh-search-folder}) helps you find
6552 messages in your entire corpus of mail. You can search for messages to
6553 or from a particular person or about a particular subject. In fact,
6554 you can also search for messages containing selected strings in any
6555 arbitrary header field or any string found within the messages.
6556
6557 @cindex @command{pick}
6558 @cindex MH commands, @command{pick}
6559
6560 Out of the box, MH-E uses @command{pick} to find messages. With a
6561 little extra effort, you can set an indexing program which rewards you
6562 with extremely quick results. The drawback is that sometimes the index
6563 does not contain the words you're looking for. You can still use
6564 @command{pick} in these situations.
6565
6566 You are prompted for the folder to search. This can be @samp{all} to
6567 search all folders. Note that the search works recursively on the
6568 listed folder.
6569
6570 @cindex MH-Search mode
6571 @cindex modes, MH-Search
6572
6573 Next, an MH-Search buffer appears where you can enter search criteria.
6574
6575 @cartouche
6576 @smallexample
6577 From:
6578 To:
6579 Cc:
6580 Date:
6581 Subject:
6582 --------
6583 #
6584
6585
6586
6587
6588
6589
6590
6591
6592 --:** search-pattern All L7 (MH-Search)---------------------------
6593 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
6594 @end smallexample
6595 @end cartouche
6596 @i{Search window}
6597
6598 @cindex @command{pick}
6599 @cindex MH commands, @command{pick}
6600
6601 Edit this template by entering your search criteria in an appropriate
6602 header field that is already there, or create a new field yourself. If
6603 the string you're looking for could be anywhere in a message, then
6604 place the string underneath the row of dashes.
6605
6606 As an example, let's say that we want to find messages from Ginnean
6607 about horseback riding in the Kosciusko National Park (Australia)
6608 during January, 1994. Normally we would start with a broad search and
6609 narrow it down if necessary to produce a manageable amount of data,
6610 but we'll cut to the chase and create a fairly restrictive set of
6611 criteria as follows:
6612
6613 @smallexample
6614 @group
6615 From: ginnean
6616 To:
6617 Cc:
6618 Date: Jan 1994
6619 Subject:
6620 --------
6621 horse
6622 kosciusko
6623 @end group
6624 @end smallexample
6625
6626 @findex mh-to-field
6627 @kindex C-c C-f C-t
6628
6629 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f
6630 C-t} (@code{mh-to-field}) to help you fill in the blanks.
6631 @xref{Editing Message}.
6632
6633 @kindex F s
6634 @vindex mh-search-mode-hook
6635
6636 If you find that you do the same thing over and over when editing the
6637 search template, you may wish to bind some shortcuts to keys. This can
6638 be done with the variable @code{mh-search-mode-hook}, which is called
6639 when @kbd{F s} is run on a new pattern.
6640
6641 @findex mh-index-do-search
6642 @findex mh-pick-do-search
6643 @kindex C-c C-c
6644 @kindex C-c C-p
6645
6646 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}).
6647 Sometimes you're searching for text that is either not indexed, or
6648 hasn't been indexed yet. In this case you can override the default
6649 method with the pick method by running the command @kbd{C-c C-p}
6650 (@code{mh-pick-do-search}).
6651
6652 @cindex folders, @samp{+mhe-index}
6653 @cindex @samp{+mhe-index}
6654 @findex mh-index-next-folder
6655 @findex mh-index-previous-folder
6656 @kindex @key{TAB}
6657 @kindex S-@key{TAB}
6658 @vindex mh-search-folder
6659
6660 The messages that are found are put in a temporary sub-folder of
6661 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This
6662 buffer is special because it displays messages from multiple folders;
6663 each set of messages from a given folder has a heading with the folder
6664 name. The appearance of the heading can be modified by customizing the
6665 face @code{mh-search-folder}. You can jump back and forth between the
6666 headings using the commands @kbd{@key{TAB}}
6667 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}}
6668 (@code{mh-index-previous-folder}).
6669
6670 @findex mh-index-visit-folder
6671 @findex mh-rescan-folder
6672 @kindex F r
6673 @kindex v
6674
6675 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be
6676 used to visit the folder of the message at point. Initially, only the
6677 messages that matched the search criteria are displayed in the folder.
6678 While the temporary buffer has its own set of message numbers, the
6679 actual messages numbers are shown in the visited folder. Thus, the
6680 command @kbd{v} is useful to find the actual message number of an
6681 interesting message, or to view surrounding messages with the command
6682 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}.
6683
6684 @findex mh-kill-folder
6685 @kindex F k
6686
6687 Because this folder is temporary, you'll probably get in the habit of
6688 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}).
6689 @xref{Folders}.
6690
6691 @kindex F s
6692
6693 You can regenerate the results by running @kbd{F s} with a prefix
6694 argument.
6695
6696 @cindex @command{procmail}
6697 @cindex Unix commands, @command{procmail}
6698 @cindex @samp{X-MHE-Checksum:} header field
6699 @cindex header field, @samp{X-MHE-Checksum:}
6700
6701 Note: This command uses an @samp{X-MHE-Checksum:} header field to
6702 cache the MD5 checksum of a message. This means that if an incoming
6703 message already contains an @samp{X-MHE-Checksum:} field, that message
6704 might not be found by this command. The following @command{procmail}
6705 recipe avoids this problem by renaming the existing header field:
6706
6707 @smallexample
6708 @group
6709 :0 wf
6710 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum"
6711 @end group
6712 @end smallexample
6713
6714 @xref{Limits}, for an alternative interface to searching.
6715
6716 @section Configuring Indexed Searches
6717
6718 @cindex @command{grep}
6719 @cindex @command{mairix}
6720 @cindex @command{namazu}
6721 @cindex @command{pick}
6722 @cindex @command{swish++}
6723 @cindex @command{swish-e}
6724 @cindex Unix commands, @command{grep}
6725 @cindex Unix commands, @command{mairix}
6726 @cindex Unix commands, @command{namazu}
6727 @cindex Unix commands, @command{pick}
6728 @cindex Unix commands, @command{swish++}
6729 @cindex Unix commands, @command{swish-e}
6730 @findex mh-search
6731 @kindex F s
6732 @vindex mh-search-program
6733
6734 The command @kbd{F s} (@code{mh-search}) runs the command defined by
6735 the option @code{mh-search-program}. The default value is
6736 @samp{Auto-detect} which means that MH-E will automatically choose one
6737 of @command{swish++}, @command{swish-e}, @command{mairix},
6738 @command{namazu}, @command{pick} and @command{grep} in that order. If,
6739 for example, you have both @command{swish++} and @command{mairix}
6740 installed and you want to use @command{mairix}, then you can set this
6741 option to @samp{mairix}.
6742
6743 The following sub-sections describe how to set up the various indexing
6744 programs to use with MH-E.
6745
6746 @subsection swish++
6747
6748 @cindex @command{swish++}
6749 @cindex Unix commands, @command{swish++}
6750
6751 In the examples below, replace @file{/home/user/Mail} with the path to
6752 your MH directory.
6753
6754 First create the directory @file{/home/user/Mail/.swish++}. Then
6755 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the
6756 following contents:
6757
6758 @smallexample
6759 @group
6760 IncludeMeta Bcc Cc Comments Content-Description From Keywords
6761 IncludeMeta Newsgroups Resent-To Subject To
6762 IncludeMeta Message-Id References In-Reply-To
6763 IncludeFile Mail *
6764 IndexFile /home/user/Mail/.swish++/swish++.index
6765 @end group
6766 @end smallexample
6767
6768 Use the following command line to generate the swish index. Run this
6769 daily from cron:
6770
6771 @smallexample
6772 @group
6773 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \
6774 -o -path /home/user/Mail/.swish++ -prune \
6775 -o -name "[0-9]*" -print \
6776 | index -c /home/user/Mail/.swish++/swish++.conf -
6777 @end group
6778 @end smallexample
6779
6780 This command does not index the folders that hold the results of your
6781 searches in @samp{+mhe-index} since they tend to be ephemeral and the
6782 original messages are indexed anyway.
6783
6784 @cindex @command{index}
6785 @cindex Unix commands, @command{index}
6786 @cindex @command{index++}
6787 @cindex Unix commands, @command{index++}
6788
6789 On some systems (Debian GNU/Linux, for example), use @command{index++}
6790 instead of @command{index}.
6791
6792 @subsection swish
6793
6794 @cindex @command{swish-e}
6795 @cindex Unix commands, @command{swish-e}
6796
6797 In the examples below, replace @file{/home/user/Mail} with the path to
6798 your MH directory.
6799
6800 First create the directory @file{/home/user/Mail/.swish}. Then create
6801 the file @file{/home/user/Mail/.swish/config} with the following
6802 contents:
6803
6804 @smallexample
6805 @group
6806 DefaultContents TXT*
6807 IndexDir /home/user/Mail
6808 IndexFile /home/user/Mail/.swish/index
6809 IndexName "Mail Index"
6810 IndexDescription "Mail Index"
6811 IndexPointer "http://nowhere"
6812 IndexAdmin "nobody"
6813 #MetaNames automatic
6814 IndexReport 3
6815 FollowSymLinks no
6816 UseStemming no
6817 IgnoreTotalWordCountWhenRanking yes
6818 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
6819 BeginCharacters abcdefghijklmnopqrstuvwxyz
6820 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
6821 IgnoreLimit 50 1000
6822 IndexComments 0
6823 FileRules filename contains \D
6824 FileRules pathname contains /home/user/Mail/.swish
6825 FileRules pathname contains /home/user/Mail/mhe-index
6826 FileRules filename is index
6827 @end group
6828 @end smallexample
6829
6830 This configuration does not index the folders that hold the results of
6831 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6832 the original messages are indexed anyway.
6833
6834 If there are any directories you would like to ignore, append lines
6835 like the following to @file{config}:
6836
6837 @smallexample
6838 FileRules pathname contains /home/user/Mail/scripts
6839 @end smallexample
6840
6841 @cindex @command{swish-e}
6842 @cindex Unix commands, @command{swish-e}
6843
6844 Use the following command line to generate the swish index. Run this
6845 daily from cron:
6846
6847 @smallexample
6848 swish-e -c /home/user/Mail/.swish/config
6849 @end smallexample
6850
6851 @subsection mairix
6852
6853 @cindex @command{mairix}
6854 @cindex Unix commands, @command{mairix}
6855
6856 In the examples below, replace @file{/home/user/Mail} with the path to
6857 your MH directory.
6858
6859 First create the directory @file{/home/user/Mail/.mairix}. Then create
6860 the file @file{/home/user/Mail/.mairix/config} with the following
6861 contents:
6862
6863 @smallexample
6864 @group
6865 base=/home/user/Mail
6866
6867 # List of folders that should be indexed. 3 dots at the end means there
6868 # are subfolders within the folder
6869 mh=archive...:inbox:drafts:news:sent:trash
6870
6871 vfolder_format=raw
6872 database=/home/user/Mail/mairix/database
6873 @end group
6874 @end smallexample
6875
6876 Use the following command line to generate the mairix index. Run this daily
6877 from cron:
6878
6879 @smallexample
6880 mairix -f /home/user/Mail/.mairix/config
6881 @end smallexample
6882
6883 @subsection namazu
6884
6885 @cindex @command{namazu}
6886 @cindex Unix commands, @command{namazu}
6887
6888 In the examples below, replace @file{/home/user/Mail} with the path to
6889 your MH directory.
6890
6891 First create the directory @file{/home/user/Mail/.namazu}. Then create
6892 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following
6893 contents:
6894
6895 @smallexample
6896 @group
6897 package conf; # Don't remove this line!
6898 $ADDRESS = 'user@@localhost';
6899 $ALLOW_FILE = "[0-9]*";
6900 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)";
6901 @end group
6902 @end smallexample
6903
6904 This configuration does not index the folders that hold the results of
6905 your searches in @samp{+mhe-index} since they tend to be ephemeral and
6906 the original messages are indexed anyway.
6907
6908 Use the following command line to generate the namazu index. Run this
6909 daily from cron:
6910
6911 @smallexample
6912 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
6913 /home/user/Mail
6914 @end smallexample
6915
6916 @subsection pick
6917
6918 @cindex @command{pick}
6919 @cindex MH commands, @command{pick}
6920
6921 This search method does not require any setup.
6922
6923 Read @command{pick}(1) or the section
6924 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
6925 the MH book to find out more about how to enter the criteria.
6926
6927 @subsection grep
6928
6929 @cindex @command{grep}
6930 @cindex Unix commands, @command{grep}
6931
6932 This search method does not require any setup.
6933
6934 Unlike the other search methods, this method does not use the
6935 MH-Search buffer. Instead, you simply enter a regular expression in
6936 the minibuffer. For help in constructing regular expressions, see your
6937 man page for @command{grep}.
6938
6939 @node Threading, Limits, Searching, Top
6940 @chapter Viewing Message Threads
6941
6942 @cindex threading
6943
6944 MH-E groups messages by @dfn{threads} which are messages that are part
6945 of the same discussion and usually all have the same @samp{Subject:}
6946 header field. Other ways to organize messages in a folder include
6947 limiting (@pxref{Limits}) or using full-text indexed searches
6948 (@pxref{Searching}).
6949
6950 @cindex root, in threads
6951 @cindex siblings, in threads
6952 @cindex ancestor, in threads
6953
6954 A thread begins with a single message called a @dfn{root}. All replies
6955 to the same message are @dfn{siblings} of each other. Any message that
6956 has replies to it is an @dfn{ancestor} of those replies.
6957
6958 There are several commands that you can use to navigate and operate on
6959 threads.
6960
6961 @table @kbd
6962 @kindex T ?
6963 @findex mh-prefix-help
6964 @item T ?
6965 Display cheat sheet for the commands of the current prefix in
6966 minibuffer (@code{mh-prefix-help}).
6967 @c -------------------------
6968 @kindex T o
6969 @findex mh-thread-refile
6970 @item T o
6971 Refile (output) thread into folder (@code{mh-thread-refile}).
6972 @c -------------------------
6973 @kindex T d
6974 @findex mh-thread-delete
6975 @item T d
6976 Delete thread (@code{mh-thread-delete}).
6977 @c -------------------------
6978 @kindex T t
6979 @findex mh-toggle-threads
6980 @item T t
6981 Toggle threaded view of folder (@code{mh-toggle-threads}).
6982 @c -------------------------
6983 @kindex T n
6984 @findex mh-thread-next-sibling
6985 @item T n
6986 Display next sibling (@code{mh-thread-next-sibling}).
6987 @c -------------------------
6988 @kindex T p
6989 @findex mh-thread-previous-sibling
6990 @item T p
6991 Display previous sibling (@code{mh-thread-previous-sibling}).
6992 @c -------------------------
6993 @kindex T u
6994 @findex mh-thread-ancestor
6995 @item T u
6996 Display ancestor of current message (@code{mh-thread-ancestor}).
6997 @end table
6998
6999 @cindex @samp{mh-thread} customization group
7000 @cindex customization group, @samp{mh-thread}
7001
7002 The @samp{mh-thread} customization group contains one option.
7003
7004 @vtable @code
7005 @item mh-show-threads-flag
7006 On means new folders start in threaded mode (default: @samp{off}).
7007 @end vtable
7008
7009 @findex mh-toggle-threads
7010 @kindex T t
7011 @vindex mh-large-folder
7012 @vindex mh-show-threads-flag
7013
7014 Threading large number of messages can be time consuming so the option
7015 @code{mh-show-threads-flag} is turned off by default. If you turn on
7016 this option, then threading will be done only if the number of
7017 messages being threaded is less than @code{mh-large-folder}. In any
7018 event, threading can be turned on (and off) with the command @kbd{T t}
7019 (@code{mh-toggle-threads}).
7020
7021 @findex mh-thread-ancestor
7022 @findex mh-thread-next-sibling
7023 @findex mh-thread-previous-sibling
7024 @kindex T n
7025 @kindex T p
7026 @kindex T u
7027
7028 There are a few commands to help you navigate threads. If you do not
7029 care for the way a particular thread has turned, you can move up the
7030 chain of messages with the command @kbd{T u}
7031 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n}
7032 (@code{mh-thread-next-sibling} or @kbd{T p}
7033 (@code{mh-thread-previous-sibling}) to jump to the next or previous
7034 sibling, skipping the sub-threads. The command @kbd{T u} can also take
7035 a prefix argument to jump to the message that started everything.
7036
7037 @findex mh-delete-subject-or-thread
7038 @findex mh-thread-delete
7039 @findex mh-thread-refile
7040 @kindex k
7041 @kindex T d
7042 @kindex T o
7043
7044 There are threaded equivalents for the commands that delete and refile
7045 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the
7046 current message and all its children. Similarly, the command @kbd{T d}
7047 (@code{mh-thread-delete}) deletes the current message and all its
7048 children. These commands do not refile or delete sibling messages.
7049 @xref{Navigating}, for a description of the similar command @kbd{k}
7050 (@code{mh-delete-subject-or-thread}).
7051
7052 @vindex mh-large-folder
7053
7054 If you find that threading is too slow, it may be that you have
7055 @code{mh-large-folder} set too high. Also, threading is one of the few
7056 features of MH-E that really benefits from compiling. If you haven't
7057 compiled MH-E, I encourage you to do so@footnote{If you're not sure if
7058 MH-E has been byte-compiled, you could try running @samp{locate
7059 mh-thread.elc} or otherwise find MH-E on your system and ensure that
7060 @file{mh-thread.elc} exists. If you have multiple versions and you
7061 find that one is compiled but the other is not, then go into your
7062 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and
7063 ensure that the byte-compiled version appears first in the
7064 @code{load-path}. If you find that MH-E is not compiled and you
7065 installed MH-E yourself, please refer to the installation directions
7066 in the file @file{README} in the distribution.}.
7067
7068 @node Limits, Sequences, Threading, Top
7069 @chapter Limiting Display
7070
7071 @cindex limits
7072 @cindex filters
7073
7074 Another way to organize messages in a folder besides threading
7075 (@pxref{Threading}) or using full-text indexed searches
7076 (@pxref{Searching}) is by limiting the folder display to messages that
7077 are similar to the current message.
7078
7079 @table @kbd
7080 @kindex / ?
7081 @findex mh-prefix-help
7082 @item / ?
7083 Display cheat sheet for the commands of the current prefix in
7084 minibuffer (@code{mh-prefix-help}).
7085 @c -------------------------
7086 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7087 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7088 @kindex / '
7089 @findex mh-narrow-to-tick
7090 @item / '
7091 Limit to messages in the @samp{tick} sequence
7092 (@code{mh-narrow-to-tick}).
7093 @c -------------------------
7094 @kindex / c
7095 @findex mh-narrow-to-cc
7096 @item / c
7097 Limit to messages with the same @samp{Cc:} field
7098 (@code{mh-narrow-to-cc}).
7099 @c -------------------------
7100 @kindex / m
7101 @findex mh-narrow-to-from
7102 @item / m
7103 Limit to messages with the same @samp{From:} field
7104 (@code{mh-narrow-to-from}).
7105 @c -------------------------
7106 @kindex / g
7107 @findex mh-narrow-to-range
7108 @item / g
7109 Limit to range (@code{mh-narrow-to-range}).
7110 @c -------------------------
7111 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item
7112 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence}
7113 @kindex / s
7114 @findex mh-narrow-to-subject
7115 @item / s
7116 Limit to messages with the same @samp{Subject:} field
7117 (@code{mh-narrow-to-subject}).
7118 @c -------------------------
7119 @kindex / t
7120 @findex mh-narrow-to-to
7121 @item / t
7122 Limit to messages with the same @samp{To:} field
7123 (@code{mh-narrow-to-to}).
7124 @c -------------------------
7125 @cindex @samp{Sequence > Widen from Sequence} menu item
7126 @cindex menu item, @samp{Sequence > Widen from Sequence}
7127 @kindex / w
7128 @findex mh-widen
7129 @item / w
7130 Remove last restriction (@code{mh-widen}).
7131 @end table
7132
7133 All of the limiting commands above refine the display in some way.
7134
7135 @cindex @command{pick}
7136 @cindex MH commands, @command{pick}
7137 @findex mh-narrow-to-cc
7138 @findex mh-narrow-to-from
7139 @findex mh-narrow-to-subject
7140 @findex mh-narrow-to-to
7141 @kindex / c
7142 @kindex / m
7143 @kindex / s
7144 @kindex / t
7145
7146 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m}
7147 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}),
7148 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to
7149 messages matching the content of the respective field in the current
7150 message. However, you can give any of these a prefix argument to edit
7151 the @command{pick} expression used to narrow the view@footnote{See
7152 @command{pick}(1) or the section
7153 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
7154 the MH book.}.
7155
7156 @cindex @samp{tick} sequence
7157 @cindex sequence, @samp{tick}
7158 @cindex ticked messages, viewing
7159 @findex mh-narrow-to-range
7160 @findex mh-narrow-to-tick
7161 @kindex / '
7162 @kindex / g
7163
7164 You can also limit the display to messages in the @samp{tick} sequence
7165 with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
7166 @xref{Sequences}, for information on putting message into the
7167 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range})
7168 command to limit the display to messages in a range (@pxref{Ranges}).
7169
7170 @findex mh-widen
7171 @kindex / w
7172
7173 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen})
7174 command. Give this command a prefix argument to remove all limits.
7175
7176 @node Sequences, Junk, Limits, Top
7177 @chapter Using Sequences
7178
7179 @cindex @samp{Sequence} menu
7180 @cindex menu, @samp{Sequence}
7181 @cindex sequences
7182
7183 For the whole scoop on MH sequences, refer to
7184 @samp{mh-sequence}(5)@footnote{See the section
7185 @uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH
7186 book.}. As you've read, several of the MH-E commands can operate on a
7187 sequence, which is a shorthand for a range or group of messages. For
7188 example, you might want to forward several messages to a friend or
7189 colleague. Here's how to manipulate sequences. These commands are also
7190 available in the @samp{Sequence} menu.
7191
7192 @table @kbd
7193 @cindex @samp{Sequence > Toggle Tick Mark} menu item
7194 @cindex menu item, @samp{Sequence > Toggle Tick Mark}
7195 @kindex '
7196 @findex mh-toggle-tick
7197 @item '
7198 Toggle tick mark of range (@code{mh-toggle-tick}).
7199 @c -------------------------
7200 @kindex S ?
7201 @findex mh-prefix-help
7202 @item S ?
7203 Display cheat sheet for the commands of the current prefix in
7204 minibuffer (@code{mh-prefix-help}).
7205 @c -------------------------
7206 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item
7207 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence}
7208 @kindex S '
7209 @findex mh-narrow-to-tick
7210 @item S '
7211 Limit to ticked messages (@code{mh-narrow-to-tick}).
7212 @c -------------------------
7213 @cindex @samp{Sequence > Delete Message from Sequence...} menu item
7214 @cindex menu item, @samp{Sequence > Delete Message from Sequence...}
7215 @kindex S d
7216 @findex mh-delete-msg-from-seq
7217 @item S d
7218 Delete range from sequence (@code{mh-delete-msg-from-seq}).
7219 @c -------------------------
7220 @cindex @samp{Sequence > Delete Sequence...} menu item
7221 @cindex menu item, @samp{Sequence > Delete Sequence...}
7222 @kindex S k
7223 @findex mh-delete-seq
7224 @item S k
7225 Delete sequence (@code{mh-delete-seq}).
7226 @c -------------------------
7227 @cindex @samp{Sequence > List Sequences in Folder...} menu item
7228 @cindex menu item, @samp{Sequence > List Sequences in Folder...}
7229 @kindex S l
7230 @findex mh-list-sequences
7231 @item S l
7232 List all sequences in folder (@code{mh-list-sequences}).
7233 @c -------------------------
7234 @cindex @samp{Sequence > Narrow to Sequence...} menu item
7235 @cindex menu item, @samp{Sequence > Narrow to Sequence...}
7236 @kindex S n
7237 @findex mh-narrow-to-seq
7238 @item S n
7239 Restrict display to messages in sequence (@code{mh-narrow-to-seq}).
7240 @c -------------------------
7241 @cindex @samp{Sequence > Add Message to Sequence...} menu item
7242 @cindex menu item, @samp{Sequence > Add Message to Sequence...}
7243 @kindex S p
7244 @findex mh-put-msg-in-seq
7245 @item S p
7246 Add range to sequence (@code{mh-put-msg-in-seq}).
7247 @c -------------------------
7248 @cindex @samp{Sequence > List Sequences for Message} menu item
7249 @cindex menu item, @samp{Sequence > List Sequences for Message}
7250 @kindex S s
7251 @findex mh-msg-is-in-seq
7252 @item S s
7253 Display the sequences in which the current message appears
7254 (@code{mh-msg-is-in-seq}).
7255 @c -------------------------
7256 @cindex @samp{Sequence > Widen from Sequence} menu item
7257 @cindex menu item, @samp{Sequence > Widen from Sequence}
7258 @kindex S w
7259 @findex mh-widen
7260 @item S w
7261 Remove last restriction (@code{mh-widen}).
7262 @c -------------------------
7263 @findex mh-update-sequences
7264 @item M-x mh-update-sequences
7265 Flush MH-E's state out to MH@.
7266 @end table
7267
7268 @cindex @samp{mh-sequences} customization group
7269 @cindex customization group, @samp{mh-sequences}
7270
7271 The @samp{mh-sequences} customization group contains the options
7272 associated with sequences.
7273
7274 @vtable @code
7275 @item mh-refile-preserves-sequences-flag
7276 On means that sequences are preserved when messages are refiled
7277 (default: @samp{on}).
7278 @c -------------------------
7279 @item mh-tick-seq
7280 The name of the MH sequence for ticked messages (default: @samp{'tick}).
7281 @c -------------------------
7282 @item mh-update-sequences-after-mh-show-flag
7283 On means flush MH sequences to disk after message is shown (default:
7284 @samp{on}).
7285 @end vtable
7286
7287 The following hook is available.
7288
7289 @vtable @code
7290 @item mh-unseen-updated-hook
7291 Hook run after the unseen sequence has been updated (default: @code{nil}).
7292 @end vtable
7293
7294 @cindex @command{pick}
7295 @cindex MH commands, @command{pick}
7296 @findex mh-put-msg-in-seq
7297 @kindex S p
7298
7299 To place a message in a sequence, use @kbd{S p}
7300 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all
7301 the messages in a sequence to another sequence (for example, @kbd{C-u
7302 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}).
7303
7304 @cindex @samp{tick} sequence
7305 @cindex sequence, @samp{tick}
7306 @cindex ticking messages
7307 @findex mh-index-ticked-messages
7308 @findex mh-toggle-tick
7309 @kindex '
7310 @kindex F '
7311 @kindex S p
7312
7313 One specific use of the @kbd{S p} command is @kbd{'}
7314 (@code{mh-toggle-tick}) which adds messages to the @samp{tick}
7315 sequence. This sequence can be viewed later with the @kbd{F '}
7316 (@code{mh-index-ticked-messages}) command (@pxref{Folders}).
7317
7318 @vindex mh-tick-seq
7319
7320 You can customize the option @code{mh-tick-seq} if you already use the
7321 @samp{tick} sequence for your own use. You can also disable all of the
7322 ticking functions by choosing the @samp{Disable Ticking} item but
7323 there isn't much advantage to that.
7324
7325 @cindex MH-Folder mode
7326 @cindex modes, MH-Folder
7327 @findex mh-narrow-to-seq
7328 @findex mh-narrow-to-tick
7329 @findex mh-widen
7330 @kindex S '
7331 @kindex S n
7332 @kindex S w
7333
7334 Once you've placed some messages in a sequence, you may wish to narrow
7335 the field of view to just those messages in the sequence you've
7336 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are
7337 prompted for the name of the sequence. What this does is show only
7338 those messages that are in the selected sequence in the MH-Folder
7339 buffer. In addition, it limits further MH-E searches to just those
7340 messages. To narrow the view to the messages in the @samp{tick}
7341 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to
7342 widen the view to all your messages again, use @kbd{S w}
7343 (@code{mh-widen}).
7344
7345 @cindex buffers, @samp{*MH-E Sequences*}
7346 @cindex @samp{*MH-E Sequences*}
7347 @findex mh-list-sequences
7348 @findex mh-msg-is-in-seq
7349 @kindex S l
7350 @kindex S s
7351
7352 You can see which sequences in which a message appears with the
7353 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to
7354 display the sequences in which another message appears (as in @kbd{C-u
7355 42 S s @key{RET}}). Or, you can list all sequences in a selected
7356 folder (default is current folder) with @kbd{S l}
7357 (@code{mh-list-sequences}). The list appears in a buffer named
7358 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}).
7359
7360 @cindex MH profile component, @samp{Previous-Sequence:}
7361 @cindex @samp{cur} sequence
7362 @cindex @samp{Previous-Sequence:} MH profile component
7363 @cindex sequence, @samp{cur}
7364 @cindex sequence, @samp{Previous-Sequence}
7365 @vindex mh-refile-preserves-sequences-flag
7366
7367 If a message is in any sequence (except
7368 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and
7369 @samp{cur}) when it is refiled, then it will still be in those
7370 sequences in the destination folder. If this behavior is not desired,
7371 then turn off the option @code{mh-refile-preserves-sequences-flag}.
7372
7373 @findex mh-delete-msg-from-seq
7374 @findex mh-delete-seq
7375 @kindex d
7376 @kindex S d
7377 @kindex S k
7378
7379 If you want to remove a message (or range, @pxref{Ranges}) from a
7380 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want
7381 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In
7382 the latter case you are prompted for the sequence to delete. Note that
7383 this deletes only the sequence, not the messages in the sequence. If
7384 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading
7385 Mail}).
7386
7387 @cindex @samp{Unseen-Sequence:} MH profile component
7388 @cindex @samp{cur} sequence
7389 @cindex @samp{tick} sequence
7390 @cindex MH profile component, @samp{Unseen-Sequence:}
7391 @cindex sequence, @samp{Unseen-Sequence}
7392 @cindex sequence, @samp{cur}
7393 @cindex sequence, @samp{tick}
7394 @findex mh-update-sequences
7395 @kindex M-x mh-update-sequences
7396 @kindex q
7397 @kindex x
7398 @vindex mh-tick-seq
7399 @vindex mh-update-sequences-after-mh-show-flag
7400
7401 Three sequences are maintained internally by MH-E and pushed out to MH
7402 when a message is shown. They include the sequence specified by your
7403 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the
7404 sequence listed by the option @code{mh-tick-seq} which is @samp{tick}
7405 by default. If you do not like this behavior, turn off the option
7406 @code{mh-update-sequences-after-mh-show-flag}. You can then update the
7407 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x
7408 mh-update-sequences} commands.
7409
7410 @vindex mh-seen-list
7411 @vindex mh-unseen-updated-hook
7412
7413 The hook @code{mh-unseen-updated-hook} is run after the unseen
7414 sequence has been updated. The variable @code{mh-seen-list} can be
7415 used by this hook to obtain the list of messages which were removed
7416 from the unseen sequence.
7417
7418 @cindex @command{mark}
7419 @cindex MH commands, @command{mark}
7420 @kindex S n
7421 @kindex S w
7422
7423 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
7424 command dealing with sequences is @command{mark}@footnote{See the
7425 section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks
7426 with mark} in the MH book.}.
7427
7428 @node Junk, Miscellaneous, Sequences, Top
7429 @chapter Dealing With Junk Mail
7430
7431 @cindex Marshall Rose
7432 @cindex junk mail
7433 @cindex spam
7434
7435 Marshall Rose once wrote a paper on MH entitled, @cite{How to process
7436 200 messages a day and still get some real work done}. This chapter
7437 could be entitled, @cite{How to process 1000 spams a day and still get
7438 some real work done}.
7439
7440 @cindex blacklisting
7441 @cindex ham
7442 @cindex viruses
7443 @cindex whitelisting
7444 @cindex worms
7445
7446 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for
7447 any unwanted message which includes spam, @dfn{viruses}, and
7448 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying
7449 a sender as one who sends junk mail is called @dfn{blacklisting}; the
7450 opposite is called @dfn{whitelisting}.
7451
7452 @table @kbd
7453 @kindex J ?
7454 @findex mh-prefix-help
7455 @item J ?
7456 Display cheat sheet for the commands of the current prefix in
7457 minibuffer (@code{mh-prefix-help}).
7458 @c -------------------------
7459 @kindex J b
7460 @findex mh-junk-blacklist
7461 @item J b
7462 Blacklist range as spam (@code{mh-junk-blacklist}).
7463 @c -------------------------
7464 @kindex J w
7465 @findex mh-junk-whitelist
7466 @item J w
7467 Whitelist range as ham (@code{mh-junk-whitelist}).
7468 @c -------------------------
7469 @item @code{mh-spamassassin-identify-spammers}
7470 Identify spammers who are repeat offenders.
7471 @end table
7472
7473 @cindex @samp{mh-junk} customization group
7474 @cindex customization group, @samp{mh-junk}
7475
7476 The following table lists the options from the @samp{mh-junk}
7477 customization group.
7478
7479 @vtable @code
7480 @item mh-junk-background
7481 If on, spam programs are run in background (default: @samp{off}).
7482 @c -------------------------
7483 @item mh-junk-disposition
7484 Disposition of junk mail (default: @samp{Delete Spam}).
7485 @c -------------------------
7486 @item mh-junk-program
7487 Spam program that MH-E should use (default: @samp{Auto-detect}).
7488 @end vtable
7489
7490 @cindex SpamProbe
7491 @cindex Spamassassin
7492 @cindex bogofilter
7493 @cindex spam filters, SpamProbe
7494 @cindex spam filters, Spamassassin
7495 @cindex spam filters, bogofilter
7496
7497 MH-E depends on @uref{http://www.spamassassin.org/, SpamAssassin},
7498 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or
7499 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck
7500 away. This chapter describes briefly how to configure these programs
7501 to work well with MH-E and how to use MH-E's interface that provides
7502 continuing education for these programs.
7503
7504 @vindex mh-junk-program
7505
7506 The default setting of the option @code{mh-junk-program} is
7507 @samp{Auto-detect} which means that MH-E will automatically choose one
7508 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for
7509 example, you have both SpamAssassin and bogofilter installed and you
7510 want to use bogofilter, then you can set this option to
7511 @samp{Bogofilter}.
7512
7513 @findex mh-junk-blacklist
7514 @kindex J b
7515 @vindex mh-junk-disposition
7516
7517 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam
7518 program in use with the content of the range (@pxref{Ranges}) and then
7519 handles the message(s) as specified by the option
7520 @code{mh-junk-disposition}. By default, this option is set to
7521 @samp{Delete Spam} but you can also specify the name of the folder
7522 which is useful for building a corpus of spam for training purposes.
7523
7524 @findex mh-junk-whitelist
7525 @kindex J w
7526
7527 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist})
7528 reclassifies a range of messages (@pxref{Ranges}) as ham if it were
7529 incorrectly classified as spam. It then refiles the message into the
7530 @file{+inbox} folder.
7531
7532 @vindex mh-junk-background
7533
7534 By default, the programs are run in the foreground, but this can be
7535 slow when junking large numbers of messages. If you have enough memory
7536 or don't junk that many messages at the same time, you might try
7537 turning on the option @code{mh-junk-background}.
7538
7539 The following sections discuss the various counter-spam measures that
7540 MH-E can work with.
7541
7542 @cindex @file{.procmailrc}
7543 @cindex files, @file{.procmailrc}
7544
7545 @subheading SpamAssassin
7546
7547 @cindex Spamassassin
7548 @cindex spam filters, Spamassassin
7549
7550 SpamAssassin is one of the more popular spam filtering programs. Get
7551 it from your local distribution or from the
7552 @uref{http://spamassassin.org/, SpamAssassin web site}.
7553
7554 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}:
7555
7556 @cindex @command{spamc}
7557 @cindex @samp{X-Spam-Level:} header field
7558 @cindex @samp{X-Spam-Status:} header field
7559 @cindex header field, @samp{X-Spam-Level:}
7560 @cindex header field, @samp{X-Spam-Status:}
7561
7562 @smallexample
7563 MAILDIR=$HOME/`mhparam Path`
7564
7565 # Fight spam with SpamAssassin.
7566 :0fw
7567 | spamc
7568
7569 # Anything with a spam level of 10 or more is junked immediately.
7570 :0:
7571 * ^X-Spam-Level: ..........
7572 /dev/null
7573
7574 :0:
7575 * ^X-Spam-Status: Yes
7576 spam/.
7577 @end smallexample
7578
7579 If you don't use @command{spamc}, use @samp{spamassassin -P -a}.
7580
7581 Note that one of the recipes above throws away messages with a score
7582 greater than or equal to 10. Here's how you can determine a value that
7583 works best for you.
7584
7585 First, run @samp{spamassassin -t} on every mail message in your
7586 archive and use @command{gnumeric} to verify that the average plus the
7587 standard deviation of good mail is under 5, the SpamAssassin default
7588 for ``spam''.
7589
7590 Using @command{gnumeric}, sort the messages by score and view the
7591 messages with the highest score. Determine the score which encompasses
7592 all of your interesting messages and add a couple of points to be
7593 conservative. Add that many dots to the @samp{X-Spam-Level:} header
7594 field above to send messages with that score down the drain.
7595
7596 In the example above, messages with a score of 5-9 are set aside in
7597 the @samp{+spam} folder for later review. The major weakness of
7598 rules-based filters is a plethora of false positives so it is
7599 worthwhile to check.
7600
7601 @findex mh-junk-blacklist
7602 @findex mh-junk-whitelist
7603 @kindex J b
7604 @kindex J w
7605
7606 If SpamAssassin classifies a message incorrectly, or is unsure, you can
7607 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and
7608 @kbd{J w} (@code{mh-junk-whitelist}).
7609
7610 @cindex @command{sa-learn}
7611 @cindex @file{.spamassassin/user_prefs}
7612 @cindex files, @file{.spamassassin/user_prefs}
7613
7614 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a
7615 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs},
7616 deletes the message, and sends the message to the Razor, so that
7617 others might not see this spam. If the @command{sa-learn} command is
7618 available, the message is also recategorized as spam.
7619
7620 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a
7621 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If
7622 the @command{sa-learn} command is available, the message is also
7623 recategorized as ham.
7624
7625 Over time, you'll observe that the same host or domain occurs
7626 repeatedly in the @samp{blacklist_from} entries, so you might think
7627 that you could avoid future spam by blacklisting all mail from a
7628 particular domain. The utility function
7629 @code{mh-spamassassin-identify-spammers} helps you do precisely that.
7630 This function displays a frequency count of the hosts and domains in
7631 the @samp{blacklist_from} entries from the last blank line in
7632 @file{~/.spamassassin/user_prefs} to the end of the file. This
7633 information can be used so that you can replace multiple
7634 @samp{blacklist_from} entries with a single wildcard entry such as:
7635
7636 @smallexample
7637 blacklist_from *@@*amazingoffersdirect2u.com
7638 @end smallexample
7639
7640 In versions of SpamAssassin (2.50 and on) that support a Bayesian
7641 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program
7642 @command{sa-learn} to recategorize the message as spam. Neither MH-E,
7643 nor SpamAssassin, rebuilds the database after adding words, so you
7644 will need to run @samp{sa-learn --rebuild} periodically. This can be
7645 done by adding the following to your @file{crontab}:
7646
7647 @smallexample
7648 0 * * * * sa-learn --rebuild > /dev/null 2>&1
7649 @end smallexample
7650
7651 @subheading Bogofilter
7652
7653 @cindex bogofilter
7654 @cindex spam filters, bogofilter
7655
7656 Bogofilter is a Bayesian spam filtering program. Get it from your
7657 local distribution or from the
7658 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}.
7659
7660 Bogofilter is taught by running:
7661
7662 @smallexample
7663 bogofilter -n < good-message
7664 @end smallexample
7665
7666 on every good message, and
7667
7668 @smallexample
7669 bogofilter -s < spam-message
7670 @end smallexample
7671
7672 @cindex full training
7673
7674 on every spam message. This is called a @dfn{full training}; three
7675 other training methods are described in the FAQ that is distributed
7676 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of
7677 each type of message to start doing a good job.
7678
7679 To use bogofilter, add the following recipes to @file{~/.procmailrc}:
7680
7681 @cindex @samp{X-Bogosity:} header field
7682 @cindex header field, @samp{X-Bogosity:}
7683
7684 @smallexample
7685 MAILDIR=$HOME/`mhparam Path`
7686
7687 # Fight spam with Bogofilter.
7688 :0fw
7689 | bogofilter -3 -e -p
7690
7691 :0:
7692 * ^X-Bogosity: Yes, tests=bogofilter
7693 spam/.
7694
7695 :0:
7696 * ^X-Bogosity: Unsure, tests=bogofilter
7697 spam/unsure/.
7698 @end smallexample
7699
7700 @findex mh-junk-blacklist
7701 @findex mh-junk-whitelist
7702 @kindex J b
7703 @kindex J w
7704
7705 If bogofilter classifies a message incorrectly, or is unsure, you can
7706 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J
7707 w} (@code{mh-junk-whitelist}) to update bogofilter's training.
7708
7709 The @cite{Bogofilter FAQ} suggests that you run the following
7710 occasionally to shrink the database:
7711
7712 @smallexample
7713 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new
7714 mv wordlist.db wordlist.db.prv
7715 mv wordlist.db.new wordlist.db
7716 @end smallexample
7717
7718 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune
7719 bogofilter.
7720
7721 @subheading SpamProbe
7722
7723 @cindex SpamProbe
7724 @cindex spam filters, SpamProbe
7725
7726 SpamProbe is a Bayesian spam filtering program. Get it from your local
7727 distribution or from the @uref{http://spamprobe.sourceforge.net,
7728 SpamProbe web site}.
7729
7730 To use SpamProbe, add the following recipes to @file{~/.procmailrc}:
7731
7732 @cindex @command{formail}
7733 @cindex @samp{X-SpamProbe:} header field
7734 @cindex header field, @samp{X-SpamProbe:}
7735
7736 @smallexample
7737 MAILDIR=$HOME/`mhparam Path`
7738
7739 # Fight spam with SpamProbe.
7740 :0
7741 SCORE=| spamprobe receive
7742
7743 :0 wf
7744 | formail -I "X-SpamProbe: $SCORE"
7745
7746 :0:
7747 *^X-SpamProbe: SPAM
7748 spam/.
7749 @end smallexample
7750
7751 @findex mh-junk-blacklist
7752 @findex mh-junk-whitelist
7753 @kindex J b
7754 @kindex J w
7755
7756 If SpamProbe classifies a message incorrectly, you can use the MH-E
7757 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w}
7758 (@code{mh-junk-whitelist}) to update SpamProbe's training.
7759
7760 @subheading Other Things You Can Do
7761
7762 There are a couple of things that you can add to @file{~/.procmailrc}
7763 in order to filter out a lot of spam and viruses. The first is to
7764 eliminate any message with a Windows executable (which is most likely
7765 a virus). The second is to eliminate mail in character sets that you
7766 can't read.
7767
7768 @cindex @samp{Content-Transfer-Encoding:} header field
7769 @cindex @samp{Content-Type:} header field
7770 @cindex @samp{Subject:} header field
7771 @cindex header field, @samp{Content-Transfer-Encoding:}
7772 @cindex header field, @samp{Content-Type:}
7773 @cindex header field, @samp{Subject:}
7774
7775 @smallexample
7776 MAILDIR=$HOME/`mhparam Path`
7777
7778 #
7779 # Filter messages with win32 executables/virii.
7780 #
7781 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg
7782 # pattern. The string "this program cannot be run in MS-DOS mode"
7783 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false
7784 # positives (Roland Smith via Pete from the bogofilter mailing list).
7785 #
7786 :0 B:
7787 * ^Content-Transfer-Encoding:.*base64
7788 * ^TVqQAAMAAAAEAAAA//8AALg
7789 * 4fug4AtAnNIbg
7790 spam/exe/.
7791
7792 #
7793 # Filter mail in unreadable character sets (from the Bogofilter FAQ).
7794 #
7795 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987'
7796
7797 :0:
7798 * 1^0 $ ^Subject:.*=\?($UNREADABLE)
7799 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE)
7800 spam/unreadable/.
7801
7802 :0:
7803 * ^Content-Type:.*multipart
7804 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE)
7805 spam/unreadable/.
7806 @end smallexample
7807
7808 @node Miscellaneous, Scan Line Formats, Junk, Top
7809 @chapter Miscellaneous Commands, Variables, and Buffers
7810
7811 This chapter covers the following command and the various MH-E
7812 buffers,
7813
7814 @ftable @code
7815 @item mh-version
7816 Display version information about MH-E and the MH mail handling
7817 system.
7818 @end ftable
7819
7820 @cindex buffers, @samp{*MH-E Info*}
7821 @cindex MH-E version
7822 @cindex @samp{*MH-E Info*}
7823 @cindex version
7824 @kindex M-x mh-version
7825
7826 One command worth noting is @kbd{M-x mh-version}. You can compare the
7827 version this command prints to the latest release (@pxref{Getting
7828 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named
7829 @samp{*MH-E Info*}, should usually be included with any bug report you
7830 submit (@pxref{Bug Reports}).
7831
7832 @subheading MH-E Buffers
7833
7834 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates
7835 several other buffers. They are:
7836
7837 @table @samp
7838 @cindex @samp{*MH-E Folders*}
7839 @cindex buffers, @samp{*MH-E Folders*}
7840 @findex mh-list-folders
7841 @item *MH-E Folders*
7842 @kindex F l
7843 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}).
7844 @xref{Folders}.
7845 @c -------------------------
7846 @cindex @samp{*MH-E Help*}
7847 @cindex buffers, @samp{*MH-E Help*}
7848 @findex mh-help
7849 @item *MH-E Help*
7850 @kindex ?
7851 @kindex C-c ?
7852 This buffer contains the output of @kbd{?} (@code{mh-help}) and
7853 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}.
7854 @c -------------------------
7855 @cindex @samp{*MH-E Info*}
7856 @cindex buffers, @samp{*MH-E Info*}
7857 @item *MH-E Info*
7858 This buffer contains the output of @kbd{M-x mh-version @key{RET}}.
7859 @c -------------------------
7860 @cindex @samp{*MH-E Log*}
7861 @cindex buffers, @samp{*MH-E Log*}
7862 @item *MH-E Log*
7863 This buffer contains the last 100 lines of the output of the various
7864 MH commands.
7865 @c -------------------------
7866 @cindex @samp{*MH-E Mail Delivery*}
7867 @cindex buffers, @samp{*MH-E Mail Delivery*}
7868 @item *MH-E Mail Delivery*
7869 This buffer contains the transcript of a mail delivery. @xref{Sending
7870 Message}.
7871 @c -------------------------
7872 @cindex @samp{*MH-E Recipients*}
7873 @cindex buffers, @samp{*MH-E Recipients*}
7874 @findex mh-check-whom
7875 @item *MH-E Recipients*
7876 @kindex C-c C-w
7877 This buffer contains the output of @kbd{C-c C-w}
7878 (@code{mh-check-whom}) and is killed when draft is sent.
7879 @xref{Checking Recipients}.
7880 @c -------------------------
7881 @cindex @samp{*MH-E Sequences*}
7882 @cindex buffers, @samp{*MH-E Sequences*}
7883 @item *MH-E Sequences*
7884 This buffer contains the output of @kbd{S l}
7885 (@code{mh-list-sequences}). @xref{Sequences}.
7886 @c -------------------------
7887 @cindex @samp{*mh-temp*}
7888 @cindex buffers, @samp{*mh-temp*}
7889 @item *mh-temp*
7890 This is a scratch, ephemeral, buffer used by MH-E functions. Note that
7891 it is hidden because the first character in the name is a space.
7892 You'll generally not have any need for this buffer.
7893 @end table
7894
7895 @node Scan Line Formats, Procmail, Miscellaneous, Top
7896 @appendix Scan Line Formats
7897
7898 @cindex scan line formats
7899
7900 This appendix discusses how MH-E creates, parses, and manipulates scan
7901 lines. If you have your own MH scan or inc format files, you
7902 @strong{can} teach MH-E how to handle them, but it isn't easy as
7903 you'll see.
7904
7905 @cindex @samp{mh-scan-line-formats} customization group
7906 @cindex customization group, @samp{mh-scan-line-formats}
7907
7908 This table lists the options in the @samp{mh-scan-line-formats}
7909 customization group.
7910
7911 @vtable @code
7912 @item mh-adaptive-cmd-note-flag
7913 On means that the message number width is determined dynamically
7914 (default: @samp{on}).
7915 @c -------------------------
7916 @item mh-scan-format-file
7917 Specifies the format file to pass to the scan program (default:
7918 @samp{Use MH-E scan Format}).
7919 @c -------------------------
7920 @item mh-scan-prog
7921 Program used to scan messages (default: @code{"scan"}).
7922 @end vtable
7923
7924 @vindex mh-adaptive-cmd-note-flag
7925
7926 There are a couple of caveats when creating your own scan format file.
7927 First, MH-E will not work if your scan lines do not include message
7928 numbers. It will work poorly if you don't dedicate a column for
7929 showing the current message and notations. You won't be able to use
7930 the option @code{mh-adaptive-cmd-note-flag} or the threading features
7931 (@pxref{Threading}).
7932
7933 @cindex message numbers
7934 @findex mh-set-cmd-note
7935 @vindex mh-adaptive-cmd-note-flag
7936 @vindex mh-scan-format-file
7937
7938 If you've created your own format to handle long message numbers,
7939 you'll be pleased to know you no longer need it since MH-E adapts its
7940 internal format based upon the largest message number if
7941 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer
7942 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag}
7943 and call @code{mh-set-cmd-note} with the width specified by your
7944 format file (see @code{mh-scan-format-file}). For example, the default
7945 width is 4, so you would use @samp{(mh-set-cmd-note 4)}.
7946
7947 @vindex mh-adaptive-cmd-note-flag
7948 @vindex mh-scan-format-file
7949 @vindex mh-scan-format-mh
7950 @vindex mh-scan-format-nmh
7951
7952 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E
7953 scan Format}. This means that the format string will be taken from the
7954 either @code{mh-scan-format-mh} or @code{mh-scan-format-nmh} depending
7955 on whether MH or nmh (or GNU mailutils) is in use. This setting also
7956 enables you to turn on the option @code{mh-adaptive-cmd-note-flag}.
7957 You can also set this option to @samp{Use Default scan Format} to get
7958 the same output as you would get if you ran @command{scan} from the
7959 shell. If you have a format file that you want MH-E to use but not MH,
7960 you can set this option to @samp{Specify a scan Format File} and enter
7961 the name of your format file.
7962
7963 @vindex mh-scan-format-file
7964 @vindex mh-scan-format-mh
7965 @vindex mh-scan-format-nmh
7966
7967 The scan format that MH-E uses when @code{mh-scan-format-file} is set
7968 to its default of @samp{Use MH-E scan Format} is held in the variables
7969 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on
7970 whether you are using nmh (or GNU mailutils) or not. Typically, you
7971 create your own format files rather than modifying these variables.
7972 The value of @code{mh-scan-format-nmh} is:
7973
7974 @smallexample
7975 (concat
7976 "%4(msg)"
7977 "%<(cur)+%| %>"
7978 "%<@{replied@}-"
7979 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>"
7980 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>"
7981 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>"
7982 "%?(nonnull(comp@{newsgroups@}))n%>"
7983 "%<(zero) %>"
7984 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>"
7985 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>"
7986 "%<(zero)%17(decode(friendly@{from@}))%> "
7987 "%(decode@{subject@})%<@{body@}<<%@{body@}%>")
7988 @end smallexample
7989
7990 @cindex decoding RFC 2047
7991 @cindex RFC 2047, decoding
7992 @vindex mh-scan-format-mh
7993
7994 The setting for @code{mh-scan-format-mh} is similar, except that MH
7995 doesn't have the function @code{decode} (which is used to decode RFC
7996 2047 encodings).
7997
7998 @cindex notations, scan line
7999 @cindex scan line notations
8000
8001 These strings are passed to the @command{scan} program via the
8002 @option{-format} argument. The formats are identical to the defaults
8003 except that additional hints for fontification have been added to the
8004 existing notations in the fifth column (remember that in Emacs, the
8005 columns start at 0). The values of the fifth column, in priority
8006 order, are: @samp{-} if the message has been replied to, @samp{t} if
8007 an address in the @samp{To:} field matches one of the mailboxes of the
8008 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if
8009 the @samp{Bcc:} field matches, and @samp{n} if a non-empty
8010 @samp{Newsgroups:} field is present.
8011
8012 @cindex @command{scan}
8013 @cindex MH commands, @command{scan}
8014 @vindex mh-progs
8015 @vindex mh-scan-prog
8016
8017 The name of the program that generates a listing of one line per
8018 message is held in @code{mh-scan-prog} (default: @code{"scan"}).
8019 Unless this variable contains an absolute pathname, it is assumed to
8020 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
8021 link another program to @command{scan} (see @samp{mh-profile}(5)) to
8022 produce a different type of listing@footnote{See the section
8023 @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
8024 pick Ranges Sequences} in the MH book.}.
8025
8026 @cindex regular expressions, scan line formats
8027 @findex mh-set-cmd-note
8028 @findex setq
8029
8030 If you change the format of the scan lines you'll need to tell MH-E
8031 how to parse the new format. As you will see, quite a lot of variables
8032 are involved to do that. Use @kbd{M-x apropos @key{RET}
8033 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You
8034 will also have to call @code{mh-set-cmd-note} if your notations are
8035 not in column 4 (columns in Emacs start with 0). Note that unlike most
8036 of the user options described in this manual, these are variables and
8037 must be set with @code{setq} instead of in a customization buffer. For
8038 help with regular expressions, see
8039 @ifnothtml
8040 @ref{Regexps, , Syntax of Regular Expressions, emacs, The
8041 GNU Emacs Manual}.
8042 @end ifnothtml
8043 @ifhtml
8044 section
8045 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
8046 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}.
8047 @end ifhtml
8048
8049 The first variable has to do with pruning out garbage.
8050
8051 @vtable @code
8052 @cindex @command{inc}
8053 @cindex MH commands, @command{inc}
8054 @cindex @command{scan}
8055 @cindex MH commands, @command{scan}
8056 @item mh-scan-valid-regexp
8057 This regular expression describes a valid scan line. This is used to
8058 eliminate error messages that are occasionally produced by
8059 @command{inc}@footnote{See the section
8060 @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
8061 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
8062 @end vtable
8063
8064 Next, many variables control how the scan lines are parsed.
8065
8066 @vtable @code
8067 @vindex mh-folder-body
8068 @vindex mh-folder-font-lock-keywords
8069 @item mh-scan-body-regexp
8070 This regular expression matches the message body fragment. Note that
8071 the default setting of @code{mh-folder-font-lock-keywords} expects
8072 this expression to contain at least one parenthesized expression which
8073 matches the body text as in the default of
8074 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not
8075 correct, the body fragment will not be highlighted with the face
8076 @code{mh-folder-body}.
8077 @c -------------------------
8078 @vindex mh-folder-cur-msg-number
8079 @vindex mh-folder-font-lock-keywords
8080 @vindex mh-note-cur
8081 @item mh-scan-cur-msg-number-regexp
8082 This regular expression matches the current message. It must match
8083 from the beginning of the line. Note that the default setting of
8084 @code{mh-folder-font-lock-keywords} expects this expression to contain
8085 at least one parenthesized expression which matches the message number
8086 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This
8087 expression includes the leading space and current message marker
8088 @samp{+} within the parenthesis since it looks better to highlight
8089 these items as well. The highlighting is done with the face
8090 @code{mh-folder-cur-msg-number}. This regular expression should be
8091 correct as it is needed by non-fontification functions. See also
8092 @code{mh-note-cur}.
8093 @c -------------------------
8094 @vindex mh-folder-date
8095 @vindex mh-folder-font-lock-keywords
8096 @vindex mh-scan-sent-to-me-sender-regexp
8097 @item mh-scan-date-regexp
8098 This regular expression matches a valid date. It must @strong{not} be
8099 anchored to the beginning or the end of the line. Note that the
8100 default setting of @code{mh-folder-font-lock-keywords} expects this
8101 expression to contain only one parenthesized expression which matches
8102 the date field as in the default of
8103 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is
8104 not correct, the date will not be highlighted with the face
8105 @code{mh-folder-date}.
8106 @c -------------------------
8107 @vindex mh-folder-deleted
8108 @vindex mh-folder-font-lock-keywords
8109 @vindex mh-note-deleted
8110 @item mh-scan-deleted-msg-regexp
8111 This regular expression matches deleted messages. It must match from
8112 the beginning of the line. Note that the default setting of
8113 @code{mh-folder-font-lock-keywords} expects this expression to contain
8114 at least one parenthesized expression which matches the message number
8115 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression
8116 includes the leading space within the parenthesis since it looks
8117 better to highlight it as well. The highlighting is done with the face
8118 @code{mh-folder-deleted}. This regular expression should be correct as
8119 it is needed by non-fontification functions. See also
8120 @code{mh-note-deleted}.
8121 @c -------------------------
8122 @vindex mh-folder-font-lock-keywords
8123 @vindex mh-folder-msg-number
8124 @item mh-scan-good-msg-regexp
8125 This regular expression matches ``good'' messages. It must match from
8126 the beginning of the line. Note that the default setting of
8127 @code{mh-folder-font-lock-keywords} expects this expression to contain
8128 at least one parenthesized expression which matches the message number
8129 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This
8130 expression includes the leading space within the parenthesis since it
8131 looks better to highlight it as well. The highlighting is done with
8132 the face @code{mh-folder-msg-number}. This regular expression should
8133 be correct as it is needed by non-fontification functions.
8134 @c -------------------------
8135 @vindex mh-scan-format-file
8136 @item mh-scan-msg-format-regexp
8137 This regular expression finds the message number width in a scan
8138 format. Note that the message number must be placed in a parenthesized
8139 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This
8140 variable is only consulted if @code{mh-scan-format-file} is set to
8141 @samp{Use MH-E scan Format}.
8142 @c -------------------------
8143 @vindex mh-scan-format-file
8144 @item mh-scan-msg-format-string
8145 This is a format string for the width of the message number in a scan
8146 format. Use @samp{0%d} for zero-filled message numbers. This variable
8147 is only consulted if @code{mh-scan-format-file} is set to @samp{Use
8148 MH-E scan Format} (default: @code{"%d"}).
8149 @c -------------------------
8150 @item mh-scan-msg-number-regexp
8151 This regular expression extracts the message number. It must match
8152 from the beginning of the line. Note that the message number must be
8153 placed in a parenthesized expression as in the default of @w{@code{"^
8154 *\\([0-9]+\\)"}}.
8155 @c -------------------------
8156 @item mh-scan-msg-overflow-regexp
8157 This regular expression matches overflowed message numbers (default:
8158 @code{"^[?0-9][0-9]"}).
8159 @c -------------------------
8160 @item mh-scan-msg-search-regexp
8161 This regular expression matches a particular message. It is a format
8162 string; use @samp{%d} to represent the location of the message number
8163 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}.
8164 @c -------------------------
8165 @vindex mh-folder-address
8166 @vindex mh-folder-font-lock-keywords
8167 @vindex mh-folder-to
8168 @item mh-scan-rcpt-regexp
8169 This regular expression specifies the recipient in messages you sent.
8170 Note that the default setting of @code{mh-folder-font-lock-keywords}
8171 expects this expression to contain two parenthesized expressions. The
8172 first is expected to match the @samp{To:} that the default scan format
8173 file generates. The second is expected to match the recipient's name
8174 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this
8175 regular expression is not correct, the @samp{To:} string will not be
8176 highlighted with the face @code{mh-folder-to} and the recipient will not be
8177 highlighted with the face @code{mh-folder-address}.
8178 @c -------------------------
8179 @vindex mh-folder-font-lock-keywords
8180 @vindex mh-folder-refiled
8181 @vindex mh-note-refiled
8182 @item mh-scan-refiled-msg-regexp
8183 This regular expression matches refiled messages. It must match from
8184 the beginning of the line. Note that the default setting of
8185 @code{mh-folder-font-lock-keywords} expects this expression to contain
8186 at least one parenthesized expression which matches the message number
8187 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression
8188 includes the leading space within the parenthesis since it looks
8189 better to highlight it as well. The highlighting is done with the face
8190 @code{mh-folder-refiled}. This regular expression should be correct as
8191 it is needed by non-fontification functions. See also
8192 @code{mh-note-refiled}.
8193 @c -------------------------
8194 @vindex mh-folder-font-lock-keywords
8195 @vindex mh-folder-sent-to-me-sender
8196 @vindex mh-mh-folder-sent-to-me-hint
8197 @vindex mh-scan-format-nmh
8198 @item mh-scan-sent-to-me-sender-regexp
8199 This regular expression matches messages sent to us. Note that the
8200 default setting of @code{mh-folder-font-lock-keywords} expects this
8201 expression to contain at least two parenthesized expressions. The
8202 first should match the fontification hint (see
8203 @code{mh-scan-format-nmh}) and the second should match the user name
8204 as in the default of
8205 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}.
8206 If this regular expression is not correct, the notation hints will not
8207 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and
8208 the sender will not be highlighted with the face
8209 @code{mh-folder-sent-to-me-sender}.
8210 @c -------------------------
8211 @vindex mh-folder-followup
8212 @vindex mh-folder-font-lock-keywords
8213 @vindex mh-folder-subject
8214 @item mh-scan-subject-regexp
8215 This regular expression matches the subject. It must match from the
8216 beginning of the line. Note that the default setting of
8217 @samp{mh-folder-font-lock-keywords} expects this expression to contain
8218 at least three parenthesized expressions. The first is expected to
8219 match the @samp{Re:} string, if any, and is highlighted with the face
8220 @code{mh-folder-followup}. The second matches an optional bracketed
8221 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a
8222 sub-expression of the first expression). The third is expected to
8223 match the subject line itself which is highlighted with the face
8224 @code{mh-folder-subject}. For example, the default is
8225 @w{@code{"^ *[0-9]+........[ ]*...................}}@*
8226 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}.
8227 This regular expression should be correct as it is needed by
8228 non-fontification functions. Note that this example is broken up on
8229 two lines for readability, but is actually a single string.
8230 @end vtable
8231
8232 Finally, there are a slew of variables that control how MH-E annotates
8233 the scan lines.
8234
8235 @vtable @code
8236 @findex mh-set-cmd-note
8237 @vindex mh-adaptive-cmd-note-flag
8238 @item mh-cmd-note
8239 Column for notations (default: 4). This variable should be set with
8240 the function @code{mh-set-cmd-note}. This variable may be updated
8241 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following
8242 variables contain the notational characters. Note that columns in
8243 Emacs start with 0.
8244 @c -------------------------
8245 @item mh-note-copied
8246 Messages that have been copied are marked by this character (default:
8247 @code{?C}).
8248 @c -------------------------
8249 @vindex mh-scan-cur-msg-number-regexp
8250 @item mh-note-cur
8251 The current message (in MH, not in MH-E) is marked by this character
8252 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}.
8253 @c -------------------------
8254 @vindex mh-scan-deleted-msg-regexp
8255 @item mh-note-deleted
8256 Messages that have been deleted are marked by this character (default:
8257 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}.
8258 @c -------------------------
8259 @item mh-note-dist
8260 Messages that have been redistributed are marked by this character
8261 (default: @code{?R}).
8262 @c -------------------------
8263 @item mh-note-forw
8264 Messages that have been forwarded are marked by this character
8265 (default: @code{?F}).
8266 @c -------------------------
8267 @item mh-note-printed
8268 Messages that have been printed are marked by this character (default:
8269 @code{?P}).
8270 @c -------------------------
8271 @vindex mh-scan-refiled-msg-regexp
8272 @item mh-note-refiled
8273 Messages that have been refiled are marked by this character (default:
8274 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}.
8275 @c -------------------------
8276 @item mh-note-repl
8277 Messages that have been replied to are marked by this character
8278 (default: @code{?-}).
8279 @c -------------------------
8280 @item mh-note-seq
8281 Messages in a user-defined sequence are marked by this character
8282 (default: @code{?%}). Messages in the @samp{search} sequence are
8283 marked by this character as well.
8284 @end vtable
8285
8286 For example, let's say I have the following in @file{scan.format}
8287 which displays the sender, the subject, and the message number. This
8288 format places a @samp{+} after the message number for the current
8289 message according to MH; it also uses that column for notations.
8290
8291 @smallexample
8292 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %>
8293 @end smallexample
8294
8295 @vindex mh-adaptive-cmd-note-flag
8296 @vindex mh-scan-format-file
8297 @vindex mh-scan-format-file, example
8298
8299 The first thing you have to do is tell MH-E to use this file.
8300 Customize @code{mh-scan-format-file} and set its value to @samp{Use
8301 Default scan Format}. If you didn't get already turn off
8302 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first.
8303
8304 Next, tell MH-E what a valid scan line looks like so that you can at
8305 least display the output of scan in your MH-Folder buffer.
8306
8307 @vindex mh-scan-valid-regexp, example
8308
8309 @smalllisp
8310 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$")
8311 @end smalllisp
8312
8313 Now, in order to get rid of the @samp{Cursor not pointing to message}
8314 message, you need to tell MH-E how to access the message number. You
8315 should also see why MH-E requires that you include a message number in
8316 the first place.
8317
8318 @vindex mh-scan-msg-number-regexp, example
8319 @vindex mh-scan-msg-search-regexp, example
8320
8321 @smalllisp
8322 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8323 (setq mh-scan-msg-search-regexp " %d[+D^ ]$")
8324 @end smalllisp
8325
8326 In order to get the next and previous commands working, add this.
8327
8328 @vindex mh-scan-good-msg-regexp, example
8329
8330 @smalllisp
8331 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8332 @end smalllisp
8333
8334 Note that the current message isn't marked with a @samp{+} when moving
8335 between the next and previous messages. Here is the code required to
8336 get this working.
8337
8338 @vindex set-mh-cmd-note, example
8339 @vindex mh-scan-cur-msg-number-regexp, example
8340
8341 @smalllisp
8342 (set-mh-cmd-note 76)
8343 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$")
8344 @end smalllisp
8345
8346 Finally, add the following to delete and refile messages.
8347
8348 @vindex mh-scan-deleted-msg-regexp, example
8349 @vindex mh-scan-refiled-msg-regexp, example
8350
8351 @smalllisp
8352 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$")
8353 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$")
8354 @end smalllisp
8355
8356 This is just a bare minimum; it's best to adjust all of the regular
8357 expressions to ensure that MH-E and highlighting perform well.
8358
8359 @node Procmail, Odds and Ends, Scan Line Formats, Top
8360 @appendix Reading Mailing Lists Effectively
8361
8362 @cindex @command{procmail}
8363 @cindex @command{slocal}
8364 @cindex Gnus
8365 @cindex MH commands, @command{slocal}
8366 @cindex Unix commands, @command{procmail}
8367 @cindex mailing lists, reading
8368
8369 This appendix explains how to use @uref{http://www.procmail.org/,
8370 procmail} to file mail from mailing lists into folders which can then
8371 be read easily with MH-E@footnote{The MH equivalent, @command{slocal},
8372 can be used as well, but procmail is more flexible and more packages
8373 exist for procmail than for slocal.}. Some mailing lists have such
8374 high traffic that Gnus must be used and I discuss how to use Gnus
8375 side-by-side with MH-E.
8376
8377 @cindex @file{.procmailrc}
8378 @cindex files, @file{.procmailrc}
8379
8380 First, I'll describe how to put mail from your mailing lists directly
8381 into an MH folder using @command{procmail}. First, add the following
8382 to @file{~/.procmailrc}. While the logging variables aren't strictly
8383 necessary, they are extremely useful.
8384
8385 @smallexample
8386 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam.
8387 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin
8388 [3]
8389 [4] # Point LOGFILE at the actual log file.
8390 [5] LOGFILE=$HOME/.procmail.log
8391 [6]
8392 [7] # This setting provides just the right amount of information.
8393 [8] LOGABSTRACT=all
8394 [9]
8395 [10] # Uncomment the following line to see how your patterns match.
8396 [11] #VERBOSE=yes
8397 [12]
8398 [13] # Place mail sent to any MH-E mailing list in +mh-e.
8399 [14] :0 w: mh-e$LOCKEXT
8400 [15] * ^TO.*mh-e-.*@.*sourceforge.net
8401 [16] | myrcvstore -create +mh-e
8402 @end smallexample
8403
8404 @cindex @command{rcvstore}
8405 @cindex MH commands, @command{rcvstore}
8406
8407 Line 14 creates a lock file in your mail directory based upon the name
8408 of the folder. This is done because @command{rcvstore} does not
8409 perform locking. While this lock file will prevent @command{procmail}
8410 from writing to a folder concurrently, there is a slight chance that
8411 you might lose a message if you're performing operations on a folder
8412 at the same time @command{rcvstore} is placing a message there. You
8413 have been warned. Now that that disclaimer is out of the way, note
8414 that I've been using this set-up for over a decade and haven't lost
8415 anything to my knowledge@footnote{See
8416 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166,
8417 Savannah issue #4361} to see if @command{rcvstore} locking is still an
8418 issue.}.
8419
8420 @cindex @samp{Unseen-Sequence:} MH profile component
8421 @cindex MH profile component, @samp{Unseen-Sequence:}
8422
8423 Line 16 uses the following script, @code{myrcvstore}, to massage the
8424 message as described in the comment and file the message in the given
8425 folder@footnote{The @samp{-create} argument wasn't always the default
8426 to @command{rcvstore}.}.
8427
8428 @smallexample
8429 #! /bin/sh
8430
8431 # Accepts a message on standard input and passes it through rcvstore
8432 # after first passing it through any filters. All arguments are passed
8433 # on to rcvstore.
8434
8435 # Force the "From user date" to become part of header. One reason this
8436 # is done is because the presence of the From field confuses dist so
8437 # that dist adds a new header, rather than using the existing header.
8438 # Note that this should not be done for any message that goes into a
8439 # Gnus incoming file (Gnus will thrown an error) nor should it be
8440 # applied to any message that goes to the system mailbox because the
8441 # entire mailbox will be incorporated as a single message.
8442 formail -c -z -R 'From ' X-Envelope-From: |
8443 rcvstore $@@
8444 @end smallexample
8445
8446 If your version of @command{rcvstore} doesn't add messages to the
8447 @samp{unseen} sequence by default, add the following line to your MH
8448 profile:
8449
8450 @smallexample
8451 Unseen-Sequence: unseen
8452 @end smallexample
8453
8454 Now view your new messages with the speedbar (@pxref{Speedbar}) or with
8455 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}.
8456
8457 If you're on a mailing list that is so voluminous that it is
8458 impossible to read every message, it usually better to read the
8459 mailing list like a newsgroup in a news reader. Emacs has a built-in
8460 newsreader called Gnus. The remainder of this appendix talks about how
8461 to use Gnus with an MH message store. The version of Gnus that was
8462 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should
8463 work but versions prior to 5.8 use different options.
8464
8465 This table contains a list of Gnus options that you will have to
8466 modify. Note that for them to become accessible, you'll have to load
8467 @file{nnml.el} first. This can be done with @kbd{M-x load-library
8468 @key{RET} nnml @key{RET}}.
8469
8470 @vtable @code
8471 @item gnus-secondary-select-methods
8472 Select the @samp{nnml} value. This select method uses directories for
8473 folders and individual files for messages, just like MH. You do not
8474 have to set an address.
8475 @c -------------------------
8476 @item mail-sources
8477 Select the @samp{Several files in a directory} value, check the
8478 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find
8479 your mail.
8480 @c -------------------------
8481 @vindex mail-user-agent
8482 @item message-mail-user-agent
8483 In order to send mail within Gnus using MH-E, set this option to
8484 @samp{mail-user-agent} and set the @code{mail-user-agent} option to
8485 @samp{Emacs interface to MH}.
8486 @c -------------------------
8487 @item nnmail-keep-last-article
8488 Since Gnus keeps track of which messages you have read, it would be
8489 bad if Gnus expired the last message, for example, message 100, and
8490 @command{rcvstore} gave the next new message number 1. Gnus would then
8491 ignore it since it thinks that you've read messages 1-100. Turning on
8492 this option ensures that the last message is never removed thereby
8493 eliminating this problem.
8494 @end vtable
8495
8496 Next add the following to @file{~/.procmailrc}. If you don't subscribe
8497 to the GnuCash mailing list, substitute one to which you are
8498 subscribed.
8499
8500 @smallexample
8501 MAILDIR=$HOME/`mhparam Path`
8502 # Place mail sent to the GnuCash mailing list in gnucash.spool, where
8503 # Gnus will pick it up.
8504 :0:
8505 * ^TO.*gnucash.*@.*gnucash.org
8506 gnucash.spool
8507 @end smallexample
8508
8509 Wait for some messages to appear in @file{gnucash.spool} and run Gnus
8510 with @kbd{M-x gnus @key{RET}}. To view the folder created in the
8511 example above, you would tell Gnus about it the first time only with
8512 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is
8513 known as @samp{+gnucash}.
8514
8515 @node Odds and Ends, History, Procmail, Top
8516 @appendix Odds and Ends
8517
8518 This appendix covers a few topics that don't fit elsewhere. Here I
8519 tell you how to report bugs and how to get on the MH-E mailing lists.
8520 I also point out some additional sources of information.
8521
8522 @menu
8523 * Bug Reports::
8524 * Mailing Lists::
8525 * MH FAQ and Support::
8526 * Getting MH-E::
8527 @end menu
8528
8529 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends
8530 @appendixsec Bug Reports
8531
8532 @cindex bugs
8533 @cindex SourceForge
8534 @kindex M-x mh-version
8535
8536 Bug reports should be filed at
8537 @uref{https://sourceforge.net/bugs/?group_id=13357, SourceForge}. You
8538 need to be a SourceForge user to submit bug reports, but this is easy
8539 enough to do that it shouldn't be a restriction for you. Please
8540 include the output of @kbd{M-x mh-version} (@pxref{Miscellaneous}) in
8541 any bug report you send unless you're 110% positive we won't ask for
8542 it.
8543
8544 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends
8545 @appendixsec MH-E Mailing Lists
8546
8547 @cindex SourceForge
8548 @cindex mailing lists
8549
8550 There are several mailing lists for MH-E. They are @i{mh-e-users at
8551 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net},
8552 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view
8553 the archives at @uref{https://sourceforge.net/mail/?group_id=13357,
8554 SourceForge}. Do not report bugs on these lists; please submit them
8555 via SourceForge (@pxref{Bug Reports}).
8556
8557 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends
8558 @appendixsec MH FAQ and Support
8559
8560 @cindex FAQ
8561 @cindex MH FAQ
8562
8563 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently
8564 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup
8565 @samp{comp.mail.mh}. While very little is there that deals with MH-E
8566 specifically, there is an incredible wealth of material about MH
8567 itself which you will find useful.
8568
8569 @cindex support
8570
8571 You can find FAQs on MH-E at the
8572 @uref{https://sourceforge.net/support/?group_id=13357, Support
8573 Requests} page on SourceForge. If you don't find the answer to your
8574 question, file a support request and your question will become a new
8575 FAQ!
8576
8577 @node Getting MH-E, , MH FAQ and Support, Odds and Ends
8578 @appendixsec Getting MH-E
8579
8580 @cindex MH-E, obtaining
8581 @cindex getting MH-E
8582 @cindex obtaining MH-E
8583
8584 Because MH-E is undergoing a phase of sustained growth, the version of
8585 MH-E in your Emacs is likely to be out of date although it is most
8586 likely to be more up to date than the copy that comes with the MH
8587 distribution in @file{miscellany/mh-e}.
8588
8589 @cindex change log
8590 @cindex release notes
8591
8592 New MH-E releases are always available for downloading at
8593 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8594 SourceForge} before they appear in an Emacs release. You can read the
8595 release notes on that page to determine if the given release of MH-E
8596 is already installed in your version of Emacs. You can also read the
8597 change log to see if you are interested in what the given release of
8598 MH-E has to offer (although we have no doubt that you will be
8599 extremely interested in all new releases).
8600
8601 @cindex files, @samp{MH-E-NEWS}
8602 @cindex files, @samp{README}
8603 @cindex news
8604 @cindex @samp{MH-E-NEWS}
8605 @cindex @samp{README}
8606 @kindex M-x mh-version
8607
8608 After you download and extract the MH-E tarball, read the
8609 @file{README} file and @file{MH-E-NEWS}. These correspond to the
8610 release notes and change log mentioned above. The file @file{README}
8611 contains instructions on installing MH-E. If you're already running
8612 Emacs, please quit that session and start again to load in the new
8613 MH-E. Check that you're running the new version with the command
8614 @kbd{M-x mh-version}.
8615
8616 @cindex contributed software
8617 @cindex manual
8618 @cindex documentation
8619
8620 In addition to the mh-e package, the
8621 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8622 SourceForge} site also contains doc and contrib packages. The former
8623 is the latest release of this manual, and the latter contains a few
8624 contributed packages you might find useful.
8625
8626 @node History, GFDL, Odds and Ends, Top
8627 @appendix History of MH-E
8628
8629 @cindex Bill Wohler
8630 @cindex Brian Reid
8631 @cindex Gildea, Stephen
8632 @cindex Jim Larus
8633 @cindex Larus, Jim
8634 @cindex MH-E, versions
8635 @cindex Reid, Brian
8636 @cindex SourceForge
8637 @cindex Stephen Gildea
8638 @cindex Wohler, Bill
8639 @cindex history of MH-E
8640 @cindex versions of MH-E
8641
8642 MH-E was originally written by Brian Reid in 1983 and has changed
8643 hands several times since then. Jim Larus wanted to do something
8644 similar for GNU Emacs, and ended up completely rewriting it that same
8645 year. In 1989, Stephen Gildea picked it up and added many
8646 improvements. Bill Wohler then took over in 2000 and moved its
8647 development to @uref{http://sourceforge.net/, SourceForge} where it
8648 lives today.
8649
8650 @menu
8651 * From Brian Reid::
8652 * From Jim Larus::
8653 * From Stephen Gildea::
8654 * From Bill Wohler::
8655 @end menu
8656
8657 @node From Brian Reid, From Jim Larus, History, History
8658 @appendixsec From Brian Reid
8659
8660 @cindex Brian Reid
8661 @cindex Reid, Brian
8662
8663 One day in 1983 I got the flu and had to stay home from work for three
8664 days with nothing to do. I used that time to write MHE@. The
8665 fundamental idea behind MHE was that it was a ``puppeteer'' driving
8666 the MH programs underneath it. MH had a model that the editor was
8667 supposed to run as a sub-process of the mailer, which seemed to me at
8668 the time to be the tail wagging the dog. So I turned it around and
8669 made the editor drive the MH programs. I made sure that the UCI people
8670 (who were maintaining MH at the time) took in my changes and made them
8671 stick.
8672
8673 Today, I still use my own version of MHE because I don't at all like
8674 the way that GNU MH-E works and I've never gotten to be good enough at
8675 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs
8676 version of MHE and the GNU Emacs version of MH-E have almost nothing
8677 in common except similar names. They work differently, have different
8678 conceptual models, and have different key bindings@footnote{After
8679 reading this article, I questioned Brian about his version of MHE, and
8680 received some great ideas for improving MH-E such as a dired-like
8681 method of selecting folders; and removing the prompting when sending
8682 mail, filling in the blanks in the draft buffer instead. I passed them
8683 on to Stephen Gildea, the current maintainer, and he was excited about
8684 the ideas as well. Perhaps one day, MH-E will again resemble MHE
8685 (draft form editing was introduced in version 7.4).}.
8686
8687 Brian Reid, June 1994
8688
8689 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History
8690 @appendixsec From Jim Larus
8691
8692 @cindex Jim Larus
8693 @cindex Larus, Jim
8694
8695 Brian Reid, while at CMU or shortly after going to Stanford wrote a
8696 mail reading program called MHE for Gosling Emacs. It had much the
8697 same structure as MH-E (i.e., invoked MH programs), though it was
8698 simpler and the commands were slightly different. Unfortunately, I no
8699 longer have a copy so the differences are lost in the mists of time.
8700
8701 In '82-83, I was working at BBN and wrote a lot of mlisp code in
8702 Gosling Emacs to make it look more like Tennex Emacs. One of the
8703 packages that I picked up and improved was Reid's mail system. In '83,
8704 I went back to Berkeley. About that time, Stallman's first version of
8705 GNU Emacs came out and people started to move to it from Gosling Emacs
8706 (as I recall, the transition took a year or two). I decided to port
8707 Reid's MHE and used the mlisp to Emacs Lisp translator that came with
8708 GNU Emacs. It did a lousy job and the resulting code didn't work, so I
8709 bit the bullet and rewrote the code by hand (it was a lot smaller and
8710 simpler then, so it took only a day or two).
8711
8712 Soon after that, MH-E became part of the standard Emacs distribution
8713 and suggestions kept dribbling in for improvements. MH-E soon reached
8714 sufficient functionality to keep me happy, but I kept on improving it
8715 because I was a graduate student with plenty of time on my hands and
8716 it was more fun than my dissertation. In retrospect, the one thing
8717 that I regret is not writing any documentation, which seriously
8718 limited the use and appeal of the package.
8719
8720 @cindex @command{xmh}, in MH-E history
8721
8722 In '89, I came to Wisconsin as a professor and decided not to work on
8723 MH-E. It was stable, except for minor bugs, and had enough
8724 functionality, so I let it be for a few years. Stephen Gildea of BBN
8725 began to pester me about the bugs, but I ignored them. In 1990, he
8726 went off to the X Consortium, said good bye, and said that he would
8727 now be using @command{xmh}. A few months later, he came back and said
8728 that he couldn't stand @command{xmh} and could I put a few more bug fixes
8729 into MH-E. At that point, I had no interest in fixing MH-E, so I gave
8730 the responsibility of maintenance to him and he has done a fine job
8731 since then.
8732
8733 Jim Larus, June 1994
8734
8735 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History
8736 @appendixsec From Stephen Gildea
8737
8738 @cindex Gildea, Stephen
8739 @cindex Stephen Gildea
8740
8741 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before
8742 me. In my previous job, I had been using RMAIL, but as my folders tend
8743 to run large, I was frustrated with the speed of RMAIL@. However, I
8744 stuck with it because I wanted the GNU Emacs interface. I am very
8745 familiar and comfortable with the Emacs interface (with just a few
8746 modifications of my own) and dislike having to use applications with
8747 embedded editors; they never live up to Emacs.
8748
8749 MH is the mail reader of choice at BBN, so I converted to it. Since I
8750 didn't want to give up using an Emacs interface, I started using MH-E.
8751 As is my wont, I started hacking on it almost immediately. I first
8752 used version 3.4m. One of the first features I added was to treat the
8753 folder buffer as a file-visiting buffer: you could lock it, save it,
8754 and be warned of unsaved changes when killing it. I also worked to
8755 bring its functionality a little closer to RMAIL@. Jim Larus was very
8756 cooperative about merging in my changes, and my efforts first appeared
8757 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided
8758 MH-E was too slow and optimized it a lot. Version, 3.7, distributed
8759 with Emacs 18.56 in 1990, was noticeably faster.
8760
8761 When I moved to the X Consortium I became the first person there to
8762 not use xmh. (There is now one other engineer there using MH-E.) About
8763 this point I took over maintenance of MH-E from Jim and was finally
8764 able to add some features Jim hadn't accepted, such as the backward
8765 searching undo. My first release was 3.8 (Emacs 18.58) in 1992.
8766
8767 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0.
8768 Version 4.0 added many new features, including background folder
8769 collection and support for composing @sc{mime} messages. (Reading
8770 @sc{mime} messages remains to be done, alas.) While writing this book,
8771 Bill Wohler gave MH-E its closest examination ever, uncovering bugs
8772 and inconsistencies that required a new major version to fix, and so
8773 version 5 was released.
8774
8775 Stephen Gildea, June 1994
8776
8777 @node From Bill Wohler, , From Stephen Gildea, History
8778 @appendixsec From Bill Wohler
8779
8780 @cindex Wohler, Bill
8781 @cindex Bill Wohler
8782
8783 The preface originally included the following text which I use to
8784 begin my story:
8785
8786 @quotation
8787 But it's important to note a brief history of MH-E.
8788
8789 @w{Version 3} was prevalent through the @w{Emacs 18} and early
8790 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}),
8791 which introduced several new and changed commands. Next, @w{Version
8792 5.0} was released, which fixed some bugs and incompatibilities, and
8793 was incorporated into @w{Emacs 19.29}.
8794 @end quotation
8795
8796 After a long break, Stephen handed the reins over to me in 2000. I
8797 moved the project to a new site called SourceForge and organized a
8798 great team of developers. Our first release in late 2001 was version
8799 6. It appeared around the time of Emacs 21.2 and had menus and tool
8800 bar buttons.
8801
8802 Then, indexed searches, improved MIME handling, a speedbar, multiple
8803 identities, alias completion, an index view of unseen messages, spam
8804 software support, Face and X-Image-URL header field support, Fcc
8805 completion, arbitrary range handling, and draft form editing were
8806 introduced in the version 7 series around the time of Emacs 21.4
8807 (2004). Still, Emacs itself contained version 5 of MH-E released back
8808 in 1994.
8809
8810 Version 8 development was mostly driven by the rewrite of the manual.
8811 It also brought mailutils support, S/MIME support, picon support, and
8812 an improved interface for hiding header fields. The CVS repository was
8813 migrated from SourceForge to Savannah (only for those files that were
8814 already part of Emacs) and the software was completely reorganized to
8815 push back two decades of entropy. Version 8 will appear in Emacs 22.1,
8816 expected to be released in 2006.
8817
8818 Bill Wohler, February 2006
8819
8820 @node GFDL, GPL, History, Top
8821 @appendix GNU FREE DOCUMENTATION LICENSE
8822 @center Version 1.2, November 2002
8823
8824 @display
8825 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
8826 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
8827
8828 Everyone is permitted to copy and distribute verbatim copies
8829 of this license document, but changing it is not allowed.
8830 @end display
8831 @sp 1
8832 @enumerate 0
8833 @item
8834 PREAMBLE
8835
8836 The purpose of this License is to make a manual, textbook, or other
8837 functional and useful document ``free'' in the sense of freedom: to
8838 assure everyone the effective freedom to copy and redistribute it,
8839 with or without modifying it, either commercially or noncommercially.
8840 Secondarily, this License preserves for the author and publisher a way
8841 to get credit for their work, while not being considered responsible
8842 for modifications made by others.
8843
8844 This License is a kind of ``copyleft'', which means that derivative
8845 works of the document must themselves be free in the same sense. It
8846 complements the GNU General Public License, which is a copyleft
8847 license designed for free software.
8848
8849 We have designed this License in order to use it for manuals for free
8850 software, because free software needs free documentation: a free
8851 program should come with manuals providing the same freedoms that the
8852 software does. But this License is not limited to software manuals;
8853 it can be used for any textual work, regardless of subject matter or
8854 whether it is published as a printed book. We recommend this License
8855 principally for works whose purpose is instruction or reference.
8856
8857 @sp 1
8858 @item
8859 APPLICABILITY AND DEFINITIONS
8860
8861 This License applies to any manual or other work, in any medium, that
8862 contains a notice placed by the copyright holder saying it can be
8863 distributed under the terms of this License. Such a notice grants a
8864 world-wide, royalty-free license, unlimited in duration, to use that
8865 work under the conditions stated herein. The ``Document'', below,
8866 refers to any such manual or work. Any member of the public is a
8867 licensee, and is addressed as ``you''. You accept the license if you
8868 copy, modify or distribute the work in a way requiring permission
8869 under copyright law.
8870
8871 A ``Modified Version'' of the Document means any work containing the
8872 Document or a portion of it, either copied verbatim, or with
8873 modifications and/or translated into another language.
8874
8875 A ``Secondary Section'' is a named appendix or a front-matter section of
8876 the Document that deals exclusively with the relationship of the
8877 publishers or authors of the Document to the Document's overall subject
8878 (or to related matters) and contains nothing that could fall directly
8879 within that overall subject. (Thus, if the Document is in part a
8880 textbook of mathematics, a Secondary Section may not explain any
8881 mathematics.) The relationship could be a matter of historical
8882 connection with the subject or with related matters, or of legal,
8883 commercial, philosophical, ethical or political position regarding
8884 them.
8885
8886 The ``Invariant Sections'' are certain Secondary Sections whose titles
8887 are designated, as being those of Invariant Sections, in the notice
8888 that says that the Document is released under this License. If a
8889 section does not fit the above definition of Secondary then it is not
8890 allowed to be designated as Invariant. The Document may contain zero
8891 Invariant Sections. If the Document does not identify any Invariant
8892 Sections then there are none.
8893
8894 The ``Cover Texts'' are certain short passages of text that are listed,
8895 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
8896 the Document is released under this License. A Front-Cover Text may
8897 be at most 5 words, and a Back-Cover Text may be at most 25 words.
8898
8899 A ``Transparent'' copy of the Document means a machine-readable copy,
8900 represented in a format whose specification is available to the
8901 general public, that is suitable for revising the document
8902 straightforwardly with generic text editors or (for images composed of
8903 pixels) generic paint programs or (for drawings) some widely available
8904 drawing editor, and that is suitable for input to text formatters or
8905 for automatic translation to a variety of formats suitable for input
8906 to text formatters. A copy made in an otherwise Transparent file
8907 format whose markup, or absence of markup, has been arranged to thwart
8908 or discourage subsequent modification by readers is not Transparent.
8909 An image format is not Transparent if used for any substantial amount
8910 of text. A copy that is not ``Transparent'' is called ``Opaque.''
8911
8912
8913 Examples of suitable formats for Transparent copies include plain
8914 ASCII without markup, Texinfo input format, LaTeX input format, SGML
8915 or XML using a publicly available DTD, and standard-conforming simple
8916 HTML, PostScript or PDF designed for human modification. Examples of
8917 transparent image formats include PNG, XCF and JPG. Opaque formats
8918 include proprietary formats that can be read and edited only by
8919 proprietary word processors, SGML or XML for which the DTD and/or
8920 processing tools are not generally available, and the
8921 machine-generated HTML, PostScript or PDF produced by some word
8922 processors for output purposes only.
8923
8924 The ``Title Page'' means, for a printed book, the title page itself,
8925 plus such following pages as are needed to hold, legibly, the material
8926 this License requires to appear in the title page. For works in
8927 formats which do not have any title page as such, ``Title Page'' means
8928 the text near the most prominent appearance of the work's title,
8929 preceding the beginning of the body of the text.
8930
8931 A section ``Entitled XYZ'' means a named subunit of the Document whose
8932 title either is precisely XYZ or contains XYZ in parentheses following
8933 text that translates XYZ in another language. (Here XYZ stands for a
8934 specific section name mentioned below, such as ``Acknowledgements'',
8935 ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
8936 of such a section when you modify the Document means that it remains a
8937 section ``Entitled XYZ'' according to this definition.
8938
8939 The Document may include Warranty Disclaimers next to the notice which
8940 states that this License applies to the Document. These Warranty
8941 Disclaimers are considered to be included by reference in this
8942 License, but only as regards disclaiming warranties: any other
8943 implication that these Warranty Disclaimers may have is void and has
8944 no effect on the meaning of this License.
8945 @sp 1
8946 @item
8947 VERBATIM COPYING
8948
8949 You may copy and distribute the Document in any medium, either
8950 commercially or noncommercially, provided that this License, the
8951 copyright notices, and the license notice saying this License applies
8952 to the Document are reproduced in all copies, and that you add no other
8953 conditions whatsoever to those of this License. You may not use
8954 technical measures to obstruct or control the reading or further
8955 copying of the copies you make or distribute. However, you may accept
8956 compensation in exchange for copies. If you distribute a large enough
8957 number of copies you must also follow the conditions in section 3.
8958
8959 You may also lend copies, under the same conditions stated above, and
8960 you may publicly display copies.
8961 @sp 1
8962 @item
8963 COPYING IN QUANTITY
8964
8965 If you publish printed copies (or copies in media that commonly have
8966 printed covers) of the Document, numbering more than 100, and the
8967 Document's license notice requires Cover Texts, you must enclose the
8968 copies in covers that carry, clearly and legibly, all these Cover
8969 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
8970 the back cover. Both covers must also clearly and legibly identify
8971 you as the publisher of these copies. The front cover must present
8972 the full title with all words of the title equally prominent and
8973 visible. You may add other material on the covers in addition.
8974 Copying with changes limited to the covers, as long as they preserve
8975 the title of the Document and satisfy these conditions, can be treated
8976 as verbatim copying in other respects.
8977
8978 If the required texts for either cover are too voluminous to fit
8979 legibly, you should put the first ones listed (as many as fit
8980 reasonably) on the actual cover, and continue the rest onto adjacent
8981 pages.
8982
8983 If you publish or distribute Opaque copies of the Document numbering
8984 more than 100, you must either include a machine-readable Transparent
8985 copy along with each Opaque copy, or state in or with each Opaque copy
8986 a computer-network location from which the general network-using
8987 public has access to download using public-standard network protocols
8988 a complete Transparent copy of the Document, free of added material.
8989 If you use the latter option, you must take reasonably prudent steps,
8990 when you begin distribution of Opaque copies in quantity, to ensure
8991 that this Transparent copy will remain thus accessible at the stated
8992 location until at least one year after the last time you distribute an
8993 Opaque copy (directly or through your agents or retailers) of that
8994 edition to the public.
8995
8996 It is requested, but not required, that you contact the authors of the
8997 Document well before redistributing any large number of copies, to give
8998 them a chance to provide you with an updated version of the Document.
8999 @sp 1
9000 @item
9001 MODIFICATIONS
9002
9003 You may copy and distribute a Modified Version of the Document under
9004 the conditions of sections 2 and 3 above, provided that you release
9005 the Modified Version under precisely this License, with the Modified
9006 Version filling the role of the Document, thus licensing distribution
9007 and modification of the Modified Version to whoever possesses a copy
9008 of it. In addition, you must do these things in the Modified Version:
9009
9010 A. Use in the Title Page (and on the covers, if any) a title distinct
9011 from that of the Document, and from those of previous versions
9012 (which should, if there were any, be listed in the History section
9013 of the Document). You may use the same title as a previous version
9014 if the original publisher of that version gives permission.@*
9015 B. List on the Title Page, as authors, one or more persons or entities
9016 responsible for authorship of the modifications in the Modified
9017 Version, together with at least five of the principal authors of the
9018 Document (all of its principal authors, if it has fewer than five),
9019 unless they release you from this requirement.@*
9020 C. State on the Title page the name of the publisher of the
9021 Modified Version, as the publisher.@*
9022 D. Preserve all the copyright notices of the Document.@*
9023 E. Add an appropriate copyright notice for your modifications
9024 adjacent to the other copyright notices.@*
9025 F. Include, immediately after the copyright notices, a license notice
9026 giving the public permission to use the Modified Version under the
9027 terms of this License, in the form shown in the Addendum below.@*
9028 G. Preserve in that license notice the full lists of Invariant Sections
9029 and required Cover Texts given in the Document's license notice.@*
9030 H. Include an unaltered copy of this License.@*
9031 I. Preserve the section Entitled ``History'', Preserve its Title, and add
9032 to it an item stating at least the title, year, new authors, and
9033 publisher of the Modified Version as given on the Title Page. If
9034 there is no section Entitled ``History'' in the Document, create one
9035 stating the title, year, authors, and publisher of the Document as
9036 given on its Title Page, then add an item describing the Modified
9037 Version as stated in the previous sentence.@*
9038 J. Preserve the network location, if any, given in the Document for
9039 public access to a Transparent copy of the Document, and likewise
9040 the network locations given in the Document for previous versions
9041 it was based on. These may be placed in the ``History'' section.
9042 You may omit a network location for a work that was published at
9043 least four years before the Document itself, or if the original
9044 publisher of the version it refers to gives permission.@*
9045 K. For any section Entitled ``Acknowledgements'' or ``Dedications'',
9046 Preserve the Title of the section, and preserve in the section all
9047 the substance and tone of each of the contributor acknowledgements
9048 and/or dedications given therein.@*
9049 L. Preserve all the Invariant Sections of the Document,
9050 unaltered in their text and in their titles. Section numbers
9051 or the equivalent are not considered part of the section titles.@*
9052 M. Delete any section Entitled ``Endorsements.'' Such a section
9053 may not be included in the Modified Version.@*
9054 N. Do not retitle any existing section to be Entitled ``Endorsements''
9055 or to conflict in title with any Invariant Section.@*
9056 O. Preserve any Warranty Disclaimers.@*
9057 @sp 1
9058 If the Modified Version includes new front-matter sections or
9059 appendices that qualify as Secondary Sections and contain no material
9060 copied from the Document, you may at your option designate some or all
9061 of these sections as invariant. To do this, add their titles to the
9062 list of Invariant Sections in the Modified Version's license notice.
9063 These titles must be distinct from any other section titles.
9064
9065 You may add a section Entitled ``Endorsements'', provided it contains
9066 nothing but endorsements of your Modified Version by various
9067 parties--for example, statements of peer review or that the text has
9068 been approved by an organization as the authoritative definition of a
9069 standard.
9070
9071 You may add a passage of up to five words as a Front-Cover Text, and a
9072 passage of up to 25 words as a Back-Cover Text, to the end of the list
9073 of Cover Texts in the Modified Version. Only one passage of
9074 Front-Cover Text and one of Back-Cover Text may be added by (or
9075 through arrangements made by) any one entity. If the Document already
9076 includes a cover text for the same cover, previously added by you or
9077 by arrangement made by the same entity you are acting on behalf of,
9078 you may not add another; but you may replace the old one, on explicit
9079 permission from the previous publisher that added the old one.
9080
9081 The author(s) and publisher(s) of the Document do not by this License
9082 give permission to use their names for publicity for or to assert or
9083 imply endorsement of any Modified Version.
9084 @sp 1
9085 @item
9086 COMBINING DOCUMENTS
9087
9088 You may combine the Document with other documents released under this
9089 License, under the terms defined in section 4 above for modified
9090 versions, provided that you include in the combination all of the
9091 Invariant Sections of all of the original documents, unmodified, and
9092 list them all as Invariant Sections of your combined work in its
9093 license notice, and that you preserve all their Warranty Disclaimers.
9094
9095 The combined work need only contain one copy of this License, and
9096 multiple identical Invariant Sections may be replaced with a single
9097 copy. If there are multiple Invariant Sections with the same name but
9098 different contents, make the title of each such section unique by
9099 adding at the end of it, in parentheses, the name of the original
9100 author or publisher of that section if known, or else a unique number.
9101 Make the same adjustment to the section titles in the list of
9102 Invariant Sections in the license notice of the combined work.
9103
9104 In the combination, you must combine any sections Entitled ``History''
9105 in the various original documents, forming one section Entitled
9106 ``History''; likewise combine any sections Entitled ``Acknowledgements'',
9107 and any sections Entitled ``Dedications.'' You must delete all sections
9108 Entitled ``Endorsements.''
9109 @sp 1
9110 @item
9111 COLLECTIONS OF DOCUMENTS
9112
9113 You may make a collection consisting of the Document and other documents
9114 released under this License, and replace the individual copies of this
9115 License in the various documents with a single copy that is included in
9116 the collection, provided that you follow the rules of this License for
9117 verbatim copying of each of the documents in all other respects.
9118
9119 You may extract a single document from such a collection, and distribute
9120 it individually under this License, provided you insert a copy of this
9121 License into the extracted document, and follow this License in all
9122 other respects regarding verbatim copying of that document.
9123 @sp 1
9124 @item
9125 AGGREGATION WITH INDEPENDENT WORKS
9126
9127 A compilation of the Document or its derivatives with other separate
9128 and independent documents or works, in or on a volume of a storage or
9129 distribution medium, is called an ``aggregate'' if the copyright
9130 resulting from the compilation is not used to limit the legal rights
9131 of the compilation's users beyond what the individual works permit.
9132 When the Document is included in an aggregate, this License does not
9133 apply to the other works in the aggregate which are not themselves
9134 derivative works of the Document.
9135
9136 If the Cover Text requirement of section 3 is applicable to these
9137 copies of the Document, then if the Document is less than one half of
9138 the entire aggregate, the Document's Cover Texts may be placed on
9139 covers that bracket the Document within the aggregate, or the
9140 electronic equivalent of covers if the Document is in electronic form.
9141 Otherwise they must appear on printed covers that bracket the whole
9142 aggregate.
9143 @sp 1
9144 @item
9145 TRANSLATION
9146
9147 Translation is considered a kind of modification, so you may
9148 distribute translations of the Document under the terms of section 4.
9149 Replacing Invariant Sections with translations requires special
9150 permission from their copyright holders, but you may include
9151 translations of some or all Invariant Sections in addition to the
9152 original versions of these Invariant Sections. You may include a
9153 translation of this License, and all the license notices in the
9154 Document, and any Warranty Disclaimers, provided that you also include
9155 the original English version of this License and the original versions
9156 of those notices and disclaimers. In case of a disagreement between
9157 the translation and the original version of this License or a notice
9158 or disclaimer, the original version will prevail.
9159
9160 If a section in the Document is Entitled ``Acknowledgements'',
9161 ``Dedications'', or ``History'', the requirement (section 4) to Preserve
9162 its Title (section 1) will typically require changing the actual
9163 title.
9164 @sp 1
9165 @item
9166 TERMINATION
9167
9168 You may not copy, modify, sublicense, or distribute the Document except
9169 as expressly provided for under this License. Any other attempt to
9170 copy, modify, sublicense or distribute the Document is void, and will
9171 automatically terminate your rights under this License. However,
9172 parties who have received copies, or rights, from you under this
9173 License will not have their licenses terminated so long as such
9174 parties remain in full compliance.
9175 @sp 1
9176 @item
9177 FUTURE REVISIONS OF THIS LICENSE
9178
9179 The Free Software Foundation may publish new, revised versions
9180 of the GNU Free Documentation License from time to time. Such new
9181 versions will be similar in spirit to the present version, but may
9182 differ in detail to address new problems or concerns. See
9183 http://www.gnu.org/copyleft/.
9184
9185 Each version of the License is given a distinguishing version number.
9186 If the Document specifies that a particular numbered version of this
9187 License ``or any later version'' applies to it, you have the option of
9188 following the terms and conditions either of that specified version or
9189 of any later version that has been published (not as a draft) by the
9190 Free Software Foundation. If the Document does not specify a version
9191 number of this License, you may choose any version ever published (not
9192 as a draft) by the Free Software Foundation.
9193
9194 @end enumerate
9195
9196 @unnumberedsec ADDENDUM: How to use this License for your documents
9197
9198 To use this License in a document you have written, include a copy of
9199 the License in the document and put the following copyright and
9200 license notices just after the title page:
9201
9202 @smallexample
9203 @group
9204 Copyright (C) @var{year} @var{your name}.
9205 Permission is granted to copy, distribute and/or modify this document
9206 under the terms of the GNU Free Documentation License, Version 1.2
9207 or any later version published by the Free Software Foundation;
9208 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
9209 A copy of the license is included in the section entitled ``GNU
9210 Free Documentation License''.
9211 @end group
9212 @end smallexample
9213
9214 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
9215 replace the ``with...Texts.'' line with this:
9216
9217 @smallexample
9218 @group
9219 with the Invariant Sections being @var{list their titles}, with the
9220 Front-Cover Texts being @var{list}, and with the Back-Cover Texts being
9221 @var{list}.
9222 @end group
9223 @end smallexample
9224
9225 If you have Invariant Sections without Cover Texts, or some other
9226 combination of the three, merge those two alternatives to suit the
9227 situation.
9228
9229 If your document contains nontrivial examples of program code, we
9230 recommend releasing these examples in parallel under your choice of
9231 free software license, such as the GNU General Public License,
9232 to permit their use in free software.
9233
9234 @node GPL, Key Index, GFDL, Top
9235 @appendix GNU GENERAL PUBLIC LICENSE
9236 @center Version 2, June 1991
9237
9238 @display
9239 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
9240 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
9241
9242 Everyone is permitted to copy and distribute verbatim copies
9243 of this license document, but changing it is not allowed.
9244 @end display
9245
9246 @unnumberedsec Preamble
9247
9248 The licenses for most software are designed to take away your
9249 freedom to share and change it. By contrast, the GNU General Public
9250 License is intended to guarantee your freedom to share and change free
9251 software---to make sure the software is free for all its users. This
9252 General Public License applies to most of the Free Software
9253 Foundation's software and to any other program whose authors commit to
9254 using it. (Some other Free Software Foundation software is covered by
9255 the GNU Library General Public License instead.) You can apply it to
9256 your programs, too.
9257
9258 When we speak of free software, we are referring to freedom, not
9259 price. Our General Public Licenses are designed to make sure that you
9260 have the freedom to distribute copies of free software (and charge for
9261 this service if you wish), that you receive source code or can get it
9262 if you want it, that you can change the software or use pieces of it
9263 in new free programs; and that you know you can do these things.
9264
9265 To protect your rights, we need to make restrictions that forbid
9266 anyone to deny you these rights or to ask you to surrender the rights.
9267 These restrictions translate to certain responsibilities for you if you
9268 distribute copies of the software, or if you modify it.
9269
9270 For example, if you distribute copies of such a program, whether
9271 gratis or for a fee, you must give the recipients all the rights that
9272 you have. You must make sure that they, too, receive or can get the
9273 source code. And you must show them these terms so they know their
9274 rights.
9275
9276 We protect your rights with two steps: (1) copyright the software, and
9277 (2) offer you this license which gives you legal permission to copy,
9278 distribute and/or modify the software.
9279
9280 Also, for each author's protection and ours, we want to make certain
9281 that everyone understands that there is no warranty for this free
9282 software. If the software is modified by someone else and passed on, we
9283 want its recipients to know that what they have is not the original, so
9284 that any problems introduced by others will not reflect on the original
9285 authors' reputations.
9286
9287 Finally, any free program is threatened constantly by software
9288 patents. We wish to avoid the danger that redistributors of a free
9289 program will individually obtain patent licenses, in effect making the
9290 program proprietary. To prevent this, we have made it clear that any
9291 patent must be licensed for everyone's free use or not licensed at all.
9292
9293 The precise terms and conditions for copying, distribution and
9294 modification follow.
9295
9296 @iftex
9297 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9298 @end iftex
9299 @ifinfo
9300 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9301 @end ifinfo
9302
9303 @enumerate 0
9304 @item
9305 This License applies to any program or other work which contains
9306 a notice placed by the copyright holder saying it may be distributed
9307 under the terms of this General Public License. The ``Program,'' below,
9308 refers to any such program or work, and a ``work based on the Program''
9309 means either the Program or any derivative work under copyright law:
9310 that is to say, a work containing the Program or a portion of it,
9311 either verbatim or with modifications and/or translated into another
9312 language. (Hereinafter, translation is included without limitation in
9313 the term ``modification.'') Each licensee is addressed as ``you.''
9314
9315 Activities other than copying, distribution and modification are not
9316 covered by this License; they are outside its scope. The act of
9317 running the Program is not restricted, and the output from the Program
9318 is covered only if its contents constitute a work based on the
9319 Program (independent of having been made by running the Program).
9320 Whether that is true depends on what the Program does.
9321
9322 @item
9323 You may copy and distribute verbatim copies of the Program's
9324 source code as you receive it, in any medium, provided that you
9325 conspicuously and appropriately publish on each copy an appropriate
9326 copyright notice and disclaimer of warranty; keep intact all the
9327 notices that refer to this License and to the absence of any warranty;
9328 and give any other recipients of the Program a copy of this License
9329 along with the Program.
9330
9331 You may charge a fee for the physical act of transferring a copy, and
9332 you may at your option offer warranty protection in exchange for a fee.
9333
9334 @item
9335 You may modify your copy or copies of the Program or any portion
9336 of it, thus forming a work based on the Program, and copy and
9337 distribute such modifications or work under the terms of Section 1
9338 above, provided that you also meet all of these conditions:
9339
9340 @enumerate a
9341 @item
9342 You must cause the modified files to carry prominent notices
9343 stating that you changed the files and the date of any change.
9344
9345 @item
9346 You must cause any work that you distribute or publish, that in
9347 whole or in part contains or is derived from the Program or any
9348 part thereof, to be licensed as a whole at no charge to all third
9349 parties under the terms of this License.
9350
9351 @item
9352 If the modified program normally reads commands interactively
9353 when run, you must cause it, when started running for such
9354 interactive use in the most ordinary way, to print or display an
9355 announcement including an appropriate copyright notice and a
9356 notice that there is no warranty (or else, saying that you provide
9357 a warranty) and that users may redistribute the program under
9358 these conditions, and telling the user how to view a copy of this
9359 License. (Exception: if the Program itself is interactive but
9360 does not normally print such an announcement, your work based on
9361 the Program is not required to print an announcement.)
9362 @end enumerate
9363
9364 These requirements apply to the modified work as a whole. If
9365 identifiable sections of that work are not derived from the Program,
9366 and can be reasonably considered independent and separate works in
9367 themselves, then this License, and its terms, do not apply to those
9368 sections when you distribute them as separate works. But when you
9369 distribute the same sections as part of a whole which is a work based
9370 on the Program, the distribution of the whole must be on the terms of
9371 this License, whose permissions for other licensees extend to the
9372 entire whole, and thus to each and every part regardless of who wrote it.
9373
9374 Thus, it is not the intent of this section to claim rights or contest
9375 your rights to work written entirely by you; rather, the intent is to
9376 exercise the right to control the distribution of derivative or
9377 collective works based on the Program.
9378
9379 In addition, mere aggregation of another work not based on the Program
9380 with the Program (or with a work based on the Program) on a volume of
9381 a storage or distribution medium does not bring the other work under
9382 the scope of this License.
9383
9384 @item
9385 You may copy and distribute the Program (or a work based on it,
9386 under Section 2) in object code or executable form under the terms of
9387 Sections 1 and 2 above provided that you also do one of the following:
9388
9389 @enumerate a
9390 @item
9391 Accompany it with the complete corresponding machine-readable
9392 source code, which must be distributed under the terms of Sections
9393 1 and 2 above on a medium customarily used for software interchange; or,
9394
9395 @item
9396 Accompany it with a written offer, valid for at least three
9397 years, to give any third party, for a charge no more than your
9398 cost of physically performing source distribution, a complete
9399 machine-readable copy of the corresponding source code, to be
9400 distributed under the terms of Sections 1 and 2 above on a medium
9401 customarily used for software interchange; or,
9402
9403 @item
9404 Accompany it with the information you received as to the offer
9405 to distribute corresponding source code. (This alternative is
9406 allowed only for noncommercial distribution and only if you
9407 received the program in object code or executable form with such
9408 an offer, in accord with Subsection b above.)
9409 @end enumerate
9410
9411 The source code for a work means the preferred form of the work for
9412 making modifications to it. For an executable work, complete source
9413 code means all the source code for all modules it contains, plus any
9414 associated interface definition files, plus the scripts used to
9415 control compilation and installation of the executable. However, as a
9416 special exception, the source code distributed need not include
9417 anything that is normally distributed (in either source or binary
9418 form) with the major components (compiler, kernel, and so on) of the
9419 operating system on which the executable runs, unless that component
9420 itself accompanies the executable.
9421
9422 If distribution of executable or object code is made by offering
9423 access to copy from a designated place, then offering equivalent
9424 access to copy the source code from the same place counts as
9425 distribution of the source code, even though third parties are not
9426 compelled to copy the source along with the object code.
9427
9428 @item
9429 You may not copy, modify, sublicense, or distribute the Program
9430 except as expressly provided under this License. Any attempt
9431 otherwise to copy, modify, sublicense or distribute the Program is
9432 void, and will automatically terminate your rights under this License.
9433 However, parties who have received copies, or rights, from you under
9434 this License will not have their licenses terminated so long as such
9435 parties remain in full compliance.
9436
9437 @item
9438 You are not required to accept this License, since you have not
9439 signed it. However, nothing else grants you permission to modify or
9440 distribute the Program or its derivative works. These actions are
9441 prohibited by law if you do not accept this License. Therefore, by
9442 modifying or distributing the Program (or any work based on the
9443 Program), you indicate your acceptance of this License to do so, and
9444 all its terms and conditions for copying, distributing or modifying
9445 the Program or works based on it.
9446
9447 @item
9448 Each time you redistribute the Program (or any work based on the
9449 Program), the recipient automatically receives a license from the
9450 original licensor to copy, distribute or modify the Program subject to
9451 these terms and conditions. You may not impose any further
9452 restrictions on the recipients' exercise of the rights granted herein.
9453 You are not responsible for enforcing compliance by third parties to
9454 this License.
9455
9456 @item
9457 If, as a consequence of a court judgment or allegation of patent
9458 infringement or for any other reason (not limited to patent issues),
9459 conditions are imposed on you (whether by court order, agreement or
9460 otherwise) that contradict the conditions of this License, they do not
9461 excuse you from the conditions of this License. If you cannot
9462 distribute so as to satisfy simultaneously your obligations under this
9463 License and any other pertinent obligations, then as a consequence you
9464 may not distribute the Program at all. For example, if a patent
9465 license would not permit royalty-free redistribution of the Program by
9466 all those who receive copies directly or indirectly through you, then
9467 the only way you could satisfy both it and this License would be to
9468 refrain entirely from distribution of the Program.
9469
9470 If any portion of this section is held invalid or unenforceable under
9471 any particular circumstance, the balance of the section is intended to
9472 apply and the section as a whole is intended to apply in other
9473 circumstances.
9474
9475 It is not the purpose of this section to induce you to infringe any
9476 patents or other property right claims or to contest validity of any
9477 such claims; this section has the sole purpose of protecting the
9478 integrity of the free software distribution system, which is
9479 implemented by public license practices. Many people have made
9480 generous contributions to the wide range of software distributed
9481 through that system in reliance on consistent application of that
9482 system; it is up to the author/donor to decide if he or she is willing
9483 to distribute software through any other system and a licensee cannot
9484 impose that choice.
9485
9486 This section is intended to make thoroughly clear what is believed to
9487 be a consequence of the rest of this License.
9488
9489 @item
9490 If the distribution and/or use of the Program is restricted in
9491 certain countries either by patents or by copyrighted interfaces, the
9492 original copyright holder who places the Program under this License
9493 may add an explicit geographical distribution limitation excluding
9494 those countries, so that distribution is permitted only in or among
9495 countries not thus excluded. In such case, this License incorporates
9496 the limitation as if written in the body of this License.
9497
9498 @item
9499 The Free Software Foundation may publish revised and/or new versions
9500 of the General Public License from time to time. Such new versions will
9501 be similar in spirit to the present version, but may differ in detail to
9502 address new problems or concerns.
9503
9504 Each version is given a distinguishing version number. If the Program
9505 specifies a version number of this License which applies to it and ``any
9506 later version,'' you have the option of following the terms and conditions
9507 either of that version or of any later version published by the Free
9508 Software Foundation. If the Program does not specify a version number of
9509 this License, you may choose any version ever published by the Free Software
9510 Foundation.
9511
9512 @item
9513 If you wish to incorporate parts of the Program into other free
9514 programs whose distribution conditions are different, write to the author
9515 to ask for permission. For software which is copyrighted by the Free
9516 Software Foundation, write to the Free Software Foundation; we sometimes
9517 make exceptions for this. Our decision will be guided by the two goals
9518 of preserving the free status of all derivatives of our free software and
9519 of promoting the sharing and reuse of software generally.
9520
9521 @iftex
9522 @heading NO WARRANTY
9523 @end iftex
9524 @ifinfo
9525 @center NO WARRANTY
9526 @end ifinfo
9527
9528 @item
9529 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
9530 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
9531 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
9532 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
9533 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9534 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
9535 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
9536 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
9537 REPAIR OR CORRECTION.
9538
9539 @item
9540 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
9541 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
9542 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
9543 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
9544 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
9545 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
9546 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
9547 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
9548 POSSIBILITY OF SUCH DAMAGES.
9549 @end enumerate
9550
9551 @iftex
9552 @heading END OF TERMS AND CONDITIONS
9553 @end iftex
9554 @ifinfo
9555 @center END OF TERMS AND CONDITIONS
9556 @end ifinfo
9557
9558 @page
9559 @unnumberedsec How to Apply These Terms to Your New Programs
9560
9561 If you develop a new program, and you want it to be of the greatest
9562 possible use to the public, the best way to achieve this is to make it
9563 free software which everyone can redistribute and change under these terms.
9564
9565 To do so, attach the following notices to the program. It is safest
9566 to attach them to the start of each source file to most effectively
9567 convey the exclusion of warranty; and each file should have at least
9568 the ``copyright'' line and a pointer to where the full notice is found.
9569
9570 @smallexample
9571 @var{one line to give the program's name and an idea of what it does.}
9572 Copyright (C) 19@var{yy} @var{name of author}
9573
9574 This program is free software; you can redistribute it and/or
9575 modify it under the terms of the GNU General Public License
9576 as published by the Free Software Foundation; either version 2
9577 of the License, or (at your option) any later version.
9578
9579 This program is distributed in the hope that it will be useful,
9580 but WITHOUT ANY WARRANTY; without even the implied warranty of
9581 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
9582 GNU General Public License for more details.
9583
9584 You should have received a copy of the GNU General Public License along
9585 with this program; if not, write to the Free Software Foundation, Inc.,
9586 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9587 @end smallexample
9588
9589 Also add information on how to contact you by electronic and paper mail.
9590
9591 If the program is interactive, make it output a short notice like this
9592 when it starts in an interactive mode:
9593
9594 @smallexample
9595 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
9596 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
9597 type `show w'. This is free software, and you are welcome
9598 to redistribute it under certain conditions; type `show c'
9599 for details.
9600 @end smallexample
9601
9602 The hypothetical commands @samp{show w} and @samp{show c} should show
9603 the appropriate parts of the General Public License. Of course, the
9604 commands you use may be called something other than @samp{show w} and
9605 @samp{show c}; they could even be mouse-clicks or menu items---whatever
9606 suits your program.
9607
9608 You should also get your employer (if you work as a programmer) or your
9609 school, if any, to sign a ``copyright disclaimer'' for the program, if
9610 necessary. Here is a sample; alter the names:
9611
9612 @smallexample
9613 @group
9614 Yoyodyne, Inc., hereby disclaims all copyright
9615 interest in the program `Gnomovision'
9616 (which makes passes at compilers) written
9617 by James Hacker.
9618
9619 @var{signature of Ty Coon}, 1 April 1989
9620 Ty Coon, President of Vice
9621 @end group
9622 @end smallexample
9623
9624 This General Public License does not permit incorporating your program into
9625 proprietary programs. If your program is a subroutine library, you may
9626 consider it more useful to permit linking proprietary applications with the
9627 library. If this is what you want to do, use the GNU Library General
9628 Public License instead of this License.
9629
9630 @node Key Index, Command Index, GPL, Top
9631 @unnumbered Key (Character) Index
9632 @printindex ky
9633
9634 @node Command Index, Option Index, Key Index, Top
9635 @unnumbered Command Index
9636 @printindex fn
9637
9638 @node Option Index, Concept Index, Command Index, Top
9639 @unnumbered Option (Variable) Index
9640 @printindex vr
9641
9642 @node Concept Index, , Option Index, Top
9643 @unnumbered Concept Index
9644 @printindex cp
9645
9646 @bye
9647
9648 @c Ispell Helpers
9649 @c
9650 @c The following are words that ispell should ignore that would not
9651 @c normally be in a dictionary (global or personal). Be careful not to
9652 @c include words here that could potentially be typos of other words
9653 @c (such as url, elisp, or MHE).
9654 @c
9655 @c LocalWords: CTRL ESC SPC f's
9656 @c LocalWords: addr Aliasfile alist
9657 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's
9658 @c LocalWords: cmd CMU contrib cron
9659 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw
9660 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm
9661 @c LocalWords: ImageMagick inbox ispell keychain
9662 @c LocalWords: Larus licensor LocalWords lookup lpr
9663 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp
9664 @c LocalWords: MML msg multipart
9665 @c LocalWords: Namazu NIS nenscript nnml num
9666 @c LocalWords: packmbox passphrase pathname prev procmail prog repl
9667 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's
9668 @c LocalWords: sublicense supercite speedbar
9669 @c LocalWords: Tennex texi texinfo Thelen thelenm
9670 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat
9671 @c
9672 @c See http://www.oreilly.com/oreilly/author/stylesheet.html.
9673 @c See http://en.wikipedia.org/.
9674 @c
9675 @c Note the lowercase mh which is needed to avoid hits in the
9676 @c functions and variables. Occasionally, check for accidental
9677 @c inclusion of mh in text by uncommenting the following and executing
9678 @c it with C-x C-e. You want to see "Search failed"
9679 @c (let ((case-fold-search nil))
9680 @c (goto-char (point-min))
9681 @c (search-forward-regexp "^mh\\( \\|$\\)"))
9682 @c
9683 @c An extremely useful setting for texinfo-mode-hook is:
9684 @c (add-to-list
9685 @c 'ispell-skip-region-alist
9686 @c (list
9687 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)"
9688 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|"
9689 @c "@[@{}.]\\|"
9690 @c "[^@]\\|"
9691 @c "@\\(end \\)?group\\|"
9692 @c "@\\(end \\)?cartouche\\)+"
9693 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|"
9694 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|"
9695 @c "^@end [a-z]+$\\|"
9696 @c "^@\\([fv]\\|print\\)index .*$\\|"
9697 @c "@uref{[^,]+,\\|"
9698 @c "@[a-z]+\\|"
9699 @c "/[a-z.]+[/}]\\)")))))
9700 @c
9701 @c Cross References
9702 @c
9703 @c See existing cross-references to the Emacs manual and the Emacs
9704 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU
9705 @c Emacs Lisp Reference Manual'' respectively).
9706
9707 @c @ftable Sorting
9708 @c
9709 @c As per index (sort of): Punctuation, keyboard characters (such as
9710 @c RET and BS) upper and lowercase mixed (lower comes before
9711 @c uppercase), control characters go with uppercase C, meta characters
9712 @c go with uppercase M.
9713 @c In some cases, the sort isn't strictly ASCII.
9714 @c For example, SPC (mh-page-msg) reads better before BS
9715 @c (mh-previous-page) and . (mh-show) is better before ,
9716 @c (mh-header-display).
9717
9718 @c @vtable Sorting
9719 @c
9720 @c Alphabetical, pull hooks into their own table.
9721
9722 @c Local Variables:
9723 @c sentence-end-double-space: nil
9724 @c End:
9725
9726 @ignore
9727 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef
9728 @end ignore