Mercurial > emacs
annotate doc/misc/mh-e.texi @ 98468:bc63ca36bd15
* faces.el (inhibit-frame-set-background-mode): New var.
(frame-set-background-mode): Use it to avoid a loop in
face-spec-recalc.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 02 Oct 2008 20:19:11 +0000 |
parents | ddacedfb951c |
children | 6de181810d0f |
rev | line source |
---|---|
84306 | 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 | |
84329
3d431f1997d8
(setfilename): Go up one more level to ../../info.
Glenn Morris <rgm@gnu.org>
parents:
84306
diff
changeset
|
6 @setfilename ../../info/mh-e |
84306 | 7 @settitle The MH-E Manual |
8 @c %**end of header | |
9 | |
10 @c Version of the software and manual. | |
97555 | 11 @set VERSION 8.1 |
84306 | 12 @c Edition of the manual. It is either empty for the first edition or |
13 @c has the form ", nth Edition" (without the quotes). | |
14 @set EDITION | |
97555 | 15 @set UPDATED 2008-08-18 |
16 @set UPDATE-MONTH August, 2008 | |
84306 | 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 | |
24 This is version @value{VERSION}@value{EDITION} of @cite{The MH-E | |
25 Manual}, last updated @value{UPDATED}. | |
26 | |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
27 Copyright @copyright{} 1995, 2001, 2002, 2003, 2005, 2006, 2007, 2008 |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
28 Free Software Foundation, Inc. |
84306 | 29 |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
30 @c This dual license has been agreed upon by the FSF. |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
31 |
84306 | 32 @quotation |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
33 Permission is granted to copy, distribute and/or modify this document |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
34 under the terms of either: |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
35 |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
36 @enumerate a |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
37 @item |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
38 the GNU Free Documentation License, Version 1.2 or any later version |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
39 published by the Free Software Foundation; with no Invariant Sections, |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
40 with the Front-Cover texts being ``A GNU Manual,'' and with the |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
41 Back-Cover Texts as in (a) below. A copy of the license is included in |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
42 the section entitled ``GNU Free Documentation License.'' |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
43 |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
44 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
45 modify this GNU manual. Buying copies from the FSF supports it in |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
46 developing GNU and promoting software freedom.'' |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
47 |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
48 @item |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
49 the GNU General Public License as published by the Free Software |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
50 Foundation; either version 3, or (at your option) any later version. A |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
51 copy of the license is included in the section entitled ``GNU General |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
52 Public License.'' |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
53 @end enumerate |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
54 |
84306 | 55 @end quotation |
56 @end copying | |
57 | |
58 @c Info Directory Entry | |
59 @dircategory Emacs | |
60 @direntry | |
61 * MH-E: (mh-e). Emacs interface to the MH mail system. | |
62 @end direntry | |
63 | |
64 @c Title Page | |
65 @setchapternewpage odd | |
66 @titlepage | |
67 @title The MH-E Manual | |
68 @subtitle Version @value{VERSION}@value{EDITION} | |
69 @subtitle @value{UPDATE-MONTH} | |
70 @author Bill Wohler | |
71 | |
72 @c Copyright Page | |
73 @page | |
74 @vskip 0pt plus 1filll | |
75 @insertcopying | |
76 @end titlepage | |
77 | |
78 @ifnottex | |
79 @html | |
80 <!-- | |
81 @end html | |
82 @node Top, Preface, (dir), (dir) | |
83 @top The MH-E Manual | |
84 @html | |
85 --> | |
86 @end html | |
87 @insertcopying | |
88 @end ifnottex | |
89 | |
90 @c Table of Contents | |
91 @contents | |
92 | |
93 @html | |
94 <!-- | |
95 @end html | |
96 | |
97 @menu | |
98 * Preface:: Preface | |
99 * Conventions:: GNU Emacs Terms and Conventions | |
100 * Getting Started:: Getting Started | |
101 * Tour Through MH-E:: Tour Through MH-E | |
102 * Using This Manual:: Using This Manual | |
103 * Incorporating Mail:: Incorporating Mail | |
104 * Reading Mail:: Reading Mail | |
105 * Folders:: Organizing Your Mail with Folders | |
106 * Sending Mail:: Sending Mail | |
107 * Editing Drafts:: Editing a Draft | |
108 * Aliases:: Aliases | |
109 * Identities:: Identities | |
110 * Speedbar:: The Speedbar | |
111 * Menu Bar:: The Menu Bar | |
112 * Tool Bar:: The Tool Bar | |
113 * Searching:: Searching Through Messages | |
114 * Threading:: Viewing Message Threads | |
115 * Limits:: Limiting Display | |
116 * Sequences:: Using Sequences | |
117 * Junk:: Dealing With Junk Mail | |
118 * Miscellaneous:: Miscellaneous Commands, Variables, and Buffers | |
119 * Scan Line Formats:: Scan Line Formats | |
120 * Procmail:: Reading Mailing Lists Effectively | |
121 * Odds and Ends:: Odds and Ends | |
122 * History:: History of MH-E | |
123 * GFDL:: GNU Free Documentation License | |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
124 * GPL:: GNU General Public License |
84306 | 125 * Key Index:: Key (Character) Index |
126 * Command Index:: Command Index | |
127 * Option Index:: Option (Variable) Index | |
128 * Concept Index:: Concept Index | |
129 | |
130 @detailmenu | |
131 --- The Detailed Node Listing --- | |
132 | |
133 Tour Through MH-E | |
134 | |
135 * Sending Mail Tour:: | |
136 * Reading Mail Tour:: | |
137 * Processing Mail Tour:: | |
138 * Leaving MH-E:: | |
139 * More About MH-E:: | |
140 | |
141 Using This Manual | |
142 | |
143 * Options:: | |
144 * Ranges:: | |
145 * Folder Selection:: | |
146 | |
147 Reading Your Mail | |
148 | |
149 * Viewing:: | |
150 * Viewing Attachments:: | |
151 * HTML:: | |
152 * Digests:: | |
153 * Reading PGP:: | |
154 * Printing:: | |
155 * Files and Pipes:: | |
156 * Navigating:: | |
157 * Miscellaneous Commands and Options:: | |
158 | |
159 Sending Mail | |
160 | |
161 * Composing:: | |
162 * Replying:: | |
163 * Forwarding:: | |
164 * Redistributing:: | |
165 * Editing Again:: | |
166 | |
167 Editing a Draft | |
168 | |
169 * Editing Message:: | |
170 * Inserting Letter:: | |
171 * Inserting Messages:: | |
172 * Signature:: | |
173 * Picture:: | |
174 * Adding Attachments:: | |
175 * Sending PGP:: | |
176 * Checking Recipients:: | |
177 * Sending Message:: | |
178 * Killing Draft:: | |
179 | |
180 Odds and Ends | |
181 | |
182 * Bug Reports:: | |
183 * Mailing Lists:: | |
184 * MH FAQ and Support:: | |
185 * Getting MH-E:: | |
186 | |
187 History of MH-E | |
188 | |
189 * From Brian Reid:: | |
190 * From Jim Larus:: | |
191 * From Stephen Gildea:: | |
192 * From Bill Wohler:: | |
193 | |
194 @end detailmenu | |
195 @end menu | |
196 | |
197 @html | |
198 --> | |
199 @end html | |
200 | |
201 @node Preface, Conventions, Top, Top | |
202 @unnumbered Preface | |
203 | |
204 @cindex Emacs | |
205 @cindex Unix commands, Emacs | |
206 @cindex preface | |
207 | |
208 This manual introduces another interface to the MH mail system that is | |
209 accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is | |
210 easy to use. I don't assume that you know GNU Emacs or even MH at this | |
211 point, since I didn't know either of them when I discovered MH-E. | |
212 However, MH-E was the tip of the iceberg, and I discovered more and | |
213 more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of | |
214 them. | |
215 | |
216 The MH-E package is distributed with GNU Emacs@footnote{Version | |
97555 | 217 @value{VERSION} of MH-E will appear in GNU Emacs 23.1. It is supported |
218 in GNU Emacs 21 and 22, as well as XEmacs 21 (except for versions | |
84306 | 219 21.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher, |
220 all versions of nmh, and GNU mailutils 1.0 and higher.}, so you | |
92984
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
221 shouldn't have to do anything special to use it. Gnus is also |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
222 required; version 5.10 or higher is recommended. This manual covers |
84306 | 223 MH-E version @value{VERSION}. To help you decide which version you |
224 have, see @ref{Getting Started}. | |
225 | |
226 @findex help-with-tutorial | |
227 @kindex C-h t | |
228 | |
229 If you don't already use GNU Emacs but want to learn more, you can | |
230 read an online tutorial by starting GNU Emacs and typing @kbd{C-h t} | |
231 (@code{help-with-tutorial}). (To learn about this notation, see | |
232 @ref{Conventions}.) If you want to take the plunge, consult the | |
233 @iftex | |
234 @cite{GNU Emacs Manual}, | |
235 @end iftex | |
236 @ifinfo | |
237 @ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual}, | |
238 @end ifinfo | |
239 @ifhtml | |
240 @uref{http://www.gnu.org/software/emacs/manual/html_node/, | |
241 @cite{GNU Emacs Manual}}, | |
242 @end ifhtml | |
243 from the Free Software Foundation. | |
244 | |
245 If more information is needed, you can go to the Unix manual pages of | |
246 the individual MH commands. When the name is not obvious, I'll guide | |
247 you to a relevant MH manual page that describes the action more fully. | |
248 | |
249 @cindex @cite{MH & nmh: Email for Users & Programmers} | |
250 @cindex MH book | |
251 @cindex info | |
252 @kindex C-h i | |
253 | |
254 This manual is available in both Info and online formats. The Info | |
255 version is distributed with Emacs and can be accessed with the | |
256 @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i | |
257 m mh-e @key{RET}}). The online version is available at | |
258 @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great | |
259 online resource is the book @uref{http://www.ics.uci.edu/~mh/book/, | |
260 @cite{MH & nmh: Email for Users & Programmers}} (also known as | |
261 @dfn{the MH book}). | |
262 | |
263 I hope you enjoy this manual! If you have any comments, or suggestions | |
264 for this document, please let me know. | |
265 | |
266 @cindex Bill Wohler | |
267 @cindex Wohler, Bill | |
268 | |
269 @noindent | |
270 Bill Wohler <@i{wohler at newt.com}>@* | |
271 8 February 1995@* | |
272 24 February 2006 | |
273 | |
274 @node Conventions, Getting Started, Preface, Top | |
275 @chapter GNU Emacs Terms and Conventions | |
276 | |
277 @cindex Emacs | |
278 @cindex Emacs, conventions | |
279 @cindex Emacs, terms | |
280 @cindex Unix commands, Emacs | |
281 @cindex conventions, Emacs | |
282 @cindex terms, Emacs | |
283 | |
284 If you're an experienced Emacs user, you can skip the following | |
285 conventions and definition of terms and go directly to the next | |
286 section (@pxref{Getting Started}). | |
287 | |
288 @cindex Emacs commands | |
289 @cindex MH commands | |
290 @cindex Unix commands | |
291 @cindex commands | |
292 @cindex commands, MH | |
293 @cindex commands, Unix | |
294 @cindex commands, shell | |
295 @cindex functions | |
296 @cindex shell commands | |
297 | |
298 In general, @dfn{functions} in this text refer to Emacs Lisp functions | |
299 that one would call from within Emacs Lisp programs (for example, | |
300 @code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those | |
301 things that are run by the user, such as @kbd{i} or @kbd{M-x | |
302 mh-inc-folder}. Programs outside of Emacs are specifically called MH | |
303 commands, shell commands, or Unix commands. | |
304 | |
305 @cindex conventions, key names | |
306 @cindex key names | |
307 | |
308 The conventions for key names are as follows: | |
309 | |
310 @table @kbd | |
311 @item C-x | |
312 Hold down the @key{CTRL} (Control) key and press the @kbd{x} key. | |
313 @c ------------------------- | |
314 @item M-x | |
315 Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key. | |
316 | |
317 Since some keyboards don't have a @key{META} key, you can generate | |
318 @kbd{M-x}, for example, by pressing @key{ESC} (Escape), | |
319 @emph{releasing it}, and then pressing the @kbd{x} key. | |
320 @c ------------------------- | |
321 @item @key{RET} | |
322 Press the @key{RETURN} or @key{ENTER} key. This is normally used to | |
323 complete a command. | |
324 @c ------------------------- | |
325 @item @key{SPC} | |
326 Press the space bar. | |
327 @c ------------------------- | |
328 @item @key{TAB} | |
329 Press the @key{TAB} key. | |
330 @c ------------------------- | |
331 @item @key{DEL} | |
332 Press the @key{DELETE} key. | |
333 @c ------------------------- | |
334 @item @key{BS} | |
335 Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or | |
336 earlier of Emacs, you will need to use the @key{DEL} key.}. | |
337 @end table | |
338 | |
339 @cindex Emacs, prefix argument | |
340 @cindex prefix argument | |
341 @kindex C-u | |
342 | |
343 A @dfn{prefix argument} allows you to pass an argument to any Emacs | |
344 function. To pass an argument, type @kbd{C-u} before the Emacs command | |
345 or keystroke. Numeric arguments can be passed as well. For example, to | |
346 insert five f's, use @kbd{C-u 5 f}. There is a default of four when | |
347 using @kbd{C-u}, and you can use multiple prefix arguments to provide | |
348 arguments of powers of four. To continue our example, you could insert | |
349 four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with | |
350 @kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative | |
351 arguments can also be inserted with the @key{META} key. Examples | |
352 include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which | |
353 specifies a negative argument with no particular value. | |
354 | |
355 @sp 1 | |
356 @center @strong{NOTE} | |
357 | |
358 @quotation | |
359 The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder | |
360 mode (@pxref{Reading Mail Tour}). In this mode, simply enter the | |
361 numerical argument before entering the command. | |
362 @end quotation | |
363 @sp 1 | |
364 | |
365 @cindex @file{.emacs} | |
366 @cindex Emacs, variables | |
367 @cindex files, @file{.emacs} | |
368 @cindex variables | |
369 @findex setq | |
370 | |
371 Emacs uses @dfn{variables} to hold values. These can be changed via | |
372 calls to the function @code{setq} in @file{~/.emacs}. | |
373 | |
374 @cindex Emacs, options | |
375 @cindex options | |
376 @findex customize-group | |
377 @findex customize-option | |
378 | |
379 Variables in MH-E that are normally modified by the user are called | |
380 @dfn{options} and are modified through the customize functions (such | |
381 as @kbd{M-x customize-option} or @kbd{M-x customize-group}). | |
382 @ifnothtml | |
383 @xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The | |
384 GNU Emacs Manual}. | |
385 @end ifnothtml | |
386 @ifhtml | |
387 See section | |
388 @uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html, | |
389 Easy Customization} in @cite{The GNU Emacs Manual}. | |
390 @end ifhtml | |
391 @xref{Options}. | |
392 | |
393 @cindex Emacs, faces | |
394 @cindex faces | |
395 @cindex highlighting | |
396 @findex customize-face | |
397 | |
398 You can specify various styles for displaying text using @dfn{faces}. | |
399 MH-E provides a set of faces that you can use to personalize the look | |
400 of your MH-E buffers. Use the command @kbd{M-x customize-face} to do | |
401 this. | |
402 @ifnothtml | |
403 @xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The | |
404 GNU Emacs Manual}. | |
405 @end ifnothtml | |
406 @ifhtml | |
407 See section | |
408 @uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html, | |
409 Face Customization} in @cite{The GNU Emacs Manual}. | |
410 @end ifhtml | |
411 | |
412 @cindex abnormal hooks | |
413 @cindex hooks | |
414 @cindex normal hooks | |
415 @findex add-hook | |
416 @findex customize-option | |
417 | |
418 Commands often offer @dfn{hooks} which enable you to extend or modify | |
419 the way a command works. | |
420 @ifnothtml | |
421 @ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU | |
422 Emacs Manual} | |
423 @end ifnothtml | |
424 @ifhtml | |
425 See section | |
426 @uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html, | |
427 Hooks} in @cite{The GNU Emacs Manual} | |
428 @end ifhtml | |
429 for a description about @dfn{normal hooks} and @dfn{abnormal hooks}. | |
430 MH-E uses normal hooks in nearly all cases, so you can assume that we | |
431 are talking about normal hooks unless we explicitly mention that a | |
432 hook is abnormal. We also follow the conventions described in that | |
433 section: the name of the abnormal hooks end in @code{-hooks} and all | |
434 the rest of the MH-E hooks end in @code{-hook}. You can add hooks with | |
435 either @code{customize-option} or @code{add-hook}. | |
436 | |
437 @cindex Emacs, mark | |
438 @cindex Emacs, point | |
439 @cindex Emacs, region | |
440 @cindex mark | |
441 @cindex point | |
442 @cindex region | |
443 @kindex C-@@ | |
444 @kindex C-@key{SPC} | |
445 | |
446 There are several other terms that are used in Emacs that you should | |
447 know. The @dfn{point} is where the cursor currently is. You can save | |
448 your current place in the file by setting a @dfn{mark}. This operation | |
449 is useful in several ways. The mark can be later used when defining a | |
450 @dfn{region}, which is the text between the point and mark. Many | |
451 commands operate on regions, such as those for deleting text or | |
452 filling paragraphs. A mark can be set with @kbd{C-@@} (or | |
453 @kbd{C-@key{SPC}}). | |
454 | |
455 @cindex completion | |
456 @cindex Emacs, completion | |
457 @cindex Emacs, file completion | |
458 @cindex Emacs, folder completion | |
459 @cindex Emacs, minibuffer | |
460 @cindex file completion | |
461 @cindex folder completion | |
462 @cindex minibuffer | |
463 @kindex SPC | |
464 @kindex TAB | |
465 | |
466 The @dfn{minibuffer} is the bottom line of the Emacs window, where all | |
467 prompting and multiple-character input is directed. You can use | |
468 @dfn{completion} to enter values such as folders. Completion means | |
469 that Emacs fills in text for you when you type @key{SPC} or @key{TAB}. | |
470 A second @key{SPC} or @key{TAB} will list all possibilities at that | |
471 point. | |
472 @ifnothtml | |
473 @xref{Completion, , Completion, emacs, The GNU Emacs Manual}. | |
474 @end ifnothtml | |
475 @ifhtml | |
476 See the section | |
477 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html, | |
478 Completion} in @cite{The GNU Emacs Manual}. | |
479 @end ifhtml | |
480 Note that @key{SPC} cannot be used for completing filenames and | |
481 folders. | |
482 | |
483 @findex help-with-tutorial | |
484 @kindex C-h t | |
485 @kindex M-x | |
486 | |
487 The minibuffer is also where you enter Emacs function names after | |
488 typing @kbd{M-x}. For example, in the preface, I mentioned that you | |
489 could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What | |
490 this means is that you can get a tutorial by typing either @kbd{C-h t} | |
491 or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted | |
492 for @samp{help-with-tutorial} in the minibuffer after typing | |
493 @kbd{M-x}. | |
494 | |
495 @cindex ~ | |
496 | |
497 The @samp{~} notation in filenames represents your home directory. | |
498 This notation is used by many shells including @command{bash}, | |
499 @code{tcsh}, and @command{csh}. It is analogous to the environment | |
500 variable @samp{$HOME}. For example, @file{~/.emacs} can be written | |
501 @file{$HOME/.emacs} or using the absolute path as in | |
502 @file{/home/wohler/.emacs} instead. | |
503 | |
504 @cindex Emacs, interrupting | |
505 @cindex Emacs, quitting | |
506 @cindex interrupting | |
507 @cindex quitting | |
508 | |
509 @i{In case of trouble:} Emacs can be interrupted at any time with | |
510 @kbd{C-g}. For example, if you've started a command that requests that | |
511 you enter something in the minibuffer, but then you change your mind, | |
512 type @kbd{C-g} and you'll be back where you started. If you want to | |
513 exit Emacs entirely, use @kbd{C-x C-c}. | |
514 | |
515 @node Getting Started, Tour Through MH-E, Conventions, Top | |
516 @chapter Getting Started | |
517 | |
518 @cindex MH-E, versions | |
519 @cindex history | |
520 @cindex versions of MH-E | |
521 | |
522 Because there are many old versions of MH-E out there, it is important | |
523 to know which version you have. I'll be talking about @w{Version 8} | |
524 which is pretty close to @w{Version 6} and @w{Version 7}. It differs | |
525 from @w{Version 4} and @w{Version 5} and is vastly different from | |
526 @w{Version 3}. @xref{History}. | |
527 | |
528 @findex mh-version | |
529 | |
530 To determine which version of MH-E that you have, enter @kbd{M-x | |
531 mh-version @key{RET}}. Hopefully it says that you're running | |
532 @w{Version @value{VERSION}} which is the latest version as of this | |
533 printing. | |
534 | |
535 If your version is much older than this, please consider upgrading. | |
536 You can have your system administrator upgrade the system-wide | |
537 version, or you can install your own personal version. It's really | |
538 quite easy. @xref{Getting MH-E}, for instructions for getting and | |
539 installing MH-E. | |
540 | |
541 If the @code{mh-version} command displays @samp{No MH variant | |
542 detected}@footnote{In very old versions of MH-E, you may get the error | |
543 message, @samp{Cannot find the commands `inc' and `mhl' and the file | |
544 `components'} if MH-E can't find MH. In this case, you need to update | |
545 MH-E, and you may need to install MH too. However, newer versions of | |
546 MH-E are better at finding MH if it is on your system.}, then you need | |
547 to install MH or tell MH-E where to find MH. | |
548 | |
549 @cindex Debian | |
550 @cindex nmh | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
551 @cindex GNU mailutils MH |
84306 | 552 |
553 If you don't have MH on your system already, you must install a | |
554 variant of MH. The Debian mh-e package does this for you automatically | |
555 (@pxref{Getting MH-E}). Most people use | |
556 @uref{http://www.nongnu.org/nmh/, nmh}, but you may be interested in | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
557 trying out @uref{http://www.gnu.org/software/mailutils/, GNU mailutils |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
558 MH}, which supports IMAP. Your GNU/Linux distribution probably has |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
559 packages for both of these. |
84306 | 560 |
561 @cindex @command{install-mh} | |
562 @cindex MH commands, @command{install-mh} | |
563 @cindex MH book | |
564 | |
565 If you've never run MH before, you need to run @command{install-mh} | |
566 from the shell before you continue. This sets up your personal MH | |
567 environment@footnote{See the section | |
568 @uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the | |
569 MH book.}. If you don't, you'll be greeted with the error message: | |
570 @samp{Install MH and run install-mh before running MH-E}. This is all | |
571 you need to know about MH to use MH-E, but the more you know about MH, | |
572 the more you can leverage its power. See the | |
573 @uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH. | |
574 | |
575 @cindex @samp{Path:} MH profile component | |
576 @cindex MH profile | |
577 @cindex MH profile component | |
578 @cindex MH profile component, @samp{Path:} | |
579 | |
580 Your MH environment includes your @dfn{MH profile} which is found in | |
581 the file @file{~/.mh_profile}. This file contains a number of @dfn{MH | |
582 profile components}. For example, the @samp{Path:} MH profile | |
583 component 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 | |
594 There are several options MH-E uses to interact with your MH | |
595 installation. The option @code{mh-variant} specifies the variant used | |
596 by MH-E (@pxref{Options}). The default setting of this option is | |
597 @samp{Auto-detect} which means that MH-E will automatically choose the | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
598 first of nmh, MH, or GNU mailutils MH that it finds in the directories |
84306 | 599 listed 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 | |
601 all, you may have to customize @code{mh-path} and add the directory in | |
602 which the command @command{mhparam} is located. If, on the other hand, | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
603 you have both nmh and GNU mailutils MH installed (for example) and |
84306 | 604 @code{mh-variant-in-use} was initialized to nmh but you want to use |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
605 GNU mailutils MH, then you can set @code{mh-variant} to |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
606 @samp{gnu-mh}. |
84306 | 607 |
608 @vindex mh-flists-present-flag | |
609 @vindex mh-lib | |
610 @vindex mh-lib-progs | |
611 @vindex mh-progs | |
612 | |
613 When @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 | |
624 Prior to version 8, it was often necessary to set some of these | |
625 variables in @file{~/.emacs}; now it is no longer necessary and can | |
626 actually 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 | |
646 In addition to setting variables that point to MH itself, MH-E also | |
647 sets a handful of variables that point to where you keep your mail. | |
648 During initialization, the function @code{mh-find-path} sets | |
649 @code{mh-user-path} from your @samp{Path:} MH profile component (but | |
650 defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder} | |
651 from @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 | |
655 after these variables have been set. This hook can be used the change | |
656 the value of these variables if you need to run with different values | |
657 between 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 | |
666 This chapter introduces some of the terms you'll need to know and then | |
667 takes you on a tour of MH-E@footnote{The keys mentioned in these | |
668 chapters refer to the default key bindings. If you've changed the | |
669 bindings, refer to the command summaries at the beginning of each | |
670 chapter for a mapping between default key bindings and function | |
671 names.}. When you're done, you'll be able to send, read, and file | |
672 mail, which is all that a lot of people ever do. But if you're the | |
673 curious or adventurous type, read the rest of the manual to be able to | |
674 use all the features of MH-E. I suggest you read this chapter first to | |
675 get 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 | |
695 Let's start our tour by sending ourselves a message which we can later | |
696 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program | |
697 to send messages. Your message appears in an Emacs buffer whose | |
698 mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a | |
699 particular type of text.} is MH-Letter. | |
700 | |
701 Enter 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 | |
703 carbon copies are to be sent, and on to the @samp{Subject:} field. | |
704 Enter @kbd{Test} or anything else that comes to mind. | |
705 | |
706 Press @key{TAB} again to move the cursor to the body of the message. | |
707 Enter some text, using normal Emacs commands. You should now have | |
708 something like this@footnote{If you're running Emacs under the X | |
709 Window System, then you would also see a menu bar and a tool bar. I've | |
710 left 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)------------------------- | |
721 To: wohler | |
722 cc: | |
723 Subject: Test | |
97555 | 724 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 725 -------- |
726 This is a test message to get the wheels churning...# | |
727 | |
728 | |
729 --:** @{draft@} All L5 (MH-Letter)---------------------------------- | |
730 Type 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 | |
735 Note the line of dashes that separates the header and the body of the | |
736 message. It is essential that these dashes (or a blank line) are | |
737 present or the body of your message will be considered to be part of | |
738 the 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 | |
746 There are several commands specific to MH-Letter mode@footnote{You can | |
747 get quick help for the commands used most often with @kbd{C-c ?} or | |
748 more complete help with the @kbd{C-h m} (@code{describe-mode}) | |
749 command.}, but at this time we'll only use @kbd{C-c C-c} to send your | |
750 message. 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 | |
765 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. | |
766 This 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 | |
769 prev} 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 | |
772 pick Ranges Sequences} in the MH book.} which prints a one-line | |
773 summary of each message) into a buffer called @samp{+inbox} whose | |
774 major 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 | |
785 The @kbd{M-x mh-rmail} command will show you only new mail, not mail | |
786 you have already read. If you were to run this tour again, you would | |
787 use @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 | |
795 You 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)--------- | |
805 To: wohler | |
806 Subject: Test | |
97555 | 807 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 808 Date: Fri, 17 Mar 2006 10:49:11 -0800 |
809 From: Bill Wohler <wohler@@stop.mail-abuse.org> | |
810 | |
811 This 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 | |
824 If 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 | |
834 The first thing we want to do is reply to the message that we sent | |
835 ourselves. Ensure that the cursor is still on the same line as your | |
836 test 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 | |
838 to the original sender only, to the sender and primary recipients, or | |
839 to the sender and all recipients. You can press @key{TAB} to see these | |
840 choices. If you simply press @key{RET}, you'll reply only to the | |
841 sender. Press @key{RET} now. | |
842 | |
843 You'll find yourself in an Emacs buffer similar to that when you were | |
844 sending the original message, like this: | |
845 | |
846 @cartouche | |
847 @smallexample | |
848 To: | |
849 cc: | |
850 Subject: Re: Test | |
851 In-reply-to: <31054.1142621351@@stop.mail-abuse.org> | |
852 References: <31054.1142621351@@stop.mail-abuse.org> | |
853 Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org> | |
854 message dated "Fri, 17 Mar 2006 10:49:11 -0800." | |
97555 | 855 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 856 -------- |
857 # | |
858 | |
859 --:-- @{draft@} All L10 (MH-Letter)---------------------------------- | |
860 To: wohler | |
861 Subject: Test | |
97555 | 862 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 863 Date: Fri, 17 Mar 2006 10:49:11 -0800 |
864 From: Bill Wohler <wohler@@stop.mail-abuse.org> | |
865 | |
866 This is a test message to get the wheels churning... | |
867 | |
868 --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- | |
869 Type 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 | |
886 By default, MH will not add you to the address list of your replies, | |
887 so if you find that the @samp{To:} header field is missing, don't | |
888 worry. 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 | |
890 move 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 | |
893 delete the previous character with @key{BS}. When you're finished | |
894 editing 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 | |
902 You'll often want to save messages that were sent to you in an | |
903 organized fashion. This is done with @dfn{folders}. You can use | |
904 folders to keep messages from your friends, or messages related to a | |
905 particular topic. With your cursor in the MH-Folder buffer and | |
906 positioned 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 | |
910 that a @samp{^} (caret) appears next to the message number, which | |
911 means that the message has been marked for refiling but has not yet | |
912 been refiled. We'll talk about how the refile is actually carried out | |
913 in 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 | |
924 Your previous reply is now waiting in the system mailbox. You | |
925 incorporate this mail into your MH-Folder buffer named @samp{+inbox} | |
926 with the @kbd{i} command. Do this now. After the mail is incorporated, | |
927 use @kbd{n} or @kbd{p} to move the cursor to the new message, and read | |
928 it with @key{RET}. Let's delete this message by typing @kbd{d}. Note | |
929 that a @samp{D} appears next to the message number. This means that | |
930 the message is marked for deletion but is not yet deleted. To perform | |
931 the deletion (and the refile we did previously), use the @kbd{x} | |
932 command. | |
933 | |
934 @findex mh-smail | |
935 @kindex m | |
936 @kindex M-x mh-smail | |
937 | |
938 If 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 | |
948 You can get a quick reminder about these commands by typing @kbd{?}. | |
949 This lists several @dfn{prefix characters}. To list the commands | |
950 available via the prefix characters, type the prefix character | |
951 followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is | |
952 available 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 | |
962 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c} | |
963 to 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 | |
966 perform 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 | |
974 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide) | |
975 the MH-E folder or delete it entirely with @kbd{C-x k}. You can then | |
976 later 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 | |
984 On the other hand, if you no longer want to use MH and MH-E, you can | |
985 take your mail with you. You can copy all of your mail into a single | |
986 file, mbox-style, by using the MH command @command{packf}. For | |
987 example, to create a file called @file{msgbox} with the messages in | |
988 your @samp{+inbox} folder, use @samp{packf +inbox}. The | |
989 @command{packf} command will append the messages to the file if it | |
990 already exists, so you can use @samp{folders -recurse -fast} in a | |
991 script 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 | |
997 These are the basic commands to get you going, but there are plenty | |
998 more. If you think that MH-E is for you, read the rest of the manual | |
999 to find out how you can: | |
1000 | |
1001 @itemize @bullet | |
1002 @item | |
1003 Print your messages (@pxref{Printing}). | |
1004 @c ------------------------- | |
1005 @item | |
1006 Edit messages and include your signature (@pxref{Editing Drafts}). | |
1007 @c ------------------------- | |
1008 @item | |
1009 Forward messages (@pxref{Forwarding}). | |
1010 @c ------------------------- | |
1011 @item | |
1012 Read digests (@pxref{Digests}). | |
1013 @c ------------------------- | |
1014 @item | |
1015 Edit bounced messages (@pxref{Editing Again}). | |
1016 @c ------------------------- | |
1017 @item | |
1018 Send multimedia messages (@pxref{Adding Attachments}). | |
1019 @c ------------------------- | |
1020 @item | |
1021 Read HTML messages (@pxref{HTML}). | |
1022 @c ------------------------- | |
1023 @item | |
1024 Use aliases and identities (see @ref{Aliases}, @pxref{Identities}). | |
1025 @c ------------------------- | |
1026 @item | |
1027 Create different views of your mail (see @ref{Threading}, @pxref{Limits}). | |
1028 @c ------------------------- | |
1029 @item | |
1030 Deal with junk mail (@pxref{Junk}). | |
1031 @c ------------------------- | |
1032 @item | |
1033 Handle signed and encrypted messages (see @ref{Reading PGP}, | |
1034 @pxref{Sending PGP}). | |
1035 @c ------------------------- | |
1036 @item | |
1037 Process mail that was sent with @command{shar} or @command{uuencode} | |
1038 (@pxref{Files and Pipes}). | |
1039 @c ------------------------- | |
1040 @item | |
1041 Use sequences conveniently (@pxref{Sequences}). | |
1042 @c ------------------------- | |
1043 @item | |
1044 Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool | |
1045 Bar}, @pxref{Menu Bar}). | |
1046 @c ------------------------- | |
1047 @item | |
1048 Show header fields in different fonts (@pxref{Reading Mail}). | |
1049 @c ------------------------- | |
1050 @item | |
1051 Find previously refiled messages (@pxref{Searching}). | |
1052 @c ------------------------- | |
1053 @item | |
1054 Place messages in a file (@pxref{Files and Pipes}). | |
1055 @end itemize | |
1056 | |
1057 Remember that you can also use MH commands when you're not running | |
1058 MH-E (and when you are!). | |
1059 | |
1060 @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top | |
1061 @chapter Using This Manual | |
1062 | |
1063 This chapter begins the meat of the manual which goes into more detail | |
1064 about 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 | |
1079 There are many commands, but don't get intimidated. There are command | |
1080 summaries at the beginning of each chapter. In case you have or would | |
1081 like to rebind the keys, the command summaries also list the | |
1082 associated Emacs Lisp function. Furthermore, even if you're stranded | |
1083 on a desert island with a laptop and are without your manuals, you can | |
1084 get 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 | |
1087 help appears in a buffer called @samp{*MH-E Help*} | |
1088 (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h | |
1089 i} to read this manual via Info. The online help is quite good; try | |
1090 running @kbd{C-h C-h}. This brings up a list of available help topics, | |
1091 one of which displays the documentation for a given key (like @kbd{C-h | |
1092 k C-n}). Another useful help feature is to view the manual section | |
1093 that describes a given key (such as @kbd{C-h K i}). In addition, | |
1094 review @ref{Conventions}, if any of the GNU Emacs conventions are | |
1095 strange to you. | |
1096 | |
1097 In addition to all of the commands, it is also possible to reconfigure | |
1098 MH-E to fit the needs of even the most demanding user. The following | |
1099 chapters also describe all of the options, show the defaults, and make | |
1100 recommendations for customization. | |
1101 | |
1102 However, when customizing your mail environment, first try to change | |
1103 what you want in MH, and only change MH-E if changing MH is not | |
1104 possible. That way you will get the same behavior inside and outside | |
1105 GNU Emacs. Note that MH-E does not provide hooks for customizations | |
1106 that 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 | |
1115 I hope I've included enough examples here to get you well on your way. | |
1116 If you want to explore Emacs Lisp further, a programming manual does | |
1117 exist, | |
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 | |
1122 online 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 | |
1125 can also order a printed manual, which has the desirable side-effect | |
1126 of helping to support the Free Software Foundation which made all this | |
1127 great 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 | |
1129 gnu.org}.} | |
1130 @end iftex | |
1131 @ifinfo | |
1132 @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU | |
1133 Emacs Lisp Reference Manual}, which may be available online in the | |
1134 Info system. It is also available online at | |
1135 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You | |
1136 can also order a printed manual, which has the desirable side-effect | |
1137 of helping to support the Free Software Foundation which made all this | |
1138 great 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 | |
1140 gnu.org}.} | |
1141 @end ifinfo | |
1142 @ifhtml | |
1143 @footnote{The | |
1144 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/, | |
1145 The GNU Emacs Lisp Reference Manual} may also be available online in | |
1146 the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can | |
1147 also order a printed manual, which has the desirable side-effect of | |
1148 helping to support the Free Software Foundation which made all this | |
1149 great 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 | |
1151 gnu.org}.} | |
1152 @end ifhtml | |
1153 and you can look at the code itself for examples. Look in the Emacs | |
1154 Lisp directory on your system (such as | |
1155 @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el} | |
1156 files there. When calling MH-E and other Emacs Lisp functions directly | |
1157 from Emacs Lisp code, you'll need to know the correct arguments. Use | |
1158 the online help for this. For example, try @kbd{C-h f | |
1159 mh-execute-commands @key{RET}}. If you write your own functions, | |
1160 please do not prefix your symbols (variables and functions) with | |
1161 @samp{mh-}. This prefix is reserved for the MH-E package. To avoid | |
1162 conflicts with existing MH-E symbols, use a prefix like @samp{my-} or | |
1163 your 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 | |
1181 Many string or integer options are easy to modify using @kbd{M-x | |
1182 customize-option}. For example, to modify the option that controls | |
1183 printing, you would run @kbd{M-x customize-option @key{RET} | |
1184 mh-lpr-command-format @key{RET}}. In the buffer that appears, modify | |
1185 the string to the right of the variable. For example, you may change | |
1186 the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then | |
1187 use the @samp{State} combo box and select @samp{Save for Future | |
1188 Sessions}. 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 | |
1199 Options can also hold boolean values. In Emacs Lisp, the boolean | |
1200 values are @code{nil}, which means false, and @code{t}, which means | |
1201 true. The @code{customize-option} function makes it easy to change | |
1202 boolean values; simply click on the toggle button in the customize | |
1203 buffer to switch between @samp{on} (@code{t}) and @samp{off} | |
1204 (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag} | |
1205 to @samp{off} to keep the MH-Show buffer at the top of the buffer | |
1206 stack. Use the @samp{State} combo box and choose @samp{Set for Current | |
1207 Session} to see how the option affects the show buffer. Then choose | |
1208 the @samp{Erase Customization} menu item to reset the option to the | |
1209 default, which places the MH-Show buffer at the bottom of the buffer | |
1210 stack. | |
1211 | |
1212 @vindex mh-mhl-format-file, example | |
1213 | |
1214 The 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 | |
1218 hooks, 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 | |
1225 You can browse all of the MH-E options with the @code{customize-group} | |
1226 function. 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 | |
1228 the MH-E customization groups. Another way to view the MH-E | |
1229 customization 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 | |
1240 Many commands that operate on individual messages, such as | |
1241 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE} | |
1242 argument. This argument can be used in several ways. | |
1243 | |
1244 @kindex C-u, with ranges | |
1245 | |
1246 If you provide the prefix argument @kbd{C-u} to these commands, then | |
1247 you will be prompted for the message range. This can be any valid MH | |
1248 range which can include messages, sequences (@pxref{Sequences}), and | |
1249 the abbreviations (described in the @command{mh}(1) man page): | |
1250 | |
1251 @table @samp | |
1252 @item <num1>-<num2> | |
1253 Indicates all messages in the range <num1> to <num2>, inclusive. The | |
1254 range must be nonempty. | |
1255 @c ------------------------- | |
1256 @item <num>:N | |
1257 @itemx <num>:+N | |
1258 @itemx <num>:-N | |
1259 Up to N messages beginning with (or ending with) message num. Num may | |
1260 be 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 | |
1266 The first, previous, next or last messages, if they exist. | |
1267 @c ------------------------- | |
1268 @item all | |
1269 All of the messages. | |
1270 @end table | |
1271 | |
1272 For example, a range that shows all of these things is @samp{1 2 3 | |
1273 5-10 last:5 unseen}. | |
1274 | |
1275 @vindex transient-mark-mode | |
1276 | |
1277 If the option @code{transient-mark-mode} is turned on and you set a | |
1278 region in the MH-Folder buffer, then the MH-E command will perform the | |
1279 operation on all messages in that region. | |
1280 | |
1281 @cindex @samp{mh-range} customization group | |
1282 @cindex customization group, @samp{mh-range} | |
1283 | |
1284 The @samp{mh-range} customization group contains a single option which | |
1285 affects how ranges are interpreted. | |
1286 | |
1287 @vtable @code | |
1288 @item mh-interpret-number-as-range-flag | |
1289 On means interpret a number as a range (default: @samp{on}). | |
1290 @end vtable | |
1291 | |
1292 @vindex mh-interpret-number-as-range-flag | |
1293 | |
1294 Since one of the most frequent ranges used is @samp{last:N}, MH-E will | |
1295 interpret 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 | |
1297 default). 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 | |
1307 When 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, | |
1315 Completion} in @cite{The GNU Emacs Manual}). | |
1316 @end ifhtml | |
1317 In addition, MH-E has several ways of choosing a suitable default so | |
1318 that 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 | |
1323 The @samp{mh-folder-selection} customization group contains some | |
1324 options which are used to help with this. | |
1325 | |
1326 @vtable @code | |
1327 @item mh-default-folder-for-message-function | |
1328 Function to select a default folder for refiling or @samp{Fcc:} | |
1329 (default: @code{nil}). | |
1330 @c ------------------------- | |
1331 @item mh-default-folder-list | |
1332 List of addresses and folders (default: @code{nil}). | |
1333 @c ------------------------- | |
1334 @item mh-default-folder-must-exist-flag | |
1335 On means guessed folder name must exist to be used (default: | |
1336 @samp{on}). | |
1337 @c ------------------------- | |
1338 @item mh-default-folder-prefix | |
1339 Prefix used for folder names generated from aliases (default: @code{""}). | |
1340 @end vtable | |
1341 | |
1342 @vindex mh-default-folder-for-message-function | |
1343 | |
1344 You can set the option @code{mh-default-folder-for-message-function} | |
1345 to a function that provides a default folder for the message to be | |
1346 refiled. When this function is called, the current buffer contains the | |
1347 message being refiled and point is at the start of the message. This | |
1348 function 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 | |
1350 name is used as the default, or an empty string to suppress the | |
1351 default entirely. | |
1352 | |
1353 Otherwise, the name of the destination folder is derived from the | |
1354 sender as follows: | |
1355 | |
1356 @enumerate | |
1357 @vindex mh-default-folder-list | |
1358 @item | |
1359 The folder name associated with the first address found in the list | |
1360 @code{mh-default-folder-list} is used. Each element in this list | |
1361 contains a @samp{Check Recipient} item. If this item is turned on, | |
1362 then the address is checked against the recipient instead of the | |
1363 sender. This is useful for mailing lists. | |
1364 @c ------------------------- | |
1365 @vindex mh-default-folder-prefix | |
1366 @item | |
1367 An alias prefixed by @code{mh-default-folder-prefix} corresponding to | |
1368 the address is used. The prefix is used to prevent clutter in your | |
1369 mail directory. @xref{Aliases}. | |
1370 @end enumerate | |
1371 | |
1372 @vindex mh-default-folder-must-exist-flag | |
1373 | |
1374 If the derived folder does not exist, and | |
1375 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last | |
1376 folder name used is suggested. This is useful if you get mail from | |
1377 various people for whom you have an alias, but file them all in the | |
1378 same 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 | |
1387 This chapter talks about getting mail from your system mailbox into | |
1388 your MH @samp{+inbox} folder. The following command accomplishes that | |
1389 and 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 | |
1397 Incorporate 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 | |
1403 The following options in the @samp{mh-inc} customization group are | |
1404 used. | |
1405 | |
1406 @vtable @code | |
1407 @item mh-inc-prog | |
1408 Program to incorporate mail (default: @code{"inc"}). | |
1409 @c ------------------------- | |
1410 @item mh-inc-spool-list | |
1411 Alternate spool files (default: @code{nil}). | |
1412 @end vtable | |
1413 | |
1414 The following hook is available. | |
1415 | |
1416 @vtable @code | |
1417 @findex mh-inc-folder | |
1418 @item mh-inc-folder-hook | |
1419 Hook run by @code{mh-inc-folder} after incorporating mail into a | |
1420 folder (default: @code{nil}). | |
1421 @end vtable | |
1422 | |
1423 @cindex @samp{+inbox} | |
1424 @findex mh-inc-folder | |
1425 @kindex i | |
1426 | |
1427 If at any time you receive new mail, incorporate the new mail into | |
1428 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note | |
1429 that @kbd{i} will display the @samp{+inbox} buffer, even if there | |
1430 isn't any new mail. You can incorporate mail from any file into the | |
1431 current folder by specifying a prefix argument; you'll be prompted for | |
1432 the name of the file to use as well as the destination folder (for | |
1433 example, @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 | |
1441 Emacs can notify you when you have new mail by displaying @samp{Mail} | |
1442 in the mode line. To enable this behavior, and to have a clock in the | |
1443 mode 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 | |
1457 The name of the program that incorporates new mail is stored in | |
1458 @code{mh-inc-prog}; it is @code{"inc"} by default. This program | |
1459 generates a one-line summary for each of the new messages. Unless it | |
1460 is an absolute pathname, the file is assumed to be in the | |
1461 @code{mh-progs} directory (@pxref{Getting Started}). You may also link | |
1462 a 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 | |
1465 prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in | |
1466 the MH book). You'll then need to modify several variables | |
1467 appropriately (@pxref{Scan Line Formats}). | |
1468 | |
1469 @vindex mh-inc-spool-list | |
1470 | |
1471 You can use the @code{mh-inc-spool-list} variable to direct MH-E to | |
1472 retrieve mail from arbitrary spool files other than your system | |
1473 mailbox, file it in folders other than your @samp{+inbox}, and assign | |
1474 key 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 | |
1481 Suppose you are subscribed to the @i{mh-e-devel} mailing list and you | |
1482 use @command{procmail} to filter this mail into @file{~/mail/mh-e} | |
1483 with the following recipe in @file{.procmailrc}: | |
1484 | |
1485 @smallexample | |
1486 PATH=$PATH:/usr/bin/mh | |
1487 MAILDIR=$HOME/`mhparam Path` | |
1488 :0: | |
1489 * ^From mh-e-devel-admin@@stop.mail-abuse.org | |
1490 mh-e | |
1491 @end smallexample | |
1492 | |
1493 @findex mh-inc-spool-* | |
1494 @kindex I * | |
1495 | |
1496 In 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, | |
1498 and 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 | |
1500 Binding} 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 | |
1510 You can use @command{xbuffy} to automate the incorporation of this | |
97555 | 1511 mail using the Emacs 23 command @command{emacsclient} as follows: |
84306 | 1512 |
1513 @smallexample | |
1514 box ~/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 | |
1522 In XEmacs, the command @command{gnuclient} is used in a similar | |
1523 fashion. | |
1524 | |
1525 @findex mh-inc-folder | |
1526 @kindex i | |
1527 @vindex mh-inc-folder-hook | |
1528 | |
1529 You can set the hook @code{mh-inc-folder-hook}, which is called after | |
1530 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder}) | |
1531 command. A good use of this hook is to rescan the whole folder either | |
1532 after running @kbd{M-x mh-rmail} the first time or when you've changed | |
1533 the 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 | |
1570 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This | |
1571 command incorporates your mail and creates a buffer called | |
1572 @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows | |
1573 you only new mail, not mail you have already read@footnote{If you want | |
1574 to see your old mail as well, use @kbd{F r} to pull all your messages | |
1575 into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will | |
1576 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u | |
1577 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}. | |
1578 | |
1579 @findex display-time | |
1580 @vindex read-mail-command | |
1581 | |
1582 There are some commands that need to read mail, such as @kbd{Mouse-2} | |
1583 over the @samp{Mail} button that @code{display-time} adds to the mode | |
1584 line. You can configure Emacs to have these commands use MH-E by | |
1585 setting 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 | |
1593 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line | |
1594 summaries of each incorporated message. You can perform most MH | |
1595 commands on these messages via one- or two-letter commands in either | |
1596 the MH-Folder or MH-Show buffers or by using the @samp{Message} menu. | |
1597 See @command{scan}(1) for a description of the contents of the scan | |
1598 lines, and see the Figure in @ref{Reading Mail Tour}, for an example. | |
1599 | |
1600 @table @kbd | |
1601 @kindex ? | |
1602 @findex mh-help | |
1603 @item ? | |
1604 Display 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} | |
1611 Display 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) | |
1618 Display message with all header fields (@code{mh-header-display}). | |
1619 @c ------------------------- | |
97192 | 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) | |
1625 Display message with the default preferred alternative | |
1626 (@code{mh-show-preferred-alternative}). | |
1627 @c ------------------------- | |
84306 | 1628 @kindex ; (semicolon) |
1629 @findex mh-toggle-mh-decode-mime-flag | |
1630 @item ; (semicolon) | |
1631 Toggle 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} | |
1637 Display next page in message (@code{mh-page-msg}). | |
1638 @c ------------------------- | |
1639 @kindex @key{BS} | |
1640 @findex mh-previous-page | |
1641 @item @key{BS} | |
1642 Display 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 > | |
1649 Append 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 | | |
1656 Pipe 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 | |
1661 Delete 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 | |
1669 Delete range (@code{mh-delete-msg}). | |
1670 @c ------------------------- | |
1671 @kindex D ? | |
1672 @findex mh-prefix-help | |
1673 @item D ? | |
1674 Display cheat sheet for the commands of the current prefix in | |
1675 minibuffer (@code{mh-prefix-help}). | |
1676 @c ------------------------- | |
1677 @kindex D @key{SPC} | |
1678 @findex mh-page-digest | |
1679 @item D @key{SPC} | |
1680 Display 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} | |
1685 Display 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 | |
1692 Break 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 | |
1699 Go to a message (@code{mh-goto-msg}). | |
1700 @c ------------------------- | |
1701 @kindex k | |
1702 @findex mh-delete-subject-or-thread | |
1703 @item k | |
1704 Delete 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 ? | |
1710 Display cheat sheet for the commands of the current prefix in | |
1711 minibuffer (@code{mh-prefix-help}). | |
1712 @c ------------------------- | |
1713 @kindex K @key{TAB} | |
1714 @findex mh-next-button | |
1715 @item K @key{TAB} | |
1716 Go 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} | |
1721 Go to the previous button (@code{mh-prev-button}). | |
1722 @c ------------------------- | |
1723 @kindex K a | |
1724 @findex mh-mime-save-parts | |
1725 @item K a | |
1726 Save attachments (@code{mh-mime-save-parts}). | |
1727 @c ------------------------- | |
1728 @kindex K e | |
1729 @findex mh-display-with-external-viewer | |
1730 @item K e | |
1731 View 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 | |
1736 Show 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 | |
1741 Save (output) attachment (@code{mh-folder-save-mime-part}). | |
1742 @c ------------------------- | |
1743 @kindex K t | |
1744 @findex mh-toggle-mime-buttons | |
1745 @item K t | |
1746 Toggle 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 | |
1752 View 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 | |
1759 Edit 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-< | |
1766 Display 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-> | |
1773 Display last message (@code{mh-last-msg}). | |
1774 @c ------------------------- | |
1775 @kindex M-n | |
1776 @findex mh-next-unread-msg | |
1777 @item M-n | |
1778 Display next unread message (@code{mh-next-unread-msg}). | |
1779 @c ------------------------- | |
1780 @kindex M-p | |
1781 @findex mh-previous-unread-msg | |
1782 @item M-p | |
1783 Display 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 | |
1790 Display 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 | |
1797 Display previous message (@code{mh-previous-undeleted-msg}). | |
1798 @c ------------------------- | |
1799 @kindex P ? | |
1800 @findex mh-prefix-help | |
1801 @item P ? | |
1802 Display cheat sheet for the commands of the current prefix in | |
1803 minibuffer (@code{mh-prefix-help}). | |
1804 @c ------------------------- | |
1805 @kindex P C | |
1806 @findex mh-ps-print-toggle-color | |
1807 @item P C | |
1808 Toggle 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 | |
1814 Toggle 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 | |
1820 Print 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 | |
1827 Print 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 | |
1833 Print range (@code{mh-ps-print-msg}). | |
1834 @c ------------------------- | |
1835 @kindex X ? | |
1836 @findex mh-prefix-help | |
1837 @item X ? | |
1838 Display cheat sheet for the commands of the current prefix in | |
1839 minibuffer (@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 | |
1848 Unpack 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 | |
1854 Move point to mouse event and show message (@code{mh-show-mouse}). | |
1855 @end table | |
1856 | |
1857 Within 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 | |
1867 View 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 | |
1873 The following table lists options in the @samp{mh-show} customization | |
1874 group that are used while reading mail. | |
1875 | |
1876 @vtable @code | |
1877 @item mh-bury-show-buffer-flag | |
1878 On means show buffer is buried (default: @samp{on}). | |
1879 @c ------------------------- | |
1880 @item mh-clean-message-header-flag | |
1881 On means remove extraneous header fields (default: @samp{on}). | |
1882 @c ------------------------- | |
1883 @item mh-decode-mime-flag | |
1884 On 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 | |
1888 On means display buttons for all alternative attachments (default: | |
1889 @samp{off}). | |
1890 @c ------------------------- | |
1891 @item mh-display-buttons-for-inline-parts-flag | |
1892 On means display buttons for all inline attachments (default: | |
1893 @samp{off}). | |
1894 @c ------------------------- | |
1895 @item mh-do-not-confirm-flag | |
1896 On means non-reversible commands do not prompt for confirmation | |
1897 (default: @samp{off}). | |
1898 @c ------------------------- | |
1899 @item mh-fetch-x-image-url | |
1900 Control fetching of @samp{X-Image-URL:} header field image (default: | |
1901 @samp{Never Fetch}). | |
1902 @c ------------------------- | |
1903 @item mh-graphical-smileys-flag | |
1904 On means graphical smileys are displayed (default: @samp{on}). | |
1905 @c ------------------------- | |
1906 @item mh-graphical-emphasis-flag | |
1907 On means graphical emphasis is displayed (default: @samp{on}). | |
1908 @c ------------------------- | |
1909 @item mh-highlight-citation-style | |
1910 Style for highlighting citations (default: @samp{Multicolor}). | |
1911 @c ------------------------- | |
1912 @item mh-invisible-header-fields-default | |
1913 List of hidden header fields (default: a checklist too long to list | |
1914 here). | |
1915 @c ------------------------- | |
1916 @item mh-invisible-header-fields | |
1917 Additional header fields to hide (default: @code{nil}). | |
1918 @c ------------------------- | |
1919 @item mh-lpr-command-format | |
1920 Command used to print (default: @code{"lpr -J '%s'"}). | |
1921 @c ------------------------- | |
1922 @item mh-max-inline-image-height | |
1923 Maximum inline image height if @samp{Content-Disposition:} is not | |
1924 present (default: 0). | |
1925 @c ------------------------- | |
1926 @item mh-max-inline-image-width | |
1927 Maximum inline image width if @samp{Content-Disposition:} is not | |
1928 present(default: 0). | |
1929 @c ------------------------- | |
1930 @item mh-mhl-format-file | |
1931 Specifies 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 | |
1935 Default directory to use for @kbd{K a}. | |
1936 @c ------------------------- | |
1937 @item mh-print-background-flag | |
1938 On means messages should be printed in the background (default: | |
1939 @samp{off}). | |
1940 @c ------------------------- | |
1941 @item mh-show-buffer-mode-line-buffer-id | |
1942 Format string to produce @code{mode-line-buffer-identification} for | |
1943 show buffers (default: @code{" @{show-%s@} %d"}). | |
1944 @c ------------------------- | |
1945 @item mh-show-maximum-size | |
1946 Maximum size of message (in bytes) to display automatically (default: | |
1947 0). | |
1948 @c ------------------------- | |
1949 @item mh-show-use-xface-flag | |
1950 On means display face images in MH-Show buffers (default: @samp{on}). | |
1951 @c ------------------------- | |
1952 @item mh-store-default-directory | |
1953 Default directory for @kbd{X s} (default: @samp{Current}). | |
1954 @c ------------------------- | |
1955 @item mh-summary-height | |
1956 Number of lines in MH-Folder buffer (including the mode line) | |
1957 (default: depends on size of frame). | |
1958 @end vtable | |
1959 | |
1960 The following hooks are available. | |
1961 | |
1962 @vtable @code | |
1963 @item mh-delete-msg-hook | |
1964 Hook run after marking each message for deletion (default: @code{nil}). | |
1965 @c ------------------------- | |
1966 @item mh-show-hook | |
1967 Hook run after @key{RET} shows a message (default: @code{nil}). | |
1968 @c ------------------------- | |
1969 @item mh-show-mode-hook | |
1970 Hook run upon entry to @code{mh-show-mode} (default: @code{nil}). | |
1971 @end vtable | |
1972 | |
1973 The following faces are available. | |
1974 | |
1975 @vtable @code | |
1976 @item mh-show-cc | |
1977 Face used to highlight @samp{cc:} header fields. | |
1978 @c ------------------------- | |
1979 @item mh-show-date | |
1980 Face used to highlight @samp{Date:} header fields. | |
1981 @c ------------------------- | |
1982 @item mh-show-from | |
1983 Face used to highlight @samp{From:} header fields. | |
1984 @c ------------------------- | |
1985 @item mh-show-header | |
1986 Face used to deemphasize less interesting header fields. | |
1987 @c ------------------------- | |
1988 @item mh-show-pgg-bad | |
1989 Bad PGG signature face. | |
1990 @c ------------------------- | |
1991 @item mh-show-pgg-good | |
1992 Good PGG signature face. | |
1993 @c ------------------------- | |
1994 @item mh-show-pgg-unknown | |
1995 Unknown or untrusted PGG signature face. | |
1996 @c ------------------------- | |
1997 @item mh-show-signature | |
1998 Signature face. | |
1999 @c ------------------------- | |
2000 @item mh-show-subject | |
2001 Face used to highlight @samp{Subject:} header fields. | |
2002 @c ------------------------- | |
2003 @item mh-show-to | |
2004 Face used to highlight @samp{To:} header fields. | |
2005 @c ------------------------- | |
2006 @item mh-show-xface | |
2007 X-Face image face. | |
2008 @end vtable | |
2009 | |
2010 The functions and variables introduced here are explained in more | |
2011 detail 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 | |
2040 The command @key{RET} (@code{mh-show}) displays the message that the | |
2041 cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the | |
2042 message that the mouse cursor is on. If the message is already | |
2043 displayed, 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 | |
2045 forwards and backwards one page at a time through the message. You can | |
2046 give either of these commands a prefix argument that specifies the | |
2047 number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC} | |
2048 command will also show the next undeleted message if it is used at the | |
2049 bottom of a message. MH-E normally hides a lot of the superfluous | |
2050 header fields that mailers add to a message, but if you wish to see | |
2051 all of them, use the command @kbd{,} (comma; | |
2052 @code{mh-header-display}). | |
2053 | |
2054 @vindex mh-show-maximum-size | |
2055 | |
2056 The option @code{mh-show-maximum-size} provides an opportunity to skip | |
2057 over large messages which may be slow to load. The default value of 0 | |
2058 means that all message are shown regardless of size. | |
2059 | |
2060 A 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 | |
2069 First, the appearance of the header fields can be modified by | |
2070 customizing 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}. | |
2072 The face @code{mh-show-header} is used to deemphasize the other, less | |
2073 interesting, 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 | |
2080 Normally messages are delivered with a handful of uninteresting header | |
2081 fields. These are hidden by turning on the option | |
2082 @code{mh-clean-message-header-flag} (which it is by default). The | |
2083 header fields listed in the option | |
2084 @code{mh-invisible-header-fields-default} are hidden, although you can | |
2085 check off any field that you would like to see. Header fields that you | |
2086 would 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 | |
2088 expressions are not allowed. Unique fields should have a @samp{:} | |
2089 suffix; otherwise, the element can be used to render invisible an | |
2090 entire class of fields that start with the same prefix. If you think a | |
93018
230091ad831d
(Viewing): Update URL for adding header fields to
Bill Wohler <wohler@newt.com>
parents:
92984
diff
changeset
|
2091 header field should be generally ignored, please update |
230091ad831d
(Viewing): Update URL for adding header fields to
Bill Wohler <wohler@newt.com>
parents:
92984
diff
changeset
|
2092 @uref{https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357, |
230091ad831d
(Viewing): Update URL for adding header fields to
Bill Wohler <wohler@newt.com>
parents:
92984
diff
changeset
|
2093 SF #1916032}. |
84306 | 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 | |
2103 MH-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 | |
2105 header of your message, the sender's face will appear in the | |
2106 @samp{From:} header field. If more than one of these fields appear, | |
2107 then the first field found in the order @samp{Face:}, @samp{X-Face:}, | |
2108 and @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. | |
2110 This feature will be turned on by default if your system supports it. | |
2111 | |
2112 The first header field used, if present, is the Gnus-specific | |
2113 @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU | |
2114 Emacs 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 | |
2123 Next is the traditional @samp{X-Face:} header field@footnote{The | |
2124 display 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 | |
2127 support for @samp{X-Face:} images. If your version of XEmacs does not, | |
2128 then you'll need both @command{uncompface} and the | |
2129 @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E | |
2130 renders the foreground and background of the image using the | |
2131 associated 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 | |
2140 Finally, 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 | |
2143 requires the @uref{http://www.gnu.org/software/wget/wget.html, | |
2144 @command{wget} program} to fetch the image and the @command{convert} | |
2145 program from the @uref{http://www.imagemagick.org/, ImageMagick | |
2146 suite}.}. Of the three header fields this is the most efficient in | |
2147 terms of network usage since the image doesn't need to be transmitted | |
2148 with every single mail. The option @code{mh-fetch-x-image-url} | |
2149 controls the fetching of the @samp{X-Image-URL:} header field image | |
2150 with the following values: | |
2151 | |
2152 @table @samp | |
2153 @item Ask Before Fetching | |
2154 You are prompted before the image is fetched. MH-E will remember your | |
2155 reply and will either use the already fetched image the next time the | |
2156 same URL is encountered or silently skip it if you didn't fetch it the | |
2157 first time. This is a good setting. | |
2158 @c ------------------------- | |
2159 @item Never Fetch | |
2160 Images are never fetched and only displayed if they are already | |
2161 present in the cache. This is the default. | |
2162 @end table | |
2163 | |
2164 There isn't a value of @samp{Always Fetch} for privacy and DOS (denial | |
2165 of service) reasons. For example, fetching a URL can tip off a spammer | |
2166 that you've read his email (which is why you shouldn't blindly answer | |
2167 yes if you've set this option to @samp{Ask Before Fetching}). Someone | |
2168 may also flood your network and fill your disk drive by sending a | |
2169 torrent of messages, each specifying a unique URL to a very large | |
2170 file. | |
2171 | |
2172 @cindex @file{.mhe-x-image-cache} | |
2173 @cindex files, @file{.mhe-x-image-cache} | |
2174 | |
2175 The cache of images is found in the directory | |
2176 @file{.mhe-x-image-cache} within your MH directory. You can add your | |
2177 own 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 | |
2183 Normally MH-E takes care of displaying messages itself (rather than | |
2184 calling 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 | |
2187 mhl Format (Printing Only)}. You can set this option to @samp{Use | |
2188 Default 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 | |
2190 MH-E to use, you can set this option to @samp{Specify an mhl Format | |
2191 File} and enter the name of your format file (@command{mhl}(1) or | |
2192 section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in | |
2193 the MH book tells you how to write one). Your format file should | |
2194 specify a non-zero value for @samp{overflowoffset} to allow MH-E to | |
2195 parse the header. Note that @command{mhl} is always used for printing | |
2196 and forwarding; in this case, the value of @code{mh-mhl-format-file} | |
2197 is consulted if you have specified a format file. | |
2198 | |
2199 @cindex citations, highlighting | |
2200 @cindex highlighting citations | |
2201 @vindex mh-highlight-citation-style | |
2202 | |
2203 If the sender of the message has cited other messages in his message, | |
2204 then MH-E will highlight these citations to emphasize the sender's | |
2205 actual response. The option @code{mh-highlight-citation-style} can be | |
2206 customized to change the highlighting style. The @samp{Multicolor} | |
2207 method uses a different color for each indentation while the | |
2208 @samp{Monotone} method highlights all citations in red. To disable | |
2209 highlighting 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 | |
2221 Email 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 | |
2223 the web page for a highlighted URL or to send a message using a | |
2224 highlighted 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 | |
2226 configure 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 | |
2239 It is a long standing custom to inject body language using a | |
2240 cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can | |
2241 render these as graphical widgets if the option | |
2242 @code{mh-graphical-smileys-flag} is turned on, which it is by default. | |
2243 Smileys include patterns such as :-) and ;-). Similarly, a few | |
2244 typesetting features are indicated in ASCII text with certain | |
2245 characters. If your terminal supports it, MH-E can render these | |
2246 typesetting directives naturally if the option | |
2247 @code{mh-graphical-emphasis-flag} is turned on, which it is by | |
2248 default. For example, _underline_ will be | |
2249 @ifhtml | |
2250 @html | |
2251 <u>underlined</u>, | |
2252 @end html | |
2253 @end ifhtml | |
2254 @ifnothtml | |
2255 underlined, | |
2256 @end ifnothtml | |
2257 *bold* will appear in @b{bold}, /italics/ will appear in @i{italics}, | |
2258 and so on. See the option @code{gnus-emphasis-alist} for the whole | |
2259 list. 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 | |
2266 MH-E normally renders signatures and vCards in italics so that the | |
2267 body of the message stands out more. MH-E depends on the presence of | |
2268 the @dfn{signature separator} (@code{"-- "}) to do this. You can also | |
2269 customize the face @code{mh-show-signature} so the appearance of the | |
2270 signature block is more to your liking. | |
2271 | |
2272 @vindex mh-show-hook | |
2273 @vindex mh-show-mode-hook | |
2274 | |
2275 Two hooks can be used to control how messages are displayed. The first | |
2276 hook, @code{mh-show-mode-hook}, is called early on in the process of | |
2277 the message display. It is usually used to perform some action on the | |
2278 message's content. The second hook, @code{mh-show-hook}, is the last | |
2279 thing called after messages are displayed. It's used to affect the | |
2280 behavior of MH-E in general or when @code{mh-show-mode-hook} is too | |
2281 early. | |
2282 | |
2283 @cindex MH-Show mode | |
2284 @cindex modes, MH-Show | |
2285 @vindex mh-show-buffer-mode-line-buffer-id | |
2286 | |
2287 For those who like to modify their mode lines, use | |
2288 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in | |
2289 the MH-Show buffers. Place the two escape strings @samp{%s} and | |
2290 @samp{%d}, which will display the folder name and the message number, | |
2291 respectively, somewhere in the string in that order. The default value | |
2292 of @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 | |
2310 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet | |
2311 Mail 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 | |
2315 prev} in the MH book.} or @command{mhshow}@footnote{See the section | |
2316 @uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in | |
2317 the MH book.} from the shell to read @sc{mime} messages@footnote{You | |
2318 can call them directly from Emacs if you're running the X Window | |
2319 System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can | |
2320 leave 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 | |
2329 MH-E can handle attachments as well if the Gnus @samp{mm-decode} | |
2330 package is present. If so, the option @code{mh-decode-mime-flag} will | |
2331 be on. Otherwise, you'll see the @sc{mime} body parts rather than text | |
2332 or 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 | |
2334 that the body parts are not being interpreted correctly or toggle it | |
2335 with the command @kbd{;} (semicolon; | |
2336 @code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This | |
2337 option also controls the display of quoted-printable messages and | |
2338 other graphical widgets. @xref{Viewing}. | |
2339 | |
2340 @cindex buttons | |
2341 | |
2342 Attachments 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 | |
2357 To 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 | |
2359 the cursor is over the button. This command is a toggle so if you use | |
2360 it again on the same attachment, it is hidden. If Emacs does not know | |
2361 how to display the attachment, then Emacs offers to save the | |
2362 attachment in a file. To move the cursor to the next button, use the | |
2363 command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the | |
2364 buffer is reached then the search wraps over to the start of the | |
2365 buffer. 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 | |
2367 buffer 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 | |
2374 Another 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. | |
2377 If the cursor is not located over a button, then the cursor first | |
2378 moves to the next button, wrapping to the beginning of the message if | |
2379 necessary. This command has the advantage over the previous commands | |
2380 of working from the MH-Folder buffer. You can also provide a numeric | |
2381 prefix argument (as in @kbd{4 K v}) to view the attachment labeled | |
2382 with that number. If Emacs does not know how to display the | |
2383 attachment, 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 | |
2391 If Emacs does not know how to view an attachment, you could save it | |
2392 into a file and then run some program to open it. It is easier, | |
2393 however, 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 | |
2395 likely use this to view spreadsheets and documents, it is also useful | |
2396 to use your browser to view HTML attachments with higher fidelity than | |
2397 what Emacs can provide. This command displays the attachment | |
2398 associated with the button under the cursor. If the cursor is not | |
2399 located over a button, then the cursor first moves to the next button, | |
2400 wrapping to the beginning of the message if necessary. You can provide | |
2401 a numeric prefix argument (as in @kbd{4 K e}) to view the attachment | |
2402 labeled with that number. This command tries to provide a reasonable | |
2403 default 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 | |
2412 Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save | |
2413 attachments (the mnemonic is ``output''). This command saves the | |
2414 attachment associated with the button under the cursor. If the cursor | |
2415 is not located over a button, then the cursor first moves to the next | |
2416 button, wrapping to the beginning of the message if necessary. You can | |
2417 also provide a numeric prefix argument (as in @kbd{3 K o}) to save the | |
2418 attachment labeled with that number. This command prompts you for a | |
2419 filename 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 | |
2429 You 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 | |
2431 directory specified by the option | |
2432 @code{mh-mime-save-parts-default-directory} unless you use a prefix | |
2433 argument (as in @kbd{C-u K a}) in which case you are prompted for the | |
2434 directory. These directories may be superseded by MH profile | |
2435 components, since this function calls on @command{mhstore} | |
2436 (@command{mhn}) to do the work. | |
2437 | |
2438 @vindex mh-mime-save-parts-default-directory | |
2439 | |
2440 The default value for the option | |
2441 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so | |
2442 that you are always prompted for the directory in which to save the | |
2443 attachments. However, if you usually use the same directory within a | |
2444 session, then you can set this option to @samp{Prompt the First Time} | |
2445 to avoid the prompt each time. you can make this directory permanent | |
2446 by 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 | |
2454 The sender can request that attachments should be viewed inline so | |
2455 that they do not really appear like an attachment at all to the | |
2456 reader. Most of the time, this is desirable, so by default MH-E | |
2457 suppresses the buttons for inline attachments. On the other hand, you | |
2458 may receive code or HTML which the sender has added to his message as | |
2459 inline attachments so that you can read them in MH-E. In this case, it | |
2460 is useful to see the buttons so that you know you don't have to cut | |
2461 and paste the code into a file; you can simply save the attachment. If | |
2462 you want to make the buttons visible for inline attachments, you can | |
2463 use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle | |
2464 the visibility of these buttons. You can turn on these buttons | |
2465 permanently by turning on the option | |
2466 @code{mh-display-buttons-for-inline-parts-flag}. | |
2467 | |
2468 MH-E cannot display all attachments inline however. It can display | |
2469 text (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 | |
2477 Some older mail programs do not insert the needed | |
2478 plumbing@footnote{This plumbing is the @samp{Content-Disposition:} | |
2479 header field.} to tell MH-E whether to display the attachments inline | |
2480 or not. If this is the case, MH-E will display these images inline if | |
2481 they are smaller than the window. However, you might want to allow | |
2482 larger images to be displayed inline. To do this, you can change the | |
2483 options @code{mh-max-inline-image-width} and | |
2484 @code{mh-max-inline-image-height} from their default value of zero to | |
2485 a large number. The size of your screen is a good choice for these | |
2486 numbers. | |
2487 | |
2488 @cindex alternatives | |
2489 @cindex attachments, alternatives | |
2490 @vindex mh-display-buttons-for-alternatives-flag | |
2491 | |
2492 Sometimes, a mail program will produce multiple alternatives of an | |
2493 attachment in increasing degree of faithfulness to the original | |
2494 content. By default, only the preferred alternative is displayed. If | |
2495 the option @code{mh-display-buttons-for-alternatives-flag} is on, then | |
2496 the preferred part is shown inline and buttons are shown for each of | |
2497 the other alternatives. | |
2498 | |
2499 @vindex mm-discouraged-alternatives | |
2500 | |
2501 Many people prefer to see the @samp{text/plain} alternative rather | |
2502 than the @samp{text/html} alternative. To do this in MH-E, customize | |
2503 the option @code{mm-discouraged-alternatives}, and add | |
2504 @samp{text/html}. The next best alternative, if any, will be shown. | |
2505 | |
97192 | 2506 @findex mh-show-preferred-alternative |
2507 @kindex : (colon) | |
2508 | |
2509 Occasionally, though, you might want to see the preferred alternative. | |
2510 The command @kbd{:} (@code{mh-show-preferred-alternative}) displays | |
2511 the message with the default preferred alternative. This is as if | |
2512 @code{mm-discouraged-alternatives} is set to @samp{nil}. Use the | |
2513 command @key{RET} (@code{mh-show}) to show the message normally again. | |
2514 | |
84306 | 2515 @kindex K i |
2516 @findex mh-folder-inline-mime-part | |
2517 | |
2518 You can view the raw contents of an attachment with the command @kbd{K | |
2519 i} (@code{mh-folder-inline-mime-part}). This command displays (or | |
2520 hides) the contents of the attachment associated with the button under | |
2521 the cursor verbatim. If the cursor is not located over a button, then | |
2522 the cursor first moves to the next button, wrapping to the beginning | |
2523 of the message if necessary. You can also provide a numeric prefix | |
2524 argument (as in @kbd{4 K i}) to view the attachment labeled with that | |
2525 number. | |
2526 | |
2527 For additional information on buttons, see | |
2528 @ifinfo | |
2529 @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}. | |
2530 @end ifinfo | |
2531 @ifnotinfo | |
2532 the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101, | |
2533 Article Buttons} and | |
2534 @uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands} | |
2535 in 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 | |
2544 MH-E can display messages that have been sent in HTML@footnote{This | |
2545 feature depends on a version of Gnus that is at least 5.10.}. The | |
2546 content of the message will appear in the MH-Show buffer as you would | |
2547 expect if the entire message is HTML, or there is an inline HTML body | |
2548 part. However, if there is an HTML body part that is an attachment, | |
2549 then you'll see a button like this: | |
2550 | |
2551 @smallexample | |
2552 [1. text/html; foo.html]... | |
2553 @end smallexample | |
2554 | |
2555 To see how to read the contents of this body part, see @ref{Viewing | |
2556 Attachments}. | |
2557 | |
2558 @vindex mm-text-html-renderer | |
2559 | |
2560 The browser that MH-E uses is determined by the option | |
2561 @code{mm-text-html-renderer}. The default setting is set automatically | |
2562 based upon the presence of a known browser on your system. If you wish | |
2563 to use a different browser, then set this option accordingly. See the | |
2564 documentation for the browser you use for additional information on | |
2565 how to use it. In particular, find and disable the option to render | |
2566 images as this can tip off spammers that the email address they have | |
2567 used is valid. | |
2568 | |
2569 @vindex mm-text-html-renderer | |
2570 | |
2571 If you're confused about which @code{mm-text-html-renderer} to use, | |
2572 here's a brief description of each, sorted by popularity, that | |
2573 includes 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 | |
2579 @item @samp{w3m} 7 | |
2580 The @samp{w3m} browser requires an external program. It's quick, | |
2581 produces pretty nice output, and best of all, it's the only browser | |
2582 that highlights links. These can be clicked with @kbd{Mouse-2} to view | |
84934
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2583 the content of the link in @samp{w3m}. The @samp{w3m} browser handles |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2584 tables well and actually respects the table's width parameter (which |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2585 can cause text to wrap if the author didn't anticipate that the page |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2586 would be viewed in Emacs). |
84306 | 2587 @c ------------------------- |
2588 @cindex browser, @samp{w3m-standalone} | |
2589 @cindex @samp{w3m-standalone} | |
2590 @item @samp{w3m-standalone} 3 | |
2591 This browser, along with @samp{nil} for the external browser, are the | |
2592 only choices that work without having to download a separate lisp | |
2593 package or external program. This browser is quick, but does not show | |
2594 links. It handles simple tables but some tables get rendered much | |
2595 wider than the Emacs frame. This browser was the only one not to | |
2596 handle the escape @samp{–} (it printed a @samp{?}), but it did | |
2597 render @samp{®}. | |
2598 @c ------------------------- | |
2599 @cindex browser, @samp{links} | |
2600 @cindex @samp{links} | |
2601 @item @samp{links} 1 | |
2602 The @samp{links} browser requires an external program. It's quick, and | |
2603 produces nicer output than @samp{lynx} on single column mails in | |
2604 tables. However, it doesn't show links and it doesn't do as nice a job | |
2605 on multi-column tables as some lines wrap. At least it fits in 80 | |
2606 columns and thus seems better than @samp{w3} and | |
2607 @samp{w3m-standalone}. Converts escapes such as @samp{®} to (R). | |
2608 @c ------------------------- | |
2609 @cindex browser, @samp{lynx} | |
2610 @cindex @samp{lynx} | |
2611 @item @samp{lynx} 1 | |
2612 The @samp{lynx} browser requires an external program. It's quick and | |
2613 produces pretty decent output but it doesn't show links. It doesn't | |
2614 seem to do multi-column tables which makes output much cleaner. It | |
2615 centers the output and wraps long lines more than most. Handles | |
2616 @samp{®}. | |
2617 @c ------------------------- | |
2618 @item @samp{nil} 1 | |
2619 This choice obviously requires an external browser. Like | |
2620 @samp{w3m-standalone}, it works out of the box. With this setting, | |
2621 HTML 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 | |
2627 This choice does not require an external program as all of the | |
2628 rendering is done in lisp. You do need to get the package separately. | |
2629 This browser is @strong{slow}, and doesn't appear to have been updated | |
2630 since 2001 and the author hasn't responded to my emails. It displays | |
2631 unknown tags instead of hiding them, so you get to see all the | |
2632 Microsoft crap in certain messages. Tends to make multi-column tables | |
2633 wider than even a full-screen Emacs can handle. Like @samp{w3m}, you | |
2634 can follow links, but you have to find them first as they are not | |
2635 highlighted. Performs well on single-column tables and handles escapes | |
2636 such as @samp{®}. | |
2637 @c ------------------------- | |
2638 @cindex browser, @samp{html2text} | |
2639 @cindex @samp{html2text} | |
2640 @item @samp{html2text} 0 | |
2641 The @samp{html2text} browser requires an external program. I noticed | |
2642 that it can do some nasty things with simple HTML mails (like filling | |
2643 the entire message as if it were one paragraph, including signature). | |
2644 On another message, it displayed half of the HTML tags for some | |
2645 reason. | |
2646 @end table | |
2647 | |
2648 @vindex mm-text-html-renderer | |
2649 | |
2650 For 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 | |
2654 the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},). | |
2655 @end ifinfo | |
2656 @ifnotinfo | |
2657 see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, | |
2658 Display Customization} in the @cite{The Emacs MIME Manual} and the | |
2659 documentation 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 | |
84934
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2664 @cindex @file{.emacs} |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2665 @cindex files, @file{.emacs} |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2666 @findex browse-url-at-mouse |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2667 @kindex S-Mouse-2 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2668 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2669 A useful key binding that you can add to to @file{~/.emacs} is the |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2670 following which displays an HTML link or textual URL in an external |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2671 browser when clicked with @kbd{S-mouse-2}. This binding works in any |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2672 buffer, including HTML buffers. |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2673 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2674 @smalllisp |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2675 (global-set-key [S-mouse-2] 'browse-url-at-mouse) |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2676 @end smalllisp |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2677 |
84306 | 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 | |
2689 A digest is a message that contains other messages. Special MH-E | |
2690 commands 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, | |
2692 but 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, | |
2694 use @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 | |
2705 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This | |
2706 command uses the MH command @command{burst}@footnote{See the section | |
2707 @uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH | |
2708 book.} to break out each message in the digest into its own message. | |
2709 Using this command, you can quickly delete unwanted messages, like | |
2710 this: Once the digest is split up, toggle out of MH-Folder Show mode | |
2711 with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen | |
2712 and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail}) | |
2713 to 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 | |
2715 directly to the people who posted the messages in the digest. One | |
2716 problem you may encounter is that the @samp{From:} header fields are | |
2717 preceded 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 | |
2720 Drafts}). | |
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 | |
2735 You can read encrypted or signed PGP or GPG messages with | |
2736 MH-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, | |
2739 MH-E can also decrypt old-style PGP messages that are not in MIME | |
2740 format.}. This section assumes that you already have a good | |
2741 understanding of GPG and have set up your keys appropriately. | |
2742 | |
2743 If 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>]] | |
2748 This 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 | |
2758 If the key for the given signature is not in your keychain, you'll be | |
2759 given the opportunity to fetch the key from a key server and verify | |
2760 the key. If the message is really large, the verification process can | |
2761 take a long time. You can press @kbd{C-g} at any time to | |
2762 cancel@footnote{Unfortunately in the current version, the validation | |
2763 process doesn't display a message so it appears that MH-E has hung. We | |
2764 hope that this will be fixed in the future.}. | |
2765 | |
2766 If the signature doesn't check out, you might see something like this: | |
2767 | |
2768 @smallexample | |
2769 @group | |
2770 [[PGP Signed Part:Failed]] | |
2771 This is a signed message. | |
2772 This 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 | |
2780 If someone sends you an encrypted message, MH-E will ask for your | |
2781 passphrase 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>]] | |
2788 This 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 | |
2796 If there is a problem decrypting the message, the button will say: | |
2797 | |
2798 @smallexample | |
2799 [[PGP Encrypted Part:Failed]] | |
2800 @end smallexample | |
2801 | |
2802 You can read the contents of this button using the methods described in | |
2803 @ref{Viewing Attachments}. If the message were corrupted, you'd see | |
2804 this: | |
2805 | |
2806 @smallexample | |
2807 [[PGP Encrypted Part:Failed] | |
2808 Invalid base64 data] | |
2809 @end smallexample | |
2810 | |
2811 If 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 | |
2818 gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09 | |
2819 "Bill Wohler <wohler@@stop.mail-abuse.org>" | |
2820 gpg: public key decryption failed: bad passphrase | |
2821 [GNUPG:] BEGIN_DECRYPTION | |
2822 [GNUPG:] DECRYPTION_FAILED | |
2823 gpg: decryption failed: secret key not available | |
2824 [GNUPG:] END_DECRYPTION | |
2825 | |
2826 gpg 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 | |
2833 The 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. | |
2836 The 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 | |
2842 The @samp{pgg} customization group may have some settings which may | |
2843 interest you. | |
2844 @iftex | |
2845 See @cite{The PGG Manual}. | |
2846 @end iftex | |
2847 @ifinfo | |
2848 @xref{Top, , The PGG Manual, pgg, The PGG Manual}. | |
2849 @end ifinfo | |
2850 @ifhtml | |
2851 See | |
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 | |
2867 To 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 | |
2872 attachments but will not decrypt messages. However, when a message is | |
2873 displayed in an MH-Show buffer, then that buffer is used verbatim for | |
2874 printing with the caveat that only text attachments, if opened inline, | |
2875 are printed. Therefore, encrypted messages can be printed by showing | |
2876 and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not | |
2877 use 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 | |
2884 Colors are emulated on black-and-white printers with shades of gray. | |
2885 This might produce illegible output, even if your screen colors only | |
2886 use shades of gray. If this is the case, try using the command @kbd{P | |
2887 C} (@code{mh-ps-print-toggle-color}) to toggle between color, no | |
2888 color, and a black and white representation of the colors and see | |
2889 which works best. You change this setting permanently by customizing | |
2890 the option @code{ps-print-color-p}. | |
2891 | |
2892 @findex mh-ps-print-toggle-faces | |
2893 @kindex P F | |
2894 | |
2895 Another related function is the command @kbd{P F} | |
2896 (@code{mh-ps-print-toggle-faces}). This command toggles between using | |
2897 faces and not. When faces are enabled, the printed message will look | |
2898 very similar to the message in the MH-Show buffer. | |
2899 | |
2900 @cindex ps-print package | |
2901 @cindex Emacs, packages, ps-print | |
2902 | |
2903 MH-E uses the @samp{ps-print} package to do the printing, so you can | |
2904 customize the printing further by going to the @samp{ps-print} | |
2905 customization 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 | |
2914 An 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 | |
2917 formatted with @command{mhl}@footnote{See the section | |
2918 @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH | |
2919 book.} 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 | |
2927 The command @kbd{P l} uses two options. The option | |
2928 @code{mh-lpr-command-format} contains the Unix command line which | |
2929 performs the actual printing. The string can contain one escape, | |
2930 @samp{%s}, which is replaced by the name of the folder and the message | |
2931 number 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 | |
2934 fits within my printer's margins. Normally messages are printed in the | |
2935 foreground. If this is slow on your system, you may elect to turn on | |
2936 the option @code{mh-print-background-flag} to print in the background. | |
2937 If you do this, do not delete the message until it is printed or else | |
2938 the output may be truncated. These options are not used by the | |
2939 commands @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 | |
2951 MH-E does offer a couple of commands that are not a part of MH@. The | |
2952 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to | |
2953 a file. You are prompted for the filename. If the file already exists, | |
2954 the message is appended to it. You can also write the message to the | |
2955 file without the header by specifying a prefix argument (such as | |
2956 @kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file | |
2957 can 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 | |
2964 You can also pipe the message through a Unix shell command with the | |
2965 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix | |
2966 command through which you wish to run your message. If you give a | |
2967 prefix argument to this command, the message header is included in the | |
2968 text passed to the command (the contrived example @kbd{C-u | lpr} | |
2969 would 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 | |
2979 If the message is a shell archive @command{shar} or has been run | |
2980 through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to | |
2981 extract the body of the message. The default directory for extraction | |
2982 is the current directory; however, you have a chance to specify a | |
2983 different extraction directory. The next time you use this command, | |
2984 the default directory is the last directory you used. If you would | |
2985 like 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 | |
2988 directory for storing the content of these messages. | |
2989 | |
2990 @findex mh-store-buffer | |
2991 @kindex @key{RET} | |
2992 @kindex X s | |
2993 | |
2994 By the way, @kbd{X s} calls the Emacs Lisp function | |
2995 @code{mh-store-buffer}. I mention this because you can use it directly | |
2996 if you're editing a buffer that contains a file that has been run | |
2997 through @command{uuencode} or @command{shar}. For example, you can | |
2998 extract the contents of the current buffer in your home directory by | |
2999 typing @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 | |
3021 To 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 | |
3024 move 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 | |
3027 message. These commands can be given a prefix argument to specify how | |
3028 many messages to skip (for example, @kbd{5 n}). You can also move to a | |
3029 specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the | |
3030 message number either before or after typing @kbd{g}. In the latter | |
3031 case, Emacs prompts you. Finally, you can go to the first or last | |
3032 message 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 | |
3043 You can also use the Emacs commands @kbd{C-p} (@code{previous-line}) | |
3044 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in | |
3045 the 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 | |
3054 To 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 | |
3056 scan window, and the next undeleted message is displayed. If the | |
3057 previous command had been @kbd{p}, then the next message displayed is | |
3058 the first undeleted message previous to the message just deleted. Use | |
3059 @kbd{n} to force subsequent @kbd{d} commands to move forward to the | |
3060 next undeleted message after deleting the message under the cursor. | |
3061 You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5 | |
3062 frombob @key{RET}}, @pxref{Ranges}). | |
3063 | |
3064 @findex mh-delete-msg-no-motion | |
3065 @kindex C-d | |
3066 | |
3067 The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the | |
3068 message (or messages in range) for deletion but leaves the cursor at | |
3069 the current message in case you wish to perform other operations on | |
3070 the 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 | |
3080 And to delete more messages faster, you can use @kbd{k} | |
3081 (@code{mh-delete-subject-or-thread}) to delete all the messages with | |
3082 the same subject as the current message. This command puts these | |
3083 messages in a sequence named @samp{subject}. You can undo this action | |
3084 by using @kbd{u} (@code{mh-undo}) with a prefix argument and then | |
3085 specifying the @samp{subject} sequence. However, if the buffer is | |
3086 displaying 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 | |
3092 However 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 | |
3098 The hook @code{mh-delete-msg-hook} is called after you mark a message | |
3099 for deletion. For example, a past maintainer of MH-E used this once | |
3100 when he kept statistics on his mail usage. | |
3101 | |
3102 @node Miscellaneous Commands and Options, , Navigating, Reading Mail | |
3103 @section Miscellaneous Commands and Options | |
3104 | |
3105 This section contains a few more miscellaneous commands and options. | |
3106 | |
3107 @cindex editing message | |
3108 @findex mh-modify | |
3109 @kindex M | |
3110 | |
3111 There are times when you need to edit a message. For example, you may | |
3112 need to fix a broken Content-Type header field. You can do this with | |
3113 the command @kbd{M} (@code{mh-modify}). It displays the raw message in | |
3114 an editable buffer. When you are done editing, save and kill the | |
3115 buffer as you would any other. | |
3116 | |
3117 @findex mh-kill-folder | |
3118 @findex mh-pack-folder | |
3119 @vindex mh-do-not-confirm-flag | |
3120 | |
3121 Commands such as @code{mh-pack-folder} prompt to confirm whether to | |
3122 process outstanding moves and deletes or not before continuing. | |
3123 Turning on the option @code{mh-do-not-confirm-flag} means that these | |
3124 actions will be performed---which is usually desired but cannot be | |
3125 retracted---without question@footnote{In previous versions of MH-E, | |
3126 this option suppressed the confirmation in @code{mh-kill-folder}. | |
3127 Since this kept most users from setting this option, | |
3128 @code{mh-kill-folder} was modified in version 6.0 to always ask for | |
3129 confirmation 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 | |
3136 The option @code{mh-summary-height} controls the number of scan lines | |
3137 displayed in the MH-Folder window, including the mode line. The | |
3138 default value of this option is @samp{Automatic} which means that the | |
3139 MH-Folder buffer will maintain the same proportional size if the frame | |
3140 is 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 | |
3142 see. | |
3143 | |
3144 @vindex mh-bury-show-buffer-flag | |
3145 | |
3146 Normally the buffer for displaying messages is buried at the bottom at | |
3147 the buffer stack. You may wish to disable this feature by turning off | |
3148 the option @code{mh-bury-show-buffer-flag}. One advantage of not | |
3149 burying the show buffer is that one can delete the show buffer more | |
3150 easily in an electric buffer list because of its proximity to its | |
3151 associated MH-Folder buffer. Try running @kbd{M-x | |
3152 electric-buffer-list} to see what I mean. | |
3153 | |
3154 @cindex @file{.emacs} | |
3155 @cindex files, @file{.emacs} | |
3156 @cindex reading mail | |
3157 | |
3158 Before we leave this section, I'll include a function that I use as a | |
3159 front end to MH-E@footnote{Stephen Gildea's favorite binding is | |
3160 @kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your | |
3161 working window configuration, which may be quite involved---windows | |
3162 filled with source, compilation output, man pages, and other | |
3163 documentation---and your MH-E window configuration. Like the rest of | |
3164 the customization described in this section, simply add the following | |
3165 code 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. | |
3182 With non-@code{nil} or prefix argument, @i{inc} mailbox as well | |
3183 when 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 | |
3208 If 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 | |
3210 window configuration is saved, either the @samp{+inbox} buffer is | |
3211 displayed or @code{mh-rmail} is run, and the MH-E window configuration | |
3212 is shown. Otherwise, the MH-E window configuration is saved and the | |
3213 original 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 | |
3225 This chapter discusses the things you can do with folders within MH-E. | |
3226 The 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 ? | |
3233 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
3234 @c ------------------------- | |
3235 @kindex ! | |
3236 @findex mh-refile-or-write-again | |
3237 @item ! | |
3238 Repeat 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 | |
3245 Copy range to folder (@code{mh-copy-msg}). | |
3246 @c ------------------------- | |
3247 @kindex F ? | |
3248 @findex mh-prefix-help | |
3249 @item F ? | |
3250 Display cheat sheet for the commands of the current prefix in | |
3251 minibuffer (@code{mh-prefix-help}). | |
3252 @c ------------------------- | |
3253 @kindex F ' | |
3254 @findex mh-index-ticked-messages | |
3255 @item F ' | |
3256 Display ticked messages (@code{mh-index-ticked-messages}). | |
3257 @c ------------------------- | |
3258 @kindex F c | |
3259 @findex mh-catchup | |
3260 @item F c | |
3261 Delete range from the @samp{unseen} sequence (@code{mh-catchup}). | |
3262 @c ------------------------- | |
3263 @kindex F k | |
3264 @findex mh-kill-folder | |
3265 @item F k | |
3266 Remove 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 | |
3273 List 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 | |
3280 Display 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 | |
3287 Pack folder (@code{mh-pack-folder}). | |
3288 @c ------------------------- | |
3289 @kindex F q | |
3290 @findex mh-index-sequenced-messages | |
3291 @item F q | |
3292 Display 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 | |
3299 Rescan 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 | |
3306 Search 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 | |
3313 Sort folder (@code{mh-sort-folder}). | |
3314 @c ------------------------- | |
3315 @kindex F u | |
3316 @findex mh-undo-folder | |
3317 @item F u | |
3318 Undo 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 | |
3325 Visit 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 | |
3332 Refile (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 | |
3339 Quit 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 | |
3346 Toggle 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 | |
3354 Undo 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 | |
3361 Process 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 | |
3368 The @samp{mh-folder} customization group is used to tune these | |
3369 commands. | |
3370 | |
3371 @vtable @code | |
3372 @item mh-new-messages-folders | |
3373 Folders searched for the @samp{unseen} sequence (default: | |
3374 @code{Inbox}). | |
3375 @c ------------------------- | |
3376 @item mh-ticked-messages-folders | |
3377 Folders searched for @code{mh-tick-seq} (default: @code{t}). | |
3378 @c ------------------------- | |
3379 @item mh-large-folder | |
3380 The number of messages that indicates a large folder (default: 200). | |
3381 @c ------------------------- | |
3382 @item mh-recenter-summary-flag | |
3383 On means to recenter the summary window (default: @samp{off}). | |
3384 @c ------------------------- | |
3385 @item mh-recursive-folders-flag | |
3386 On means that commands which operate on folders do so recursively | |
3387 (default: @samp{off}). | |
3388 @c ------------------------- | |
3389 @item mh-sortm-args | |
3390 Additional arguments for @command{sortm} (default: @code{nil}). | |
3391 @end vtable | |
3392 | |
3393 The following hooks are available. | |
3394 | |
3395 @vtable @code | |
3396 @item mh-after-commands-processed-hook | |
3397 Hook run by @kbd{x} after performing outstanding refile and delete | |
3398 requests (default: @code{nil}). | |
3399 @c ------------------------- | |
3400 @item mh-before-commands-processed-hook | |
3401 Hook run by @kbd{x} before performing outstanding refile and delete | |
3402 requests (default: @code{nil}). | |
3403 @c ------------------------- | |
3404 @item mh-before-quit-hook | |
3405 Hook run by q before quitting MH-E (default: @code{nil}). | |
3406 @c ------------------------- | |
3407 @item mh-folder-mode-hook | |
3408 Hook 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 | |
3412 Abnormal hook run at the beginning of @code{mh-kill-folder} (default: | |
3413 @code{'mh-search-p}). | |
3414 @c ------------------------- | |
3415 @item mh-quit-hook | |
3416 Hook run by q after quitting MH-E (default: @code{nil}). | |
3417 @c ------------------------- | |
3418 @item mh-refile-msg-hook | |
3419 Hook run by o after marking each message for refiling (default: | |
3420 @code{nil}). | |
3421 @end vtable | |
3422 | |
3423 The following faces are available for customizing the appearance of | |
3424 the MH-Folder buffer. @xref{Scan Line Formats}. | |
3425 | |
3426 @vtable @code | |
3427 @item mh-folder-address | |
3428 Recipient face. | |
3429 @c ------------------------- | |
3430 @item mh-folder-body | |
3431 Body text face. | |
3432 @c ------------------------- | |
3433 @item mh-folder-cur-msg-number | |
3434 Current message number face. | |
3435 @c ------------------------- | |
3436 @item mh-folder-date | |
3437 Date face. | |
3438 @c ------------------------- | |
3439 @item mh-folder-deleted | |
3440 Deleted message face. | |
3441 @c ------------------------- | |
3442 @item mh-folder-followup | |
3443 @samp{Re:} face. | |
3444 @c ------------------------- | |
3445 @item mh-folder-msg-number | |
3446 Message number face. | |
3447 @c ------------------------- | |
3448 @item mh-folder-refiled | |
3449 Refiled message face. | |
3450 @c ------------------------- | |
3451 @vindex mh-scan-format-nmh | |
3452 @vindex mh-scan-sent-to-me-sender-regexp | |
3453 @item mh-folder-sent-to-me-hint | |
3454 Fontification hint face in messages sent directly to us. The detection | |
3455 of messages sent to us is governed by the scan format | |
3456 @code{mh-scan-format-nmh} and regular expression | |
3457 @code{mh-scan-sent-to-me-sender-regexp}. | |
3458 @c ------------------------- | |
3459 @vindex mh-scan-format-nmh | |
3460 @vindex mh-scan-sent-to-me-sender-regexp | |
3461 @item mh-folder-scan-format | |
3462 Sender face in messages sent directly to us. The detection of messages | |
3463 sent to us is governed by the scan format @code{mh-scan-format-nmh} | |
3464 and regular expression @code{mh-scan-sent-to-me-sender-regexp}. | |
3465 @c ------------------------- | |
3466 @item mh-folder-subject | |
3467 Subject face. | |
3468 @c ------------------------- | |
3469 @item mh-folder-tick | |
3470 Ticked message face. | |
3471 @c ------------------------- | |
3472 @item mh-folder-to | |
3473 @samp{To:} face. | |
3474 @end vtable | |
3475 | |
3476 @vindex mh-folder-mode-hook | |
3477 | |
3478 The hook @code{mh-folder-mode-hook} is called when visiting a new | |
3479 folder in MH-Folder mode. This could be used to set your own key | |
3480 bindings, for example: | |
3481 | |
3482 @vindex mh-folder-mode-hook, example | |
3483 | |
3484 @smalllisp | |
3485 @group | |
3486 (defvar my-mh-init-done nil | |
3487 "Non-@code{nil} when one-time MH-E settings made.") | |
3488 | |
3489 (defun my-mh-folder-mode-hook () | |
3490 "Hook to set key bindings in MH-Folder mode." | |
3491 (if (not my-mh-init-done) ; @r{only need to bind the keys once } | |
3492 (progn | |
3493 (local-set-key "//" 'my-search-msg) | |
3494 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}} | |
3495 (setq my-mh-init-done t)))) | |
3496 | |
3497 (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook) | |
3498 | |
3499 (defun my-search-msg () | |
3500 "Search for a regexp in the current message." | |
3501 (interactive) ; @r{user function} | |
3502 (save-window-excursion | |
3503 (other-window 1) ; @r{go to next window} | |
3504 (isearch-forward-regexp))) ; @r{string search; hit return} | |
3505 ; @r{ when done} | |
3506 | |
3507 @i{Create additional key bindings via mh-folder-mode-hook} | |
3508 | |
3509 @end group | |
3510 @end smalllisp | |
3511 | |
3512 @cindex @command{folder} | |
3513 @cindex @command{refile} | |
3514 @cindex MH commands, @command{folder} | |
3515 @cindex MH commands, @command{refile} | |
3516 @findex mh-refile-msg | |
3517 @kindex o | |
3518 @vindex mh-refile-msg-hook | |
3519 | |
3520 MH-E has analogies for each of the MH @command{folder} and | |
3521 @command{refile} commands@footnote{See the sections | |
3522 @uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder: | |
3523 folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and | |
3524 Linking Messages: refile} in the MH book.}. To refile a message in | |
3525 another folder, use the command @kbd{o} (@code{mh-refile-msg}) | |
3526 (mnemonic: ``output''). You are prompted for the folder name | |
3527 (@pxref{Folder Selection}). Note that this command can also be used to | |
3528 create folders. If you specify a folder that does not exist, you will | |
3529 be prompted to create it. The hook @code{mh-refile-msg-hook} is called | |
3530 after a message is marked to be refiled. | |
3531 | |
3532 @findex mh-write-msg-to-file | |
3533 @kindex ! | |
3534 | |
3535 If you are refiling several messages into the same folder, you can use | |
3536 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the | |
3537 last refile or write (for the description of @kbd{>} | |
3538 (@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a | |
3539 range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob | |
3540 @key{RET}}, @pxref{Ranges}). | |
3541 | |
3542 @cindex expunging refiles and deletes | |
3543 @cindex undoing refiles and deletes | |
3544 @findex mh-undo | |
3545 @kindex u | |
3546 | |
3547 If you've deleted a message or refiled it, but changed your mind, you | |
3548 can cancel the action before you've executed it. Use @kbd{u} | |
3549 (@code{mh-undo}) to undo a refile on or deletion of a single message. | |
3550 You can also undo refiles and deletes for messages that are found in a | |
3551 given range (@pxref{Ranges}). | |
3552 | |
3553 @findex mh-undo-folder | |
3554 @kindex F u | |
3555 | |
3556 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo | |
3557 all refiles and deletes in the current folder. | |
3558 | |
3559 @findex mh-execute-commands | |
3560 @kindex x | |
3561 | |
3562 If you've marked messages to be deleted or refiled and you want to go | |
3563 ahead and delete or refile the messages, use @kbd{x} | |
3564 (@code{mh-execute-commands}). Many MH-E commands that may affect the | |
3565 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if | |
3566 you want to process refiles or deletes first and then either run | |
3567 @kbd{x} for you or undo the pending refiles and deletes. | |
3568 | |
3569 @kindex x | |
3570 @vindex mh-after-commands-processed-hook | |
3571 @vindex mh-before-commands-processed-hook | |
97192 | 3572 @vindex mh-current-folder |
84306 | 3573 |
3574 The command @kbd{x} runs @code{mh-before-commands-processed-hook} | |
3575 before the commands are processed and | |
3576 @code{mh-after-commands-processed-hook} after the commands are | |
3577 processed. Variables that are useful with the former hook include | |
3578 @code{mh-delete-list} and @code{mh-refile-list} which can be used to | |
3579 see which changes will be made to the current folder, | |
3580 @code{mh-current-folder}. Variables that are useful with the latter | |
3581 hook include @code{mh-folders-changed}, which lists which folders were | |
3582 affected by deletes and refiles. This list will always include the | |
3583 current folder @code{mh-current-folder}. | |
3584 | |
3585 @findex mh-copy-msg | |
3586 @kindex c | |
3587 @kindex o | |
3588 | |
3589 If you wish to copy a message to another folder, you can use the | |
3590 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument | |
3591 to @command{refile}(1)). Like the command @kbd{o}, this command | |
3592 prompts you for the name of the target folder and you can specify a | |
3593 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy | |
3594 takes place immediately. The original copy remains in the current | |
3595 folder. | |
3596 | |
3597 @cindex junk mail | |
3598 @cindex MH-Folder mode | |
3599 @cindex MH-Folder Show mode | |
3600 @cindex modes, MH-Folder | |
3601 @cindex modes, MH-Folder Show | |
3602 @cindex spam | |
3603 @findex mh-toggle-showing | |
3604 @kindex t | |
3605 | |
3606 The command @kbd{t} (@code{mh-toggle-showing}) switches between | |
3607 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards, | |
3608 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off | |
3609 the associated show buffer so that you can perform operations on the | |
3610 messages quickly without reading them. This is an excellent way to | |
3611 prune out your junk mail or to refile a group of messages to another | |
3612 folder for later examination. | |
3613 | |
3614 @cindex MH-Folder mode | |
3615 @cindex MH-Show mode | |
3616 @cindex modes, MH-Folder | |
3617 @cindex modes, MH-Show | |
3618 @cindex moving between messages | |
3619 @kindex t | |
3620 @vindex mh-recenter-summary-flag | |
3621 | |
3622 When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder | |
3623 mode, the MH-Show buffer is hidden and the MH-Folder buffer is left | |
3624 alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil} | |
3625 value causes the toggle to display as many scan lines as possible, | |
3626 with the cursor at the middle. The effect of | |
3627 @code{mh-recenter-summary-flag} is rather useful, but it can be | |
3628 annoying on a slow network connection. | |
3629 | |
3630 @findex mh-visit-folder | |
3631 @kindex F v | |
3632 @vindex mh-large-folder | |
3633 | |
3634 When you want to read the messages that you have refiled into folders, | |
3635 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the | |
3636 folder. You are prompted for the folder name. The folder buffer will | |
3637 show just unseen messages if there are any; otherwise, it will show | |
3638 all the messages in the buffer as long there are fewer than | |
3639 @code{mh-large-folder} messages. If there are more, then you are | |
3640 prompted for a range of messages to scan. You can provide a prefix | |
3641 argument in order to specify a range of messages to show when you | |
3642 visit the folder (@pxref{Ranges}). In this case, regions are not used | |
3643 to specify the range and @code{mh-large-folder} is ignored. Note that | |
3644 this command can also be used to create folders. If you specify a | |
3645 folder that does not exist, you will be prompted to create it. | |
3646 | |
3647 @findex mh-search | |
3648 @kindex F s | |
3649 | |
3650 If you forget where you've refiled your messages, you can find them | |
3651 using @kbd{F s} (@code{mh-search}). @xref{Searching}. | |
3652 | |
3653 @cindex @command{procmail} | |
3654 @cindex @samp{unseen} sequence | |
3655 @cindex sequence, @samp{unseen} | |
3656 @cindex Unix commands, @command{procmail} | |
3657 @cindex unseen messages, viewing | |
3658 @findex mh-index-new-messages | |
3659 @kindex F n | |
3660 @vindex mh-new-messages-folders | |
3661 | |
3662 If you use a program such as @command{procmail} to file your incoming | |
3663 mail automatically, you can display new, unseen, messages using the | |
3664 command @kbd{F n} (@code{mh-index-new-messages}). All messages in the | |
3665 @samp{unseen} sequence from the folders in | |
3666 @code{mh-new-messages-folders} are listed. However, this list of | |
3667 folders can be overridden with a prefix argument: with a prefix | |
3668 argument, enter a space-separated list of folders, or nothing to | |
3669 search all folders. | |
3670 | |
3671 @cindex @samp{tick} sequence | |
3672 @cindex sequence, @samp{tick} | |
3673 @cindex ticked messages, viewing | |
3674 @findex mh-index-ticked-messages | |
3675 @kindex F ' | |
3676 @vindex mh-ticked-messages-folders | |
3677 | |
3678 If you have ticked messages (@pxref{Sequences}), you can display them | |
3679 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All | |
3680 messages in the @samp{tick} sequence from the folders in | |
3681 @code{mh-ticked-messages-folders} are listed. With a prefix argument, | |
3682 enter a space-separated list of folders, or nothing to search all | |
3683 folders. | |
3684 | |
3685 @findex mh-index-sequenced-messages | |
3686 @kindex F q | |
3687 @vindex mh-new-messages-folders | |
3688 | |
3689 You can display messages in any sequence with the command @kbd{F q} | |
3690 (@code{mh-index-sequenced-messages}). All messages from the folders in | |
3691 @code{mh-new-messages-folders} in the sequence you provide are listed. | |
3692 With a prefix argument, enter a space-separated list of folders at the | |
3693 prompt, or nothing to search all folders. | |
3694 | |
3695 @vindex mh-new-messages-folders | |
3696 @vindex mh-recursive-folders-flag | |
3697 @vindex mh-ticked-messages-folders | |
3698 | |
3699 Set the options @code{mh-new-messages-folders} and | |
3700 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the | |
3701 @samp{+inbox} folder or @samp{All} to search all of the top level | |
3702 folders. Otherwise, list the folders that should be searched with the | |
3703 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}. | |
3704 | |
3705 @cindex buffers, @samp{*MH-E Folders*} | |
3706 @cindex @samp{*MH-E Folders*} | |
3707 @findex mh-kill-folder | |
3708 @findex mh-list-folders | |
3709 @findex mh-pack-folder | |
3710 @findex mh-rescan-folder | |
3711 @findex mh-sort-folder | |
3712 @kindex F k | |
3713 @kindex F l | |
3714 @kindex F p | |
3715 @kindex F r | |
3716 @kindex F S | |
3717 | |
3718 Other commands you can perform on folders include: @kbd{F l} | |
3719 (@code{mh-list-folders}), to place a listing of all the folders in | |
3720 your mail directory in a buffer called @samp{*MH-E Folders*} | |
3721 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove | |
3722 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by | |
3723 date (see @command{sortm}(1) to see how to sort by other criteria); | |
3724 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps | |
3725 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}), | |
3726 to rescan the folder, which is useful to grab all messages in your | |
3727 @samp{+inbox} after processing your new mail for the first time. If | |
3728 you don't want to rescan the entire folder, the commands @kbd{F r} or | |
3729 @kbd{F p} will accept a range (@pxref{Ranges}). | |
3730 | |
3731 @kindex @key{TAB} | |
3732 @vindex mh-recursive-folders-flag | |
3733 | |
3734 By default, operations on folders work only one level at a time. Set | |
3735 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all | |
3736 folders. This mostly means that you'll be able to see all your folders | |
3737 when you press @key{TAB} when prompted for a folder name. | |
3738 | |
3739 @findex mh-search-p | |
3740 @kindex k | |
3741 @vindex mh-kill-folder-suppress-prompt-hooks | |
3742 | |
3743 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal | |
3744 hook run at the beginning of the command @kbd{k}. The hook functions | |
3745 are called with no arguments and should return a non-nil value to | |
3746 suppress the normal prompt when you remove a folder. This is useful | |
3747 for folders that are easily regenerated. The default value of | |
3748 @code{mh-search-p} suppresses the prompt on folders generated by | |
3749 searching. | |
3750 | |
3751 @sp 1 | |
3752 @center @strong{NOTE} | |
3753 | |
3754 @quotation | |
3755 Use this hook with care. If there is a bug in your hook which returns | |
3756 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the | |
3757 @code{+inbox} folder, you will not be happy. | |
3758 @end quotation | |
3759 @sp 1 | |
3760 | |
3761 @cindex @command{sortm} | |
3762 @cindex @file{.mh_profile} | |
3763 @cindex files, @file{.mh_profile} | |
3764 @cindex MH commands, @command{sortm} | |
3765 @cindex MH profile component, @samp{sortm:} | |
3766 @cindex @samp{sortm:} MH profile component | |
3767 @kindex F S | |
3768 @vindex mh-sortm-args | |
3769 | |
3770 The option @code{mh-sortm-args} holds extra arguments to pass on to | |
3771 the command @command{sortm}@footnote{See the section | |
3772 @uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the | |
3773 MH book.} when a prefix argument is used with @kbd{F S}. Normally | |
3774 default arguments to @command{sortm} are specified in the MH profile. | |
3775 This option may be used to provide an alternate view. For example, | |
3776 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting. | |
3777 | |
3778 @cindex exiting | |
3779 @cindex quitting | |
3780 @findex mh-quit | |
3781 @kindex q | |
3782 | |
3783 When you want to quit using MH-E and go back to editing, you can use | |
3784 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the | |
3785 current MH-E folder and restores the buffers that were present when | |
3786 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working | |
3787 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E } | |
3788 (@pxref{Miscellaneous}). You can later restore your MH-E session by | |
3789 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail} | |
3790 again. | |
3791 | |
3792 @findex mh-execute-commands | |
3793 @kindex q | |
3794 @vindex mh-before-quit-hook | |
3795 @vindex mh-before-quit-hook, example | |
3796 @vindex mh-quit-hook | |
3797 @vindex mh-quit-hook, example | |
3798 | |
3799 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are | |
3800 called by @kbd{q}. The former one is called before the quit occurs, so | |
3801 you might use it to perform any MH-E operations; you could perform | |
3802 some query and abort the quit or call @code{mh-execute-commands}, for | |
3803 example. The latter is not run in an MH-E context, so you might use it | |
3804 to modify the window setup. If you find that @kbd{q} buries a lot of | |
3805 buffers that you would rather remove, you can use both | |
3806 @code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that. | |
3807 | |
3808 @smalllisp | |
3809 @group | |
3810 (defvar my-mh-folder-buffer-to-delete nil | |
3811 "Folder buffer that is being quit.") | |
3812 | |
3813 (defun my-mh-before-quit-hook () | |
3814 "Save folder buffer that is to be deleted." | |
3815 (setq my-mh-folder-buffer-to-delete (current-buffer))) | |
3816 | |
3817 (defun my-mh-quit-hook () | |
3818 "Kill folder buffer rather than just bury it." | |
3819 (set-buffer my-mh-folder-buffer-to-delete) | |
3820 (if (get-buffer mh-show-buffer) | |
3821 (kill-buffer mh-show-buffer)) | |
3822 (kill-buffer (current-buffer))) | |
3823 | |
3824 @i{Kill MH-Folder buffer instead of burying it} | |
3825 @end group | |
3826 @end smalllisp | |
3827 | |
3828 @cindex folders, renaming | |
3829 @cindex renaming folders | |
3830 @findex dired | |
3831 @findex dired-do-rename | |
3832 | |
3833 You can use dired to manipulate the folders themselves. For example, I | |
3834 renamed my @samp{+out} folder to the more common @samp{+outbox} by | |
3835 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}), | |
3836 moving my cursor to @samp{out} and using the command @kbd{R} | |
3837 (@code{dired-do-rename}). | |
3838 | |
3839 @node Sending Mail, Editing Drafts, Folders, Top | |
3840 @chapter Sending Mail | |
3841 | |
3842 @cindex sending mail | |
3843 @findex mh-smail | |
3844 @kindex M-x mh-smail | |
3845 | |
3846 You can send a mail message in several ways. You can call @kbd{M-x | |
3847 mh-smail} directly, or from the command line like this: | |
3848 | |
3849 @cindex starting from command line | |
3850 | |
3851 @smallexample | |
3852 $ @kbd{emacs -f mh-smail} | |
3853 @end smallexample | |
3854 | |
3855 @findex goto-address-at-point | |
3856 @vindex mail-user-agent | |
3857 | |
3858 There are some commands that need to send a mail message, such as | |
3859 @code{goto-address-at-point}. You can configure Emacs to have these | |
3860 commands use MH-E by setting the option @code{mail-user-agent} to | |
3861 @samp{Emacs interface to MH}. | |
3862 | |
3863 @cindex @samp{Message} menu | |
3864 @cindex menu, @samp{Message} | |
3865 | |
3866 From within MH-E's MH-Folder mode, other methods of sending mail are | |
3867 available as well. These can also be found in the @samp{Message} menu. | |
3868 | |
3869 @table @kbd | |
3870 @cindex @samp{Message > Edit Message Again} menu item | |
3871 @cindex menu item, @samp{Message > Edit Message Again} | |
3872 @kindex e | |
3873 @findex mh-edit-again | |
3874 @item e | |
3875 Edit a message to send it again (@code{mh-edit-again}). | |
3876 @c ------------------------- | |
3877 @cindex @samp{Message > Re-edit a Bounced Message} menu item | |
3878 @cindex menu item, @samp{Message > Re-edit a Bounced Message} | |
3879 @kindex E | |
3880 @findex mh-extract-rejected-mail | |
3881 @item E | |
3882 Edit a message that was returned by the mail system | |
3883 (@code{mh-extract-rejected-mail}). | |
3884 @c ------------------------- | |
3885 @cindex @samp{Message > Forward Message...} menu item | |
3886 @cindex menu item, @samp{Message > Forward Message...} | |
3887 @kindex f | |
3888 @findex mh-forward | |
3889 @item f | |
3890 Forward message (@code{mh-forward}). | |
3891 @c ------------------------- | |
3892 @cindex @samp{Message > Reply to Message...} menu item | |
3893 @cindex menu item, @samp{Message > Reply to Message...} | |
3894 @kindex r | |
3895 @findex mh-reply | |
3896 @item r | |
3897 Reply to a message (@code{mh-reply}). | |
3898 @c ------------------------- | |
3899 @cindex @samp{Message > Compose a New Message} menu item | |
3900 @cindex menu item, @samp{Message > Compose a New Message} | |
3901 @kindex s | |
3902 @findex mh-send | |
3903 @item s | |
3904 Compose a message (@code{mh-send}). | |
3905 @c ------------------------- | |
3906 @cindex @samp{Message > Redistribute Message...} menu item | |
3907 @cindex menu item, @samp{Message > Redistribute Message...} | |
3908 @kindex M-d | |
3909 @findex mh-redistribute | |
3910 @item M-d | |
3911 Redistribute a message (@code{mh-redistribute}). | |
3912 @c ------------------------- | |
3913 @findex mh-smail | |
3914 @item M-x mh-smail | |
3915 Compose a message with the MH mail system. | |
3916 @c ------------------------- | |
3917 @findex mh-smail-other-window | |
3918 @item M-x mh-smail-other-window | |
3919 Compose a message with the MH mail system in other window. | |
3920 @end table | |
3921 | |
3922 @cindex @samp{mh-sending-mail} customization group | |
3923 @cindex customization group, @samp{mh-sending-mail} | |
3924 | |
3925 In addition, several options from the @samp{mh-sending-mail} | |
3926 customization group are useful when sending mail or replying to mail. | |
3927 They are summarized in the following table. | |
3928 | |
3929 @vtable @code | |
3930 @item mh-compose-forward-as-mime-flag | |
3931 On means that messages are forwarded as attachments (default: | |
3932 @samp{on}). | |
3933 @c ------------------------- | |
3934 @item mh-compose-letter-function | |
3935 Hook run when starting a new draft (default: @code{nil}). | |
3936 @c ------------------------- | |
3937 @item mh-compose-prompt-flag | |
3938 On means prompt for header fields when composing a new draft (default: | |
3939 @samp{off}). | |
3940 @c ------------------------- | |
3941 @item mh-forward-subject-format | |
3942 Format string for forwarded message subject (default: @code{"%s: | |
3943 %s"}). | |
3944 @c ------------------------- | |
3945 @item mh-insert-x-mailer-flag | |
3946 On means append an @samp{X-Mailer:} header field to the header | |
3947 (default: @samp{on}). | |
3948 @c ------------------------- | |
3949 @item mh-redist-full-contents-flag | |
3950 On means the @command{dist} command needs entire letter for | |
3951 redistribution (default: @samp{off}). | |
3952 @c ------------------------- | |
3953 @item mh-reply-default-reply-to | |
3954 Sets the person or persons to whom a reply will be sent (default: | |
3955 @samp{Prompt}). | |
3956 @c ------------------------- | |
3957 @item mh-reply-show-message-flag | |
3958 On means the MH-Show buffer is displayed using @kbd{r} | |
3959 (@code{mh-reply}) (default: @samp{on}). | |
3960 @end vtable | |
3961 | |
3962 The following hooks are available. | |
3963 | |
3964 @vtable @code | |
97192 | 3965 @item mh-annotate-msg-hook |
3966 Hook run by @code{mh-annotate-msg} after annotation (default: | |
3967 @code{nil}). | |
3968 @c ------------------------- | |
84306 | 3969 @item mh-forward-hook |
3970 Hook run by @code{mh-forward} on a forwarded letter (default: | |
3971 @code{nil}). | |
3972 @c ------------------------- | |
3973 @item mh-letter-mode-hook | |
3974 Hook run by @code{mh-letter-mode} on a new letter (default: | |
3975 @code{nil}). | |
3976 @end vtable | |
3977 | |
97192 | 3978 @findex mh-annotate-msg |
3979 @vindex mh-annotate-list | |
3980 @vindex mh-annotate-msg-hook | |
3981 @vindex mh-current-folder | |
3982 | |
3983 A hook that is called whenever a message is sent and after the scan | |
3984 lines and message are annotated is @code{mh-annotate-msg-hook}. Hook | |
3985 functions can access the current folder name with | |
3986 @code{mh-current-folder} and obtain the message numbers of the | |
3987 annotated messages with @code{mh-annotate-list}. | |
3988 | |
3989 The rest of the functions and options introduced here are explained in | |
3990 more detail in the following sections. | |
84306 | 3991 |
3992 @menu | |
3993 * Composing:: | |
3994 * Replying:: | |
3995 * Forwarding:: | |
3996 * Redistributing:: | |
3997 * Editing Again:: | |
3998 @end menu | |
3999 | |
4000 @node Composing, Replying, Sending Mail, Sending Mail | |
4001 @section Composing | |
4002 | |
4003 @cindex @file{.emacs} | |
4004 @cindex MH-Folder mode | |
4005 @cindex composing mail | |
4006 @cindex draft | |
4007 @cindex files, @file{.emacs} | |
4008 @cindex modes, MH-Folder | |
4009 @cindex sending mail | |
4010 @findex mh-smail | |
4011 @findex mh-smail-other-window | |
4012 @kindex M-x mh-smail | |
4013 @kindex M-x mh-smail-other-window | |
4014 | |
4015 Outside of an MH-Folder buffer, you must call either @kbd{M-x | |
4016 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message. | |
4017 The former command always creates a two-window layout with the current | |
4018 buffer on top and the draft on the bottom. Use the latter command if | |
4019 you would rather preserve the window layout. You may find adding the | |
4020 following key bindings to @file{~/.emacs} useful: | |
4021 | |
4022 @smalllisp | |
4023 (global-set-key "\C-xm" 'mh-smail) | |
4024 (global-set-key "\C-x4m" 'mh-smail-other-window) | |
4025 @end smalllisp | |
4026 | |
4027 @cindex draft folder | |
4028 @cindex MH-Letter mode | |
4029 @cindex modes, MH-Letter | |
4030 @findex mh-send | |
4031 @kindex m | |
4032 | |
4033 From within a MH-Folder buffer, you can simply use the command @kbd{m} | |
4034 (@code{mh-send}). However you invoke @code{mh-send}, your letter | |
4035 appears in an Emacs buffer whose mode is MH-Letter (to see what the | |
4036 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows | |
4037 you to edit your message, to check the validity of the recipients, to | |
4038 insert attachments and other messages into your message, and to send | |
4039 the message. We'll go more into depth about editing a | |
4040 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft | |
4041 folder} so that you can edit several drafts in parallel. To do so, | |
4042 create a folder named @samp{+drafts} for example, and add the profile | |
4043 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a | |
4044 message you're composing) in just a moment (@pxref{Editing Drafts}). | |
4045 | |
4046 @vindex mh-compose-prompt-flag | |
4047 | |
4048 If you prefer to be prompted for the recipient and subject fields | |
4049 before the MH-Letter buffer appears, turn on the option | |
4050 @code{mh-compose-prompt-flag}. | |
4051 | |
4052 @cindex header field, @samp{X-Mailer:} | |
4053 @cindex @samp{X-Mailer:} header field | |
4054 @vindex mh-insert-x-mailer-flag | |
4055 | |
4056 MH-E adds an @samp{X-Mailer:} header field to the header that includes | |
4057 the version of MH-E and Emacs that you are using. If you don't want to | |
4058 participate in our marketing, you can turn off the option | |
4059 @code{mh-insert-x-mailer-flag}. | |
4060 | |
4061 @cindex @command{repl} | |
4062 @cindex @file{components} | |
4063 @cindex MH commands, @command{repl} | |
4064 @cindex MH-Letter mode | |
4065 @cindex Mail mode | |
4066 @cindex files, @file{components} | |
4067 @cindex modes, MH-Letter | |
4068 @cindex modes, Mail | |
4069 @vindex mail-mode-hook | |
4070 @vindex mh-letter-mode-hook | |
4071 @vindex text-mode-hook | |
4072 | |
4073 Two hooks are provided to run commands on your freshly created draft. | |
4074 The first hook, @code{mh-letter-mode-hook}, allows you to do some | |
4075 processing before editing a letter@footnote{Actually, because | |
4076 MH-Letter mode inherits from Mail mode, the hooks | |
4077 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that | |
4078 order) before @code{mh-letter-mode-hook}.}. For example, you may wish | |
4079 to modify the header after @command{repl} has done its work, or you | |
4080 may have a complicated @file{components} file and need to tell MH-E | |
4081 where the cursor should go. Here's an example of how you would use | |
4082 this hook. | |
4083 | |
4084 @findex mh-insert-signature, example | |
4085 | |
4086 @smalllisp | |
4087 @group | |
4088 (defvar letter-mode-init-done-flag nil | |
4089 "Non-nil means one-time MH-E settings have been made.") | |
4090 | |
4091 (defun my-mh-letter-mode-hook () | |
4092 "Prepare letter for editing." | |
4093 (when (not letter-mode-init-done) ; @r{only need to bind the keys once} | |
4094 (local-set-key "\C-ctb" 'add-enriched-text) | |
4095 (local-set-key "\C-cti" 'add-enriched-text) | |
4096 (local-set-key "\C-ctf" 'add-enriched-text) | |
4097 (local-set-key "\C-cts" 'add-enriched-text) | |
4098 (local-set-key "\C-ctB" 'add-enriched-text) | |
4099 (local-set-key "\C-ctu" 'add-enriched-text) | |
4100 (local-set-key "\C-ctc" 'add-enriched-text) | |
4101 (setq letter-mode-init-done t)) | |
4102 (save-excursion | |
4103 (goto-char (point-max)) ; @r{go to end of message to} | |
4104 (mh-insert-signature))) ; @r{insert signature} | |
4105 | |
4106 @i{Prepare draft for editing via mh-letter-mode-hook} | |
4107 | |
4108 @end group | |
4109 @end smalllisp | |
4110 | |
4111 The function, @code{add-enriched-text} is defined in the example in | |
4112 @ref{Adding Attachments}. | |
4113 | |
4114 @vindex mh-compose-letter-function | |
4115 @vindex mh-letter-mode-hook | |
4116 | |
4117 The second hook, a function really, is | |
4118 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it | |
4119 is called just before editing a new message; however, it is the last | |
4120 function called before you edit your message. The consequence of this | |
4121 is that you can write a function to write and send the message for | |
4122 you. This function is passed three arguments: the contents of the | |
4123 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields. | |
4124 | |
4125 @node Replying, Forwarding, Composing, Sending Mail | |
4126 @section Replying to Mail | |
4127 | |
4128 @cindex @command{mhl} | |
4129 @cindex @file{mhl.reply} | |
4130 @cindex MH commands, @command{mhl} | |
4131 @cindex files, @file{mhl.reply} | |
4132 @cindex replying | |
4133 @findex mh-reply | |
4134 @kindex r | |
4135 | |
4136 To compose a reply to a message, use the @kbd{r} (@code{mh-reply}) | |
4137 command. | |
4138 | |
4139 When you reply to a message, you are first prompted with @samp{Reply | |
4140 to whom?}. You have several choices here. | |
4141 | |
4142 @quotation | |
4143 @multitable @columnfractions .20 .80 | |
4144 @c @headitem Response @tab Reply Goes To | |
4145 @c XXX @headitem not yet supported by SourceForge's texi2pdf. | |
4146 @item @b{Response} @tab @b{Reply Goes To} | |
4147 @c ------------------------- | |
4148 @item @kbd{from} | |
4149 @tab | |
4150 The person who sent the message. This is the default, so @key{RET} is | |
4151 sufficient. | |
4152 @c ------------------------- | |
4153 @item @kbd{to} | |
4154 @tab | |
4155 Replies to the sender, plus all recipients in the @samp{To:} header field. | |
4156 @c ------------------------- | |
4157 @item @kbd{cc}@*@kbd{all} | |
4158 @tab | |
4159 Forms a reply to the addresses in the @samp{Mail-Followup-To:} header | |
4160 field if one exists; otherwise forms a reply to the sender, plus all | |
4161 recipients. | |
4162 @end multitable | |
4163 @end quotation | |
4164 | |
4165 @cindex @command{repl} | |
4166 @cindex MH commands, @command{repl} | |
4167 @vindex mh-reply-default-reply-to | |
4168 | |
4169 Depending on your answer, @command{repl}@footnote{See the section | |
4170 @uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in | |
4171 the MH book.} is given a different argument to form your reply. | |
4172 Specifically, a choice of @kbd{from} or none at all runs @samp{repl | |
4173 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally, | |
4174 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you | |
4175 find that most of the time you specify one of these choices when you | |
4176 reply to a message, you can change the option | |
4177 @code{mh-reply-default-reply-to} from its default value of | |
4178 @samp{Prompt} to one of the choices listed above. You can always edit | |
4179 the recipients in the draft. | |
4180 | |
4181 @cindex @samp{repl:} MH profile component | |
4182 @cindex MH profile component, @samp{repl:} | |
4183 @cindex MH-Letter mode | |
4184 @cindex MH-Show mode | |
4185 @cindex draft | |
4186 @cindex modes, MH-Letter | |
4187 @cindex modes, MH-Show | |
4188 | |
4189 Two windows are then created. One window contains the message to which | |
4190 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode | |
4191 (@pxref{Editing Drafts}), is in the other window. If the reply draft | |
4192 was not one that you expected, check the things that affect the | |
4193 behavior of @command{repl} which include the @samp{repl:} profile | |
4194 component and the @file{replcomps} and @file{replgroupcomps} files. | |
4195 | |
4196 If you supply a prefix argument (as in @kbd{C-u r}), the message you | |
4197 are replying to is inserted in your reply after having first been run | |
4198 through @command{mhl} with the format file @file{mhl.reply}. See | |
4199 @command{mhl}(1) or the section | |
4200 @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH | |
4201 book to see how you can modify the default @file{mhl.reply} file. | |
4202 | |
4203 @vindex mh-yank-behavior | |
4204 | |
4205 Alternatively, you can customize the option @code{mh-yank-behavior} | |
4206 and choose one of its @samp{Automatically} variants to do the same | |
4207 thing. @xref{Inserting Letter}. If you do so, the prefix argument has | |
4208 no effect. | |
4209 | |
4210 Another way to include the message automatically in your draft is to | |
4211 use @samp{repl: -filter repl.filter} in your MH profile. | |
4212 | |
4213 @vindex mh-reply-show-message-flag | |
4214 | |
4215 If you include the message automatically, you can hide the MH-Show | |
4216 buffer by turning off the option @code{mh-reply-show-message-flag}. | |
4217 | |
4218 If you wish to customize the header or other parts of the reply draft, | |
4219 please see @command{repl}(1) and @code{mh-format}(5). | |
4220 | |
4221 @node Forwarding, Redistributing, Replying, Sending Mail | |
4222 @section Forwarding Mail | |
4223 | |
4224 @cindex @command{forw} | |
4225 @cindex draft | |
4226 @cindex forwarding | |
4227 @cindex MH commands, @command{forw} | |
4228 @findex mh-forward | |
4229 @kindex f | |
4230 @vindex mh-forward-hook | |
4231 | |
4232 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You | |
4233 are prompted for the @samp{To:} and @samp{cc:} recipients. You are | |
4234 given a draft to edit that looks like it would if you had run the MH | |
4235 command @command{forw}@footnote{See the section | |
4236 @uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in | |
4237 the MH book.}. You can then add some text (@pxref{Editing Drafts}). | |
4238 You can forward several messages by using a range (@pxref{Ranges}). | |
4239 All of the messages in the range are inserted into your draft. The | |
4240 hook @code{mh-forward-hook} is called on the draft. | |
4241 | |
4242 @cindex @file{.mh_profile} | |
4243 @cindex files, @file{.mh_profile} | |
4244 @cindex MH profile component, @samp{forw:} | |
4245 @cindex @samp{forw:} MH profile component | |
4246 @vindex mh-compose-forward-as-mime-flag | |
4247 | |
4248 By default, the option @code{mh-compose-forward-as-mime-flag} is on | |
4249 which means that the forwarded messages are included as attachments. | |
92984
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4250 These are inline attachments so the forwarded message should appear in |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4251 the body of your recipient's mail program. If you would prefer to |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4252 forward your messages verbatim (as text, inline), then turn off this |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4253 option. Forwarding messages verbatim works well for short, textual |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4254 messages, but your recipient won't be able to view any non-textual |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4255 attachments that were in the forwarded message. Be aware that if you |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4256 have @samp{forw: -mime} in your MH profile, then forwarded messages |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4257 will always be included as attachments regardless of the settings of |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4258 @code{mh-compose-forward-as-mime-flag}. |
84306 | 4259 |
4260 @vindex mh-forward-subject-format | |
4261 | |
4262 The format of the @samp{Subject:} header field for forwarded messages | |
4263 is controlled by the option @code{mh-forward-subject-format}. This | |
4264 option is a string which includes two escapes (@samp{%s}). The first | |
4265 @samp{%s} is replaced with the sender of the original message, and the | |
4266 second one is replaced with the original @samp{Subject:}. The default | |
4267 value of @code{"%s: %s"} takes a message with the header: | |
4268 | |
4269 @smallexample | |
4270 @group | |
4271 To: Bill Wohler <wohler@@stop.mail-abuse.org> | |
4272 Subject: Re: 49er football | |
4273 From: Greg DesBrisay <gd@@stop.mail-abuse.org> | |
4274 @end group | |
4275 @end smallexample | |
4276 | |
4277 and creates a subject header field of: | |
4278 | |
4279 @smallexample | |
4280 Subject: Greg DesBrisay: Re: 49er football | |
4281 @end smallexample | |
4282 | |
4283 @node Redistributing, Editing Again, Forwarding, Sending Mail | |
4284 @section Redistributing Your Mail | |
4285 | |
4286 @cindex @command{dist} | |
4287 @cindex MH commands, @command{dist} | |
4288 @cindex redistributing | |
4289 @findex mh-redistribute | |
4290 @kindex M-d | |
4291 | |
4292 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function | |
4293 to forwarding mail, but it does not allow you to edit the message, nor | |
4294 does it add your name to the @samp{From:} header field. It appears to | |
4295 the recipient as if the message had come from the original sender. | |
4296 When you run this command, you are prompted for the recipients. | |
4297 | |
4298 @findex mh-edit-again | |
4299 @kindex e | |
4300 | |
4301 For more information on redistributing messages, see | |
4302 @command{dist}(1). Also investigate the command @kbd{e} | |
4303 (@code{mh-edit-again}) for another way to redistribute messages | |
4304 (@pxref{Editing Again}). | |
4305 | |
4306 @cindex @command{send} | |
4307 @cindex MH commands, @command{send} | |
4308 @vindex mh-redist-full-contents-flag | |
4309 | |
4310 The option @code{mh-redist-full-contents-flag} must be turned on if | |
4311 @command{dist}@footnote{See the section | |
4312 @uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with | |
4313 dist} in the MH book.} requires the whole letter for redistribution, | |
4314 which is the case if @command{send}@footnote{See the section | |
4315 @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} | |
4316 in the MH book.} is compiled with the @sc{berk} option (which many | |
4317 people abhor). If you find that MH will not allow you to redistribute | |
4318 a message that has been redistributed before, turn off this option. | |
4319 | |
97192 | 4320 The hook @code{mh-annotate-msg-hook} is run after annotating the |
4321 message and scan line (@pxref{Sending Mail}). | |
4322 | |
84306 | 4323 @node Editing Again, , Redistributing, Sending Mail |
4324 @section Editing Old Drafts and Bounced Messages | |
4325 | |
4326 @cindex @file{draft} | |
4327 @cindex files, @file{draft} | |
4328 @cindex re-editing drafts | |
4329 @findex mh-edit-again | |
4330 @kindex F v drafts | |
4331 @kindex e | |
4332 @kindex n | |
4333 | |
4334 If you don't complete a draft for one reason or another, and if the | |
4335 draft buffer is no longer available, you can pick your draft up again | |
4336 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft | |
4337 folder, your last @file{draft} file will be used. If you use draft | |
4338 folders, you'll need to visit the draft folder with @kbd{F v drafts | |
4339 @key{RET}}, use @kbd{n} to move to the appropriate message, and then | |
4340 use @kbd{e} to prepare the message for editing. | |
4341 | |
4342 @kindex e | |
4343 | |
4344 The @kbd{e} command can also be used to take messages that were sent | |
4345 to you and to send them to more people. | |
4346 | |
4347 @cindex Mailer-Daemon | |
4348 @findex mh-extract-rejected-mail | |
4349 @kindex C-c C-c | |
4350 @kindex E | |
4351 | |
4352 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who | |
4353 complained that your mail wasn't posted for some reason or another. In | |
4354 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare | |
4355 the message for editing by removing the @i{Mailer-Daemon} envelope and | |
4356 unneeded header fields. Fix whatever addressing problem you had, and | |
4357 send the message again with @kbd{C-c C-c}. | |
4358 | |
4359 @node Editing Drafts, Aliases, Sending Mail, Top | |
4360 @chapter Editing a Draft | |
4361 | |
4362 @cindex @samp{Letter} menu | |
4363 @cindex MH-Letter mode | |
4364 @cindex draft | |
4365 @cindex editing draft | |
4366 @cindex menu, @samp{Letter} | |
4367 @cindex modes, MH-Letter | |
4368 | |
4369 When you edit a message that you want to send (called a @dfn{draft} in | |
4370 this case), the mode used is MH-Letter. This mode provides several | |
4371 commands in addition to the normal Emacs editing commands to help you | |
4372 edit your draft. These can also be found in the @samp{Letter} menu. | |
4373 | |
4374 @table @kbd | |
4375 @kindex @key{SPC} | |
4376 @findex mh-letter-complete-or-space | |
4377 @item @key{SPC} | |
4378 Perform completion or insert space (@code{mh-letter-complete-or-space}). | |
4379 @c ------------------------- | |
4380 @kindex M-@key{TAB} | |
4381 @findex mh-letter-complete | |
4382 @item M-@key{TAB} | |
4383 Perform completion on header field or word preceding point | |
4384 (@code{mh-letter-complete}). | |
4385 @c ------------------------- | |
4386 @kindex , (comma) | |
4387 @findex mh-letter-confirm-address | |
4388 @item , (comma) | |
4389 Flash alias expansion (@code{mh-letter-confirm-address}). | |
4390 @c ------------------------- | |
4391 @kindex @key{TAB} | |
4392 @findex mh-letter-next-header-field-or-indent | |
4393 @item @key{TAB} | |
4394 Cycle to next field (@code{mh-letter-next-header-field-or-indent}). | |
4395 @c ------------------------- | |
4396 @kindex S-@key{TAB} | |
4397 @findex mh-letter-previous-header-field | |
4398 @item S-@key{TAB} | |
4399 Cycle to the previous header field | |
4400 (@code{mh-letter-previous-header-field}). | |
4401 @c ------------------------- | |
4402 @kindex C-c ? | |
4403 @findex mh-help | |
4404 @item C-c ? | |
4405 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
4406 @c ------------------------- | |
4407 @cindex @samp{Letter > Send This Draft} menu item | |
4408 @cindex menu item, @samp{Letter > Send This Draft} | |
4409 @kindex C-c C-c | |
4410 @findex mh-send-letter | |
4411 @item C-c C-c | |
4412 Save draft and send message (@code{mh-send-letter}). | |
4413 @c ------------------------- | |
4414 @kindex C-c C-d | |
4415 @findex mh-insert-identity | |
4416 @item C-c C-d | |
4417 Insert fields specified by the given identity | |
4418 (@code{mh-insert-identity}). @xref{Identities}. | |
4419 @c ------------------------- | |
4420 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item | |
4421 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)} | |
4422 @kindex C-c C-e | |
4423 @findex mh-mh-to-mime | |
4424 @item C-c C-e | |
4425 Compose @sc{mime} message from MH-style directives | |
4426 (@code{mh-mh-to-mime}). | |
4427 @c ------------------------- | |
4428 @kindex C-c C-f C-a | |
4429 @kindex C-c C-f a | |
4430 @findex mh-to-field | |
4431 @item C-c C-f C-a | |
4432 @itemx C-c C-f a | |
4433 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}). | |
4434 @c ------------------------- | |
4435 @kindex C-c C-f C-b | |
4436 @kindex C-c C-f b | |
4437 @item C-c C-f C-b | |
4438 @itemx C-c C-f b | |
4439 Move to @samp{Bcc:} header field (@code{mh-to-field}). | |
4440 @c ------------------------- | |
4441 @kindex C-c C-f C-c | |
4442 @kindex C-c C-f c | |
4443 @item C-c C-f C-c | |
4444 @itemx C-c C-f c | |
4445 Move to @samp{Cc:} header field (@code{mh-to-field}). | |
4446 @c ------------------------- | |
4447 @kindex C-c C-f C-d | |
4448 @kindex C-c C-f d | |
4449 @item C-c C-f C-d | |
4450 @itemx C-c C-f d | |
4451 Move to @samp{Dcc:} header field (@code{mh-to-field}). | |
4452 @c ------------------------- | |
4453 @kindex C-c C-f C-f | |
4454 @kindex C-c C-f f | |
4455 @findex mh-to-fcc | |
4456 @item C-c C-f C-f | |
4457 @itemx C-c C-f f | |
4458 Move to @samp{Fcc:} header field (@code{mh-to-fcc}). | |
4459 @c ------------------------- | |
4460 @kindex C-c C-f C-l | |
4461 @kindex C-c C-f l | |
4462 @item C-c C-f C-l | |
4463 @itemx C-c C-f l | |
4464 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}). | |
4465 @c ------------------------- | |
4466 @kindex C-c C-f C-m | |
4467 @kindex C-c C-f m | |
4468 @item C-c C-f C-m | |
4469 @itemx C-c C-f m | |
4470 Move to @samp{From:} header field (@code{mh-to-field}). | |
4471 @c ------------------------- | |
4472 @kindex C-c C-f C-r | |
4473 @kindex C-c C-f r | |
4474 @item C-c C-f C-r | |
4475 @itemx C-c C-f r | |
4476 Move to @samp{Reply-To:} header field (@code{mh-to-field}). | |
4477 @c ------------------------- | |
4478 @kindex C-c C-f C-s | |
4479 @kindex C-c C-f s | |
4480 @item C-c C-f C-s | |
4481 @itemx C-c C-f s | |
4482 Move to @samp{Subject:} header field (@code{mh-to-field}). | |
4483 @c ------------------------- | |
4484 @kindex C-c C-f C-t | |
4485 @kindex C-c C-f t | |
4486 @item C-c C-f C-t | |
4487 @itemx C-c C-f t | |
4488 Move to @samp{To:} header field (@code{mh-to-field}). | |
4489 @c ------------------------- | |
4490 @cindex @samp{Letter > Insert a Message...} menu item | |
4491 @cindex menu item, @samp{Letter > Insert a Message...} | |
4492 @kindex C-c C-i | |
4493 @findex mh-insert-letter | |
4494 @item C-c C-i | |
4495 Insert a message (@code{mh-insert-letter}). | |
4496 @c ------------------------- | |
4497 @kindex C-c C-m C-e | |
4498 @findex mh-mml-secure-message-encrypt | |
4499 @item C-c C-m C-e | |
4500 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}). | |
4501 @c ------------------------- | |
4502 @cindex @samp{Letter > Compose Forward...} menu item | |
4503 @cindex menu item, @samp{Letter > Compose Forward...} | |
4504 @kindex C-c C-m C-f | |
4505 @kindex C-c C-m f | |
4506 @findex mh-compose-forward | |
4507 @item C-c C-m C-f | |
4508 @itemx C-c C-m f | |
4509 Add tag to forward a message (@code{mh-compose-forward}). | |
4510 @c ------------------------- | |
4511 @cindex @samp{Letter > Compose Get File (MH)...} menu item | |
4512 @cindex menu item, @samp{Letter > Compose Get File (MH)...} | |
4513 @kindex C-c C-m C-g | |
4514 @kindex C-c C-m g | |
4515 @findex mh-mh-compose-anon-ftp | |
4516 @item C-c C-m C-g | |
4517 @itemx C-c C-m g | |
4518 Add tag to include anonymous ftp reference to a file | |
4519 (@code{mh-mh-compose-anon-ftp}). | |
4520 @c ------------------------- | |
4521 @cindex @samp{Letter > Compose Insertion...} menu item | |
4522 @cindex menu item, @samp{Letter > Compose Insertion...} | |
4523 @kindex C-c C-m C-i | |
4524 @kindex C-c C-m i | |
4525 @findex mh-compose-insertion | |
4526 @item C-c C-m C-i | |
4527 @itemx C-c C-m i | |
4528 Add tag to include a file such as an image or sound | |
4529 (@code{mh-compose-insertion}). | |
4530 @c ------------------------- | |
4531 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item | |
4532 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)} | |
4533 @kindex C-c C-m C-m | |
4534 @kindex C-c C-m m | |
4535 @findex mh-mml-to-mime | |
4536 @item C-c C-m C-m | |
4537 @itemx C-c C-m m | |
4538 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}). | |
4539 @c ------------------------- | |
4540 @kindex C-c C-m C-n | |
4541 @kindex C-c C-m n | |
4542 @findex mh-mml-unsecure-message | |
4543 @item C-c C-m C-n | |
4544 @itemx C-c C-m n | |
4545 Remove any secure message tags (@code{mh-mml-unsecure-message}). | |
4546 @c ------------------------- | |
4547 @kindex C-c C-m C-s | |
4548 @findex mh-mml-secure-message-sign | |
4549 @item C-c C-m C-s | |
4550 Add tag to sign the message (@code{mh-mml-secure-message-sign}). | |
4551 @c ------------------------- | |
4552 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item | |
4553 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...} | |
4554 @kindex C-c C-m C-t | |
4555 @kindex C-c C-m t | |
4556 @findex mh-mh-compose-external-compressed-tar | |
4557 @item C-c C-m C-t | |
4558 @itemx C-c C-m t | |
4559 Add tag to include anonymous ftp reference to a compressed tar file | |
4560 (@code{mh-mh-compose-external-compressed-tar}). | |
4561 @c ------------------------- | |
4562 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item | |
4563 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)} | |
4564 @kindex C-c C-m C-u | |
4565 @kindex C-c C-m u | |
4566 @findex mh-mh-to-mime-undo | |
4567 @item C-c C-m C-u | |
4568 @itemx C-c C-m u | |
4569 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}). | |
4570 @c ------------------------- | |
4571 @kindex C-c C-m C-x | |
4572 @kindex C-c C-m x | |
4573 @findex mh-mh-compose-external-type | |
4574 @item C-c C-m C-x | |
4575 @itemx C-c C-m x | |
4576 Add tag to refer to a remote file | |
4577 (@code{mh-mh-compose-external-type}). | |
4578 @c ------------------------- | |
4579 @kindex C-c C-m e e | |
4580 @findex mh-mml-secure-message-encrypt | |
4581 @item C-c C-m e e | |
4582 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}). | |
4583 @c ------------------------- | |
4584 @kindex C-c C-m e s | |
4585 @findex mh-mml-secure-message-signencrypt | |
4586 @item C-c C-m e s | |
4587 Add tag to encrypt and sign the message@* | |
4588 (@code{mh-mml-secure-message-signencrypt}). | |
4589 @c ------------------------- | |
4590 @kindex C-c C-m s e | |
4591 @findex mh-mml-secure-message-signencrypt | |
4592 @item C-c C-m s e | |
4593 Add tag to encrypt and sign the message@* | |
4594 (@code{mh-mml-secure-message-signencrypt}). | |
4595 @c ------------------------- | |
4596 @kindex C-c C-m s s | |
4597 @findex mh-mml-secure-message-sign | |
4598 @item C-c C-m s s | |
4599 Add tag to sign the message (@code{mh-mml-secure-message-sign}). | |
4600 @c ------------------------- | |
4601 @cindex @samp{Letter > Split Current Line} menu item | |
4602 @cindex menu item, @samp{Letter > Split Current Line} | |
4603 @kindex C-c C-o | |
4604 @findex mh-open-line | |
4605 @item C-c C-o | |
4606 Insert a newline and leave point before it (@code{mh-open-line}). | |
4607 @c ------------------------- | |
4608 @cindex @samp{Letter > Kill This Draft} menu item | |
4609 @cindex menu item, @samp{Letter > Kill This Draft} | |
4610 @kindex C-c C-q | |
4611 @findex mh-fully-kill-draft | |
4612 @item C-c C-q | |
4613 Quit editing and delete draft message (@code{mh-fully-kill-draft}). | |
4614 @c ------------------------- | |
4615 @cindex @samp{Letter > Insert Signature} menu item | |
4616 @cindex menu item, @samp{Letter > Insert Signature} | |
4617 @kindex C-c C-s | |
4618 @findex mh-insert-signature | |
4619 @item C-c C-s | |
4620 Insert signature in message (@code{mh-insert-signature}). | |
4621 @c ------------------------- | |
4622 @kindex C-c C-t | |
4623 @findex mh-letter-toggle-header-field-display | |
4624 @item C-c C-t | |
4625 Toggle display of header field at point | |
4626 (@code{mh-letter-toggle-header-field-display}). | |
4627 @c ------------------------- | |
4628 @cindex @samp{Letter > Check Recipient} menu item | |
4629 @cindex menu item, @samp{Letter > Check Recipient} | |
4630 @kindex C-c C-w | |
4631 @findex mh-check-whom | |
4632 @item C-c C-w | |
4633 Verify recipients, showing expansion of any aliases | |
4634 (@code{mh-check-whom}). | |
4635 @c ------------------------- | |
4636 @cindex @samp{Letter > Yank Current Message} menu item | |
4637 @cindex menu item, @samp{Letter > Yank Current Message} | |
4638 @kindex C-c C-y | |
4639 @findex mh-yank-cur-msg | |
4640 @item C-c C-y | |
4641 Insert the current message into the draft buffer | |
4642 (@code{mh-yank-cur-msg}). | |
4643 @c ------------------------- | |
4644 @kindex C-c M-d | |
4645 @findex mh-insert-auto-fields | |
4646 @item C-c M-d | |
4647 Insert custom fields if recipient is found in | |
4648 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}). | |
4649 @xref{Identities}. | |
4650 @end table | |
4651 | |
4652 @cindex @samp{mh-letter} customization group | |
4653 @cindex customization group, @samp{mh-letter} | |
4654 | |
4655 Several options from the @samp{mh-letter} customization group are used | |
4656 while editing a draft. | |
4657 | |
4658 @vtable @code | |
4659 @item mh-compose-insertion | |
4660 Type of @sc{mime} message tags in messages (default: @samp{MML} if | |
4661 available; otherwise @samp{MH}). | |
4662 @c ------------------------- | |
4663 @item mh-compose-skipped-header-fields | |
4664 List of header fields to skip over when navigating in draft (default: | |
4665 @code{'("From"} @code{"Organization"} @code{"References"} | |
4666 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"} | |
4667 @code{"X-Image-URL"} @code{"X-Mailer")}. | |
4668 @c ------------------------- | |
4669 @item mh-compose-space-does-completion-flag | |
4670 On means @key{SPC} does completion in message header (default: | |
4671 @samp{off}). | |
4672 @c ------------------------- | |
4673 @item mh-delete-yanked-msg-window-flag | |
4674 On means delete any window displaying the message (default: @samp{off}). | |
4675 @c ------------------------- | |
4676 @item mh-extract-from-attribution-verb | |
4677 Verb to use for attribution when a message is yanked by @kbd{C-c C-y} | |
4678 (default: @code{"wrote:"}). | |
4679 @c ------------------------- | |
4680 @item mh-ins-buf-prefix | |
4681 String to put before each line of a yanked or inserted message | |
4682 (default: @code{"> "}). | |
4683 @c ------------------------- | |
4684 @item mh-letter-complete-function | |
4685 Function to call when completing outside of address or folder fields | |
4686 (default: @code{ispell-complete-word}). | |
4687 @c ------------------------- | |
4688 @item mh-letter-fill-column | |
4689 Fill column to use in MH-Letter mode (default: 72). | |
4690 @c ------------------------- | |
4691 @item mh-mml-method-default | |
4692 Default method to use in security tags (default: @samp{PGP (MIME)} if | |
4693 support for it is available; otherwise @samp{None}). | |
4694 @c ------------------------- | |
4695 @item mh-signature-file-name | |
4696 Source of user's signature (default: @code{"~/.signature"}). | |
4697 @c ------------------------- | |
4698 @item mh-signature-separator-flag | |
4699 On means a signature separator should be inserted (default: | |
4700 @samp{on}). | |
4701 @c ------------------------- | |
4702 @item mh-x-face-file | |
4703 File containing X-Face or Face header field to insert in outgoing mail. | |
4704 (default: @code{"~/.face"}). | |
4705 @c ------------------------- | |
4706 @item mh-yank-behavior | |
4707 Controls which part of a message is yanked by @kbd{C-c C-y} (default: | |
4708 @samp{Body With Attribution}). | |
4709 @end vtable | |
4710 | |
4711 The following hooks are available. | |
4712 | |
4713 @vtable @code | |
4714 @item mail-citation-hook | |
4715 Hook for modifying a citation just inserted in the mail buffer | |
4716 (default: @code{nil}). | |
4717 @c ------------------------- | |
4718 @item mh-before-send-letter-hook | |
4719 Hook run at the beginning of the @kbd{C-c C-c} command (default: | |
4720 @samp{nil}). | |
4721 @c ------------------------- | |
4722 @item mh-mh-to-mime-hook | |
4723 Hook run on the formatted letter by @kbd{C-c C-e} (default: | |
4724 @samp{nil}). | |
4725 @c ------------------------- | |
4726 @item mh-insert-signature-hook | |
4727 Hook run by @kbd{C-c C-s} after signature has been inserted (default: | |
4728 @code{nil}). | |
4729 @end vtable | |
4730 | |
4731 The following face is available. | |
4732 | |
4733 @vtable @code | |
4734 @item mh-letter-header-field | |
4735 Editable header field value face in draft buffers. | |
4736 @end vtable | |
4737 | |
4738 The commands and options introduced here are explained in more | |
4739 detail in the following sections. | |
4740 | |
4741 @menu | |
4742 * Editing Message:: | |
4743 * Inserting Letter:: | |
4744 * Inserting Messages:: | |
4745 * Signature:: | |
4746 * Picture:: | |
4747 * Adding Attachments:: | |
4748 * Sending PGP:: | |
4749 * Checking Recipients:: | |
4750 * Sending Message:: | |
4751 * Killing Draft:: | |
4752 @end menu | |
4753 | |
4754 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts | |
4755 @section Editing the Message | |
4756 | |
4757 @cindex @samp{Bcc:} header field | |
4758 @cindex @samp{Cc:} header field | |
4759 @cindex @samp{Dcc:} header field | |
4760 @cindex @samp{From:} header field | |
4761 @cindex @samp{Mail-Followup-To:} header field | |
4762 @cindex @samp{Mail-Reply-To:} header field | |
4763 @cindex @samp{Reply-To:} header field | |
4764 @cindex @samp{Subject:} header field | |
4765 @cindex @samp{To:} header field | |
4766 @cindex editing header | |
4767 @cindex header field, @samp{Bcc:} | |
4768 @cindex header field, @samp{Cc:} | |
4769 @cindex header field, @samp{Dcc:} | |
4770 @cindex header field, @samp{From:} | |
4771 @cindex header field, @samp{Mail-Followup-To:} | |
4772 @cindex header field, @samp{Mail-Reply-To:} | |
4773 @cindex header field, @samp{Reply-To:} | |
4774 @cindex header field, @samp{Subject:} | |
4775 @cindex header field, @samp{To:} | |
4776 @findex mh-to-field | |
4777 @kindex C-c C-f C-t | |
4778 @kindex C-c C-f t | |
4779 | |
4780 Because the header is part of the message, you can edit the header | |
4781 fields as you wish. However, several convenience commands exist to | |
4782 help you create and edit them. For example, the command @kbd{C-c C-f | |
4783 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the | |
4784 cursor to the @samp{To:} header field, creating it if necessary. The | |
4785 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:}, | |
4786 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To}, | |
4787 @samp{Bcc:}, and @samp{Dcc:} header fields are similar. | |
4788 | |
4789 @findex mh-to-fcc | |
4790 @kindex C-c C-f C-f | |
4791 @kindex C-c C-f f | |
4792 | |
4793 One command behaves differently from the others, namely, @kbd{C-c C-f | |
4794 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command | |
4795 will prompt you for the folder name in which to file a copy of the | |
4796 draft. @xref{Folder Selection}. | |
4797 | |
4798 @findex indent-relative | |
4799 @findex mh-letter-next-header-field-or-indent | |
4800 @findex mh-letter-previous-header-field | |
4801 @kindex @key{TAB} | |
4802 @kindex S-@key{TAB} | |
4803 @vindex mh-compose-skipped-header-fields | |
4804 @vindex mh-letter-header-field | |
4805 | |
4806 Within the header of the message, the command@* @key{TAB} | |
4807 (@code{mh-letter-next-header-field-or-indent}) moves between fields | |
4808 that are highlighted with the face @code{mh-letter-header-field}, | |
4809 skipping those fields listed in | |
4810 @code{mh-compose-skipped-header-fields}. After the last field, this | |
4811 command then moves point to the message body before cycling back to | |
4812 the first field. If point is already past the first line of the | |
4813 message body, then this command indents by calling | |
4814 @code{indent-relative} with the given prefix argument. The command | |
4815 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves | |
4816 backwards between the fields and cycles to the body of the message | |
4817 after the first field. Unlike the command @key{TAB}, it will always | |
4818 take point to the last field from anywhere in the body. | |
4819 | |
4820 @cindex alias completion | |
4821 @cindex completion | |
4822 @cindex spell check | |
4823 @findex ispell-complete-word | |
4824 @findex mh-letter-complete | |
4825 @findex mh-letter-complete-or-space | |
4826 @findex mh-letter-confirm-address | |
4827 @kindex , (comma) | |
4828 @kindex @key{SPC} | |
4829 @kindex M-@key{TAB} | |
4830 @vindex mh-alias-flash-on-comma | |
4831 @vindex mh-compose-space-does-completion-flag | |
4832 @vindex mh-letter-complete-function | |
4833 | |
4834 If the field contains addresses (for example, @samp{To:} or | |
4835 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command | |
4836 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias | |
4837 completion (@pxref{Aliases}). In the body of the message, | |
4838 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead, | |
4839 which is set to @samp{'ispell-complete-word} by default. The command | |
4840 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument | |
4841 that is passed to the @code{mh-letter-complete-function}. In addition, | |
4842 turn on the option @code{mh-compose-space-does-completion-flag} to use | |
4843 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform | |
4844 completion in the header as well; use a prefix argument to specify | |
4845 more than one space. Addresses are separated by a comma; when you | |
4846 press the comma, the command @code{mh-letter-confirm-address} flashes | |
4847 the alias expansion in the minibuffer if | |
4848 @code{mh-alias-flash-on-comma} is turned on. | |
4849 | |
4850 @c XXX Document the replacement for the inaccessible 'long argument. | |
4851 | |
4852 @findex mh-letter-toggle-header-field-display | |
4853 @kindex C-c C-t | |
4854 | |
4855 Use the command @kbd{C-c C-t} | |
4856 @code{mh-letter-toggle-header-field-display} to display truncated | |
4857 header fields. This command is a toggle so entering it again will hide | |
4858 the field. This command takes a prefix argument: if negative then the | |
4859 field is hidden, if positive then the field is displayed (for example, | |
4860 @kbd{C-u C-c C-t}). | |
4861 | |
4862 Be sure to leave a row of dashes or a blank line between the header | |
4863 and the body of the message. | |
4864 | |
4865 @vindex mh-letter-fill-column | |
4866 | |
4867 The body of the message is edited as you would edit any Emacs buffer | |
4868 although there are a few commands and options to assist you. You can | |
4869 change the fill column in MH-Letter mode with the option | |
4870 @code{mh-letter-fill-column}. By default, this option is 72 to allow | |
4871 others to quote your message without line wrapping. | |
4872 | |
4873 @cindex filling paragraphs | |
4874 @cindex paragraphs, filling | |
4875 @findex fill-paragraph | |
4876 @kindex M-q | |
4877 @vindex mh-ins-buf-prefix | |
4878 | |
4879 You'll often include messages that were sent from user agents that | |
4880 haven't yet realized that paragraphs consist of more than a single | |
4881 line. This makes for long lines that wrap in an ugly fashion. You'll | |
4882 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these | |
4883 quoted messages, even if they are nested, just as long as all of the | |
4884 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting | |
4885 Letter}). For example, let's assume you have the following in your | |
4886 draft: | |
4887 | |
4888 @smallexample | |
4889 @group | |
4890 > Hopefully this gives you an idea of what I'm currently doing. I'm \ | |
4891 not sure yet whether I'm completely satisfied with my setup, but \ | |
4892 it's worked okay for me so far. | |
4893 @end group | |
4894 @end smallexample | |
4895 | |
4896 Running @kbd{M-q} on this paragraph produces: | |
4897 | |
4898 @smallexample | |
4899 @group | |
4900 > Hopefully this gives you an idea of what I'm currently doing. I'm not | |
4901 > sure yet whether I'm completely satisfied with my setup, but it's | |
4902 > worked okay for me so far. | |
4903 @end group | |
4904 @end smallexample | |
4905 | |
4906 @findex mh-open-line | |
4907 @findex open-line | |
4908 @kindex C-c C-o | |
4909 @kindex C-o | |
4910 | |
4911 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the | |
4912 command @kbd{C-o} (@code{open-line}) in that it inserts a newline | |
4913 after point. It differs in that it also inserts the right number of | |
4914 quoting characters and spaces so that the next line begins in the same | |
4915 column as it was. This is useful when breaking up paragraphs in | |
4916 replies. For example, if this command was used when point was after | |
4917 the first period in the paragraph above, the result would be this: | |
4918 | |
4919 @smallexample | |
4920 @group | |
4921 > Hopefully this gives you an idea of what I'm currently doing. | |
4922 | |
4923 > I'm not | |
4924 > sure yet whether I'm completely satisfied with my setup, but it's | |
4925 > worked okay for me so far. | |
4926 @end group | |
4927 @end smallexample | |
4928 | |
4929 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts | |
4930 @section Inserting Letter to Which You're Replying | |
4931 | |
4932 @cindex inserting messages | |
4933 @cindex replying to messages | |
4934 @cindex yanking messages | |
4935 @findex mh-yank-cur-msg | |
4936 @kindex C-c C-y | |
4937 @vindex mh-ins-buf-prefix | |
4938 | |
4939 It is often useful to insert a snippet of text from a letter that | |
4940 someone mailed to provide some context for your reply. The command | |
4941 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an | |
4942 attribution, yanking a portion of text from the message to which | |
4943 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> }) | |
4944 before each line. | |
4945 | |
4946 @smallexample | |
4947 @group | |
4948 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote: | |
4949 | |
4950 > Hopefully this gives you an idea of what I'm currently doing. I'm not | |
4951 > sure yet whether I'm completely satisfied with my setup, but it's | |
4952 > worked okay for me so far. | |
4953 @end group | |
4954 @end smallexample | |
4955 | |
4956 @vindex mh-extract-from-attribution-verb | |
4957 | |
4958 The attribution consists of the sender's name and email address | |
4959 followed by the content of the option | |
4960 @code{mh-extract-from-attribution-verb}. This option can be set to | |
4961 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use | |
4962 the @samp{Custom String} menu item to enter your own verb. | |
4963 | |
4964 @vindex mail-citation-hook | |
4965 @vindex mh-ins-buf-prefix | |
4966 @vindex mh-yank-behavior | |
4967 | |
4968 The prefix @code{"> "} is the default setting for the option | |
4969 @code{mh-ins-buf-prefix}. I suggest that you not modify this option | |
4970 since it is used by many mailers and news readers: messages are far | |
4971 easier to read if several included messages have all been indented by | |
4972 the same string. This prefix is not inserted if you use one of the | |
4973 supercite flavors of @code{mh-yank-behavior} or you have added a | |
4974 @code{mail-citation-hook} as described below. | |
4975 | |
4976 @vindex mh-delete-yanked-msg-window-flag | |
4977 | |
4978 You can also turn on the @code{mh-delete-yanked-msg-window-flag} | |
4979 option to delete the window containing the original message after | |
4980 yanking it to make more room on your screen for your reply. | |
4981 | |
4982 @cindex Emacs, packages, supercite | |
4983 @cindex supercite package | |
4984 @kindex r | |
4985 @vindex mail-citation-hook | |
4986 @vindex mh-yank-behavior | |
4987 | |
4988 You can control how the message to which you are replying is yanked | |
4989 into your reply using @code{mh-yank-behavior}. To include the entire | |
4990 message, including the entire header, use @samp{Body and | |
4991 Header}@footnote{If you'd rather have the header cleaned up, use | |
4992 @kbd{C-u r} instead of @kbd{r} when replying | |
4993 (@pxref{Replying}).}@footnote{In the past you would use this setting | |
4994 and set @code{mail-citation-hook} to @samp{supercite}, but this usage | |
4995 is now deprecated in favor of the @samp{Invoke supercite} setting.}. | |
4996 Use @samp{Body} to yank just the body without the header. To yank only | |
4997 the portion of the message following the point, set this option to | |
4998 @samp{Below Point}. | |
4999 | |
5000 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a | |
5001 full-bodied, full-featured, citation package that comes standard with | |
5002 Emacs.} to pass the entire message and header through supercite. | |
5003 | |
5004 @vindex mh-extract-from-attribution-verb | |
5005 | |
5006 If the @samp{Body With Attribution} setting is used, then the message | |
5007 minus the header is yanked and a simple attribution line is added at | |
5008 the top using the value of the option | |
5009 @code{mh-extract-from-attribution-verb}. This is the default. | |
5010 | |
5011 @kindex C-c C-y | |
5012 @vindex mh-delete-yanked-msg-window-flag | |
5013 | |
5014 If the @samp{Invoke supercite} or @samp{Body With Attribution} | |
5015 settings are used, the @samp{-noformat} argument is passed to the | |
5016 @command{repl} program to override a @samp{-filter} or @samp{-format} | |
5017 argument. These settings also have @samp{Automatically} variants that | |
5018 perform the action automatically when you reply so that you don't need | |
5019 to use @kbd{C-c C-y} at all. Note that this automatic action is only | |
5020 performed if the show buffer matches the message being replied to. | |
5021 People who use the automatic variants tend to turn on the option | |
5022 @code{mh-delete-yanked-msg-window-flag} as well so that the show | |
5023 window is never displayed. | |
5024 | |
5025 @vindex mh-yank-behavior | |
5026 | |
5027 If the show buffer has a region, the option @code{mh-yank-behavior} is | |
5028 ignored unless its value is one of @samp{Attribution} variants in | |
5029 which case the attribution is added to the yanked region. | |
5030 | |
5031 @findex trivial-cite | |
5032 @vindex mail-citation-hook | |
5033 @vindex mh-ins-buf-prefix | |
5034 @vindex mh-yank-behavior | |
5035 | |
5036 If this isn't enough, you can gain full control over the appearance of | |
5037 the included text by setting @code{mail-citation-hook} to a function | |
5038 that modifies it. This hook is ignored if the option | |
5039 @code{mh-yank-behavior} is set to one of the supercite flavors. | |
5040 Otherwise, this option controls how much of the message is passed to | |
5041 the hook. The function can find the citation between point and mark | |
5042 and it should leave point and mark around the modified citation text | |
5043 for the next hook function. The standard prefix | |
5044 @code{mh-ins-buf-prefix} is not added if this hook is set. | |
5045 | |
5046 @cindex Emacs, packages, trivial-cite | |
5047 @cindex trivial-cite package | |
5048 @vindex mh-yank-behavior | |
5049 | |
5050 For example, if you use the hook function | |
5051 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html, | |
5052 @code{trivial-cite}} (which is NOT part of Emacs), set | |
5053 @code{mh-yank-behavior} to @samp{Body and Header}. | |
5054 | |
5055 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts | |
5056 @section Inserting Messages | |
5057 | |
5058 @cindex inserting messages | |
5059 @findex mh-insert-letter | |
5060 @findex mh-yank-behavior | |
5061 @kindex C-c C-i | |
5062 @vindex mh-ins-buf-prefix | |
5063 @vindex mh-invisible-header-fields-compiled | |
5064 @vindex mh-yank-behavior | |
5065 | |
5066 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}). | |
5067 This command prompts you for the folder and message number, which | |
5068 defaults to the current message in that folder. It then inserts the | |
5069 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless | |
5070 @code{mh-yank-behavior} is set to one of the supercite flavors in | |
5071 which case supercite is used to format the message. Certain | |
5072 undesirable header fields (see | |
5073 @code{mh-invisible-header-fields-compiled}) are removed before | |
5074 insertion. | |
5075 | |
5076 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is | |
5077 left intact, the message is not indented, and @samp{> } is not | |
5078 inserted before each line. This command leaves the mark before the | |
5079 letter and point after it. | |
5080 | |
5081 @node Signature, Picture, Inserting Messages, Editing Drafts | |
5082 @section Inserting Your Signature | |
5083 | |
5084 @cindex signature | |
5085 @findex mh-insert-signature | |
5086 @kindex C-c C-s | |
5087 | |
5088 You can insert your signature at the current cursor location with the | |
5089 command @kbd{C-c C-s} (@code{mh-insert-signature}). | |
5090 | |
5091 @cindex files, @file{.signature} | |
5092 @cindex @file{.signature} | |
5093 @cindex vCard | |
5094 @vindex mh-signature-file-name | |
5095 | |
5096 By default, the text of your signature is taken from the file | |
5097 @file{~/.signature}. You can read from other sources by changing the | |
5098 option @code{mh-signature-file-name}. This file may contain a | |
5099 @dfn{vCard} in which case an attachment is added with the vCard. | |
5100 | |
5101 @findex mh-signature-separator-p | |
5102 @vindex mh-signature-file-name | |
5103 @vindex mh-signature-separator | |
5104 @vindex mh-signature-separator-regexp | |
5105 | |
5106 The option @code{mh-signature-file-name} may also be a symbol, in | |
5107 which case that function is called. You may not want a signature | |
5108 separator to be added for you; instead you may want to insert one | |
5109 yourself. Options that you may find useful to do this include | |
5110 @code{mh-signature-separator} (when inserting a signature separator) | |
5111 and @code{mh-signature-separator-regexp} (for finding said separator). | |
5112 The function @code{mh-signature-separator-p}, which reports @code{t} | |
5113 if the buffer contains a separator, may be useful as well. | |
5114 | |
5115 @cindex signature separator | |
5116 @vindex mh-signature-separator-flag | |
5117 | |
5118 A signature separator (@code{"-- "}) will be added if the signature | |
5119 block does not contain one and @code{mh-signature-separator-flag} is | |
5120 on. It is not recommended that you change this option since various | |
5121 mail user agents, including MH-E, use the separator to present the | |
5122 signature differently, and to suppress the signature when replying or | |
5123 yanking a letter into a draft. | |
5124 | |
5125 @vindex mh-insert-signature-hook | |
5126 @vindex mh-signature-file-name | |
5127 | |
5128 The hook @code{mh-insert-signature-hook} is run after the signature is | |
5129 inserted. Hook functions may access the actual name of the file or the | |
5130 function used to insert the signature with | |
5131 @code{mh-signature-file-name}. | |
5132 | |
5133 The signature can also be inserted using Identities. | |
5134 @xref{Identities}. | |
5135 | |
5136 @node Picture, Adding Attachments, Signature, Editing Drafts | |
5137 @section Inserting Your Picture | |
5138 | |
5139 @cindex @file{.face} | |
5140 @cindex files, @file{.face} | |
5141 @vindex mh-x-face-file | |
5142 | |
5143 You can insert your picture in the header of your mail message so that | |
5144 recipients see your face in the @samp{From:} header field if their | |
5145 mail user agent is sophisticated enough. In MH-E, this is done by | |
5146 placing your image in the file named by the option | |
5147 @code{mh-x-face-file} which is @file{~/.face} by default. | |
5148 | |
5149 @cindex @samp{Face:} header field | |
5150 @cindex @samp{X-Face:} header field | |
5151 @cindex @samp{X-Image-URL:} header field | |
5152 @cindex header field, @samp{Face:} | |
5153 @cindex header field, @samp{X-Face:} | |
5154 @cindex header field, @samp{X-Image-URL:} | |
5155 | |
5156 If the file starts with either of the strings @samp{X-Face:}, | |
5157 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the | |
5158 message header verbatim. Otherwise it is assumed that the file | |
5159 contains the value of the @samp{X-Face:} header field. | |
5160 | |
5161 @cindex @command{compface} | |
5162 @cindex Unix commands, @command{compface} | |
5163 | |
5164 The @samp{X-Face:} header field, which is a low-resolution, black and | |
5165 white image, can be generated using the | |
5166 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, | |
5167 @command{compface}} command. The @uref{http://www.dairiki.org/xface/, | |
5168 @cite{Online X-Face Converter}} is a useful resource for quick | |
5169 conversion of images into @samp{X-Face:} header fields. | |
5170 | |
5171 Use the @uref{http://quimby.gnus.org/circus/face/make-face, | |
5172 @command{make-face}} script to convert a JPEG image to the higher | |
5173 resolution, color, @samp{Face:} header field. | |
5174 | |
5175 The URL of any image can be used for the @samp{X-Image-URL:} field and | |
5176 no processing of the image is required. | |
5177 | |
5178 @vindex mh-x-face-file | |
5179 | |
5180 To prevent the setting of any of these header fields, either set | |
5181 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file | |
5182 defined by this option doesn't exist. | |
5183 | |
5184 @xref{Viewing}, to see how these header fields are displayed in MH-E. | |
5185 | |
5186 @node Adding Attachments, Sending PGP, Picture, Editing Drafts | |
5187 @section Adding Attachments | |
5188 | |
5189 @cindex @command{mhbuild} | |
5190 @cindex @command{mhn} | |
5191 @cindex MH commands, @command{mhbuild} | |
5192 @cindex MH commands, @command{mhn} | |
5193 @cindex MIME | |
5194 @cindex multimedia mail | |
5195 | |
5196 MH-E has the capability to create multimedia messages. It uses the | |
5197 @sc{mime} (Multipurpose Internet Mail Extensions) | |
5198 protocol@footnote{@sc{mime} is defined in | |
5199 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The | |
5200 @sc{mime} protocol allows you to incorporate images, sound, video, | |
5201 binary files, and even commands that fetch a file with @samp{ftp} when | |
5202 your recipient reads the message! | |
5203 | |
5204 @kindex C-c C-m | |
5205 | |
5206 If you were to create a multimedia message with plain MH commands, you | |
5207 would insert @command{mhbuild} or @command{mhn} directives (henceforth | |
5208 called @dfn{MH-style directives} into your draft and use the | |
5209 @command{mhbuild} command in nmh or @command{mhn} command in MH and | |
5210 GNU mailutils to expand them. MH-E works in much the same way, | |
5211 although it provides a handful of commands prefixed with @kbd{C-c C-m} | |
5212 to insert the directives so you don't need to remember the syntax of | |
5213 them. Remember: you can always add MH-style directives by | |
5214 hand@footnote{See the section | |
5215 @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in | |
5216 the MH book.}. | |
5217 | |
5218 @cindex MIME Meta Language (MML) | |
5219 @cindex MML | |
5220 @vindex mh-compose-insertion | |
5221 | |
5222 In addition to MH-style directives, MH-E also supports MML (@sc{mime} | |
5223 Meta Language) tags@footnote{ | |
5224 @ifinfo | |
5225 @c Although the third argument should default to the | |
5226 @c first, makeinfo goes to the wrong Info file without it being | |
5227 @c different--it seems to be getting our own Composing node. | |
5228 @xref{Composing,,Composing with MML,emacs-mime}. | |
5229 @end ifinfo | |
5230 @ifnotinfo | |
5231 See the section Composing in | |
5232 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME | |
5233 Manual}}. | |
5234 @end ifnotinfo | |
5235 }. The option @code{mh-compose-insertion} can be used to choose | |
5236 between them. By default, this option is set to @samp{MML} if it is | |
5237 supported since it provides a lot more functionality. This option can | |
5238 also be set to @samp{MH} if MH-style directives are preferred. | |
5239 | |
5240 @cindex media types | |
5241 @cindex MIME, media types | |
5242 | |
5243 The MH-E @sc{mime} commands require a @dfn{media type} for each body | |
5244 part or attachment. For example, a PDF document is of type | |
5245 @samp{application/pdf} and an HTML document is of type | |
5246 @samp{text/html}. Some commands fill in the media type for you, | |
5247 whereas others require you to enter one. | |
5248 | |
5249 @cindex @command{file} | |
5250 @cindex @file{/etc/mime.types} | |
5251 @cindex files, @file{/etc/mime.types} | |
5252 @cindex Unix commands, @command{file} | |
5253 @findex mailcap-mime-types | |
5254 | |
5255 In the cases where MH-E can do so, it will determine the media type | |
5256 automatically. It uses the @command{file} command to do this. Failing | |
5257 that, the Emacs function @code{mailcap-mime-types} is used to provide | |
5258 a list from which to choose. This function usually reads the file | |
5259 @file{/etc/mime.types}. | |
5260 | |
5261 Whether the media type is chosen automatically, or you choose it from | |
5262 a list, use the type that seems to match best the file that you are | |
5263 including. In the case of binaries, the media type | |
5264 @samp{application/x-executable} can be useful. If you can't find an | |
5265 appropriate media type, use @samp{text/plain} for text messages and | |
5266 @samp{application/octet-stream} for everything else. | |
5267 | |
5268 @cindex content description | |
5269 @cindex MIME, content description | |
5270 | |
5271 You are also sometimes asked for a @dfn{content description}. This is | |
5272 simply an optional brief phrase, in your own words, that describes the | |
5273 object. If you don't care to enter a content description, just press | |
5274 return and none will be included; however, a reader may skip over | |
5275 multimedia fields unless the content description is compelling. | |
5276 | |
5277 You can also create your own @sc{mime} body parts. In the following | |
5278 example, I describe how you can create and edit a @samp{text/enriched} | |
5279 body part to liven up your plain text messages with boldface, | |
5280 underlining, and italics. I include an Emacs function which inserts | |
5281 enriched text tags. | |
5282 | |
5283 @smalllisp | |
5284 @group | |
5285 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic") | |
5286 ("u" . "underline") | |
5287 ("s" . "smaller") ("B" . "bigger") | |
5288 ("f" . "fixed") | |
5289 ("c" . "center")) | |
5290 "Alist of (final-character . tag) choices for add-enriched-text. | |
5291 Additional types can be found in RFC 1563.") | |
5292 | |
5293 (defun add-enriched-text (begin end) | |
5294 "Add enriched text tags around region. | |
5295 The tag used comes from the list enriched-text-types and is | |
5296 specified by the last keystroke of the command. When called from Lisp, | |
5297 arguments are BEGIN and END@." | |
5298 (interactive "r") | |
5299 ;; @r{Set type to the tag indicated by the last keystroke.} | |
5300 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`})) | |
5301 enriched-text-types)))) | |
5302 (save-restriction ; @r{restores state from narrow-to-region} | |
5303 (narrow-to-region begin end) ; @r{narrow view to region} | |
5304 (goto-char (point-min)) ; @r{move to beginning of text} | |
5305 (insert "<" type ">") ; @r{insert beginning tag} | |
5306 (goto-char (point-max)) ; @r{move to end of text} | |
5307 (insert "</" type ">")))) ; @r{insert terminating tag} | |
5308 @i{Emacs function for entering enriched text} | |
5309 | |
5310 @end group | |
5311 @end smalllisp | |
5312 | |
5313 To use the function @code{add-enriched-text}, first add it to | |
5314 @file{~/.emacs} and create key bindings for it (@pxref{Composing}). | |
5315 | |
5316 Then, in your plain text message, set the mark with @kbd{C-@@} or | |
5317 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t | |
5318 b}. This adds @samp{<bold>} where you set the mark and adds | |
5319 @samp{</bold>} at the location of your cursor, giving you something | |
5320 like: @samp{You should be <bold>very</bold>}. | |
5321 | |
5322 Before sending this message, use @kbd{C-c C-m C-m} | |
5323 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e} | |
5324 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add | |
5325 MIME header fields. Then replace @samp{text/plain} with | |
5326 @samp{text/enriched} in the @samp{Content-Type:} header field. | |
5327 | |
5328 You may also be interested in investigating @code{sgml-mode}. | |
5329 | |
5330 @subheading Including Files | |
5331 | |
5332 @cindex attachments, inserting | |
5333 @cindex images | |
5334 @cindex MIME, images | |
5335 @cindex MIME, sound | |
5336 @cindex MIME, video | |
5337 @cindex sound | |
5338 @cindex video | |
5339 @findex mh-compose-insertion | |
5340 @kindex C-c C-m C-i | |
5341 @kindex C-c C-m i | |
5342 @vindex mh-compose-insertion | |
5343 | |
5344 Binaries, images, sound, and video can be inserted in your message | |
5345 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You | |
5346 are prompted for the filename containing the object, the media type if | |
5347 it cannot be determined automatically, and a content description. If | |
5348 you're using MH-style directives, you will also be prompted for | |
5349 additional attributes. | |
5350 | |
5351 @subheading Forwarding Multimedia Messages | |
5352 | |
5353 @findex mh-compose-forward | |
5354 @kindex C-c C-m C-f | |
5355 @kindex C-c C-m f | |
5356 | |
5357 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m | |
5358 C-f} (@code{mh-compose-forward}). You are prompted for a content | |
5359 description, the name of the folder in which the messages to forward | |
5360 are located, and a range of messages, which defaults to the current | |
5361 message in that folder. @xref{Ranges}. | |
5362 | |
5363 @subheading Including an FTP Reference | |
5364 | |
5365 @cindex @command{ftp} | |
5366 @cindex MIME, @command{ftp} | |
5367 @cindex Unix commands, @command{ftp} | |
5368 @findex mh-mh-compose-anon-ftp | |
5369 @kindex C-c C-m C-g | |
5370 @kindex C-c C-m g | |
5371 | |
5372 You can have your message initiate an @command{ftp} transfer when the | |
5373 recipient reads the message. To do this, use the command @kbd{C-c C-m | |
5374 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote | |
5375 host and filename, the media type, and the content description. | |
5376 | |
5377 @subheading Including tar Files | |
5378 | |
5379 @cindex @command{ftp} | |
5380 @cindex @command{tar} | |
5381 @cindex MIME, @command{ftp} | |
5382 @cindex MIME, @command{tar} | |
5383 @cindex Unix commands, @command{ftp} | |
5384 @cindex Unix commands, @command{tar} | |
5385 @findex mh-mh-compose-anon-ftp | |
5386 @findex mh-mh-compose-external-compressed-tar | |
5387 @kindex C-c C-m C-g | |
5388 @kindex C-c C-m C-t | |
5389 @kindex C-c C-m t | |
5390 | |
5391 If the remote file is a compressed tar file, you can use @kbd{C-c C-m | |
5392 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition | |
5393 to retrieving the file via anonymous @emph{ftp} as per the command | |
5394 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also | |
5395 be uncompressed and untarred. You are prompted for the remote host and | |
5396 filename and the content description. | |
5397 | |
5398 @subheading Including Other External Files | |
5399 | |
5400 @findex mh-mh-compose-external-type | |
5401 @kindex C-c C-m C-x | |
5402 @kindex C-c C-m x | |
5403 | |
5404 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is | |
5405 a general utility for referencing external files. In fact, all of the | |
5406 other commands that insert tags to access external files call this | |
5407 command. You are prompted for the access type, remote host and | |
5408 filename, and content type. If you provide a prefix argument, you are | |
5409 also prompted for a content description, attributes, parameters, and a | |
5410 comment. | |
5411 | |
5412 @subheading Previewing Multimedia Messages | |
5413 | |
5414 When you are finished editing a @sc{mime} message, it might look like this: | |
5415 | |
5416 @cartouche | |
5417 @smallexample | |
5418 3 t08/24 root received fax files on Wed Aug 24 11:00: | |
5419 4+t08/24 To:wohler Test<<This is a test message to get the | |
5420 | |
5421 | |
5422 | |
5423 | |
5424 | |
5425 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)--------------- | |
5426 To: wohler | |
5427 cc: | |
5428 Subject: Test of MIME | |
5429 -------- | |
5430 Here is the SETI@@Home logo: | |
5431 | |
5432 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm" | |
5433 disposition=inline description="SETI@@home logo"> | |
5434 <#/part> | |
5435 --:** @{draft@} All L8 (MH-Letter)---------------------------------- | |
5436 | |
5437 @end smallexample | |
5438 @end cartouche | |
5439 @i{MH-E @sc{mime} draft} | |
5440 | |
5441 @findex mh-mml-to-mime | |
5442 @kindex C-c C-m C-m | |
5443 @kindex C-c C-m m | |
5444 | |
5445 Typically, you send a message with attachments just like any other | |
5446 message (@pxref{Sending Message}). | |
5447 | |
5448 @findex mh-mml-to-mime | |
5449 @kindex C-c C-m C-m | |
5450 | |
5451 However, you may take a sneak preview of the @sc{mime} encoding if you | |
5452 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}). | |
5453 The following screen shows the @sc{mime} encoding specified by the | |
5454 tags. You can see why mail user agents are usually built to hide these | |
5455 details from the user. | |
5456 | |
5457 @cartouche | |
5458 @smallexample | |
5459 To: wohler | |
5460 cc: | |
5461 Subject: Test of MIME | |
97555 | 5462 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 5463 MIME-Version: 1.0 |
5464 Content-Type: multipart/mixed; boundary="=-=-=" | |
5465 -------- | |
5466 --=-=-= | |
5467 | |
5468 Here is the SETI@@Home logo: | |
5469 | |
5470 | |
5471 --=-=-= | |
5472 Content-Type: image/x-xpm | |
5473 Content-Disposition: inline; filename=setiathome.xpm | |
5474 Content-Transfer-Encoding: base64 | |
5475 Content-Description: SETI@@home logo | |
5476 | |
5477 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N | |
5478 --:-- @{draft@} Top L1 (MH-Letter)---------------------------------- | |
5479 | |
5480 @end smallexample | |
5481 @end cartouche | |
5482 @i{MH-E @sc{mime} draft ready to send} | |
5483 | |
5484 @cindex undo effects of mh-mml-to-mime | |
5485 | |
5486 This action can be undone by running @kbd{C-_} (@code{undo}). | |
5487 | |
5488 @cindex @command{mhbuild} | |
5489 @cindex @command{mhn} | |
5490 @cindex MH commands, @command{mhbuild} | |
5491 @cindex MH commands, @command{mhn} | |
5492 @cindex undo effects of mh-mh-to-mime | |
5493 @findex mh-mh-to-mime | |
5494 @findex mh-mh-to-mime-undo | |
5495 @kindex C-c C-e | |
5496 @kindex C-c C-m C-m | |
5497 @kindex C-c C-m C-u | |
5498 @kindex C-c C-m u | |
5499 | |
5500 If you're using MH-style directives, use @kbd{C-c C-e} | |
5501 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the | |
5502 command @command{mhbuild} (@command{mhn}) on the message which expands | |
5503 the tags@footnote{See the section | |
5504 @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in | |
5505 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u} | |
5506 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup | |
5507 file. You are prompted to confirm this action, but you can avoid the | |
5508 confirmation by adding an argument (for example, @kbd{C-u C-c C-m | |
5509 C-u}). | |
5510 | |
5511 @kindex C-c C-e | |
5512 @vindex mh-mh-to-mime-args | |
5513 | |
5514 If you wish to pass additional arguments to @command{mhbuild} | |
5515 (@command{mhn}) to affect how it builds your message, use the option | |
5516 @code{mh-mh-to-mime-args}. For example, you can build a consistency | |
5517 check into the message by setting @code{mh-mh-to-mime-args} to | |
5518 @samp{-check}. The recipient of your message can then run | |
5519 @samp{mhbuild -check} on the message---@command{mhbuild} | |
5520 (@command{mhn}) will complain if the message has been corrupted on the | |
5521 way. The command @kbd{C-c C-e} only consults this option when given a | |
5522 prefix argument (as in @kbd{C-u C-c C-e}). | |
5523 | |
5524 @kindex C-c C-e | |
5525 @vindex mh-mh-to-mime-hook | |
5526 | |
5527 The hook @code{mh-mh-to-mime-hook} is called after the message has | |
5528 been formatted by @kbd{C-c C-e}. | |
5529 | |
5530 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts | |
5531 @section Signing and Encrypting Messages | |
5532 | |
5533 @cindex signing messages | |
5534 @cindex encrypting messages | |
5535 @cindex RFC 3156 | |
5536 | |
5537 MH-E can sign and encrypt messages as defined in | |
5538 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you | |
5539 should choose to sign or encrypt your message, use one of the | |
5540 following commands to do so any time before sending your message. | |
5541 | |
5542 @findex mh-mml-secure-message-encrypt | |
5543 @findex mh-mml-secure-message-sign | |
5544 @findex mh-mml-secure-message-signencrypt | |
5545 @kindex C-c C-m C-e | |
5546 @kindex C-c C-m C-s | |
5547 @kindex C-c C-m e e | |
5548 @kindex C-c C-m e s | |
5549 @kindex C-c C-m s e | |
5550 @kindex C-c C-m s s | |
5551 | |
5552 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign}) | |
5553 inserts the following tag: | |
5554 | |
5555 @smallexample | |
5556 <#secure method=pgpmime mode=sign> | |
5557 @end smallexample | |
5558 | |
5559 This is used to sign your message digitally. Likewise, the command | |
5560 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the | |
5561 following tag: | |
5562 | |
5563 @smallexample | |
5564 <#secure method=pgpmime mode=encrypt> | |
5565 @end smallexample | |
5566 | |
5567 This is used to encrypt your message. Finally, the command @kbd{C-c | |
5568 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the | |
5569 following tag: | |
5570 | |
5571 @smallexample | |
5572 <#secure method=pgpmime mode=signencrypt> | |
5573 @end smallexample | |
5574 | |
5575 @findex mh-mml-unsecure-message | |
5576 @kindex C-c C-m C-n | |
5577 @kindex C-c C-m n | |
5578 @vindex mh-mml-method-default | |
5579 | |
5580 This is used to sign and encrypt your message. In each of these cases, | |
5581 a proper multipart message is created for you when you send the | |
5582 message. Use the command @kbd{C-c C-m C-n} | |
5583 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix | |
5584 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the | |
5585 possible security methods (see @code{mh-mml-method-default}). | |
5586 | |
5587 @vindex mh-mml-method-default | |
5588 | |
5589 The option @code{mh-mml-method-default} is used to select between a | |
5590 variety of mail security mechanisms. The default is @samp{PGP (MIME)} | |
5591 if it is supported; otherwise, the default is @samp{None}. Other | |
5592 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}. | |
5593 | |
5594 @cindex @samp{pgg} customization group | |
5595 @cindex PGG | |
5596 @cindex customization group, @samp{pgg} | |
5597 | |
5598 The @samp{pgg} customization group may have some settings which may | |
5599 interest you. | |
5600 @iftex | |
5601 See @cite{The PGG Manual}. | |
5602 @end iftex | |
5603 @ifinfo | |
5604 @xref{Top, , The PGG Manual, pgg, The PGG Manual}. | |
5605 @end ifinfo | |
5606 @ifhtml | |
5607 See | |
5608 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html, | |
5609 @cite{The PGG Manual}}. | |
5610 @end ifhtml | |
5611 | |
5612 @cindex header field, @samp{Fcc:} | |
5613 @cindex @samp{Fcc:} header field | |
5614 @vindex pgg-encrypt-for-me | |
5615 | |
5616 In particular, I turn on the option @code{pgg-encrypt-for-me} so that | |
5617 all messages I encrypt are encrypted with my public key as well. If | |
5618 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header | |
5619 field, this setting is vital so that you can read the mail you write! | |
5620 | |
5621 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts | |
5622 @section Checking Recipients | |
5623 | |
5624 @cindex @samp{*MH-E Recipients*} | |
5625 @cindex @command{whom} | |
5626 @cindex MH commands, @command{whom} | |
5627 @cindex buffers, @samp{*MH-E Recipients*} | |
5628 @cindex checking recipients | |
5629 @cindex recipients, checking | |
5630 @findex mh-check-whom | |
5631 @kindex C-c C-w | |
5632 | |
5633 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so | |
5634 you can check the actual address(es) in the alias. A new buffer named | |
5635 @samp{*MH-E Recipients*} is created with the output of @command{whom} | |
5636 (@pxref{Miscellaneous})@footnote{See the section | |
5637 @uref{@value{MH-BOOK-HOME}/senove.html#WhaPro, What now? -- and the | |
5638 whatnow Program} in the MH book.}. | |
5639 | |
5640 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts | |
5641 @section Sending a Message | |
5642 | |
5643 @cindex buffers, @samp{*MH-E Mail Delivery*} | |
5644 @cindex @samp{*MH-E Mail Delivery*} | |
5645 @cindex sending mail | |
5646 @findex mh-send-letter | |
5647 @kindex C-c C-c | |
5648 | |
5649 When you are all through editing a message, you send it with the | |
5650 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix | |
5651 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the | |
5652 delivery; this output can be found in a buffer called @samp{*MH-E Mail | |
5653 Delivery*} (@pxref{Miscellaneous}). | |
5654 | |
5655 @cindex sending mail | |
5656 @cindex spell check | |
5657 @findex ispell-message | |
5658 @kindex C-c C-c | |
5659 @vindex mh-before-send-letter-hook | |
5660 | |
5661 The hook @code{mh-before-send-letter-hook} is run at the beginning of | |
5662 the command @kbd{C-c C-c}. For example, if you want to check your | |
5663 spelling in your message before sending, add the function | |
5664 @code{ispell-message}. | |
5665 | |
5666 @cindex @command{send} | |
5667 @cindex MH commands, @command{send} | |
5668 @vindex mh-send-prog | |
5669 | |
5670 In case the MH @command{send} program@footnote{See the section | |
5671 @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} | |
5672 in the MH book.} is installed under a different name, use | |
5673 @code{mh-send-prog} to tell MH-E the name. | |
5674 | |
97192 | 5675 The hook @code{mh-annotate-msg-hook} is run after annotating the |
5676 message and scan line (@pxref{Sending Mail}). | |
5677 | |
84306 | 5678 @node Killing Draft, , Sending Message, Editing Drafts |
5679 @section Killing the Draft | |
5680 | |
5681 @cindex killing draft | |
5682 @findex kill-buffer | |
5683 @findex mh-fully-kill-draft | |
5684 @kindex C-c C-q | |
5685 @kindex C-x k | |
5686 | |
5687 If for some reason you are not happy with the draft, you can use the | |
5688 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft | |
5689 buffer and delete the draft message. Use the command @kbd{C-x k} | |
5690 (@code{kill-buffer}) if you don't want to delete the draft message. | |
5691 | |
5692 @node Aliases, Identities, Editing Drafts, Top | |
5693 @chapter Aliases | |
5694 | |
5695 @cindex aliases | |
5696 | |
5697 MH aliases are used in the same way in MH-E as they are in MH. Any | |
5698 alias listed as a recipient will be expanded when the message is sent. | |
5699 This chapter discusses other things you can do with aliases in MH-E. | |
5700 | |
5701 @cindex MH-Letter mode | |
5702 @cindex modes, MH-Letter | |
5703 | |
5704 The following commands are available in MH-Letter mode with the | |
5705 exception of @code{mh-alias-reload} which can be called from anywhere. | |
5706 | |
5707 @table @kbd | |
5708 @kindex @key{SPC} | |
5709 @findex mh-letter-complete-or-space | |
5710 @item @key{SPC} | |
5711 Perform completion or insert space (@code{mh-letter-complete-or-space}). | |
5712 @c ------------------------- | |
5713 @kindex M-@key{TAB} | |
5714 @findex mh-letter-complete | |
5715 @item M-@key{TAB} | |
5716 Perform completion on header field or word preceding point | |
5717 (@code{mh-letter-complete}). | |
5718 @c ------------------------- | |
5719 @findex mh-alias-apropos | |
5720 @item mh-alias-apropos | |
5721 Show all aliases or addresses that match a regular expression. | |
5722 @c ------------------------- | |
5723 @findex mh-alias-grab-from-field | |
5724 @item mh-alias-grab-from-field | |
5725 Add alias for the sender of the current message | |
5726 @c ------------------------- | |
5727 @findex mh-alias-reload | |
5728 @item mh-alias-reload | |
5729 Reload MH aliases. | |
5730 @end table | |
5731 | |
5732 @cindex @samp{mh-alias} customization group | |
5733 @cindex customization group, @samp{mh-alias} | |
5734 | |
5735 The @samp{mh-alias} customization group contains options associated | |
5736 with aliases. | |
5737 | |
5738 @vtable @code | |
5739 @item mh-alias-completion-ignore-case-flag | |
5740 On means don't consider case significant in MH alias completion | |
5741 (default: @samp{on}). | |
5742 @c ------------------------- | |
5743 @item mh-alias-expand-aliases-flag | |
5744 On means to expand aliases entered in the minibuffer (default: | |
5745 @samp{off}). | |
5746 @c ------------------------- | |
5747 @item mh-alias-flash-on-comma | |
5748 Specify whether to flash address or warn on translation (default: @samp{Flash | |
5749 but Don't Warn If No Alias}). | |
5750 @c ------------------------- | |
5751 @item mh-alias-insert-file | |
5752 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile | |
5753 Profile Component}). | |
5754 @c ------------------------- | |
5755 @item mh-alias-insertion-location | |
5756 Specifies where new aliases are entered in alias files (default: | |
5757 @samp{Alphabetical}). | |
5758 @c ------------------------- | |
5759 @item mh-alias-local-users | |
5760 If @samp{on}, local users are added to alias completion (default: | |
5761 @samp{on}). | |
5762 @c ------------------------- | |
5763 @item mh-alias-local-users-prefix | |
5764 String prefixed to the real names of users from the password file | |
5765 (default: @code{"local."}. | |
5766 @c ------------------------- | |
5767 @item mh-alias-passwd-gecos-comma-separator-flag | |
5768 On means the GECOS field in the password file uses a comma separator | |
5769 (default: @samp{on}). | |
5770 @end vtable | |
5771 | |
5772 The following hook is available. | |
5773 | |
5774 @vtable @code | |
5775 @item mh-alias-reloaded-hook | |
5776 Hook run by @code{mh-alias-reload} after loading aliases (default: | |
5777 @code{nil}). | |
5778 @end vtable | |
5779 | |
5780 @subheading Adding Addresses to Draft | |
5781 | |
5782 You can use aliases when you are adding recipients to a message. | |
5783 | |
5784 @findex minibuffer-complete | |
5785 @kindex @key{TAB} | |
5786 @vindex mh-alias-expand-aliases-flag | |
5787 @vindex mh-compose-prompt-flag | |
5788 | |
5789 In order to use minibuffer prompting for recipients and the subject | |
5790 line in the minibuffer, turn on the option | |
5791 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the | |
5792 @key{TAB} (@code{minibuffer-complete}) command to complete aliases | |
5793 (and optionally local logins) when prompted for the recipients. Turn | |
5794 on the option @code{mh-alias-expand-aliases-flag} if you want these | |
5795 aliases to be expanded to their respective addresses in the draft. | |
5796 | |
5797 @findex mh-letter-complete | |
5798 @findex mh-letter-complete-or-space | |
5799 @kindex @key{SPC} | |
5800 @kindex M-@key{TAB} | |
5801 | |
5802 Otherwise, you can complete aliases in the header of the draft with | |
5803 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC} | |
5804 (@code{mh-letter-complete-or-space}). | |
5805 | |
5806 @vindex mh-alias-completion-ignore-case-flag | |
5807 | |
5808 As MH ignores case in the aliases, so too does MH-E. However, you may | |
5809 turn off the option @code{mh-alias-completion-ignore-case-flag} to | |
5810 make case significant which can be used to segregate completion of | |
5811 your aliases. You might use uppercase for mailing lists and lowercase | |
5812 for people. For example, you might have: | |
5813 | |
5814 @smallexample | |
5815 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org> | |
5816 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org> | |
5817 @end smallexample | |
5818 | |
5819 When this option is turned off, if you were to type @kbd{M} in the | |
5820 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list; | |
5821 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then | |
5822 you'd get Mark's address. Note that this option affects completion | |
5823 only. If you were to enter @kbd{Mark.Baushke}, it would still be | |
5824 identified with your @samp{mark.baushke} alias. | |
5825 | |
5826 @findex mh-alias-minibuffer-confirm-address | |
5827 @findex mh-letter-confirm-address | |
5828 @vindex mh-alias-flash-on-comma | |
5829 @vindex mh-compose-prompt-flag | |
5830 | |
5831 To verify that the alias you've entered is valid, the alias will be | |
5832 displayed in the minibuffer when you type a comma | |
5833 (@code{mh-letter-confirm-address} or | |
5834 @code{mh-alias-minibuffer-confirm-address} if the option | |
5835 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This | |
5836 behavior can be controlled with the option | |
5837 @code{mh-alias-flash-on-comma} which provides three choices: | |
5838 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No | |
5839 Alias}, and @samp{Don't Flash Nor Warn If No Alias}. | |
5840 | |
5841 For another way to verify the alias expansion, see @ref{Checking | |
5842 Recipients}. | |
5843 | |
5844 @subheading Loading Aliases | |
5845 | |
5846 @cindex @command{ali} | |
5847 @cindex @file{/etc/nmh/MailAliases} | |
5848 @cindex @samp{Aliasfile:} MH profile component | |
5849 @cindex MH commands, @command{ali} | |
5850 @cindex MH profile component, @samp{Aliasfile:} | |
5851 @cindex files, @file{/etc/nmh/MailAliases} | |
5852 | |
5853 MH-E loads aliases for completion and folder name hints from various | |
5854 places. It uses the MH command @command{ali}@footnote{See the section | |
5855 @uref{@value{MH-BOOK-HOME}/mh.html, MH Aliases} in the MH book.} to | |
5856 read aliases from the files listed in the profile component | |
5857 @samp{Aliasfile:} as well as system-wide aliases (for example, | |
5858 @file{/etc/nmh/MailAliases}). | |
5859 | |
5860 @cindex @file{/etc/passwd} | |
5861 @cindex files, @file{/etc/passwd} | |
5862 | |
5863 In addition, aliases are created from @file{/etc/passwd} entries with | |
5864 a user ID larger than a magical number, typically 200. This can be a | |
5865 handy tool on a machine where you and co-workers exchange messages. | |
5866 These aliases have the form @samp{local.@var{first.last}} if a real | |
5867 name is present in the password file. Otherwise, the alias will have | |
5868 the form @samp{local.@var{login}}. | |
5869 | |
5870 @vindex mh-alias-local-users-prefix | |
5871 | |
5872 The prefix @samp{local.} can be modified via the option | |
5873 @code{mh-alias-local-users-prefix}. This option can also be set to | |
5874 @samp{Use Login}. | |
5875 | |
5876 For example, consider the following password file entry: | |
5877 | |
5878 @smallexample | |
5879 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh | |
5880 @end smallexample | |
5881 | |
5882 @vindex mh-alias-local-users-prefix | |
5883 | |
5884 The following settings of option @code{mh-alias-local-users-prefix} | |
5885 will produce the associated aliases: | |
5886 | |
5887 @table @code | |
5888 @item "local." | |
5889 local.peter.galbraith | |
5890 @c ------------------------- | |
5891 @item "" | |
5892 peter.galbraith | |
5893 @c ------------------------- | |
5894 @item Use Login | |
5895 psg | |
5896 @end table | |
5897 | |
5898 @vindex mh-alias-passwd-gecos-comma-separator-flag | |
5899 | |
5900 In the example above, commas are used to separate different values | |
5901 within the so-called GECOS field. This is a fairly common usage. | |
5902 However, in the rare case that the GECOS field in your password file | |
5903 is not separated by commas and whose contents may contain commas, you | |
5904 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag} | |
5905 off. | |
5906 | |
5907 @cindex NIS, obtaining local aliases from | |
5908 @cindex @samp{ypcat passwd} | |
5909 @vindex mh-alias-local-users | |
5910 | |
5911 If you're on a system with thousands of users you don't know, and the | |
5912 loading of local aliases slows MH-E down noticeably, then the local | |
5913 alias feature can be disabled by turning off the option | |
5914 @code{mh-alias-local-users}. This option also takes a string which is | |
5915 executed to generate the password file. For example, use @samp{ypcat | |
5916 passwd} to obtain the NIS password file. | |
5917 | |
5918 @findex mh-alias-reload | |
5919 @kindex M-x mh-alias-reload | |
5920 @vindex mh-alias-reloaded-hook | |
5921 | |
5922 Since aliases are updated frequently, MH-E reloads aliases | |
5923 automatically whenever an alias lookup occurs if an alias source has | |
5924 changed. However, you can reload your aliases manually by calling the | |
5925 command @kbd{M-x mh-alias-reload} directly. This command runs | |
5926 @code{mh-alias-reloaded-hook} after the aliases have been loaded. | |
5927 | |
5928 @subheading Adding Aliases | |
5929 | |
5930 In the past, you have manually added aliases to your alias file(s) | |
5931 listed in your @samp{Aliasfile:} profile component. MH-E provides | |
5932 other methods for maintaining your alias file(s). | |
5933 | |
5934 @findex mh-alias-add-alias | |
5935 @kindex M-x mh-alias-add-alias | |
5936 | |
5937 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt | |
5938 you for the alias and address that you would like to add. If the alias | |
5939 exists already, you will have the choice of inserting the new alias | |
5940 before or after the old alias. In the former case, this alias will be | |
5941 used when sending mail to this alias. In the latter case, the alias | |
5942 serves as an additional folder name hint when filing messages | |
5943 (@pxref{Folder Selection}). | |
5944 | |
5945 Earlier, the alias prefix @samp{local} was presented. You can use | |
5946 other prefixes to organize your aliases or disambiguate entries. You | |
5947 might use prefixes for locales, jobs, or activities. For example, I | |
5948 have: | |
5949 | |
5950 @smallexample | |
5951 @group | |
5952 ; Work | |
5953 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com> | |
5954 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com> | |
5955 ... | |
5956 ; Sport | |
5957 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com> | |
5958 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com> | |
5959 ... | |
5960 ; Personal | |
5961 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com> | |
5962 ... | |
5963 @end group | |
5964 @end smallexample | |
5965 | |
5966 Using prefixes instead of postfixes helps you explore aliases during | |
5967 completion. If you forget the name of an old dive buddy, you can enter | |
5968 @samp{div} and then @key{SPC} to get a listing of all your dive buddies. | |
5969 | |
5970 @kindex M-x mh-alias-add-address-under-point | |
5971 @kindex M-x mh-alias-grab-from-field | |
5972 | |
5973 An alias for the sender of the current message is added automatically | |
5974 by clicking on the @samp{Grab From alias} tool bar button or by running | |
5975 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other | |
5976 recipients of the current message are added by placing your cursor | |
5977 over the desired recipient and giving the @kbd{M-x | |
5978 mh-alias-add-address-under-point} command. | |
5979 | |
5980 @vindex mh-alias-insert-file | |
5981 @vindex mh-alias-insertion-location | |
5982 | |
5983 The options @code{mh-alias-insert-file} and | |
5984 @code{mh-alias-insertion-location} controls how and where these aliases | |
5985 are inserted. | |
5986 | |
5987 @vindex mh-alias-insert-file | |
5988 | |
5989 The default setting of option @code{mh-alias-insert-file} is @samp{Use | |
5990 Aliasfile Profile Component}. This option can also hold the name of a | |
5991 file or a list a file names. If this option is set to a list of file | |
5992 names, or the @samp{Aliasfile:} profile component contains more than | |
5993 one file name, MH-E will prompt for one of them. | |
5994 | |
5995 @vindex mh-alias-insertion-location | |
5996 | |
5997 The option @code{mh-alias-insertion-location} is set to | |
5998 @samp{Alphabetical} by default. If you organize your alias file in | |
5999 other ways, then the settings @samp{Top} and @samp{Bottom} might be | |
6000 more appropriate. | |
6001 | |
6002 @subheading Querying Aliases | |
6003 | |
6004 @cindex regular expressions, @code{mh-alias-apropos} | |
6005 @findex mh-alias-apropos | |
6006 @kindex M-x mh-alias-apropos | |
6007 | |
6008 If you can't quite remember an alias, you can use @kbd{M-x | |
6009 mh-alias-apropos} to show all aliases or addresses that match a | |
6010 regular expression | |
6011 @ifnothtml | |
6012 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The | |
6013 GNU Emacs Manual}). | |
6014 @end ifnothtml | |
6015 @ifhtml | |
6016 (see the section | |
6017 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
6018 Syntax of Regular Expressions} in | |
6019 @cite{The GNU Emacs Manual}). | |
6020 @end ifhtml | |
6021 | |
6022 @node Identities, Speedbar, Aliases, Top | |
6023 @chapter Identities | |
6024 | |
6025 @cindex identities | |
6026 @cindex multiple personalities | |
6027 | |
6028 MH-E supports the concept of multiple personalities or identities. | |
6029 This means that you can easily have a different header and signature | |
6030 at home and at work. | |
6031 | |
6032 @cindex @samp{Identity} menu | |
6033 @cindex menu, @samp{Identity} | |
6034 | |
6035 A couple of commands are used to insert identities in MH-Letter mode | |
6036 which are also found in the @samp{Identity} menu. | |
6037 | |
6038 @table @kbd | |
6039 @kindex C-c C-d | |
6040 @findex mh-insert-identity | |
6041 @item C-c C-d | |
6042 Insert fields specified by given identity (@code{mh-insert-identity}). | |
6043 @c ------------------------- | |
6044 @cindex @samp{Identity > Insert Auto Fields} menu item | |
6045 @cindex menu item, @samp{Identity > Insert Auto Fields} | |
6046 @kindex C-c M-d | |
6047 @findex mh-insert-auto-fields | |
6048 @item C-c M-d | |
6049 Insert custom fields if recipient found in @code{mh-auto-fields-list} | |
6050 (@code{mh-insert-auto-fields}). | |
6051 @end table | |
6052 | |
6053 @cindex @samp{mh-identity} customization group | |
6054 @cindex customization group, @samp{mh-identity} | |
6055 | |
6056 The @samp{mh-identity} customization group contains the following | |
6057 options. | |
6058 | |
6059 @vtable @code | |
6060 @item mh-auto-fields-list | |
6061 List of recipients for which header lines are automatically inserted | |
6062 (default: @code{nil}). | |
6063 @c ------------------------- | |
6064 @item mh-auto-fields-prompt-flag | |
6065 On means to prompt before sending if fields inserted (default: | |
6066 @samp{on}) | |
6067 @c ------------------------- | |
6068 @item mh-identity-default | |
6069 Default identity to use when @code{mh-letter-mode} is called (default: | |
6070 @samp{None}). | |
6071 @c ------------------------- | |
6072 @item mh-identity-handlers | |
6073 Handler functions for fields in @code{mh-identity-list}. | |
6074 @c ------------------------- | |
6075 @item mh-identity-list | |
6076 List of identities (default: @code{nil}). | |
6077 @end vtable | |
6078 | |
6079 Some of the common header fields that people change depending on the | |
6080 context are the @samp{From:} and @samp{Organization:} fields, as well | |
6081 as the signature. | |
6082 | |
6083 @vindex mh-identity-list | |
6084 | |
6085 This is done by customizing the option @code{mh-identity-list}. In the | |
6086 customization buffer for this option, click on the @samp{INS} button | |
6087 and enter a label such as @samp{Home} or @samp{Work}. Then click on | |
6088 the @samp{INS} button with the label @samp{Add at least one item | |
6089 below}. The @samp{Value Menu} has the following menu items: | |
6090 | |
6091 @table @samp | |
6092 @cindex header field, @samp{From:} | |
6093 @cindex @samp{From:} header field | |
6094 @item From Field | |
6095 Specify an alternate @samp{From:} header field. You must include a | |
6096 valid email address. A standard format is @samp{First Last | |
6097 <login@@host.domain>}. If you use an initial with a period, then you | |
6098 must quote your name as in @samp{"First I. Last" | |
6099 <login@@host.domain>}. | |
6100 @c ------------------------- | |
6101 @cindex header field, @samp{Organization:} | |
6102 @cindex @samp{Organization:} header field | |
6103 @item Organization Field | |
6104 People usually list the name of the company where they work here. | |
6105 @c ------------------------- | |
6106 @item Other Field | |
6107 Set any arbitrary header field and value here. Unless the header field | |
6108 is a standard one, precede the name of your field's label with | |
6109 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}. | |
6110 @c ------------------------- | |
6111 @item Attribution Verb | |
6112 This value overrides the setting of | |
6113 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}. | |
6114 @c ------------------------- | |
6115 @cindex signature | |
6116 @vindex mh-signature-file-name | |
6117 @item Signature | |
6118 Set your signature with this item. You can specify the contents of | |
6119 @code{mh-signature-file-name}, a file, or a function. | |
6120 @xref{Signature}. | |
6121 @c ------------------------- | |
6122 @item GPG Key ID | |
6123 Specify a different key to sign or encrypt messages. | |
6124 @end table | |
6125 | |
6126 @cindex Identity menu | |
6127 @cindex menu, Identity | |
6128 @findex mh-insert-identity | |
6129 @kindex C-c C-d | |
6130 | |
6131 You can select the identities you have added via the menu called | |
6132 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c | |
6133 C-d} (@code{mh-insert-identity}). To clear the fields and signature | |
6134 added by the identity, select the @samp{None} identity. | |
6135 | |
6136 @cindex menu item, @samp{Identity > Customize Identities} | |
6137 @cindex menu item, @samp{Identity > Save as Default} | |
6138 @cindex menu item, @samp{Identity > Set Default for Session} | |
6139 @cindex @samp{Identity > Customize Identities} menu item | |
6140 @cindex @samp{Identity > Save as Default} menu item | |
6141 @cindex @samp{Identity > Set Default for Session} menu item | |
6142 @vindex mh-identity-default | |
6143 | |
6144 The @samp{Identity} menu contains two other items to save you from | |
6145 having to set the identity on every message. The menu item @samp{Set | |
6146 Default for Session} can be used to set the default identity to the | |
6147 current identity until you exit Emacs. The menu item @samp{Save as | |
6148 Default} sets the option @code{mh-identity-default} to the current | |
6149 identity setting. You can also customize the option | |
6150 @code{mh-identity-default} in the usual fashion. If you find that you | |
6151 need to add another identity, the menu item @samp{Customize | |
6152 Identities} is available for your convenience. | |
6153 | |
6154 @cindex regular expressions, @code{mh-auto-fields-list} | |
6155 @vindex mh-auto-fields-list | |
6156 | |
6157 The option @code{mh-auto-fields-list} can also be used to set the | |
6158 identity depending on the recipient to provide even more control. To | |
6159 customize @code{mh-auto-fields-list}, click on the @samp{INS} button | |
6160 and enter a regular expression for the recipient's address | |
6161 @ifnothtml | |
6162 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The | |
6163 GNU Emacs Manual}). | |
6164 @end ifnothtml | |
6165 @ifhtml | |
6166 (see the section | |
6167 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
6168 Syntax of Regular Expressions} in | |
6169 @cite{The GNU Emacs Manual}). | |
6170 @end ifhtml | |
6171 Click on the @samp{INS} button with the @samp{Add at least one item | |
6172 below} label. The @samp{Value Menu} contains the following menu items: | |
6173 | |
6174 @table @samp | |
6175 @item Identity | |
6176 Select an identity from those configured in @code{mh-identity-list}. | |
6177 All of the information for that identity will be added if the | |
6178 recipient matches. | |
6179 @c ------------------------- | |
6180 @cindex @samp{Fcc:} header field | |
6181 @cindex header field, @samp{Fcc:} | |
6182 @item Fcc Field | |
6183 Insert an @samp{Fcc:} header field with the folder you provide. When | |
6184 you send the message, MH will put a copy of your message in this | |
6185 folder. | |
6186 @c ------------------------- | |
6187 @cindex @samp{Mail-Followup-To:} header field | |
6188 @cindex header field, @samp{Mail-Followup-To:} | |
6189 @item Mail-Followup-To Field | |
6190 Insert an @samp{Mail-Followup-To:} header field with the recipients | |
6191 you provide. If the recipient's mail user agent supports this header | |
6192 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then | |
6193 their replies will go to the addresses listed. This is useful if their | |
6194 replies go both to the list and to you and you don't have a mechanism | |
6195 to suppress duplicates. If you reply to someone not on the list, you | |
6196 must either remove the @samp{Mail-Followup-To:} field, or ensure the | |
6197 recipient is also listed there so that he receives replies to your | |
6198 reply. | |
6199 @c ------------------------- | |
6200 @item Other Field | |
6201 Other header fields may be added using this menu item. | |
6202 @end table | |
6203 | |
6204 @findex mh-insert-auto-fields | |
6205 @kindex C-c M-d | |
6206 @vindex mh-auto-fields-prompt-flag | |
6207 | |
6208 These fields can only be added after the recipient is known. Because | |
6209 you can continue to add recipients as you edit the draft, MH-E waits | |
6210 until the message is sent to perform the auto-insertions. This seems | |
6211 strange at first, but you'll get used to it. There are two ways to | |
6212 help you feel that the desired fields are added. The first is the | |
6213 action when the message is sent: if any fields are added | |
6214 automatically, you are given a chance to see and to confirm these | |
6215 fields before the message is actually sent. You can do away with this | |
6216 confirmation by turning off the option | |
6217 @code{mh-auto-fields-prompt-flag}. The second method is manual: once | |
6218 the header contains one or more recipients, you may run the command | |
6219 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the | |
6220 @samp{Identity -> Insert Auto Fields} menu item to insert these fields | |
6221 manually. However, if you use this command, the automatic insertion | |
6222 when the message is sent is disabled. | |
6223 | |
6224 @vindex mh-auto-fields-list | |
6225 @vindex mh-identity-list | |
6226 | |
6227 You should avoid using the same header field in | |
6228 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions | |
6229 that may apply to the same message as the result is undefined. | |
6230 | |
6231 @vindex mh-identity-handlers | |
6232 @vindex mh-identity-list | |
6233 | |
6234 The option @code{mh-identity-handlers} is used to change the way that | |
6235 fields, signatures, and attributions in @code{mh-identity-list} are | |
6236 added. To customize @code{mh-identity-handlers}, replace the name of | |
6237 an existing handler function associated with the field you want to | |
6238 change with the name of a function you have written. You can also | |
6239 click on an @samp{INS} button and insert a field of your choice and | |
6240 the name of the function you have written to handle it. | |
6241 | |
6242 @vindex mh-identity-list | |
6243 | |
6244 The @samp{Field} field can be any field that you've used in your | |
6245 @code{mh-identity-list}. The special fields @samp{:attribution-verb}, | |
6246 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the | |
6247 @code{mh-identity-list} choices @samp{Attribution Verb}, | |
6248 @samp{Signature}, and @samp{GPG Key ID} respectively. | |
6249 | |
6250 The handler associated with the @samp{:default} field is used when no | |
6251 other field matches. | |
6252 | |
6253 The handler functions are passed two or three arguments: the field | |
6254 itself (for example, @samp{From}), or one of the special fields (for | |
6255 example, @samp{:signature}), and the action @samp{'remove} or | |
6256 @samp{'add}. If the action is @samp{'add}, an additional argument | |
6257 containing the value for the field is given. | |
6258 | |
6259 @node Speedbar, Menu Bar, Identities, Top | |
6260 @chapter The Speedbar | |
6261 | |
6262 @cindex folder navigation | |
6263 @cindex speedbar | |
6264 @findex mh-visit-folder | |
6265 @kindex F v | |
6266 @kindex M-x speedbar | |
6267 @kindex Mouse-2 | |
6268 | |
6269 You can also use the speedbar | |
6270 @ifnothtml | |
6271 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},) | |
6272 @end ifnothtml | |
6273 @ifhtml | |
6274 (see the section | |
6275 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html, | |
6276 Speedbar Frames} in @cite{The GNU Emacs Manual}) | |
6277 @end ifhtml | |
6278 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar | |
6279 @key{RET}}. You will see a new frame appear with all of your MH | |
6280 folders. Folders with unseen messages appear in boldface. Click on a | |
6281 folder name with @kbd{Mouse-2} to visit that folder in a similar | |
6282 fashion to the command @kbd{F v} (@code{mh-visit-folder}) | |
6283 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the | |
6284 sub-folders of that folder. | |
6285 | |
6286 The speedbar can be manipulated with the keyboard as well. Use the | |
6287 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move | |
6288 the cursor over the desired folder and then use the shortcuts for the | |
6289 menu items listed in the table below. | |
6290 | |
6291 @table @samp | |
6292 @findex mh-speed-view | |
6293 @item Visit Folder (@key{RET}) | |
6294 Visits the selected folder just as if you had used @kbd{F v} | |
6295 (@code{mh-speed-view}). | |
6296 @c ------------------------- | |
6297 @findex mh-speed-expand-folder | |
6298 @item Expand Nested Folders (@kbd{+}) | |
6299 Expands the selected folder in the speedbar, exposing the children | |
6300 folders inside it (@code{mh-speed-expand-folder}). | |
6301 @c ------------------------- | |
6302 @findex mh-speed-contract-folder | |
6303 @item Contract Nested Folders (@kbd{-}) | |
6304 Contracts or collapses the selected folder in the speedbar, hiding the | |
6305 children folders inside it (@code{mh-speed-contract-folder}). | |
6306 @c ------------------------- | |
6307 @findex mh-speed-refresh | |
6308 @item Refresh Speedbar (@kbd{r}) | |
6309 Regenerates the list of folders in the speedbar. Run this command if | |
6310 you've added or deleted a folder, or want to update the unseen message | |
6311 count before the next automatic update (@code{mh-speed-refresh}). | |
6312 @end table | |
6313 | |
6314 @findex delete-frame | |
6315 @kindex C-x 5 0 | |
6316 @kindex Mouse-3 | |
6317 | |
6318 You can click on @kbd{Mouse-3} to bring up a context menu that | |
6319 contains these items. Dismiss the speedbar with @kbd{C-x 5 0} | |
6320 (@code{delete-frame}). | |
6321 | |
6322 @cindex @command{flists} | |
6323 @cindex MH commands, @command{flists} | |
6324 @cindex @samp{mh-speedbar} customization group | |
6325 @cindex customization group, @samp{mh-speedbar} | |
6326 | |
6327 The MH-E speedbar uses the MH command @command{flists}@footnote{See | |
6328 the section @uref{@value{MH-BOOK-HOME}/morseq.html#flist, Searching for | |
6329 Sequences with flist} in the MH book.} to generate the list of | |
6330 folders. The @samp{mh-speedbar} customization group contains the | |
6331 following option which controls how often the speedbar calls | |
6332 @command{flists}. | |
6333 | |
6334 @vtable @code | |
6335 @item mh-speed-update-interval | |
6336 Time between speedbar updates in seconds (default: 60). Set to 0 to | |
6337 disable automatic update. | |
6338 @end vtable | |
6339 | |
6340 You can modify the appearance of the folders in the speedbar by | |
6341 customizing the following faces. | |
6342 | |
6343 @vtable @code | |
6344 @item mh-speedbar-folder | |
6345 Basic folder face. | |
6346 @c ------------------------- | |
6347 @item mh-speedbar-folder-with-unseen-messages | |
6348 Folder face when folder contains unread messages. | |
6349 @c ------------------------- | |
6350 @item mh-speedbar-selected-folder | |
6351 Selected folder face. | |
6352 @c ------------------------- | |
6353 @item mh-speedbar-selected-folder-with-unseen-messages | |
6354 Selected folder face when folder contains unread messages. | |
6355 @end vtable | |
6356 | |
6357 @node Menu Bar, Tool Bar, Speedbar, Top | |
6358 @chapter The Menu Bar | |
6359 | |
6360 @cindex @samp{Folder} menu | |
6361 @cindex @samp{Identity} menu | |
6362 @cindex @samp{Letter} menu | |
6363 @cindex @samp{Message} menu | |
6364 @cindex @samp{Search} menu | |
6365 @cindex @samp{Sequence} menu | |
6366 @cindex Folder menu | |
6367 @cindex Identity menu | |
6368 @cindex Letter menu | |
6369 @cindex MH-Folder mode | |
6370 @cindex MH-Letter mode | |
6371 @cindex MH-Search mode | |
6372 @cindex Message menu | |
6373 @cindex Search menu | |
6374 @cindex Sequence menu | |
6375 @cindex menu bar | |
6376 @cindex menu, Folder | |
6377 @cindex menu, Identity | |
6378 @cindex menu, Letter | |
6379 @cindex menu, Message | |
6380 @cindex menu, Search | |
6381 @cindex menu, Sequence | |
6382 @cindex menu, @samp{Folder} | |
6383 @cindex menu, @samp{Identity} | |
6384 @cindex menu, @samp{Letter} | |
6385 @cindex menu, @samp{Message} | |
6386 @cindex menu, @samp{Search} | |
6387 @cindex menu, @samp{Sequence} | |
6388 @cindex modes, MH-Folder | |
6389 @cindex modes, MH-Letter | |
6390 @cindex modes, MH-Search | |
6391 | |
6392 For those of you who prefer to mouse and menu instead of using the | |
6393 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its | |
6394 functions. The MH-Folder buffer adds the @samp{Folder}, | |
6395 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds | |
6396 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds | |
6397 the @samp{Search} menu. There's no need to list the actual items here, | |
6398 as you can more easily see them for yourself, and the functions are | |
6399 already described elsewhere in this manual. | |
6400 | |
6401 For a description of the menu bar, please | |
6402 @ifnothtml | |
6403 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}. | |
6404 @end ifnothtml | |
6405 @ifhtml | |
6406 see the section | |
6407 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html, | |
6408 The Menu Bar} in @cite{The GNU Emacs Manual}. | |
6409 @end ifhtml | |
6410 | |
6411 The Emacs manual describes how to get online help for a particular | |
6412 menu item. You can also look up a menu item in the index of this | |
6413 manual in two ways: all of the menu items are listed alphabetically, | |
6414 and you can also browse all of the items under the index entry | |
6415 @samp{menu item}. | |
6416 | |
6417 @node Tool Bar, Searching, Menu Bar, Top | |
6418 @chapter The Tool Bar | |
6419 | |
6420 @cindex tool bar | |
6421 | |
6422 Emacs also provides a graphical tool bar. For a description of the | |
6423 tool bar, please | |
6424 @ifnothtml | |
6425 @xref{Tool Bars, , Tool Bars, emacs, The GNU Emacs Manual}. | |
6426 @end ifnothtml | |
6427 @ifhtml | |
6428 see the section | |
6429 @uref{http://www.gnu.org/software/emacs/manual/html_node/Tool-Bars.html, | |
6430 Tool Bars} in @cite{The GNU Emacs Manual}. | |
6431 @end ifhtml | |
6432 | |
6433 @cindex @samp{mh-tool-bar} customization group | |
6434 @cindex customization group, @samp{mh-tool-bar} | |
6435 | |
6436 MH-E adds several icons to this tool bar; you can modify the MH-E | |
6437 aspects of the tool bar via the @samp{mh-tool-bar} customization group. | |
6438 | |
6439 @vtable @code | |
6440 @item mh-tool-bar-folder-buttons | |
6441 List of buttons to include in MH-Folder tool bar (default: a checklist | |
6442 too long to list here). | |
6443 @c ------------------------- | |
6444 @item mh-tool-bar-letter-buttons | |
6445 List of buttons to include in MH-Letter tool bar (default: a checklist | |
6446 too long to list here). | |
6447 @c ------------------------- | |
6448 @item mh-tool-bar-search-function | |
6449 Function called by the tool bar search button (default: | |
6450 @code{mh-search}). | |
6451 @c ------------------------- | |
6452 @item mh-xemacs-tool-bar-position | |
6453 Tool bar location (default: @samp{Same As Default Tool Bar}). | |
6454 @c ------------------------- | |
6455 @item mh-xemacs-use-tool-bar-flag | |
6456 If @samp{on}, use tool bar (default: @samp{on}, if supported). | |
6457 @end vtable | |
6458 | |
6459 In GNU Emacs, icons for some of MH-E's functions are added to the tool | |
6460 bar. In XEmacs, you have the opportunity to create a separate tool bar for | |
6461 the MH-E icons. | |
6462 | |
6463 @vindex mh-tool-bar-folder-buttons | |
6464 @vindex mh-tool-bar-letter-buttons | |
6465 | |
6466 In either case, you can select which of these functions you'd like to | |
6467 see by customizing the options @code{mh-tool-bar-folder-buttons} and | |
6468 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former | |
6469 customizes the tool bar in MH-Folder mode and the latter in MH-Letter | |
6470 mode. Both of these options present you with a list of functions; | |
6471 check the functions whose icons you want to see and clear the check | |
6472 boxes for those you don't. | |
6473 | |
6474 @findex mh-search | |
6475 @vindex mh-tool-bar-search-function | |
6476 | |
6477 The function associated with the searching icon can be set via the | |
6478 option @code{mh-tool-bar-search-function}. By default, this is set to | |
6479 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other | |
6480 Function} from the @samp{Value Menu} and enter a function of your own | |
6481 choosing. | |
6482 | |
6483 @vindex mh-xemacs-use-tool-bar-flag | |
6484 | |
6485 XEmacs provides a couple of extra options. The first, | |
6486 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E | |
6487 icons at all. By default, this option is turned on if the window | |
6488 system supports tool bars. If your system doesn't support tool bars, | |
6489 then you won't be able to turn on this option. | |
6490 | |
6491 @vindex mh-xemacs-tool-bar-position | |
6492 | |
6493 The second extra option is @code{mh-xemacs-tool-bar-position} which | |
6494 controls the placement of the tool bar along the four edges of the | |
6495 frame. You can choose from one of @samp{Same As Default Tool Bar}, | |
6496 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this | |
6497 variable is set to anything other than @samp{Same As Default Tool Bar} | |
6498 and the default tool bar is in a different location, then two tool | |
6499 bars will be displayed: the MH-E tool bar and the default tool bar. | |
6500 | |
6501 @node Searching, Threading, Tool Bar, Top | |
6502 @chapter Searching Through Messages | |
6503 | |
6504 @cindex @samp{Search} menu | |
6505 @cindex menu, @samp{Search} | |
6506 @cindex searching | |
6507 @findex mh-search | |
6508 @kindex F s | |
6509 | |
6510 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which | |
6511 helps you find messages that lie buried in your folders | |
6512 (@pxref{Folders}). This chapter covers this command in more detail. | |
6513 Several commands are used to compose the search criteria and to start | |
6514 searching. A couple of them can be found in the @samp{Search} menu. | |
6515 | |
6516 @table @kbd | |
6517 @kindex C-c ? | |
6518 @findex mh-help | |
6519 @item C-c ? | |
6520 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
6521 @c ------------------------- | |
6522 @cindex @samp{Search > Perform Search} menu item | |
6523 @cindex menu item, @samp{Search > Perform Search} | |
6524 @kindex C-c C-c | |
6525 @findex mh-index-do-search | |
6526 @item C-c C-c | |
6527 Find messages using @code{mh-search-program} | |
6528 (@code{mh-index-do-search}). | |
6529 @c ------------------------- | |
6530 @cindex @samp{Search > Search with pick} menu item | |
6531 @cindex menu item, @samp{Search > Search with pick} | |
6532 @kindex C-c C-p | |
6533 @findex mh-pick-do-search | |
6534 @item C-c C-p | |
6535 Find messages using @command{pick} (@code{mh-pick-do-search}). | |
6536 @c ------------------------- | |
6537 @kindex C-c ? | |
6538 @findex mh-help | |
6539 @item C-c ? | |
6540 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
6541 @c ------------------------- | |
6542 @kindex C-c C-f C-a | |
6543 @kindex C-c C-f a | |
6544 @findex mh-to-field | |
6545 @item C-c C-f a | |
6546 @itemx C-c C-f C-a | |
6547 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}). | |
6548 @c ------------------------- | |
6549 @kindex C-c C-f C-b | |
6550 @kindex C-c C-f b | |
6551 @item C-c C-f b | |
6552 @itemx C-c C-f C-b | |
6553 Move to @samp{Bcc:} header field (@code{mh-to-field}). | |
6554 @c ------------------------- | |
6555 @kindex C-c C-f C-c | |
6556 @kindex C-c C-f c | |
6557 @item C-c C-f c | |
6558 @itemx C-c C-f C-c | |
6559 Move to @samp{Cc:} header field (@code{mh-to-field}). | |
6560 @c ------------------------- | |
6561 @kindex C-c C-f C-d | |
6562 @kindex C-c C-f d | |
6563 @item C-c C-f d | |
6564 @itemx C-c C-f C-d | |
6565 Move to @samp{Dcc:} header field (@code{mh-to-field}). | |
6566 @c ------------------------- | |
6567 @kindex C-c C-f C-f | |
6568 @kindex C-c C-f f | |
6569 @item C-c C-f f | |
6570 @itemx C-c C-f C-f | |
6571 Move to @samp{Fcc:} header field (@code{mh-to-field}). | |
6572 @c ------------------------- | |
6573 @kindex C-c C-f C-l | |
6574 @kindex C-c C-f l | |
6575 @item C-c C-f l | |
6576 @itemx C-c C-f C-l | |
6577 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}). | |
6578 @c ------------------------- | |
6579 @kindex C-c C-f C-m | |
6580 @kindex C-c C-f m | |
6581 @item C-c C-f m | |
6582 @itemx C-c C-f C-m | |
6583 Move to @samp{From:} header field (@code{mh-to-field}). | |
6584 @c ------------------------- | |
6585 @kindex C-c C-f C-r | |
6586 @kindex C-c C-f r | |
6587 @item C-c C-f r | |
6588 @itemx C-c C-f C-r | |
6589 Move to @samp{Reply-To:} header field (@code{mh-to-field}). | |
6590 @c ------------------------- | |
6591 @kindex C-c C-f C-s | |
6592 @kindex C-c C-f s | |
6593 @item C-c C-f s | |
6594 @itemx C-c C-f C-s | |
6595 Move to @samp{Subject:} header field (@code{mh-to-field}). | |
6596 @c ------------------------- | |
6597 @kindex C-c C-f C-t | |
6598 @kindex C-c C-f t | |
6599 @item C-c C-f t | |
6600 @itemx C-c C-f C-t | |
6601 Move to @samp{To:} header field (@code{mh-to-field}). | |
6602 @end table | |
6603 | |
6604 Another few commands are available in the MH-Folder buffer resulting | |
6605 from a search. | |
6606 | |
6607 @table @kbd | |
6608 @kindex @key{TAB} | |
6609 @findex mh-index-next-folder | |
6610 @item @key{TAB} | |
6611 Jump to the next folder marker (@code{mh-index-next-folder}). | |
6612 @c ------------------------- | |
6613 @kindex S-@key{TAB} | |
6614 @findex mh-index-previous-folder | |
6615 @item S-@key{TAB} | |
6616 Jump to the previous folder marker (@code{mh-index-previous-folder}). | |
6617 @c ------------------------- | |
6618 @kindex v | |
6619 @findex mh-index-visit-folder | |
6620 @item v | |
6621 Visit original folder from where the message at point was found | |
6622 (@code{mh-index-visit-folder}). | |
6623 @end table | |
6624 | |
6625 @cindex @samp{mh-search} customization group | |
6626 @cindex customization group, @samp{mh-search} | |
6627 | |
6628 There is one option from the @samp{mh-search} customization group used | |
6629 in searching. | |
6630 | |
6631 @vtable @code | |
6632 @item mh-search-program | |
6633 Search program that MH-E shall use (default: @samp{Auto-detect}). | |
6634 @end vtable | |
6635 | |
6636 The following hook is available. | |
6637 | |
6638 @vtable @code | |
6639 @item mh-search-mode-hook | |
6640 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}). | |
6641 @end vtable | |
6642 | |
6643 The following face is available. | |
6644 | |
6645 @vtable @code | |
6646 @item mh-search-folder | |
6647 Folder heading face in MH-Folder buffers created by searches. | |
6648 @end vtable | |
6649 | |
6650 @findex mh-search-folder | |
6651 @kindex F s | |
6652 | |
6653 The command @kbd{F s} (@code{mh-search-folder}) helps you find | |
6654 messages in your entire corpus of mail. You can search for messages to | |
6655 or from a particular person or about a particular subject. In fact, | |
6656 you can also search for messages containing selected strings in any | |
6657 arbitrary header field or any string found within the messages. | |
6658 | |
6659 @cindex @command{pick} | |
6660 @cindex MH commands, @command{pick} | |
6661 | |
6662 Out of the box, MH-E uses @command{pick} to find messages. With a | |
6663 little extra effort, you can set an indexing program which rewards you | |
6664 with extremely quick results. The drawback is that sometimes the index | |
6665 does not contain the words you're looking for. You can still use | |
6666 @command{pick} in these situations. | |
6667 | |
6668 You are prompted for the folder to search. This can be @samp{all} to | |
6669 search all folders. Note that the search works recursively on the | |
6670 listed folder. | |
6671 | |
6672 @cindex MH-Search mode | |
6673 @cindex modes, MH-Search | |
6674 | |
6675 Next, an MH-Search buffer appears where you can enter search criteria. | |
6676 | |
6677 @cartouche | |
6678 @smallexample | |
6679 From: | |
6680 To: | |
6681 Cc: | |
6682 Date: | |
6683 Subject: | |
6684 -------- | |
6685 # | |
6686 | |
6687 | |
6688 | |
6689 | |
6690 | |
6691 | |
6692 | |
6693 | |
6694 --:** search-pattern All L7 (MH-Search)--------------------------- | |
6695 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help | |
6696 @end smallexample | |
6697 @end cartouche | |
6698 @i{Search window} | |
6699 | |
6700 @cindex @command{pick} | |
6701 @cindex MH commands, @command{pick} | |
6702 | |
6703 Edit this template by entering your search criteria in an appropriate | |
6704 header field that is already there, or create a new field yourself. If | |
6705 the string you're looking for could be anywhere in a message, then | |
6706 place the string underneath the row of dashes. | |
6707 | |
6708 As an example, let's say that we want to find messages from Ginnean | |
6709 about horseback riding in the Kosciusko National Park (Australia) | |
6710 during January, 1994. Normally we would start with a broad search and | |
6711 narrow it down if necessary to produce a manageable amount of data, | |
6712 but we'll cut to the chase and create a fairly restrictive set of | |
6713 criteria as follows: | |
6714 | |
6715 @smallexample | |
6716 @group | |
6717 From: ginnean | |
6718 To: | |
6719 Cc: | |
6720 Date: Jan 1994 | |
6721 Subject: | |
6722 -------- | |
6723 horse | |
6724 kosciusko | |
6725 @end group | |
6726 @end smallexample | |
6727 | |
6728 @findex mh-to-field | |
6729 @kindex C-c C-f C-t | |
6730 | |
6731 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f | |
6732 C-t} (@code{mh-to-field}) to help you fill in the blanks. | |
6733 @xref{Editing Message}. | |
6734 | |
6735 @kindex F s | |
6736 @vindex mh-search-mode-hook | |
6737 | |
6738 If you find that you do the same thing over and over when editing the | |
6739 search template, you may wish to bind some shortcuts to keys. This can | |
6740 be done with the variable @code{mh-search-mode-hook}, which is called | |
6741 when @kbd{F s} is run on a new pattern. | |
6742 | |
6743 @findex mh-index-do-search | |
6744 @findex mh-pick-do-search | |
6745 @kindex C-c C-c | |
6746 @kindex C-c C-p | |
6747 | |
6748 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}). | |
6749 Sometimes you're searching for text that is either not indexed, or | |
6750 hasn't been indexed yet. In this case you can override the default | |
6751 method with the pick method by running the command @kbd{C-c C-p} | |
6752 (@code{mh-pick-do-search}). | |
6753 | |
6754 @cindex folders, @samp{+mhe-index} | |
6755 @cindex @samp{+mhe-index} | |
6756 @findex mh-index-next-folder | |
6757 @findex mh-index-previous-folder | |
6758 @kindex @key{TAB} | |
6759 @kindex S-@key{TAB} | |
6760 @vindex mh-search-folder | |
6761 | |
6762 The messages that are found are put in a temporary sub-folder of | |
6763 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This | |
6764 buffer is special because it displays messages from multiple folders; | |
6765 each set of messages from a given folder has a heading with the folder | |
6766 name. The appearance of the heading can be modified by customizing the | |
6767 face @code{mh-search-folder}. You can jump back and forth between the | |
6768 headings using the commands @kbd{@key{TAB}} | |
6769 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}} | |
6770 (@code{mh-index-previous-folder}). | |
6771 | |
6772 @findex mh-index-visit-folder | |
6773 @findex mh-rescan-folder | |
6774 @kindex F r | |
6775 @kindex v | |
6776 | |
6777 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be | |
6778 used to visit the folder of the message at point. Initially, only the | |
6779 messages that matched the search criteria are displayed in the folder. | |
6780 While the temporary buffer has its own set of message numbers, the | |
6781 actual messages numbers are shown in the visited folder. Thus, the | |
6782 command @kbd{v} is useful to find the actual message number of an | |
6783 interesting message, or to view surrounding messages with the command | |
6784 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}. | |
6785 | |
6786 @findex mh-kill-folder | |
6787 @kindex F k | |
6788 | |
6789 Because this folder is temporary, you'll probably get in the habit of | |
6790 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}). | |
6791 @xref{Folders}. | |
6792 | |
6793 @kindex F s | |
6794 | |
6795 You can regenerate the results by running @kbd{F s} with a prefix | |
6796 argument. | |
6797 | |
6798 @cindex @command{procmail} | |
6799 @cindex Unix commands, @command{procmail} | |
6800 @cindex @samp{X-MHE-Checksum:} header field | |
6801 @cindex header field, @samp{X-MHE-Checksum:} | |
6802 | |
6803 Note: This command uses an @samp{X-MHE-Checksum:} header field to | |
6804 cache the MD5 checksum of a message. This means that if an incoming | |
6805 message already contains an @samp{X-MHE-Checksum:} field, that message | |
6806 might not be found by this command. The following @command{procmail} | |
6807 recipe avoids this problem by renaming the existing header field: | |
6808 | |
6809 @smallexample | |
6810 @group | |
6811 :0 wf | |
6812 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum" | |
6813 @end group | |
6814 @end smallexample | |
6815 | |
6816 @xref{Limits}, for an alternative interface to searching. | |
6817 | |
6818 @section Configuring Indexed Searches | |
6819 | |
6820 @cindex @command{grep} | |
6821 @cindex @command{mairix} | |
6822 @cindex @command{namazu} | |
6823 @cindex @command{pick} | |
6824 @cindex @command{swish++} | |
6825 @cindex @command{swish-e} | |
6826 @cindex Unix commands, @command{grep} | |
6827 @cindex Unix commands, @command{mairix} | |
6828 @cindex Unix commands, @command{namazu} | |
6829 @cindex Unix commands, @command{pick} | |
6830 @cindex Unix commands, @command{swish++} | |
6831 @cindex Unix commands, @command{swish-e} | |
6832 @findex mh-search | |
6833 @kindex F s | |
6834 @vindex mh-search-program | |
6835 | |
6836 The command @kbd{F s} (@code{mh-search}) runs the command defined by | |
6837 the option @code{mh-search-program}. The default value is | |
6838 @samp{Auto-detect} which means that MH-E will automatically choose one | |
6839 of @command{swish++}, @command{swish-e}, @command{mairix}, | |
6840 @command{namazu}, @command{pick} and @command{grep} in that order. If, | |
6841 for example, you have both @command{swish++} and @command{mairix} | |
6842 installed and you want to use @command{mairix}, then you can set this | |
6843 option to @samp{mairix}. | |
6844 | |
6845 The following sub-sections describe how to set up the various indexing | |
6846 programs to use with MH-E. | |
6847 | |
6848 @subsection swish++ | |
6849 | |
6850 @cindex @command{swish++} | |
6851 @cindex Unix commands, @command{swish++} | |
6852 | |
6853 In the examples below, replace @file{/home/user/Mail} with the path to | |
6854 your MH directory. | |
6855 | |
6856 First create the directory @file{/home/user/Mail/.swish++}. Then | |
6857 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the | |
6858 following contents: | |
6859 | |
6860 @smallexample | |
6861 @group | |
6862 IncludeMeta Bcc Cc Comments Content-Description From Keywords | |
6863 IncludeMeta Newsgroups Resent-To Subject To | |
6864 IncludeMeta Message-Id References In-Reply-To | |
6865 IncludeFile Mail * | |
6866 IndexFile /home/user/Mail/.swish++/swish++.index | |
6867 @end group | |
6868 @end smallexample | |
6869 | |
6870 Use the following command line to generate the swish index. Run this | |
6871 daily from cron: | |
6872 | |
6873 @smallexample | |
6874 @group | |
6875 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \ | |
6876 -o -path /home/user/Mail/.swish++ -prune \ | |
6877 -o -name "[0-9]*" -print \ | |
6878 | index -c /home/user/Mail/.swish++/swish++.conf - | |
6879 @end group | |
6880 @end smallexample | |
6881 | |
6882 This command does not index the folders that hold the results of your | |
6883 searches in @samp{+mhe-index} since they tend to be ephemeral and the | |
6884 original messages are indexed anyway. | |
6885 | |
6886 @cindex @command{index} | |
6887 @cindex Unix commands, @command{index} | |
6888 @cindex @command{index++} | |
6889 @cindex Unix commands, @command{index++} | |
6890 | |
6891 On some systems (Debian GNU/Linux, for example), use @command{index++} | |
6892 instead of @command{index}. | |
6893 | |
6894 @subsection swish | |
6895 | |
6896 @cindex @command{swish-e} | |
6897 @cindex Unix commands, @command{swish-e} | |
6898 | |
6899 In the examples below, replace @file{/home/user/Mail} with the path to | |
6900 your MH directory. | |
6901 | |
6902 First create the directory @file{/home/user/Mail/.swish}. Then create | |
6903 the file @file{/home/user/Mail/.swish/config} with the following | |
6904 contents: | |
6905 | |
6906 @smallexample | |
6907 @group | |
6908 DefaultContents TXT* | |
6909 IndexDir /home/user/Mail | |
6910 IndexFile /home/user/Mail/.swish/index | |
6911 IndexName "Mail Index" | |
6912 IndexDescription "Mail Index" | |
6913 IndexPointer "http://nowhere" | |
6914 IndexAdmin "nobody" | |
6915 #MetaNames automatic | |
6916 IndexReport 3 | |
6917 FollowSymLinks no | |
6918 UseStemming no | |
6919 IgnoreTotalWordCountWhenRanking yes | |
6920 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- | |
6921 BeginCharacters abcdefghijklmnopqrstuvwxyz | |
6922 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 | |
6923 IgnoreLimit 50 1000 | |
6924 IndexComments 0 | |
6925 FileRules filename contains \D | |
6926 FileRules pathname contains /home/user/Mail/.swish | |
6927 FileRules pathname contains /home/user/Mail/mhe-index | |
6928 FileRules filename is index | |
6929 @end group | |
6930 @end smallexample | |
6931 | |
6932 This configuration does not index the folders that hold the results of | |
6933 your searches in @samp{+mhe-index} since they tend to be ephemeral and | |
6934 the original messages are indexed anyway. | |
6935 | |
6936 If there are any directories you would like to ignore, append lines | |
6937 like the following to @file{config}: | |
6938 | |
6939 @smallexample | |
6940 FileRules pathname contains /home/user/Mail/scripts | |
6941 @end smallexample | |
6942 | |
6943 @cindex @command{swish-e} | |
6944 @cindex Unix commands, @command{swish-e} | |
6945 | |
6946 Use the following command line to generate the swish index. Run this | |
6947 daily from cron: | |
6948 | |
6949 @smallexample | |
6950 swish-e -c /home/user/Mail/.swish/config | |
6951 @end smallexample | |
6952 | |
6953 @subsection mairix | |
6954 | |
6955 @cindex @command{mairix} | |
6956 @cindex Unix commands, @command{mairix} | |
6957 | |
6958 In the examples below, replace @file{/home/user/Mail} with the path to | |
6959 your MH directory. | |
6960 | |
6961 First create the directory @file{/home/user/Mail/.mairix}. Then create | |
6962 the file @file{/home/user/Mail/.mairix/config} with the following | |
6963 contents: | |
6964 | |
6965 @smallexample | |
6966 @group | |
6967 base=/home/user/Mail | |
6968 | |
6969 # List of folders that should be indexed. 3 dots at the end means there | |
6970 # are subfolders within the folder | |
6971 mh=archive...:inbox:drafts:news:sent:trash | |
6972 | |
6973 vfolder_format=raw | |
6974 database=/home/user/Mail/mairix/database | |
6975 @end group | |
6976 @end smallexample | |
6977 | |
6978 Use the following command line to generate the mairix index. Run this daily | |
6979 from cron: | |
6980 | |
6981 @smallexample | |
6982 mairix -f /home/user/Mail/.mairix/config | |
6983 @end smallexample | |
6984 | |
6985 @subsection namazu | |
6986 | |
6987 @cindex @command{namazu} | |
6988 @cindex Unix commands, @command{namazu} | |
6989 | |
6990 In the examples below, replace @file{/home/user/Mail} with the path to | |
6991 your MH directory. | |
6992 | |
6993 First create the directory @file{/home/user/Mail/.namazu}. Then create | |
6994 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following | |
6995 contents: | |
6996 | |
6997 @smallexample | |
6998 @group | |
6999 package conf; # Don't remove this line! | |
7000 $ADDRESS = 'user@@localhost'; | |
7001 $ALLOW_FILE = "[0-9]*"; | |
7002 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)"; | |
7003 @end group | |
7004 @end smallexample | |
7005 | |
7006 This configuration does not index the folders that hold the results of | |
7007 your searches in @samp{+mhe-index} since they tend to be ephemeral and | |
7008 the original messages are indexed anyway. | |
7009 | |
7010 Use the following command line to generate the namazu index. Run this | |
7011 daily from cron: | |
7012 | |
7013 @smallexample | |
7014 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \ | |
7015 /home/user/Mail | |
7016 @end smallexample | |
7017 | |
7018 @subsection pick | |
7019 | |
7020 @cindex @command{pick} | |
7021 @cindex MH commands, @command{pick} | |
7022 | |
7023 This search method does not require any setup. | |
7024 | |
7025 Read @command{pick}(1) or the section | |
7026 @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in | |
7027 the MH book to find out more about how to enter the criteria. | |
7028 | |
7029 @subsection grep | |
7030 | |
7031 @cindex @command{grep} | |
7032 @cindex Unix commands, @command{grep} | |
7033 | |
7034 This search method does not require any setup. | |
7035 | |
7036 Unlike the other search methods, this method does not use the | |
7037 MH-Search buffer. Instead, you simply enter a regular expression in | |
7038 the minibuffer. For help in constructing regular expressions, see your | |
7039 man page for @command{grep}. | |
7040 | |
7041 @node Threading, Limits, Searching, Top | |
7042 @chapter Viewing Message Threads | |
7043 | |
7044 @cindex threading | |
7045 | |
7046 MH-E groups messages by @dfn{threads} which are messages that are part | |
7047 of the same discussion and usually all have the same @samp{Subject:} | |
7048 header field. Other ways to organize messages in a folder include | |
7049 limiting (@pxref{Limits}) or using full-text indexed searches | |
7050 (@pxref{Searching}). | |
7051 | |
7052 @cindex root, in threads | |
7053 @cindex siblings, in threads | |
7054 @cindex ancestor, in threads | |
7055 | |
7056 A thread begins with a single message called a @dfn{root}. All replies | |
7057 to the same message are @dfn{siblings} of each other. Any message that | |
7058 has replies to it is an @dfn{ancestor} of those replies. | |
7059 | |
7060 There are several commands that you can use to navigate and operate on | |
7061 threads. | |
7062 | |
7063 @table @kbd | |
7064 @kindex T ? | |
7065 @findex mh-prefix-help | |
7066 @item T ? | |
7067 Display cheat sheet for the commands of the current prefix in | |
7068 minibuffer (@code{mh-prefix-help}). | |
7069 @c ------------------------- | |
7070 @kindex T o | |
7071 @findex mh-thread-refile | |
7072 @item T o | |
7073 Refile (output) thread into folder (@code{mh-thread-refile}). | |
7074 @c ------------------------- | |
7075 @kindex T d | |
7076 @findex mh-thread-delete | |
7077 @item T d | |
7078 Delete thread (@code{mh-thread-delete}). | |
7079 @c ------------------------- | |
7080 @kindex T t | |
7081 @findex mh-toggle-threads | |
7082 @item T t | |
7083 Toggle threaded view of folder (@code{mh-toggle-threads}). | |
7084 @c ------------------------- | |
7085 @kindex T n | |
7086 @findex mh-thread-next-sibling | |
7087 @item T n | |
7088 Display next sibling (@code{mh-thread-next-sibling}). | |
7089 @c ------------------------- | |
7090 @kindex T p | |
7091 @findex mh-thread-previous-sibling | |
7092 @item T p | |
7093 Display previous sibling (@code{mh-thread-previous-sibling}). | |
7094 @c ------------------------- | |
7095 @kindex T u | |
7096 @findex mh-thread-ancestor | |
7097 @item T u | |
7098 Display ancestor of current message (@code{mh-thread-ancestor}). | |
7099 @end table | |
7100 | |
7101 @cindex @samp{mh-thread} customization group | |
7102 @cindex customization group, @samp{mh-thread} | |
7103 | |
7104 The @samp{mh-thread} customization group contains one option. | |
7105 | |
7106 @vtable @code | |
7107 @item mh-show-threads-flag | |
7108 On means new folders start in threaded mode (default: @samp{off}). | |
7109 @end vtable | |
7110 | |
7111 @findex mh-toggle-threads | |
7112 @kindex T t | |
7113 @vindex mh-large-folder | |
7114 @vindex mh-show-threads-flag | |
7115 | |
7116 Threading large number of messages can be time consuming so the option | |
7117 @code{mh-show-threads-flag} is turned off by default. If you turn on | |
7118 this option, then threading will be done only if the number of | |
7119 messages being threaded is less than @code{mh-large-folder}. In any | |
7120 event, threading can be turned on (and off) with the command @kbd{T t} | |
7121 (@code{mh-toggle-threads}). | |
7122 | |
7123 @findex mh-thread-ancestor | |
7124 @findex mh-thread-next-sibling | |
7125 @findex mh-thread-previous-sibling | |
7126 @kindex T n | |
7127 @kindex T p | |
7128 @kindex T u | |
7129 | |
7130 There are a few commands to help you navigate threads. If you do not | |
7131 care for the way a particular thread has turned, you can move up the | |
7132 chain of messages with the command @kbd{T u} | |
7133 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n} | |
7134 (@code{mh-thread-next-sibling} or @kbd{T p} | |
7135 (@code{mh-thread-previous-sibling}) to jump to the next or previous | |
7136 sibling, skipping the sub-threads. The command @kbd{T u} can also take | |
7137 a prefix argument to jump to the message that started everything. | |
7138 | |
7139 @findex mh-delete-subject-or-thread | |
7140 @findex mh-thread-delete | |
7141 @findex mh-thread-refile | |
7142 @kindex k | |
7143 @kindex T d | |
7144 @kindex T o | |
7145 | |
7146 There are threaded equivalents for the commands that delete and refile | |
7147 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the | |
7148 current message and all its children. Similarly, the command @kbd{T d} | |
7149 (@code{mh-thread-delete}) deletes the current message and all its | |
7150 children. These commands do not refile or delete sibling messages. | |
7151 @xref{Navigating}, for a description of the similar command @kbd{k} | |
7152 (@code{mh-delete-subject-or-thread}). | |
7153 | |
7154 @vindex mh-large-folder | |
7155 | |
7156 If you find that threading is too slow, it may be that you have | |
7157 @code{mh-large-folder} set too high. Also, threading is one of the few | |
7158 features of MH-E that really benefits from compiling. If you haven't | |
7159 compiled MH-E, I encourage you to do so@footnote{If you're not sure if | |
7160 MH-E has been byte-compiled, you could try running @samp{locate | |
7161 mh-thread.elc} or otherwise find MH-E on your system and ensure that | |
7162 @file{mh-thread.elc} exists. If you have multiple versions and you | |
7163 find that one is compiled but the other is not, then go into your | |
7164 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and | |
7165 ensure that the byte-compiled version appears first in the | |
7166 @code{load-path}. If you find that MH-E is not compiled and you | |
7167 installed MH-E yourself, please refer to the installation directions | |
7168 in the file @file{README} in the distribution.}. | |
7169 | |
7170 @node Limits, Sequences, Threading, Top | |
7171 @chapter Limiting Display | |
7172 | |
7173 @cindex limits | |
7174 @cindex filters | |
7175 | |
7176 Another way to organize messages in a folder besides threading | |
7177 (@pxref{Threading}) or using full-text indexed searches | |
7178 (@pxref{Searching}) is by limiting the folder display to messages that | |
7179 are similar to the current message. | |
7180 | |
7181 @table @kbd | |
7182 @kindex / ? | |
7183 @findex mh-prefix-help | |
7184 @item / ? | |
7185 Display cheat sheet for the commands of the current prefix in | |
7186 minibuffer (@code{mh-prefix-help}). | |
7187 @c ------------------------- | |
7188 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item | |
7189 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence} | |
7190 @kindex / ' | |
7191 @findex mh-narrow-to-tick | |
7192 @item / ' | |
7193 Limit to messages in the @samp{tick} sequence | |
7194 (@code{mh-narrow-to-tick}). | |
7195 @c ------------------------- | |
7196 @kindex / c | |
7197 @findex mh-narrow-to-cc | |
7198 @item / c | |
7199 Limit to messages with the same @samp{Cc:} field | |
7200 (@code{mh-narrow-to-cc}). | |
7201 @c ------------------------- | |
7202 @kindex / m | |
7203 @findex mh-narrow-to-from | |
7204 @item / m | |
7205 Limit to messages with the same @samp{From:} field | |
7206 (@code{mh-narrow-to-from}). | |
7207 @c ------------------------- | |
7208 @kindex / g | |
7209 @findex mh-narrow-to-range | |
7210 @item / g | |
7211 Limit to range (@code{mh-narrow-to-range}). | |
7212 @c ------------------------- | |
7213 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item | |
7214 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence} | |
7215 @kindex / s | |
7216 @findex mh-narrow-to-subject | |
7217 @item / s | |
7218 Limit to messages with the same @samp{Subject:} field | |
7219 (@code{mh-narrow-to-subject}). | |
7220 @c ------------------------- | |
7221 @kindex / t | |
7222 @findex mh-narrow-to-to | |
7223 @item / t | |
7224 Limit to messages with the same @samp{To:} field | |
7225 (@code{mh-narrow-to-to}). | |
7226 @c ------------------------- | |
7227 @cindex @samp{Sequence > Widen from Sequence} menu item | |
7228 @cindex menu item, @samp{Sequence > Widen from Sequence} | |
7229 @kindex / w | |
7230 @findex mh-widen | |
7231 @item / w | |
7232 Remove last restriction (@code{mh-widen}). | |
7233 @end table | |
7234 | |
7235 All of the limiting commands above refine the display in some way. | |
7236 | |
7237 @cindex @command{pick} | |
7238 @cindex MH commands, @command{pick} | |
7239 @findex mh-narrow-to-cc | |
7240 @findex mh-narrow-to-from | |
7241 @findex mh-narrow-to-subject | |
7242 @findex mh-narrow-to-to | |
7243 @kindex / c | |
7244 @kindex / m | |
7245 @kindex / s | |
7246 @kindex / t | |
7247 | |
7248 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m} | |
7249 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}), | |
7250 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to | |
7251 messages matching the content of the respective field in the current | |
7252 message. However, you can give any of these a prefix argument to edit | |
7253 the @command{pick} expression used to narrow the view@footnote{See | |
7254 @command{pick}(1) or the section | |
7255 @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in | |
7256 the MH book.}. | |
7257 | |
7258 @cindex @samp{tick} sequence | |
7259 @cindex sequence, @samp{tick} | |
7260 @cindex ticked messages, viewing | |
7261 @findex mh-narrow-to-range | |
7262 @findex mh-narrow-to-tick | |
7263 @kindex / ' | |
7264 @kindex / g | |
7265 | |
7266 You can also limit the display to messages in the @samp{tick} sequence | |
7267 with the command @kbd{/ '} (@code{mh-narrow-to-tick}). | |
7268 @xref{Sequences}, for information on putting message into the | |
7269 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range}) | |
7270 command to limit the display to messages in a range (@pxref{Ranges}). | |
7271 | |
7272 @findex mh-widen | |
7273 @kindex / w | |
7274 | |
7275 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen}) | |
7276 command. Give this command a prefix argument to remove all limits. | |
7277 | |
7278 @node Sequences, Junk, Limits, Top | |
7279 @chapter Using Sequences | |
7280 | |
7281 @cindex @samp{Sequence} menu | |
7282 @cindex menu, @samp{Sequence} | |
7283 @cindex sequences | |
7284 | |
7285 For the whole scoop on MH sequences, refer to | |
7286 @samp{mh-sequence}(5)@footnote{See the section | |
7287 @uref{@value{MH-BOOK-HOME}/morseq.html, More About Sequences} in the MH | |
7288 book.}. As you've read, several of the MH-E commands can operate on a | |
7289 sequence, which is a shorthand for a range or group of messages. For | |
7290 example, you might want to forward several messages to a friend or | |
7291 colleague. Here's how to manipulate sequences. These commands are also | |
7292 available in the @samp{Sequence} menu. | |
7293 | |
7294 @table @kbd | |
7295 @cindex @samp{Sequence > Toggle Tick Mark} menu item | |
7296 @cindex menu item, @samp{Sequence > Toggle Tick Mark} | |
7297 @kindex ' | |
7298 @findex mh-toggle-tick | |
7299 @item ' | |
7300 Toggle tick mark of range (@code{mh-toggle-tick}). | |
7301 @c ------------------------- | |
7302 @kindex S ? | |
7303 @findex mh-prefix-help | |
7304 @item S ? | |
7305 Display cheat sheet for the commands of the current prefix in | |
7306 minibuffer (@code{mh-prefix-help}). | |
7307 @c ------------------------- | |
7308 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item | |
7309 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence} | |
7310 @kindex S ' | |
7311 @findex mh-narrow-to-tick | |
7312 @item S ' | |
7313 Limit to ticked messages (@code{mh-narrow-to-tick}). | |
7314 @c ------------------------- | |
7315 @cindex @samp{Sequence > Delete Message from Sequence...} menu item | |
7316 @cindex menu item, @samp{Sequence > Delete Message from Sequence...} | |
7317 @kindex S d | |
7318 @findex mh-delete-msg-from-seq | |
7319 @item S d | |
7320 Delete range from sequence (@code{mh-delete-msg-from-seq}). | |
7321 @c ------------------------- | |
7322 @cindex @samp{Sequence > Delete Sequence...} menu item | |
7323 @cindex menu item, @samp{Sequence > Delete Sequence...} | |
7324 @kindex S k | |
7325 @findex mh-delete-seq | |
7326 @item S k | |
7327 Delete sequence (@code{mh-delete-seq}). | |
7328 @c ------------------------- | |
7329 @cindex @samp{Sequence > List Sequences in Folder...} menu item | |
7330 @cindex menu item, @samp{Sequence > List Sequences in Folder...} | |
7331 @kindex S l | |
7332 @findex mh-list-sequences | |
7333 @item S l | |
7334 List all sequences in folder (@code{mh-list-sequences}). | |
7335 @c ------------------------- | |
7336 @cindex @samp{Sequence > Narrow to Sequence...} menu item | |
7337 @cindex menu item, @samp{Sequence > Narrow to Sequence...} | |
7338 @kindex S n | |
7339 @findex mh-narrow-to-seq | |
7340 @item S n | |
7341 Restrict display to messages in sequence (@code{mh-narrow-to-seq}). | |
7342 @c ------------------------- | |
7343 @cindex @samp{Sequence > Add Message to Sequence...} menu item | |
7344 @cindex menu item, @samp{Sequence > Add Message to Sequence...} | |
7345 @kindex S p | |
7346 @findex mh-put-msg-in-seq | |
7347 @item S p | |
7348 Add range to sequence (@code{mh-put-msg-in-seq}). | |
7349 @c ------------------------- | |
7350 @cindex @samp{Sequence > List Sequences for Message} menu item | |
7351 @cindex menu item, @samp{Sequence > List Sequences for Message} | |
7352 @kindex S s | |
7353 @findex mh-msg-is-in-seq | |
7354 @item S s | |
7355 Display the sequences in which the current message appears | |
7356 (@code{mh-msg-is-in-seq}). | |
7357 @c ------------------------- | |
7358 @cindex @samp{Sequence > Widen from Sequence} menu item | |
7359 @cindex menu item, @samp{Sequence > Widen from Sequence} | |
7360 @kindex S w | |
7361 @findex mh-widen | |
7362 @item S w | |
7363 Remove last restriction (@code{mh-widen}). | |
7364 @c ------------------------- | |
7365 @findex mh-update-sequences | |
7366 @item M-x mh-update-sequences | |
7367 Flush MH-E's state out to MH@. | |
7368 @end table | |
7369 | |
7370 @cindex @samp{mh-sequences} customization group | |
7371 @cindex customization group, @samp{mh-sequences} | |
7372 | |
7373 The @samp{mh-sequences} customization group contains the options | |
7374 associated with sequences. | |
7375 | |
7376 @vtable @code | |
7377 @item mh-refile-preserves-sequences-flag | |
7378 On means that sequences are preserved when messages are refiled | |
7379 (default: @samp{on}). | |
7380 @c ------------------------- | |
7381 @item mh-tick-seq | |
7382 The name of the MH sequence for ticked messages (default: @samp{'tick}). | |
7383 @c ------------------------- | |
7384 @item mh-update-sequences-after-mh-show-flag | |
7385 On means flush MH sequences to disk after message is shown (default: | |
7386 @samp{on}). | |
7387 @end vtable | |
7388 | |
7389 The following hook is available. | |
7390 | |
7391 @vtable @code | |
7392 @item mh-unseen-updated-hook | |
7393 Hook run after the unseen sequence has been updated (default: @code{nil}). | |
7394 @end vtable | |
7395 | |
7396 @cindex @command{pick} | |
7397 @cindex MH commands, @command{pick} | |
7398 @findex mh-put-msg-in-seq | |
7399 @kindex S p | |
7400 | |
7401 To place a message in a sequence, use @kbd{S p} | |
7402 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all | |
7403 the messages in a sequence to another sequence (for example, @kbd{C-u | |
7404 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}). | |
7405 | |
7406 @cindex @samp{tick} sequence | |
7407 @cindex sequence, @samp{tick} | |
7408 @cindex ticking messages | |
7409 @findex mh-index-ticked-messages | |
7410 @findex mh-toggle-tick | |
7411 @kindex ' | |
7412 @kindex F ' | |
7413 @kindex S p | |
7414 | |
7415 One specific use of the @kbd{S p} command is @kbd{'} | |
7416 (@code{mh-toggle-tick}) which adds messages to the @samp{tick} | |
7417 sequence. This sequence can be viewed later with the @kbd{F '} | |
7418 (@code{mh-index-ticked-messages}) command (@pxref{Folders}). | |
7419 | |
7420 @vindex mh-tick-seq | |
7421 | |
7422 You can customize the option @code{mh-tick-seq} if you already use the | |
7423 @samp{tick} sequence for your own use. You can also disable all of the | |
7424 ticking functions by choosing the @samp{Disable Ticking} item but | |
7425 there isn't much advantage to that. | |
7426 | |
7427 @cindex MH-Folder mode | |
7428 @cindex modes, MH-Folder | |
7429 @findex mh-narrow-to-seq | |
7430 @findex mh-narrow-to-tick | |
7431 @findex mh-widen | |
7432 @kindex S ' | |
7433 @kindex S n | |
7434 @kindex S w | |
7435 | |
7436 Once you've placed some messages in a sequence, you may wish to narrow | |
7437 the field of view to just those messages in the sequence you've | |
7438 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are | |
7439 prompted for the name of the sequence. What this does is show only | |
7440 those messages that are in the selected sequence in the MH-Folder | |
7441 buffer. In addition, it limits further MH-E searches to just those | |
7442 messages. To narrow the view to the messages in the @samp{tick} | |
7443 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to | |
7444 widen the view to all your messages again, use @kbd{S w} | |
7445 (@code{mh-widen}). | |
7446 | |
7447 @cindex buffers, @samp{*MH-E Sequences*} | |
7448 @cindex @samp{*MH-E Sequences*} | |
7449 @findex mh-list-sequences | |
7450 @findex mh-msg-is-in-seq | |
7451 @kindex S l | |
7452 @kindex S s | |
7453 | |
7454 You can see which sequences in which a message appears with the | |
7455 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to | |
7456 display the sequences in which another message appears (as in @kbd{C-u | |
7457 42 S s @key{RET}}). Or, you can list all sequences in a selected | |
7458 folder (default is current folder) with @kbd{S l} | |
7459 (@code{mh-list-sequences}). The list appears in a buffer named | |
7460 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}). | |
7461 | |
7462 @cindex MH profile component, @samp{Previous-Sequence:} | |
7463 @cindex @samp{cur} sequence | |
7464 @cindex @samp{Previous-Sequence:} MH profile component | |
7465 @cindex sequence, @samp{cur} | |
7466 @cindex sequence, @samp{Previous-Sequence} | |
7467 @vindex mh-refile-preserves-sequences-flag | |
7468 | |
7469 If a message is in any sequence (except | |
7470 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and | |
7471 @samp{cur}) when it is refiled, then it will still be in those | |
7472 sequences in the destination folder. If this behavior is not desired, | |
7473 then turn off the option @code{mh-refile-preserves-sequences-flag}. | |
7474 | |
7475 @findex mh-delete-msg-from-seq | |
7476 @findex mh-delete-seq | |
7477 @kindex d | |
7478 @kindex S d | |
7479 @kindex S k | |
7480 | |
7481 If you want to remove a message (or range, @pxref{Ranges}) from a | |
7482 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want | |
7483 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In | |
7484 the latter case you are prompted for the sequence to delete. Note that | |
7485 this deletes only the sequence, not the messages in the sequence. If | |
7486 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading | |
7487 Mail}). | |
7488 | |
7489 @cindex @samp{Unseen-Sequence:} MH profile component | |
7490 @cindex @samp{cur} sequence | |
7491 @cindex @samp{tick} sequence | |
7492 @cindex MH profile component, @samp{Unseen-Sequence:} | |
7493 @cindex sequence, @samp{Unseen-Sequence} | |
7494 @cindex sequence, @samp{cur} | |
7495 @cindex sequence, @samp{tick} | |
7496 @findex mh-update-sequences | |
7497 @kindex M-x mh-update-sequences | |
7498 @kindex q | |
7499 @kindex x | |
7500 @vindex mh-tick-seq | |
7501 @vindex mh-update-sequences-after-mh-show-flag | |
7502 | |
7503 Three sequences are maintained internally by MH-E and pushed out to MH | |
7504 when a message is shown. They include the sequence specified by your | |
7505 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the | |
7506 sequence listed by the option @code{mh-tick-seq} which is @samp{tick} | |
7507 by default. If you do not like this behavior, turn off the option | |
7508 @code{mh-update-sequences-after-mh-show-flag}. You can then update the | |
7509 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x | |
7510 mh-update-sequences} commands. | |
7511 | |
7512 @vindex mh-seen-list | |
7513 @vindex mh-unseen-updated-hook | |
7514 | |
7515 The hook @code{mh-unseen-updated-hook} is run after the unseen | |
7516 sequence has been updated. The variable @code{mh-seen-list} can be | |
7517 used by this hook to obtain the list of messages which were removed | |
7518 from the unseen sequence. | |
7519 | |
7520 @cindex @command{mark} | |
7521 @cindex MH commands, @command{mark} | |
7522 @kindex S n | |
7523 @kindex S w | |
7524 | |
7525 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH | |
7526 command dealing with sequences is @command{mark}@footnote{See the | |
7527 section @uref{@value{MH-BOOK-HOME}/mmbwm.html, Make Message Bookmarks | |
7528 with mark} in the MH book.}. | |
7529 | |
7530 @node Junk, Miscellaneous, Sequences, Top | |
7531 @chapter Dealing With Junk Mail | |
7532 | |
7533 @cindex Marshall Rose | |
7534 @cindex junk mail | |
7535 @cindex spam | |
7536 | |
7537 Marshall Rose once wrote a paper on MH entitled, @cite{How to process | |
7538 200 messages a day and still get some real work done}. This chapter | |
7539 could be entitled, @cite{How to process 1000 spams a day and still get | |
7540 some real work done}. | |
7541 | |
7542 @cindex blacklisting | |
7543 @cindex ham | |
7544 @cindex viruses | |
7545 @cindex whitelisting | |
7546 @cindex worms | |
7547 | |
7548 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for | |
7549 any unwanted message which includes spam, @dfn{viruses}, and | |
7550 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying | |
7551 a sender as one who sends junk mail is called @dfn{blacklisting}; the | |
7552 opposite is called @dfn{whitelisting}. | |
7553 | |
7554 @table @kbd | |
7555 @kindex J ? | |
7556 @findex mh-prefix-help | |
7557 @item J ? | |
7558 Display cheat sheet for the commands of the current prefix in | |
7559 minibuffer (@code{mh-prefix-help}). | |
7560 @c ------------------------- | |
7561 @kindex J b | |
7562 @findex mh-junk-blacklist | |
7563 @item J b | |
7564 Blacklist range as spam (@code{mh-junk-blacklist}). | |
7565 @c ------------------------- | |
7566 @kindex J w | |
7567 @findex mh-junk-whitelist | |
7568 @item J w | |
7569 Whitelist range as ham (@code{mh-junk-whitelist}). | |
7570 @c ------------------------- | |
7571 @item @code{mh-spamassassin-identify-spammers} | |
7572 Identify spammers who are repeat offenders. | |
7573 @end table | |
7574 | |
7575 @cindex @samp{mh-junk} customization group | |
7576 @cindex customization group, @samp{mh-junk} | |
7577 | |
7578 The following table lists the options from the @samp{mh-junk} | |
7579 customization group. | |
7580 | |
7581 @vtable @code | |
7582 @item mh-junk-background | |
7583 If on, spam programs are run in background (default: @samp{off}). | |
7584 @c ------------------------- | |
7585 @item mh-junk-disposition | |
7586 Disposition of junk mail (default: @samp{Delete Spam}). | |
7587 @c ------------------------- | |
7588 @item mh-junk-program | |
7589 Spam program that MH-E should use (default: @samp{Auto-detect}). | |
7590 @end vtable | |
7591 | |
7592 @cindex SpamProbe | |
7593 @cindex Spamassassin | |
7594 @cindex bogofilter | |
7595 @cindex spam filters, SpamProbe | |
7596 @cindex spam filters, Spamassassin | |
7597 @cindex spam filters, bogofilter | |
7598 | |
7599 MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin}, | |
7600 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or | |
7601 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck | |
7602 away. This chapter describes briefly how to configure these programs | |
7603 to work well with MH-E and how to use MH-E's interface that provides | |
7604 continuing education for these programs. | |
7605 | |
7606 @vindex mh-junk-program | |
7607 | |
7608 The default setting of the option @code{mh-junk-program} is | |
7609 @samp{Auto-detect} which means that MH-E will automatically choose one | |
7610 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for | |
7611 example, you have both SpamAssassin and bogofilter installed and you | |
7612 want to use bogofilter, then you can set this option to | |
7613 @samp{Bogofilter}. | |
7614 | |
7615 @findex mh-junk-blacklist | |
7616 @kindex J b | |
7617 @vindex mh-junk-disposition | |
7618 | |
7619 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam | |
7620 program in use with the content of the range (@pxref{Ranges}) and then | |
7621 handles the message(s) as specified by the option | |
7622 @code{mh-junk-disposition}. By default, this option is set to | |
7623 @samp{Delete Spam} but you can also specify the name of the folder | |
7624 which is useful for building a corpus of spam for training purposes. | |
7625 | |
7626 @findex mh-junk-whitelist | |
7627 @kindex J w | |
7628 | |
7629 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist}) | |
7630 reclassifies a range of messages (@pxref{Ranges}) as ham if it were | |
7631 incorrectly classified as spam. It then refiles the message into the | |
7632 @file{+inbox} folder. | |
7633 | |
7634 @cindex @samp{*MH-E Log*} | |
7635 @cindex buffers, @samp{*MH-E Log*} | |
7636 @findex call-process | |
7637 @vindex mh-junk-background | |
7638 | |
7639 By default, the programs are run in the foreground, but this can be | |
7640 slow when junking large numbers of messages. If you have enough memory | |
7641 or don't junk that many messages at the same time, you might try | |
7642 turning on the option @code{mh-junk-background}. @footnote{Note that | |
7643 the option @code{mh-junk-background} is used as the @code{display} | |
7644 argument in the call to @code{call-process}. Therefore, turning on | |
7645 this option means setting its value to @samp{0}. You can also set its | |
7646 value to @samp{t} to direct the programs' output to the @samp{*MH-E | |
7647 Log*} buffer; this may be useful for debugging.} | |
7648 | |
7649 The following sections discuss the various counter-spam measures that | |
7650 MH-E can work with. | |
7651 | |
7652 @cindex @file{.procmailrc} | |
7653 @cindex files, @file{.procmailrc} | |
7654 | |
7655 @subheading SpamAssassin | |
7656 | |
7657 @cindex Spamassassin | |
7658 @cindex spam filters, Spamassassin | |
7659 | |
7660 SpamAssassin is one of the more popular spam filtering programs. Get | |
7661 it from your local distribution or from the | |
7662 @uref{http://spamassassin.apache.org/, SpamAssassin web site}. | |
7663 | |
7664 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}: | |
7665 | |
7666 @cindex @command{spamc} | |
7667 @cindex @samp{X-Spam-Level:} header field | |
7668 @cindex @samp{X-Spam-Status:} header field | |
7669 @cindex header field, @samp{X-Spam-Level:} | |
7670 @cindex header field, @samp{X-Spam-Status:} | |
7671 | |
7672 @smallexample | |
7673 PATH=$PATH:/usr/bin/mh | |
7674 MAILDIR=$HOME/`mhparam Path` | |
7675 | |
7676 # Fight spam with SpamAssassin. | |
7677 :0fw | |
7678 | spamc | |
7679 | |
7680 # Anything with a spam level of 10 or more is junked immediately. | |
7681 :0: | |
7682 * ^X-Spam-Level: .......... | |
7683 /dev/null | |
7684 | |
7685 :0: | |
7686 * ^X-Spam-Status: Yes | |
7687 spam/. | |
7688 @end smallexample | |
7689 | |
7690 If you don't use @command{spamc}, use @samp{spamassassin -P -a}. | |
7691 | |
7692 Note that one of the recipes above throws away messages with a score | |
7693 greater than or equal to 10. Here's how you can determine a value that | |
7694 works best for you. | |
7695 | |
7696 First, run @samp{spamassassin -t} on every mail message in your | |
7697 archive and use @command{gnumeric} to verify that the average plus the | |
7698 standard deviation of good mail is under 5, the SpamAssassin default | |
7699 for ``spam''. | |
7700 | |
7701 Using @command{gnumeric}, sort the messages by score and view the | |
7702 messages with the highest score. Determine the score which encompasses | |
7703 all of your interesting messages and add a couple of points to be | |
7704 conservative. Add that many dots to the @samp{X-Spam-Level:} header | |
7705 field above to send messages with that score down the drain. | |
7706 | |
7707 In the example above, messages with a score of 5-9 are set aside in | |
7708 the @samp{+spam} folder for later review. The major weakness of | |
7709 rules-based filters is a plethora of false positives so it is | |
7710 worthwhile to check. | |
7711 | |
7712 @findex mh-junk-blacklist | |
7713 @findex mh-junk-whitelist | |
7714 @kindex J b | |
7715 @kindex J w | |
7716 | |
7717 If SpamAssassin classifies a message incorrectly, or is unsure, you can | |
7718 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and | |
7719 @kbd{J w} (@code{mh-junk-whitelist}). | |
7720 | |
7721 @cindex @command{sa-learn} | |
7722 @cindex @file{.spamassassin/user_prefs} | |
7723 @cindex files, @file{.spamassassin/user_prefs} | |
7724 | |
7725 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a | |
7726 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs}, | |
7727 deletes the message, and sends the message to the Razor, so that | |
7728 others might not see this spam. If the @command{sa-learn} command is | |
7729 available, the message is also recategorized as spam. | |
7730 | |
7731 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a | |
7732 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If | |
7733 the @command{sa-learn} command is available, the message is also | |
7734 recategorized as ham. | |
7735 | |
7736 Over time, you'll observe that the same host or domain occurs | |
7737 repeatedly in the @samp{blacklist_from} entries, so you might think | |
7738 that you could avoid future spam by blacklisting all mail from a | |
7739 particular domain. The utility function | |
7740 @code{mh-spamassassin-identify-spammers} helps you do precisely that. | |
7741 This function displays a frequency count of the hosts and domains in | |
7742 the @samp{blacklist_from} entries from the last blank line in | |
7743 @file{~/.spamassassin/user_prefs} to the end of the file. This | |
7744 information can be used so that you can replace multiple | |
7745 @samp{blacklist_from} entries with a single wildcard entry such as: | |
7746 | |
7747 @smallexample | |
7748 blacklist_from *@@*amazingoffersdirect2u.com | |
7749 @end smallexample | |
7750 | |
7751 In versions of SpamAssassin (2.50 and on) that support a Bayesian | |
7752 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program | |
7753 @command{sa-learn} to recategorize the message as spam. Neither MH-E, | |
7754 nor SpamAssassin, rebuilds the database after adding words, so you | |
7755 will need to run @samp{sa-learn --rebuild} periodically. This can be | |
7756 done by adding the following to your @file{crontab}: | |
7757 | |
7758 @smallexample | |
7759 0 * * * * sa-learn --rebuild > /dev/null 2>&1 | |
7760 @end smallexample | |
7761 | |
7762 @subheading Bogofilter | |
7763 | |
7764 @cindex bogofilter | |
7765 @cindex spam filters, bogofilter | |
7766 | |
7767 Bogofilter is a Bayesian spam filtering program. Get it from your | |
7768 local distribution or from the | |
7769 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}. | |
7770 | |
7771 Bogofilter is taught by running: | |
7772 | |
7773 @smallexample | |
7774 bogofilter -n < good-message | |
7775 @end smallexample | |
7776 | |
7777 on every good message, and | |
7778 | |
7779 @smallexample | |
7780 bogofilter -s < spam-message | |
7781 @end smallexample | |
7782 | |
7783 @cindex full training | |
7784 | |
7785 on every spam message. This is called a @dfn{full training}; three | |
7786 other training methods are described in the FAQ that is distributed | |
7787 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of | |
7788 each type of message to start doing a good job. | |
7789 | |
7790 To use bogofilter, add the following recipes to @file{~/.procmailrc}: | |
7791 | |
7792 @cindex @samp{X-Bogosity:} header field | |
7793 @cindex header field, @samp{X-Bogosity:} | |
7794 | |
7795 @smallexample | |
7796 PATH=$PATH:/usr/bin/mh | |
7797 MAILDIR=$HOME/`mhparam Path` | |
7798 | |
7799 # Fight spam with Bogofilter. | |
7800 :0fw | |
7801 | bogofilter -3 -e -p | |
7802 | |
7803 :0: | |
7804 * ^X-Bogosity: Yes, tests=bogofilter | |
7805 spam/. | |
7806 | |
7807 :0: | |
7808 * ^X-Bogosity: Unsure, tests=bogofilter | |
7809 spam/unsure/. | |
7810 @end smallexample | |
7811 | |
7812 @findex mh-junk-blacklist | |
7813 @findex mh-junk-whitelist | |
7814 @kindex J b | |
7815 @kindex J w | |
7816 | |
7817 If bogofilter classifies a message incorrectly, or is unsure, you can | |
7818 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J | |
7819 w} (@code{mh-junk-whitelist}) to update bogofilter's training. | |
7820 | |
7821 The @cite{Bogofilter FAQ} suggests that you run the following | |
7822 occasionally to shrink the database: | |
7823 | |
7824 @smallexample | |
7825 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new | |
7826 mv wordlist.db wordlist.db.prv | |
7827 mv wordlist.db.new wordlist.db | |
7828 @end smallexample | |
7829 | |
7830 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune | |
7831 bogofilter. | |
7832 | |
7833 @subheading SpamProbe | |
7834 | |
7835 @cindex SpamProbe | |
7836 @cindex spam filters, SpamProbe | |
7837 | |
7838 SpamProbe is a Bayesian spam filtering program. Get it from your local | |
7839 distribution or from the @uref{http://spamprobe.sourceforge.net, | |
7840 SpamProbe web site}. | |
7841 | |
7842 To use SpamProbe, add the following recipes to @file{~/.procmailrc}: | |
7843 | |
7844 @cindex @command{formail} | |
7845 @cindex @samp{X-SpamProbe:} header field | |
7846 @cindex header field, @samp{X-SpamProbe:} | |
7847 | |
7848 @smallexample | |
7849 PATH=$PATH:/usr/bin/mh | |
7850 MAILDIR=$HOME/`mhparam Path` | |
7851 | |
7852 # Fight spam with SpamProbe. | |
7853 :0 | |
7854 SCORE=| spamprobe receive | |
7855 | |
7856 :0 wf | |
7857 | formail -I "X-SpamProbe: $SCORE" | |
7858 | |
7859 :0: | |
7860 *^X-SpamProbe: SPAM | |
7861 spam/. | |
7862 @end smallexample | |
7863 | |
7864 @findex mh-junk-blacklist | |
7865 @findex mh-junk-whitelist | |
7866 @kindex J b | |
7867 @kindex J w | |
7868 | |
7869 If SpamProbe classifies a message incorrectly, you can use the MH-E | |
7870 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w} | |
7871 (@code{mh-junk-whitelist}) to update SpamProbe's training. | |
7872 | |
7873 @subheading Other Things You Can Do | |
7874 | |
7875 There are a couple of things that you can add to @file{~/.procmailrc} | |
7876 in order to filter out a lot of spam and viruses. The first is to | |
7877 eliminate any message with a Windows executable (which is most likely | |
7878 a virus). The second is to eliminate mail in character sets that you | |
7879 can't read. | |
7880 | |
7881 @cindex @samp{Content-Transfer-Encoding:} header field | |
7882 @cindex @samp{Content-Type:} header field | |
7883 @cindex @samp{Subject:} header field | |
7884 @cindex header field, @samp{Content-Transfer-Encoding:} | |
7885 @cindex header field, @samp{Content-Type:} | |
7886 @cindex header field, @samp{Subject:} | |
7887 | |
7888 @smallexample | |
7889 PATH=$PATH:/usr/bin/mh | |
7890 MAILDIR=$HOME/`mhparam Path` | |
7891 | |
7892 # | |
7893 # Filter messages with win32 executables/virii. | |
7894 # | |
7895 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg | |
7896 # pattern. The string "this program cannot be run in MS-DOS mode" | |
7897 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false | |
7898 # positives (Roland Smith via Pete from the bogofilter mailing list). | |
7899 # | |
7900 :0 B: | |
7901 * ^Content-Transfer-Encoding:.*base64 | |
7902 * ^TVqQAAMAAAAEAAAA//8AALg | |
7903 * 4fug4AtAnNIbg | |
7904 spam/exe/. | |
7905 | |
7906 # | |
7907 # Filter mail in unreadable character sets (from the Bogofilter FAQ). | |
7908 # | |
7909 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987' | |
7910 | |
7911 :0: | |
7912 * 1^0 $ ^Subject:.*=\?($UNREADABLE) | |
7913 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE) | |
7914 spam/unreadable/. | |
7915 | |
7916 :0: | |
7917 * ^Content-Type:.*multipart | |
7918 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE) | |
7919 spam/unreadable/. | |
7920 @end smallexample | |
7921 | |
7922 @node Miscellaneous, Scan Line Formats, Junk, Top | |
7923 @chapter Miscellaneous Commands, Variables, and Buffers | |
7924 | |
7925 This chapter covers the following command and the various MH-E | |
7926 buffers, | |
7927 | |
7928 @ftable @code | |
7929 @item mh-version | |
7930 Display version information about MH-E and the MH mail handling | |
7931 system. | |
7932 @end ftable | |
7933 | |
7934 @cindex buffers, @samp{*MH-E Info*} | |
7935 @cindex MH-E version | |
7936 @cindex @samp{*MH-E Info*} | |
7937 @cindex version | |
7938 @kindex M-x mh-version | |
7939 | |
7940 One command worth noting is @kbd{M-x mh-version}. You can compare the | |
7941 version this command prints to the latest release (@pxref{Getting | |
7942 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named | |
7943 @samp{*MH-E Info*}, should usually be included with any bug report you | |
7944 submit (@pxref{Bug Reports}). | |
7945 | |
7946 @subheading MH-E Buffers | |
7947 | |
7948 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates | |
7949 several other buffers. They are: | |
7950 | |
7951 @table @samp | |
7952 @cindex @samp{*MH-E Folders*} | |
7953 @cindex buffers, @samp{*MH-E Folders*} | |
7954 @findex mh-list-folders | |
7955 @item *MH-E Folders* | |
7956 @kindex F l | |
7957 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}). | |
7958 @xref{Folders}. | |
7959 @c ------------------------- | |
7960 @cindex @samp{*MH-E Help*} | |
7961 @cindex buffers, @samp{*MH-E Help*} | |
7962 @findex mh-help | |
7963 @item *MH-E Help* | |
7964 @kindex ? | |
7965 @kindex C-c ? | |
7966 This buffer contains the output of @kbd{?} (@code{mh-help}) and | |
7967 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}. | |
7968 @c ------------------------- | |
7969 @cindex @samp{*MH-E Info*} | |
7970 @cindex buffers, @samp{*MH-E Info*} | |
7971 @item *MH-E Info* | |
7972 This buffer contains the output of @kbd{M-x mh-version @key{RET}}. | |
7973 @c ------------------------- | |
7974 @cindex @samp{*MH-E Log*} | |
7975 @cindex buffers, @samp{*MH-E Log*} | |
7976 @item *MH-E Log* | |
7977 This buffer contains the last 100 lines of the output of the various | |
7978 MH commands. | |
7979 @c ------------------------- | |
7980 @cindex @samp{*MH-E Mail Delivery*} | |
7981 @cindex buffers, @samp{*MH-E Mail Delivery*} | |
7982 @item *MH-E Mail Delivery* | |
7983 This buffer contains the transcript of a mail delivery. @xref{Sending | |
7984 Message}. | |
7985 @c ------------------------- | |
7986 @cindex @samp{*MH-E Recipients*} | |
7987 @cindex buffers, @samp{*MH-E Recipients*} | |
7988 @findex mh-check-whom | |
7989 @item *MH-E Recipients* | |
7990 @kindex C-c C-w | |
7991 This buffer contains the output of @kbd{C-c C-w} | |
7992 (@code{mh-check-whom}) and is killed when draft is sent. | |
7993 @xref{Checking Recipients}. | |
7994 @c ------------------------- | |
7995 @cindex @samp{*MH-E Sequences*} | |
7996 @cindex buffers, @samp{*MH-E Sequences*} | |
7997 @item *MH-E Sequences* | |
7998 This buffer contains the output of @kbd{S l} | |
7999 (@code{mh-list-sequences}). @xref{Sequences}. | |
8000 @c ------------------------- | |
8001 @cindex @samp{*mh-temp*} | |
8002 @cindex buffers, @samp{*mh-temp*} | |
8003 @item *mh-temp* | |
8004 This is a scratch, ephemeral, buffer used by MH-E functions. Note that | |
8005 it is hidden because the first character in the name is a space. | |
8006 You'll generally not have any need for this buffer. | |
8007 @end table | |
8008 | |
8009 @node Scan Line Formats, Procmail, Miscellaneous, Top | |
8010 @appendix Scan Line Formats | |
8011 | |
8012 @cindex scan line formats | |
8013 | |
8014 This appendix discusses how MH-E creates, parses, and manipulates scan | |
8015 lines. If you have your own MH scan or inc format files, you | |
8016 @strong{can} teach MH-E how to handle them, but it isn't easy as | |
8017 you'll see. | |
8018 | |
8019 @cindex @samp{mh-scan-line-formats} customization group | |
8020 @cindex customization group, @samp{mh-scan-line-formats} | |
8021 | |
8022 This table lists the options in the @samp{mh-scan-line-formats} | |
8023 customization group. | |
8024 | |
8025 @vtable @code | |
8026 @item mh-adaptive-cmd-note-flag | |
8027 On means that the message number width is determined dynamically | |
8028 (default: @samp{on}). | |
8029 @c ------------------------- | |
8030 @item mh-scan-format-file | |
8031 Specifies the format file to pass to the scan program (default: | |
8032 @samp{Use MH-E scan Format}). | |
8033 @c ------------------------- | |
8034 @item mh-scan-prog | |
8035 Program used to scan messages (default: @code{"scan"}). | |
8036 @end vtable | |
8037 | |
8038 @vindex mh-adaptive-cmd-note-flag | |
8039 | |
8040 There are a couple of caveats when creating your own scan format file. | |
8041 First, MH-E will not work if your scan lines do not include message | |
8042 numbers. It will work poorly if you don't dedicate a column for | |
8043 showing the current message and notations. You won't be able to use | |
8044 the option @code{mh-adaptive-cmd-note-flag} or the threading features | |
8045 (@pxref{Threading}). | |
8046 | |
8047 @cindex message numbers | |
8048 @findex mh-set-cmd-note | |
8049 @vindex mh-adaptive-cmd-note-flag | |
8050 @vindex mh-scan-format-file | |
8051 | |
8052 If you've created your own format to handle long message numbers, | |
8053 you'll be pleased to know you no longer need it since MH-E adapts its | |
8054 internal format based upon the largest message number if | |
8055 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer | |
8056 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag} | |
8057 and call @code{mh-set-cmd-note} with the width specified by your | |
8058 format file (see @code{mh-scan-format-file}). For example, the default | |
8059 width is 4, so you would use @samp{(mh-set-cmd-note 4)}. | |
8060 | |
8061 @vindex mh-adaptive-cmd-note-flag | |
8062 @vindex mh-scan-format-file | |
8063 @vindex mh-scan-format-mh | |
8064 @vindex mh-scan-format-nmh | |
8065 | |
8066 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E | |
8067 scan Format}. This means that the format string will be taken from the | |
8068 either @code{mh-scan-format-mh} or @code{mh-scan-format-nmh} depending | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8069 on whether MH or nmh (or GNU mailutils MH) is in use. This setting |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8070 also enables you to turn on the option |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8071 @code{mh-adaptive-cmd-note-flag}. You can also set this option to |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8072 @samp{Use Default scan Format} to get the same output as you would get |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8073 if you ran @command{scan} from the shell. If you have a format file |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8074 that you want MH-E to use but not MH, you can set this option to |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8075 @samp{Specify a scan Format File} and enter the name of your format |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8076 file. |
84306 | 8077 |
8078 @vindex mh-scan-format-file | |
8079 @vindex mh-scan-format-mh | |
8080 @vindex mh-scan-format-nmh | |
8081 | |
8082 The scan format that MH-E uses when @code{mh-scan-format-file} is set | |
8083 to its default of @samp{Use MH-E scan Format} is held in the variables | |
8084 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8085 whether you are using nmh (or GNU mailutils MH) or not. Typically, you |
84306 | 8086 create your own format files rather than modifying these variables. |
8087 The value of @code{mh-scan-format-nmh} is: | |
8088 | |
8089 @smallexample | |
8090 (concat | |
8091 "%4(msg)" | |
8092 "%<(cur)+%| %>" | |
8093 "%<@{replied@}-" | |
8094 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>" | |
8095 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>" | |
8096 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>" | |
8097 "%?(nonnull(comp@{newsgroups@}))n%>" | |
8098 "%<(zero) %>" | |
8099 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>" | |
8100 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>" | |
8101 "%<(zero)%17(decode(friendly@{from@}))%> " | |
8102 "%(decode@{subject@})%<@{body@}<<%@{body@}%>") | |
8103 @end smallexample | |
8104 | |
8105 @cindex decoding RFC 2047 | |
8106 @cindex RFC 2047, decoding | |
8107 @vindex mh-scan-format-mh | |
8108 | |
8109 The setting for @code{mh-scan-format-mh} is similar, except that MH | |
8110 doesn't have the function @code{decode} (which is used to decode RFC | |
8111 2047 encodings). | |
8112 | |
8113 @cindex notations, scan line | |
8114 @cindex scan line notations | |
8115 | |
8116 These strings are passed to the @command{scan} program via the | |
8117 @option{-format} argument. The formats are identical to the defaults | |
8118 except that additional hints for fontification have been added to the | |
8119 existing notations in the fifth column (remember that in Emacs, the | |
8120 columns start at 0). The values of the fifth column, in priority | |
8121 order, are: @samp{-} if the message has been replied to, @samp{t} if | |
8122 an address in the @samp{To:} field matches one of the mailboxes of the | |
8123 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if | |
8124 the @samp{Bcc:} field matches, and @samp{n} if a non-empty | |
8125 @samp{Newsgroups:} field is present. | |
8126 | |
8127 @cindex @command{scan} | |
8128 @cindex MH commands, @command{scan} | |
8129 @vindex mh-progs | |
8130 @vindex mh-scan-prog | |
8131 | |
8132 The name of the program that generates a listing of one line per | |
8133 message is held in @code{mh-scan-prog} (default: @code{"scan"}). | |
8134 Unless this variable contains an absolute pathname, it is assumed to | |
8135 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may | |
8136 link another program to @command{scan} (see @samp{mh-profile}(5)) to | |
8137 produce a different type of listing@footnote{See the section | |
8138 @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan | |
8139 pick Ranges Sequences} in the MH book.}. | |
8140 | |
8141 @cindex regular expressions, scan line formats | |
8142 @findex mh-set-cmd-note | |
8143 @findex setq | |
8144 | |
8145 If you change the format of the scan lines you'll need to tell MH-E | |
8146 how to parse the new format. As you will see, quite a lot of variables | |
8147 are involved to do that. Use @kbd{M-x apropos @key{RET} | |
8148 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You | |
8149 will also have to call @code{mh-set-cmd-note} if your notations are | |
8150 not in column 4 (columns in Emacs start with 0). Note that unlike most | |
8151 of the user options described in this manual, these are variables and | |
8152 must be set with @code{setq} instead of in a customization buffer. For | |
8153 help with regular expressions, see | |
8154 @ifnothtml | |
8155 @ref{Regexps, , Syntax of Regular Expressions, emacs, The | |
8156 GNU Emacs Manual}. | |
8157 @end ifnothtml | |
8158 @ifhtml | |
8159 section | |
8160 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
8161 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}. | |
8162 @end ifhtml | |
8163 | |
8164 The first variable has to do with pruning out garbage. | |
8165 | |
8166 @vtable @code | |
8167 @cindex @command{inc} | |
8168 @cindex MH commands, @command{inc} | |
8169 @cindex @command{scan} | |
8170 @cindex MH commands, @command{scan} | |
8171 @item mh-scan-valid-regexp | |
8172 This regular expression describes a valid scan line. This is used to | |
8173 eliminate error messages that are occasionally produced by | |
8174 @command{inc}@footnote{See the section | |
8175 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
8176 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}). | |
8177 @end vtable | |
8178 | |
8179 Next, many variables control how the scan lines are parsed. | |
8180 | |
8181 @vtable @code | |
8182 @vindex mh-folder-body | |
8183 @vindex mh-folder-font-lock-keywords | |
8184 @item mh-scan-body-regexp | |
8185 This regular expression matches the message body fragment. Note that | |
8186 the default setting of @code{mh-folder-font-lock-keywords} expects | |
8187 this expression to contain at least one parenthesized expression which | |
8188 matches the body text as in the default of | |
8189 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not | |
8190 correct, the body fragment will not be highlighted with the face | |
8191 @code{mh-folder-body}. | |
8192 @c ------------------------- | |
8193 @vindex mh-folder-cur-msg-number | |
8194 @vindex mh-folder-font-lock-keywords | |
8195 @vindex mh-note-cur | |
8196 @item mh-scan-cur-msg-number-regexp | |
8197 This regular expression matches the current message. It must match | |
8198 from the beginning of the line. Note that the default setting of | |
8199 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8200 at least one parenthesized expression which matches the message number | |
8201 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This | |
8202 expression includes the leading space and current message marker | |
8203 @samp{+} within the parenthesis since it looks better to highlight | |
8204 these items as well. The highlighting is done with the face | |
8205 @code{mh-folder-cur-msg-number}. This regular expression should be | |
8206 correct as it is needed by non-fontification functions. See also | |
8207 @code{mh-note-cur}. | |
8208 @c ------------------------- | |
8209 @vindex mh-folder-date | |
8210 @vindex mh-folder-font-lock-keywords | |
8211 @vindex mh-scan-sent-to-me-sender-regexp | |
8212 @item mh-scan-date-regexp | |
8213 This regular expression matches a valid date. It must @strong{not} be | |
8214 anchored to the beginning or the end of the line. Note that the | |
8215 default setting of @code{mh-folder-font-lock-keywords} expects this | |
8216 expression to contain only one parenthesized expression which matches | |
8217 the date field as in the default of | |
8218 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is | |
8219 not correct, the date will not be highlighted with the face | |
8220 @code{mh-folder-date}. | |
8221 @c ------------------------- | |
8222 @vindex mh-folder-deleted | |
8223 @vindex mh-folder-font-lock-keywords | |
8224 @vindex mh-note-deleted | |
8225 @item mh-scan-deleted-msg-regexp | |
8226 This regular expression matches deleted messages. It must match from | |
8227 the beginning of the line. Note that the default setting of | |
8228 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8229 at least one parenthesized expression which matches the message number | |
8230 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression | |
8231 includes the leading space within the parenthesis since it looks | |
8232 better to highlight it as well. The highlighting is done with the face | |
8233 @code{mh-folder-deleted}. This regular expression should be correct as | |
8234 it is needed by non-fontification functions. See also | |
8235 @code{mh-note-deleted}. | |
8236 @c ------------------------- | |
8237 @vindex mh-folder-font-lock-keywords | |
8238 @vindex mh-folder-msg-number | |
8239 @item mh-scan-good-msg-regexp | |
8240 This regular expression matches ``good'' messages. It must match from | |
8241 the beginning of the line. Note that the default setting of | |
8242 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8243 at least one parenthesized expression which matches the message number | |
8244 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This | |
8245 expression includes the leading space within the parenthesis since it | |
8246 looks better to highlight it as well. The highlighting is done with | |
8247 the face @code{mh-folder-msg-number}. This regular expression should | |
8248 be correct as it is needed by non-fontification functions. | |
8249 @c ------------------------- | |
8250 @vindex mh-scan-format-file | |
8251 @item mh-scan-msg-format-regexp | |
8252 This regular expression finds the message number width in a scan | |
8253 format. Note that the message number must be placed in a parenthesized | |
8254 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This | |
8255 variable is only consulted if @code{mh-scan-format-file} is set to | |
8256 @samp{Use MH-E scan Format}. | |
8257 @c ------------------------- | |
8258 @vindex mh-scan-format-file | |
8259 @item mh-scan-msg-format-string | |
8260 This is a format string for the width of the message number in a scan | |
8261 format. Use @samp{0%d} for zero-filled message numbers. This variable | |
8262 is only consulted if @code{mh-scan-format-file} is set to @samp{Use | |
8263 MH-E scan Format} (default: @code{"%d"}). | |
8264 @c ------------------------- | |
8265 @item mh-scan-msg-number-regexp | |
8266 This regular expression extracts the message number. It must match | |
8267 from the beginning of the line. Note that the message number must be | |
8268 placed in a parenthesized expression as in the default of @w{@code{"^ | |
8269 *\\([0-9]+\\)"}}. | |
8270 @c ------------------------- | |
8271 @item mh-scan-msg-overflow-regexp | |
8272 This regular expression matches overflowed message numbers (default: | |
8273 @code{"^[?0-9][0-9]"}). | |
8274 @c ------------------------- | |
8275 @item mh-scan-msg-search-regexp | |
8276 This regular expression matches a particular message. It is a format | |
8277 string; use @samp{%d} to represent the location of the message number | |
8278 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}. | |
8279 @c ------------------------- | |
8280 @vindex mh-folder-address | |
8281 @vindex mh-folder-font-lock-keywords | |
8282 @vindex mh-folder-to | |
8283 @item mh-scan-rcpt-regexp | |
8284 This regular expression specifies the recipient in messages you sent. | |
8285 Note that the default setting of @code{mh-folder-font-lock-keywords} | |
8286 expects this expression to contain two parenthesized expressions. The | |
8287 first is expected to match the @samp{To:} that the default scan format | |
8288 file generates. The second is expected to match the recipient's name | |
8289 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this | |
8290 regular expression is not correct, the @samp{To:} string will not be | |
8291 highlighted with the face @code{mh-folder-to} and the recipient will not be | |
8292 highlighted with the face @code{mh-folder-address}. | |
8293 @c ------------------------- | |
8294 @vindex mh-folder-font-lock-keywords | |
8295 @vindex mh-folder-refiled | |
8296 @vindex mh-note-refiled | |
8297 @item mh-scan-refiled-msg-regexp | |
8298 This regular expression matches refiled messages. It must match from | |
8299 the beginning of the line. Note that the default setting of | |
8300 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8301 at least one parenthesized expression which matches the message number | |
8302 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression | |
8303 includes the leading space within the parenthesis since it looks | |
8304 better to highlight it as well. The highlighting is done with the face | |
8305 @code{mh-folder-refiled}. This regular expression should be correct as | |
8306 it is needed by non-fontification functions. See also | |
8307 @code{mh-note-refiled}. | |
8308 @c ------------------------- | |
8309 @vindex mh-folder-font-lock-keywords | |
8310 @vindex mh-folder-sent-to-me-sender | |
8311 @vindex mh-mh-folder-sent-to-me-hint | |
8312 @vindex mh-scan-format-nmh | |
8313 @item mh-scan-sent-to-me-sender-regexp | |
8314 This regular expression matches messages sent to us. Note that the | |
8315 default setting of @code{mh-folder-font-lock-keywords} expects this | |
8316 expression to contain at least two parenthesized expressions. The | |
8317 first should match the fontification hint (see | |
8318 @code{mh-scan-format-nmh}) and the second should match the user name | |
8319 as in the default of | |
8320 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}. | |
8321 If this regular expression is not correct, the notation hints will not | |
8322 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and | |
8323 the sender will not be highlighted with the face | |
8324 @code{mh-folder-sent-to-me-sender}. | |
8325 @c ------------------------- | |
8326 @vindex mh-folder-followup | |
8327 @vindex mh-folder-font-lock-keywords | |
8328 @vindex mh-folder-subject | |
8329 @item mh-scan-subject-regexp | |
8330 This regular expression matches the subject. It must match from the | |
8331 beginning of the line. Note that the default setting of | |
8332 @samp{mh-folder-font-lock-keywords} expects this expression to contain | |
8333 at least three parenthesized expressions. The first is expected to | |
8334 match the @samp{Re:} string, if any, and is highlighted with the face | |
8335 @code{mh-folder-followup}. The second matches an optional bracketed | |
8336 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a | |
8337 sub-expression of the first expression). The third is expected to | |
8338 match the subject line itself which is highlighted with the face | |
8339 @code{mh-folder-subject}. For example, the default is | |
8340 @w{@code{"^ *[0-9]+........[ ]*...................}}@* | |
8341 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}. | |
8342 This regular expression should be correct as it is needed by | |
8343 non-fontification functions. Note that this example is broken up on | |
8344 two lines for readability, but is actually a single string. | |
8345 @end vtable | |
8346 | |
8347 Finally, there are a slew of variables that control how MH-E annotates | |
8348 the scan lines. | |
8349 | |
8350 @vtable @code | |
8351 @findex mh-set-cmd-note | |
8352 @vindex mh-adaptive-cmd-note-flag | |
8353 @item mh-cmd-note | |
8354 Column for notations (default: 4). This variable should be set with | |
8355 the function @code{mh-set-cmd-note}. This variable may be updated | |
8356 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following | |
8357 variables contain the notational characters. Note that columns in | |
8358 Emacs start with 0. | |
8359 @c ------------------------- | |
8360 @item mh-note-copied | |
8361 Messages that have been copied are marked by this character (default: | |
8362 @code{?C}). | |
8363 @c ------------------------- | |
8364 @vindex mh-scan-cur-msg-number-regexp | |
8365 @item mh-note-cur | |
8366 The current message (in MH, not in MH-E) is marked by this character | |
8367 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}. | |
8368 @c ------------------------- | |
8369 @vindex mh-scan-deleted-msg-regexp | |
8370 @item mh-note-deleted | |
8371 Messages that have been deleted are marked by this character (default: | |
8372 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}. | |
8373 @c ------------------------- | |
8374 @item mh-note-dist | |
8375 Messages that have been redistributed are marked by this character | |
8376 (default: @code{?R}). | |
8377 @c ------------------------- | |
8378 @item mh-note-forw | |
8379 Messages that have been forwarded are marked by this character | |
8380 (default: @code{?F}). | |
8381 @c ------------------------- | |
8382 @item mh-note-printed | |
8383 Messages that have been printed are marked by this character (default: | |
8384 @code{?P}). | |
8385 @c ------------------------- | |
8386 @vindex mh-scan-refiled-msg-regexp | |
8387 @item mh-note-refiled | |
8388 Messages that have been refiled are marked by this character (default: | |
8389 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}. | |
8390 @c ------------------------- | |
8391 @item mh-note-repl | |
8392 Messages that have been replied to are marked by this character | |
8393 (default: @code{?-}). | |
8394 @c ------------------------- | |
8395 @item mh-note-seq | |
8396 Messages in a user-defined sequence are marked by this character | |
8397 (default: @code{?%}). Messages in the @samp{search} sequence are | |
8398 marked by this character as well. | |
8399 @end vtable | |
8400 | |
8401 For example, let's say I have the following in @file{scan.format} | |
8402 which displays the sender, the subject, and the message number. This | |
8403 format places a @samp{+} after the message number for the current | |
8404 message according to MH; it also uses that column for notations. | |
8405 | |
8406 @smallexample | |
8407 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %> | |
8408 @end smallexample | |
8409 | |
8410 @vindex mh-adaptive-cmd-note-flag | |
8411 @vindex mh-scan-format-file | |
8412 @vindex mh-scan-format-file, example | |
8413 | |
8414 The first thing you have to do is tell MH-E to use this file. | |
8415 Customize @code{mh-scan-format-file} and set its value to @samp{Use | |
8416 Default scan Format}. If you didn't get already turn off | |
8417 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first. | |
8418 | |
8419 Next, tell MH-E what a valid scan line looks like so that you can at | |
8420 least display the output of scan in your MH-Folder buffer. | |
8421 | |
8422 @vindex mh-scan-valid-regexp, example | |
8423 | |
8424 @smalllisp | |
8425 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$") | |
8426 @end smalllisp | |
8427 | |
8428 Now, in order to get rid of the @samp{Cursor not pointing to message} | |
8429 message, you need to tell MH-E how to access the message number. You | |
8430 should also see why MH-E requires that you include a message number in | |
8431 the first place. | |
8432 | |
8433 @vindex mh-scan-msg-number-regexp, example | |
8434 @vindex mh-scan-msg-search-regexp, example | |
8435 | |
8436 @smalllisp | |
8437 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$") | |
8438 (setq mh-scan-msg-search-regexp " %d[+D^ ]$") | |
8439 @end smalllisp | |
8440 | |
8441 In order to get the next and previous commands working, add this. | |
8442 | |
8443 @vindex mh-scan-good-msg-regexp, example | |
8444 | |
8445 @smalllisp | |
8446 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$") | |
8447 @end smalllisp | |
8448 | |
8449 Note that the current message isn't marked with a @samp{+} when moving | |
8450 between the next and previous messages. Here is the code required to | |
8451 get this working. | |
8452 | |
8453 @vindex set-mh-cmd-note, example | |
8454 @vindex mh-scan-cur-msg-number-regexp, example | |
8455 | |
8456 @smalllisp | |
8457 (set-mh-cmd-note 76) | |
8458 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$") | |
8459 @end smalllisp | |
8460 | |
8461 Finally, add the following to delete and refile messages. | |
8462 | |
8463 @vindex mh-scan-deleted-msg-regexp, example | |
8464 @vindex mh-scan-refiled-msg-regexp, example | |
8465 | |
8466 @smalllisp | |
8467 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$") | |
8468 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$") | |
8469 @end smalllisp | |
8470 | |
8471 This is just a bare minimum; it's best to adjust all of the regular | |
8472 expressions to ensure that MH-E and highlighting perform well. | |
8473 | |
8474 @node Procmail, Odds and Ends, Scan Line Formats, Top | |
8475 @appendix Reading Mailing Lists Effectively | |
8476 | |
8477 @cindex @command{procmail} | |
8478 @cindex @command{slocal} | |
8479 @cindex Gnus | |
8480 @cindex MH commands, @command{slocal} | |
8481 @cindex Unix commands, @command{procmail} | |
8482 @cindex mailing lists, reading | |
8483 | |
8484 This appendix explains how to use @uref{http://www.procmail.org/, | |
8485 procmail} to file mail from mailing lists into folders which can then | |
8486 be read easily with MH-E@footnote{The MH equivalent, @command{slocal}, | |
8487 can be used as well, but procmail is more flexible and more packages | |
8488 exist for procmail than for slocal.}. Some mailing lists have such | |
8489 high traffic that Gnus must be used and I discuss how to use Gnus | |
8490 side-by-side with MH-E. | |
8491 | |
8492 @cindex @file{.procmailrc} | |
8493 @cindex files, @file{.procmailrc} | |
8494 | |
8495 First, I'll describe how to put mail from your mailing lists directly | |
8496 into an MH folder using @command{procmail}. First, add the following | |
8497 to @file{~/.procmailrc}. While the logging variables aren't strictly | |
8498 necessary, they are extremely useful. | |
8499 | |
8500 @smallexample | |
8501 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam. | |
8502 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin | |
8503 [3] | |
8504 [4] # Point LOGFILE at the actual log file. | |
8505 [5] LOGFILE=$HOME/.procmail.log | |
8506 [6] | |
8507 [7] # This setting provides just the right amount of information. | |
8508 [8] LOGABSTRACT=all | |
8509 [9] | |
8510 [10] # Uncomment the following line to see how your patterns match. | |
8511 [11] #VERBOSE=yes | |
8512 [12] | |
8513 [13] # Place mail sent to any MH-E mailing list in +mh-e. | |
8514 [14] :0 w: mh-e$LOCKEXT | |
8515 [15] * ^TO.*mh-e-.*@.*sourceforge.net | |
8516 [16] | myrcvstore -create +mh-e | |
8517 @end smallexample | |
8518 | |
8519 @cindex @command{rcvstore} | |
8520 @cindex MH commands, @command{rcvstore} | |
8521 | |
8522 Line 14 creates a lock file in your mail directory based upon the name | |
8523 of the folder. This is done because @command{rcvstore} does not | |
8524 perform locking. While this lock file will prevent @command{procmail} | |
8525 from writing to a folder concurrently, there is a slight chance that | |
8526 you might lose a message if you're performing operations on a folder | |
8527 at the same time @command{rcvstore} is placing a message there. You | |
8528 have been warned. Now that that disclaimer is out of the way, note | |
8529 that I've been using this set-up for over a decade and haven't lost | |
8530 anything to my knowledge@footnote{See | |
8531 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166, | |
8532 Savannah issue #4361} to see if @command{rcvstore} locking is still an | |
8533 issue.}. | |
8534 | |
8535 @cindex @samp{Unseen-Sequence:} MH profile component | |
8536 @cindex MH profile component, @samp{Unseen-Sequence:} | |
8537 | |
8538 Line 16 uses the following script, @code{myrcvstore}, to massage the | |
8539 message as described in the comment and file the message in the given | |
8540 folder@footnote{The @samp{-create} argument wasn't always the default | |
8541 to @command{rcvstore}.}. | |
8542 | |
8543 @smallexample | |
8544 #! /bin/sh | |
8545 | |
8546 # Accepts a message on standard input and passes it through rcvstore | |
8547 # after first passing it through any filters. All arguments are passed | |
8548 # on to rcvstore. | |
8549 | |
8550 # Force the "From user date" to become part of header. One reason this | |
8551 # is done is because the presence of the From field confuses dist so | |
8552 # that dist adds a new header, rather than using the existing header. | |
8553 # Note that this should not be done for any message that goes into a | |
8554 # Gnus incoming file (Gnus will thrown an error) nor should it be | |
8555 # applied to any message that goes to the system mailbox because the | |
8556 # entire mailbox will be incorporated as a single message. | |
8557 formail -c -z -R 'From ' X-Envelope-From: | | |
8558 rcvstore $@@ | |
8559 @end smallexample | |
8560 | |
8561 If your version of @command{rcvstore} doesn't add messages to the | |
8562 @samp{unseen} sequence by default, add the following line to your MH | |
8563 profile: | |
8564 | |
8565 @smallexample | |
8566 Unseen-Sequence: unseen | |
8567 @end smallexample | |
8568 | |
8569 Now view your new messages with the speedbar (@pxref{Speedbar}) or with | |
8570 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}. | |
8571 | |
8572 If you're on a mailing list that is so voluminous that it is | |
8573 impossible to read every message, it usually better to read the | |
8574 mailing list like a newsgroup in a news reader. Emacs has a built-in | |
8575 newsreader called Gnus. The remainder of this appendix talks about how | |
8576 to use Gnus with an MH message store. The version of Gnus that was | |
8577 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should | |
8578 work but versions prior to 5.8 use different options. | |
8579 | |
8580 This table contains a list of Gnus options that you will have to | |
8581 modify. Note that for them to become accessible, you'll have to load | |
8582 @file{nnml.el} first. This can be done with @kbd{M-x load-library | |
8583 @key{RET} nnml @key{RET}}. | |
8584 | |
8585 @vtable @code | |
8586 @item gnus-secondary-select-methods | |
8587 Select the @samp{nnml} value. This select method uses directories for | |
8588 folders and individual files for messages, just like MH. You do not | |
8589 have to set an address. | |
8590 @c ------------------------- | |
8591 @item mail-sources | |
8592 Select the @samp{Several files in a directory} value, check the | |
8593 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find | |
8594 your mail. | |
8595 @c ------------------------- | |
8596 @vindex mail-user-agent | |
8597 @item message-mail-user-agent | |
8598 In order to send mail within Gnus using MH-E, set this option to | |
8599 @samp{mail-user-agent} and set the @code{mail-user-agent} option to | |
8600 @samp{Emacs interface to MH}. | |
8601 @c ------------------------- | |
8602 @item nnmail-keep-last-article | |
8603 Since Gnus keeps track of which messages you have read, it would be | |
8604 bad if Gnus expired the last message, for example, message 100, and | |
8605 @command{rcvstore} gave the next new message number 1. Gnus would then | |
8606 ignore it since it thinks that you've read messages 1-100. Turning on | |
8607 this option ensures that the last message is never removed thereby | |
8608 eliminating this problem. | |
8609 @end vtable | |
8610 | |
8611 Next add the following to @file{~/.procmailrc}. If you don't subscribe | |
8612 to the GnuCash mailing list, substitute one to which you are | |
8613 subscribed. | |
8614 | |
8615 @smallexample | |
8616 PATH=$PATH:/usr/bin/mh | |
8617 MAILDIR=$HOME/`mhparam Path` | |
8618 # Place mail sent to the GnuCash mailing list in gnucash.spool, where | |
8619 # Gnus will pick it up. | |
8620 :0: | |
8621 * ^TO.*gnucash.*@.*gnucash.org | |
8622 gnucash.spool | |
8623 @end smallexample | |
8624 | |
8625 Wait for some messages to appear in @file{gnucash.spool} and run Gnus | |
8626 with @kbd{M-x gnus @key{RET}}. To view the folder created in the | |
8627 example above, you would tell Gnus about it the first time only with | |
8628 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is | |
8629 known as @samp{+gnucash}. | |
8630 | |
8631 @node Odds and Ends, History, Procmail, Top | |
8632 @appendix Odds and Ends | |
8633 | |
8634 This appendix covers a few topics that don't fit elsewhere. Here I | |
8635 tell you how to report bugs and how to get on the MH-E mailing lists. | |
8636 I also point out some additional sources of information. | |
8637 | |
8638 @menu | |
8639 * Bug Reports:: | |
8640 * Mailing Lists:: | |
8641 * MH FAQ and Support:: | |
8642 * Getting MH-E:: | |
8643 @end menu | |
8644 | |
8645 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends | |
8646 @appendixsec Bug Reports | |
8647 | |
8648 @cindex bugs | |
8649 @cindex SourceForge | |
8650 @kindex M-x mh-version | |
8651 | |
8652 Bug reports should be filed at | |
8653 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=113357, | |
8654 SourceForge}. You need to be a SourceForge user to submit bug reports, | |
8655 but this is easy enough to do that it shouldn't be a restriction for | |
8656 you. Please include the output of @kbd{M-x mh-version} | |
8657 (@pxref{Miscellaneous}) in any bug report you send unless you're 110% | |
8658 positive we won't ask for it. | |
8659 | |
8660 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends | |
8661 @appendixsec MH-E Mailing Lists | |
8662 | |
8663 @cindex SourceForge | |
8664 @cindex mailing lists | |
8665 | |
8666 There are several mailing lists for MH-E. They are @i{mh-e-users at | |
8667 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net}, | |
8668 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view | |
8669 the archives at @uref{https://sourceforge.net/mail/?group_id=13357, | |
8670 SourceForge}. Do not report bugs on these lists; please submit them | |
8671 via SourceForge (@pxref{Bug Reports}). | |
8672 | |
8673 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends | |
8674 @appendixsec MH FAQ and Support | |
8675 | |
8676 @cindex FAQ | |
8677 @cindex MH FAQ | |
8678 | |
8679 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently | |
8680 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup | |
8681 @samp{comp.mail.mh}. While very little is there that deals with MH-E | |
8682 specifically, there is an incredible wealth of material about MH | |
8683 itself which you will find useful. | |
8684 | |
8685 @cindex support | |
8686 | |
8687 You can find FAQs on MH-E at the | |
8688 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=213357, | |
8689 Support Requests} page on SourceForge. If you don't find the answer to | |
8690 your question, file a support request and your question will become a | |
8691 new FAQ! | |
8692 | |
8693 @node Getting MH-E, , MH FAQ and Support, Odds and Ends | |
8694 @appendixsec Getting MH-E | |
8695 | |
8696 @cindex MH-E, obtaining | |
8697 @cindex getting MH-E | |
8698 @cindex obtaining MH-E | |
8699 | |
8700 Because MH-E is undergoing a phase of sustained growth, the version of | |
8701 MH-E in your Emacs is likely to be out of date although it is most | |
8702 likely to be more up to date than the copy that comes with the MH | |
8703 distribution in @file{miscellany/mh-e}. | |
8704 | |
8705 @cindex change log | |
8706 @cindex release notes | |
8707 | |
8708 New MH-E releases are always available for downloading at | |
8709 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357, | |
8710 SourceForge} before they appear in an Emacs release. You can read the | |
8711 release notes on that page to determine if the given release of MH-E | |
8712 is already installed in your version of Emacs. You can also read the | |
8713 change log to see if you are interested in what the given release of | |
8714 MH-E has to offer (although we have no doubt that you will be | |
8715 extremely interested in all new releases). | |
8716 | |
8717 @cindex Debian | |
8718 | |
8719 If you use Debian, you can install the Debian | |
8720 @uref{http://packages.debian.org/unstable/mail/mh-e, mh-e package} | |
8721 instead. | |
8722 | |
8723 @cindex files, @samp{MH-E-NEWS} | |
8724 @cindex files, @samp{README} | |
8725 @cindex news | |
8726 @cindex @samp{MH-E-NEWS} | |
8727 @cindex @samp{README} | |
8728 @kindex M-x mh-version | |
8729 | |
8730 After you download and extract the MH-E tarball, read the | |
8731 @file{README} file and @file{MH-E-NEWS}. These correspond to the | |
8732 release notes and change log mentioned above. The file @file{README} | |
8733 contains instructions on installing MH-E. If you're already running | |
8734 Emacs, please quit that session and start again to load in the new | |
8735 MH-E. Check that you're running the new version with the command | |
8736 @kbd{M-x mh-version}. | |
8737 | |
8738 @cindex contributed software | |
8739 @cindex manual | |
8740 @cindex documentation | |
8741 | |
8742 In addition to the mh-e package, the | |
8743 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357, | |
8744 SourceForge} site also contains doc and contrib packages. The former | |
8745 is the latest release of this manual, and the latter contains a few | |
8746 contributed packages you might find useful. | |
8747 | |
8748 @node History, GFDL, Odds and Ends, Top | |
8749 @appendix History of MH-E | |
8750 | |
8751 @cindex Bill Wohler | |
8752 @cindex Brian Reid | |
8753 @cindex Gildea, Stephen | |
8754 @cindex Jim Larus | |
8755 @cindex Larus, Jim | |
8756 @cindex MH-E, versions | |
8757 @cindex Reid, Brian | |
8758 @cindex SourceForge | |
8759 @cindex Stephen Gildea | |
8760 @cindex Wohler, Bill | |
8761 @cindex history of MH-E | |
8762 @cindex versions of MH-E | |
8763 | |
8764 MH-E was originally written by Brian Reid in 1983 and has changed | |
8765 hands several times since then. Jim Larus wanted to do something | |
8766 similar for GNU Emacs, and ended up completely rewriting it that same | |
8767 year. In 1989, Stephen Gildea picked it up and added many | |
8768 improvements. Bill Wohler then took over in 2000 and moved its | |
8769 development to @uref{http://sourceforge.net/, SourceForge} where it | |
8770 lives today. | |
8771 | |
8772 @menu | |
8773 * From Brian Reid:: | |
8774 * From Jim Larus:: | |
8775 * From Stephen Gildea:: | |
8776 * From Bill Wohler:: | |
8777 @end menu | |
8778 | |
8779 @node From Brian Reid, From Jim Larus, History, History | |
8780 @appendixsec From Brian Reid | |
8781 | |
8782 @cindex Brian Reid | |
8783 @cindex Reid, Brian | |
8784 | |
8785 One day in 1983 I got the flu and had to stay home from work for three | |
8786 days with nothing to do. I used that time to write MHE@. The | |
8787 fundamental idea behind MHE was that it was a ``puppeteer'' driving | |
8788 the MH programs underneath it. MH had a model that the editor was | |
8789 supposed to run as a sub-process of the mailer, which seemed to me at | |
8790 the time to be the tail wagging the dog. So I turned it around and | |
8791 made the editor drive the MH programs. I made sure that the UCI people | |
8792 (who were maintaining MH at the time) took in my changes and made them | |
8793 stick. | |
8794 | |
8795 Today, I still use my own version of MHE because I don't at all like | |
8796 the way that GNU MH-E works and I've never gotten to be good enough at | |
8797 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs | |
8798 version of MHE and the GNU Emacs version of MH-E have almost nothing | |
8799 in common except similar names. They work differently, have different | |
8800 conceptual models, and have different key bindings@footnote{After | |
8801 reading this article, I questioned Brian about his version of MHE, and | |
8802 received some great ideas for improving MH-E such as a dired-like | |
8803 method of selecting folders; and removing the prompting when sending | |
8804 mail, filling in the blanks in the draft buffer instead. I passed them | |
8805 on to Stephen Gildea, the current maintainer, and he was excited about | |
8806 the ideas as well. Perhaps one day, MH-E will again resemble MHE | |
8807 (draft form editing was introduced in version 7.4).}. | |
8808 | |
8809 Brian Reid, June 1994 | |
8810 | |
8811 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History | |
8812 @appendixsec From Jim Larus | |
8813 | |
8814 @cindex Jim Larus | |
8815 @cindex Larus, Jim | |
8816 | |
8817 Brian Reid, while at CMU or shortly after going to Stanford wrote a | |
8818 mail reading program called MHE for Gosling Emacs. It had much the | |
8819 same structure as MH-E (i.e., invoked MH programs), though it was | |
8820 simpler and the commands were slightly different. Unfortunately, I no | |
8821 longer have a copy so the differences are lost in the mists of time. | |
8822 | |
8823 In '82-83, I was working at BBN and wrote a lot of mlisp code in | |
8824 Gosling Emacs to make it look more like Tennex Emacs. One of the | |
8825 packages that I picked up and improved was Reid's mail system. In '83, | |
8826 I went back to Berkeley. About that time, Stallman's first version of | |
8827 GNU Emacs came out and people started to move to it from Gosling Emacs | |
8828 (as I recall, the transition took a year or two). I decided to port | |
8829 Reid's MHE and used the mlisp to Emacs Lisp translator that came with | |
8830 GNU Emacs. It did a lousy job and the resulting code didn't work, so I | |
8831 bit the bullet and rewrote the code by hand (it was a lot smaller and | |
8832 simpler then, so it took only a day or two). | |
8833 | |
8834 Soon after that, MH-E became part of the standard Emacs distribution | |
8835 and suggestions kept dribbling in for improvements. MH-E soon reached | |
8836 sufficient functionality to keep me happy, but I kept on improving it | |
8837 because I was a graduate student with plenty of time on my hands and | |
8838 it was more fun than my dissertation. In retrospect, the one thing | |
8839 that I regret is not writing any documentation, which seriously | |
8840 limited the use and appeal of the package. | |
8841 | |
8842 @cindex @command{xmh}, in MH-E history | |
8843 | |
8844 In '89, I came to Wisconsin as a professor and decided not to work on | |
8845 MH-E. It was stable, except for minor bugs, and had enough | |
8846 functionality, so I let it be for a few years. Stephen Gildea of BBN | |
8847 began to pester me about the bugs, but I ignored them. In 1990, he | |
8848 went off to the X Consortium, said good bye, and said that he would | |
8849 now be using @command{xmh}. A few months later, he came back and said | |
8850 that he couldn't stand @command{xmh} and could I put a few more bug fixes | |
8851 into MH-E. At that point, I had no interest in fixing MH-E, so I gave | |
8852 the responsibility of maintenance to him and he has done a fine job | |
8853 since then. | |
8854 | |
8855 Jim Larus, June 1994 | |
8856 | |
8857 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History | |
8858 @appendixsec From Stephen Gildea | |
8859 | |
8860 @cindex Gildea, Stephen | |
8861 @cindex Stephen Gildea | |
8862 | |
8863 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before | |
8864 me. In my previous job, I had been using RMAIL, but as my folders tend | |
8865 to run large, I was frustrated with the speed of RMAIL@. However, I | |
8866 stuck with it because I wanted the GNU Emacs interface. I am very | |
8867 familiar and comfortable with the Emacs interface (with just a few | |
8868 modifications of my own) and dislike having to use applications with | |
8869 embedded editors; they never live up to Emacs. | |
8870 | |
8871 MH is the mail reader of choice at BBN, so I converted to it. Since I | |
8872 didn't want to give up using an Emacs interface, I started using MH-E. | |
8873 As is my wont, I started hacking on it almost immediately. I first | |
8874 used version 3.4m. One of the first features I added was to treat the | |
8875 folder buffer as a file-visiting buffer: you could lock it, save it, | |
8876 and be warned of unsaved changes when killing it. I also worked to | |
8877 bring its functionality a little closer to RMAIL@. Jim Larus was very | |
8878 cooperative about merging in my changes, and my efforts first appeared | |
8879 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided | |
8880 MH-E was too slow and optimized it a lot. Version, 3.7, distributed | |
8881 with Emacs 18.56 in 1990, was noticeably faster. | |
8882 | |
8883 When I moved to the X Consortium I became the first person there to | |
8884 not use xmh. (There is now one other engineer there using MH-E.) About | |
8885 this point I took over maintenance of MH-E from Jim and was finally | |
8886 able to add some features Jim hadn't accepted, such as the backward | |
8887 searching undo. My first release was 3.8 (Emacs 18.58) in 1992. | |
8888 | |
8889 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0. | |
8890 Version 4.0 added many new features, including background folder | |
8891 collection and support for composing @sc{mime} messages. (Reading | |
8892 @sc{mime} messages remains to be done, alas.) While writing this book, | |
8893 Bill Wohler gave MH-E its closest examination ever, uncovering bugs | |
8894 and inconsistencies that required a new major version to fix, and so | |
8895 version 5 was released. | |
8896 | |
8897 Stephen Gildea, June 1994 | |
8898 | |
8899 @node From Bill Wohler, , From Stephen Gildea, History | |
8900 @appendixsec From Bill Wohler | |
8901 | |
8902 @cindex Wohler, Bill | |
8903 @cindex Bill Wohler | |
8904 | |
8905 The preface originally included the following text which I use to | |
8906 begin my story: | |
8907 | |
8908 @quotation | |
8909 But it's important to note a brief history of MH-E. | |
8910 | |
8911 @w{Version 3} was prevalent through the @w{Emacs 18} and early | |
8912 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}), | |
8913 which introduced several new and changed commands. Next, @w{Version | |
8914 5.0} was released, which fixed some bugs and incompatibilities, and | |
8915 was incorporated into @w{Emacs 19.29}. | |
8916 @end quotation | |
8917 | |
8918 After a long break, Stephen handed the reins over to me in 2000. I | |
8919 moved the project to a new site called SourceForge and organized a | |
8920 great team of developers. Our first release in late 2001 was version | |
8921 6. It appeared around the time of Emacs 21.2 and had menus and tool | |
8922 bar buttons. | |
8923 | |
8924 Then, indexed searches, improved MIME handling, a speedbar, multiple | |
8925 identities, alias completion, an index view of unseen messages, spam | |
8926 software support, Face and X-Image-URL header field support, Fcc | |
8927 completion, arbitrary range handling, and draft form editing were | |
8928 introduced in the version 7 series around the time of Emacs 21.4 | |
8929 (2004). Still, Emacs itself contained version 5 of MH-E released back | |
8930 in 1994. | |
8931 | |
8932 Version 8 development was mostly driven by the rewrite of the manual. | |
97414
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8933 It also brought GNU mailutils MH support, S/MIME support, picon |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8934 support, and an improved interface for hiding header fields. The CVS |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8935 repository was migrated from SourceForge to Savannah (only for those |
d38d8feaaa82
(Getting Started): Rename variant mu-mh to gnu-mh and be explicit
Bill Wohler <wohler@newt.com>
parents:
97192
diff
changeset
|
8936 files that were already part of Emacs) and the software was completely |
97555 | 8937 reorganized to push back two decades of entropy. Version 8 appeared in |
8938 Emacs 22.1 in 2006. | |
8939 | |
8940 Development was then quiet for a couple of years. Emacs 23.1, which is | |
8941 due out in 2009, will contain version 8.1. This version includes a few | |
8942 new features and several bug fixes. | |
8943 | |
8944 Bill Wohler, August 2008 | |
84306 | 8945 |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8946 @node GFDL, GPL, History, Top |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8947 @appendix GNU Free Documentation License |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8948 @include doclicense.texi |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8949 |
98287
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8950 @node GPL, Key Index, GFDL, Top |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8951 @appendix GNU General Public License |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8952 @include gpl.texi |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8953 |
ddacedfb951c
Retain dual license as agreed to by the FSF.
Bill Wohler <wohler@newt.com>
parents:
97555
diff
changeset
|
8954 @node Key Index, Command Index, GPL, Top |
84306 | 8955 @unnumbered Key (Character) Index |
8956 @printindex ky | |
8957 | |
8958 @node Command Index, Option Index, Key Index, Top | |
8959 @unnumbered Command Index | |
8960 @printindex fn | |
8961 | |
8962 @node Option Index, Concept Index, Command Index, Top | |
8963 @unnumbered Option (Variable) Index | |
8964 @printindex vr | |
8965 | |
8966 @node Concept Index, , Option Index, Top | |
8967 @unnumbered Concept Index | |
8968 @printindex cp | |
8969 | |
8970 @bye | |
8971 | |
8972 @c Ispell Helpers | |
8973 @c | |
8974 @c The following are words that ispell should ignore that would not | |
8975 @c normally be in a dictionary (global or personal). Be careful not to | |
8976 @c include words here that could potentially be typos of other words | |
8977 @c (such as url, elisp, or MHE). | |
8978 @c | |
8979 @c LocalWords: CTRL ESC SPC f's | |
8980 @c LocalWords: addr Aliasfile alist | |
8981 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's | |
8982 @c LocalWords: cmd CMU contrib cron | |
8983 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw | |
8984 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm | |
8985 @c LocalWords: ImageMagick inbox ispell keychain | |
8986 @c LocalWords: Larus licensor LocalWords lookup lpr | |
8987 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp | |
8988 @c LocalWords: MML msg multipart | |
8989 @c LocalWords: Namazu NIS nenscript nnml num | |
8990 @c LocalWords: packmbox passphrase pathname prev procmail prog repl | |
8991 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's | |
8992 @c LocalWords: sublicense supercite speedbar | |
8993 @c LocalWords: Tennex texi texinfo Thelen thelenm | |
8994 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat | |
8995 @c | |
8996 @c See http://www.oreilly.com/oreilly/author/stylesheet.html. | |
8997 @c See http://en.wikipedia.org/. | |
8998 @c | |
8999 @c Note the lowercase mh which is needed to avoid hits in the | |
9000 @c functions and variables. Occasionally, check for accidental | |
9001 @c inclusion of mh in text by uncommenting the following and executing | |
9002 @c it with C-x C-e. You want to see "Search failed" | |
9003 @c (let ((case-fold-search nil)) | |
9004 @c (goto-char (point-min)) | |
9005 @c (search-forward-regexp "^mh\\( \\|$\\)")) | |
9006 @c | |
9007 @c An extremely useful setting for texinfo-mode-hook is: | |
9008 @c (add-to-list | |
9009 @c 'ispell-skip-region-alist | |
9010 @c (list | |
9011 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)" | |
9012 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|" | |
9013 @c "@[@{}.]\\|" | |
9014 @c "[^@]\\|" | |
9015 @c "@\\(end \\)?group\\|" | |
9016 @c "@\\(end \\)?cartouche\\)+" | |
9017 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|" | |
9018 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|" | |
9019 @c "^@end [a-z]+$\\|" | |
9020 @c "^@\\([fv]\\|print\\)index .*$\\|" | |
9021 @c "@uref{[^,]+,\\|" | |
9022 @c "@[a-z]+\\|" | |
9023 @c "/[a-z.]+[/}]\\)"))))) | |
9024 @c | |
9025 @c Cross References | |
9026 @c | |
9027 @c See existing cross-references to the Emacs manual and the Emacs | |
9028 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU | |
9029 @c Emacs Lisp Reference Manual'' respectively). | |
9030 | |
9031 @c @ftable Sorting | |
9032 @c | |
9033 @c As per index (sort of): Punctuation, keyboard characters (such as | |
9034 @c RET and BS) upper and lowercase mixed (lower comes before | |
9035 @c uppercase), control characters go with uppercase C, meta characters | |
9036 @c go with uppercase M. | |
9037 @c In some cases, the sort isn't strictly ASCII. | |
9038 @c For example, SPC (mh-page-msg) reads better before BS | |
9039 @c (mh-previous-page) and . (mh-show) is better before , | |
9040 @c (mh-header-display). | |
9041 | |
9042 @c @vtable Sorting | |
9043 @c | |
9044 @c Alphabetical, pull hooks into their own table. | |
9045 | |
9046 @c Local Variables: | |
9047 @c sentence-end-double-space: nil | |
9048 @c End: | |
9049 | |
9050 @ignore | |
9051 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef | |
9052 @end ignore |