Add 2011 to FSF/AIST copyright years.
[bpt/emacs.git] / doc / misc / mh-e.texi
CommitLineData
4009494e
GM
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
db78a8cb 6@setfilename ../../info/mh-e
4009494e
GM
7@settitle The MH-E Manual
8@c %**end of header
9
10@c Version of the software and manual.
2a1cf2b9 11@set VERSION 8.2
4009494e
GM
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).
2a1cf2b9
BW
14@set EDITION
15@set UPDATED 2009-06-13
16@set UPDATE-MONTH June, 2009
4009494e
GM
17
18@c Other variables.
19@set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh
20@set MH-E-HOME http://mh-e.sourceforge.net/
21
22@c Copyright
23@copying
24This is version @value{VERSION}@value{EDITION} of @cite{The MH-E
25Manual}, last updated @value{UPDATED}.
26
9360256a 27Copyright @copyright{} 1995, 2001, 2002, 2003, 2005, 2006, 2007, 2008,
5df4f04c 28 2009, 2010, 2011 Free Software Foundation, Inc.
4009494e 29
2ecba534
BW
30@c This dual license has been agreed upon by the FSF.
31
4009494e 32@quotation
6a359279 33Permission is granted to copy, distribute and/or modify this document
2ecba534
BW
34under the terms of either:
35
36@enumerate a
37@item
6a2c4aec 38the GNU Free Documentation License, Version 1.3 or any later version
2ecba534
BW
39published by the Free Software Foundation; with no Invariant Sections,
40with the Front-Cover texts being ``A GNU Manual,'' and with the
41Back-Cover Texts as in (a) below. A copy of the license is included in
42the section entitled ``GNU Free Documentation License.''
6a359279
GM
43
44(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
2ecba534 45modify this GNU manual. Buying copies from the FSF supports it in
6a359279 46developing GNU and promoting software freedom.''
2ecba534
BW
47
48@item
49the GNU General Public License as published by the Free Software
50Foundation; either version 3, or (at your option) any later version. A
51copy of the license is included in the section entitled ``GNU General
52Public License.''
53@end enumerate
54
4009494e
GM
55@end quotation
56@end copying
57
58@c Info Directory Entry
59@dircategory Emacs
60@direntry
9360256a 61* MH-E: (mh-e). Emacs interface to the MH mail system.
4009494e
GM
62@end direntry
63
64@c Title Page
4009494e
GM
65@titlepage
66@title The MH-E Manual
67@subtitle Version @value{VERSION}@value{EDITION}
68@subtitle @value{UPDATE-MONTH}
69@author Bill Wohler
70
71@c Copyright Page
72@page
73@vskip 0pt plus 1filll
74@insertcopying
75@end titlepage
76
77@ifnottex
78@html
79<!--
80@end html
81@node Top, Preface, (dir), (dir)
82@top The MH-E Manual
83@html
84-->
85@end html
86@insertcopying
87@end ifnottex
88
89@c Table of Contents
90@contents
91
92@html
93<!--
94@end html
95
96@menu
97* Preface:: Preface
98* Conventions:: GNU Emacs Terms and Conventions
99* Getting Started:: Getting Started
100* Tour Through MH-E:: Tour Through MH-E
101* Using This Manual:: Using This Manual
102* Incorporating Mail:: Incorporating Mail
103* Reading Mail:: Reading Mail
104* Folders:: Organizing Your Mail with Folders
105* Sending Mail:: Sending Mail
106* Editing Drafts:: Editing a Draft
107* Aliases:: Aliases
108* Identities:: Identities
109* Speedbar:: The Speedbar
110* Menu Bar:: The Menu Bar
111* Tool Bar:: The Tool Bar
112* Searching:: Searching Through Messages
113* Threading:: Viewing Message Threads
114* Limits:: Limiting Display
115* Sequences:: Using Sequences
116* Junk:: Dealing With Junk Mail
117* Miscellaneous:: Miscellaneous Commands, Variables, and Buffers
118* Scan Line Formats:: Scan Line Formats
119* Procmail:: Reading Mailing Lists Effectively
120* Odds and Ends:: Odds and Ends
121* History:: History of MH-E
122* GFDL:: GNU Free Documentation License
2ecba534 123* GPL:: GNU General Public License
4009494e
GM
124* Key Index:: Key (Character) Index
125* Command Index:: Command Index
126* Option Index:: Option (Variable) Index
127* Concept Index:: Concept Index
128
129@detailmenu
130 --- The Detailed Node Listing ---
131
132Tour Through MH-E
133
134* Sending Mail Tour::
135* Reading Mail Tour::
136* Processing Mail Tour::
137* Leaving MH-E::
138* More About MH-E::
139
140Using This Manual
141
142* Options::
143* Ranges::
144* Folder Selection::
145
146Reading Your Mail
147
148* Viewing::
149* Viewing Attachments::
150* HTML::
151* Digests::
152* Reading PGP::
153* Printing::
154* Files and Pipes::
155* Navigating::
156* Miscellaneous Commands and Options::
157
158Sending Mail
159
160* Composing::
161* Replying::
162* Forwarding::
163* Redistributing::
164* Editing Again::
165
166Editing a Draft
167
168* Editing Message::
169* Inserting Letter::
170* Inserting Messages::
171* Signature::
172* Picture::
173* Adding Attachments::
174* Sending PGP::
175* Checking Recipients::
176* Sending Message::
177* Killing Draft::
178
179Odds and Ends
180
181* Bug Reports::
182* Mailing Lists::
183* MH FAQ and Support::
184* Getting MH-E::
185
186History of MH-E
187
188* From Brian Reid::
189* From Jim Larus::
190* From Stephen Gildea::
191* From Bill Wohler::
192
193@end detailmenu
194@end menu
195
196@html
197-->
198@end html
199
200@node Preface, Conventions, Top, Top
201@unnumbered Preface
202
203@cindex Emacs
204@cindex Unix commands, Emacs
205@cindex preface
206
207This manual introduces another interface to the MH mail system that is
208accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is
209easy to use. I don't assume that you know GNU Emacs or even MH at this
210point, since I didn't know either of them when I discovered MH-E.
211However, MH-E was the tip of the iceberg, and I discovered more and
212more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of
213them.
214
215The MH-E package is distributed with GNU Emacs@footnote{Version
bbe1ba5e 216@value{VERSION} of MH-E appeared in GNU Emacs 23.1. It is supported
3cf38f97 217in GNU Emacs 21 and 22, as well as XEmacs 21 (except for versions
4009494e
GM
21821.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher,
219all versions of nmh, and GNU mailutils 1.0 and higher.}, so you
30864d5f
BW
220shouldn't have to do anything special to use it. Gnus is also
221required; version 5.10 or higher is recommended. This manual covers
4009494e
GM
222MH-E version @value{VERSION}. To help you decide which version you
223have, see @ref{Getting Started}.
224
225@findex help-with-tutorial
226@kindex C-h t
227
228If you don't already use GNU Emacs but want to learn more, you can
229read 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
242from the Free Software Foundation.
243
244If more information is needed, you can go to the Unix manual pages of
245the individual MH commands. When the name is not obvious, I'll guide
246you to a relevant MH manual page that describes the action more fully.
247
248@cindex @cite{MH & nmh: Email for Users & Programmers}
249@cindex MH book
250@cindex info
251@kindex C-h i
252
253This manual is available in both Info and online formats. The Info
254version is distributed with Emacs and can be accessed with the
255@command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i
256m mh-e @key{RET}}). The online version is available at
257@uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great
258online resource is the book @uref{http://www.ics.uci.edu/~mh/book/,
259@cite{MH & nmh: Email for Users & Programmers}} (also known as
260@dfn{the MH book}).
261
262I hope you enjoy this manual! If you have any comments, or suggestions
263for this document, please let me know.
264
265@cindex Bill Wohler
266@cindex Wohler, Bill
267
268@noindent
269Bill Wohler <@i{wohler at newt.com}>@*
2708 February 1995@*
27124 February 2006
272
273@node Conventions, Getting Started, Preface, Top
274@chapter GNU Emacs Terms and Conventions
275
276@cindex Emacs
277@cindex Emacs, conventions
278@cindex Emacs, terms
279@cindex Unix commands, Emacs
280@cindex conventions, Emacs
281@cindex terms, Emacs
282
283If you're an experienced Emacs user, you can skip the following
284conventions and definition of terms and go directly to the next
285section (@pxref{Getting Started}).
286
287@cindex Emacs commands
288@cindex MH commands
289@cindex Unix commands
290@cindex commands
291@cindex commands, MH
292@cindex commands, Unix
293@cindex commands, shell
294@cindex functions
295@cindex shell commands
296
297In general, @dfn{functions} in this text refer to Emacs Lisp functions
298that one would call from within Emacs Lisp programs (for example,
299@code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those
300things that are run by the user, such as @kbd{i} or @kbd{M-x
301mh-inc-folder}. Programs outside of Emacs are specifically called MH
302commands, shell commands, or Unix commands.
303
304@cindex conventions, key names
305@cindex key names
306
307The conventions for key names are as follows:
308
309@table @kbd
310@item C-x
311Hold down the @key{CTRL} (Control) key and press the @kbd{x} key.
312@c -------------------------
313@item M-x
314Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key.
315
316Since some keyboards don't have a @key{META} key, you can generate
317@kbd{M-x}, for example, by pressing @key{ESC} (Escape),
318@emph{releasing it}, and then pressing the @kbd{x} key.
319@c -------------------------
320@item @key{RET}
321Press the @key{RETURN} or @key{ENTER} key. This is normally used to
322complete a command.
323@c -------------------------
324@item @key{SPC}
325Press the space bar.
326@c -------------------------
327@item @key{TAB}
328Press the @key{TAB} key.
329@c -------------------------
330@item @key{DEL}
331Press the @key{DELETE} key.
332@c -------------------------
333@item @key{BS}
334Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or
335earlier of Emacs, you will need to use the @key{DEL} key.}.
336@end table
337
338@cindex Emacs, prefix argument
339@cindex prefix argument
340@kindex C-u
341
342A @dfn{prefix argument} allows you to pass an argument to any Emacs
343function. To pass an argument, type @kbd{C-u} before the Emacs command
344or keystroke. Numeric arguments can be passed as well. For example, to
345insert five f's, use @kbd{C-u 5 f}. There is a default of four when
346using @kbd{C-u}, and you can use multiple prefix arguments to provide
347arguments of powers of four. To continue our example, you could insert
348four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with
349@kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative
350arguments can also be inserted with the @key{META} key. Examples
351include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which
352specifies a negative argument with no particular value.
353
354@sp 1
355@center @strong{NOTE}
356
357@quotation
358The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder
359mode (@pxref{Reading Mail Tour}). In this mode, simply enter the
360numerical argument before entering the command.
361@end quotation
362@sp 1
363
364@cindex @file{.emacs}
365@cindex Emacs, variables
366@cindex files, @file{.emacs}
367@cindex variables
368@findex setq
369
370Emacs uses @dfn{variables} to hold values. These can be changed via
371calls to the function @code{setq} in @file{~/.emacs}.
372
373@cindex Emacs, options
374@cindex options
375@findex customize-group
376@findex customize-option
377
378Variables in MH-E that are normally modified by the user are called
379@dfn{options} and are modified through the customize functions (such
380as @kbd{M-x customize-option} or @kbd{M-x customize-group}).
381@ifnothtml
382@xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
383GNU Emacs Manual}.
384@end ifnothtml
385@ifhtml
386See section
387@uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html,
388Easy Customization} in @cite{The GNU Emacs Manual}.
389@end ifhtml
390@xref{Options}.
391
392@cindex Emacs, faces
393@cindex faces
394@cindex highlighting
395@findex customize-face
396
397You can specify various styles for displaying text using @dfn{faces}.
398MH-E provides a set of faces that you can use to personalize the look
399of your MH-E buffers. Use the command @kbd{M-x customize-face} to do
400this.
401@ifnothtml
402@xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The
403GNU Emacs Manual}.
404@end ifnothtml
405@ifhtml
406See section
407@uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html,
408Face Customization} in @cite{The GNU Emacs Manual}.
409@end ifhtml
410
411@cindex abnormal hooks
412@cindex hooks
413@cindex normal hooks
414@findex add-hook
415@findex customize-option
416
417Commands often offer @dfn{hooks} which enable you to extend or modify
418the way a command works.
419@ifnothtml
420@ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU
421Emacs Manual}
422@end ifnothtml
423@ifhtml
424See section
425@uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html,
426Hooks} in @cite{The GNU Emacs Manual}
427@end ifhtml
428for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
429MH-E uses normal hooks in nearly all cases, so you can assume that we
430are talking about normal hooks unless we explicitly mention that a
431hook is abnormal. We also follow the conventions described in that
432section: the name of the abnormal hooks end in @code{-hooks} and all
433the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
434either @code{customize-option} or @code{add-hook}.
435
436@cindex Emacs, mark
437@cindex Emacs, point
438@cindex Emacs, region
439@cindex mark
440@cindex point
441@cindex region
442@kindex C-@@
443@kindex C-@key{SPC}
444
445There are several other terms that are used in Emacs that you should
446know. The @dfn{point} is where the cursor currently is. You can save
447your current place in the file by setting a @dfn{mark}. This operation
448is useful in several ways. The mark can be later used when defining a
449@dfn{region}, which is the text between the point and mark. Many
450commands operate on regions, such as those for deleting text or
451filling paragraphs. A mark can be set with @kbd{C-@@} (or
452@kbd{C-@key{SPC}}).
453
454@cindex completion
455@cindex Emacs, completion
456@cindex Emacs, file completion
457@cindex Emacs, folder completion
458@cindex Emacs, minibuffer
459@cindex file completion
460@cindex folder completion
461@cindex minibuffer
462@kindex SPC
463@kindex TAB
464
465The @dfn{minibuffer} is the bottom line of the Emacs window, where all
466prompting and multiple-character input is directed. You can use
467@dfn{completion} to enter values such as folders. Completion means
468that Emacs fills in text for you when you type @key{SPC} or @key{TAB}.
469A second @key{SPC} or @key{TAB} will list all possibilities at that
470point.
471@ifnothtml
472@xref{Completion, , Completion, emacs, The GNU Emacs Manual}.
473@end ifnothtml
474@ifhtml
475See the section
476@uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
477Completion} in @cite{The GNU Emacs Manual}.
478@end ifhtml
479Note that @key{SPC} cannot be used for completing filenames and
480folders.
481
482@findex help-with-tutorial
483@kindex C-h t
484@kindex M-x
485
486The minibuffer is also where you enter Emacs function names after
487typing @kbd{M-x}. For example, in the preface, I mentioned that you
488could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What
489this means is that you can get a tutorial by typing either @kbd{C-h t}
490or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted
491for @samp{help-with-tutorial} in the minibuffer after typing
492@kbd{M-x}.
493
494@cindex ~
495
496The @samp{~} notation in filenames represents your home directory.
497This notation is used by many shells including @command{bash},
498@code{tcsh}, and @command{csh}. It is analogous to the environment
499variable @samp{$HOME}. For example, @file{~/.emacs} can be written
500@file{$HOME/.emacs} or using the absolute path as in
501@file{/home/wohler/.emacs} instead.
502
503@cindex Emacs, interrupting
504@cindex Emacs, quitting
505@cindex interrupting
506@cindex quitting
507
508@i{In case of trouble:} Emacs can be interrupted at any time with
509@kbd{C-g}. For example, if you've started a command that requests that
510you enter something in the minibuffer, but then you change your mind,
511type @kbd{C-g} and you'll be back where you started. If you want to
512exit Emacs entirely, use @kbd{C-x C-c}.
513
514@node Getting Started, Tour Through MH-E, Conventions, Top
515@chapter Getting Started
516
517@cindex MH-E, versions
518@cindex history
519@cindex versions of MH-E
520
521Because there are many old versions of MH-E out there, it is important
522to know which version you have. I'll be talking about @w{Version 8}
523which is pretty close to @w{Version 6} and @w{Version 7}. It differs
524from @w{Version 4} and @w{Version 5} and is vastly different from
525@w{Version 3}. @xref{History}.
526
527@findex mh-version
528
529To determine which version of MH-E that you have, enter @kbd{M-x
530mh-version @key{RET}}. Hopefully it says that you're running
531@w{Version @value{VERSION}} which is the latest version as of this
532printing.
533
534If your version is much older than this, please consider upgrading.
535You can have your system administrator upgrade the system-wide
536version, or you can install your own personal version. It's really
537quite easy. @xref{Getting MH-E}, for instructions for getting and
538installing MH-E.
539
540If the @code{mh-version} command displays @samp{No MH variant
541detected}@footnote{In very old versions of MH-E, you may get the error
542message, @samp{Cannot find the commands `inc' and `mhl' and the file
543`components'} if MH-E can't find MH. In this case, you need to update
544MH-E, and you may need to install MH too. However, newer versions of
545MH-E are better at finding MH if it is on your system.}, then you need
546to install MH or tell MH-E where to find MH.
547
548@cindex Debian
549@cindex nmh
8c20bd92 550@cindex GNU mailutils MH
4009494e
GM
551
552If you don't have MH on your system already, you must install a
553variant of MH. The Debian mh-e package does this for you automatically
554(@pxref{Getting MH-E}). Most people use
555@uref{http://www.nongnu.org/nmh/, nmh}, but you may be interested in
8c20bd92
BW
556trying out @uref{http://www.gnu.org/software/mailutils/, GNU mailutils
557MH}, which supports IMAP. Your GNU/Linux distribution probably has
558packages for both of these.
4009494e
GM
559
560@cindex @command{install-mh}
561@cindex MH commands, @command{install-mh}
562@cindex MH book
563
564If you've never run MH before, you need to run @command{install-mh}
565from the shell before you continue. This sets up your personal MH
566environment@footnote{See the section
567@uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the
568MH book.}. If you don't, you'll be greeted with the error message:
569@samp{Install MH and run install-mh before running MH-E}. This is all
570you need to know about MH to use MH-E, but the more you know about MH,
571the more you can leverage its power. See the
572@uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH.
573
574@cindex @samp{Path:} MH profile component
575@cindex MH profile
576@cindex MH profile component
577@cindex MH profile component, @samp{Path:}
578
579Your MH environment includes your @dfn{MH profile} which is found in
49dbbaf2
SE
580the file @file{~/.mh_profile}, or the file named in the environment
581variable @samp{$MH}. This file contains a number of @dfn{MH
4009494e
GM
582profile components}. For example, the @samp{Path:} MH profile
583component contains the path to your mail directory, which is
584@file{~/Mail} by default.
585
586@cindex @command{mhparam}
587@cindex MH commands, @command{mhparam}
588@vindex exec-path
589@vindex mh-path
590@vindex mh-sys-path
591@vindex mh-variant
592@vindex mh-variant-in-use
593
594There are several options MH-E uses to interact with your MH
595installation. The option @code{mh-variant} specifies the variant used
596by MH-E (@pxref{Options}). The default setting of this option is
597@samp{Auto-detect} which means that MH-E will automatically choose the
8c20bd92 598first of nmh, MH, or GNU mailutils MH that it finds in the directories
4009494e
GM
599listed in @code{mh-path} (which you can customize),
600@code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at
601all, you may have to customize @code{mh-path} and add the directory in
602which the command @command{mhparam} is located. If, on the other hand,
8c20bd92 603you have both nmh and GNU mailutils MH installed (for example) and
4009494e 604@code{mh-variant-in-use} was initialized to nmh but you want to use
8c20bd92
BW
605GNU mailutils MH, then you can set @code{mh-variant} to
606@samp{gnu-mh}.
4009494e
GM
607
608@vindex mh-flists-present-flag
609@vindex mh-lib
610@vindex mh-lib-progs
611@vindex mh-progs
612
613When @code{mh-variant} is changed, MH-E resets @code{mh-progs},
614@code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and
615@code{mh-variant-in-use} accordingly.
616
617@cindex @file{.emacs}
618@cindex files, @file{.emacs}
619
620@sp 1
621@center @strong{NOTE}
622
623@quotation
624Prior to version 8, it was often necessary to set some of these
625variables in @file{~/.emacs}; now it is no longer necessary and can
626actually cause problems.
627@end quotation
628@sp 1
629
630@cindex MH profile component, @samp{Draft-Folder:}
631@cindex MH profile component, @samp{Path:}
632@cindex MH profile component, @samp{Previous-Sequence:}
633@cindex MH profile component, @samp{Unseen-Sequence:}
634@cindex @samp{Draft-Folder:} MH profile component
635@cindex @samp{Path:} MH profile component
636@cindex @samp{Previous-Sequence:} MH profile component
637@cindex @samp{Unseen-Sequence:} MH profile component
638@findex mh-find-path
639@vindex mh-draft-folder
640@vindex mh-find-path-hook
641@vindex mh-inbox
642@vindex mh-previous-seq
643@vindex mh-unseen-seq
644@vindex mh-user-path
645
646In addition to setting variables that point to MH itself, MH-E also
647sets a handful of variables that point to where you keep your mail.
648During initialization, the function @code{mh-find-path} sets
649@code{mh-user-path} from your @samp{Path:} MH profile component (but
650defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder}
651from @samp{Draft-Folder:}, @code{mh-unseen-seq} from
652@samp{Unseen-Sequence:}, @code{mh-previous-seq} from
653@samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:}
654(defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run
655after these variables have been set. This hook can be used the change
656the value of these variables if you need to run with different values
657between MH and MH-E.
658
659@node Tour Through MH-E, Using This Manual, Getting Started, Top
660@chapter Tour Through MH-E
661
662@cindex introduction
663@cindex tour
664@cindex tutorial
665
666This chapter introduces some of the terms you'll need to know and then
667takes you on a tour of MH-E@footnote{The keys mentioned in these
668chapters refer to the default key bindings. If you've changed the
669bindings, refer to the command summaries at the beginning of each
670chapter for a mapping between default key bindings and function
671names.}. When you're done, you'll be able to send, read, and file
672mail, which is all that a lot of people ever do. But if you're the
673curious or adventurous type, read the rest of the manual to be able to
674use all the features of MH-E. I suggest you read this chapter first to
675get the big picture, and then you can read the manual as you wish.
676
677@menu
678* Sending Mail Tour::
679* Reading Mail Tour::
680* Processing Mail Tour::
681* Leaving MH-E::
682* More About MH-E::
683@end menu
684
685@node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E
686@section Sending Mail
687
688@cindex MH-Letter mode
689@cindex mode
690@cindex modes, MH-Letter
691@cindex sending mail
692@findex mh-smail
693@kindex M-x mh-smail
694
695Let's start our tour by sending ourselves a message which we can later
696read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
697to send messages. Your message appears in an Emacs buffer whose
698mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a
699particular type of text.} is MH-Letter.
700
701Enter your login name in the @samp{To:} header field. Press the
702@key{TAB} twice to move the cursor past the @samp{Cc:} field, since no
703carbon copies are to be sent, and on to the @samp{Subject:} field.
704Enter @kbd{Test} or anything else that comes to mind.
705
706Press @key{TAB} again to move the cursor to the body of the message.
707Enter some text, using normal Emacs commands. You should now have
708something like this@footnote{If you're running Emacs under the X
709Window System, then you would also see a menu bar and a tool bar. I've
710left out the menu bar and tool bar in all of the example screens.}:
711
712@cartouche
713@smallexample
714
715
716
717
718
719
720--:-- *scratch* All L1 (Lisp Interaction)-------------------------
721To: wohler
722cc:
723Subject: Test
3cf38f97 724X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1
4009494e
GM
725--------
726This is a test message to get the wheels churning...#
727
728
729--:** @{draft@} All L5 (MH-Letter)----------------------------------
730Type C-c C-c to send message, C-C ? for help
731@end smallexample
732@end cartouche
733@i{MH-E message composition window}
734
735Note the line of dashes that separates the header and the body of the
736message. It is essential that these dashes (or a blank line) are
737present or the body of your message will be considered to be part of
738the header.
739
740@cindex help
741@findex describe-mode
742@kindex C-c ?
743@kindex C-c C-c
744@kindex C-h m
745
746There are several commands specific to MH-Letter mode@footnote{You can
747get quick help for the commands used most often with @kbd{C-c ?} or
748more complete help with the @kbd{C-h m} (@code{describe-mode})
749command.}, but at this time we'll only use @kbd{C-c C-c} to send your
750message. Type @kbd{C-c C-c} now. That's all there is to it!
751
752@node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E
753@section Receiving Mail
754
755@cindex @command{inc}
756@cindex @command{scan}
757@cindex MH commands, @command{inc}
758@cindex MH commands, @command{scan}
759@cindex MH-Folder mode
760@cindex modes, MH-Folder
761@cindex reading mail
762@findex mh-rmail
763@kindex M-x mh-rmail
764
765To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
766This incorporates the new mail and puts the output from
767@command{inc}@footnote{See the section
768@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
769prev} in the MH book.} (called @dfn{scan lines} after the MH program
770@command{scan}@footnote{See the section
771@uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan
772pick Ranges Sequences} in the MH book.} which prints a one-line
773summary of each message) into a buffer called @samp{+inbox} whose
774major mode is MH-Folder.
775
776@findex mh-rmail
777@kindex F r
778@kindex M-x mh-rmail
779
780@sp 1
781@center @strong{NOTE}
782
783@quotation
784
785The @kbd{M-x mh-rmail} command will show you only new mail, not mail
786you have already read. If you were to run this tour again, you would
787use @kbd{F r} to pull all your messages into MH-E.
788@end quotation
789@sp 1
790
791@kindex @key{RET}
792@kindex n
793@kindex p
794
795You should see the scan line for your message, and perhaps others. Use
796@kbd{n} or @kbd{p} to move the cursor to your test message and type
797@key{RET} to read your message. You should see something like:
798
799@cartouche
800@smallexample
801 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
802# 4+t08/24 To:wohler Test<<This is a test message to get the wheels
803
804-:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------
805To: wohler
806Subject: Test
3cf38f97 807X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1
4009494e
GM
808Date: Fri, 17 Mar 2006 10:49:11 -0800
809From: Bill Wohler <wohler@@stop.mail-abuse.org>
810
811This is a test message to get the wheels churning...
812
813
814
815--:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
816
817@end smallexample
818@end cartouche
819@i{After incorporating new messages}
820
821@kindex @key{DEL}
822@kindex @key{SPC}
823
824If you typed a long message, you can view subsequent pages with
825@key{SPC} and previous pages with @key{DEL}.
826
827@node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E
828@section Processing Mail
829
830@cindex processing mail
831@kindex @key{RET}
832@kindex r
833
834The first thing we want to do is reply to the message that we sent
835ourselves. Ensure that the cursor is still on the same line as your
836test message and type @kbd{r}. You are prompted in the minibuffer with
837@samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply
838to the original sender only, to the sender and primary recipients, or
839to the sender and all recipients. You can press @key{TAB} to see these
840choices. If you simply press @key{RET}, you'll reply only to the
841sender. Press @key{RET} now.
842
843You'll find yourself in an Emacs buffer similar to that when you were
844sending the original message, like this:
845
846@cartouche
847@smallexample
848To:
849cc:
850Subject: Re: Test
851In-reply-to: <31054.1142621351@@stop.mail-abuse.org>
852References: <31054.1142621351@@stop.mail-abuse.org>
853Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org>
854 message dated "Fri, 17 Mar 2006 10:49:11 -0800."
3cf38f97 855X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1
4009494e
GM
856--------
857#
858
859--:-- @{draft@} All L10 (MH-Letter)----------------------------------
860To: wohler
861Subject: Test
3cf38f97 862X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1
4009494e
GM
863Date: Fri, 17 Mar 2006 10:49:11 -0800
864From: Bill Wohler <wohler@@stop.mail-abuse.org>
865
866This is a test message to get the wheels churning...
867
868--:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
869Type C-c C-c to send message, C-c ? for help
870@end smallexample
871@end cartouche
872@i{Composition window during reply}
873
874@findex backward-char
875@findex forward-char
876@findex next-line
877@findex previous-line
878@kindex C-b
879@kindex C-c C-c
880@kindex C-c C-f C-t
881@kindex C-f
882@kindex C-n
883@kindex C-p
884@kindex @key{BS}
885
886By default, MH will not add you to the address list of your replies,
887so if you find that the @samp{To:} header field is missing, don't
888worry. In this case, type @kbd{C-c C-f C-t} to create and go to the
889@samp{To:} field, where you can type your login name again. You can
890move around with the arrow keys or with @kbd{C-p}
891(@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b}
892(@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can
893delete the previous character with @key{BS}. When you're finished
894editing your message, send it with @kbd{C-c C-c} as before.
895
896@cindex @command{refile}
897@cindex MH commands, @command{refile}
898@cindex folders
899@kindex @key{SPC}
900@kindex o
901
902You'll often want to save messages that were sent to you in an
903organized fashion. This is done with @dfn{folders}. You can use
904folders to keep messages from your friends, or messages related to a
905particular topic. With your cursor in the MH-Folder buffer and
906positioned on the message you sent to yourself, type @kbd{o} to output
907(@command{refile} in MH parlance) that message to a folder. Enter
908@kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y}
909(or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note
910that a @samp{^} (caret) appears next to the message number, which
911means that the message has been marked for refiling but has not yet
912been refiled. We'll talk about how the refile is actually carried out
913in a moment.
914
915@cindex MH-Folder mode
916@cindex modes, MH-Folder
917@kindex d
918@kindex i
919@kindex @key{RET}
920@kindex n
921@kindex p
922@kindex x
923
924Your previous reply is now waiting in the system mailbox. You
925incorporate this mail into your MH-Folder buffer named @samp{+inbox}
926with the @kbd{i} command. Do this now. After the mail is incorporated,
927use @kbd{n} or @kbd{p} to move the cursor to the new message, and read
928it with @key{RET}. Let's delete this message by typing @kbd{d}. Note
929that a @samp{D} appears next to the message number. This means that
930the message is marked for deletion but is not yet deleted. To perform
931the deletion (and the refile we did previously), use the @kbd{x}
932command.
933
934@findex mh-smail
935@kindex m
936@kindex M-x mh-smail
937
938If you want to send another message you can use @kbd{m} instead of
939@kbd{M-x mh-smail}. So go ahead, send some mail to your friends!
940
941@cindex help
942@cindex prefix characters
943@findex describe-mode
944@kindex ?
945@kindex C-h m
946@kindex F ?
947
948You can get a quick reminder about these commands by typing @kbd{?}.
949This lists several @dfn{prefix characters}. To list the commands
950available via the prefix characters, type the prefix character
951followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is
952available with the @kbd{C-h m} (@code{describe-mode}) command.
953
954@node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E
955@section Leaving MH-E
956
957@cindex Emacs, quitting
958@cindex quitting
959@kindex C-x C-c
960@kindex x
961
962You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c}
963to exit @command{emacs}. If you exited without running @kbd{x} in the
964@samp{+inbox} buffer, Emacs will offer to save it for you. Type
965@kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to
966perform any refiles and deletes that you did there.
967
968@findex mh-rmail
969@kindex C-x b
970@kindex C-x k
971@kindex M-x mh-rmail
972@kindex q
973
974If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
975the MH-E folder or delete it entirely with @kbd{C-x k}. You can then
976later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}.
977
978@cindex @command{packf}
979@cindex MH commands, @command{packf}
980@cindex exporting folders
981@cindex folders, exporting
982@cindex mbox-style folder
983
984On the other hand, if you no longer want to use MH and MH-E, you can
985take your mail with you. You can copy all of your mail into a single
986file, mbox-style, by using the MH command @command{packf}. For
987example, to create a file called @file{msgbox} with the messages in
988your @samp{+inbox} folder, use @samp{packf +inbox}. The
989@command{packf} command will append the messages to the file if it
990already exists, so you can use @samp{folders -recurse -fast} in a
991script to copy all of your messages into a single file, or using the
992@samp{-file} argument, a file for each folder.
993
994@node More About MH-E, , Leaving MH-E, Tour Through MH-E
995@section More About MH-E
996
997These are the basic commands to get you going, but there are plenty
998more. If you think that MH-E is for you, read the rest of the manual
999to find out how you can:
1000
1001@itemize @bullet
1002@item
1003Print your messages (@pxref{Printing}).
1004@c -------------------------
1005@item
1006Edit messages and include your signature (@pxref{Editing Drafts}).
1007@c -------------------------
1008@item
1009Forward messages (@pxref{Forwarding}).
1010@c -------------------------
1011@item
1012Read digests (@pxref{Digests}).
1013@c -------------------------
1014@item
1015Edit bounced messages (@pxref{Editing Again}).
1016@c -------------------------
1017@item
1018Send multimedia messages (@pxref{Adding Attachments}).
1019@c -------------------------
1020@item
1021Read HTML messages (@pxref{HTML}).
1022@c -------------------------
1023@item
1024Use aliases and identities (see @ref{Aliases}, @pxref{Identities}).
1025@c -------------------------
1026@item
1027Create different views of your mail (see @ref{Threading}, @pxref{Limits}).
1028@c -------------------------
1029@item
1030Deal with junk mail (@pxref{Junk}).
1031@c -------------------------
1032@item
1033Handle signed and encrypted messages (see @ref{Reading PGP},
1034@pxref{Sending PGP}).
1035@c -------------------------
1036@item
1037Process mail that was sent with @command{shar} or @command{uuencode}
1038(@pxref{Files and Pipes}).
1039@c -------------------------
1040@item
1041Use sequences conveniently (@pxref{Sequences}).
1042@c -------------------------
1043@item
1044Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool
1045Bar}, @pxref{Menu Bar}).
1046@c -------------------------
1047@item
1048Show header fields in different fonts (@pxref{Reading Mail}).
1049@c -------------------------
1050@item
1051Find previously refiled messages (@pxref{Searching}).
1052@c -------------------------
1053@item
1054Place messages in a file (@pxref{Files and Pipes}).
1055@end itemize
1056
1057Remember that you can also use MH commands when you're not running
1058MH-E (and when you are!).
1059
1060@node Using This Manual, Incorporating Mail, Tour Through MH-E, Top
1061@chapter Using This Manual
1062
1063This chapter begins the meat of the manual which goes into more detail
1064about every MH-E command and option.
1065
1066@cindex Emacs, info
1067@cindex Emacs, online help
1068@cindex info
1069@cindex online help
1070@findex describe-mode
1071@findex mh-help
1072@kindex ?
1073@kindex C-c ?
1074@kindex C-h C-h
1075@kindex C-h C-k i
1076@kindex C-h i
1077@kindex C-h m
1078
1079There are many commands, but don't get intimidated. There are command
1080summaries at the beginning of each chapter. In case you have or would
1081like to rebind the keys, the command summaries also list the
1082associated Emacs Lisp function. Furthermore, even if you're stranded
1083on a desert island with a laptop and are without your manuals, you can
1084get a summary of all these commands with GNU Emacs online help: use
1085@kbd{C-h m} (@code{describe-mode}) for a brief summary of commands,
1086@kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This
1087help appears in a buffer called @samp{*MH-E Help*}
1088(@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h
1089i} to read this manual via Info. The online help is quite good; try
1090running @kbd{C-h C-h}. This brings up a list of available help topics,
1091one of which displays the documentation for a given key (like @kbd{C-h
1092k C-n}). Another useful help feature is to view the manual section
1093that describes a given key (such as @kbd{C-h K i}). In addition,
1094review @ref{Conventions}, if any of the GNU Emacs conventions are
1095strange to you.
1096
1097In addition to all of the commands, it is also possible to reconfigure
1098MH-E to fit the needs of even the most demanding user. The following
1099chapters also describe all of the options, show the defaults, and make
1100recommendations for customization.
1101
1102However, when customizing your mail environment, first try to change
1103what you want in MH, and only change MH-E if changing MH is not
1104possible. That way you will get the same behavior inside and outside
1105GNU Emacs. Note that MH-E does not provide hooks for customizations
1106that can be done in MH; this omission is intentional.
1107
1108@cindex Emacs Lisp Manual
1109@cindex Emacs, Emacs Lisp Manual
1110@cindex Emacs, info
1111@cindex Emacs, online help
1112@cindex info
1113@cindex online help
1114
1115I hope I've included enough examples here to get you well on your way.
1116If you want to explore Emacs Lisp further, a programming manual does
1117exist,
1118@c Yes, some of the stuff in the following sections is redundant, but
1119@c TeX barfs if the @ifs are inside the @footnote.
1120@iftex
1121@footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
1122online in the Info system by typing @kbd{C-h i m Emacs Lisp
1123@key{RET}}. It is also available online at @*
1124@uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1125can also order a printed manual, which has the desirable side-effect
1126of helping to support the Free Software Foundation which made all this
1127great software available. You can find an order form by running
1128@kbd{C-h C-d}, or you can request an order form from @i{gnu at
1129gnu.org}.}
1130@end iftex
1131@ifinfo
1132@footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU
1133Emacs Lisp Reference Manual}, which may be available online in the
1134Info system. It is also available online at
1135@uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You
1136can also order a printed manual, which has the desirable side-effect
1137of helping to support the Free Software Foundation which made all this
1138great software available. You can find an order form by running
1139@kbd{C-h C-d}, or you can request an order form from @i{gnu at
1140gnu.org}.}
1141@end ifinfo
1142@ifhtml
1143@footnote{The
1144@uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/,
1145The GNU Emacs Lisp Reference Manual} may also be available online in
1146the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can
1147also order a printed manual, which has the desirable side-effect of
1148helping to support the Free Software Foundation which made all this
1149great software available. You can find an order form by running
1150@kbd{C-h C-d}, or you can request an order form from @i{gnu at
1151gnu.org}.}
1152@end ifhtml
1153and you can look at the code itself for examples. Look in the Emacs
1154Lisp directory on your system (such as
1155@file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
1156files there. When calling MH-E and other Emacs Lisp functions directly
1157from Emacs Lisp code, you'll need to know the correct arguments. Use
1158the online help for this. For example, try @kbd{C-h f
1159mh-execute-commands @key{RET}}. If you write your own functions,
1160please do not prefix your symbols (variables and functions) with
1161@samp{mh-}. This prefix is reserved for the MH-E package. To avoid
1162conflicts with existing MH-E symbols, use a prefix like @samp{my-} or
1163your initials. (Unless, of course, your initials happen to be @emph{mh}!)
1164
1165@menu
1166* Options::
1167* Ranges::
1168* Folder Selection::
1169@end menu
1170
1171@node Options, Ranges, Using This Manual, Using This Manual
1172@section Options
1173
1174@cindex Emacs, customizing
1175@cindex Emacs, setting options
1176@cindex customizing MH-E
1177@cindex setting options
1178@findex customize-option
1179@vindex mh-lpr-command-format, example
1180
1181Many string or integer options are easy to modify using @kbd{M-x
1182customize-option}. For example, to modify the option that controls
1183printing, you would run @kbd{M-x customize-option @key{RET}
1184mh-lpr-command-format @key{RET}}. In the buffer that appears, modify
1185the string to the right of the variable. For example, you may change
1186the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then
1187use the @samp{State} combo box and select @samp{Save for Future
1188Sessions}. To read more about @code{mh-lpr-command-format}, see
1189@ref{Printing}.
1190
1191@cindex nil
1192@cindex off, option
1193@cindex on, option
1194@cindex option, turning on and off
1195@cindex t
1196@findex customize-option
1197@vindex mh-bury-show-buffer-flag, example
1198
1199Options can also hold boolean values. In Emacs Lisp, the boolean
1200values are @code{nil}, which means false, and @code{t}, which means
1201true. The @code{customize-option} function makes it easy to change
1202boolean values; simply click on the toggle button in the customize
1203buffer to switch between @samp{on} (@code{t}) and @samp{off}
1204(@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag}
1205to @samp{off} to keep the MH-Show buffer at the top of the buffer
1206stack. Use the @samp{State} combo box and choose @samp{Set for Current
1207Session} to see how the option affects the show buffer. Then choose
1208the @samp{Erase Customization} menu item to reset the option to the
1209default, which places the MH-Show buffer at the bottom of the buffer
1210stack.
1211
1212@vindex mh-mhl-format-file, example
1213
1214The text usually says to turn on an option by setting it to a
1215@emph{non-@code{nil}} value, because sometimes values other than
1216@samp{on} are meaningful. An example of this is the variable
1217@code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as
1218hooks, involve a little more Emacs Lisp programming expertise.
1219
1220@cindex customization group, @samp{mh}
1221@cindex @samp{mh} customization group
1222@findex customize-group
1223@findex mh-customize
1224
1225You can browse all of the MH-E options with the @code{customize-group}
1226function. Try entering @kbd{M-x customize-group @key{RET} mh
1227@key{RET}} to view the top-level options as well as buttons for all of
1228the MH-E customization groups. Another way to view the MH-E
1229customization group is to use @kbd{M-x mh-customize @key{RET}}.
1230
1231@node Ranges, Folder Selection, Options, Using This Manual
1232@section Ranges
1233
1234@c Sync with mh-folder-mode docstring.
1235
1236@cindex message abbreviations
1237@cindex message ranges
1238@cindex ranges
1239
1240Many commands that operate on individual messages, such as
1241@code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE}
1242argument. This argument can be used in several ways.
1243
1244@kindex C-u, with ranges
1245
1246If you provide the prefix argument @kbd{C-u} to these commands, then
1247you will be prompted for the message range. This can be any valid MH
1248range which can include messages, sequences (@pxref{Sequences}), and
1249the abbreviations (described in the @command{mh}(1) man page):
1250
1251@table @samp
1252@item <num1>-<num2>
1253Indicates all messages in the range <num1> to <num2>, inclusive. The
1254range must be nonempty.
1255@c -------------------------
1256@item <num>:N
1257@itemx <num>:+N
1258@itemx <num>:-N
1259Up to N messages beginning with (or ending with) message num. Num may
1260be any of the predefined symbols: first, prev, cur, next or last.
1261@c -------------------------
1262@item first:N
1263@itemx prev:N
1264@itemx next:N
1265@itemx last:N
1266The first, previous, next or last messages, if they exist.
1267@c -------------------------
1268@item all
1269All of the messages.
1270@end table
1271
1272For example, a range that shows all of these things is @samp{1 2 3
12735-10 last:5 unseen}.
1274
1275@vindex transient-mark-mode
1276
1277If the option @code{transient-mark-mode} is turned on and you set a
1278region in the MH-Folder buffer, then the MH-E command will perform the
1279operation on all messages in that region.
1280
1281@cindex @samp{mh-range} customization group
1282@cindex customization group, @samp{mh-range}
1283
1284The @samp{mh-range} customization group contains a single option which
1285affects how ranges are interpreted.
1286
1287@vtable @code
1288@item mh-interpret-number-as-range-flag
1289On means interpret a number as a range (default: @samp{on}).
1290@end vtable
1291
1292@vindex mh-interpret-number-as-range-flag
1293
1294Since one of the most frequent ranges used is @samp{last:N}, MH-E will
1295interpret input such as @samp{200} as @samp{last:200} if the
1296@code{mh-interpret-number-as-range-flag} option is on (which is the
1297default). If you need to scan just the message 200, then use the range
1298@samp{200:1} or @samp{200-200}.
1299
1300@node Folder Selection, , Ranges, Using This Manual
1301@section Folder Selection
1302
1303@cindex completion, folders
1304@cindex folders, completion
1305@cindex folders, selecting
1306
1307When you choose a folder in MH-E via a command such as @kbd{o}
1308(@code{mh-refile-msg}), completion is used to enter the folder
1309@ifnothtml
1310(@pxref{Completion, , , emacs, The GNU Emacs Manual}).
1311@end ifnothtml
1312@ifhtml
1313(see the section
1314@uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html,
1315Completion} in @cite{The GNU Emacs Manual}).
1316@end ifhtml
1317In addition, MH-E has several ways of choosing a suitable default so
1318that the folder can often be selected with a single @key{RET} key.
1319
1320@cindex customization group, @samp{mh-folder-selection}
1321@cindex @samp{mh-folder-selection} customization group
1322
1323The @samp{mh-folder-selection} customization group contains some
1324options which are used to help with this.
1325
1326@vtable @code
1327@item mh-default-folder-for-message-function
1328Function to select a default folder for refiling or @samp{Fcc:}
1329(default: @code{nil}).
1330@c -------------------------
1331@item mh-default-folder-list
1332List of addresses and folders (default: @code{nil}).
1333@c -------------------------
1334@item mh-default-folder-must-exist-flag
1335On means guessed folder name must exist to be used (default:
1336@samp{on}).
1337@c -------------------------
1338@item mh-default-folder-prefix
1339Prefix used for folder names generated from aliases (default: @code{""}).
1340@end vtable
1341
1342@vindex mh-default-folder-for-message-function
1343
1344You can set the option @code{mh-default-folder-for-message-function}
1345to a function that provides a default folder for the message to be
1346refiled. When this function is called, the current buffer contains the
1347message being refiled and point is at the start of the message. This
1348function should return the default folder as a string with a leading
1349@samp{+} sign. It can also return @code{nil} so that the last folder
1350name is used as the default, or an empty string to suppress the
1351default entirely.
1352
1353Otherwise, the name of the destination folder is derived from the
1354sender as follows:
1355
1356@enumerate
1357@vindex mh-default-folder-list
1358@item
1359The folder name associated with the first address found in the list
1360@code{mh-default-folder-list} is used. Each element in this list
1361contains a @samp{Check Recipient} item. If this item is turned on,
1362then the address is checked against the recipient instead of the
1363sender. This is useful for mailing lists.
1364@c -------------------------
1365@vindex mh-default-folder-prefix
1366@item
1367An alias prefixed by @code{mh-default-folder-prefix} corresponding to
1368the address is used. The prefix is used to prevent clutter in your
1369mail directory. @xref{Aliases}.
1370@end enumerate
1371
1372@vindex mh-default-folder-must-exist-flag
1373
1374If the derived folder does not exist, and
1375@code{mh-default-folder-must-exist-flag} is @code{t}, then the last
1376folder name used is suggested. This is useful if you get mail from
1377various people for whom you have an alias, but file them all in the
1378same project folder.
1379
1380@node Incorporating Mail, Reading Mail, Using This Manual, Top
1381@chapter Incorporating Your Mail
1382
1383@cindex @samp{Folder} menu
1384@cindex incorporating
1385@cindex menu, @samp{Folder}
1386
1387This chapter talks about getting mail from your system mailbox into
1388your MH @samp{+inbox} folder. The following command accomplishes that
1389and is found in the @samp{Folder} menu.
1390
1391@table @kbd
1392@cindex @samp{Folder > Incorporate New Mail} menu item
1393@cindex menu item, @samp{Folder > Incorporate New Mail}
1394@findex mh-inc-folder
1395@kindex i
1396@item i
1397Incorporate new mail into a folder (@code{mh-inc-folder}).
1398@end table
1399
1400@cindex @samp{mh-inc} customization group
1401@cindex customization group, @samp{mh-inc}
1402
1403The following options in the @samp{mh-inc} customization group are
1404used.
1405
1406@vtable @code
1407@item mh-inc-prog
1408Program to incorporate mail (default: @code{"inc"}).
1409@c -------------------------
1410@item mh-inc-spool-list
1411Alternate spool files (default: @code{nil}).
1412@end vtable
1413
1414The following hook is available.
1415
1416@vtable @code
1417@findex mh-inc-folder
1418@item mh-inc-folder-hook
1419Hook run by @code{mh-inc-folder} after incorporating mail into a
1420folder (default: @code{nil}).
1421@end vtable
1422
1423@cindex @samp{+inbox}
1424@findex mh-inc-folder
1425@kindex i
1426
1427If at any time you receive new mail, incorporate the new mail into
1428your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note
1429that @kbd{i} will display the @samp{+inbox} buffer, even if there
1430isn't any new mail. You can incorporate mail from any file into the
1431current folder by specifying a prefix argument; you'll be prompted for
1432the name of the file to use as well as the destination folder (for
1433example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}).
1434
1435@cindex @file{.emacs}
1436@cindex Emacs, notification of new mail
1437@cindex files, @file{.emacs}
1438@cindex new mail
1439@cindex notification of new mail
1440
1441Emacs can notify you when you have new mail by displaying @samp{Mail}
1442in the mode line. To enable this behavior, and to have a clock in the
1443mode line as well, add the following to @file{~/.emacs}:
1444
1445@findex display-time
1446
1447@smalllisp
1448(display-time)
1449@end smalllisp
1450
1451@cindex @command{inc}
1452@cindex incorporating
1453@cindex MH commands, @command{inc}
1454@vindex mh-inc-prog
1455@vindex mh-progs
1456
1457The name of the program that incorporates new mail is stored in
1458@code{mh-inc-prog}; it is @code{"inc"} by default. This program
1459generates a one-line summary for each of the new messages. Unless it
1460is an absolute pathname, the file is assumed to be in the
1461@code{mh-progs} directory (@pxref{Getting Started}). You may also link
1462a file to @command{inc} that uses a different format (see
1463@samp{mh-profile}(5), and sections
1464@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
1465prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in
1466the MH book). You'll then need to modify several variables
1467appropriately (@pxref{Scan Line Formats}).
1468
1469@vindex mh-inc-spool-list
1470
1471You can use the @code{mh-inc-spool-list} variable to direct MH-E to
1472retrieve mail from arbitrary spool files other than your system
1473mailbox, file it in folders other than your @samp{+inbox}, and assign
1474key bindings to incorporate this mail.
1475
1476@cindex @command{procmail}
1477@cindex @file{.procmailrc}
1478@cindex Unix commands, @command{procmail}
1479@cindex files, @file{.procmailrc}
1480
1481Suppose you are subscribed to the @i{mh-e-devel} mailing list and you
1482use @command{procmail} to filter this mail into @file{~/mail/mh-e}
1483with the following recipe in @file{.procmailrc}:
1484
1485@smallexample
1486PATH=$PATH:/usr/bin/mh
1487MAILDIR=$HOME/`mhparam Path`
1488:0:
1489* ^From mh-e-devel-admin@@stop.mail-abuse.org
1490mh-e
1491@end smallexample
1492
1493@findex mh-inc-spool-*
1494@kindex I *
1495
1496In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an
1497@kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option,
1498and click on the @samp{INS} button. Enter a @samp{Spool File} of
1499@samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key
1500Binding} of @samp{m}.
1501
1502@cindex @command{emacsclient}
1503@cindex @command{gnuclient}
1504@cindex @command{xbuffy}
1505@cindex @samp{gnuserv}
1506@cindex Unix commands, @command{emacsclient}
1507@cindex Unix commands, @command{gnuclient}
1508@cindex Unix commands, @command{xbuffy}
1509
1510You can use @command{xbuffy} to automate the incorporation of this
3cf38f97 1511mail using the Emacs 23 command @command{emacsclient} as follows:
4009494e
GM
1512
1513@smallexample
1514box ~/mail/mh-e
1515 title mh-e
1516 origMode
1517 polltime 10
1518 headertime 0
1519 command emacsclient --eval '(mh-inc-spool-mh-e)'
1520@end smallexample
1521
1522In XEmacs, the command @command{gnuclient} is used in a similar
1523fashion.
1524
1525@findex mh-inc-folder
1526@kindex i
1527@vindex mh-inc-folder-hook
1528
1529You can set the hook @code{mh-inc-folder-hook}, which is called after
1530new mail is incorporated by the @kbd{i} (@code{mh-inc-folder})
1531command. A good use of this hook is to rescan the whole folder either
1532after running @kbd{M-x mh-rmail} the first time or when you've changed
1533the message numbers from outside of MH-E.
1534
1535@findex mh-execute-commands
1536@findex mh-rescan-folder, example
1537@findex mh-show, example
1538@vindex mh-inc-folder-hook, example
1539
1540@smalllisp
1541@group
1542(defun my-mh-inc-folder-hook ()
1543 "Hook to rescan folder after incorporating mail."
1544 (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,}
1545 (mh-execute-commands)) ; @r{carry them out}
1546 (mh-rescan-folder) ; @r{synchronize with +inbox}
1547 (mh-show)) ; @r{show the current message}
1548
1549(add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook)
1550
1551@i{Rescan folder after incorporating new mail via mh-inc-folder-hook}
1552
1553@end group
1554@end smalllisp
1555
1556@node Reading Mail, Folders, Incorporating Mail, Top
1557@chapter Reading Your Mail
1558
1559@cindex @samp{+inbox}
1560@cindex MH-Folder mode
1561@cindex MH-Show mode
1562@cindex modes, MH-Folder
1563@cindex modes, MH-Show
1564@cindex reading mail
1565@findex mh-rmail
1566@kindex F r
1567@kindex F v
1568@kindex M-x mh-rmail
1569
1570The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This
1571command incorporates your mail and creates a buffer called
1572@samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows
1573you only new mail, not mail you have already read@footnote{If you want
1574to see your old mail as well, use @kbd{F r} to pull all your messages
1575into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will
1576prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u
1577M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}.
1578
1579@findex display-time
1580@vindex read-mail-command
1581
1582There are some commands that need to read mail, such as @kbd{Mouse-2}
1583over the @samp{Mail} button that @code{display-time} adds to the mode
1584line. You can configure Emacs to have these commands use MH-E by
1585setting the option @code{read-mail-command} to @samp{mh-rmail}.
1586
1587@cindex @command{scan}
1588@cindex @samp{Message} menu
1589@cindex MH commands, @command{scan}
1590@cindex menu, @samp{Message}
1591@cindex scan lines
1592
1593The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line
1594summaries of each incorporated message. You can perform most MH
1595commands on these messages via one- or two-letter commands in either
1596the MH-Folder or MH-Show buffers or by using the @samp{Message} menu.
1597See @command{scan}(1) for a description of the contents of the scan
1598lines, and see the Figure in @ref{Reading Mail Tour}, for an example.
1599
1600@table @kbd
1601@kindex ?
1602@findex mh-help
1603@item ?
1604Display cheat sheet for the MH-E commands (@code{mh-help}).
1605@c -------------------------
1606@cindex @samp{Message > Show Message} menu item
1607@cindex menu item, @samp{Message > Show Message}
1608@kindex @key{RET}
1609@findex mh-show
1610@item @key{RET}
1611Display message (@code{mh-show}).
1612@c -------------------------
1613@cindex @samp{Message > Show Message with Header} menu item
1614@cindex menu item, @samp{Message > Show Message with Header}
1615@kindex , (comma)
1616@findex mh-header-display
1617@item , (comma)
1618Display message with all header fields (@code{mh-header-display}).
1619@c -------------------------
bfe16263
BW
1620@cindex @samp{Message > Show Message with Preferred Alternative} menu item
1621@cindex menu item, @samp{Message > Show Message with Preferred Alternative}
1622@kindex : (colon)
1623@findex mh-show-preferred-alternative
1624@item : (colon)
1625Display message with the default preferred alternative
1626(@code{mh-show-preferred-alternative}).
1627@c -------------------------
4009494e
GM
1628@kindex ; (semicolon)
1629@findex mh-toggle-mh-decode-mime-flag
1630@item ; (semicolon)
1631Toggle the value of @code{mh-decode-mime-flag}
1632(@code{mh-toggle-mh-decode-mime-flag}).
1633@c -------------------------
1634@kindex @key{SPC}
1635@findex mh-page-msg
1636@item @key{SPC}
1637Display next page in message (@code{mh-page-msg}).
1638@c -------------------------
1639@kindex @key{BS}
1640@findex mh-previous-page
1641@item @key{BS}
1642Display previous page in message (@code{mh-previous-page}).
1643@c -------------------------
1644@cindex @samp{Message > Write Message to File...} menu item
1645@cindex menu item, @samp{Message > Write Message to File...}
1646@kindex >
1647@findex mh-write-msg-to-file
1648@item >
1649Append message to end of file (@code{mh-write-msg-to-file}).
1650@c -------------------------
1651@cindex @samp{Message > Pipe Message to Command...} menu item
1652@cindex menu item, @samp{Message > Pipe Message to Command...}
1653@kindex |
1654@findex mh-pipe-msg
1655@item |
1656Pipe message through shell command (@code{mh-pipe-msg}).
1657@c -------------------------
1658@kindex C-d
1659@findex mh-delete-msg-no-motion
1660@item C-d
1661Delete range, don't move to next message
1662(@code{mh-delete-msg-no-motion}).
1663@c -------------------------
1664@cindex @samp{Message > Delete Message} menu item
1665@cindex menu item, @samp{Message > Delete Message}
1666@kindex d
1667@findex mh-delete-msg
1668@item d
1669Delete range (@code{mh-delete-msg}).
1670@c -------------------------
1671@kindex D ?
1672@findex mh-prefix-help
1673@item D ?
1674Display cheat sheet for the commands of the current prefix in
1675minibuffer (@code{mh-prefix-help}).
1676@c -------------------------
1677@kindex D @key{SPC}
1678@findex mh-page-digest
1679@item D @key{SPC}
1680Display next message in digest (@code{mh-page-digest}).
1681@c -------------------------
1682@kindex D @key{BS}
1683@findex mh-page-digest-backwards
1684@item D @key{BS}
1685Display previous message in digest (@code{mh-page-digest-backwards}).
1686@c -------------------------
1687@cindex @samp{Message > Burst Digest Message} menu item
1688@cindex menu item, @samp{Message > Burst Digest Message}
1689@kindex D b
1690@findex mh-burst-digest
1691@item D b
1692Break up digest into separate messages (@code{mh-burst-digest}).
1693@c -------------------------
1694@cindex @samp{Message > Go to Message by Number...} menu item
1695@cindex menu item, @samp{Message > Go to Message by Number...}
1696@kindex g
1697@findex mh-goto-msg
1698@item g
1699Go to a message (@code{mh-goto-msg}).
1700@c -------------------------
1701@kindex k
1702@findex mh-delete-subject-or-thread
1703@item k
1704Delete messages with same subject or thread
1705(@code{mh-delete-subject-or-thread}).
1706@c -------------------------
1707@kindex K ?
1708@findex mh-prefix-help
1709@item K ?
1710Display cheat sheet for the commands of the current prefix in
1711minibuffer (@code{mh-prefix-help}).
1712@c -------------------------
1713@kindex K @key{TAB}
1714@findex mh-next-button
1715@item K @key{TAB}
1716Go to the next button (@code{mh-next-button}).
1717@c -------------------------
1718@kindex K S-@key{TAB}
1719@findex mh-prev-button
1720@item K S-@key{TAB}
1721Go to the previous button (@code{mh-prev-button}).
1722@c -------------------------
1723@kindex K a
1724@findex mh-mime-save-parts
1725@item K a
1726Save attachments (@code{mh-mime-save-parts}).
1727@c -------------------------
1728@kindex K e
1729@findex mh-display-with-external-viewer
1730@item K e
1731View attachment externally (@code{mh-display-with-external-viewer}).
1732@c -------------------------
1733@kindex K i
1734@findex mh-folder-inline-mime-part
1735@item K i
1736Show attachment verbatim (@code{mh-folder-inline-mime-part}).
1737@c -------------------------
1738@kindex K o
1739@findex mh-folder-save-mime-part
1740@item K o
1741Save (output) attachment (@code{mh-folder-save-mime-part}).
1742@c -------------------------
1743@kindex K t
1744@findex mh-toggle-mime-buttons
1745@item K t
1746Toggle option @code{mh-display-buttons-for-inline-parts-flag}
1747(@code{mh-toggle-mime-buttons}).
1748@c -------------------------
1749@kindex K v
1750@findex mh-folder-toggle-mime-part
1751@item K v
1752View attachment (@code{mh-folder-toggle-mime-part}).
1753@c -------------------------
1754@cindex @samp{Message > Modify Message} menu item
1755@cindex menu item, @samp{Message > Modify Message}
1756@kindex M
1757@findex mh-modify
1758@item M
1759Edit message (@code{mh-modify}).
1760@c -------------------------
1761@cindex @samp{Message > Go to First Message} menu item
1762@cindex menu item, @samp{Message > Go to First Message}
1763@kindex M-<
1764@findex mh-first-msg
1765@item M-<
1766Display first message (@code{mh-first-msg}).
1767@c -------------------------
1768@cindex @samp{Message > Go to Last Message} menu item
1769@cindex menu item, @samp{Message > Go to Last Message}
1770@kindex M->
1771@findex mh-last-msg
1772@item M->
1773Display last message (@code{mh-last-msg}).
1774@c -------------------------
1775@kindex M-n
1776@findex mh-next-unread-msg
1777@item M-n
1778Display next unread message (@code{mh-next-unread-msg}).
1779@c -------------------------
1780@kindex M-p
1781@findex mh-previous-unread-msg
1782@item M-p
1783Display previous unread message (@code{mh-previous-unread-msg}).
1784@c -------------------------
1785@cindex @samp{Message > Next Message} menu item
1786@cindex menu item, @samp{Message > Next Message}
1787@kindex n
1788@findex mh-next-undeleted-msg
1789@item n
1790Display next message (@code{mh-next-undeleted-msg}).
1791@c -------------------------
1792@cindex @samp{Message > Previous Message} menu item
1793@cindex menu item, @samp{Message > Previous Message}
1794@kindex p
1795@findex mh-previous-undeleted-msg
1796@item p
1797Display previous message (@code{mh-previous-undeleted-msg}).
1798@c -------------------------
1799@kindex P ?
1800@findex mh-prefix-help
1801@item P ?
1802Display cheat sheet for the commands of the current prefix in
1803minibuffer (@code{mh-prefix-help}).
1804@c -------------------------
1805@kindex P C
1806@findex mh-ps-print-toggle-color
1807@item P C
1808Toggle whether color is used in printing messages
1809(@code{mh-ps-print-toggle-color}).
1810@c -------------------------
1811@kindex P F
1812@findex mh-ps-print-toggle-faces
1813@item P F
1814Toggle whether printing is done with faces or not
1815(@code{mh-ps-print-toggle-faces}).
1816@c -------------------------
1817@kindex P f
1818@findex mh-ps-print-msg-file
1819@item P f
1820Print range to file (@code{mh-ps-print-msg-file}).
1821@c -------------------------
1822@cindex @samp{Message > Print Message} menu item
1823@cindex menu item, @samp{Message > Print Message}
1824@kindex P l
1825@findex mh-print-msg
1826@item P l
1827Print range the old fashioned way
1828(@code{mh-print-msg}).
1829@c -------------------------
1830@kindex P p
1831@findex mh-ps-print-msg
1832@item P p
1833Print range (@code{mh-ps-print-msg}).
1834@c -------------------------
1835@kindex X ?
1836@findex mh-prefix-help
1837@item X ?
1838Display cheat sheet for the commands of the current prefix in
1839minibuffer (@code{mh-prefix-help}).
1840@c -------------------------
1841@cindex @samp{Message > Unpack Uuencoded Message...} menu item
1842@cindex menu item, @samp{Message > Unpack Uuencoded Message...}
1843@kindex X s
1844@kindex X u
1845@findex mh-store-msg
1846@item X s
1847@itemx X u
1848Unpack message created with @command{uudecode} or @command{shar}
1849(@code{mh-store-msg}).
1850@c -------------------------
1851@kindex Mouse-2
1852@findex mh-show-mouse
1853@item Mouse-2
1854Move point to mouse event and show message (@code{mh-show-mouse}).
1855@end table
1856
1857Within the MH-Show buffer, the following command is defined.
1858
1859@table @kbd
1860@kindex @key{RET}
1861@kindex Mouse-1
1862@kindex Mouse-2
1863@findex mh-press-button
1864@item @key{RET}
1865@itemx Mouse-1
1866@itemx Mouse-2
1867View contents of button (@code{mh-press-button}).
1868@end table
1869
1870@cindex @samp{mh-show} customization group
1871@cindex customization group, @samp{mh-show}
1872
1873The following table lists options in the @samp{mh-show} customization
1874group that are used while reading mail.
1875
1876@vtable @code
1877@item mh-bury-show-buffer-flag
1878On means show buffer is buried (default: @samp{on}).
1879@c -------------------------
1880@item mh-clean-message-header-flag
1881On means remove extraneous header fields (default: @samp{on}).
1882@c -------------------------
1883@item mh-decode-mime-flag
1884On means attachments are handled (default: @samp{on} if the Gnus
1885@samp{mm-decode} package is present).
1886@c -------------------------
1887@item mh-display-buttons-for-alternatives-flag
1888On means display buttons for all alternative attachments (default:
1889@samp{off}).
1890@c -------------------------
1891@item mh-display-buttons-for-inline-parts-flag
1892On means display buttons for all inline attachments (default:
1893@samp{off}).
1894@c -------------------------
1895@item mh-do-not-confirm-flag
1896On means non-reversible commands do not prompt for confirmation
1897(default: @samp{off}).
1898@c -------------------------
1899@item mh-fetch-x-image-url
1900Control fetching of @samp{X-Image-URL:} header field image (default:
1901@samp{Never Fetch}).
1902@c -------------------------
1903@item mh-graphical-smileys-flag
1904On means graphical smileys are displayed (default: @samp{on}).
1905@c -------------------------
1906@item mh-graphical-emphasis-flag
1907On means graphical emphasis is displayed (default: @samp{on}).
1908@c -------------------------
1909@item mh-highlight-citation-style
1910Style for highlighting citations (default: @samp{Multicolor}).
1911@c -------------------------
1912@item mh-invisible-header-fields-default
1913List of hidden header fields (default: a checklist too long to list
1914here).
1915@c -------------------------
1916@item mh-invisible-header-fields
1917Additional header fields to hide (default: @code{nil}).
1918@c -------------------------
1919@item mh-lpr-command-format
1920Command used to print (default: @code{"lpr -J '%s'"}).
1921@c -------------------------
1922@item mh-max-inline-image-height
1923Maximum inline image height if @samp{Content-Disposition:} is not
1924present (default: 0).
1925@c -------------------------
1926@item mh-max-inline-image-width
1927Maximum inline image width if @samp{Content-Disposition:} is not
1928present(default: 0).
1929@c -------------------------
1930@item mh-mhl-format-file
1931Specifies the format file to pass to the @command{mhl} program
1932(default: @samp{Use Default mhl Format (Printing Only)}).
1933@c -------------------------
1934@item mh-mime-save-parts-default-directory
1935Default directory to use for @kbd{K a}.
1936@c -------------------------
1937@item mh-print-background-flag
1938On means messages should be printed in the background (default:
1939@samp{off}).
1940@c -------------------------
1941@item mh-show-buffer-mode-line-buffer-id
1942Format string to produce @code{mode-line-buffer-identification} for
1943show buffers (default: @code{" @{show-%s@} %d"}).
1944@c -------------------------
1945@item mh-show-maximum-size
1946Maximum size of message (in bytes) to display automatically (default:
19470).
1948@c -------------------------
1949@item mh-show-use-xface-flag
1950On means display face images in MH-Show buffers (default: @samp{on}).
1951@c -------------------------
1952@item mh-store-default-directory
1953Default directory for @kbd{X s} (default: @samp{Current}).
1954@c -------------------------
1955@item mh-summary-height
1956Number of lines in MH-Folder buffer (including the mode line)
1957(default: depends on size of frame).
1958@end vtable
1959
1960The following hooks are available.
1961
1962@vtable @code
1963@item mh-delete-msg-hook
1964Hook run after marking each message for deletion (default: @code{nil}).
1965@c -------------------------
1966@item mh-show-hook
1967Hook run after @key{RET} shows a message (default: @code{nil}).
1968@c -------------------------
1969@item mh-show-mode-hook
1970Hook run upon entry to @code{mh-show-mode} (default: @code{nil}).
1971@end vtable
1972
1973The following faces are available.
1974
1975@vtable @code
1976@item mh-show-cc
1977Face used to highlight @samp{cc:} header fields.
1978@c -------------------------
1979@item mh-show-date
1980Face used to highlight @samp{Date:} header fields.
1981@c -------------------------
1982@item mh-show-from
1983Face used to highlight @samp{From:} header fields.
1984@c -------------------------
1985@item mh-show-header
1986Face used to deemphasize less interesting header fields.
1987@c -------------------------
1988@item mh-show-pgg-bad
1989Bad PGG signature face.
1990@c -------------------------
1991@item mh-show-pgg-good
1992Good PGG signature face.
1993@c -------------------------
1994@item mh-show-pgg-unknown
1995Unknown or untrusted PGG signature face.
1996@c -------------------------
1997@item mh-show-signature
1998Signature face.
1999@c -------------------------
2000@item mh-show-subject
2001Face used to highlight @samp{Subject:} header fields.
2002@c -------------------------
2003@item mh-show-to
2004Face used to highlight @samp{To:} header fields.
2005@c -------------------------
2006@item mh-show-xface
2007X-Face image face.
2008@end vtable
2009
2010The functions and variables introduced here are explained in more
2011detail in the following sections.
2012
2013@menu
2014* Viewing::
2015* Viewing Attachments::
2016* HTML::
2017* Digests::
2018* Reading PGP::
2019* Printing::
2020* Files and Pipes::
2021* Navigating::
2022* Miscellaneous Commands and Options::
2023@end menu
2024
2025@node Viewing, Viewing Attachments, Reading Mail, Reading Mail
2026@section Viewing Your Mail
2027
2028@findex mh-header-display
2029@findex mh-page-msg
2030@findex mh-previous-page
2031@findex mh-show
2032@findex mh-show-mouse
2033@kindex , (comma)
2034@kindex . (period)
2035@kindex @key{BS}
2036@kindex @key{RET}
2037@kindex @key{SPC}
2038@kindex Mouse-2
2039
2040The command @key{RET} (@code{mh-show}) displays the message that the
2041cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the
2042message that the mouse cursor is on. If the message is already
2043displayed, it scrolls to the beginning of the message. Use @key{SPC}
2044(@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move
2045forwards and backwards one page at a time through the message. You can
2046give either of these commands a prefix argument that specifies the
2047number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC}
2048command will also show the next undeleted message if it is used at the
2049bottom of a message. MH-E normally hides a lot of the superfluous
2050header fields that mailers add to a message, but if you wish to see
2051all of them, use the command @kbd{,} (comma;
2052@code{mh-header-display}).
2053
2054@vindex mh-show-maximum-size
2055
2056The option @code{mh-show-maximum-size} provides an opportunity to skip
2057over large messages which may be slow to load. The default value of 0
2058means that all message are shown regardless of size.
2059
2060A litany of options control what displayed messages look like.
2061
2062@vindex mh-show-cc
2063@vindex mh-show-date
2064@vindex mh-show-from
2065@vindex mh-show-header
2066@vindex mh-show-subject
2067@vindex mh-show-to
2068
2069First, the appearance of the header fields can be modified by
2070customizing the associated face: @code{mh-show-to}, @code{mh-show-cc},
2071@code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}.
2072The face @code{mh-show-header} is used to deemphasize the other, less
2073interesting, header fields.
2074
2075@cindex regular expressions, @code{mh-invisible-header-fields}
2076@vindex mh-clean-message-header-flag
2077@vindex mh-invisible-header-fields
2078@vindex mh-invisible-header-fields-default
2079
2080Normally messages are delivered with a handful of uninteresting header
2081fields. These are hidden by turning on the option
2082@code{mh-clean-message-header-flag} (which it is by default). The
2083header fields listed in the option
2084@code{mh-invisible-header-fields-default} are hidden, although you can
2085check off any field that you would like to see. Header fields that you
2086would like to hide that aren't listed can be added to the option
2087@code{mh-invisible-header-fields} with a couple of caveats. Regular
2088expressions are not allowed. Unique fields should have a @samp{:}
2089suffix; otherwise, the element can be used to render invisible an
2090entire class of fields that start with the same prefix. If you think a
2940c053
BW
2091header field should be generally ignored, please update
2092@uref{https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357,
2093SF #1916032}.
4009494e
GM
2094
2095@cindex header field, @samp{Face:}
2096@cindex header field, @samp{X-Face:}
2097@cindex header field, @samp{X-Image-URL:}
2098@cindex @samp{Face:} header field
2099@cindex @samp{X-Face:} header field
2100@cindex @samp{X-Image-URL:} header field
2101@vindex mh-show-use-xface-flag
2102
2103MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and
2104@samp{X-Image-URL:} header fields. If any of these fields occur in the
2105header of your message, the sender's face will appear in the
2106@samp{From:} header field. If more than one of these fields appear,
2107then the first field found in the order @samp{Face:}, @samp{X-Face:},
2108and @samp{X-Image-URL:} will be used. The option
2109@code{mh-show-use-xface-flag} is used to turn this feature on and off.
2110This feature will be turned on by default if your system supports it.
2111
2112The first header field used, if present, is the Gnus-specific
2113@samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU
2114Emacs 21 and XEmacs. For more information, see
2115@uref{http://quimby.gnus.org/circus/face/}.}.
2116
2117@cindex @command{uncompface}
2118@cindex Emacs, packages, x-face
2119@cindex Unix commands, @command{uncompface}
2120@cindex x-face package
2121@vindex mh-show-xface
2122
2123Next is the traditional @samp{X-Face:} header field@footnote{The
2124display of this field requires the
2125@uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z,
2126@command{uncompface} program}. Recent versions of XEmacs have internal
2127support for @samp{X-Face:} images. If your version of XEmacs does not,
2128then you'll need both @command{uncompface} and the
2129@uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E
2130renders the foreground and background of the image using the
2131associated attributes of the face @code{mh-show-xface}.
2132
2133@cindex @command{convert}
2134@cindex @command{wget}
2135@cindex ImageMagick
2136@cindex Unix commands, @command{convert}
2137@cindex Unix commands, @command{wget}
2138@vindex mh-fetch-x-image-url
2139
2140Finally, MH-E will display images referenced by the
2141@samp{X-Image-URL:} header field if neither the @samp{Face:} nor the
2142@samp{X-Face:} fields are present@footnote{The display of the images
2143requires the @uref{http://www.gnu.org/software/wget/wget.html,
2144@command{wget} program} to fetch the image and the @command{convert}
2145program from the @uref{http://www.imagemagick.org/, ImageMagick
2146suite}.}. Of the three header fields this is the most efficient in
2147terms of network usage since the image doesn't need to be transmitted
2148with every single mail. The option @code{mh-fetch-x-image-url}
2149controls the fetching of the @samp{X-Image-URL:} header field image
2150with the following values:
2151
2152@table @samp
2153@item Ask Before Fetching
2154You are prompted before the image is fetched. MH-E will remember your
2155reply and will either use the already fetched image the next time the
2156same URL is encountered or silently skip it if you didn't fetch it the
2157first time. This is a good setting.
2158@c -------------------------
2159@item Never Fetch
2160Images are never fetched and only displayed if they are already
2161present in the cache. This is the default.
2162@end table
2163
2164There isn't a value of @samp{Always Fetch} for privacy and DOS (denial
2165of service) reasons. For example, fetching a URL can tip off a spammer
2166that you've read his email (which is why you shouldn't blindly answer
2167yes if you've set this option to @samp{Ask Before Fetching}). Someone
2168may also flood your network and fill your disk drive by sending a
2169torrent of messages, each specifying a unique URL to a very large
2170file.
2171
2172@cindex @file{.mhe-x-image-cache}
2173@cindex files, @file{.mhe-x-image-cache}
2174
2175The cache of images is found in the directory
2176@file{.mhe-x-image-cache} within your MH directory. You can add your
2177own face to the @samp{From:} field too. @xref{Picture}.
2178
2179@cindex @command{mhl}
2180@cindex MH commands, @command{mhl}
2181@vindex mh-mhl-format-file
2182
2183Normally MH-E takes care of displaying messages itself (rather than
2184calling an MH program to do the work). If you'd rather have
2185@command{mhl} display the message (within MH-E), change the option
2186@code{mh-mhl-format-file} from its default value of @samp{Use Default
2187mhl Format (Printing Only)}. You can set this option to @samp{Use
2188Default mhl Format} to get the same output as you would get if you ran
2189@command{mhl} from the shell. If you have a format file that you want
2190MH-E to use, you can set this option to @samp{Specify an mhl Format
2191File} and enter the name of your format file (@command{mhl}(1) or
2192section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in
2193the MH book tells you how to write one). Your format file should
2194specify a non-zero value for @samp{overflowoffset} to allow MH-E to
2195parse the header. Note that @command{mhl} is always used for printing
2196and forwarding; in this case, the value of @code{mh-mhl-format-file}
2197is consulted if you have specified a format file.
2198
2199@cindex citations, highlighting
2200@cindex highlighting citations
2201@vindex mh-highlight-citation-style
2202
2203If the sender of the message has cited other messages in his message,
2204then MH-E will highlight these citations to emphasize the sender's
2205actual response. The option @code{mh-highlight-citation-style} can be
2206customized to change the highlighting style. The @samp{Multicolor}
2207method uses a different color for each indentation while the
2208@samp{Monotone} method highlights all citations in red. To disable
2209highlighting of citations entirely, choose @samp{None}.
2210
2211@cindex URLs, highlighting
2212@cindex email addresses, highlighting
2213@cindex highlighting URLs
2214@cindex highlighting email addresses
2215@cindex links, following
2216@findex goto-address-at-point
2217@kindex C-c @key{RET}
2218@kindex Mouse-2
2219@vindex goto-address-highlight-p
2220
2221Email addresses and URLs in the message are highlighted if the option
2222@code{goto-address-highlight-p} is on, which it is by default. To view
2223the web page for a highlighted URL or to send a message using a
2224highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}
2225(@code{goto-address-at-point}). @xref{Sending Mail}, to see how to
2226configure Emacs to send the message using MH-E.
2227
2228@cindex boldface, showing
2229@cindex emphasis
2230@cindex italics, showing
2231@cindex smileys
2232@cindex typesetting
2233@cindex underline, showing
2234@vindex gnus-emphasis-alist
2235@vindex mh-decode-mime-flag
2236@vindex mh-graphical-emphasis-flag
2237@vindex mh-graphical-smileys-flag
2238
2239It is a long standing custom to inject body language using a
2240cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can
2241render these as graphical widgets if the option
2242@code{mh-graphical-smileys-flag} is turned on, which it is by default.
2243Smileys include patterns such as :-) and ;-). Similarly, a few
2244typesetting features are indicated in ASCII text with certain
2245characters. If your terminal supports it, MH-E can render these
2246typesetting directives naturally if the option
2247@code{mh-graphical-emphasis-flag} is turned on, which it is by
2248default. For example, _underline_ will be
2249@ifhtml
2250@html
2251<u>underlined</u>,
2252@end html
2253@end ifhtml
2254@ifnothtml
2255underlined,
2256@end ifnothtml
2257*bold* will appear in @b{bold}, /italics/ will appear in @i{italics},
2258and so on. See the option @code{gnus-emphasis-alist} for the whole
2259list. Both of these options are disabled if the option
2260@code{mh-decode-mime-flag} is turned off. @xref{Viewing Attachments}.
2261
2262@cindex signature separator
2263@cindex vCard
2264@vindex mh-show-signature
2265
2266MH-E normally renders signatures and vCards in italics so that the
2267body of the message stands out more. MH-E depends on the presence of
2268the @dfn{signature separator} (@code{"-- "}) to do this. You can also
2269customize the face @code{mh-show-signature} so the appearance of the
2270signature block is more to your liking.
2271
2272@vindex mh-show-hook
2273@vindex mh-show-mode-hook
2274
2275Two hooks can be used to control how messages are displayed. The first
2276hook, @code{mh-show-mode-hook}, is called early on in the process of
2277the message display. It is usually used to perform some action on the
2278message's content. The second hook, @code{mh-show-hook}, is the last
2279thing called after messages are displayed. It's used to affect the
2280behavior of MH-E in general or when @code{mh-show-mode-hook} is too
2281early.
2282
2283@cindex MH-Show mode
2284@cindex modes, MH-Show
2285@vindex mh-show-buffer-mode-line-buffer-id
2286
2287For those who like to modify their mode lines, use
2288@code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in
2289the MH-Show buffers. Place the two escape strings @samp{%s} and
2290@samp{%d}, which will display the folder name and the message number,
2291respectively, somewhere in the string in that order. The default value
2292of @code{"@{show-%s@} %d"} yields a mode line of
2293
2294@smallexample
2295-----@{show-+inbox@} 4 (MH-Show)--Bot--------------------------------
2296@end smallexample
2297
2298@node Viewing Attachments, HTML, Viewing, Reading Mail
2299@section Viewing Attachments
2300
2301@cindex attachments
2302@cindex body parts
2303@cindex @command{mhshow}
2304@cindex @command{show}
2305@cindex MH commands, @command{mhshow}
2306@cindex MH commands, @command{show}
2307@cindex MIME
2308@cindex multimedia mail
2309
2310MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
2311Mail Extensions) messages which are simply messages with additional
2312@dfn{body parts} or @dfn{attachments}. You can use the MH commands
2313@command{show}@footnote{See the section
2314@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
2315prev} in the MH book.} or @command{mhshow}@footnote{See the section
2316@uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in
2317the MH book.} from the shell to read @sc{mime} messages@footnote{You
2318can call them directly from Emacs if you're running the X Window
2319System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can
2320leave out the @samp{xterm -e} if you use @command{mhlist} or
2321@command{mhstore}.}.
2322
2323@cindex Emacs, packages, mm-decode
2324@cindex mm-decode package
2325@findex mh-toggle-mh-decode-mime-flag
2326@kindex ; (semicolon)
2327@vindex mh-decode-mime-flag
2328
2329MH-E can handle attachments as well if the Gnus @samp{mm-decode}
2330package is present. If so, the option @code{mh-decode-mime-flag} will
2331be on. Otherwise, you'll see the @sc{mime} body parts rather than text
2332or attachments. There isn't much point in turning off the option
2333@code{mh-decode-mime-flag}; however, you can inspect it if it appears
2334that the body parts are not being interpreted correctly or toggle it
2335with the command @kbd{;} (semicolon;
2336@code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This
2337option also controls the display of quoted-printable messages and
2338other graphical widgets. @xref{Viewing}.
2339
2340@cindex buttons
2341
2342Attachments in MH-E are indicated by @dfn{buttons} like this:
2343
2344@smallexample
2345[1. image/jpeg; foo.jpg]...
2346@end smallexample
2347
2348@findex mh-next-button
2349@findex mh-press-button
2350@findex mh-prev-button
2351@kindex @key{RET}
2352@kindex K @key{TAB}
2353@kindex K S-@key{TAB}
2354@kindex Mouse-1
2355@kindex Mouse-2
2356
2357To view the contents of the button, use either @kbd{Mouse-1} or
2358@kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when
2359the cursor is over the button. This command is a toggle so if you use
2360it again on the same attachment, it is hidden. If Emacs does not know
2361how to display the attachment, then Emacs offers to save the
2362attachment in a file. To move the cursor to the next button, use the
2363command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the
2364buffer is reached then the search wraps over to the start of the
2365buffer. To move the cursor to the previous button, use the command
2366@kbd{K S-@key{TAB}} (@code{mh-prev-button}). If the beginning of the
2367buffer is reached then the search wraps over to the end of the buffer.
2368
2369@cindex attachments, viewing
2370@cindex viewing attachments
2371@findex mh-folder-toggle-mime-part
2372@kindex K v
2373
2374Another way to view the contents of a button is to use the command
2375@kbd{K v} (@code{mh-folder-toggle-mime-part}). This command displays
2376(or hides) the attachment associated with the button under the cursor.
2377If the cursor is not located over a button, then the cursor first
2378moves to the next button, wrapping to the beginning of the message if
2379necessary. This command has the advantage over the previous commands
2380of working from the MH-Folder buffer. You can also provide a numeric
2381prefix argument (as in @kbd{4 K v}) to view the attachment labeled
2382with that number. If Emacs does not know how to display the
2383attachment, then Emacs offers to save the attachment in a file.
2384
2385@cindex @file{/etc/mailcap}
2386@cindex files, @file{/etc/mailcap}
2387@findex mailcap-mime-info
2388@findex mh-display-with-external-viewer
2389@kindex K e
2390
2391If Emacs does not know how to view an attachment, you could save it
2392into a file and then run some program to open it. It is easier,
2393however, to launch the program directly from MH-E with the command
2394@kbd{K e} (@code{mh-display-with-external-viewer}). While you'll most
2395likely use this to view spreadsheets and documents, it is also useful
2396to use your browser to view HTML attachments with higher fidelity than
2397what Emacs can provide. This command displays the attachment
2398associated with the button under the cursor. If the cursor is not
2399located over a button, then the cursor first moves to the next button,
2400wrapping to the beginning of the message if necessary. You can provide
2401a numeric prefix argument (as in @kbd{4 K e}) to view the attachment
2402labeled with that number. This command tries to provide a reasonable
2403default for the viewer by calling the Emacs function
2404@code{mailcap-mime-info}. This function usually reads the file
2405@file{/etc/mailcap}.
2406
2407@cindex attachments, saving
2408@cindex saving attachments
2409@findex mh-folder-save-mime-part
2410@kindex K o
2411
2412Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save
2413attachments (the mnemonic is ``output''). This command saves the
2414attachment associated with the button under the cursor. If the cursor
2415is not located over a button, then the cursor first moves to the next
2416button, wrapping to the beginning of the message if necessary. You can
2417also provide a numeric prefix argument (as in @kbd{3 K o}) to save the
2418attachment labeled with that number. This command prompts you for a
2419filename and suggests a specific name if it is available.
2420
2421@cindex @command{mhn}
2422@cindex @command{mhstore}
2423@cindex MH commands, @command{mhn}
2424@cindex MH commands, @command{mhstore}
2425@findex mh-mime-save-parts
2426@kindex K a
2427@vindex mh-mime-save-parts-default-directory
2428
2429You can save all of the attachments at once with the command @kbd{K a}
2430(@code{mh-mime-save-parts}). The attachments are saved in the
2431directory specified by the option
2432@code{mh-mime-save-parts-default-directory} unless you use a prefix
2433argument (as in @kbd{C-u K a}) in which case you are prompted for the
2434directory. These directories may be superseded by MH profile
2435components, since this function calls on @command{mhstore}
2436(@command{mhn}) to do the work.
2437
2438@vindex mh-mime-save-parts-default-directory
2439
2440The default value for the option
2441@code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so
2442that you are always prompted for the directory in which to save the
2443attachments. However, if you usually use the same directory within a
2444session, then you can set this option to @samp{Prompt the First Time}
2445to avoid the prompt each time. you can make this directory permanent
2446by choosing @samp{Directory} and entering the directory's name.
2447
2448@cindex attachments, inline
2449@cindex inline attachments
2450@findex mh-toggle-mime-buttons
2451@kindex K t
2452@vindex mh-display-buttons-for-inline-parts-flag
2453
2454The sender can request that attachments should be viewed inline so
2455that they do not really appear like an attachment at all to the
2456reader. Most of the time, this is desirable, so by default MH-E
2457suppresses the buttons for inline attachments. On the other hand, you
2458may receive code or HTML which the sender has added to his message as
2459inline attachments so that you can read them in MH-E. In this case, it
2460is useful to see the buttons so that you know you don't have to cut
2461and paste the code into a file; you can simply save the attachment. If
2462you want to make the buttons visible for inline attachments, you can
2463use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle
2464the visibility of these buttons. You can turn on these buttons
2465permanently by turning on the option
2466@code{mh-display-buttons-for-inline-parts-flag}.
2467
2468MH-E cannot display all attachments inline however. It can display
2469text (including @sc{html}) and images.
2470
2471@cindex header field, @samp{Content-Disposition:}
2472@cindex inline images
2473@cindex @samp{Content-Disposition:} header field
2474@vindex mh-max-inline-image-height
2475@vindex mh-max-inline-image-width
2476
2477Some older mail programs do not insert the needed
2478plumbing@footnote{This plumbing is the @samp{Content-Disposition:}
2479header field.} to tell MH-E whether to display the attachments inline
2480or not. If this is the case, MH-E will display these images inline if
2481they are smaller than the window. However, you might want to allow
2482larger images to be displayed inline. To do this, you can change the
2483options @code{mh-max-inline-image-width} and
2484@code{mh-max-inline-image-height} from their default value of zero to
2485a large number. The size of your screen is a good choice for these
2486numbers.
2487
2488@cindex alternatives
2489@cindex attachments, alternatives
2490@vindex mh-display-buttons-for-alternatives-flag
2491
2492Sometimes, a mail program will produce multiple alternatives of an
2493attachment in increasing degree of faithfulness to the original
2494content. By default, only the preferred alternative is displayed. If
2495the option @code{mh-display-buttons-for-alternatives-flag} is on, then
2496the preferred part is shown inline and buttons are shown for each of
2497the other alternatives.
2498
2499@vindex mm-discouraged-alternatives
2500
2501Many people prefer to see the @samp{text/plain} alternative rather
2502than the @samp{text/html} alternative. To do this in MH-E, customize
2503the option @code{mm-discouraged-alternatives}, and add
2504@samp{text/html}. The next best alternative, if any, will be shown.
2505
bfe16263
BW
2506@findex mh-show-preferred-alternative
2507@kindex : (colon)
2508
2509Occasionally, though, you might want to see the preferred alternative.
2510The command @kbd{:} (@code{mh-show-preferred-alternative}) displays
2511the message with the default preferred alternative. This is as if
2512@code{mm-discouraged-alternatives} is set to @samp{nil}. Use the
2513command @key{RET} (@code{mh-show}) to show the message normally again.
2514
4009494e
GM
2515@kindex K i
2516@findex mh-folder-inline-mime-part
2517
2518You can view the raw contents of an attachment with the command @kbd{K
2519i} (@code{mh-folder-inline-mime-part}). This command displays (or
2520hides) the contents of the attachment associated with the button under
2521the cursor verbatim. If the cursor is not located over a button, then
2522the cursor first moves to the next button, wrapping to the beginning
2523of the message if necessary. You can also provide a numeric prefix
2524argument (as in @kbd{4 K i}) to view the attachment labeled with that
2525number.
2526
2527For additional information on buttons, see
2528@ifinfo
2529@ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}.
2530@end ifinfo
2531@ifnotinfo
2532the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101,
2533Article Buttons} and
2534@uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands}
2535in the @cite{The Gnus Manual}.
2536@end ifnotinfo
2537
2538@node HTML, Digests, Viewing Attachments, Reading Mail
2539@section HTML
2540
2541@cindex HTML
2542@cindex Gnus
2543
2544MH-E can display messages that have been sent in HTML@footnote{This
2545feature depends on a version of Gnus that is at least 5.10.}. The
2546content of the message will appear in the MH-Show buffer as you would
2547expect if the entire message is HTML, or there is an inline HTML body
2548part. However, if there is an HTML body part that is an attachment,
2549then you'll see a button like this:
2550
2551@smallexample
2552[1. text/html; foo.html]...
2553@end smallexample
2554
2555To see how to read the contents of this body part, see @ref{Viewing
2556Attachments}.
2557
2558@vindex mm-text-html-renderer
2559
2560The browser that MH-E uses is determined by the option
2561@code{mm-text-html-renderer}. The default setting is set automatically
2562based upon the presence of a known browser on your system. If you wish
2563to use a different browser, then set this option accordingly. See the
2564documentation for the browser you use for additional information on
2565how to use it. In particular, find and disable the option to render
2566images as this can tip off spammers that the email address they have
2567used is valid.
2568
2569@vindex mm-text-html-renderer
2570
2571If you're confused about which @code{mm-text-html-renderer} to use,
2572here's a brief description of each, sorted by popularity, that
2573includes the results of a quick poll of MH-E users from 2005-12-23.
2574
2575@table @asis
2576@cindex browser, @samp{w3m}
2577@cindex @samp{w3m}
2578@kindex Mouse-2
4009494e
GM
2579@item @samp{w3m} 7
2580The @samp{w3m} browser requires an external program. It's quick,
2581produces pretty nice output, and best of all, it's the only browser
2582that highlights links. These can be clicked with @kbd{Mouse-2} to view
567b9191
BW
2583the content of the link in @samp{w3m}. The @samp{w3m} browser handles
2584tables well and actually respects the table's width parameter (which
2585can cause text to wrap if the author didn't anticipate that the page
2586would be viewed in Emacs).
4009494e
GM
2587@c -------------------------
2588@cindex browser, @samp{w3m-standalone}
2589@cindex @samp{w3m-standalone}
2590@item @samp{w3m-standalone} 3
2591This browser, along with @samp{nil} for the external browser, are the
2592only choices that work without having to download a separate lisp
2593package or external program. This browser is quick, but does not show
2594links. It handles simple tables but some tables get rendered much
2595wider than the Emacs frame. This browser was the only one not to
2596handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did
2597render @samp{&reg;}.
2598@c -------------------------
2599@cindex browser, @samp{links}
2600@cindex @samp{links}
2601@item @samp{links} 1
2602The @samp{links} browser requires an external program. It's quick, and
2603produces nicer output than @samp{lynx} on single column mails in
2604tables. However, it doesn't show links and it doesn't do as nice a job
2605on multi-column tables as some lines wrap. At least it fits in 80
2606columns and thus seems better than @samp{w3} and
2607@samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R).
2608@c -------------------------
2609@cindex browser, @samp{lynx}
2610@cindex @samp{lynx}
2611@item @samp{lynx} 1
2612The @samp{lynx} browser requires an external program. It's quick and
2613produces pretty decent output but it doesn't show links. It doesn't
2614seem to do multi-column tables which makes output much cleaner. It
2615centers the output and wraps long lines more than most. Handles
2616@samp{&reg;}.
2617@c -------------------------
2618@item @samp{nil} 1
2619This choice obviously requires an external browser. Like
2620@samp{w3m-standalone}, it works out of the box. With this setting,
2621HTML messages have a button for the body part which you can view with
2622@kbd{K v} (@code{mh-folder-toggle-mime-part}).
2623@c -------------------------
2624@cindex browser, @samp{w3}
2625@cindex @samp{w3}
2626@item @samp{w3} 0
2627This choice does not require an external program as all of the
2628rendering is done in lisp. You do need to get the package separately.
2629This browser is @strong{slow}, and doesn't appear to have been updated
2630since 2001 and the author hasn't responded to my emails. It displays
2631unknown tags instead of hiding them, so you get to see all the
2632Microsoft crap in certain messages. Tends to make multi-column tables
2633wider than even a full-screen Emacs can handle. Like @samp{w3m}, you
2634can follow links, but you have to find them first as they are not
2635highlighted. Performs well on single-column tables and handles escapes
2636such as @samp{&reg;}.
2637@c -------------------------
2638@cindex browser, @samp{html2text}
2639@cindex @samp{html2text}
2640@item @samp{html2text} 0
2641The @samp{html2text} browser requires an external program. I noticed
2642that it can do some nasty things with simple HTML mails (like filling
2643the entire message as if it were one paragraph, including signature).
2644On another message, it displayed half of the HTML tags for some
2645reason.
2646@end table
2647
2648@vindex mm-text-html-renderer
2649
2650For a couple more sources of information about
2651@code{mm-text-html-renderer},
2652@ifinfo
2653@xref{Display Customization,,,emacs-mime}, and the documentation for
2654the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},).
2655@end ifinfo
2656@ifnotinfo
2657see section @uref{http://www.gnus.org/manual/emacs-mime_6.html,
2658Display Customization} in the @cite{The Emacs MIME Manual} and the
2659documentation for the Gnus command @kbd{W h} (see section
2660@uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the
2661@cite{The Gnus Manual}).
2662@end ifnotinfo
2663
567b9191
BW
2664@cindex @file{.emacs}
2665@cindex files, @file{.emacs}
2666@findex browse-url-at-mouse
2667@kindex S-Mouse-2
2668
867d4bb3 2669A useful key binding that you can add to @file{~/.emacs} is the
567b9191
BW
2670following which displays an HTML link or textual URL in an external
2671browser when clicked with @kbd{S-mouse-2}. This binding works in any
2672buffer, including HTML buffers.
2673
2674@smalllisp
2675(global-set-key [S-mouse-2] 'browse-url-at-mouse)
2676@end smalllisp
2677
4009494e
GM
2678@node Digests, Reading PGP, HTML, Reading Mail
2679@section Digests
2680
2681@cindex digests
2682@findex mh-page-digest
2683@findex mh-page-digest-backwards
2684@kindex D @key{BS}
2685@kindex D @key{SPC}
2686@kindex @key{BS}
2687@kindex @key{SPC}
2688
2689A digest is a message that contains other messages. Special MH-E
2690commands let you read digests conveniently. You can use @key{SPC} and
2691@key{BS} to page through the digest as if it were a normal message,
2692but if you wish to skip to the next message in the digest, use
2693@kbd{D @key{SPC}} (@code{mh-page-digest}). To return to a previous message,
2694use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
2695
2696@cindex @command{burst}
2697@cindex MH commands, @command{burst}
2698@cindex MH-Folder Show mode
2699@cindex modes, MH-Folder Show
2700@findex mh-burst-digest
2701@kindex d
2702@kindex D b
2703@kindex t
2704
2705Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
2706command uses the MH command @command{burst}@footnote{See the section
2707@uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH
2708book.} to break out each message in the digest into its own message.
2709Using this command, you can quickly delete unwanted messages, like
2710this: Once the digest is split up, toggle out of MH-Folder Show mode
2711with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen
2712and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail})
2713to quickly delete messages that you don't want to read (based on the
2714@samp{Subject:} header field). You can also burst the digest to reply
2715directly to the people who posted the messages in the digest. One
2716problem you may encounter is that the @samp{From:} header fields are
2717preceded with a @samp{>} so that your reply can't create the
2718@samp{To:} field correctly. In this case, you must correct the
2719@samp{To:} field yourself. This is described later (@pxref{Editing
2720Drafts}).
2721
2722@node Reading PGP, Printing, Digests, Reading Mail
2723@section Signed and Encrypted Messages
2724
2725@cindex GPG
2726@cindex GnuPG
2727@cindex Gnus
2728@cindex OpenPGP
2729@cindex PGP
2730@cindex RFC 3156
2731@cindex encrypted messages
2732@cindex security
2733@cindex signed messages
2734
2735You can read encrypted or signed PGP or GPG messages with
2736MH-E@footnote{This feature depends on post-5.10 versions of Gnus.
2737@cite{MIME Security with OpenPGP} is documented in
2738@uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However,
2739MH-E can also decrypt old-style PGP messages that are not in MIME
2740format.}. This section assumes that you already have a good
2741understanding of GPG and have set up your keys appropriately.
2742
2743If someone sends you a signed message, here is what you'll see:
2744
2745@smallexample
2746@group
2747[[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2748This is a signed message.
2749
2750[[End of PGP Signed Part]]
2751@end group
2752@end smallexample
2753
2754@cindex keychain
2755@cindex key server
2756@cindex signed messages
2757
2758If the key for the given signature is not in your keychain, you'll be
2759given the opportunity to fetch the key from a key server and verify
2760the key. If the message is really large, the verification process can
2761take a long time. You can press @kbd{C-g} at any time to
2762cancel@footnote{Unfortunately in the current version, the validation
2763process doesn't display a message so it appears that MH-E has hung. We
2764hope that this will be fixed in the future.}.
2765
2766If the signature doesn't check out, you might see something like this:
2767
2768@smallexample
2769@group
2770[[PGP Signed Part:Failed]]
2771This is a signed message.
2772This is garbage added after the signature was made.
2773
2774[[End of PGP Signed Part]]
2775@end group
2776@end smallexample
2777
2778@cindex decrypting messages
2779
2780If someone sends you an encrypted message, MH-E will ask for your
2781passphrase to decrypt the message. You should see something like this:
2782
2783@smallexample
2784@group
2785[[PGP Encrypted Part:OK]]
2786
2787[[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]]
2788This is the secret message.
2789
2790[[End of PGP Signed Part]]
2791
2792[[End of PGP Encrypted Part]]
2793@end group
2794@end smallexample
2795
2796If there is a problem decrypting the message, the button will say:
2797
2798@smallexample
2799[[PGP Encrypted Part:Failed]]
2800@end smallexample
2801
2802You can read the contents of this button using the methods described in
2803@ref{Viewing Attachments}. If the message were corrupted, you'd see
2804this:
2805
2806@smallexample
2807[[PGP Encrypted Part:Failed]
2808Invalid base64 data]
2809@end smallexample
2810
2811If your passphrase were incorrect, you'd see something like this:
2812
2813@smallexample
2814[GNUPG:] ENC_TO CD9C88BB610BD9AD 1 0
2815[GNUPG:] USERID_HINT CD9C88BB610BD9AD Bill Wohler <wohler@@stop.mail-abuse.org>
2816[GNUPG:] NEED_PASSPHRASE CD9C88BB610BD9AD CD9C88BB610BD9AD 1 0
2817[GNUPG:] BAD_PASSPHRASE CD9C88BB610BD9AD
2818gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09
2819 "Bill Wohler <wohler@@stop.mail-abuse.org>"
2820gpg: public key decryption failed: bad passphrase
2821[GNUPG:] BEGIN_DECRYPTION
2822[GNUPG:] DECRYPTION_FAILED
2823gpg: decryption failed: secret key not available
2824[GNUPG:] END_DECRYPTION
2825
2826gpg exited abnormally: '2'
2827@end smallexample
2828
2829@vindex mh-show-pgg-bad
2830@vindex mh-show-pgg-good
2831@vindex mh-show-pgg-unknown
2832
2833The appearance of the buttons is controlled by the faces
2834@code{mh-show-pgg-good}, @code{mh-show-pgg-bad}, and
2835@code{mh-show-pgg-unknown} depending on the validity of the signature.
2836The latter is used whether the signature is unknown or untrusted.
2837
2838@cindex @samp{pgg} customization group
2839@cindex PGG
2840@cindex customization group, @samp{pgg}
2841
2842The @samp{pgg} customization group may have some settings which may
2843interest you.
2844@iftex
2845See @cite{The PGG Manual}.
2846@end iftex
2847@ifinfo
2848@xref{Top, , The PGG Manual, pgg, The PGG Manual}.
2849@end ifinfo
2850@ifhtml
2851See
2852@uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
2853@cite{The PGG Manual}}.
2854@end ifhtml
2855
2856@node Printing, Files and Pipes, Reading PGP, Reading Mail
2857@section Printing Your Mail
2858
2859@cindex printing
2860@findex mh-ps-print-msg
2861@findex mh-ps-print-msg-file
2862@kindex P f
2863@kindex P p
2864@vindex mh-lpr-command-format
2865@vindex mh-print-background-flag
2866
2867To print messages in MH-E, use the command @kbd{P p}
2868(@code{mh-ps-print-msg}). You can print all the messages in a range
2869(as in @kbd{C-u P p 1 3 5-7 last:5 frombob @key{RET}},
2870@pxref{Ranges}). You can also send the output to a file with @kbd{P f}
2871(@code{mh-ps-print-msg-file}). This command will print inline text
2872attachments but will not decrypt messages. However, when a message is
2873displayed in an MH-Show buffer, then that buffer is used verbatim for
2874printing with the caveat that only text attachments, if opened inline,
2875are printed. Therefore, encrypted messages can be printed by showing
2876and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not
2877use the options @code{mh-lpr-command-format} or
2878@code{mh-print-background-flag}, described below.
2879
2880@findex mh-ps-print-toggle-color
2881@kindex P C
2882@vindex ps-print-color-p
2883
2884Colors are emulated on black-and-white printers with shades of gray.
2885This might produce illegible output, even if your screen colors only
2886use shades of gray. If this is the case, try using the command @kbd{P
2887C} (@code{mh-ps-print-toggle-color}) to toggle between color, no
2888color, and a black and white representation of the colors and see
2889which works best. You change this setting permanently by customizing
2890the option @code{ps-print-color-p}.
2891
2892@findex mh-ps-print-toggle-faces
2893@kindex P F
2894
2895Another related function is the command @kbd{P F}
2896(@code{mh-ps-print-toggle-faces}). This command toggles between using
2897faces and not. When faces are enabled, the printed message will look
2898very similar to the message in the MH-Show buffer.
2899
2900@cindex ps-print package
2901@cindex Emacs, packages, ps-print
2902
2903MH-E uses the @samp{ps-print} package to do the printing, so you can
2904customize the printing further by going to the @samp{ps-print}
2905customization group.
2906
2907@cindex @command{lpr}
2908@cindex @command{mhl}
2909@cindex MH commands, @command{mhl}
2910@cindex Unix commands, @command{lpr}
2911@findex mh-print-msg
2912@kindex P l
2913
2914An alternative to using the @samp{ps-print} package is the command
2915@kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or
2916@i{l}pr). You can print all the messages in a range. The message is
2917formatted with @command{mhl}@footnote{See the section
2918@uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH
2919book.} and printed with the @command{lpr} command.
2920
2921@kindex P f
2922@kindex P l
2923@kindex P p
2924@vindex mh-lpr-command-format
2925@vindex mh-print-background-flag
2926
2927The command @kbd{P l} uses two options. The option
2928@code{mh-lpr-command-format} contains the Unix command line which
2929performs the actual printing. The string can contain one escape,
2930@samp{%s}, which is replaced by the name of the folder and the message
2931number and is useful for print job names. The default setting is
2932@code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb
2933-P"} which produces a nice header and adds a bit of margin so the text
2934fits within my printer's margins. Normally messages are printed in the
2935foreground. If this is slow on your system, you may elect to turn on
2936the option @code{mh-print-background-flag} to print in the background.
2937If you do this, do not delete the message until it is printed or else
2938the output may be truncated. These options are not used by the
2939commands @kbd{P p} or @kbd{P f}.
2940
2941@node Files and Pipes, Navigating, Printing, Reading Mail
2942@section Files and Pipes
2943
2944@cindex files
2945@cindex pipes
2946@findex mh-refile-or-write-again
2947@findex mh-write-msg-to-file
2948@kindex >
2949@kindex !
2950
2951MH-E does offer a couple of commands that are not a part of MH@. The
2952first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to
2953a file. You are prompted for the filename. If the file already exists,
2954the message is appended to it. You can also write the message to the
2955file without the header by specifying a prefix argument (such as
2956@kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file
2957can be made with the command @kbd{!}
2958(@code{mh-refile-or-write-again}).
2959
2960@findex mh-pipe-msg
2961@kindex |
2962@kindex l
2963
2964You can also pipe the message through a Unix shell command with the
2965command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix
2966command through which you wish to run your message. If you give a
2967prefix argument to this command, the message header is included in the
2968text passed to the command (the contrived example @kbd{C-u | lpr}
2969would be done with the @kbd{l} command instead).
2970
2971@cindex @command{shar}
2972@cindex @command{uuencode}
2973@cindex Unix commands, @command{shar}
2974@cindex Unix commands, @command{uuencode}
2975@findex mh-store-msg
2976@kindex X s
2977@vindex mh-store-default-directory
2978
2979If the message is a shell archive @command{shar} or has been run
2980through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to
2981extract the body of the message. The default directory for extraction
2982is the current directory; however, you have a chance to specify a
2983different extraction directory. The next time you use this command,
2984the default directory is the last directory you used. If you would
2985like to change the initial default directory, customize the option
2986@code{mh-store-default-directory}, change the value from
2987@samp{Current} to @samp{Directory}, and then enter the name of the
2988directory for storing the content of these messages.
2989
2990@findex mh-store-buffer
2991@kindex @key{RET}
2992@kindex X s
2993
2994By the way, @kbd{X s} calls the Emacs Lisp function
2995@code{mh-store-buffer}. I mention this because you can use it directly
2996if you're editing a buffer that contains a file that has been run
2997through @command{uuencode} or @command{shar}. For example, you can
2998extract the contents of the current buffer in your home directory by
2999typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}.
3000
3001@node Navigating, Miscellaneous Commands and Options, Files and Pipes, Reading Mail
3002@section Navigating
3003
3004@cindex moving between messages
3005@cindex navigation
3006@findex mh-first-msg
3007@findex mh-goto-msg
3008@findex mh-last-msg
3009@findex mh-next-undeleted-msg
3010@findex mh-next-unread-msg
3011@findex mh-previous-undeleted-msg
3012@findex mh-previous-unread-msg
3013@kindex g
3014@kindex M-<
3015@kindex M->
3016@kindex M-n
3017@kindex M-p
3018@kindex n
3019@kindex p
3020
3021To move on to the next message, use the command @kbd{n}
3022(@code{mh-next-undeleted-msg}); use @kbd{p}
3023(@code{mh-previous-undeleted-msg}) to read the previous message. To
3024move to the next unread message, use @kbd{M-n}
3025(@code{mh-next-unread-msg}); use @kbd{M-p}
3026(@code{mh-previous-unread-msg}) to move to the previous unread
3027message. These commands can be given a prefix argument to specify how
3028many messages to skip (for example, @kbd{5 n}). You can also move to a
3029specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the
3030message number either before or after typing @kbd{g}. In the latter
3031case, Emacs prompts you. Finally, you can go to the first or last
3032message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->}
3033(@code{mh-last-msg}) respectively.
3034
3035@cindex MH-Folder mode
3036@cindex modes, MH-Folder
3037@findex next-line
3038@findex previous-line
3039@kindex C-n
3040@kindex C-p
3041@kindex @key{RET}
3042
3043You can also use the Emacs commands @kbd{C-p} (@code{previous-line})
3044and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in
3045the MH-Folder window. These commands can be used in conjunction with
3046@key{RET} to look at deleted or refiled messages.
3047
3048@cindex deleting messages
3049@findex mh-delete-msg
3050@kindex d
3051@kindex n
3052@kindex p
3053
3054To mark a message for deletion, use the command @kbd{d}
3055(@code{mh-delete-msg}). A @samp{D} is placed by the message in the
3056scan window, and the next undeleted message is displayed. If the
3057previous command had been @kbd{p}, then the next message displayed is
3058the first undeleted message previous to the message just deleted. Use
3059@kbd{n} to force subsequent @kbd{d} commands to move forward to the
3060next undeleted message after deleting the message under the cursor.
3061You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5
3062frombob @key{RET}}, @pxref{Ranges}).
3063
3064@findex mh-delete-msg-no-motion
3065@kindex C-d
3066
3067The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the
3068message (or messages in range) for deletion but leaves the cursor at
3069the current message in case you wish to perform other operations on
3070the message.
3071
3072@findex mh-delete-subject
3073@findex mh-delete-subject-or-thread
3074@findex mh-thread-delete
3075@findex mh-undo
3076@kindex k
3077@kindex T d
3078@kindex u
3079
3080And to delete more messages faster, you can use @kbd{k}
3081(@code{mh-delete-subject-or-thread}) to delete all the messages with
3082the same subject as the current message. This command puts these
3083messages in a sequence named @samp{subject}. You can undo this action
3084by using @kbd{u} (@code{mh-undo}) with a prefix argument and then
3085specifying the @samp{subject} sequence. However, if the buffer is
3086displaying a threaded view of the folder then @kbd{k} behaves like
3087@kbd{T d} (@code{mh-thread-delete}). @xref{Threading}.
3088
3089@findex mh-execute-commands
3090@kindex x
3091
3092However you mark a message for deletion, the command @kbd{x}
3093(@code{mh-execute-commands}) actually carries out the deletion
3094(@pxref{Folders}).
3095
3096@vindex mh-delete-msg-hook
3097
3098The hook @code{mh-delete-msg-hook} is called after you mark a message
3099for deletion. For example, a past maintainer of MH-E used this once
3100when he kept statistics on his mail usage.
3101
3102@node Miscellaneous Commands and Options, , Navigating, Reading Mail
3103@section Miscellaneous Commands and Options
3104
3105This section contains a few more miscellaneous commands and options.
3106
3107@cindex editing message
3108@findex mh-modify
3109@kindex M
3110
3111There are times when you need to edit a message. For example, you may
3112need to fix a broken Content-Type header field. You can do this with
3113the command @kbd{M} (@code{mh-modify}). It displays the raw message in
3114an editable buffer. When you are done editing, save and kill the
3115buffer as you would any other.
3116
3117@findex mh-kill-folder
3118@findex mh-pack-folder
3119@vindex mh-do-not-confirm-flag
3120
3121Commands such as @code{mh-pack-folder} prompt to confirm whether to
3122process outstanding moves and deletes or not before continuing.
3123Turning on the option @code{mh-do-not-confirm-flag} means that these
3124actions will be performed---which is usually desired but cannot be
3125retracted---without question@footnote{In previous versions of MH-E,
3126this option suppressed the confirmation in @code{mh-kill-folder}.
3127Since this kept most users from setting this option,
3128@code{mh-kill-folder} was modified in version 6.0 to always ask for
3129confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}.
3130@xref{Folders}.}.
3131
3132@cindex MH-Folder mode
3133@cindex modes, MH-Folder
3134@vindex mh-summary-height
3135
3136The option @code{mh-summary-height} controls the number of scan lines
3137displayed in the MH-Folder window, including the mode line. The
3138default value of this option is @samp{Automatic} which means that the
3139MH-Folder buffer will maintain the same proportional size if the frame
3140is resized. If you'd prefer a fixed height, then choose the
3141@samp{Fixed Size} option and enter the number of lines you'd like to
3142see.
3143
3144@vindex mh-bury-show-buffer-flag
3145
3146Normally the buffer for displaying messages is buried at the bottom at
3147the buffer stack. You may wish to disable this feature by turning off
3148the option @code{mh-bury-show-buffer-flag}. One advantage of not
3149burying the show buffer is that one can delete the show buffer more
3150easily in an electric buffer list because of its proximity to its
3151associated MH-Folder buffer. Try running @kbd{M-x
3152electric-buffer-list} to see what I mean.
3153
3154@cindex @file{.emacs}
3155@cindex files, @file{.emacs}
3156@cindex reading mail
3157
3158Before we leave this section, I'll include a function that I use as a
3159front end to MH-E@footnote{Stephen Gildea's favorite binding is
3160@kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your
3161working window configuration, which may be quite involved---windows
3162filled with source, compilation output, man pages, and other
3163documentation---and your MH-E window configuration. Like the rest of
3164the customization described in this section, simply add the following
3165code to @file{~/.emacs}.
3166
3167@iftex
3168@filbreak
3169@end iftex
3170
3171@findex mh-rmail, example
3172
3173@smalllisp
3174@group
3175(defvar my-mh-screen-saved nil
3176 "Set to non-@code{nil} when MH-E window configuration shown.")
3177(defvar my-normal-screen nil "Normal window configuration.")
3178(defvar my-mh-screen nil "MH-E window configuration.")
3179
3180(defun my-mh-rmail (&optional arg)
3181 "Toggle between MH-E and normal screen configurations.
3182With non-@code{nil} or prefix argument, @i{inc} mailbox as well
3183when going into mail."
3184 (interactive "P") ; @r{user callable function, P=prefix arg}
3185 (setq my-mh-screen-saved ; @r{save state}
3186 (cond
3187 ;; @r{Bring up MH-E screen if arg or normal window configuration.}
3188 ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.}
3189 ((or arg (null my-mh-screen-saved))
3190 (setq my-normal-screen (current-window-configuration))
3191 (if (or arg (null (get-buffer "+inbox")))
3192 (mh-rmail)
3193 (set-window-configuration my-mh-screen))
3194 t) ; @r{set my-mh-screen-saved to @code{t}}
3195 ;; @r{Otherwise, save MH-E screen and restore normal screen.}
3196 (t
3197 (setq my-mh-screen (current-window-configuration))
3198 (set-window-configuration my-normal-screen)
3199 nil)))) ; @r{set my-mh-screen-saved to nil}
3200
3201(global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}}
3202
3203@i{Starting MH-E}
3204
3205@end group
3206@end smalllisp
3207
3208If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved} is
3209@code{nil} (meaning a non-MH-E window configuration), the current
3210window configuration is saved, either the @samp{+inbox} buffer is
3211displayed or @code{mh-rmail} is run, and the MH-E window configuration
3212is shown. Otherwise, the MH-E window configuration is saved and the
3213original configuration is displayed.
3214
3215@node Folders, Sending Mail, Reading Mail, Top
3216@chapter Organizing Your Mail with Folders
3217
3218@cindex @samp{Folder} menu
3219@cindex @samp{Message} menu
3220@cindex folders
3221@cindex menu, @samp{Folder}
3222@cindex menu, @samp{Message}
3223@cindex using folders
3224
3225This chapter discusses the things you can do with folders within MH-E.
3226The commands in this chapter are also found in the @samp{Folder} and
3227@samp{Message} menus.
3228
3229@table @kbd
3230@kindex ?
3231@findex mh-help
3232@item ?
3233Display cheat sheet for the MH-E commands (@code{mh-help}).
3234@c -------------------------
3235@kindex !
3236@findex mh-refile-or-write-again
3237@item !
3238Repeat last output command (@code{mh-refile-or-write-again}).
3239@c -------------------------
3240@cindex @samp{Message > Copy Message to Folder...} menu item
3241@cindex menu item, @samp{Message > Copy Message to Folder...}
3242@kindex c
3243@findex mh-copy-msg
3244@item c
3245Copy range to folder (@code{mh-copy-msg}).
3246@c -------------------------
3247@kindex F ?
3248@findex mh-prefix-help
3249@item F ?
3250Display cheat sheet for the commands of the current prefix in
3251minibuffer (@code{mh-prefix-help}).
3252@c -------------------------
3253@kindex F '
3254@findex mh-index-ticked-messages
3255@item F '
3256Display ticked messages (@code{mh-index-ticked-messages}).
3257@c -------------------------
3258@kindex F c
3259@findex mh-catchup
3260@item F c
3261Delete range from the @samp{unseen} sequence (@code{mh-catchup}).
3262@c -------------------------
3263@kindex F k
3264@findex mh-kill-folder
3265@item F k
3266Remove folder (@code{mh-kill-folder}).
3267@c -------------------------
3268@cindex @samp{Folder > List Folders} menu item
3269@cindex menu item, @samp{Folder > List Folders}
3270@kindex F l
3271@findex mh-list-folders
3272@item F l
3273List all folders (@code{mh-list-folders}).
3274@c -------------------------
3275@cindex @samp{Folder > View New Messages} menu item
3276@cindex menu item, @samp{Folder > View New Messages}
3277@kindex F n
3278@findex mh-index-new-messages
3279@item F n
3280Display unseen messages (@code{mh-index-new-messages}).
3281@c -------------------------
3282@cindex @samp{Folder > Pack Folder} menu item
3283@cindex menu item, @samp{Folder > Pack Folder}
3284@kindex F p
3285@findex mh-pack-folder
3286@item F p
3287Pack folder (@code{mh-pack-folder}).
3288@c -------------------------
3289@kindex F q
3290@findex mh-index-sequenced-messages
3291@item F q
3292Display messages in any sequence (@code{mh-index-sequenced-messages}).
3293@c -------------------------
3294@cindex @samp{Folder > Rescan Folder} menu item
3295@cindex menu item, @samp{Folder > Rescan Folder}
3296@kindex F r
3297@findex mh-rescan-folder
3298@item F r
3299Rescan folder (@code{mh-rescan-folder}).
3300@c -------------------------
3301@cindex @samp{Folder > Search...} menu item
3302@cindex menu item, @samp{Folder > Search...}
3303@kindex F s
3304@findex mh-search
3305@item F s
3306Search your MH mail (@code{mh-search}).
3307@c -------------------------
3308@cindex @samp{Folder > Sort Folder} menu item
3309@cindex menu item, @samp{Folder > Sort Folder}
3310@kindex F S
3311@findex mh-sort-folder
3312@item F S
3313Sort folder (@code{mh-sort-folder}).
3314@c -------------------------
3315@kindex F u
3316@findex mh-undo-folder
3317@item F u
3318Undo all refiles and deletes in the current folder (@code{mh-undo-folder}).
3319@c -------------------------
3320@cindex @samp{Folder > Visit a Folder...} menu item
3321@cindex menu item, @samp{Folder > Visit a Folder...}
3322@kindex F v
3323@findex mh-visit-folder
3324@item F v
3325Visit folder (@code{mh-visit-folder}).
3326@c -------------------------
3327@cindex @samp{Message > Refile Message} menu item
3328@cindex menu item, @samp{Message > Refile Message}
3329@kindex o
3330@findex mh-refile-msg
3331@item o
3332Refile (output) range into folder (@code{mh-refile-msg}).
3333@c -------------------------
3334@cindex @samp{Folder > Quit MH-E} menu item
3335@cindex menu item, @samp{Folder > Quit MH-E}
3336@kindex q
3337@findex mh-quit
3338@item q
3339Quit the current MH-E folder (@code{mh-quit}).
3340@c -------------------------
3341@cindex @samp{Folder > Toggle Show/Folder} menu item
3342@cindex menu item, @samp{Folder > Toggle Show/Folder}
3343@kindex t
3344@findex mh-toggle-showing
3345@item t
3346Toggle between MH-Folder and MH-Folder Show modes
3347(@code{mh-toggle-showing}).
3348@c -------------------------
3349@cindex @samp{Message > Undo Delete/Refile} menu item
3350@cindex menu item, @samp{Message > Undo Delete/Refile}
3351@kindex u
3352@findex mh-undo
3353@item u
3354Undo pending deletes or refiles in range (@code{mh-undo}).
3355@c -------------------------
3356@cindex @samp{Message > Execute Delete/Refile} menu item
3357@cindex menu item, @samp{Message > Execute Delete/Refile}
3358@kindex x
3359@findex mh-execute-commands
3360@item x
3361Process outstanding delete and refile requests
3362(@code{mh-execute-commands}).
3363@end table
3364
3365@cindex @samp{mh-folder} customization group
3366@cindex customization group, @samp{mh-folder}
3367
3368The @samp{mh-folder} customization group is used to tune these
3369commands.
3370
3371@vtable @code
3372@item mh-new-messages-folders
3373Folders searched for the @samp{unseen} sequence (default:
3374@code{Inbox}).
3375@c -------------------------
3376@item mh-ticked-messages-folders
3377Folders searched for @code{mh-tick-seq} (default: @code{t}).
3378@c -------------------------
3379@item mh-large-folder
3380The number of messages that indicates a large folder (default: 200).
3381@c -------------------------
3382@item mh-recenter-summary-flag
3383On means to recenter the summary window (default: @samp{off}).
3384@c -------------------------
3385@item mh-recursive-folders-flag
3386On means that commands which operate on folders do so recursively
3387(default: @samp{off}).
3388@c -------------------------
3389@item mh-sortm-args
3390Additional arguments for @command{sortm} (default: @code{nil}).
3391@end vtable
3392
3393The following hooks are available.
3394
3395@vtable @code
3396@item mh-after-commands-processed-hook
3397Hook run by @kbd{x} after performing outstanding refile and delete
3398requests (default: @code{nil}).
3399@c -------------------------
3400@item mh-before-commands-processed-hook
3401Hook run by @kbd{x} before performing outstanding refile and delete
3402requests (default: @code{nil}).
3403@c -------------------------
3404@item mh-before-quit-hook
3405Hook run by q before quitting MH-E (default: @code{nil}).
3406@c -------------------------
3407@item mh-folder-mode-hook
3408Hook run by @code{mh-folder-mode} when visiting a new folder (default:
3409@code{nil}).
3410@c -------------------------
3411@item mh-kill-folder-suppress-prompt-hook
3412Abnormal hook run at the beginning of @code{mh-kill-folder} (default:
3413@code{'mh-search-p}).
3414@c -------------------------
2a1cf2b9
BW
3415@item mh-pack-folder-hook
3416Hook run by @code{mh-pack-folder} after renumbering the messages
3417(default: @code{nil}).
3418@c -------------------------
4009494e
GM
3419@item mh-quit-hook
3420Hook run by q after quitting MH-E (default: @code{nil}).
3421@c -------------------------
3422@item mh-refile-msg-hook
3423Hook run by o after marking each message for refiling (default:
3424@code{nil}).
3425@end vtable
3426
3427The following faces are available for customizing the appearance of
3428the MH-Folder buffer. @xref{Scan Line Formats}.
3429
3430@vtable @code
3431@item mh-folder-address
3432Recipient face.
3433@c -------------------------
3434@item mh-folder-body
3435Body text face.
3436@c -------------------------
3437@item mh-folder-cur-msg-number
3438Current message number face.
3439@c -------------------------
3440@item mh-folder-date
3441Date face.
3442@c -------------------------
3443@item mh-folder-deleted
3444Deleted message face.
3445@c -------------------------
3446@item mh-folder-followup
3447@samp{Re:} face.
3448@c -------------------------
3449@item mh-folder-msg-number
3450Message number face.
3451@c -------------------------
3452@item mh-folder-refiled
3453Refiled message face.
3454@c -------------------------
3455@vindex mh-scan-format-nmh
3456@vindex mh-scan-sent-to-me-sender-regexp
3457@item mh-folder-sent-to-me-hint
3458Fontification hint face in messages sent directly to us. The detection
3459of messages sent to us is governed by the scan format
3460@code{mh-scan-format-nmh} and regular expression
3461@code{mh-scan-sent-to-me-sender-regexp}.
3462@c -------------------------
3463@vindex mh-scan-format-nmh
3464@vindex mh-scan-sent-to-me-sender-regexp
3465@item mh-folder-scan-format
3466Sender face in messages sent directly to us. The detection of messages
3467sent to us is governed by the scan format @code{mh-scan-format-nmh}
3468and regular expression @code{mh-scan-sent-to-me-sender-regexp}.
3469@c -------------------------
3470@item mh-folder-subject
3471Subject face.
3472@c -------------------------
3473@item mh-folder-tick
3474Ticked message face.
3475@c -------------------------
3476@item mh-folder-to
3477@samp{To:} face.
3478@end vtable
3479
3480@vindex mh-folder-mode-hook
3481
3482The hook @code{mh-folder-mode-hook} is called when visiting a new
3483folder in MH-Folder mode. This could be used to set your own key
3484bindings, for example:
3485
3486@vindex mh-folder-mode-hook, example
3487
3488@smalllisp
3489@group
3490(defvar my-mh-init-done nil
3491 "Non-@code{nil} when one-time MH-E settings made.")
3492
3493(defun my-mh-folder-mode-hook ()
3494 "Hook to set key bindings in MH-Folder mode."
3495 (if (not my-mh-init-done) ; @r{only need to bind the keys once }
3496 (progn
3497 (local-set-key "//" 'my-search-msg)
3498 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}}
3499 (setq my-mh-init-done t))))
3500
3501(add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
3502
3503(defun my-search-msg ()
3504 "Search for a regexp in the current message."
3505 (interactive) ; @r{user function}
3506 (save-window-excursion
3507 (other-window 1) ; @r{go to next window}
3508 (isearch-forward-regexp))) ; @r{string search; hit return}
3509 ; @r{ when done}
3510
3511@i{Create additional key bindings via mh-folder-mode-hook}
3512
3513@end group
3514@end smalllisp
3515
3516@cindex @command{folder}
3517@cindex @command{refile}
3518@cindex MH commands, @command{folder}
3519@cindex MH commands, @command{refile}
3520@findex mh-refile-msg
3521@kindex o
3522@vindex mh-refile-msg-hook
3523
3524MH-E has analogies for each of the MH @command{folder} and
3525@command{refile} commands@footnote{See the sections
3526@uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder:
3527folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and
3528Linking Messages: refile} in the MH book.}. To refile a message in
3529another folder, use the command @kbd{o} (@code{mh-refile-msg})
3530(mnemonic: ``output''). You are prompted for the folder name
3531(@pxref{Folder Selection}). Note that this command can also be used to
3532create folders. If you specify a folder that does not exist, you will
3533be prompted to create it. The hook @code{mh-refile-msg-hook} is called
3534after a message is marked to be refiled.
3535
3536@findex mh-write-msg-to-file
3537@kindex !
3538
3539If you are refiling several messages into the same folder, you can use
3540the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the
3541last refile or write (for the description of @kbd{>}
3542(@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a
3543range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob
3544@key{RET}}, @pxref{Ranges}).
3545
3546@cindex expunging refiles and deletes
3547@cindex undoing refiles and deletes
3548@findex mh-undo
3549@kindex u
3550
3551If you've deleted a message or refiled it, but changed your mind, you
3552can cancel the action before you've executed it. Use @kbd{u}
3553(@code{mh-undo}) to undo a refile on or deletion of a single message.
3554You can also undo refiles and deletes for messages that are found in a
3555given range (@pxref{Ranges}).
3556
3557@findex mh-undo-folder
3558@kindex F u
3559
3560Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo
3561all refiles and deletes in the current folder.
3562
3563@findex mh-execute-commands
3564@kindex x
3565
3566If you've marked messages to be deleted or refiled and you want to go
3567ahead and delete or refile the messages, use @kbd{x}
3568(@code{mh-execute-commands}). Many MH-E commands that may affect the
3569numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if
3570you want to process refiles or deletes first and then either run
3571@kbd{x} for you or undo the pending refiles and deletes.
3572
3573@kindex x
3574@vindex mh-after-commands-processed-hook
3575@vindex mh-before-commands-processed-hook
bfe16263 3576@vindex mh-current-folder
4009494e
GM
3577
3578The command @kbd{x} runs @code{mh-before-commands-processed-hook}
3579before the commands are processed and
3580@code{mh-after-commands-processed-hook} after the commands are
3581processed. Variables that are useful with the former hook include
3582@code{mh-delete-list} and @code{mh-refile-list} which can be used to
3583see which changes will be made to the current folder,
3584@code{mh-current-folder}. Variables that are useful with the latter
3585hook include @code{mh-folders-changed}, which lists which folders were
3586affected by deletes and refiles. This list will always include the
3587current folder @code{mh-current-folder}.
3588
3589@findex mh-copy-msg
3590@kindex c
3591@kindex o
3592
3593If you wish to copy a message to another folder, you can use the
3594command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
3595to @command{refile}(1)). Like the command @kbd{o}, this command
3596prompts you for the name of the target folder and you can specify a
3597range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy
3598takes place immediately. The original copy remains in the current
3599folder.
3600
3601@cindex junk mail
3602@cindex MH-Folder mode
3603@cindex MH-Folder Show mode
3604@cindex modes, MH-Folder
3605@cindex modes, MH-Folder Show
3606@cindex spam
3607@findex mh-toggle-showing
3608@kindex t
3609
3610The command @kbd{t} (@code{mh-toggle-showing}) switches between
3611MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
3612this is implemented as an Emacs minor mode.}. MH-Folder mode turns off
3613the associated show buffer so that you can perform operations on the
3614messages quickly without reading them. This is an excellent way to
3615prune out your junk mail or to refile a group of messages to another
3616folder for later examination.
3617
3618@cindex MH-Folder mode
3619@cindex MH-Show mode
3620@cindex modes, MH-Folder
3621@cindex modes, MH-Show
3622@cindex moving between messages
3623@kindex t
3624@vindex mh-recenter-summary-flag
3625
3626When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder
3627mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
3628alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil}
3629value causes the toggle to display as many scan lines as possible,
3630with the cursor at the middle. The effect of
3631@code{mh-recenter-summary-flag} is rather useful, but it can be
3632annoying on a slow network connection.
3633
3634@findex mh-visit-folder
3635@kindex F v
3636@vindex mh-large-folder
3637
3638When you want to read the messages that you have refiled into folders,
3639use the command @kbd{F v} (@code{mh-visit-folder}) to visit the
3640folder. You are prompted for the folder name. The folder buffer will
3641show just unseen messages if there are any; otherwise, it will show
3642all the messages in the buffer as long there are fewer than
3643@code{mh-large-folder} messages. If there are more, then you are
3644prompted for a range of messages to scan. You can provide a prefix
3645argument in order to specify a range of messages to show when you
3646visit the folder (@pxref{Ranges}). In this case, regions are not used
3647to specify the range and @code{mh-large-folder} is ignored. Note that
3648this command can also be used to create folders. If you specify a
3649folder that does not exist, you will be prompted to create it.
3650
3651@findex mh-search
3652@kindex F s
3653
3654If you forget where you've refiled your messages, you can find them
3655using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3656
3657@cindex @command{procmail}
3658@cindex @samp{unseen} sequence
3659@cindex sequence, @samp{unseen}
3660@cindex Unix commands, @command{procmail}
3661@cindex unseen messages, viewing
3662@findex mh-index-new-messages
3663@kindex F n
3664@vindex mh-new-messages-folders
3665
3666If you use a program such as @command{procmail} to file your incoming
3667mail automatically, you can display new, unseen, messages using the
3668command @kbd{F n} (@code{mh-index-new-messages}). All messages in the
3669@samp{unseen} sequence from the folders in
3670@code{mh-new-messages-folders} are listed. However, this list of
3671folders can be overridden with a prefix argument: with a prefix
3672argument, enter a space-separated list of folders, or nothing to
3673search all folders.
3674
3675@cindex @samp{tick} sequence
3676@cindex sequence, @samp{tick}
3677@cindex ticked messages, viewing
3678@findex mh-index-ticked-messages
3679@kindex F '
3680@vindex mh-ticked-messages-folders
3681
3682If you have ticked messages (@pxref{Sequences}), you can display them
3683using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
3684messages in the @samp{tick} sequence from the folders in
3685@code{mh-ticked-messages-folders} are listed. With a prefix argument,
3686enter a space-separated list of folders, or nothing to search all
3687folders.
3688
3689@findex mh-index-sequenced-messages
3690@kindex F q
3691@vindex mh-new-messages-folders
3692
3693You can display messages in any sequence with the command @kbd{F q}
3694(@code{mh-index-sequenced-messages}). All messages from the folders in
3695@code{mh-new-messages-folders} in the sequence you provide are listed.
3696With a prefix argument, enter a space-separated list of folders at the
3697prompt, or nothing to search all folders.
3698
3699@vindex mh-new-messages-folders
3700@vindex mh-recursive-folders-flag
3701@vindex mh-ticked-messages-folders
3702
3703Set the options @code{mh-new-messages-folders} and
3704@code{mh-ticked-messages-folders} to @samp{Inbox} to search the
3705@samp{+inbox} folder or @samp{All} to search all of the top level
3706folders. Otherwise, list the folders that should be searched with the
3707@samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
3708
3709@cindex buffers, @samp{*MH-E Folders*}
3710@cindex @samp{*MH-E Folders*}
3711@findex mh-kill-folder
3712@findex mh-list-folders
3713@findex mh-pack-folder
3714@findex mh-rescan-folder
3715@findex mh-sort-folder
3716@kindex F k
3717@kindex F l
3718@kindex F p
3719@kindex F r
3720@kindex F S
3721
3722Other commands you can perform on folders include: @kbd{F l}
3723(@code{mh-list-folders}), to place a listing of all the folders in
3724your mail directory in a buffer called @samp{*MH-E Folders*}
3725(@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove
3726a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by
3727date (see @command{sortm}(1) to see how to sort by other criteria);
3728@kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps
3729from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}),
3730to rescan the folder, which is useful to grab all messages in your
3731@samp{+inbox} after processing your new mail for the first time. If
3732you don't want to rescan the entire folder, the commands @kbd{F r} or
3733@kbd{F p} will accept a range (@pxref{Ranges}).
3734
2a1cf2b9
BW
3735@kindex F p
3736@vindex mh-pack-folder-hook
3737
3738The command @kbd{F p} runs @code{mh-pack-folder-hook} after
3739renumbering the messages. A variable that is useful with this hook
3740is @code{mh-current-folder}.
3741
4009494e
GM
3742@kindex @key{TAB}
3743@vindex mh-recursive-folders-flag
3744
3745By default, operations on folders work only one level at a time. Set
3746@code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
3747folders. This mostly means that you'll be able to see all your folders
3748when you press @key{TAB} when prompted for a folder name.
3749
3750@findex mh-search-p
3751@kindex k
3752@vindex mh-kill-folder-suppress-prompt-hooks
3753
3754The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
3755hook run at the beginning of the command @kbd{k}. The hook functions
3756are called with no arguments and should return a non-nil value to
3757suppress the normal prompt when you remove a folder. This is useful
3758for folders that are easily regenerated. The default value of
3759@code{mh-search-p} suppresses the prompt on folders generated by
3760searching.
3761
3762@sp 1
3763@center @strong{NOTE}
3764
3765@quotation
3766Use this hook with care. If there is a bug in your hook which returns
3767@code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
3768@code{+inbox} folder, you will not be happy.
3769@end quotation
3770@sp 1
3771
3772@cindex @command{sortm}
3773@cindex @file{.mh_profile}
3774@cindex files, @file{.mh_profile}
3775@cindex MH commands, @command{sortm}
3776@cindex MH profile component, @samp{sortm:}
3777@cindex @samp{sortm:} MH profile component
3778@kindex F S
3779@vindex mh-sortm-args
3780
3781The option @code{mh-sortm-args} holds extra arguments to pass on to
3782the command @command{sortm}@footnote{See the section
3783@uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the
3784MH book.} when a prefix argument is used with @kbd{F S}. Normally
3785default arguments to @command{sortm} are specified in the MH profile.
3786This option may be used to provide an alternate view. For example,
3787@samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting.
3788
3789@cindex exiting
3790@cindex quitting
3791@findex mh-quit
3792@kindex q
3793
3794When you want to quit using MH-E and go back to editing, you can use
3795the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
3796current MH-E folder and restores the buffers that were present when
3797you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working
3798buffers whose name begins with @samp{ *mh-} or @samp{*MH-E }
3799(@pxref{Miscellaneous}). You can later restore your MH-E session by
3800selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
3801again.
3802
3803@findex mh-execute-commands
3804@kindex q
3805@vindex mh-before-quit-hook
3806@vindex mh-before-quit-hook, example
3807@vindex mh-quit-hook
3808@vindex mh-quit-hook, example
3809
3810The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3811called by @kbd{q}. The former one is called before the quit occurs, so
3812you might use it to perform any MH-E operations; you could perform
3813some query and abort the quit or call @code{mh-execute-commands}, for
3814example. The latter is not run in an MH-E context, so you might use it
3815to modify the window setup. If you find that @kbd{q} buries a lot of
3816buffers that you would rather remove, you can use both
3817@code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that.
3818
3819@smalllisp
3820@group
3821(defvar my-mh-folder-buffer-to-delete nil
3822 "Folder buffer that is being quit.")
3823
3824(defun my-mh-before-quit-hook ()
3825 "Save folder buffer that is to be deleted."
3826 (setq my-mh-folder-buffer-to-delete (current-buffer)))
3827
3828(defun my-mh-quit-hook ()
3829 "Kill folder buffer rather than just bury it."
3830 (set-buffer my-mh-folder-buffer-to-delete)
3831 (if (get-buffer mh-show-buffer)
3832 (kill-buffer mh-show-buffer))
3833 (kill-buffer (current-buffer)))
3834
3835@i{Kill MH-Folder buffer instead of burying it}
3836@end group
3837@end smalllisp
3838
3839@cindex folders, renaming
3840@cindex renaming folders
3841@findex dired
3842@findex dired-do-rename
3843
3844You can use dired to manipulate the folders themselves. For example, I
3845renamed my @samp{+out} folder to the more common @samp{+outbox} by
3846running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}),
3847moving my cursor to @samp{out} and using the command @kbd{R}
3848(@code{dired-do-rename}).
3849
3850@node Sending Mail, Editing Drafts, Folders, Top
3851@chapter Sending Mail
3852
3853@cindex sending mail
3854@findex mh-smail
3855@kindex M-x mh-smail
3856
3857You can send a mail message in several ways. You can call @kbd{M-x
3858mh-smail} directly, or from the command line like this:
3859
3860@cindex starting from command line
3861
3862@smallexample
3863$ @kbd{emacs -f mh-smail}
3864@end smallexample
3865
3866@findex goto-address-at-point
3867@vindex mail-user-agent
3868
3869There are some commands that need to send a mail message, such as
3870@code{goto-address-at-point}. You can configure Emacs to have these
3871commands use MH-E by setting the option @code{mail-user-agent} to
3872@samp{Emacs interface to MH}.
3873
3874@cindex @samp{Message} menu
3875@cindex menu, @samp{Message}
3876
3877From within MH-E's MH-Folder mode, other methods of sending mail are
3878available as well. These can also be found in the @samp{Message} menu.
3879
3880@table @kbd
3881@cindex @samp{Message > Edit Message Again} menu item
3882@cindex menu item, @samp{Message > Edit Message Again}
3883@kindex e
3884@findex mh-edit-again
3885@item e
3886Edit a message to send it again (@code{mh-edit-again}).
3887@c -------------------------
3888@cindex @samp{Message > Re-edit a Bounced Message} menu item
3889@cindex menu item, @samp{Message > Re-edit a Bounced Message}
3890@kindex E
3891@findex mh-extract-rejected-mail
3892@item E
3893Edit a message that was returned by the mail system
3894(@code{mh-extract-rejected-mail}).
3895@c -------------------------
3896@cindex @samp{Message > Forward Message...} menu item
3897@cindex menu item, @samp{Message > Forward Message...}
3898@kindex f
3899@findex mh-forward
3900@item f
3901Forward message (@code{mh-forward}).
3902@c -------------------------
3903@cindex @samp{Message > Reply to Message...} menu item
3904@cindex menu item, @samp{Message > Reply to Message...}
3905@kindex r
3906@findex mh-reply
3907@item r
3908Reply to a message (@code{mh-reply}).
3909@c -------------------------
3910@cindex @samp{Message > Compose a New Message} menu item
3911@cindex menu item, @samp{Message > Compose a New Message}
3912@kindex s
3913@findex mh-send
3914@item s
3915Compose a message (@code{mh-send}).
3916@c -------------------------
3917@cindex @samp{Message > Redistribute Message...} menu item
3918@cindex menu item, @samp{Message > Redistribute Message...}
3919@kindex M-d
3920@findex mh-redistribute
3921@item M-d
3922Redistribute a message (@code{mh-redistribute}).
3923@c -------------------------
3924@findex mh-smail
3925@item M-x mh-smail
3926Compose a message with the MH mail system.
3927@c -------------------------
3928@findex mh-smail-other-window
3929@item M-x mh-smail-other-window
3930Compose a message with the MH mail system in other window.
3931@end table
3932
3933@cindex @samp{mh-sending-mail} customization group
3934@cindex customization group, @samp{mh-sending-mail}
3935
3936In addition, several options from the @samp{mh-sending-mail}
3937customization group are useful when sending mail or replying to mail.
3938They are summarized in the following table.
3939
3940@vtable @code
3941@item mh-compose-forward-as-mime-flag
3942On means that messages are forwarded as attachments (default:
3943@samp{on}).
3944@c -------------------------
3945@item mh-compose-letter-function
3946Hook run when starting a new draft (default: @code{nil}).
3947@c -------------------------
3948@item mh-compose-prompt-flag
3949On means prompt for header fields when composing a new draft (default:
3950@samp{off}).
3951@c -------------------------
3952@item mh-forward-subject-format
3953Format string for forwarded message subject (default: @code{"%s:
3954%s"}).
3955@c -------------------------
3956@item mh-insert-x-mailer-flag
3957On means append an @samp{X-Mailer:} header field to the header
3958(default: @samp{on}).
3959@c -------------------------
3960@item mh-redist-full-contents-flag
3961On means the @command{dist} command needs entire letter for
3962redistribution (default: @samp{off}).
3963@c -------------------------
3964@item mh-reply-default-reply-to
3965Sets the person or persons to whom a reply will be sent (default:
3966@samp{Prompt}).
3967@c -------------------------
3968@item mh-reply-show-message-flag
3969On means the MH-Show buffer is displayed using @kbd{r}
3970(@code{mh-reply}) (default: @samp{on}).
3971@end vtable
3972
3973The following hooks are available.
3974
3975@vtable @code
bfe16263
BW
3976@item mh-annotate-msg-hook
3977Hook run by @code{mh-annotate-msg} after annotation (default:
3978@code{nil}).
3979@c -------------------------
4009494e
GM
3980@item mh-forward-hook
3981Hook run by @code{mh-forward} on a forwarded letter (default:
3982@code{nil}).
3983@c -------------------------
3984@item mh-letter-mode-hook
3985Hook run by @code{mh-letter-mode} on a new letter (default:
3986@code{nil}).
3987@end vtable
3988
bfe16263
BW
3989@findex mh-annotate-msg
3990@vindex mh-annotate-list
3991@vindex mh-annotate-msg-hook
3992@vindex mh-current-folder
3993
3994A hook that is called whenever a message is sent and after the scan
3995lines and message are annotated is @code{mh-annotate-msg-hook}. Hook
3996functions can access the current folder name with
3997@code{mh-current-folder} and obtain the message numbers of the
3998annotated messages with @code{mh-annotate-list}.
3999
4000The rest of the functions and options introduced here are explained in
4001more detail in the following sections.
4009494e
GM
4002
4003@menu
4004* Composing::
4005* Replying::
4006* Forwarding::
4007* Redistributing::
4008* Editing Again::
4009@end menu
4010
4011@node Composing, Replying, Sending Mail, Sending Mail
4012@section Composing
4013
4014@cindex @file{.emacs}
4015@cindex MH-Folder mode
4016@cindex composing mail
4017@cindex draft
4018@cindex files, @file{.emacs}
4019@cindex modes, MH-Folder
4020@cindex sending mail
4021@findex mh-smail
4022@findex mh-smail-other-window
4023@kindex M-x mh-smail
4024@kindex M-x mh-smail-other-window
4025
4026Outside of an MH-Folder buffer, you must call either @kbd{M-x
4027mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
4028The former command always creates a two-window layout with the current
4029buffer on top and the draft on the bottom. Use the latter command if
4030you would rather preserve the window layout. You may find adding the
4031following key bindings to @file{~/.emacs} useful:
4032
4033@smalllisp
4034(global-set-key "\C-xm" 'mh-smail)
4035(global-set-key "\C-x4m" 'mh-smail-other-window)
4036@end smalllisp
4037
4038@cindex draft folder
4039@cindex MH-Letter mode
4040@cindex modes, MH-Letter
4041@findex mh-send
4042@kindex m
4043
4044From within a MH-Folder buffer, you can simply use the command @kbd{m}
4045(@code{mh-send}). However you invoke @code{mh-send}, your letter
4046appears in an Emacs buffer whose mode is MH-Letter (to see what the
4047buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows
4048you to edit your message, to check the validity of the recipients, to
4049insert attachments and other messages into your message, and to send
4050the message. We'll go more into depth about editing a
4051@dfn{draft}@footnote{I highly recommend that you use a @dfn{draft
4052folder} so that you can edit several drafts in parallel. To do so,
4053create a folder named @samp{+drafts} for example, and add the profile
4054component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a
4055message you're composing) in just a moment (@pxref{Editing Drafts}).
4056
4057@vindex mh-compose-prompt-flag
4058
4059If you prefer to be prompted for the recipient and subject fields
4060before the MH-Letter buffer appears, turn on the option
4061@code{mh-compose-prompt-flag}.
4062
4063@cindex header field, @samp{X-Mailer:}
4064@cindex @samp{X-Mailer:} header field
4065@vindex mh-insert-x-mailer-flag
4066
4067MH-E adds an @samp{X-Mailer:} header field to the header that includes
4068the version of MH-E and Emacs that you are using. If you don't want to
4069participate in our marketing, you can turn off the option
4070@code{mh-insert-x-mailer-flag}.
4071
4072@cindex @command{repl}
4073@cindex @file{components}
4074@cindex MH commands, @command{repl}
4075@cindex MH-Letter mode
4076@cindex Mail mode
4077@cindex files, @file{components}
4078@cindex modes, MH-Letter
4079@cindex modes, Mail
4080@vindex mail-mode-hook
4081@vindex mh-letter-mode-hook
4082@vindex text-mode-hook
4083
4084Two hooks are provided to run commands on your freshly created draft.
4085The first hook, @code{mh-letter-mode-hook}, allows you to do some
4086processing before editing a letter@footnote{Actually, because
4087MH-Letter mode inherits from Mail mode, the hooks
4088@code{text-mode-hook} and @code{mail-mode-hook} are run (in that
4089order) before @code{mh-letter-mode-hook}.}. For example, you may wish
4090to modify the header after @command{repl} has done its work, or you
4091may have a complicated @file{components} file and need to tell MH-E
4092where the cursor should go. Here's an example of how you would use
4093this hook.
4094
4095@findex mh-insert-signature, example
4096
4097@smalllisp
4098@group
4099(defvar letter-mode-init-done-flag nil
4100 "Non-nil means one-time MH-E settings have been made.")
4101
4102(defun my-mh-letter-mode-hook ()
4103 "Prepare letter for editing."
4104 (when (not letter-mode-init-done) ; @r{only need to bind the keys once}
4105 (local-set-key "\C-ctb" 'add-enriched-text)
4106 (local-set-key "\C-cti" 'add-enriched-text)
4107 (local-set-key "\C-ctf" 'add-enriched-text)
4108 (local-set-key "\C-cts" 'add-enriched-text)
4109 (local-set-key "\C-ctB" 'add-enriched-text)
4110 (local-set-key "\C-ctu" 'add-enriched-text)
4111 (local-set-key "\C-ctc" 'add-enriched-text)
4112 (setq letter-mode-init-done t))
4113 (save-excursion
4114 (goto-char (point-max)) ; @r{go to end of message to}
4115 (mh-insert-signature))) ; @r{insert signature}
4116
4117@i{Prepare draft for editing via mh-letter-mode-hook}
4118
4119@end group
4120@end smalllisp
4121
4122The function, @code{add-enriched-text} is defined in the example in
4123@ref{Adding Attachments}.
4124
4125@vindex mh-compose-letter-function
4126@vindex mh-letter-mode-hook
4127
4128The second hook, a function really, is
4129@code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
4130is called just before editing a new message; however, it is the last
4131function called before you edit your message. The consequence of this
4132is that you can write a function to write and send the message for
4133you. This function is passed three arguments: the contents of the
4134@samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields.
4135
4136@node Replying, Forwarding, Composing, Sending Mail
4137@section Replying to Mail
4138
4139@cindex @command{mhl}
4140@cindex @file{mhl.reply}
4141@cindex MH commands, @command{mhl}
4142@cindex files, @file{mhl.reply}
4143@cindex replying
4144@findex mh-reply
4145@kindex r
4146
4147To compose a reply to a message, use the @kbd{r} (@code{mh-reply})
4148command.
4149
4150When you reply to a message, you are first prompted with @samp{Reply
4151to whom?}. You have several choices here.
4152
4153@quotation
4154@multitable @columnfractions .20 .80
4155@c @headitem Response @tab Reply Goes To
4156@c XXX @headitem not yet supported by SourceForge's texi2pdf.
4157@item @b{Response} @tab @b{Reply Goes To}
4158@c -------------------------
4159@item @kbd{from}
4160@tab
4161The person who sent the message. This is the default, so @key{RET} is
4162sufficient.
4163@c -------------------------
4164@item @kbd{to}
4165@tab
4166Replies to the sender, plus all recipients in the @samp{To:} header field.
4167@c -------------------------
4168@item @kbd{cc}@*@kbd{all}
4169@tab
4170Forms a reply to the addresses in the @samp{Mail-Followup-To:} header
4171field if one exists; otherwise forms a reply to the sender, plus all
4172recipients.
4173@end multitable
4174@end quotation
4175
4176@cindex @command{repl}
4177@cindex MH commands, @command{repl}
4178@vindex mh-reply-default-reply-to
4179
4180Depending on your answer, @command{repl}@footnote{See the section
4181@uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in
4182the MH book.} is given a different argument to form your reply.
4183Specifically, a choice of @kbd{from} or none at all runs @samp{repl
4184-nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
4185either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you
4186find that most of the time you specify one of these choices when you
4187reply to a message, you can change the option
4188@code{mh-reply-default-reply-to} from its default value of
4189@samp{Prompt} to one of the choices listed above. You can always edit
4190the recipients in the draft.
4191
4192@cindex @samp{repl:} MH profile component
4193@cindex MH profile component, @samp{repl:}
4194@cindex MH-Letter mode
4195@cindex MH-Show mode
4196@cindex draft
4197@cindex modes, MH-Letter
4198@cindex modes, MH-Show
4199
4200Two windows are then created. One window contains the message to which
4201you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
4202(@pxref{Editing Drafts}), is in the other window. If the reply draft
4203was not one that you expected, check the things that affect the
4204behavior of @command{repl} which include the @samp{repl:} profile
4205component and the @file{replcomps} and @file{replgroupcomps} files.
4206
4207If you supply a prefix argument (as in @kbd{C-u r}), the message you
4208are replying to is inserted in your reply after having first been run
4209through @command{mhl} with the format file @file{mhl.reply}. See
4210@command{mhl}(1) or the section
4211@uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH
4212book to see how you can modify the default @file{mhl.reply} file.
4213
4214@vindex mh-yank-behavior
4215
4216Alternatively, you can customize the option @code{mh-yank-behavior}
4217and choose one of its @samp{Automatically} variants to do the same
4218thing. @xref{Inserting Letter}. If you do so, the prefix argument has
4219no effect.
4220
4221Another way to include the message automatically in your draft is to
4222use @samp{repl: -filter repl.filter} in your MH profile.
4223
4224@vindex mh-reply-show-message-flag
4225
4226If you include the message automatically, you can hide the MH-Show
4227buffer by turning off the option @code{mh-reply-show-message-flag}.
4228
4229If you wish to customize the header or other parts of the reply draft,
4230please see @command{repl}(1) and @code{mh-format}(5).
4231
4232@node Forwarding, Redistributing, Replying, Sending Mail
4233@section Forwarding Mail
4234
4235@cindex @command{forw}
4236@cindex draft
4237@cindex forwarding
4238@cindex MH commands, @command{forw}
4239@findex mh-forward
4240@kindex f
4241@vindex mh-forward-hook
4242
4243To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
4244are prompted for the @samp{To:} and @samp{cc:} recipients. You are
4245given a draft to edit that looks like it would if you had run the MH
4246command @command{forw}@footnote{See the section
4247@uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in
4248the MH book.}. You can then add some text (@pxref{Editing Drafts}).
4249You can forward several messages by using a range (@pxref{Ranges}).
4250All of the messages in the range are inserted into your draft. The
4251hook @code{mh-forward-hook} is called on the draft.
4252
4253@cindex @file{.mh_profile}
4254@cindex files, @file{.mh_profile}
4255@cindex MH profile component, @samp{forw:}
4256@cindex @samp{forw:} MH profile component
4257@vindex mh-compose-forward-as-mime-flag
4258
4259By default, the option @code{mh-compose-forward-as-mime-flag} is on
4260which means that the forwarded messages are included as attachments.
30864d5f
BW
4261These are inline attachments so the forwarded message should appear in
4262the body of your recipient's mail program. If you would prefer to
4263forward your messages verbatim (as text, inline), then turn off this
4264option. Forwarding messages verbatim works well for short, textual
4265messages, but your recipient won't be able to view any non-textual
4266attachments that were in the forwarded message. Be aware that if you
4267have @samp{forw: -mime} in your MH profile, then forwarded messages
4268will always be included as attachments regardless of the settings of
4269@code{mh-compose-forward-as-mime-flag}.
4009494e
GM
4270
4271@vindex mh-forward-subject-format
4272
4273The format of the @samp{Subject:} header field for forwarded messages
4274is controlled by the option @code{mh-forward-subject-format}. This
4275option is a string which includes two escapes (@samp{%s}). The first
4276@samp{%s} is replaced with the sender of the original message, and the
4277second one is replaced with the original @samp{Subject:}. The default
4278value of @code{"%s: %s"} takes a message with the header:
4279
4280@smallexample
4281@group
4282To: Bill Wohler <wohler@@stop.mail-abuse.org>
4283Subject: Re: 49er football
4284From: Greg DesBrisay <gd@@stop.mail-abuse.org>
4285@end group
4286@end smallexample
4287
4288and creates a subject header field of:
4289
4290@smallexample
4291Subject: Greg DesBrisay: Re: 49er football
4292@end smallexample
4293
4294@node Redistributing, Editing Again, Forwarding, Sending Mail
4295@section Redistributing Your Mail
4296
4297@cindex @command{dist}
4298@cindex MH commands, @command{dist}
4299@cindex redistributing
4300@findex mh-redistribute
4301@kindex M-d
4302
4303The command @kbd{M-d} (@code{mh-redistribute}) is similar in function
4304to forwarding mail, but it does not allow you to edit the message, nor
4305does it add your name to the @samp{From:} header field. It appears to
4306the recipient as if the message had come from the original sender.
4307When you run this command, you are prompted for the recipients.
4308
4309@findex mh-edit-again
4310@kindex e
4311
4312For more information on redistributing messages, see
4313@command{dist}(1). Also investigate the command @kbd{e}
4314(@code{mh-edit-again}) for another way to redistribute messages
4315(@pxref{Editing Again}).
4316
4317@cindex @command{send}
4318@cindex MH commands, @command{send}
4319@vindex mh-redist-full-contents-flag
4320
4321The option @code{mh-redist-full-contents-flag} must be turned on if
4322@command{dist}@footnote{See the section
4323@uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with
4324dist} in the MH book.} requires the whole letter for redistribution,
4325which is the case if @command{send}@footnote{See the section
4326@uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send}
4327in the MH book.} is compiled with the @sc{berk} option (which many
4328people abhor). If you find that MH will not allow you to redistribute
4329a message that has been redistributed before, turn off this option.
4330
bfe16263
BW
4331The hook @code{mh-annotate-msg-hook} is run after annotating the
4332message and scan line (@pxref{Sending Mail}).
4333
4009494e
GM
4334@node Editing Again, , Redistributing, Sending Mail
4335@section Editing Old Drafts and Bounced Messages
4336
4337@cindex @file{draft}
4338@cindex files, @file{draft}
4339@cindex re-editing drafts
4340@findex mh-edit-again
4341@kindex F v drafts
4342@kindex e
4343@kindex n
4344
4345If you don't complete a draft for one reason or another, and if the
4346draft buffer is no longer available, you can pick your draft up again
4347with @kbd{e} (@code{mh-edit-again}). If you don't use a draft
4348folder, your last @file{draft} file will be used. If you use draft
4349folders, you'll need to visit the draft folder with @kbd{F v drafts
4350@key{RET}}, use @kbd{n} to move to the appropriate message, and then
4351use @kbd{e} to prepare the message for editing.
4352
4353@kindex e
4354
4355The @kbd{e} command can also be used to take messages that were sent
4356to you and to send them to more people.
4357
4358@cindex Mailer-Daemon
4359@findex mh-extract-rejected-mail
4360@kindex C-c C-c
4361@kindex E
4362
4363Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
4364complained that your mail wasn't posted for some reason or another. In
4365this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare
4366the message for editing by removing the @i{Mailer-Daemon} envelope and
4367unneeded header fields. Fix whatever addressing problem you had, and
4368send the message again with @kbd{C-c C-c}.
4369
4370@node Editing Drafts, Aliases, Sending Mail, Top
4371@chapter Editing a Draft
4372
4373@cindex @samp{Letter} menu
4374@cindex MH-Letter mode
4375@cindex draft
4376@cindex editing draft
4377@cindex menu, @samp{Letter}
4378@cindex modes, MH-Letter
4379
4380When you edit a message that you want to send (called a @dfn{draft} in
4381this case), the mode used is MH-Letter. This mode provides several
4382commands in addition to the normal Emacs editing commands to help you
4383edit your draft. These can also be found in the @samp{Letter} menu.
4384
4385@table @kbd
4386@kindex @key{SPC}
4387@findex mh-letter-complete-or-space
4388@item @key{SPC}
4389Perform completion or insert space (@code{mh-letter-complete-or-space}).
4390@c -------------------------
4391@kindex M-@key{TAB}
4392@findex mh-letter-complete
4393@item M-@key{TAB}
4394Perform completion on header field or word preceding point
4395(@code{mh-letter-complete}).
4396@c -------------------------
4397@kindex , (comma)
4398@findex mh-letter-confirm-address
4399@item , (comma)
4400Flash alias expansion (@code{mh-letter-confirm-address}).
4401@c -------------------------
4402@kindex @key{TAB}
4403@findex mh-letter-next-header-field-or-indent
4404@item @key{TAB}
4405Cycle to next field (@code{mh-letter-next-header-field-or-indent}).
4406@c -------------------------
4407@kindex S-@key{TAB}
4408@findex mh-letter-previous-header-field
4409@item S-@key{TAB}
4410Cycle to the previous header field
4411(@code{mh-letter-previous-header-field}).
4412@c -------------------------
4413@kindex C-c ?
4414@findex mh-help
4415@item C-c ?
4416Display cheat sheet for the MH-E commands (@code{mh-help}).
4417@c -------------------------
4418@cindex @samp{Letter > Send This Draft} menu item
4419@cindex menu item, @samp{Letter > Send This Draft}
4420@kindex C-c C-c
4421@findex mh-send-letter
4422@item C-c C-c
4423Save draft and send message (@code{mh-send-letter}).
4424@c -------------------------
4425@kindex C-c C-d
4426@findex mh-insert-identity
4427@item C-c C-d
4428Insert fields specified by the given identity
4429(@code{mh-insert-identity}). @xref{Identities}.
4430@c -------------------------
4431@cindex @samp{Letter > Pull in All Compositions (MH)} menu item
4432@cindex menu item, @samp{Letter > Pull in All Compositions (MH)}
4433@kindex C-c C-e
4434@findex mh-mh-to-mime
4435@item C-c C-e
4436Compose @sc{mime} message from MH-style directives
4437(@code{mh-mh-to-mime}).
4438@c -------------------------
4439@kindex C-c C-f C-a
4440@kindex C-c C-f a
4441@findex mh-to-field
4442@item C-c C-f C-a
4443@itemx C-c C-f a
4444Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}).
4445@c -------------------------
4446@kindex C-c C-f C-b
4447@kindex C-c C-f b
4448@item C-c C-f C-b
4449@itemx C-c C-f b
4450Move to @samp{Bcc:} header field (@code{mh-to-field}).
4451@c -------------------------
4452@kindex C-c C-f C-c
4453@kindex C-c C-f c
4454@item C-c C-f C-c
4455@itemx C-c C-f c
4456Move to @samp{Cc:} header field (@code{mh-to-field}).
4457@c -------------------------
4458@kindex C-c C-f C-d
4459@kindex C-c C-f d
4460@item C-c C-f C-d
4461@itemx C-c C-f d
4462Move to @samp{Dcc:} header field (@code{mh-to-field}).
4463@c -------------------------
4464@kindex C-c C-f C-f
4465@kindex C-c C-f f
4466@findex mh-to-fcc
4467@item C-c C-f C-f
4468@itemx C-c C-f f
4469Move to @samp{Fcc:} header field (@code{mh-to-fcc}).
4470@c -------------------------
4471@kindex C-c C-f C-l
4472@kindex C-c C-f l
4473@item C-c C-f C-l
4474@itemx C-c C-f l
4475Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}).
4476@c -------------------------
4477@kindex C-c C-f C-m
4478@kindex C-c C-f m
4479@item C-c C-f C-m
4480@itemx C-c C-f m
4481Move to @samp{From:} header field (@code{mh-to-field}).
4482@c -------------------------
4483@kindex C-c C-f C-r
4484@kindex C-c C-f r
4485@item C-c C-f C-r
4486@itemx C-c C-f r
4487Move to @samp{Reply-To:} header field (@code{mh-to-field}).
4488@c -------------------------
4489@kindex C-c C-f C-s
4490@kindex C-c C-f s
4491@item C-c C-f C-s
4492@itemx C-c C-f s
4493Move to @samp{Subject:} header field (@code{mh-to-field}).
4494@c -------------------------
4495@kindex C-c C-f C-t
4496@kindex C-c C-f t
4497@item C-c C-f C-t
4498@itemx C-c C-f t
4499Move to @samp{To:} header field (@code{mh-to-field}).
4500@c -------------------------
4501@cindex @samp{Letter > Insert a Message...} menu item
4502@cindex menu item, @samp{Letter > Insert a Message...}
4503@kindex C-c C-i
4504@findex mh-insert-letter
4505@item C-c C-i
4506Insert a message (@code{mh-insert-letter}).
4507@c -------------------------
4508@kindex C-c C-m C-e
4509@findex mh-mml-secure-message-encrypt
4510@item C-c C-m C-e
4511Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4512@c -------------------------
4513@cindex @samp{Letter > Compose Forward...} menu item
4514@cindex menu item, @samp{Letter > Compose Forward...}
4515@kindex C-c C-m C-f
4516@kindex C-c C-m f
4517@findex mh-compose-forward
4518@item C-c C-m C-f
4519@itemx C-c C-m f
4520Add tag to forward a message (@code{mh-compose-forward}).
4521@c -------------------------
4522@cindex @samp{Letter > Compose Get File (MH)...} menu item
4523@cindex menu item, @samp{Letter > Compose Get File (MH)...}
4524@kindex C-c C-m C-g
4525@kindex C-c C-m g
4526@findex mh-mh-compose-anon-ftp
4527@item C-c C-m C-g
4528@itemx C-c C-m g
4529Add tag to include anonymous ftp reference to a file
4530(@code{mh-mh-compose-anon-ftp}).
4531@c -------------------------
4532@cindex @samp{Letter > Compose Insertion...} menu item
4533@cindex menu item, @samp{Letter > Compose Insertion...}
4534@kindex C-c C-m C-i
4535@kindex C-c C-m i
4536@findex mh-compose-insertion
4537@item C-c C-m C-i
4538@itemx C-c C-m i
4539Add tag to include a file such as an image or sound
4540(@code{mh-compose-insertion}).
4541@c -------------------------
4542@cindex @samp{Letter > Pull in All Compositions (MML)} menu item
4543@cindex menu item, @samp{Letter > Pull in All Compositions (MML)}
4544@kindex C-c C-m C-m
4545@kindex C-c C-m m
4546@findex mh-mml-to-mime
4547@item C-c C-m C-m
4548@itemx C-c C-m m
4549Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}).
4550@c -------------------------
4551@kindex C-c C-m C-n
4552@kindex C-c C-m n
4553@findex mh-mml-unsecure-message
4554@item C-c C-m C-n
4555@itemx C-c C-m n
4556Remove any secure message tags (@code{mh-mml-unsecure-message}).
4557@c -------------------------
4558@kindex C-c C-m C-s
4559@findex mh-mml-secure-message-sign
4560@item C-c C-m C-s
4561Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4562@c -------------------------
4563@cindex @samp{Letter > Compose Compressed tar (MH)...} menu item
4564@cindex menu item, @samp{Letter > Compose Compressed tar (MH)...}
4565@kindex C-c C-m C-t
4566@kindex C-c C-m t
4567@findex mh-mh-compose-external-compressed-tar
4568@item C-c C-m C-t
4569@itemx C-c C-m t
4570Add tag to include anonymous ftp reference to a compressed tar file
4571(@code{mh-mh-compose-external-compressed-tar}).
4572@c -------------------------
4573@cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item
4574@cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)}
4575@kindex C-c C-m C-u
4576@kindex C-c C-m u
4577@findex mh-mh-to-mime-undo
4578@item C-c C-m C-u
4579@itemx C-c C-m u
4580Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}).
4581@c -------------------------
4582@kindex C-c C-m C-x
4583@kindex C-c C-m x
4584@findex mh-mh-compose-external-type
4585@item C-c C-m C-x
4586@itemx C-c C-m x
4587Add tag to refer to a remote file
4588(@code{mh-mh-compose-external-type}).
4589@c -------------------------
4590@kindex C-c C-m e e
4591@findex mh-mml-secure-message-encrypt
4592@item C-c C-m e e
4593Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}).
4594@c -------------------------
4595@kindex C-c C-m e s
4596@findex mh-mml-secure-message-signencrypt
4597@item C-c C-m e s
4598Add tag to encrypt and sign the message@*
4599(@code{mh-mml-secure-message-signencrypt}).
4600@c -------------------------
4601@kindex C-c C-m s e
4602@findex mh-mml-secure-message-signencrypt
4603@item C-c C-m s e
4604Add tag to encrypt and sign the message@*
4605(@code{mh-mml-secure-message-signencrypt}).
4606@c -------------------------
4607@kindex C-c C-m s s
4608@findex mh-mml-secure-message-sign
4609@item C-c C-m s s
4610Add tag to sign the message (@code{mh-mml-secure-message-sign}).
4611@c -------------------------
4612@cindex @samp{Letter > Split Current Line} menu item
4613@cindex menu item, @samp{Letter > Split Current Line}
4614@kindex C-c C-o
4615@findex mh-open-line
4616@item C-c C-o
4617Insert a newline and leave point before it (@code{mh-open-line}).
4618@c -------------------------
4619@cindex @samp{Letter > Kill This Draft} menu item
4620@cindex menu item, @samp{Letter > Kill This Draft}
4621@kindex C-c C-q
4622@findex mh-fully-kill-draft
4623@item C-c C-q
4624Quit editing and delete draft message (@code{mh-fully-kill-draft}).
4625@c -------------------------
4626@cindex @samp{Letter > Insert Signature} menu item
4627@cindex menu item, @samp{Letter > Insert Signature}
4628@kindex C-c C-s
4629@findex mh-insert-signature
4630@item C-c C-s
4631Insert signature in message (@code{mh-insert-signature}).
4632@c -------------------------
4633@kindex C-c C-t
4634@findex mh-letter-toggle-header-field-display
4635@item C-c C-t
4636Toggle display of header field at point
4637(@code{mh-letter-toggle-header-field-display}).
4638@c -------------------------
4639@cindex @samp{Letter > Check Recipient} menu item
4640@cindex menu item, @samp{Letter > Check Recipient}
4641@kindex C-c C-w
4642@findex mh-check-whom
4643@item C-c C-w
4644Verify recipients, showing expansion of any aliases
4645(@code{mh-check-whom}).
4646@c -------------------------
4647@cindex @samp{Letter > Yank Current Message} menu item
4648@cindex menu item, @samp{Letter > Yank Current Message}
4649@kindex C-c C-y
4650@findex mh-yank-cur-msg
4651@item C-c C-y
4652Insert the current message into the draft buffer
4653(@code{mh-yank-cur-msg}).
4654@c -------------------------
4655@kindex C-c M-d
4656@findex mh-insert-auto-fields
4657@item C-c M-d
4658Insert custom fields if recipient is found in
4659@code{mh-auto-fields-list} (@code{mh-insert-auto-fields}).
4660@xref{Identities}.
4661@end table
4662
4663@cindex @samp{mh-letter} customization group
4664@cindex customization group, @samp{mh-letter}
4665
4666Several options from the @samp{mh-letter} customization group are used
4667while editing a draft.
4668
4669@vtable @code
4670@item mh-compose-insertion
4671Type of @sc{mime} message tags in messages (default: @samp{MML} if
4672available; otherwise @samp{MH}).
4673@c -------------------------
4674@item mh-compose-skipped-header-fields
4675List of header fields to skip over when navigating in draft (default:
4676@code{'("From"} @code{"Organization"} @code{"References"}
4677@code{"In-Reply-To"} @code{"X-Face"} @code{"Face"}
4678@code{"X-Image-URL"} @code{"X-Mailer")}.
4679@c -------------------------
4680@item mh-compose-space-does-completion-flag
4681On means @key{SPC} does completion in message header (default:
4682@samp{off}).
4683@c -------------------------
4684@item mh-delete-yanked-msg-window-flag
4685On means delete any window displaying the message (default: @samp{off}).
4686@c -------------------------
4687@item mh-extract-from-attribution-verb
4688Verb to use for attribution when a message is yanked by @kbd{C-c C-y}
4689(default: @code{"wrote:"}).
4690@c -------------------------
4691@item mh-ins-buf-prefix
4692String to put before each line of a yanked or inserted message
4693(default: @code{"> "}).
4694@c -------------------------
4695@item mh-letter-complete-function
4696Function to call when completing outside of address or folder fields
4697(default: @code{ispell-complete-word}).
4698@c -------------------------
4699@item mh-letter-fill-column
4700Fill column to use in MH-Letter mode (default: 72).
4701@c -------------------------
4702@item mh-mml-method-default
4703Default method to use in security tags (default: @samp{PGP (MIME)} if
4704support for it is available; otherwise @samp{None}).
4705@c -------------------------
4706@item mh-signature-file-name
4707Source of user's signature (default: @code{"~/.signature"}).
4708@c -------------------------
4709@item mh-signature-separator-flag
4710On means a signature separator should be inserted (default:
4711@samp{on}).
4712@c -------------------------
4713@item mh-x-face-file
4714File containing X-Face or Face header field to insert in outgoing mail.
4715(default: @code{"~/.face"}).
4716@c -------------------------
4717@item mh-yank-behavior
4718Controls which part of a message is yanked by @kbd{C-c C-y} (default:
4719@samp{Body With Attribution}).
4720@end vtable
4721
4722The following hooks are available.
4723
4724@vtable @code
4725@item mail-citation-hook
4726Hook for modifying a citation just inserted in the mail buffer
4727(default: @code{nil}).
4728@c -------------------------
4729@item mh-before-send-letter-hook
4730Hook run at the beginning of the @kbd{C-c C-c} command (default:
4731@samp{nil}).
4732@c -------------------------
4733@item mh-mh-to-mime-hook
4734Hook run on the formatted letter by @kbd{C-c C-e} (default:
4735@samp{nil}).
4736@c -------------------------
4737@item mh-insert-signature-hook
4738Hook run by @kbd{C-c C-s} after signature has been inserted (default:
4739@code{nil}).
4740@end vtable
4741
4742The following face is available.
4743
4744@vtable @code
4745@item mh-letter-header-field
4746Editable header field value face in draft buffers.
4747@end vtable
4748
4749The commands and options introduced here are explained in more
4750detail in the following sections.
4751
4752@menu
4753* Editing Message::
4754* Inserting Letter::
4755* Inserting Messages::
4756* Signature::
4757* Picture::
4758* Adding Attachments::
4759* Sending PGP::
4760* Checking Recipients::
4761* Sending Message::
4762* Killing Draft::
4763@end menu
4764
4765@node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts
4766@section Editing the Message
4767
4768@cindex @samp{Bcc:} header field
4769@cindex @samp{Cc:} header field
4770@cindex @samp{Dcc:} header field
4771@cindex @samp{From:} header field
4772@cindex @samp{Mail-Followup-To:} header field
4773@cindex @samp{Mail-Reply-To:} header field
4774@cindex @samp{Reply-To:} header field
4775@cindex @samp{Subject:} header field
4776@cindex @samp{To:} header field
4777@cindex editing header
4778@cindex header field, @samp{Bcc:}
4779@cindex header field, @samp{Cc:}
4780@cindex header field, @samp{Dcc:}
4781@cindex header field, @samp{From:}
4782@cindex header field, @samp{Mail-Followup-To:}
4783@cindex header field, @samp{Mail-Reply-To:}
4784@cindex header field, @samp{Reply-To:}
4785@cindex header field, @samp{Subject:}
4786@cindex header field, @samp{To:}
4787@findex mh-to-field
4788@kindex C-c C-f C-t
4789@kindex C-c C-f t
4790
4791Because the header is part of the message, you can edit the header
4792fields as you wish. However, several convenience commands exist to
4793help you create and edit them. For example, the command @kbd{C-c C-f
4794C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the
4795cursor to the @samp{To:} header field, creating it if necessary. The
4796commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:},
4797@samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To},
4798@samp{Bcc:}, and @samp{Dcc:} header fields are similar.
4799
4800@findex mh-to-fcc
4801@kindex C-c C-f C-f
4802@kindex C-c C-f f
4803
4804One command behaves differently from the others, namely, @kbd{C-c C-f
4805C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command
4806will prompt you for the folder name in which to file a copy of the
4807draft. @xref{Folder Selection}.
4808
4809@findex indent-relative
4810@findex mh-letter-next-header-field-or-indent
4811@findex mh-letter-previous-header-field
4812@kindex @key{TAB}
4813@kindex S-@key{TAB}
4814@vindex mh-compose-skipped-header-fields
4815@vindex mh-letter-header-field
4816
4817Within the header of the message, the command@* @key{TAB}
4818(@code{mh-letter-next-header-field-or-indent}) moves between fields
4819that are highlighted with the face @code{mh-letter-header-field},
4820skipping those fields listed in
4821@code{mh-compose-skipped-header-fields}. After the last field, this
4822command then moves point to the message body before cycling back to
4823the first field. If point is already past the first line of the
4824message body, then this command indents by calling
4825@code{indent-relative} with the given prefix argument. The command
4826@kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves
4827backwards between the fields and cycles to the body of the message
4828after the first field. Unlike the command @key{TAB}, it will always
4829take point to the last field from anywhere in the body.
4830
4831@cindex alias completion
4832@cindex completion
4833@cindex spell check
4834@findex ispell-complete-word
4835@findex mh-letter-complete
4836@findex mh-letter-complete-or-space
4837@findex mh-letter-confirm-address
4838@kindex , (comma)
4839@kindex @key{SPC}
4840@kindex M-@key{TAB}
4841@vindex mh-alias-flash-on-comma
4842@vindex mh-compose-space-does-completion-flag
4843@vindex mh-letter-complete-function
4844
4845If the field contains addresses (for example, @samp{To:} or
4846@samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command
4847@kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias
4848completion (@pxref{Aliases}). In the body of the message,
4849@kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead,
4850which is set to @samp{'ispell-complete-word} by default. The command
4851@kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument
4852that is passed to the @code{mh-letter-complete-function}. In addition,
4853turn on the option @code{mh-compose-space-does-completion-flag} to use
4854the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform
4855completion in the header as well; use a prefix argument to specify
4856more than one space. Addresses are separated by a comma; when you
4857press the comma, the command @code{mh-letter-confirm-address} flashes
4858the alias expansion in the minibuffer if
4859@code{mh-alias-flash-on-comma} is turned on.
4860
4861@c XXX Document the replacement for the inaccessible 'long argument.
4862
4863@findex mh-letter-toggle-header-field-display
4864@kindex C-c C-t
4865
4866Use the command @kbd{C-c C-t}
4867@code{mh-letter-toggle-header-field-display} to display truncated
4868header fields. This command is a toggle so entering it again will hide
4869the field. This command takes a prefix argument: if negative then the
4870field is hidden, if positive then the field is displayed (for example,
4871@kbd{C-u C-c C-t}).
4872
4873Be sure to leave a row of dashes or a blank line between the header
4874and the body of the message.
4875
4876@vindex mh-letter-fill-column
4877
4878The body of the message is edited as you would edit any Emacs buffer
4879although there are a few commands and options to assist you. You can
4880change the fill column in MH-Letter mode with the option
4881@code{mh-letter-fill-column}. By default, this option is 72 to allow
4882others to quote your message without line wrapping.
4883
4884@cindex filling paragraphs
4885@cindex paragraphs, filling
4886@findex fill-paragraph
4887@kindex M-q
4888@vindex mh-ins-buf-prefix
4889
4890You'll often include messages that were sent from user agents that
4891haven't yet realized that paragraphs consist of more than a single
4892line. This makes for long lines that wrap in an ugly fashion. You'll
4893find that @kbd{M-q} (@code{fill-paragraph}) works well even on these
4894quoted messages, even if they are nested, just as long as all of the
4895quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting
4896Letter}). For example, let's assume you have the following in your
4897draft:
4898
4899@smallexample
4900@group
4901> Hopefully this gives you an idea of what I'm currently doing. I'm \
4902not sure yet whether I'm completely satisfied with my setup, but \
4903it's worked okay for me so far.
4904@end group
4905@end smallexample
4906
4907Running @kbd{M-q} on this paragraph produces:
4908
4909@smallexample
4910@group
4911> Hopefully this gives you an idea of what I'm currently doing. I'm not
4912> sure yet whether I'm completely satisfied with my setup, but it's
4913> worked okay for me so far.
4914@end group
4915@end smallexample
4916
4917@findex mh-open-line
4918@findex open-line
4919@kindex C-c C-o
4920@kindex C-o
4921
4922The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the
4923command @kbd{C-o} (@code{open-line}) in that it inserts a newline
4924after point. It differs in that it also inserts the right number of
4925quoting characters and spaces so that the next line begins in the same
4926column as it was. This is useful when breaking up paragraphs in
4927replies. For example, if this command was used when point was after
4928the first period in the paragraph above, the result would be this:
4929
4930@smallexample
4931@group
4932> Hopefully this gives you an idea of what I'm currently doing.
4933
4934> I'm not
4935> sure yet whether I'm completely satisfied with my setup, but it's
4936> worked okay for me so far.
4937@end group
4938@end smallexample
4939
4940@node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
4941@section Inserting Letter to Which You're Replying
4942
4943@cindex inserting messages
4944@cindex replying to messages
4945@cindex yanking messages
4946@findex mh-yank-cur-msg
4947@kindex C-c C-y
4948@vindex mh-ins-buf-prefix
4949
4950It is often useful to insert a snippet of text from a letter that
4951someone mailed to provide some context for your reply. The command
4952@kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an
4953attribution, yanking a portion of text from the message to which
4954you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
4955before each line.
4956
4957@smallexample
4958@group
4959Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4960
4961> Hopefully this gives you an idea of what I'm currently doing. I'm not
4962> sure yet whether I'm completely satisfied with my setup, but it's
4963> worked okay for me so far.
4964@end group
4965@end smallexample
4966
4967@vindex mh-extract-from-attribution-verb
4968
4969The attribution consists of the sender's name and email address
4970followed by the content of the option
4971@code{mh-extract-from-attribution-verb}. This option can be set to
4972