Mercurial > emacs
annotate doc/misc/mh-e.texi @ 98020:1e478a6e3dd0
(change-log-default-name): Autoload safety.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 06 Sep 2008 02:56:24 +0000 |
parents | 12c8fcc4c171 |
children | ddacedfb951c |
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 |
30 @quotation | |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
31 Permission is granted to copy, distribute and/or modify this document |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
32 under the terms of the GNU Free Documentation License, Version 1.2 or |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
33 any later version published by the Free Software Foundation; with no |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
34 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
35 and with the Back-Cover Texts as in (a) below. A copy of the license |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
36 is included in the section entitled ``GNU Free Documentation License.'' |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
37 |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
38 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
39 modify this GNU manual. Buying copies from the FSF supports it in |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
40 developing GNU and promoting software freedom.'' |
84306 | 41 @end quotation |
42 @end copying | |
43 | |
44 @c Info Directory Entry | |
45 @dircategory Emacs | |
46 @direntry | |
47 * MH-E: (mh-e). Emacs interface to the MH mail system. | |
48 @end direntry | |
49 | |
50 @c Title Page | |
51 @setchapternewpage odd | |
52 @titlepage | |
53 @title The MH-E Manual | |
54 @subtitle Version @value{VERSION}@value{EDITION} | |
55 @subtitle @value{UPDATE-MONTH} | |
56 @author Bill Wohler | |
57 | |
58 @c Copyright Page | |
59 @page | |
60 @vskip 0pt plus 1filll | |
61 @insertcopying | |
62 @end titlepage | |
63 | |
64 @ifnottex | |
65 @html | |
66 <!-- | |
67 @end html | |
68 @node Top, Preface, (dir), (dir) | |
69 @top The MH-E Manual | |
70 @html | |
71 --> | |
72 @end html | |
73 @insertcopying | |
74 @end ifnottex | |
75 | |
76 @c Table of Contents | |
77 @contents | |
78 | |
79 @html | |
80 <!-- | |
81 @end html | |
82 | |
83 @menu | |
84 * Preface:: Preface | |
85 * Conventions:: GNU Emacs Terms and Conventions | |
86 * Getting Started:: Getting Started | |
87 * Tour Through MH-E:: Tour Through MH-E | |
88 * Using This Manual:: Using This Manual | |
89 * Incorporating Mail:: Incorporating Mail | |
90 * Reading Mail:: Reading Mail | |
91 * Folders:: Organizing Your Mail with Folders | |
92 * Sending Mail:: Sending Mail | |
93 * Editing Drafts:: Editing a Draft | |
94 * Aliases:: Aliases | |
95 * Identities:: Identities | |
96 * Speedbar:: The Speedbar | |
97 * Menu Bar:: The Menu Bar | |
98 * Tool Bar:: The Tool Bar | |
99 * Searching:: Searching Through Messages | |
100 * Threading:: Viewing Message Threads | |
101 * Limits:: Limiting Display | |
102 * Sequences:: Using Sequences | |
103 * Junk:: Dealing With Junk Mail | |
104 * Miscellaneous:: Miscellaneous Commands, Variables, and Buffers | |
105 * Scan Line Formats:: Scan Line Formats | |
106 * Procmail:: Reading Mailing Lists Effectively | |
107 * Odds and Ends:: Odds and Ends | |
108 * History:: History of MH-E | |
109 * GFDL:: GNU Free Documentation License | |
110 * Key Index:: Key (Character) Index | |
111 * Command Index:: Command Index | |
112 * Option Index:: Option (Variable) Index | |
113 * Concept Index:: Concept Index | |
114 | |
115 @detailmenu | |
116 --- The Detailed Node Listing --- | |
117 | |
118 Tour Through MH-E | |
119 | |
120 * Sending Mail Tour:: | |
121 * Reading Mail Tour:: | |
122 * Processing Mail Tour:: | |
123 * Leaving MH-E:: | |
124 * More About MH-E:: | |
125 | |
126 Using This Manual | |
127 | |
128 * Options:: | |
129 * Ranges:: | |
130 * Folder Selection:: | |
131 | |
132 Reading Your Mail | |
133 | |
134 * Viewing:: | |
135 * Viewing Attachments:: | |
136 * HTML:: | |
137 * Digests:: | |
138 * Reading PGP:: | |
139 * Printing:: | |
140 * Files and Pipes:: | |
141 * Navigating:: | |
142 * Miscellaneous Commands and Options:: | |
143 | |
144 Sending Mail | |
145 | |
146 * Composing:: | |
147 * Replying:: | |
148 * Forwarding:: | |
149 * Redistributing:: | |
150 * Editing Again:: | |
151 | |
152 Editing a Draft | |
153 | |
154 * Editing Message:: | |
155 * Inserting Letter:: | |
156 * Inserting Messages:: | |
157 * Signature:: | |
158 * Picture:: | |
159 * Adding Attachments:: | |
160 * Sending PGP:: | |
161 * Checking Recipients:: | |
162 * Sending Message:: | |
163 * Killing Draft:: | |
164 | |
165 Odds and Ends | |
166 | |
167 * Bug Reports:: | |
168 * Mailing Lists:: | |
169 * MH FAQ and Support:: | |
170 * Getting MH-E:: | |
171 | |
172 History of MH-E | |
173 | |
174 * From Brian Reid:: | |
175 * From Jim Larus:: | |
176 * From Stephen Gildea:: | |
177 * From Bill Wohler:: | |
178 | |
179 @end detailmenu | |
180 @end menu | |
181 | |
182 @html | |
183 --> | |
184 @end html | |
185 | |
186 @node Preface, Conventions, Top, Top | |
187 @unnumbered Preface | |
188 | |
189 @cindex Emacs | |
190 @cindex Unix commands, Emacs | |
191 @cindex preface | |
192 | |
193 This manual introduces another interface to the MH mail system that is | |
194 accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is | |
195 easy to use. I don't assume that you know GNU Emacs or even MH at this | |
196 point, since I didn't know either of them when I discovered MH-E. | |
197 However, MH-E was the tip of the iceberg, and I discovered more and | |
198 more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of | |
199 them. | |
200 | |
201 The MH-E package is distributed with GNU Emacs@footnote{Version | |
97555 | 202 @value{VERSION} of MH-E will appear in GNU Emacs 23.1. It is supported |
203 in GNU Emacs 21 and 22, as well as XEmacs 21 (except for versions | |
84306 | 204 21.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher, |
205 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
|
206 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
|
207 required; version 5.10 or higher is recommended. This manual covers |
84306 | 208 MH-E version @value{VERSION}. To help you decide which version you |
209 have, see @ref{Getting Started}. | |
210 | |
211 @findex help-with-tutorial | |
212 @kindex C-h t | |
213 | |
214 If you don't already use GNU Emacs but want to learn more, you can | |
215 read an online tutorial by starting GNU Emacs and typing @kbd{C-h t} | |
216 (@code{help-with-tutorial}). (To learn about this notation, see | |
217 @ref{Conventions}.) If you want to take the plunge, consult the | |
218 @iftex | |
219 @cite{GNU Emacs Manual}, | |
220 @end iftex | |
221 @ifinfo | |
222 @ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual}, | |
223 @end ifinfo | |
224 @ifhtml | |
225 @uref{http://www.gnu.org/software/emacs/manual/html_node/, | |
226 @cite{GNU Emacs Manual}}, | |
227 @end ifhtml | |
228 from the Free Software Foundation. | |
229 | |
230 If more information is needed, you can go to the Unix manual pages of | |
231 the individual MH commands. When the name is not obvious, I'll guide | |
232 you to a relevant MH manual page that describes the action more fully. | |
233 | |
234 @cindex @cite{MH & nmh: Email for Users & Programmers} | |
235 @cindex MH book | |
236 @cindex info | |
237 @kindex C-h i | |
238 | |
239 This manual is available in both Info and online formats. The Info | |
240 version is distributed with Emacs and can be accessed with the | |
241 @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i | |
242 m mh-e @key{RET}}). The online version is available at | |
243 @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great | |
244 online resource is the book @uref{http://www.ics.uci.edu/~mh/book/, | |
245 @cite{MH & nmh: Email for Users & Programmers}} (also known as | |
246 @dfn{the MH book}). | |
247 | |
248 I hope you enjoy this manual! If you have any comments, or suggestions | |
249 for this document, please let me know. | |
250 | |
251 @cindex Bill Wohler | |
252 @cindex Wohler, Bill | |
253 | |
254 @noindent | |
255 Bill Wohler <@i{wohler at newt.com}>@* | |
256 8 February 1995@* | |
257 24 February 2006 | |
258 | |
259 @node Conventions, Getting Started, Preface, Top | |
260 @chapter GNU Emacs Terms and Conventions | |
261 | |
262 @cindex Emacs | |
263 @cindex Emacs, conventions | |
264 @cindex Emacs, terms | |
265 @cindex Unix commands, Emacs | |
266 @cindex conventions, Emacs | |
267 @cindex terms, Emacs | |
268 | |
269 If you're an experienced Emacs user, you can skip the following | |
270 conventions and definition of terms and go directly to the next | |
271 section (@pxref{Getting Started}). | |
272 | |
273 @cindex Emacs commands | |
274 @cindex MH commands | |
275 @cindex Unix commands | |
276 @cindex commands | |
277 @cindex commands, MH | |
278 @cindex commands, Unix | |
279 @cindex commands, shell | |
280 @cindex functions | |
281 @cindex shell commands | |
282 | |
283 In general, @dfn{functions} in this text refer to Emacs Lisp functions | |
284 that one would call from within Emacs Lisp programs (for example, | |
285 @code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those | |
286 things that are run by the user, such as @kbd{i} or @kbd{M-x | |
287 mh-inc-folder}. Programs outside of Emacs are specifically called MH | |
288 commands, shell commands, or Unix commands. | |
289 | |
290 @cindex conventions, key names | |
291 @cindex key names | |
292 | |
293 The conventions for key names are as follows: | |
294 | |
295 @table @kbd | |
296 @item C-x | |
297 Hold down the @key{CTRL} (Control) key and press the @kbd{x} key. | |
298 @c ------------------------- | |
299 @item M-x | |
300 Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key. | |
301 | |
302 Since some keyboards don't have a @key{META} key, you can generate | |
303 @kbd{M-x}, for example, by pressing @key{ESC} (Escape), | |
304 @emph{releasing it}, and then pressing the @kbd{x} key. | |
305 @c ------------------------- | |
306 @item @key{RET} | |
307 Press the @key{RETURN} or @key{ENTER} key. This is normally used to | |
308 complete a command. | |
309 @c ------------------------- | |
310 @item @key{SPC} | |
311 Press the space bar. | |
312 @c ------------------------- | |
313 @item @key{TAB} | |
314 Press the @key{TAB} key. | |
315 @c ------------------------- | |
316 @item @key{DEL} | |
317 Press the @key{DELETE} key. | |
318 @c ------------------------- | |
319 @item @key{BS} | |
320 Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or | |
321 earlier of Emacs, you will need to use the @key{DEL} key.}. | |
322 @end table | |
323 | |
324 @cindex Emacs, prefix argument | |
325 @cindex prefix argument | |
326 @kindex C-u | |
327 | |
328 A @dfn{prefix argument} allows you to pass an argument to any Emacs | |
329 function. To pass an argument, type @kbd{C-u} before the Emacs command | |
330 or keystroke. Numeric arguments can be passed as well. For example, to | |
331 insert five f's, use @kbd{C-u 5 f}. There is a default of four when | |
332 using @kbd{C-u}, and you can use multiple prefix arguments to provide | |
333 arguments of powers of four. To continue our example, you could insert | |
334 four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with | |
335 @kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative | |
336 arguments can also be inserted with the @key{META} key. Examples | |
337 include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which | |
338 specifies a negative argument with no particular value. | |
339 | |
340 @sp 1 | |
341 @center @strong{NOTE} | |
342 | |
343 @quotation | |
344 The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder | |
345 mode (@pxref{Reading Mail Tour}). In this mode, simply enter the | |
346 numerical argument before entering the command. | |
347 @end quotation | |
348 @sp 1 | |
349 | |
350 @cindex @file{.emacs} | |
351 @cindex Emacs, variables | |
352 @cindex files, @file{.emacs} | |
353 @cindex variables | |
354 @findex setq | |
355 | |
356 Emacs uses @dfn{variables} to hold values. These can be changed via | |
357 calls to the function @code{setq} in @file{~/.emacs}. | |
358 | |
359 @cindex Emacs, options | |
360 @cindex options | |
361 @findex customize-group | |
362 @findex customize-option | |
363 | |
364 Variables in MH-E that are normally modified by the user are called | |
365 @dfn{options} and are modified through the customize functions (such | |
366 as @kbd{M-x customize-option} or @kbd{M-x customize-group}). | |
367 @ifnothtml | |
368 @xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The | |
369 GNU Emacs Manual}. | |
370 @end ifnothtml | |
371 @ifhtml | |
372 See section | |
373 @uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html, | |
374 Easy Customization} in @cite{The GNU Emacs Manual}. | |
375 @end ifhtml | |
376 @xref{Options}. | |
377 | |
378 @cindex Emacs, faces | |
379 @cindex faces | |
380 @cindex highlighting | |
381 @findex customize-face | |
382 | |
383 You can specify various styles for displaying text using @dfn{faces}. | |
384 MH-E provides a set of faces that you can use to personalize the look | |
385 of your MH-E buffers. Use the command @kbd{M-x customize-face} to do | |
386 this. | |
387 @ifnothtml | |
388 @xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The | |
389 GNU Emacs Manual}. | |
390 @end ifnothtml | |
391 @ifhtml | |
392 See section | |
393 @uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html, | |
394 Face Customization} in @cite{The GNU Emacs Manual}. | |
395 @end ifhtml | |
396 | |
397 @cindex abnormal hooks | |
398 @cindex hooks | |
399 @cindex normal hooks | |
400 @findex add-hook | |
401 @findex customize-option | |
402 | |
403 Commands often offer @dfn{hooks} which enable you to extend or modify | |
404 the way a command works. | |
405 @ifnothtml | |
406 @ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU | |
407 Emacs Manual} | |
408 @end ifnothtml | |
409 @ifhtml | |
410 See section | |
411 @uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html, | |
412 Hooks} in @cite{The GNU Emacs Manual} | |
413 @end ifhtml | |
414 for a description about @dfn{normal hooks} and @dfn{abnormal hooks}. | |
415 MH-E uses normal hooks in nearly all cases, so you can assume that we | |
416 are talking about normal hooks unless we explicitly mention that a | |
417 hook is abnormal. We also follow the conventions described in that | |
418 section: the name of the abnormal hooks end in @code{-hooks} and all | |
419 the rest of the MH-E hooks end in @code{-hook}. You can add hooks with | |
420 either @code{customize-option} or @code{add-hook}. | |
421 | |
422 @cindex Emacs, mark | |
423 @cindex Emacs, point | |
424 @cindex Emacs, region | |
425 @cindex mark | |
426 @cindex point | |
427 @cindex region | |
428 @kindex C-@@ | |
429 @kindex C-@key{SPC} | |
430 | |
431 There are several other terms that are used in Emacs that you should | |
432 know. The @dfn{point} is where the cursor currently is. You can save | |
433 your current place in the file by setting a @dfn{mark}. This operation | |
434 is useful in several ways. The mark can be later used when defining a | |
435 @dfn{region}, which is the text between the point and mark. Many | |
436 commands operate on regions, such as those for deleting text or | |
437 filling paragraphs. A mark can be set with @kbd{C-@@} (or | |
438 @kbd{C-@key{SPC}}). | |
439 | |
440 @cindex completion | |
441 @cindex Emacs, completion | |
442 @cindex Emacs, file completion | |
443 @cindex Emacs, folder completion | |
444 @cindex Emacs, minibuffer | |
445 @cindex file completion | |
446 @cindex folder completion | |
447 @cindex minibuffer | |
448 @kindex SPC | |
449 @kindex TAB | |
450 | |
451 The @dfn{minibuffer} is the bottom line of the Emacs window, where all | |
452 prompting and multiple-character input is directed. You can use | |
453 @dfn{completion} to enter values such as folders. Completion means | |
454 that Emacs fills in text for you when you type @key{SPC} or @key{TAB}. | |
455 A second @key{SPC} or @key{TAB} will list all possibilities at that | |
456 point. | |
457 @ifnothtml | |
458 @xref{Completion, , Completion, emacs, The GNU Emacs Manual}. | |
459 @end ifnothtml | |
460 @ifhtml | |
461 See the section | |
462 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html, | |
463 Completion} in @cite{The GNU Emacs Manual}. | |
464 @end ifhtml | |
465 Note that @key{SPC} cannot be used for completing filenames and | |
466 folders. | |
467 | |
468 @findex help-with-tutorial | |
469 @kindex C-h t | |
470 @kindex M-x | |
471 | |
472 The minibuffer is also where you enter Emacs function names after | |
473 typing @kbd{M-x}. For example, in the preface, I mentioned that you | |
474 could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What | |
475 this means is that you can get a tutorial by typing either @kbd{C-h t} | |
476 or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted | |
477 for @samp{help-with-tutorial} in the minibuffer after typing | |
478 @kbd{M-x}. | |
479 | |
480 @cindex ~ | |
481 | |
482 The @samp{~} notation in filenames represents your home directory. | |
483 This notation is used by many shells including @command{bash}, | |
484 @code{tcsh}, and @command{csh}. It is analogous to the environment | |
485 variable @samp{$HOME}. For example, @file{~/.emacs} can be written | |
486 @file{$HOME/.emacs} or using the absolute path as in | |
487 @file{/home/wohler/.emacs} instead. | |
488 | |
489 @cindex Emacs, interrupting | |
490 @cindex Emacs, quitting | |
491 @cindex interrupting | |
492 @cindex quitting | |
493 | |
494 @i{In case of trouble:} Emacs can be interrupted at any time with | |
495 @kbd{C-g}. For example, if you've started a command that requests that | |
496 you enter something in the minibuffer, but then you change your mind, | |
497 type @kbd{C-g} and you'll be back where you started. If you want to | |
498 exit Emacs entirely, use @kbd{C-x C-c}. | |
499 | |
500 @node Getting Started, Tour Through MH-E, Conventions, Top | |
501 @chapter Getting Started | |
502 | |
503 @cindex MH-E, versions | |
504 @cindex history | |
505 @cindex versions of MH-E | |
506 | |
507 Because there are many old versions of MH-E out there, it is important | |
508 to know which version you have. I'll be talking about @w{Version 8} | |
509 which is pretty close to @w{Version 6} and @w{Version 7}. It differs | |
510 from @w{Version 4} and @w{Version 5} and is vastly different from | |
511 @w{Version 3}. @xref{History}. | |
512 | |
513 @findex mh-version | |
514 | |
515 To determine which version of MH-E that you have, enter @kbd{M-x | |
516 mh-version @key{RET}}. Hopefully it says that you're running | |
517 @w{Version @value{VERSION}} which is the latest version as of this | |
518 printing. | |
519 | |
520 If your version is much older than this, please consider upgrading. | |
521 You can have your system administrator upgrade the system-wide | |
522 version, or you can install your own personal version. It's really | |
523 quite easy. @xref{Getting MH-E}, for instructions for getting and | |
524 installing MH-E. | |
525 | |
526 If the @code{mh-version} command displays @samp{No MH variant | |
527 detected}@footnote{In very old versions of MH-E, you may get the error | |
528 message, @samp{Cannot find the commands `inc' and `mhl' and the file | |
529 `components'} if MH-E can't find MH. In this case, you need to update | |
530 MH-E, and you may need to install MH too. However, newer versions of | |
531 MH-E are better at finding MH if it is on your system.}, then you need | |
532 to install MH or tell MH-E where to find MH. | |
533 | |
534 @cindex Debian | |
535 @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
|
536 @cindex GNU mailutils MH |
84306 | 537 |
538 If you don't have MH on your system already, you must install a | |
539 variant of MH. The Debian mh-e package does this for you automatically | |
540 (@pxref{Getting MH-E}). Most people use | |
541 @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
|
542 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
|
543 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
|
544 packages for both of these. |
84306 | 545 |
546 @cindex @command{install-mh} | |
547 @cindex MH commands, @command{install-mh} | |
548 @cindex MH book | |
549 | |
550 If you've never run MH before, you need to run @command{install-mh} | |
551 from the shell before you continue. This sets up your personal MH | |
552 environment@footnote{See the section | |
553 @uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the | |
554 MH book.}. If you don't, you'll be greeted with the error message: | |
555 @samp{Install MH and run install-mh before running MH-E}. This is all | |
556 you need to know about MH to use MH-E, but the more you know about MH, | |
557 the more you can leverage its power. See the | |
558 @uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH. | |
559 | |
560 @cindex @samp{Path:} MH profile component | |
561 @cindex MH profile | |
562 @cindex MH profile component | |
563 @cindex MH profile component, @samp{Path:} | |
564 | |
565 Your MH environment includes your @dfn{MH profile} which is found in | |
566 the file @file{~/.mh_profile}. This file contains a number of @dfn{MH | |
567 profile components}. For example, the @samp{Path:} MH profile | |
568 component contains the path to your mail directory, which is | |
569 @file{~/Mail} by default. | |
570 | |
571 @cindex @command{mhparam} | |
572 @cindex MH commands, @command{mhparam} | |
573 @vindex exec-path | |
574 @vindex mh-path | |
575 @vindex mh-sys-path | |
576 @vindex mh-variant | |
577 @vindex mh-variant-in-use | |
578 | |
579 There are several options MH-E uses to interact with your MH | |
580 installation. The option @code{mh-variant} specifies the variant used | |
581 by MH-E (@pxref{Options}). The default setting of this option is | |
582 @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
|
583 first of nmh, MH, or GNU mailutils MH that it finds in the directories |
84306 | 584 listed in @code{mh-path} (which you can customize), |
585 @code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at | |
586 all, you may have to customize @code{mh-path} and add the directory in | |
587 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
|
588 you have both nmh and GNU mailutils MH installed (for example) and |
84306 | 589 @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
|
590 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
|
591 @samp{gnu-mh}. |
84306 | 592 |
593 @vindex mh-flists-present-flag | |
594 @vindex mh-lib | |
595 @vindex mh-lib-progs | |
596 @vindex mh-progs | |
597 | |
598 When @code{mh-variant} is changed, MH-E resets @code{mh-progs}, | |
599 @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and | |
600 @code{mh-variant-in-use} accordingly. | |
601 | |
602 @cindex @file{.emacs} | |
603 @cindex files, @file{.emacs} | |
604 | |
605 @sp 1 | |
606 @center @strong{NOTE} | |
607 | |
608 @quotation | |
609 Prior to version 8, it was often necessary to set some of these | |
610 variables in @file{~/.emacs}; now it is no longer necessary and can | |
611 actually cause problems. | |
612 @end quotation | |
613 @sp 1 | |
614 | |
615 @cindex MH profile component, @samp{Draft-Folder:} | |
616 @cindex MH profile component, @samp{Path:} | |
617 @cindex MH profile component, @samp{Previous-Sequence:} | |
618 @cindex MH profile component, @samp{Unseen-Sequence:} | |
619 @cindex @samp{Draft-Folder:} MH profile component | |
620 @cindex @samp{Path:} MH profile component | |
621 @cindex @samp{Previous-Sequence:} MH profile component | |
622 @cindex @samp{Unseen-Sequence:} MH profile component | |
623 @findex mh-find-path | |
624 @vindex mh-draft-folder | |
625 @vindex mh-find-path-hook | |
626 @vindex mh-inbox | |
627 @vindex mh-previous-seq | |
628 @vindex mh-unseen-seq | |
629 @vindex mh-user-path | |
630 | |
631 In addition to setting variables that point to MH itself, MH-E also | |
632 sets a handful of variables that point to where you keep your mail. | |
633 During initialization, the function @code{mh-find-path} sets | |
634 @code{mh-user-path} from your @samp{Path:} MH profile component (but | |
635 defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder} | |
636 from @samp{Draft-Folder:}, @code{mh-unseen-seq} from | |
637 @samp{Unseen-Sequence:}, @code{mh-previous-seq} from | |
638 @samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:} | |
639 (defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run | |
640 after these variables have been set. This hook can be used the change | |
641 the value of these variables if you need to run with different values | |
642 between MH and MH-E. | |
643 | |
644 @node Tour Through MH-E, Using This Manual, Getting Started, Top | |
645 @chapter Tour Through MH-E | |
646 | |
647 @cindex introduction | |
648 @cindex tour | |
649 @cindex tutorial | |
650 | |
651 This chapter introduces some of the terms you'll need to know and then | |
652 takes you on a tour of MH-E@footnote{The keys mentioned in these | |
653 chapters refer to the default key bindings. If you've changed the | |
654 bindings, refer to the command summaries at the beginning of each | |
655 chapter for a mapping between default key bindings and function | |
656 names.}. When you're done, you'll be able to send, read, and file | |
657 mail, which is all that a lot of people ever do. But if you're the | |
658 curious or adventurous type, read the rest of the manual to be able to | |
659 use all the features of MH-E. I suggest you read this chapter first to | |
660 get the big picture, and then you can read the manual as you wish. | |
661 | |
662 @menu | |
663 * Sending Mail Tour:: | |
664 * Reading Mail Tour:: | |
665 * Processing Mail Tour:: | |
666 * Leaving MH-E:: | |
667 * More About MH-E:: | |
668 @end menu | |
669 | |
670 @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E | |
671 @section Sending Mail | |
672 | |
673 @cindex MH-Letter mode | |
674 @cindex mode | |
675 @cindex modes, MH-Letter | |
676 @cindex sending mail | |
677 @findex mh-smail | |
678 @kindex M-x mh-smail | |
679 | |
680 Let's start our tour by sending ourselves a message which we can later | |
681 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program | |
682 to send messages. Your message appears in an Emacs buffer whose | |
683 mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a | |
684 particular type of text.} is MH-Letter. | |
685 | |
686 Enter your login name in the @samp{To:} header field. Press the | |
687 @key{TAB} twice to move the cursor past the @samp{Cc:} field, since no | |
688 carbon copies are to be sent, and on to the @samp{Subject:} field. | |
689 Enter @kbd{Test} or anything else that comes to mind. | |
690 | |
691 Press @key{TAB} again to move the cursor to the body of the message. | |
692 Enter some text, using normal Emacs commands. You should now have | |
693 something like this@footnote{If you're running Emacs under the X | |
694 Window System, then you would also see a menu bar and a tool bar. I've | |
695 left out the menu bar and tool bar in all of the example screens.}: | |
696 | |
697 @cartouche | |
698 @smallexample | |
699 | |
700 | |
701 | |
702 | |
703 | |
704 | |
705 --:-- *scratch* All L1 (Lisp Interaction)------------------------- | |
706 To: wohler | |
707 cc: | |
708 Subject: Test | |
97555 | 709 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 710 -------- |
711 This is a test message to get the wheels churning...# | |
712 | |
713 | |
714 --:** @{draft@} All L5 (MH-Letter)---------------------------------- | |
715 Type C-c C-c to send message, C-C ? for help | |
716 @end smallexample | |
717 @end cartouche | |
718 @i{MH-E message composition window} | |
719 | |
720 Note the line of dashes that separates the header and the body of the | |
721 message. It is essential that these dashes (or a blank line) are | |
722 present or the body of your message will be considered to be part of | |
723 the header. | |
724 | |
725 @cindex help | |
726 @findex describe-mode | |
727 @kindex C-c ? | |
728 @kindex C-c C-c | |
729 @kindex C-h m | |
730 | |
731 There are several commands specific to MH-Letter mode@footnote{You can | |
732 get quick help for the commands used most often with @kbd{C-c ?} or | |
733 more complete help with the @kbd{C-h m} (@code{describe-mode}) | |
734 command.}, but at this time we'll only use @kbd{C-c C-c} to send your | |
735 message. Type @kbd{C-c C-c} now. That's all there is to it! | |
736 | |
737 @node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E | |
738 @section Receiving Mail | |
739 | |
740 @cindex @command{inc} | |
741 @cindex @command{scan} | |
742 @cindex MH commands, @command{inc} | |
743 @cindex MH commands, @command{scan} | |
744 @cindex MH-Folder mode | |
745 @cindex modes, MH-Folder | |
746 @cindex reading mail | |
747 @findex mh-rmail | |
748 @kindex M-x mh-rmail | |
749 | |
750 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. | |
751 This incorporates the new mail and puts the output from | |
752 @command{inc}@footnote{See the section | |
753 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
754 prev} in the MH book.} (called @dfn{scan lines} after the MH program | |
755 @command{scan}@footnote{See the section | |
756 @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan | |
757 pick Ranges Sequences} in the MH book.} which prints a one-line | |
758 summary of each message) into a buffer called @samp{+inbox} whose | |
759 major mode is MH-Folder. | |
760 | |
761 @findex mh-rmail | |
762 @kindex F r | |
763 @kindex M-x mh-rmail | |
764 | |
765 @sp 1 | |
766 @center @strong{NOTE} | |
767 | |
768 @quotation | |
769 | |
770 The @kbd{M-x mh-rmail} command will show you only new mail, not mail | |
771 you have already read. If you were to run this tour again, you would | |
772 use @kbd{F r} to pull all your messages into MH-E. | |
773 @end quotation | |
774 @sp 1 | |
775 | |
776 @kindex @key{RET} | |
777 @kindex n | |
778 @kindex p | |
779 | |
780 You should see the scan line for your message, and perhaps others. Use | |
781 @kbd{n} or @kbd{p} to move the cursor to your test message and type | |
782 @key{RET} to read your message. You should see something like: | |
783 | |
784 @cartouche | |
785 @smallexample | |
786 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1 | |
787 # 4+t08/24 To:wohler Test<<This is a test message to get the wheels | |
788 | |
789 -:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)--------- | |
790 To: wohler | |
791 Subject: Test | |
97555 | 792 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 793 Date: Fri, 17 Mar 2006 10:49:11 -0800 |
794 From: Bill Wohler <wohler@@stop.mail-abuse.org> | |
795 | |
796 This is a test message to get the wheels churning... | |
797 | |
798 | |
799 | |
800 --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- | |
801 | |
802 @end smallexample | |
803 @end cartouche | |
804 @i{After incorporating new messages} | |
805 | |
806 @kindex @key{DEL} | |
807 @kindex @key{SPC} | |
808 | |
809 If you typed a long message, you can view subsequent pages with | |
810 @key{SPC} and previous pages with @key{DEL}. | |
811 | |
812 @node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E | |
813 @section Processing Mail | |
814 | |
815 @cindex processing mail | |
816 @kindex @key{RET} | |
817 @kindex r | |
818 | |
819 The first thing we want to do is reply to the message that we sent | |
820 ourselves. Ensure that the cursor is still on the same line as your | |
821 test message and type @kbd{r}. You are prompted in the minibuffer with | |
822 @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply | |
823 to the original sender only, to the sender and primary recipients, or | |
824 to the sender and all recipients. You can press @key{TAB} to see these | |
825 choices. If you simply press @key{RET}, you'll reply only to the | |
826 sender. Press @key{RET} now. | |
827 | |
828 You'll find yourself in an Emacs buffer similar to that when you were | |
829 sending the original message, like this: | |
830 | |
831 @cartouche | |
832 @smallexample | |
833 To: | |
834 cc: | |
835 Subject: Re: Test | |
836 In-reply-to: <31054.1142621351@@stop.mail-abuse.org> | |
837 References: <31054.1142621351@@stop.mail-abuse.org> | |
838 Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org> | |
839 message dated "Fri, 17 Mar 2006 10:49:11 -0800." | |
97555 | 840 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 841 -------- |
842 # | |
843 | |
844 --:-- @{draft@} All L10 (MH-Letter)---------------------------------- | |
845 To: wohler | |
846 Subject: Test | |
97555 | 847 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 848 Date: Fri, 17 Mar 2006 10:49:11 -0800 |
849 From: Bill Wohler <wohler@@stop.mail-abuse.org> | |
850 | |
851 This is a test message to get the wheels churning... | |
852 | |
853 --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- | |
854 Type C-c C-c to send message, C-c ? for help | |
855 @end smallexample | |
856 @end cartouche | |
857 @i{Composition window during reply} | |
858 | |
859 @findex backward-char | |
860 @findex forward-char | |
861 @findex next-line | |
862 @findex previous-line | |
863 @kindex C-b | |
864 @kindex C-c C-c | |
865 @kindex C-c C-f C-t | |
866 @kindex C-f | |
867 @kindex C-n | |
868 @kindex C-p | |
869 @kindex @key{BS} | |
870 | |
871 By default, MH will not add you to the address list of your replies, | |
872 so if you find that the @samp{To:} header field is missing, don't | |
873 worry. In this case, type @kbd{C-c C-f C-t} to create and go to the | |
874 @samp{To:} field, where you can type your login name again. You can | |
875 move around with the arrow keys or with @kbd{C-p} | |
876 (@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b} | |
877 (@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can | |
878 delete the previous character with @key{BS}. When you're finished | |
879 editing your message, send it with @kbd{C-c C-c} as before. | |
880 | |
881 @cindex @command{refile} | |
882 @cindex MH commands, @command{refile} | |
883 @cindex folders | |
884 @kindex @key{SPC} | |
885 @kindex o | |
886 | |
887 You'll often want to save messages that were sent to you in an | |
888 organized fashion. This is done with @dfn{folders}. You can use | |
889 folders to keep messages from your friends, or messages related to a | |
890 particular topic. With your cursor in the MH-Folder buffer and | |
891 positioned on the message you sent to yourself, type @kbd{o} to output | |
892 (@command{refile} in MH parlance) that message to a folder. Enter | |
893 @kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y} | |
894 (or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note | |
895 that a @samp{^} (caret) appears next to the message number, which | |
896 means that the message has been marked for refiling but has not yet | |
897 been refiled. We'll talk about how the refile is actually carried out | |
898 in a moment. | |
899 | |
900 @cindex MH-Folder mode | |
901 @cindex modes, MH-Folder | |
902 @kindex d | |
903 @kindex i | |
904 @kindex @key{RET} | |
905 @kindex n | |
906 @kindex p | |
907 @kindex x | |
908 | |
909 Your previous reply is now waiting in the system mailbox. You | |
910 incorporate this mail into your MH-Folder buffer named @samp{+inbox} | |
911 with the @kbd{i} command. Do this now. After the mail is incorporated, | |
912 use @kbd{n} or @kbd{p} to move the cursor to the new message, and read | |
913 it with @key{RET}. Let's delete this message by typing @kbd{d}. Note | |
914 that a @samp{D} appears next to the message number. This means that | |
915 the message is marked for deletion but is not yet deleted. To perform | |
916 the deletion (and the refile we did previously), use the @kbd{x} | |
917 command. | |
918 | |
919 @findex mh-smail | |
920 @kindex m | |
921 @kindex M-x mh-smail | |
922 | |
923 If you want to send another message you can use @kbd{m} instead of | |
924 @kbd{M-x mh-smail}. So go ahead, send some mail to your friends! | |
925 | |
926 @cindex help | |
927 @cindex prefix characters | |
928 @findex describe-mode | |
929 @kindex ? | |
930 @kindex C-h m | |
931 @kindex F ? | |
932 | |
933 You can get a quick reminder about these commands by typing @kbd{?}. | |
934 This lists several @dfn{prefix characters}. To list the commands | |
935 available via the prefix characters, type the prefix character | |
936 followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is | |
937 available with the @kbd{C-h m} (@code{describe-mode}) command. | |
938 | |
939 @node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E | |
940 @section Leaving MH-E | |
941 | |
942 @cindex Emacs, quitting | |
943 @cindex quitting | |
944 @kindex C-x C-c | |
945 @kindex x | |
946 | |
947 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c} | |
948 to exit @command{emacs}. If you exited without running @kbd{x} in the | |
949 @samp{+inbox} buffer, Emacs will offer to save it for you. Type | |
950 @kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to | |
951 perform any refiles and deletes that you did there. | |
952 | |
953 @findex mh-rmail | |
954 @kindex C-x b | |
955 @kindex C-x k | |
956 @kindex M-x mh-rmail | |
957 @kindex q | |
958 | |
959 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide) | |
960 the MH-E folder or delete it entirely with @kbd{C-x k}. You can then | |
961 later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}. | |
962 | |
963 @cindex @command{packf} | |
964 @cindex MH commands, @command{packf} | |
965 @cindex exporting folders | |
966 @cindex folders, exporting | |
967 @cindex mbox-style folder | |
968 | |
969 On the other hand, if you no longer want to use MH and MH-E, you can | |
970 take your mail with you. You can copy all of your mail into a single | |
971 file, mbox-style, by using the MH command @command{packf}. For | |
972 example, to create a file called @file{msgbox} with the messages in | |
973 your @samp{+inbox} folder, use @samp{packf +inbox}. The | |
974 @command{packf} command will append the messages to the file if it | |
975 already exists, so you can use @samp{folders -recurse -fast} in a | |
976 script to copy all of your messages into a single file, or using the | |
977 @samp{-file} argument, a file for each folder. | |
978 | |
979 @node More About MH-E, , Leaving MH-E, Tour Through MH-E | |
980 @section More About MH-E | |
981 | |
982 These are the basic commands to get you going, but there are plenty | |
983 more. If you think that MH-E is for you, read the rest of the manual | |
984 to find out how you can: | |
985 | |
986 @itemize @bullet | |
987 @item | |
988 Print your messages (@pxref{Printing}). | |
989 @c ------------------------- | |
990 @item | |
991 Edit messages and include your signature (@pxref{Editing Drafts}). | |
992 @c ------------------------- | |
993 @item | |
994 Forward messages (@pxref{Forwarding}). | |
995 @c ------------------------- | |
996 @item | |
997 Read digests (@pxref{Digests}). | |
998 @c ------------------------- | |
999 @item | |
1000 Edit bounced messages (@pxref{Editing Again}). | |
1001 @c ------------------------- | |
1002 @item | |
1003 Send multimedia messages (@pxref{Adding Attachments}). | |
1004 @c ------------------------- | |
1005 @item | |
1006 Read HTML messages (@pxref{HTML}). | |
1007 @c ------------------------- | |
1008 @item | |
1009 Use aliases and identities (see @ref{Aliases}, @pxref{Identities}). | |
1010 @c ------------------------- | |
1011 @item | |
1012 Create different views of your mail (see @ref{Threading}, @pxref{Limits}). | |
1013 @c ------------------------- | |
1014 @item | |
1015 Deal with junk mail (@pxref{Junk}). | |
1016 @c ------------------------- | |
1017 @item | |
1018 Handle signed and encrypted messages (see @ref{Reading PGP}, | |
1019 @pxref{Sending PGP}). | |
1020 @c ------------------------- | |
1021 @item | |
1022 Process mail that was sent with @command{shar} or @command{uuencode} | |
1023 (@pxref{Files and Pipes}). | |
1024 @c ------------------------- | |
1025 @item | |
1026 Use sequences conveniently (@pxref{Sequences}). | |
1027 @c ------------------------- | |
1028 @item | |
1029 Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool | |
1030 Bar}, @pxref{Menu Bar}). | |
1031 @c ------------------------- | |
1032 @item | |
1033 Show header fields in different fonts (@pxref{Reading Mail}). | |
1034 @c ------------------------- | |
1035 @item | |
1036 Find previously refiled messages (@pxref{Searching}). | |
1037 @c ------------------------- | |
1038 @item | |
1039 Place messages in a file (@pxref{Files and Pipes}). | |
1040 @end itemize | |
1041 | |
1042 Remember that you can also use MH commands when you're not running | |
1043 MH-E (and when you are!). | |
1044 | |
1045 @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top | |
1046 @chapter Using This Manual | |
1047 | |
1048 This chapter begins the meat of the manual which goes into more detail | |
1049 about every MH-E command and option. | |
1050 | |
1051 @cindex Emacs, info | |
1052 @cindex Emacs, online help | |
1053 @cindex info | |
1054 @cindex online help | |
1055 @findex describe-mode | |
1056 @findex mh-help | |
1057 @kindex ? | |
1058 @kindex C-c ? | |
1059 @kindex C-h C-h | |
1060 @kindex C-h C-k i | |
1061 @kindex C-h i | |
1062 @kindex C-h m | |
1063 | |
1064 There are many commands, but don't get intimidated. There are command | |
1065 summaries at the beginning of each chapter. In case you have or would | |
1066 like to rebind the keys, the command summaries also list the | |
1067 associated Emacs Lisp function. Furthermore, even if you're stranded | |
1068 on a desert island with a laptop and are without your manuals, you can | |
1069 get a summary of all these commands with GNU Emacs online help: use | |
1070 @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands, | |
1071 @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This | |
1072 help appears in a buffer called @samp{*MH-E Help*} | |
1073 (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h | |
1074 i} to read this manual via Info. The online help is quite good; try | |
1075 running @kbd{C-h C-h}. This brings up a list of available help topics, | |
1076 one of which displays the documentation for a given key (like @kbd{C-h | |
1077 k C-n}). Another useful help feature is to view the manual section | |
1078 that describes a given key (such as @kbd{C-h K i}). In addition, | |
1079 review @ref{Conventions}, if any of the GNU Emacs conventions are | |
1080 strange to you. | |
1081 | |
1082 In addition to all of the commands, it is also possible to reconfigure | |
1083 MH-E to fit the needs of even the most demanding user. The following | |
1084 chapters also describe all of the options, show the defaults, and make | |
1085 recommendations for customization. | |
1086 | |
1087 However, when customizing your mail environment, first try to change | |
1088 what you want in MH, and only change MH-E if changing MH is not | |
1089 possible. That way you will get the same behavior inside and outside | |
1090 GNU Emacs. Note that MH-E does not provide hooks for customizations | |
1091 that can be done in MH; this omission is intentional. | |
1092 | |
1093 @cindex Emacs Lisp Manual | |
1094 @cindex Emacs, Emacs Lisp Manual | |
1095 @cindex Emacs, info | |
1096 @cindex Emacs, online help | |
1097 @cindex info | |
1098 @cindex online help | |
1099 | |
1100 I hope I've included enough examples here to get you well on your way. | |
1101 If you want to explore Emacs Lisp further, a programming manual does | |
1102 exist, | |
1103 @c Yes, some of the stuff in the following sections is redundant, but | |
1104 @c TeX barfs if the @ifs are inside the @footnote. | |
1105 @iftex | |
1106 @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available | |
1107 online in the Info system by typing @kbd{C-h i m Emacs Lisp | |
1108 @key{RET}}. It is also available online at @* | |
1109 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You | |
1110 can also order a printed manual, which has the desirable side-effect | |
1111 of helping to support the Free Software Foundation which made all this | |
1112 great software available. You can find an order form by running | |
1113 @kbd{C-h C-d}, or you can request an order form from @i{gnu at | |
1114 gnu.org}.} | |
1115 @end iftex | |
1116 @ifinfo | |
1117 @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU | |
1118 Emacs Lisp Reference Manual}, which may be available online in the | |
1119 Info system. It is also available online at | |
1120 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You | |
1121 can also order a printed manual, which has the desirable side-effect | |
1122 of helping to support the Free Software Foundation which made all this | |
1123 great software available. You can find an order form by running | |
1124 @kbd{C-h C-d}, or you can request an order form from @i{gnu at | |
1125 gnu.org}.} | |
1126 @end ifinfo | |
1127 @ifhtml | |
1128 @footnote{The | |
1129 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/, | |
1130 The GNU Emacs Lisp Reference Manual} may also be available online in | |
1131 the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can | |
1132 also order a printed manual, which has the desirable side-effect of | |
1133 helping to support the Free Software Foundation which made all this | |
1134 great software available. You can find an order form by running | |
1135 @kbd{C-h C-d}, or you can request an order form from @i{gnu at | |
1136 gnu.org}.} | |
1137 @end ifhtml | |
1138 and you can look at the code itself for examples. Look in the Emacs | |
1139 Lisp directory on your system (such as | |
1140 @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el} | |
1141 files there. When calling MH-E and other Emacs Lisp functions directly | |
1142 from Emacs Lisp code, you'll need to know the correct arguments. Use | |
1143 the online help for this. For example, try @kbd{C-h f | |
1144 mh-execute-commands @key{RET}}. If you write your own functions, | |
1145 please do not prefix your symbols (variables and functions) with | |
1146 @samp{mh-}. This prefix is reserved for the MH-E package. To avoid | |
1147 conflicts with existing MH-E symbols, use a prefix like @samp{my-} or | |
1148 your initials. (Unless, of course, your initials happen to be @emph{mh}!) | |
1149 | |
1150 @menu | |
1151 * Options:: | |
1152 * Ranges:: | |
1153 * Folder Selection:: | |
1154 @end menu | |
1155 | |
1156 @node Options, Ranges, Using This Manual, Using This Manual | |
1157 @section Options | |
1158 | |
1159 @cindex Emacs, customizing | |
1160 @cindex Emacs, setting options | |
1161 @cindex customizing MH-E | |
1162 @cindex setting options | |
1163 @findex customize-option | |
1164 @vindex mh-lpr-command-format, example | |
1165 | |
1166 Many string or integer options are easy to modify using @kbd{M-x | |
1167 customize-option}. For example, to modify the option that controls | |
1168 printing, you would run @kbd{M-x customize-option @key{RET} | |
1169 mh-lpr-command-format @key{RET}}. In the buffer that appears, modify | |
1170 the string to the right of the variable. For example, you may change | |
1171 the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then | |
1172 use the @samp{State} combo box and select @samp{Save for Future | |
1173 Sessions}. To read more about @code{mh-lpr-command-format}, see | |
1174 @ref{Printing}. | |
1175 | |
1176 @cindex nil | |
1177 @cindex off, option | |
1178 @cindex on, option | |
1179 @cindex option, turning on and off | |
1180 @cindex t | |
1181 @findex customize-option | |
1182 @vindex mh-bury-show-buffer-flag, example | |
1183 | |
1184 Options can also hold boolean values. In Emacs Lisp, the boolean | |
1185 values are @code{nil}, which means false, and @code{t}, which means | |
1186 true. The @code{customize-option} function makes it easy to change | |
1187 boolean values; simply click on the toggle button in the customize | |
1188 buffer to switch between @samp{on} (@code{t}) and @samp{off} | |
1189 (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag} | |
1190 to @samp{off} to keep the MH-Show buffer at the top of the buffer | |
1191 stack. Use the @samp{State} combo box and choose @samp{Set for Current | |
1192 Session} to see how the option affects the show buffer. Then choose | |
1193 the @samp{Erase Customization} menu item to reset the option to the | |
1194 default, which places the MH-Show buffer at the bottom of the buffer | |
1195 stack. | |
1196 | |
1197 @vindex mh-mhl-format-file, example | |
1198 | |
1199 The text usually says to turn on an option by setting it to a | |
1200 @emph{non-@code{nil}} value, because sometimes values other than | |
1201 @samp{on} are meaningful. An example of this is the variable | |
1202 @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as | |
1203 hooks, involve a little more Emacs Lisp programming expertise. | |
1204 | |
1205 @cindex customization group, @samp{mh} | |
1206 @cindex @samp{mh} customization group | |
1207 @findex customize-group | |
1208 @findex mh-customize | |
1209 | |
1210 You can browse all of the MH-E options with the @code{customize-group} | |
1211 function. Try entering @kbd{M-x customize-group @key{RET} mh | |
1212 @key{RET}} to view the top-level options as well as buttons for all of | |
1213 the MH-E customization groups. Another way to view the MH-E | |
1214 customization group is to use @kbd{M-x mh-customize @key{RET}}. | |
1215 | |
1216 @node Ranges, Folder Selection, Options, Using This Manual | |
1217 @section Ranges | |
1218 | |
1219 @c Sync with mh-folder-mode docstring. | |
1220 | |
1221 @cindex message abbreviations | |
1222 @cindex message ranges | |
1223 @cindex ranges | |
1224 | |
1225 Many commands that operate on individual messages, such as | |
1226 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE} | |
1227 argument. This argument can be used in several ways. | |
1228 | |
1229 @kindex C-u, with ranges | |
1230 | |
1231 If you provide the prefix argument @kbd{C-u} to these commands, then | |
1232 you will be prompted for the message range. This can be any valid MH | |
1233 range which can include messages, sequences (@pxref{Sequences}), and | |
1234 the abbreviations (described in the @command{mh}(1) man page): | |
1235 | |
1236 @table @samp | |
1237 @item <num1>-<num2> | |
1238 Indicates all messages in the range <num1> to <num2>, inclusive. The | |
1239 range must be nonempty. | |
1240 @c ------------------------- | |
1241 @item <num>:N | |
1242 @itemx <num>:+N | |
1243 @itemx <num>:-N | |
1244 Up to N messages beginning with (or ending with) message num. Num may | |
1245 be any of the predefined symbols: first, prev, cur, next or last. | |
1246 @c ------------------------- | |
1247 @item first:N | |
1248 @itemx prev:N | |
1249 @itemx next:N | |
1250 @itemx last:N | |
1251 The first, previous, next or last messages, if they exist. | |
1252 @c ------------------------- | |
1253 @item all | |
1254 All of the messages. | |
1255 @end table | |
1256 | |
1257 For example, a range that shows all of these things is @samp{1 2 3 | |
1258 5-10 last:5 unseen}. | |
1259 | |
1260 @vindex transient-mark-mode | |
1261 | |
1262 If the option @code{transient-mark-mode} is turned on and you set a | |
1263 region in the MH-Folder buffer, then the MH-E command will perform the | |
1264 operation on all messages in that region. | |
1265 | |
1266 @cindex @samp{mh-range} customization group | |
1267 @cindex customization group, @samp{mh-range} | |
1268 | |
1269 The @samp{mh-range} customization group contains a single option which | |
1270 affects how ranges are interpreted. | |
1271 | |
1272 @vtable @code | |
1273 @item mh-interpret-number-as-range-flag | |
1274 On means interpret a number as a range (default: @samp{on}). | |
1275 @end vtable | |
1276 | |
1277 @vindex mh-interpret-number-as-range-flag | |
1278 | |
1279 Since one of the most frequent ranges used is @samp{last:N}, MH-E will | |
1280 interpret input such as @samp{200} as @samp{last:200} if the | |
1281 @code{mh-interpret-number-as-range-flag} option is on (which is the | |
1282 default). If you need to scan just the message 200, then use the range | |
1283 @samp{200:1} or @samp{200-200}. | |
1284 | |
1285 @node Folder Selection, , Ranges, Using This Manual | |
1286 @section Folder Selection | |
1287 | |
1288 @cindex completion, folders | |
1289 @cindex folders, completion | |
1290 @cindex folders, selecting | |
1291 | |
1292 When you choose a folder in MH-E via a command such as @kbd{o} | |
1293 (@code{mh-refile-msg}), completion is used to enter the folder | |
1294 @ifnothtml | |
1295 (@pxref{Completion, , , emacs, The GNU Emacs Manual}). | |
1296 @end ifnothtml | |
1297 @ifhtml | |
1298 (see the section | |
1299 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html, | |
1300 Completion} in @cite{The GNU Emacs Manual}). | |
1301 @end ifhtml | |
1302 In addition, MH-E has several ways of choosing a suitable default so | |
1303 that the folder can often be selected with a single @key{RET} key. | |
1304 | |
1305 @cindex customization group, @samp{mh-folder-selection} | |
1306 @cindex @samp{mh-folder-selection} customization group | |
1307 | |
1308 The @samp{mh-folder-selection} customization group contains some | |
1309 options which are used to help with this. | |
1310 | |
1311 @vtable @code | |
1312 @item mh-default-folder-for-message-function | |
1313 Function to select a default folder for refiling or @samp{Fcc:} | |
1314 (default: @code{nil}). | |
1315 @c ------------------------- | |
1316 @item mh-default-folder-list | |
1317 List of addresses and folders (default: @code{nil}). | |
1318 @c ------------------------- | |
1319 @item mh-default-folder-must-exist-flag | |
1320 On means guessed folder name must exist to be used (default: | |
1321 @samp{on}). | |
1322 @c ------------------------- | |
1323 @item mh-default-folder-prefix | |
1324 Prefix used for folder names generated from aliases (default: @code{""}). | |
1325 @end vtable | |
1326 | |
1327 @vindex mh-default-folder-for-message-function | |
1328 | |
1329 You can set the option @code{mh-default-folder-for-message-function} | |
1330 to a function that provides a default folder for the message to be | |
1331 refiled. When this function is called, the current buffer contains the | |
1332 message being refiled and point is at the start of the message. This | |
1333 function should return the default folder as a string with a leading | |
1334 @samp{+} sign. It can also return @code{nil} so that the last folder | |
1335 name is used as the default, or an empty string to suppress the | |
1336 default entirely. | |
1337 | |
1338 Otherwise, the name of the destination folder is derived from the | |
1339 sender as follows: | |
1340 | |
1341 @enumerate | |
1342 @vindex mh-default-folder-list | |
1343 @item | |
1344 The folder name associated with the first address found in the list | |
1345 @code{mh-default-folder-list} is used. Each element in this list | |
1346 contains a @samp{Check Recipient} item. If this item is turned on, | |
1347 then the address is checked against the recipient instead of the | |
1348 sender. This is useful for mailing lists. | |
1349 @c ------------------------- | |
1350 @vindex mh-default-folder-prefix | |
1351 @item | |
1352 An alias prefixed by @code{mh-default-folder-prefix} corresponding to | |
1353 the address is used. The prefix is used to prevent clutter in your | |
1354 mail directory. @xref{Aliases}. | |
1355 @end enumerate | |
1356 | |
1357 @vindex mh-default-folder-must-exist-flag | |
1358 | |
1359 If the derived folder does not exist, and | |
1360 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last | |
1361 folder name used is suggested. This is useful if you get mail from | |
1362 various people for whom you have an alias, but file them all in the | |
1363 same project folder. | |
1364 | |
1365 @node Incorporating Mail, Reading Mail, Using This Manual, Top | |
1366 @chapter Incorporating Your Mail | |
1367 | |
1368 @cindex @samp{Folder} menu | |
1369 @cindex incorporating | |
1370 @cindex menu, @samp{Folder} | |
1371 | |
1372 This chapter talks about getting mail from your system mailbox into | |
1373 your MH @samp{+inbox} folder. The following command accomplishes that | |
1374 and is found in the @samp{Folder} menu. | |
1375 | |
1376 @table @kbd | |
1377 @cindex @samp{Folder > Incorporate New Mail} menu item | |
1378 @cindex menu item, @samp{Folder > Incorporate New Mail} | |
1379 @findex mh-inc-folder | |
1380 @kindex i | |
1381 @item i | |
1382 Incorporate new mail into a folder (@code{mh-inc-folder}). | |
1383 @end table | |
1384 | |
1385 @cindex @samp{mh-inc} customization group | |
1386 @cindex customization group, @samp{mh-inc} | |
1387 | |
1388 The following options in the @samp{mh-inc} customization group are | |
1389 used. | |
1390 | |
1391 @vtable @code | |
1392 @item mh-inc-prog | |
1393 Program to incorporate mail (default: @code{"inc"}). | |
1394 @c ------------------------- | |
1395 @item mh-inc-spool-list | |
1396 Alternate spool files (default: @code{nil}). | |
1397 @end vtable | |
1398 | |
1399 The following hook is available. | |
1400 | |
1401 @vtable @code | |
1402 @findex mh-inc-folder | |
1403 @item mh-inc-folder-hook | |
1404 Hook run by @code{mh-inc-folder} after incorporating mail into a | |
1405 folder (default: @code{nil}). | |
1406 @end vtable | |
1407 | |
1408 @cindex @samp{+inbox} | |
1409 @findex mh-inc-folder | |
1410 @kindex i | |
1411 | |
1412 If at any time you receive new mail, incorporate the new mail into | |
1413 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note | |
1414 that @kbd{i} will display the @samp{+inbox} buffer, even if there | |
1415 isn't any new mail. You can incorporate mail from any file into the | |
1416 current folder by specifying a prefix argument; you'll be prompted for | |
1417 the name of the file to use as well as the destination folder (for | |
1418 example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}). | |
1419 | |
1420 @cindex @file{.emacs} | |
1421 @cindex Emacs, notification of new mail | |
1422 @cindex files, @file{.emacs} | |
1423 @cindex new mail | |
1424 @cindex notification of new mail | |
1425 | |
1426 Emacs can notify you when you have new mail by displaying @samp{Mail} | |
1427 in the mode line. To enable this behavior, and to have a clock in the | |
1428 mode line as well, add the following to @file{~/.emacs}: | |
1429 | |
1430 @findex display-time | |
1431 | |
1432 @smalllisp | |
1433 (display-time) | |
1434 @end smalllisp | |
1435 | |
1436 @cindex @command{inc} | |
1437 @cindex incorporating | |
1438 @cindex MH commands, @command{inc} | |
1439 @vindex mh-inc-prog | |
1440 @vindex mh-progs | |
1441 | |
1442 The name of the program that incorporates new mail is stored in | |
1443 @code{mh-inc-prog}; it is @code{"inc"} by default. This program | |
1444 generates a one-line summary for each of the new messages. Unless it | |
1445 is an absolute pathname, the file is assumed to be in the | |
1446 @code{mh-progs} directory (@pxref{Getting Started}). You may also link | |
1447 a file to @command{inc} that uses a different format (see | |
1448 @samp{mh-profile}(5), and sections | |
1449 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
1450 prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in | |
1451 the MH book). You'll then need to modify several variables | |
1452 appropriately (@pxref{Scan Line Formats}). | |
1453 | |
1454 @vindex mh-inc-spool-list | |
1455 | |
1456 You can use the @code{mh-inc-spool-list} variable to direct MH-E to | |
1457 retrieve mail from arbitrary spool files other than your system | |
1458 mailbox, file it in folders other than your @samp{+inbox}, and assign | |
1459 key bindings to incorporate this mail. | |
1460 | |
1461 @cindex @command{procmail} | |
1462 @cindex @file{.procmailrc} | |
1463 @cindex Unix commands, @command{procmail} | |
1464 @cindex files, @file{.procmailrc} | |
1465 | |
1466 Suppose you are subscribed to the @i{mh-e-devel} mailing list and you | |
1467 use @command{procmail} to filter this mail into @file{~/mail/mh-e} | |
1468 with the following recipe in @file{.procmailrc}: | |
1469 | |
1470 @smallexample | |
1471 PATH=$PATH:/usr/bin/mh | |
1472 MAILDIR=$HOME/`mhparam Path` | |
1473 :0: | |
1474 * ^From mh-e-devel-admin@@stop.mail-abuse.org | |
1475 mh-e | |
1476 @end smallexample | |
1477 | |
1478 @findex mh-inc-spool-* | |
1479 @kindex I * | |
1480 | |
1481 In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an | |
1482 @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option, | |
1483 and click on the @samp{INS} button. Enter a @samp{Spool File} of | |
1484 @samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key | |
1485 Binding} of @samp{m}. | |
1486 | |
1487 @cindex @command{emacsclient} | |
1488 @cindex @command{gnuclient} | |
1489 @cindex @command{xbuffy} | |
1490 @cindex @samp{gnuserv} | |
1491 @cindex Unix commands, @command{emacsclient} | |
1492 @cindex Unix commands, @command{gnuclient} | |
1493 @cindex Unix commands, @command{xbuffy} | |
1494 | |
1495 You can use @command{xbuffy} to automate the incorporation of this | |
97555 | 1496 mail using the Emacs 23 command @command{emacsclient} as follows: |
84306 | 1497 |
1498 @smallexample | |
1499 box ~/mail/mh-e | |
1500 title mh-e | |
1501 origMode | |
1502 polltime 10 | |
1503 headertime 0 | |
1504 command emacsclient --eval '(mh-inc-spool-mh-e)' | |
1505 @end smallexample | |
1506 | |
1507 In XEmacs, the command @command{gnuclient} is used in a similar | |
1508 fashion. | |
1509 | |
1510 @findex mh-inc-folder | |
1511 @kindex i | |
1512 @vindex mh-inc-folder-hook | |
1513 | |
1514 You can set the hook @code{mh-inc-folder-hook}, which is called after | |
1515 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder}) | |
1516 command. A good use of this hook is to rescan the whole folder either | |
1517 after running @kbd{M-x mh-rmail} the first time or when you've changed | |
1518 the message numbers from outside of MH-E. | |
1519 | |
1520 @findex mh-execute-commands | |
1521 @findex mh-rescan-folder, example | |
1522 @findex mh-show, example | |
1523 @vindex mh-inc-folder-hook, example | |
1524 | |
1525 @smalllisp | |
1526 @group | |
1527 (defun my-mh-inc-folder-hook () | |
1528 "Hook to rescan folder after incorporating mail." | |
1529 (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,} | |
1530 (mh-execute-commands)) ; @r{carry them out} | |
1531 (mh-rescan-folder) ; @r{synchronize with +inbox} | |
1532 (mh-show)) ; @r{show the current message} | |
1533 | |
1534 (add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook) | |
1535 | |
1536 @i{Rescan folder after incorporating new mail via mh-inc-folder-hook} | |
1537 | |
1538 @end group | |
1539 @end smalllisp | |
1540 | |
1541 @node Reading Mail, Folders, Incorporating Mail, Top | |
1542 @chapter Reading Your Mail | |
1543 | |
1544 @cindex @samp{+inbox} | |
1545 @cindex MH-Folder mode | |
1546 @cindex MH-Show mode | |
1547 @cindex modes, MH-Folder | |
1548 @cindex modes, MH-Show | |
1549 @cindex reading mail | |
1550 @findex mh-rmail | |
1551 @kindex F r | |
1552 @kindex F v | |
1553 @kindex M-x mh-rmail | |
1554 | |
1555 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This | |
1556 command incorporates your mail and creates a buffer called | |
1557 @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows | |
1558 you only new mail, not mail you have already read@footnote{If you want | |
1559 to see your old mail as well, use @kbd{F r} to pull all your messages | |
1560 into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will | |
1561 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u | |
1562 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}. | |
1563 | |
1564 @findex display-time | |
1565 @vindex read-mail-command | |
1566 | |
1567 There are some commands that need to read mail, such as @kbd{Mouse-2} | |
1568 over the @samp{Mail} button that @code{display-time} adds to the mode | |
1569 line. You can configure Emacs to have these commands use MH-E by | |
1570 setting the option @code{read-mail-command} to @samp{mh-rmail}. | |
1571 | |
1572 @cindex @command{scan} | |
1573 @cindex @samp{Message} menu | |
1574 @cindex MH commands, @command{scan} | |
1575 @cindex menu, @samp{Message} | |
1576 @cindex scan lines | |
1577 | |
1578 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line | |
1579 summaries of each incorporated message. You can perform most MH | |
1580 commands on these messages via one- or two-letter commands in either | |
1581 the MH-Folder or MH-Show buffers or by using the @samp{Message} menu. | |
1582 See @command{scan}(1) for a description of the contents of the scan | |
1583 lines, and see the Figure in @ref{Reading Mail Tour}, for an example. | |
1584 | |
1585 @table @kbd | |
1586 @kindex ? | |
1587 @findex mh-help | |
1588 @item ? | |
1589 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
1590 @c ------------------------- | |
1591 @cindex @samp{Message > Show Message} menu item | |
1592 @cindex menu item, @samp{Message > Show Message} | |
1593 @kindex @key{RET} | |
1594 @findex mh-show | |
1595 @item @key{RET} | |
1596 Display message (@code{mh-show}). | |
1597 @c ------------------------- | |
1598 @cindex @samp{Message > Show Message with Header} menu item | |
1599 @cindex menu item, @samp{Message > Show Message with Header} | |
1600 @kindex , (comma) | |
1601 @findex mh-header-display | |
1602 @item , (comma) | |
1603 Display message with all header fields (@code{mh-header-display}). | |
1604 @c ------------------------- | |
97192 | 1605 @cindex @samp{Message > Show Message with Preferred Alternative} menu item |
1606 @cindex menu item, @samp{Message > Show Message with Preferred Alternative} | |
1607 @kindex : (colon) | |
1608 @findex mh-show-preferred-alternative | |
1609 @item : (colon) | |
1610 Display message with the default preferred alternative | |
1611 (@code{mh-show-preferred-alternative}). | |
1612 @c ------------------------- | |
84306 | 1613 @kindex ; (semicolon) |
1614 @findex mh-toggle-mh-decode-mime-flag | |
1615 @item ; (semicolon) | |
1616 Toggle the value of @code{mh-decode-mime-flag} | |
1617 (@code{mh-toggle-mh-decode-mime-flag}). | |
1618 @c ------------------------- | |
1619 @kindex @key{SPC} | |
1620 @findex mh-page-msg | |
1621 @item @key{SPC} | |
1622 Display next page in message (@code{mh-page-msg}). | |
1623 @c ------------------------- | |
1624 @kindex @key{BS} | |
1625 @findex mh-previous-page | |
1626 @item @key{BS} | |
1627 Display previous page in message (@code{mh-previous-page}). | |
1628 @c ------------------------- | |
1629 @cindex @samp{Message > Write Message to File...} menu item | |
1630 @cindex menu item, @samp{Message > Write Message to File...} | |
1631 @kindex > | |
1632 @findex mh-write-msg-to-file | |
1633 @item > | |
1634 Append message to end of file (@code{mh-write-msg-to-file}). | |
1635 @c ------------------------- | |
1636 @cindex @samp{Message > Pipe Message to Command...} menu item | |
1637 @cindex menu item, @samp{Message > Pipe Message to Command...} | |
1638 @kindex | | |
1639 @findex mh-pipe-msg | |
1640 @item | | |
1641 Pipe message through shell command (@code{mh-pipe-msg}). | |
1642 @c ------------------------- | |
1643 @kindex C-d | |
1644 @findex mh-delete-msg-no-motion | |
1645 @item C-d | |
1646 Delete range, don't move to next message | |
1647 (@code{mh-delete-msg-no-motion}). | |
1648 @c ------------------------- | |
1649 @cindex @samp{Message > Delete Message} menu item | |
1650 @cindex menu item, @samp{Message > Delete Message} | |
1651 @kindex d | |
1652 @findex mh-delete-msg | |
1653 @item d | |
1654 Delete range (@code{mh-delete-msg}). | |
1655 @c ------------------------- | |
1656 @kindex D ? | |
1657 @findex mh-prefix-help | |
1658 @item D ? | |
1659 Display cheat sheet for the commands of the current prefix in | |
1660 minibuffer (@code{mh-prefix-help}). | |
1661 @c ------------------------- | |
1662 @kindex D @key{SPC} | |
1663 @findex mh-page-digest | |
1664 @item D @key{SPC} | |
1665 Display next message in digest (@code{mh-page-digest}). | |
1666 @c ------------------------- | |
1667 @kindex D @key{BS} | |
1668 @findex mh-page-digest-backwards | |
1669 @item D @key{BS} | |
1670 Display previous message in digest (@code{mh-page-digest-backwards}). | |
1671 @c ------------------------- | |
1672 @cindex @samp{Message > Burst Digest Message} menu item | |
1673 @cindex menu item, @samp{Message > Burst Digest Message} | |
1674 @kindex D b | |
1675 @findex mh-burst-digest | |
1676 @item D b | |
1677 Break up digest into separate messages (@code{mh-burst-digest}). | |
1678 @c ------------------------- | |
1679 @cindex @samp{Message > Go to Message by Number...} menu item | |
1680 @cindex menu item, @samp{Message > Go to Message by Number...} | |
1681 @kindex g | |
1682 @findex mh-goto-msg | |
1683 @item g | |
1684 Go to a message (@code{mh-goto-msg}). | |
1685 @c ------------------------- | |
1686 @kindex k | |
1687 @findex mh-delete-subject-or-thread | |
1688 @item k | |
1689 Delete messages with same subject or thread | |
1690 (@code{mh-delete-subject-or-thread}). | |
1691 @c ------------------------- | |
1692 @kindex K ? | |
1693 @findex mh-prefix-help | |
1694 @item K ? | |
1695 Display cheat sheet for the commands of the current prefix in | |
1696 minibuffer (@code{mh-prefix-help}). | |
1697 @c ------------------------- | |
1698 @kindex K @key{TAB} | |
1699 @findex mh-next-button | |
1700 @item K @key{TAB} | |
1701 Go to the next button (@code{mh-next-button}). | |
1702 @c ------------------------- | |
1703 @kindex K S-@key{TAB} | |
1704 @findex mh-prev-button | |
1705 @item K S-@key{TAB} | |
1706 Go to the previous button (@code{mh-prev-button}). | |
1707 @c ------------------------- | |
1708 @kindex K a | |
1709 @findex mh-mime-save-parts | |
1710 @item K a | |
1711 Save attachments (@code{mh-mime-save-parts}). | |
1712 @c ------------------------- | |
1713 @kindex K e | |
1714 @findex mh-display-with-external-viewer | |
1715 @item K e | |
1716 View attachment externally (@code{mh-display-with-external-viewer}). | |
1717 @c ------------------------- | |
1718 @kindex K i | |
1719 @findex mh-folder-inline-mime-part | |
1720 @item K i | |
1721 Show attachment verbatim (@code{mh-folder-inline-mime-part}). | |
1722 @c ------------------------- | |
1723 @kindex K o | |
1724 @findex mh-folder-save-mime-part | |
1725 @item K o | |
1726 Save (output) attachment (@code{mh-folder-save-mime-part}). | |
1727 @c ------------------------- | |
1728 @kindex K t | |
1729 @findex mh-toggle-mime-buttons | |
1730 @item K t | |
1731 Toggle option @code{mh-display-buttons-for-inline-parts-flag} | |
1732 (@code{mh-toggle-mime-buttons}). | |
1733 @c ------------------------- | |
1734 @kindex K v | |
1735 @findex mh-folder-toggle-mime-part | |
1736 @item K v | |
1737 View attachment (@code{mh-folder-toggle-mime-part}). | |
1738 @c ------------------------- | |
1739 @cindex @samp{Message > Modify Message} menu item | |
1740 @cindex menu item, @samp{Message > Modify Message} | |
1741 @kindex M | |
1742 @findex mh-modify | |
1743 @item M | |
1744 Edit message (@code{mh-modify}). | |
1745 @c ------------------------- | |
1746 @cindex @samp{Message > Go to First Message} menu item | |
1747 @cindex menu item, @samp{Message > Go to First Message} | |
1748 @kindex M-< | |
1749 @findex mh-first-msg | |
1750 @item M-< | |
1751 Display first message (@code{mh-first-msg}). | |
1752 @c ------------------------- | |
1753 @cindex @samp{Message > Go to Last Message} menu item | |
1754 @cindex menu item, @samp{Message > Go to Last Message} | |
1755 @kindex M-> | |
1756 @findex mh-last-msg | |
1757 @item M-> | |
1758 Display last message (@code{mh-last-msg}). | |
1759 @c ------------------------- | |
1760 @kindex M-n | |
1761 @findex mh-next-unread-msg | |
1762 @item M-n | |
1763 Display next unread message (@code{mh-next-unread-msg}). | |
1764 @c ------------------------- | |
1765 @kindex M-p | |
1766 @findex mh-previous-unread-msg | |
1767 @item M-p | |
1768 Display previous unread message (@code{mh-previous-unread-msg}). | |
1769 @c ------------------------- | |
1770 @cindex @samp{Message > Next Message} menu item | |
1771 @cindex menu item, @samp{Message > Next Message} | |
1772 @kindex n | |
1773 @findex mh-next-undeleted-msg | |
1774 @item n | |
1775 Display next message (@code{mh-next-undeleted-msg}). | |
1776 @c ------------------------- | |
1777 @cindex @samp{Message > Previous Message} menu item | |
1778 @cindex menu item, @samp{Message > Previous Message} | |
1779 @kindex p | |
1780 @findex mh-previous-undeleted-msg | |
1781 @item p | |
1782 Display previous message (@code{mh-previous-undeleted-msg}). | |
1783 @c ------------------------- | |
1784 @kindex P ? | |
1785 @findex mh-prefix-help | |
1786 @item P ? | |
1787 Display cheat sheet for the commands of the current prefix in | |
1788 minibuffer (@code{mh-prefix-help}). | |
1789 @c ------------------------- | |
1790 @kindex P C | |
1791 @findex mh-ps-print-toggle-color | |
1792 @item P C | |
1793 Toggle whether color is used in printing messages | |
1794 (@code{mh-ps-print-toggle-color}). | |
1795 @c ------------------------- | |
1796 @kindex P F | |
1797 @findex mh-ps-print-toggle-faces | |
1798 @item P F | |
1799 Toggle whether printing is done with faces or not | |
1800 (@code{mh-ps-print-toggle-faces}). | |
1801 @c ------------------------- | |
1802 @kindex P f | |
1803 @findex mh-ps-print-msg-file | |
1804 @item P f | |
1805 Print range to file (@code{mh-ps-print-msg-file}). | |
1806 @c ------------------------- | |
1807 @cindex @samp{Message > Print Message} menu item | |
1808 @cindex menu item, @samp{Message > Print Message} | |
1809 @kindex P l | |
1810 @findex mh-print-msg | |
1811 @item P l | |
1812 Print range the old fashioned way | |
1813 (@code{mh-print-msg}). | |
1814 @c ------------------------- | |
1815 @kindex P p | |
1816 @findex mh-ps-print-msg | |
1817 @item P p | |
1818 Print range (@code{mh-ps-print-msg}). | |
1819 @c ------------------------- | |
1820 @kindex X ? | |
1821 @findex mh-prefix-help | |
1822 @item X ? | |
1823 Display cheat sheet for the commands of the current prefix in | |
1824 minibuffer (@code{mh-prefix-help}). | |
1825 @c ------------------------- | |
1826 @cindex @samp{Message > Unpack Uuencoded Message...} menu item | |
1827 @cindex menu item, @samp{Message > Unpack Uuencoded Message...} | |
1828 @kindex X s | |
1829 @kindex X u | |
1830 @findex mh-store-msg | |
1831 @item X s | |
1832 @itemx X u | |
1833 Unpack message created with @command{uudecode} or @command{shar} | |
1834 (@code{mh-store-msg}). | |
1835 @c ------------------------- | |
1836 @kindex Mouse-2 | |
1837 @findex mh-show-mouse | |
1838 @item Mouse-2 | |
1839 Move point to mouse event and show message (@code{mh-show-mouse}). | |
1840 @end table | |
1841 | |
1842 Within the MH-Show buffer, the following command is defined. | |
1843 | |
1844 @table @kbd | |
1845 @kindex @key{RET} | |
1846 @kindex Mouse-1 | |
1847 @kindex Mouse-2 | |
1848 @findex mh-press-button | |
1849 @item @key{RET} | |
1850 @itemx Mouse-1 | |
1851 @itemx Mouse-2 | |
1852 View contents of button (@code{mh-press-button}). | |
1853 @end table | |
1854 | |
1855 @cindex @samp{mh-show} customization group | |
1856 @cindex customization group, @samp{mh-show} | |
1857 | |
1858 The following table lists options in the @samp{mh-show} customization | |
1859 group that are used while reading mail. | |
1860 | |
1861 @vtable @code | |
1862 @item mh-bury-show-buffer-flag | |
1863 On means show buffer is buried (default: @samp{on}). | |
1864 @c ------------------------- | |
1865 @item mh-clean-message-header-flag | |
1866 On means remove extraneous header fields (default: @samp{on}). | |
1867 @c ------------------------- | |
1868 @item mh-decode-mime-flag | |
1869 On means attachments are handled (default: @samp{on} if the Gnus | |
1870 @samp{mm-decode} package is present). | |
1871 @c ------------------------- | |
1872 @item mh-display-buttons-for-alternatives-flag | |
1873 On means display buttons for all alternative attachments (default: | |
1874 @samp{off}). | |
1875 @c ------------------------- | |
1876 @item mh-display-buttons-for-inline-parts-flag | |
1877 On means display buttons for all inline attachments (default: | |
1878 @samp{off}). | |
1879 @c ------------------------- | |
1880 @item mh-do-not-confirm-flag | |
1881 On means non-reversible commands do not prompt for confirmation | |
1882 (default: @samp{off}). | |
1883 @c ------------------------- | |
1884 @item mh-fetch-x-image-url | |
1885 Control fetching of @samp{X-Image-URL:} header field image (default: | |
1886 @samp{Never Fetch}). | |
1887 @c ------------------------- | |
1888 @item mh-graphical-smileys-flag | |
1889 On means graphical smileys are displayed (default: @samp{on}). | |
1890 @c ------------------------- | |
1891 @item mh-graphical-emphasis-flag | |
1892 On means graphical emphasis is displayed (default: @samp{on}). | |
1893 @c ------------------------- | |
1894 @item mh-highlight-citation-style | |
1895 Style for highlighting citations (default: @samp{Multicolor}). | |
1896 @c ------------------------- | |
1897 @item mh-invisible-header-fields-default | |
1898 List of hidden header fields (default: a checklist too long to list | |
1899 here). | |
1900 @c ------------------------- | |
1901 @item mh-invisible-header-fields | |
1902 Additional header fields to hide (default: @code{nil}). | |
1903 @c ------------------------- | |
1904 @item mh-lpr-command-format | |
1905 Command used to print (default: @code{"lpr -J '%s'"}). | |
1906 @c ------------------------- | |
1907 @item mh-max-inline-image-height | |
1908 Maximum inline image height if @samp{Content-Disposition:} is not | |
1909 present (default: 0). | |
1910 @c ------------------------- | |
1911 @item mh-max-inline-image-width | |
1912 Maximum inline image width if @samp{Content-Disposition:} is not | |
1913 present(default: 0). | |
1914 @c ------------------------- | |
1915 @item mh-mhl-format-file | |
1916 Specifies the format file to pass to the @command{mhl} program | |
1917 (default: @samp{Use Default mhl Format (Printing Only)}). | |
1918 @c ------------------------- | |
1919 @item mh-mime-save-parts-default-directory | |
1920 Default directory to use for @kbd{K a}. | |
1921 @c ------------------------- | |
1922 @item mh-print-background-flag | |
1923 On means messages should be printed in the background (default: | |
1924 @samp{off}). | |
1925 @c ------------------------- | |
1926 @item mh-show-buffer-mode-line-buffer-id | |
1927 Format string to produce @code{mode-line-buffer-identification} for | |
1928 show buffers (default: @code{" @{show-%s@} %d"}). | |
1929 @c ------------------------- | |
1930 @item mh-show-maximum-size | |
1931 Maximum size of message (in bytes) to display automatically (default: | |
1932 0). | |
1933 @c ------------------------- | |
1934 @item mh-show-use-xface-flag | |
1935 On means display face images in MH-Show buffers (default: @samp{on}). | |
1936 @c ------------------------- | |
1937 @item mh-store-default-directory | |
1938 Default directory for @kbd{X s} (default: @samp{Current}). | |
1939 @c ------------------------- | |
1940 @item mh-summary-height | |
1941 Number of lines in MH-Folder buffer (including the mode line) | |
1942 (default: depends on size of frame). | |
1943 @end vtable | |
1944 | |
1945 The following hooks are available. | |
1946 | |
1947 @vtable @code | |
1948 @item mh-delete-msg-hook | |
1949 Hook run after marking each message for deletion (default: @code{nil}). | |
1950 @c ------------------------- | |
1951 @item mh-show-hook | |
1952 Hook run after @key{RET} shows a message (default: @code{nil}). | |
1953 @c ------------------------- | |
1954 @item mh-show-mode-hook | |
1955 Hook run upon entry to @code{mh-show-mode} (default: @code{nil}). | |
1956 @end vtable | |
1957 | |
1958 The following faces are available. | |
1959 | |
1960 @vtable @code | |
1961 @item mh-show-cc | |
1962 Face used to highlight @samp{cc:} header fields. | |
1963 @c ------------------------- | |
1964 @item mh-show-date | |
1965 Face used to highlight @samp{Date:} header fields. | |
1966 @c ------------------------- | |
1967 @item mh-show-from | |
1968 Face used to highlight @samp{From:} header fields. | |
1969 @c ------------------------- | |
1970 @item mh-show-header | |
1971 Face used to deemphasize less interesting header fields. | |
1972 @c ------------------------- | |
1973 @item mh-show-pgg-bad | |
1974 Bad PGG signature face. | |
1975 @c ------------------------- | |
1976 @item mh-show-pgg-good | |
1977 Good PGG signature face. | |
1978 @c ------------------------- | |
1979 @item mh-show-pgg-unknown | |
1980 Unknown or untrusted PGG signature face. | |
1981 @c ------------------------- | |
1982 @item mh-show-signature | |
1983 Signature face. | |
1984 @c ------------------------- | |
1985 @item mh-show-subject | |
1986 Face used to highlight @samp{Subject:} header fields. | |
1987 @c ------------------------- | |
1988 @item mh-show-to | |
1989 Face used to highlight @samp{To:} header fields. | |
1990 @c ------------------------- | |
1991 @item mh-show-xface | |
1992 X-Face image face. | |
1993 @end vtable | |
1994 | |
1995 The functions and variables introduced here are explained in more | |
1996 detail in the following sections. | |
1997 | |
1998 @menu | |
1999 * Viewing:: | |
2000 * Viewing Attachments:: | |
2001 * HTML:: | |
2002 * Digests:: | |
2003 * Reading PGP:: | |
2004 * Printing:: | |
2005 * Files and Pipes:: | |
2006 * Navigating:: | |
2007 * Miscellaneous Commands and Options:: | |
2008 @end menu | |
2009 | |
2010 @node Viewing, Viewing Attachments, Reading Mail, Reading Mail | |
2011 @section Viewing Your Mail | |
2012 | |
2013 @findex mh-header-display | |
2014 @findex mh-page-msg | |
2015 @findex mh-previous-page | |
2016 @findex mh-show | |
2017 @findex mh-show-mouse | |
2018 @kindex , (comma) | |
2019 @kindex . (period) | |
2020 @kindex @key{BS} | |
2021 @kindex @key{RET} | |
2022 @kindex @key{SPC} | |
2023 @kindex Mouse-2 | |
2024 | |
2025 The command @key{RET} (@code{mh-show}) displays the message that the | |
2026 cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the | |
2027 message that the mouse cursor is on. If the message is already | |
2028 displayed, it scrolls to the beginning of the message. Use @key{SPC} | |
2029 (@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move | |
2030 forwards and backwards one page at a time through the message. You can | |
2031 give either of these commands a prefix argument that specifies the | |
2032 number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC} | |
2033 command will also show the next undeleted message if it is used at the | |
2034 bottom of a message. MH-E normally hides a lot of the superfluous | |
2035 header fields that mailers add to a message, but if you wish to see | |
2036 all of them, use the command @kbd{,} (comma; | |
2037 @code{mh-header-display}). | |
2038 | |
2039 @vindex mh-show-maximum-size | |
2040 | |
2041 The option @code{mh-show-maximum-size} provides an opportunity to skip | |
2042 over large messages which may be slow to load. The default value of 0 | |
2043 means that all message are shown regardless of size. | |
2044 | |
2045 A litany of options control what displayed messages look like. | |
2046 | |
2047 @vindex mh-show-cc | |
2048 @vindex mh-show-date | |
2049 @vindex mh-show-from | |
2050 @vindex mh-show-header | |
2051 @vindex mh-show-subject | |
2052 @vindex mh-show-to | |
2053 | |
2054 First, the appearance of the header fields can be modified by | |
2055 customizing the associated face: @code{mh-show-to}, @code{mh-show-cc}, | |
2056 @code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}. | |
2057 The face @code{mh-show-header} is used to deemphasize the other, less | |
2058 interesting, header fields. | |
2059 | |
2060 @cindex regular expressions, @code{mh-invisible-header-fields} | |
2061 @vindex mh-clean-message-header-flag | |
2062 @vindex mh-invisible-header-fields | |
2063 @vindex mh-invisible-header-fields-default | |
2064 | |
2065 Normally messages are delivered with a handful of uninteresting header | |
2066 fields. These are hidden by turning on the option | |
2067 @code{mh-clean-message-header-flag} (which it is by default). The | |
2068 header fields listed in the option | |
2069 @code{mh-invisible-header-fields-default} are hidden, although you can | |
2070 check off any field that you would like to see. Header fields that you | |
2071 would like to hide that aren't listed can be added to the option | |
2072 @code{mh-invisible-header-fields} with a couple of caveats. Regular | |
2073 expressions are not allowed. Unique fields should have a @samp{:} | |
2074 suffix; otherwise, the element can be used to render invisible an | |
2075 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
|
2076 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
|
2077 @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
|
2078 SF #1916032}. |
84306 | 2079 |
2080 @cindex header field, @samp{Face:} | |
2081 @cindex header field, @samp{X-Face:} | |
2082 @cindex header field, @samp{X-Image-URL:} | |
2083 @cindex @samp{Face:} header field | |
2084 @cindex @samp{X-Face:} header field | |
2085 @cindex @samp{X-Image-URL:} header field | |
2086 @vindex mh-show-use-xface-flag | |
2087 | |
2088 MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and | |
2089 @samp{X-Image-URL:} header fields. If any of these fields occur in the | |
2090 header of your message, the sender's face will appear in the | |
2091 @samp{From:} header field. If more than one of these fields appear, | |
2092 then the first field found in the order @samp{Face:}, @samp{X-Face:}, | |
2093 and @samp{X-Image-URL:} will be used. The option | |
2094 @code{mh-show-use-xface-flag} is used to turn this feature on and off. | |
2095 This feature will be turned on by default if your system supports it. | |
2096 | |
2097 The first header field used, if present, is the Gnus-specific | |
2098 @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU | |
2099 Emacs 21 and XEmacs. For more information, see | |
2100 @uref{http://quimby.gnus.org/circus/face/}.}. | |
2101 | |
2102 @cindex @command{uncompface} | |
2103 @cindex Emacs, packages, x-face | |
2104 @cindex Unix commands, @command{uncompface} | |
2105 @cindex x-face package | |
2106 @vindex mh-show-xface | |
2107 | |
2108 Next is the traditional @samp{X-Face:} header field@footnote{The | |
2109 display of this field requires the | |
2110 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, | |
2111 @command{uncompface} program}. Recent versions of XEmacs have internal | |
2112 support for @samp{X-Face:} images. If your version of XEmacs does not, | |
2113 then you'll need both @command{uncompface} and the | |
2114 @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E | |
2115 renders the foreground and background of the image using the | |
2116 associated attributes of the face @code{mh-show-xface}. | |
2117 | |
2118 @cindex @command{convert} | |
2119 @cindex @command{wget} | |
2120 @cindex ImageMagick | |
2121 @cindex Unix commands, @command{convert} | |
2122 @cindex Unix commands, @command{wget} | |
2123 @vindex mh-fetch-x-image-url | |
2124 | |
2125 Finally, MH-E will display images referenced by the | |
2126 @samp{X-Image-URL:} header field if neither the @samp{Face:} nor the | |
2127 @samp{X-Face:} fields are present@footnote{The display of the images | |
2128 requires the @uref{http://www.gnu.org/software/wget/wget.html, | |
2129 @command{wget} program} to fetch the image and the @command{convert} | |
2130 program from the @uref{http://www.imagemagick.org/, ImageMagick | |
2131 suite}.}. Of the three header fields this is the most efficient in | |
2132 terms of network usage since the image doesn't need to be transmitted | |
2133 with every single mail. The option @code{mh-fetch-x-image-url} | |
2134 controls the fetching of the @samp{X-Image-URL:} header field image | |
2135 with the following values: | |
2136 | |
2137 @table @samp | |
2138 @item Ask Before Fetching | |
2139 You are prompted before the image is fetched. MH-E will remember your | |
2140 reply and will either use the already fetched image the next time the | |
2141 same URL is encountered or silently skip it if you didn't fetch it the | |
2142 first time. This is a good setting. | |
2143 @c ------------------------- | |
2144 @item Never Fetch | |
2145 Images are never fetched and only displayed if they are already | |
2146 present in the cache. This is the default. | |
2147 @end table | |
2148 | |
2149 There isn't a value of @samp{Always Fetch} for privacy and DOS (denial | |
2150 of service) reasons. For example, fetching a URL can tip off a spammer | |
2151 that you've read his email (which is why you shouldn't blindly answer | |
2152 yes if you've set this option to @samp{Ask Before Fetching}). Someone | |
2153 may also flood your network and fill your disk drive by sending a | |
2154 torrent of messages, each specifying a unique URL to a very large | |
2155 file. | |
2156 | |
2157 @cindex @file{.mhe-x-image-cache} | |
2158 @cindex files, @file{.mhe-x-image-cache} | |
2159 | |
2160 The cache of images is found in the directory | |
2161 @file{.mhe-x-image-cache} within your MH directory. You can add your | |
2162 own face to the @samp{From:} field too. @xref{Picture}. | |
2163 | |
2164 @cindex @command{mhl} | |
2165 @cindex MH commands, @command{mhl} | |
2166 @vindex mh-mhl-format-file | |
2167 | |
2168 Normally MH-E takes care of displaying messages itself (rather than | |
2169 calling an MH program to do the work). If you'd rather have | |
2170 @command{mhl} display the message (within MH-E), change the option | |
2171 @code{mh-mhl-format-file} from its default value of @samp{Use Default | |
2172 mhl Format (Printing Only)}. You can set this option to @samp{Use | |
2173 Default mhl Format} to get the same output as you would get if you ran | |
2174 @command{mhl} from the shell. If you have a format file that you want | |
2175 MH-E to use, you can set this option to @samp{Specify an mhl Format | |
2176 File} and enter the name of your format file (@command{mhl}(1) or | |
2177 section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in | |
2178 the MH book tells you how to write one). Your format file should | |
2179 specify a non-zero value for @samp{overflowoffset} to allow MH-E to | |
2180 parse the header. Note that @command{mhl} is always used for printing | |
2181 and forwarding; in this case, the value of @code{mh-mhl-format-file} | |
2182 is consulted if you have specified a format file. | |
2183 | |
2184 @cindex citations, highlighting | |
2185 @cindex highlighting citations | |
2186 @vindex mh-highlight-citation-style | |
2187 | |
2188 If the sender of the message has cited other messages in his message, | |
2189 then MH-E will highlight these citations to emphasize the sender's | |
2190 actual response. The option @code{mh-highlight-citation-style} can be | |
2191 customized to change the highlighting style. The @samp{Multicolor} | |
2192 method uses a different color for each indentation while the | |
2193 @samp{Monotone} method highlights all citations in red. To disable | |
2194 highlighting of citations entirely, choose @samp{None}. | |
2195 | |
2196 @cindex URLs, highlighting | |
2197 @cindex email addresses, highlighting | |
2198 @cindex highlighting URLs | |
2199 @cindex highlighting email addresses | |
2200 @cindex links, following | |
2201 @findex goto-address-at-point | |
2202 @kindex C-c @key{RET} | |
2203 @kindex Mouse-2 | |
2204 @vindex goto-address-highlight-p | |
2205 | |
2206 Email addresses and URLs in the message are highlighted if the option | |
2207 @code{goto-address-highlight-p} is on, which it is by default. To view | |
2208 the web page for a highlighted URL or to send a message using a | |
2209 highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}} | |
2210 (@code{goto-address-at-point}). @xref{Sending Mail}, to see how to | |
2211 configure Emacs to send the message using MH-E. | |
2212 | |
2213 @cindex boldface, showing | |
2214 @cindex emphasis | |
2215 @cindex italics, showing | |
2216 @cindex smileys | |
2217 @cindex typesetting | |
2218 @cindex underline, showing | |
2219 @vindex gnus-emphasis-alist | |
2220 @vindex mh-decode-mime-flag | |
2221 @vindex mh-graphical-emphasis-flag | |
2222 @vindex mh-graphical-smileys-flag | |
2223 | |
2224 It is a long standing custom to inject body language using a | |
2225 cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can | |
2226 render these as graphical widgets if the option | |
2227 @code{mh-graphical-smileys-flag} is turned on, which it is by default. | |
2228 Smileys include patterns such as :-) and ;-). Similarly, a few | |
2229 typesetting features are indicated in ASCII text with certain | |
2230 characters. If your terminal supports it, MH-E can render these | |
2231 typesetting directives naturally if the option | |
2232 @code{mh-graphical-emphasis-flag} is turned on, which it is by | |
2233 default. For example, _underline_ will be | |
2234 @ifhtml | |
2235 @html | |
2236 <u>underlined</u>, | |
2237 @end html | |
2238 @end ifhtml | |
2239 @ifnothtml | |
2240 underlined, | |
2241 @end ifnothtml | |
2242 *bold* will appear in @b{bold}, /italics/ will appear in @i{italics}, | |
2243 and so on. See the option @code{gnus-emphasis-alist} for the whole | |
2244 list. Both of these options are disabled if the option | |
2245 @code{mh-decode-mime-flag} is turned off. @xref{Viewing Attachments}. | |
2246 | |
2247 @cindex signature separator | |
2248 @cindex vCard | |
2249 @vindex mh-show-signature | |
2250 | |
2251 MH-E normally renders signatures and vCards in italics so that the | |
2252 body of the message stands out more. MH-E depends on the presence of | |
2253 the @dfn{signature separator} (@code{"-- "}) to do this. You can also | |
2254 customize the face @code{mh-show-signature} so the appearance of the | |
2255 signature block is more to your liking. | |
2256 | |
2257 @vindex mh-show-hook | |
2258 @vindex mh-show-mode-hook | |
2259 | |
2260 Two hooks can be used to control how messages are displayed. The first | |
2261 hook, @code{mh-show-mode-hook}, is called early on in the process of | |
2262 the message display. It is usually used to perform some action on the | |
2263 message's content. The second hook, @code{mh-show-hook}, is the last | |
2264 thing called after messages are displayed. It's used to affect the | |
2265 behavior of MH-E in general or when @code{mh-show-mode-hook} is too | |
2266 early. | |
2267 | |
2268 @cindex MH-Show mode | |
2269 @cindex modes, MH-Show | |
2270 @vindex mh-show-buffer-mode-line-buffer-id | |
2271 | |
2272 For those who like to modify their mode lines, use | |
2273 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in | |
2274 the MH-Show buffers. Place the two escape strings @samp{%s} and | |
2275 @samp{%d}, which will display the folder name and the message number, | |
2276 respectively, somewhere in the string in that order. The default value | |
2277 of @code{"@{show-%s@} %d"} yields a mode line of | |
2278 | |
2279 @smallexample | |
2280 -----@{show-+inbox@} 4 (MH-Show)--Bot-------------------------------- | |
2281 @end smallexample | |
2282 | |
2283 @node Viewing Attachments, HTML, Viewing, Reading Mail | |
2284 @section Viewing Attachments | |
2285 | |
2286 @cindex attachments | |
2287 @cindex body parts | |
2288 @cindex @command{mhshow} | |
2289 @cindex @command{show} | |
2290 @cindex MH commands, @command{mhshow} | |
2291 @cindex MH commands, @command{show} | |
2292 @cindex MIME | |
2293 @cindex multimedia mail | |
2294 | |
2295 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet | |
2296 Mail Extensions) messages which are simply messages with additional | |
2297 @dfn{body parts} or @dfn{attachments}. You can use the MH commands | |
2298 @command{show}@footnote{See the section | |
2299 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
2300 prev} in the MH book.} or @command{mhshow}@footnote{See the section | |
2301 @uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in | |
2302 the MH book.} from the shell to read @sc{mime} messages@footnote{You | |
2303 can call them directly from Emacs if you're running the X Window | |
2304 System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can | |
2305 leave out the @samp{xterm -e} if you use @command{mhlist} or | |
2306 @command{mhstore}.}. | |
2307 | |
2308 @cindex Emacs, packages, mm-decode | |
2309 @cindex mm-decode package | |
2310 @findex mh-toggle-mh-decode-mime-flag | |
2311 @kindex ; (semicolon) | |
2312 @vindex mh-decode-mime-flag | |
2313 | |
2314 MH-E can handle attachments as well if the Gnus @samp{mm-decode} | |
2315 package is present. If so, the option @code{mh-decode-mime-flag} will | |
2316 be on. Otherwise, you'll see the @sc{mime} body parts rather than text | |
2317 or attachments. There isn't much point in turning off the option | |
2318 @code{mh-decode-mime-flag}; however, you can inspect it if it appears | |
2319 that the body parts are not being interpreted correctly or toggle it | |
2320 with the command @kbd{;} (semicolon; | |
2321 @code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This | |
2322 option also controls the display of quoted-printable messages and | |
2323 other graphical widgets. @xref{Viewing}. | |
2324 | |
2325 @cindex buttons | |
2326 | |
2327 Attachments in MH-E are indicated by @dfn{buttons} like this: | |
2328 | |
2329 @smallexample | |
2330 [1. image/jpeg; foo.jpg]... | |
2331 @end smallexample | |
2332 | |
2333 @findex mh-next-button | |
2334 @findex mh-press-button | |
2335 @findex mh-prev-button | |
2336 @kindex @key{RET} | |
2337 @kindex K @key{TAB} | |
2338 @kindex K S-@key{TAB} | |
2339 @kindex Mouse-1 | |
2340 @kindex Mouse-2 | |
2341 | |
2342 To view the contents of the button, use either @kbd{Mouse-1} or | |
2343 @kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when | |
2344 the cursor is over the button. This command is a toggle so if you use | |
2345 it again on the same attachment, it is hidden. If Emacs does not know | |
2346 how to display the attachment, then Emacs offers to save the | |
2347 attachment in a file. To move the cursor to the next button, use the | |
2348 command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the | |
2349 buffer is reached then the search wraps over to the start of the | |
2350 buffer. To move the cursor to the previous button, use the command | |
2351 @kbd{K S-@key{TAB}} (@code{mh-prev-button}). If the beginning of the | |
2352 buffer is reached then the search wraps over to the end of the buffer. | |
2353 | |
2354 @cindex attachments, viewing | |
2355 @cindex viewing attachments | |
2356 @findex mh-folder-toggle-mime-part | |
2357 @kindex K v | |
2358 | |
2359 Another way to view the contents of a button is to use the command | |
2360 @kbd{K v} (@code{mh-folder-toggle-mime-part}). This command displays | |
2361 (or hides) the attachment associated with the button under the cursor. | |
2362 If the cursor is not located over a button, then the cursor first | |
2363 moves to the next button, wrapping to the beginning of the message if | |
2364 necessary. This command has the advantage over the previous commands | |
2365 of working from the MH-Folder buffer. You can also provide a numeric | |
2366 prefix argument (as in @kbd{4 K v}) to view the attachment labeled | |
2367 with that number. If Emacs does not know how to display the | |
2368 attachment, then Emacs offers to save the attachment in a file. | |
2369 | |
2370 @cindex @file{/etc/mailcap} | |
2371 @cindex files, @file{/etc/mailcap} | |
2372 @findex mailcap-mime-info | |
2373 @findex mh-display-with-external-viewer | |
2374 @kindex K e | |
2375 | |
2376 If Emacs does not know how to view an attachment, you could save it | |
2377 into a file and then run some program to open it. It is easier, | |
2378 however, to launch the program directly from MH-E with the command | |
2379 @kbd{K e} (@code{mh-display-with-external-viewer}). While you'll most | |
2380 likely use this to view spreadsheets and documents, it is also useful | |
2381 to use your browser to view HTML attachments with higher fidelity than | |
2382 what Emacs can provide. This command displays the attachment | |
2383 associated with the button under the cursor. If the cursor is not | |
2384 located over a button, then the cursor first moves to the next button, | |
2385 wrapping to the beginning of the message if necessary. You can provide | |
2386 a numeric prefix argument (as in @kbd{4 K e}) to view the attachment | |
2387 labeled with that number. This command tries to provide a reasonable | |
2388 default for the viewer by calling the Emacs function | |
2389 @code{mailcap-mime-info}. This function usually reads the file | |
2390 @file{/etc/mailcap}. | |
2391 | |
2392 @cindex attachments, saving | |
2393 @cindex saving attachments | |
2394 @findex mh-folder-save-mime-part | |
2395 @kindex K o | |
2396 | |
2397 Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save | |
2398 attachments (the mnemonic is ``output''). This command saves the | |
2399 attachment associated with the button under the cursor. If the cursor | |
2400 is not located over a button, then the cursor first moves to the next | |
2401 button, wrapping to the beginning of the message if necessary. You can | |
2402 also provide a numeric prefix argument (as in @kbd{3 K o}) to save the | |
2403 attachment labeled with that number. This command prompts you for a | |
2404 filename and suggests a specific name if it is available. | |
2405 | |
2406 @cindex @command{mhn} | |
2407 @cindex @command{mhstore} | |
2408 @cindex MH commands, @command{mhn} | |
2409 @cindex MH commands, @command{mhstore} | |
2410 @findex mh-mime-save-parts | |
2411 @kindex K a | |
2412 @vindex mh-mime-save-parts-default-directory | |
2413 | |
2414 You can save all of the attachments at once with the command @kbd{K a} | |
2415 (@code{mh-mime-save-parts}). The attachments are saved in the | |
2416 directory specified by the option | |
2417 @code{mh-mime-save-parts-default-directory} unless you use a prefix | |
2418 argument (as in @kbd{C-u K a}) in which case you are prompted for the | |
2419 directory. These directories may be superseded by MH profile | |
2420 components, since this function calls on @command{mhstore} | |
2421 (@command{mhn}) to do the work. | |
2422 | |
2423 @vindex mh-mime-save-parts-default-directory | |
2424 | |
2425 The default value for the option | |
2426 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so | |
2427 that you are always prompted for the directory in which to save the | |
2428 attachments. However, if you usually use the same directory within a | |
2429 session, then you can set this option to @samp{Prompt the First Time} | |
2430 to avoid the prompt each time. you can make this directory permanent | |
2431 by choosing @samp{Directory} and entering the directory's name. | |
2432 | |
2433 @cindex attachments, inline | |
2434 @cindex inline attachments | |
2435 @findex mh-toggle-mime-buttons | |
2436 @kindex K t | |
2437 @vindex mh-display-buttons-for-inline-parts-flag | |
2438 | |
2439 The sender can request that attachments should be viewed inline so | |
2440 that they do not really appear like an attachment at all to the | |
2441 reader. Most of the time, this is desirable, so by default MH-E | |
2442 suppresses the buttons for inline attachments. On the other hand, you | |
2443 may receive code or HTML which the sender has added to his message as | |
2444 inline attachments so that you can read them in MH-E. In this case, it | |
2445 is useful to see the buttons so that you know you don't have to cut | |
2446 and paste the code into a file; you can simply save the attachment. If | |
2447 you want to make the buttons visible for inline attachments, you can | |
2448 use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle | |
2449 the visibility of these buttons. You can turn on these buttons | |
2450 permanently by turning on the option | |
2451 @code{mh-display-buttons-for-inline-parts-flag}. | |
2452 | |
2453 MH-E cannot display all attachments inline however. It can display | |
2454 text (including @sc{html}) and images. | |
2455 | |
2456 @cindex header field, @samp{Content-Disposition:} | |
2457 @cindex inline images | |
2458 @cindex @samp{Content-Disposition:} header field | |
2459 @vindex mh-max-inline-image-height | |
2460 @vindex mh-max-inline-image-width | |
2461 | |
2462 Some older mail programs do not insert the needed | |
2463 plumbing@footnote{This plumbing is the @samp{Content-Disposition:} | |
2464 header field.} to tell MH-E whether to display the attachments inline | |
2465 or not. If this is the case, MH-E will display these images inline if | |
2466 they are smaller than the window. However, you might want to allow | |
2467 larger images to be displayed inline. To do this, you can change the | |
2468 options @code{mh-max-inline-image-width} and | |
2469 @code{mh-max-inline-image-height} from their default value of zero to | |
2470 a large number. The size of your screen is a good choice for these | |
2471 numbers. | |
2472 | |
2473 @cindex alternatives | |
2474 @cindex attachments, alternatives | |
2475 @vindex mh-display-buttons-for-alternatives-flag | |
2476 | |
2477 Sometimes, a mail program will produce multiple alternatives of an | |
2478 attachment in increasing degree of faithfulness to the original | |
2479 content. By default, only the preferred alternative is displayed. If | |
2480 the option @code{mh-display-buttons-for-alternatives-flag} is on, then | |
2481 the preferred part is shown inline and buttons are shown for each of | |
2482 the other alternatives. | |
2483 | |
2484 @vindex mm-discouraged-alternatives | |
2485 | |
2486 Many people prefer to see the @samp{text/plain} alternative rather | |
2487 than the @samp{text/html} alternative. To do this in MH-E, customize | |
2488 the option @code{mm-discouraged-alternatives}, and add | |
2489 @samp{text/html}. The next best alternative, if any, will be shown. | |
2490 | |
97192 | 2491 @findex mh-show-preferred-alternative |
2492 @kindex : (colon) | |
2493 | |
2494 Occasionally, though, you might want to see the preferred alternative. | |
2495 The command @kbd{:} (@code{mh-show-preferred-alternative}) displays | |
2496 the message with the default preferred alternative. This is as if | |
2497 @code{mm-discouraged-alternatives} is set to @samp{nil}. Use the | |
2498 command @key{RET} (@code{mh-show}) to show the message normally again. | |
2499 | |
84306 | 2500 @kindex K i |
2501 @findex mh-folder-inline-mime-part | |
2502 | |
2503 You can view the raw contents of an attachment with the command @kbd{K | |
2504 i} (@code{mh-folder-inline-mime-part}). This command displays (or | |
2505 hides) the contents of the attachment associated with the button under | |
2506 the cursor verbatim. If the cursor is not located over a button, then | |
2507 the cursor first moves to the next button, wrapping to the beginning | |
2508 of the message if necessary. You can also provide a numeric prefix | |
2509 argument (as in @kbd{4 K i}) to view the attachment labeled with that | |
2510 number. | |
2511 | |
2512 For additional information on buttons, see | |
2513 @ifinfo | |
2514 @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}. | |
2515 @end ifinfo | |
2516 @ifnotinfo | |
2517 the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101, | |
2518 Article Buttons} and | |
2519 @uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands} | |
2520 in the @cite{The Gnus Manual}. | |
2521 @end ifnotinfo | |
2522 | |
2523 @node HTML, Digests, Viewing Attachments, Reading Mail | |
2524 @section HTML | |
2525 | |
2526 @cindex HTML | |
2527 @cindex Gnus | |
2528 | |
2529 MH-E can display messages that have been sent in HTML@footnote{This | |
2530 feature depends on a version of Gnus that is at least 5.10.}. The | |
2531 content of the message will appear in the MH-Show buffer as you would | |
2532 expect if the entire message is HTML, or there is an inline HTML body | |
2533 part. However, if there is an HTML body part that is an attachment, | |
2534 then you'll see a button like this: | |
2535 | |
2536 @smallexample | |
2537 [1. text/html; foo.html]... | |
2538 @end smallexample | |
2539 | |
2540 To see how to read the contents of this body part, see @ref{Viewing | |
2541 Attachments}. | |
2542 | |
2543 @vindex mm-text-html-renderer | |
2544 | |
2545 The browser that MH-E uses is determined by the option | |
2546 @code{mm-text-html-renderer}. The default setting is set automatically | |
2547 based upon the presence of a known browser on your system. If you wish | |
2548 to use a different browser, then set this option accordingly. See the | |
2549 documentation for the browser you use for additional information on | |
2550 how to use it. In particular, find and disable the option to render | |
2551 images as this can tip off spammers that the email address they have | |
2552 used is valid. | |
2553 | |
2554 @vindex mm-text-html-renderer | |
2555 | |
2556 If you're confused about which @code{mm-text-html-renderer} to use, | |
2557 here's a brief description of each, sorted by popularity, that | |
2558 includes the results of a quick poll of MH-E users from 2005-12-23. | |
2559 | |
2560 @table @asis | |
2561 @cindex browser, @samp{w3m} | |
2562 @cindex @samp{w3m} | |
2563 @kindex Mouse-2 | |
2564 @item @samp{w3m} 7 | |
2565 The @samp{w3m} browser requires an external program. It's quick, | |
2566 produces pretty nice output, and best of all, it's the only browser | |
2567 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
|
2568 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
|
2569 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
|
2570 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
|
2571 would be viewed in Emacs). |
84306 | 2572 @c ------------------------- |
2573 @cindex browser, @samp{w3m-standalone} | |
2574 @cindex @samp{w3m-standalone} | |
2575 @item @samp{w3m-standalone} 3 | |
2576 This browser, along with @samp{nil} for the external browser, are the | |
2577 only choices that work without having to download a separate lisp | |
2578 package or external program. This browser is quick, but does not show | |
2579 links. It handles simple tables but some tables get rendered much | |
2580 wider than the Emacs frame. This browser was the only one not to | |
2581 handle the escape @samp{–} (it printed a @samp{?}), but it did | |
2582 render @samp{®}. | |
2583 @c ------------------------- | |
2584 @cindex browser, @samp{links} | |
2585 @cindex @samp{links} | |
2586 @item @samp{links} 1 | |
2587 The @samp{links} browser requires an external program. It's quick, and | |
2588 produces nicer output than @samp{lynx} on single column mails in | |
2589 tables. However, it doesn't show links and it doesn't do as nice a job | |
2590 on multi-column tables as some lines wrap. At least it fits in 80 | |
2591 columns and thus seems better than @samp{w3} and | |
2592 @samp{w3m-standalone}. Converts escapes such as @samp{®} to (R). | |
2593 @c ------------------------- | |
2594 @cindex browser, @samp{lynx} | |
2595 @cindex @samp{lynx} | |
2596 @item @samp{lynx} 1 | |
2597 The @samp{lynx} browser requires an external program. It's quick and | |
2598 produces pretty decent output but it doesn't show links. It doesn't | |
2599 seem to do multi-column tables which makes output much cleaner. It | |
2600 centers the output and wraps long lines more than most. Handles | |
2601 @samp{®}. | |
2602 @c ------------------------- | |
2603 @item @samp{nil} 1 | |
2604 This choice obviously requires an external browser. Like | |
2605 @samp{w3m-standalone}, it works out of the box. With this setting, | |
2606 HTML messages have a button for the body part which you can view with | |
2607 @kbd{K v} (@code{mh-folder-toggle-mime-part}). | |
2608 @c ------------------------- | |
2609 @cindex browser, @samp{w3} | |
2610 @cindex @samp{w3} | |
2611 @item @samp{w3} 0 | |
2612 This choice does not require an external program as all of the | |
2613 rendering is done in lisp. You do need to get the package separately. | |
2614 This browser is @strong{slow}, and doesn't appear to have been updated | |
2615 since 2001 and the author hasn't responded to my emails. It displays | |
2616 unknown tags instead of hiding them, so you get to see all the | |
2617 Microsoft crap in certain messages. Tends to make multi-column tables | |
2618 wider than even a full-screen Emacs can handle. Like @samp{w3m}, you | |
2619 can follow links, but you have to find them first as they are not | |
2620 highlighted. Performs well on single-column tables and handles escapes | |
2621 such as @samp{®}. | |
2622 @c ------------------------- | |
2623 @cindex browser, @samp{html2text} | |
2624 @cindex @samp{html2text} | |
2625 @item @samp{html2text} 0 | |
2626 The @samp{html2text} browser requires an external program. I noticed | |
2627 that it can do some nasty things with simple HTML mails (like filling | |
2628 the entire message as if it were one paragraph, including signature). | |
2629 On another message, it displayed half of the HTML tags for some | |
2630 reason. | |
2631 @end table | |
2632 | |
2633 @vindex mm-text-html-renderer | |
2634 | |
2635 For a couple more sources of information about | |
2636 @code{mm-text-html-renderer}, | |
2637 @ifinfo | |
2638 @xref{Display Customization,,,emacs-mime}, and the documentation for | |
2639 the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},). | |
2640 @end ifinfo | |
2641 @ifnotinfo | |
2642 see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, | |
2643 Display Customization} in the @cite{The Emacs MIME Manual} and the | |
2644 documentation for the Gnus command @kbd{W h} (see section | |
2645 @uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the | |
2646 @cite{The Gnus Manual}). | |
2647 @end ifnotinfo | |
2648 | |
84934
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2649 @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
|
2650 @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
|
2651 @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
|
2652 @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
|
2653 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2654 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
|
2655 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
|
2656 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
|
2657 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
|
2658 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2659 @smalllisp |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2660 (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
|
2661 @end smalllisp |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2662 |
84306 | 2663 @node Digests, Reading PGP, HTML, Reading Mail |
2664 @section Digests | |
2665 | |
2666 @cindex digests | |
2667 @findex mh-page-digest | |
2668 @findex mh-page-digest-backwards | |
2669 @kindex D @key{BS} | |
2670 @kindex D @key{SPC} | |
2671 @kindex @key{BS} | |
2672 @kindex @key{SPC} | |
2673 | |
2674 A digest is a message that contains other messages. Special MH-E | |
2675 commands let you read digests conveniently. You can use @key{SPC} and | |
2676 @key{BS} to page through the digest as if it were a normal message, | |
2677 but if you wish to skip to the next message in the digest, use | |
2678 @kbd{D @key{SPC}} (@code{mh-page-digest}). To return to a previous message, | |
2679 use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}). | |
2680 | |
2681 @cindex @command{burst} | |
2682 @cindex MH commands, @command{burst} | |
2683 @cindex MH-Folder Show mode | |
2684 @cindex modes, MH-Folder Show | |
2685 @findex mh-burst-digest | |
2686 @kindex d | |
2687 @kindex D b | |
2688 @kindex t | |
2689 | |
2690 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This | |
2691 command uses the MH command @command{burst}@footnote{See the section | |
2692 @uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH | |
2693 book.} to break out each message in the digest into its own message. | |
2694 Using this command, you can quickly delete unwanted messages, like | |
2695 this: Once the digest is split up, toggle out of MH-Folder Show mode | |
2696 with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen | |
2697 and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail}) | |
2698 to quickly delete messages that you don't want to read (based on the | |
2699 @samp{Subject:} header field). You can also burst the digest to reply | |
2700 directly to the people who posted the messages in the digest. One | |
2701 problem you may encounter is that the @samp{From:} header fields are | |
2702 preceded with a @samp{>} so that your reply can't create the | |
2703 @samp{To:} field correctly. In this case, you must correct the | |
2704 @samp{To:} field yourself. This is described later (@pxref{Editing | |
2705 Drafts}). | |
2706 | |
2707 @node Reading PGP, Printing, Digests, Reading Mail | |
2708 @section Signed and Encrypted Messages | |
2709 | |
2710 @cindex GPG | |
2711 @cindex GnuPG | |
2712 @cindex Gnus | |
2713 @cindex OpenPGP | |
2714 @cindex PGP | |
2715 @cindex RFC 3156 | |
2716 @cindex encrypted messages | |
2717 @cindex security | |
2718 @cindex signed messages | |
2719 | |
2720 You can read encrypted or signed PGP or GPG messages with | |
2721 MH-E@footnote{This feature depends on post-5.10 versions of Gnus. | |
2722 @cite{MIME Security with OpenPGP} is documented in | |
2723 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However, | |
2724 MH-E can also decrypt old-style PGP messages that are not in MIME | |
2725 format.}. This section assumes that you already have a good | |
2726 understanding of GPG and have set up your keys appropriately. | |
2727 | |
2728 If someone sends you a signed message, here is what you'll see: | |
2729 | |
2730 @smallexample | |
2731 @group | |
2732 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]] | |
2733 This is a signed message. | |
2734 | |
2735 [[End of PGP Signed Part]] | |
2736 @end group | |
2737 @end smallexample | |
2738 | |
2739 @cindex keychain | |
2740 @cindex key server | |
2741 @cindex signed messages | |
2742 | |
2743 If the key for the given signature is not in your keychain, you'll be | |
2744 given the opportunity to fetch the key from a key server and verify | |
2745 the key. If the message is really large, the verification process can | |
2746 take a long time. You can press @kbd{C-g} at any time to | |
2747 cancel@footnote{Unfortunately in the current version, the validation | |
2748 process doesn't display a message so it appears that MH-E has hung. We | |
2749 hope that this will be fixed in the future.}. | |
2750 | |
2751 If the signature doesn't check out, you might see something like this: | |
2752 | |
2753 @smallexample | |
2754 @group | |
2755 [[PGP Signed Part:Failed]] | |
2756 This is a signed message. | |
2757 This is garbage added after the signature was made. | |
2758 | |
2759 [[End of PGP Signed Part]] | |
2760 @end group | |
2761 @end smallexample | |
2762 | |
2763 @cindex decrypting messages | |
2764 | |
2765 If someone sends you an encrypted message, MH-E will ask for your | |
2766 passphrase to decrypt the message. You should see something like this: | |
2767 | |
2768 @smallexample | |
2769 @group | |
2770 [[PGP Encrypted Part:OK]] | |
2771 | |
2772 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]] | |
2773 This is the secret message. | |
2774 | |
2775 [[End of PGP Signed Part]] | |
2776 | |
2777 [[End of PGP Encrypted Part]] | |
2778 @end group | |
2779 @end smallexample | |
2780 | |
2781 If there is a problem decrypting the message, the button will say: | |
2782 | |
2783 @smallexample | |
2784 [[PGP Encrypted Part:Failed]] | |
2785 @end smallexample | |
2786 | |
2787 You can read the contents of this button using the methods described in | |
2788 @ref{Viewing Attachments}. If the message were corrupted, you'd see | |
2789 this: | |
2790 | |
2791 @smallexample | |
2792 [[PGP Encrypted Part:Failed] | |
2793 Invalid base64 data] | |
2794 @end smallexample | |
2795 | |
2796 If your passphrase were incorrect, you'd see something like this: | |
2797 | |
2798 @smallexample | |
2799 [GNUPG:] ENC_TO CD9C88BB610BD9AD 1 0 | |
2800 [GNUPG:] USERID_HINT CD9C88BB610BD9AD Bill Wohler <wohler@@stop.mail-abuse.org> | |
2801 [GNUPG:] NEED_PASSPHRASE CD9C88BB610BD9AD CD9C88BB610BD9AD 1 0 | |
2802 [GNUPG:] BAD_PASSPHRASE CD9C88BB610BD9AD | |
2803 gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09 | |
2804 "Bill Wohler <wohler@@stop.mail-abuse.org>" | |
2805 gpg: public key decryption failed: bad passphrase | |
2806 [GNUPG:] BEGIN_DECRYPTION | |
2807 [GNUPG:] DECRYPTION_FAILED | |
2808 gpg: decryption failed: secret key not available | |
2809 [GNUPG:] END_DECRYPTION | |
2810 | |
2811 gpg exited abnormally: '2' | |
2812 @end smallexample | |
2813 | |
2814 @vindex mh-show-pgg-bad | |
2815 @vindex mh-show-pgg-good | |
2816 @vindex mh-show-pgg-unknown | |
2817 | |
2818 The appearance of the buttons is controlled by the faces | |
2819 @code{mh-show-pgg-good}, @code{mh-show-pgg-bad}, and | |
2820 @code{mh-show-pgg-unknown} depending on the validity of the signature. | |
2821 The latter is used whether the signature is unknown or untrusted. | |
2822 | |
2823 @cindex @samp{pgg} customization group | |
2824 @cindex PGG | |
2825 @cindex customization group, @samp{pgg} | |
2826 | |
2827 The @samp{pgg} customization group may have some settings which may | |
2828 interest you. | |
2829 @iftex | |
2830 See @cite{The PGG Manual}. | |
2831 @end iftex | |
2832 @ifinfo | |
2833 @xref{Top, , The PGG Manual, pgg, The PGG Manual}. | |
2834 @end ifinfo | |
2835 @ifhtml | |
2836 See | |
2837 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html, | |
2838 @cite{The PGG Manual}}. | |
2839 @end ifhtml | |
2840 | |
2841 @node Printing, Files and Pipes, Reading PGP, Reading Mail | |
2842 @section Printing Your Mail | |
2843 | |
2844 @cindex printing | |
2845 @findex mh-ps-print-msg | |
2846 @findex mh-ps-print-msg-file | |
2847 @kindex P f | |
2848 @kindex P p | |
2849 @vindex mh-lpr-command-format | |
2850 @vindex mh-print-background-flag | |
2851 | |
2852 To print messages in MH-E, use the command @kbd{P p} | |
2853 (@code{mh-ps-print-msg}). You can print all the messages in a range | |
2854 (as in @kbd{C-u P p 1 3 5-7 last:5 frombob @key{RET}}, | |
2855 @pxref{Ranges}). You can also send the output to a file with @kbd{P f} | |
2856 (@code{mh-ps-print-msg-file}). This command will print inline text | |
2857 attachments but will not decrypt messages. However, when a message is | |
2858 displayed in an MH-Show buffer, then that buffer is used verbatim for | |
2859 printing with the caveat that only text attachments, if opened inline, | |
2860 are printed. Therefore, encrypted messages can be printed by showing | |
2861 and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not | |
2862 use the options @code{mh-lpr-command-format} or | |
2863 @code{mh-print-background-flag}, described below. | |
2864 | |
2865 @findex mh-ps-print-toggle-color | |
2866 @kindex P C | |
2867 @vindex ps-print-color-p | |
2868 | |
2869 Colors are emulated on black-and-white printers with shades of gray. | |
2870 This might produce illegible output, even if your screen colors only | |
2871 use shades of gray. If this is the case, try using the command @kbd{P | |
2872 C} (@code{mh-ps-print-toggle-color}) to toggle between color, no | |
2873 color, and a black and white representation of the colors and see | |
2874 which works best. You change this setting permanently by customizing | |
2875 the option @code{ps-print-color-p}. | |
2876 | |
2877 @findex mh-ps-print-toggle-faces | |
2878 @kindex P F | |
2879 | |
2880 Another related function is the command @kbd{P F} | |
2881 (@code{mh-ps-print-toggle-faces}). This command toggles between using | |
2882 faces and not. When faces are enabled, the printed message will look | |
2883 very similar to the message in the MH-Show buffer. | |
2884 | |
2885 @cindex ps-print package | |
2886 @cindex Emacs, packages, ps-print | |
2887 | |
2888 MH-E uses the @samp{ps-print} package to do the printing, so you can | |
2889 customize the printing further by going to the @samp{ps-print} | |
2890 customization group. | |
2891 | |
2892 @cindex @command{lpr} | |
2893 @cindex @command{mhl} | |
2894 @cindex MH commands, @command{mhl} | |
2895 @cindex Unix commands, @command{lpr} | |
2896 @findex mh-print-msg | |
2897 @kindex P l | |
2898 | |
2899 An alternative to using the @samp{ps-print} package is the command | |
2900 @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or | |
2901 @i{l}pr). You can print all the messages in a range. The message is | |
2902 formatted with @command{mhl}@footnote{See the section | |
2903 @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH | |
2904 book.} and printed with the @command{lpr} command. | |
2905 | |
2906 @kindex P f | |
2907 @kindex P l | |
2908 @kindex P p | |
2909 @vindex mh-lpr-command-format | |
2910 @vindex mh-print-background-flag | |
2911 | |
2912 The command @kbd{P l} uses two options. The option | |
2913 @code{mh-lpr-command-format} contains the Unix command line which | |
2914 performs the actual printing. The string can contain one escape, | |
2915 @samp{%s}, which is replaced by the name of the folder and the message | |
2916 number and is useful for print job names. The default setting is | |
2917 @code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb | |
2918 -P"} which produces a nice header and adds a bit of margin so the text | |
2919 fits within my printer's margins. Normally messages are printed in the | |
2920 foreground. If this is slow on your system, you may elect to turn on | |
2921 the option @code{mh-print-background-flag} to print in the background. | |
2922 If you do this, do not delete the message until it is printed or else | |
2923 the output may be truncated. These options are not used by the | |
2924 commands @kbd{P p} or @kbd{P f}. | |
2925 | |
2926 @node Files and Pipes, Navigating, Printing, Reading Mail | |
2927 @section Files and Pipes | |
2928 | |
2929 @cindex files | |
2930 @cindex pipes | |
2931 @findex mh-refile-or-write-again | |
2932 @findex mh-write-msg-to-file | |
2933 @kindex > | |
2934 @kindex ! | |
2935 | |
2936 MH-E does offer a couple of commands that are not a part of MH@. The | |
2937 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to | |
2938 a file. You are prompted for the filename. If the file already exists, | |
2939 the message is appended to it. You can also write the message to the | |
2940 file without the header by specifying a prefix argument (such as | |
2941 @kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file | |
2942 can be made with the command @kbd{!} | |
2943 (@code{mh-refile-or-write-again}). | |
2944 | |
2945 @findex mh-pipe-msg | |
2946 @kindex | | |
2947 @kindex l | |
2948 | |
2949 You can also pipe the message through a Unix shell command with the | |
2950 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix | |
2951 command through which you wish to run your message. If you give a | |
2952 prefix argument to this command, the message header is included in the | |
2953 text passed to the command (the contrived example @kbd{C-u | lpr} | |
2954 would be done with the @kbd{l} command instead). | |
2955 | |
2956 @cindex @command{shar} | |
2957 @cindex @command{uuencode} | |
2958 @cindex Unix commands, @command{shar} | |
2959 @cindex Unix commands, @command{uuencode} | |
2960 @findex mh-store-msg | |
2961 @kindex X s | |
2962 @vindex mh-store-default-directory | |
2963 | |
2964 If the message is a shell archive @command{shar} or has been run | |
2965 through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to | |
2966 extract the body of the message. The default directory for extraction | |
2967 is the current directory; however, you have a chance to specify a | |
2968 different extraction directory. The next time you use this command, | |
2969 the default directory is the last directory you used. If you would | |
2970 like to change the initial default directory, customize the option | |
2971 @code{mh-store-default-directory}, change the value from | |
2972 @samp{Current} to @samp{Directory}, and then enter the name of the | |
2973 directory for storing the content of these messages. | |
2974 | |
2975 @findex mh-store-buffer | |
2976 @kindex @key{RET} | |
2977 @kindex X s | |
2978 | |
2979 By the way, @kbd{X s} calls the Emacs Lisp function | |
2980 @code{mh-store-buffer}. I mention this because you can use it directly | |
2981 if you're editing a buffer that contains a file that has been run | |
2982 through @command{uuencode} or @command{shar}. For example, you can | |
2983 extract the contents of the current buffer in your home directory by | |
2984 typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}. | |
2985 | |
2986 @node Navigating, Miscellaneous Commands and Options, Files and Pipes, Reading Mail | |
2987 @section Navigating | |
2988 | |
2989 @cindex moving between messages | |
2990 @cindex navigation | |
2991 @findex mh-first-msg | |
2992 @findex mh-goto-msg | |
2993 @findex mh-last-msg | |
2994 @findex mh-next-undeleted-msg | |
2995 @findex mh-next-unread-msg | |
2996 @findex mh-previous-undeleted-msg | |
2997 @findex mh-previous-unread-msg | |
2998 @kindex g | |
2999 @kindex M-< | |
3000 @kindex M-> | |
3001 @kindex M-n | |
3002 @kindex M-p | |
3003 @kindex n | |
3004 @kindex p | |
3005 | |
3006 To move on to the next message, use the command @kbd{n} | |
3007 (@code{mh-next-undeleted-msg}); use @kbd{p} | |
3008 (@code{mh-previous-undeleted-msg}) to read the previous message. To | |
3009 move to the next unread message, use @kbd{M-n} | |
3010 (@code{mh-next-unread-msg}); use @kbd{M-p} | |
3011 (@code{mh-previous-unread-msg}) to move to the previous unread | |
3012 message. These commands can be given a prefix argument to specify how | |
3013 many messages to skip (for example, @kbd{5 n}). You can also move to a | |
3014 specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the | |
3015 message number either before or after typing @kbd{g}. In the latter | |
3016 case, Emacs prompts you. Finally, you can go to the first or last | |
3017 message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->} | |
3018 (@code{mh-last-msg}) respectively. | |
3019 | |
3020 @cindex MH-Folder mode | |
3021 @cindex modes, MH-Folder | |
3022 @findex next-line | |
3023 @findex previous-line | |
3024 @kindex C-n | |
3025 @kindex C-p | |
3026 @kindex @key{RET} | |
3027 | |
3028 You can also use the Emacs commands @kbd{C-p} (@code{previous-line}) | |
3029 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in | |
3030 the MH-Folder window. These commands can be used in conjunction with | |
3031 @key{RET} to look at deleted or refiled messages. | |
3032 | |
3033 @cindex deleting messages | |
3034 @findex mh-delete-msg | |
3035 @kindex d | |
3036 @kindex n | |
3037 @kindex p | |
3038 | |
3039 To mark a message for deletion, use the command @kbd{d} | |
3040 (@code{mh-delete-msg}). A @samp{D} is placed by the message in the | |
3041 scan window, and the next undeleted message is displayed. If the | |
3042 previous command had been @kbd{p}, then the next message displayed is | |
3043 the first undeleted message previous to the message just deleted. Use | |
3044 @kbd{n} to force subsequent @kbd{d} commands to move forward to the | |
3045 next undeleted message after deleting the message under the cursor. | |
3046 You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5 | |
3047 frombob @key{RET}}, @pxref{Ranges}). | |
3048 | |
3049 @findex mh-delete-msg-no-motion | |
3050 @kindex C-d | |
3051 | |
3052 The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the | |
3053 message (or messages in range) for deletion but leaves the cursor at | |
3054 the current message in case you wish to perform other operations on | |
3055 the message. | |
3056 | |
3057 @findex mh-delete-subject | |
3058 @findex mh-delete-subject-or-thread | |
3059 @findex mh-thread-delete | |
3060 @findex mh-undo | |
3061 @kindex k | |
3062 @kindex T d | |
3063 @kindex u | |
3064 | |
3065 And to delete more messages faster, you can use @kbd{k} | |
3066 (@code{mh-delete-subject-or-thread}) to delete all the messages with | |
3067 the same subject as the current message. This command puts these | |
3068 messages in a sequence named @samp{subject}. You can undo this action | |
3069 by using @kbd{u} (@code{mh-undo}) with a prefix argument and then | |
3070 specifying the @samp{subject} sequence. However, if the buffer is | |
3071 displaying a threaded view of the folder then @kbd{k} behaves like | |
3072 @kbd{T d} (@code{mh-thread-delete}). @xref{Threading}. | |
3073 | |
3074 @findex mh-execute-commands | |
3075 @kindex x | |
3076 | |
3077 However you mark a message for deletion, the command @kbd{x} | |
3078 (@code{mh-execute-commands}) actually carries out the deletion | |
3079 (@pxref{Folders}). | |
3080 | |
3081 @vindex mh-delete-msg-hook | |
3082 | |
3083 The hook @code{mh-delete-msg-hook} is called after you mark a message | |
3084 for deletion. For example, a past maintainer of MH-E used this once | |
3085 when he kept statistics on his mail usage. | |
3086 | |
3087 @node Miscellaneous Commands and Options, , Navigating, Reading Mail | |
3088 @section Miscellaneous Commands and Options | |
3089 | |
3090 This section contains a few more miscellaneous commands and options. | |
3091 | |
3092 @cindex editing message | |
3093 @findex mh-modify | |
3094 @kindex M | |
3095 | |
3096 There are times when you need to edit a message. For example, you may | |
3097 need to fix a broken Content-Type header field. You can do this with | |
3098 the command @kbd{M} (@code{mh-modify}). It displays the raw message in | |
3099 an editable buffer. When you are done editing, save and kill the | |
3100 buffer as you would any other. | |
3101 | |
3102 @findex mh-kill-folder | |
3103 @findex mh-pack-folder | |
3104 @vindex mh-do-not-confirm-flag | |
3105 | |
3106 Commands such as @code{mh-pack-folder} prompt to confirm whether to | |
3107 process outstanding moves and deletes or not before continuing. | |
3108 Turning on the option @code{mh-do-not-confirm-flag} means that these | |
3109 actions will be performed---which is usually desired but cannot be | |
3110 retracted---without question@footnote{In previous versions of MH-E, | |
3111 this option suppressed the confirmation in @code{mh-kill-folder}. | |
3112 Since this kept most users from setting this option, | |
3113 @code{mh-kill-folder} was modified in version 6.0 to always ask for | |
3114 confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}. | |
3115 @xref{Folders}.}. | |
3116 | |
3117 @cindex MH-Folder mode | |
3118 @cindex modes, MH-Folder | |
3119 @vindex mh-summary-height | |
3120 | |
3121 The option @code{mh-summary-height} controls the number of scan lines | |
3122 displayed in the MH-Folder window, including the mode line. The | |
3123 default value of this option is @samp{Automatic} which means that the | |
3124 MH-Folder buffer will maintain the same proportional size if the frame | |
3125 is resized. If you'd prefer a fixed height, then choose the | |
3126 @samp{Fixed Size} option and enter the number of lines you'd like to | |
3127 see. | |
3128 | |
3129 @vindex mh-bury-show-buffer-flag | |
3130 | |
3131 Normally the buffer for displaying messages is buried at the bottom at | |
3132 the buffer stack. You may wish to disable this feature by turning off | |
3133 the option @code{mh-bury-show-buffer-flag}. One advantage of not | |
3134 burying the show buffer is that one can delete the show buffer more | |
3135 easily in an electric buffer list because of its proximity to its | |
3136 associated MH-Folder buffer. Try running @kbd{M-x | |
3137 electric-buffer-list} to see what I mean. | |
3138 | |
3139 @cindex @file{.emacs} | |
3140 @cindex files, @file{.emacs} | |
3141 @cindex reading mail | |
3142 | |
3143 Before we leave this section, I'll include a function that I use as a | |
3144 front end to MH-E@footnote{Stephen Gildea's favorite binding is | |
3145 @kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your | |
3146 working window configuration, which may be quite involved---windows | |
3147 filled with source, compilation output, man pages, and other | |
3148 documentation---and your MH-E window configuration. Like the rest of | |
3149 the customization described in this section, simply add the following | |
3150 code to @file{~/.emacs}. | |
3151 | |
3152 @iftex | |
3153 @filbreak | |
3154 @end iftex | |
3155 | |
3156 @findex mh-rmail, example | |
3157 | |
3158 @smalllisp | |
3159 @group | |
3160 (defvar my-mh-screen-saved nil | |
3161 "Set to non-@code{nil} when MH-E window configuration shown.") | |
3162 (defvar my-normal-screen nil "Normal window configuration.") | |
3163 (defvar my-mh-screen nil "MH-E window configuration.") | |
3164 | |
3165 (defun my-mh-rmail (&optional arg) | |
3166 "Toggle between MH-E and normal screen configurations. | |
3167 With non-@code{nil} or prefix argument, @i{inc} mailbox as well | |
3168 when going into mail." | |
3169 (interactive "P") ; @r{user callable function, P=prefix arg} | |
3170 (setq my-mh-screen-saved ; @r{save state} | |
3171 (cond | |
3172 ;; @r{Bring up MH-E screen if arg or normal window configuration.} | |
3173 ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.} | |
3174 ((or arg (null my-mh-screen-saved)) | |
3175 (setq my-normal-screen (current-window-configuration)) | |
3176 (if (or arg (null (get-buffer "+inbox"))) | |
3177 (mh-rmail) | |
3178 (set-window-configuration my-mh-screen)) | |
3179 t) ; @r{set my-mh-screen-saved to @code{t}} | |
3180 ;; @r{Otherwise, save MH-E screen and restore normal screen.} | |
3181 (t | |
3182 (setq my-mh-screen (current-window-configuration)) | |
3183 (set-window-configuration my-normal-screen) | |
3184 nil)))) ; @r{set my-mh-screen-saved to nil} | |
3185 | |
3186 (global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}} | |
3187 | |
3188 @i{Starting MH-E} | |
3189 | |
3190 @end group | |
3191 @end smalllisp | |
3192 | |
3193 If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved} is | |
3194 @code{nil} (meaning a non-MH-E window configuration), the current | |
3195 window configuration is saved, either the @samp{+inbox} buffer is | |
3196 displayed or @code{mh-rmail} is run, and the MH-E window configuration | |
3197 is shown. Otherwise, the MH-E window configuration is saved and the | |
3198 original configuration is displayed. | |
3199 | |
3200 @node Folders, Sending Mail, Reading Mail, Top | |
3201 @chapter Organizing Your Mail with Folders | |
3202 | |
3203 @cindex @samp{Folder} menu | |
3204 @cindex @samp{Message} menu | |
3205 @cindex folders | |
3206 @cindex menu, @samp{Folder} | |
3207 @cindex menu, @samp{Message} | |
3208 @cindex using folders | |
3209 | |
3210 This chapter discusses the things you can do with folders within MH-E. | |
3211 The commands in this chapter are also found in the @samp{Folder} and | |
3212 @samp{Message} menus. | |
3213 | |
3214 @table @kbd | |
3215 @kindex ? | |
3216 @findex mh-help | |
3217 @item ? | |
3218 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
3219 @c ------------------------- | |
3220 @kindex ! | |
3221 @findex mh-refile-or-write-again | |
3222 @item ! | |
3223 Repeat last output command (@code{mh-refile-or-write-again}). | |
3224 @c ------------------------- | |
3225 @cindex @samp{Message > Copy Message to Folder...} menu item | |
3226 @cindex menu item, @samp{Message > Copy Message to Folder...} | |
3227 @kindex c | |
3228 @findex mh-copy-msg | |
3229 @item c | |
3230 Copy range to folder (@code{mh-copy-msg}). | |
3231 @c ------------------------- | |
3232 @kindex F ? | |
3233 @findex mh-prefix-help | |
3234 @item F ? | |
3235 Display cheat sheet for the commands of the current prefix in | |
3236 minibuffer (@code{mh-prefix-help}). | |
3237 @c ------------------------- | |
3238 @kindex F ' | |
3239 @findex mh-index-ticked-messages | |
3240 @item F ' | |
3241 Display ticked messages (@code{mh-index-ticked-messages}). | |
3242 @c ------------------------- | |
3243 @kindex F c | |
3244 @findex mh-catchup | |
3245 @item F c | |
3246 Delete range from the @samp{unseen} sequence (@code{mh-catchup}). | |
3247 @c ------------------------- | |
3248 @kindex F k | |
3249 @findex mh-kill-folder | |
3250 @item F k | |
3251 Remove folder (@code{mh-kill-folder}). | |
3252 @c ------------------------- | |
3253 @cindex @samp{Folder > List Folders} menu item | |
3254 @cindex menu item, @samp{Folder > List Folders} | |
3255 @kindex F l | |
3256 @findex mh-list-folders | |
3257 @item F l | |
3258 List all folders (@code{mh-list-folders}). | |
3259 @c ------------------------- | |
3260 @cindex @samp{Folder > View New Messages} menu item | |
3261 @cindex menu item, @samp{Folder > View New Messages} | |
3262 @kindex F n | |
3263 @findex mh-index-new-messages | |
3264 @item F n | |
3265 Display unseen messages (@code{mh-index-new-messages}). | |
3266 @c ------------------------- | |
3267 @cindex @samp{Folder > Pack Folder} menu item | |
3268 @cindex menu item, @samp{Folder > Pack Folder} | |
3269 @kindex F p | |
3270 @findex mh-pack-folder | |
3271 @item F p | |
3272 Pack folder (@code{mh-pack-folder}). | |
3273 @c ------------------------- | |
3274 @kindex F q | |
3275 @findex mh-index-sequenced-messages | |
3276 @item F q | |
3277 Display messages in any sequence (@code{mh-index-sequenced-messages}). | |
3278 @c ------------------------- | |
3279 @cindex @samp{Folder > Rescan Folder} menu item | |
3280 @cindex menu item, @samp{Folder > Rescan Folder} | |
3281 @kindex F r | |
3282 @findex mh-rescan-folder | |
3283 @item F r | |
3284 Rescan folder (@code{mh-rescan-folder}). | |
3285 @c ------------------------- | |
3286 @cindex @samp{Folder > Search...} menu item | |
3287 @cindex menu item, @samp{Folder > Search...} | |
3288 @kindex F s | |
3289 @findex mh-search | |
3290 @item F s | |
3291 Search your MH mail (@code{mh-search}). | |
3292 @c ------------------------- | |
3293 @cindex @samp{Folder > Sort Folder} menu item | |
3294 @cindex menu item, @samp{Folder > Sort Folder} | |
3295 @kindex F S | |
3296 @findex mh-sort-folder | |
3297 @item F S | |
3298 Sort folder (@code{mh-sort-folder}). | |
3299 @c ------------------------- | |
3300 @kindex F u | |
3301 @findex mh-undo-folder | |
3302 @item F u | |
3303 Undo all refiles and deletes in the current folder (@code{mh-undo-folder}). | |
3304 @c ------------------------- | |
3305 @cindex @samp{Folder > Visit a Folder...} menu item | |
3306 @cindex menu item, @samp{Folder > Visit a Folder...} | |
3307 @kindex F v | |
3308 @findex mh-visit-folder | |
3309 @item F v | |
3310 Visit folder (@code{mh-visit-folder}). | |
3311 @c ------------------------- | |
3312 @cindex @samp{Message > Refile Message} menu item | |
3313 @cindex menu item, @samp{Message > Refile Message} | |
3314 @kindex o | |
3315 @findex mh-refile-msg | |
3316 @item o | |
3317 Refile (output) range into folder (@code{mh-refile-msg}). | |
3318 @c ------------------------- | |
3319 @cindex @samp{Folder > Quit MH-E} menu item | |
3320 @cindex menu item, @samp{Folder > Quit MH-E} | |
3321 @kindex q | |
3322 @findex mh-quit | |
3323 @item q | |
3324 Quit the current MH-E folder (@code{mh-quit}). | |
3325 @c ------------------------- | |
3326 @cindex @samp{Folder > Toggle Show/Folder} menu item | |
3327 @cindex menu item, @samp{Folder > Toggle Show/Folder} | |
3328 @kindex t | |
3329 @findex mh-toggle-showing | |
3330 @item t | |
3331 Toggle between MH-Folder and MH-Folder Show modes | |
3332 (@code{mh-toggle-showing}). | |
3333 @c ------------------------- | |
3334 @cindex @samp{Message > Undo Delete/Refile} menu item | |
3335 @cindex menu item, @samp{Message > Undo Delete/Refile} | |
3336 @kindex u | |
3337 @findex mh-undo | |
3338 @item u | |
3339 Undo pending deletes or refiles in range (@code{mh-undo}). | |
3340 @c ------------------------- | |
3341 @cindex @samp{Message > Execute Delete/Refile} menu item | |
3342 @cindex menu item, @samp{Message > Execute Delete/Refile} | |
3343 @kindex x | |
3344 @findex mh-execute-commands | |
3345 @item x | |
3346 Process outstanding delete and refile requests | |
3347 (@code{mh-execute-commands}). | |
3348 @end table | |
3349 | |
3350 @cindex @samp{mh-folder} customization group | |
3351 @cindex customization group, @samp{mh-folder} | |
3352 | |
3353 The @samp{mh-folder} customization group is used to tune these | |
3354 commands. | |
3355 | |
3356 @vtable @code | |
3357 @item mh-new-messages-folders | |
3358 Folders searched for the @samp{unseen} sequence (default: | |
3359 @code{Inbox}). | |
3360 @c ------------------------- | |
3361 @item mh-ticked-messages-folders | |
3362 Folders searched for @code{mh-tick-seq} (default: @code{t}). | |
3363 @c ------------------------- | |
3364 @item mh-large-folder | |
3365 The number of messages that indicates a large folder (default: 200). | |
3366 @c ------------------------- | |
3367 @item mh-recenter-summary-flag | |
3368 On means to recenter the summary window (default: @samp{off}). | |
3369 @c ------------------------- | |
3370 @item mh-recursive-folders-flag | |
3371 On means that commands which operate on folders do so recursively | |
3372 (default: @samp{off}). | |
3373 @c ------------------------- | |
3374 @item mh-sortm-args | |
3375 Additional arguments for @command{sortm} (default: @code{nil}). | |
3376 @end vtable | |
3377 | |
3378 The following hooks are available. | |
3379 | |
3380 @vtable @code | |
3381 @item mh-after-commands-processed-hook | |
3382 Hook run by @kbd{x} after performing outstanding refile and delete | |
3383 requests (default: @code{nil}). | |
3384 @c ------------------------- | |
3385 @item mh-before-commands-processed-hook | |
3386 Hook run by @kbd{x} before performing outstanding refile and delete | |
3387 requests (default: @code{nil}). | |
3388 @c ------------------------- | |
3389 @item mh-before-quit-hook | |
3390 Hook run by q before quitting MH-E (default: @code{nil}). | |
3391 @c ------------------------- | |
3392 @item mh-folder-mode-hook | |
3393 Hook run by @code{mh-folder-mode} when visiting a new folder (default: | |
3394 @code{nil}). | |
3395 @c ------------------------- | |
3396 @item mh-kill-folder-suppress-prompt-hook | |
3397 Abnormal hook run at the beginning of @code{mh-kill-folder} (default: | |
3398 @code{'mh-search-p}). | |
3399 @c ------------------------- | |
3400 @item mh-quit-hook | |
3401 Hook run by q after quitting MH-E (default: @code{nil}). | |
3402 @c ------------------------- | |
3403 @item mh-refile-msg-hook | |
3404 Hook run by o after marking each message for refiling (default: | |
3405 @code{nil}). | |
3406 @end vtable | |
3407 | |
3408 The following faces are available for customizing the appearance of | |
3409 the MH-Folder buffer. @xref{Scan Line Formats}. | |
3410 | |
3411 @vtable @code | |
3412 @item mh-folder-address | |
3413 Recipient face. | |
3414 @c ------------------------- | |
3415 @item mh-folder-body | |
3416 Body text face. | |
3417 @c ------------------------- | |
3418 @item mh-folder-cur-msg-number | |
3419 Current message number face. | |
3420 @c ------------------------- | |
3421 @item mh-folder-date | |
3422 Date face. | |
3423 @c ------------------------- | |
3424 @item mh-folder-deleted | |
3425 Deleted message face. | |
3426 @c ------------------------- | |
3427 @item mh-folder-followup | |
3428 @samp{Re:} face. | |
3429 @c ------------------------- | |
3430 @item mh-folder-msg-number | |
3431 Message number face. | |
3432 @c ------------------------- | |
3433 @item mh-folder-refiled | |
3434 Refiled message face. | |
3435 @c ------------------------- | |
3436 @vindex mh-scan-format-nmh | |
3437 @vindex mh-scan-sent-to-me-sender-regexp | |
3438 @item mh-folder-sent-to-me-hint | |
3439 Fontification hint face in messages sent directly to us. The detection | |
3440 of messages sent to us is governed by the scan format | |
3441 @code{mh-scan-format-nmh} and regular expression | |
3442 @code{mh-scan-sent-to-me-sender-regexp}. | |
3443 @c ------------------------- | |
3444 @vindex mh-scan-format-nmh | |
3445 @vindex mh-scan-sent-to-me-sender-regexp | |
3446 @item mh-folder-scan-format | |
3447 Sender face in messages sent directly to us. The detection of messages | |
3448 sent to us is governed by the scan format @code{mh-scan-format-nmh} | |
3449 and regular expression @code{mh-scan-sent-to-me-sender-regexp}. | |
3450 @c ------------------------- | |
3451 @item mh-folder-subject | |
3452 Subject face. | |
3453 @c ------------------------- | |
3454 @item mh-folder-tick | |
3455 Ticked message face. | |
3456 @c ------------------------- | |
3457 @item mh-folder-to | |
3458 @samp{To:} face. | |
3459 @end vtable | |
3460 | |
3461 @vindex mh-folder-mode-hook | |
3462 | |
3463 The hook @code{mh-folder-mode-hook} is called when visiting a new | |
3464 folder in MH-Folder mode. This could be used to set your own key | |
3465 bindings, for example: | |
3466 | |
3467 @vindex mh-folder-mode-hook, example | |
3468 | |
3469 @smalllisp | |
3470 @group | |
3471 (defvar my-mh-init-done nil | |
3472 "Non-@code{nil} when one-time MH-E settings made.") | |
3473 | |
3474 (defun my-mh-folder-mode-hook () | |
3475 "Hook to set key bindings in MH-Folder mode." | |
3476 (if (not my-mh-init-done) ; @r{only need to bind the keys once } | |
3477 (progn | |
3478 (local-set-key "//" 'my-search-msg) | |
3479 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}} | |
3480 (setq my-mh-init-done t)))) | |
3481 | |
3482 (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook) | |
3483 | |
3484 (defun my-search-msg () | |
3485 "Search for a regexp in the current message." | |
3486 (interactive) ; @r{user function} | |
3487 (save-window-excursion | |
3488 (other-window 1) ; @r{go to next window} | |
3489 (isearch-forward-regexp))) ; @r{string search; hit return} | |
3490 ; @r{ when done} | |
3491 | |
3492 @i{Create additional key bindings via mh-folder-mode-hook} | |
3493 | |
3494 @end group | |
3495 @end smalllisp | |
3496 | |
3497 @cindex @command{folder} | |
3498 @cindex @command{refile} | |
3499 @cindex MH commands, @command{folder} | |
3500 @cindex MH commands, @command{refile} | |
3501 @findex mh-refile-msg | |
3502 @kindex o | |
3503 @vindex mh-refile-msg-hook | |
3504 | |
3505 MH-E has analogies for each of the MH @command{folder} and | |
3506 @command{refile} commands@footnote{See the sections | |
3507 @uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder: | |
3508 folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and | |
3509 Linking Messages: refile} in the MH book.}. To refile a message in | |
3510 another folder, use the command @kbd{o} (@code{mh-refile-msg}) | |
3511 (mnemonic: ``output''). You are prompted for the folder name | |
3512 (@pxref{Folder Selection}). Note that this command can also be used to | |
3513 create folders. If you specify a folder that does not exist, you will | |
3514 be prompted to create it. The hook @code{mh-refile-msg-hook} is called | |
3515 after a message is marked to be refiled. | |
3516 | |
3517 @findex mh-write-msg-to-file | |
3518 @kindex ! | |
3519 | |
3520 If you are refiling several messages into the same folder, you can use | |
3521 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the | |
3522 last refile or write (for the description of @kbd{>} | |
3523 (@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a | |
3524 range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob | |
3525 @key{RET}}, @pxref{Ranges}). | |
3526 | |
3527 @cindex expunging refiles and deletes | |
3528 @cindex undoing refiles and deletes | |
3529 @findex mh-undo | |
3530 @kindex u | |
3531 | |
3532 If you've deleted a message or refiled it, but changed your mind, you | |
3533 can cancel the action before you've executed it. Use @kbd{u} | |
3534 (@code{mh-undo}) to undo a refile on or deletion of a single message. | |
3535 You can also undo refiles and deletes for messages that are found in a | |
3536 given range (@pxref{Ranges}). | |
3537 | |
3538 @findex mh-undo-folder | |
3539 @kindex F u | |
3540 | |
3541 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo | |
3542 all refiles and deletes in the current folder. | |
3543 | |
3544 @findex mh-execute-commands | |
3545 @kindex x | |
3546 | |
3547 If you've marked messages to be deleted or refiled and you want to go | |
3548 ahead and delete or refile the messages, use @kbd{x} | |
3549 (@code{mh-execute-commands}). Many MH-E commands that may affect the | |
3550 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if | |
3551 you want to process refiles or deletes first and then either run | |
3552 @kbd{x} for you or undo the pending refiles and deletes. | |
3553 | |
3554 @kindex x | |
3555 @vindex mh-after-commands-processed-hook | |
3556 @vindex mh-before-commands-processed-hook | |
97192 | 3557 @vindex mh-current-folder |
84306 | 3558 |
3559 The command @kbd{x} runs @code{mh-before-commands-processed-hook} | |
3560 before the commands are processed and | |
3561 @code{mh-after-commands-processed-hook} after the commands are | |
3562 processed. Variables that are useful with the former hook include | |
3563 @code{mh-delete-list} and @code{mh-refile-list} which can be used to | |
3564 see which changes will be made to the current folder, | |
3565 @code{mh-current-folder}. Variables that are useful with the latter | |
3566 hook include @code{mh-folders-changed}, which lists which folders were | |
3567 affected by deletes and refiles. This list will always include the | |
3568 current folder @code{mh-current-folder}. | |
3569 | |
3570 @findex mh-copy-msg | |
3571 @kindex c | |
3572 @kindex o | |
3573 | |
3574 If you wish to copy a message to another folder, you can use the | |
3575 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument | |
3576 to @command{refile}(1)). Like the command @kbd{o}, this command | |
3577 prompts you for the name of the target folder and you can specify a | |
3578 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy | |
3579 takes place immediately. The original copy remains in the current | |
3580 folder. | |
3581 | |
3582 @cindex junk mail | |
3583 @cindex MH-Folder mode | |
3584 @cindex MH-Folder Show mode | |
3585 @cindex modes, MH-Folder | |
3586 @cindex modes, MH-Folder Show | |
3587 @cindex spam | |
3588 @findex mh-toggle-showing | |
3589 @kindex t | |
3590 | |
3591 The command @kbd{t} (@code{mh-toggle-showing}) switches between | |
3592 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards, | |
3593 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off | |
3594 the associated show buffer so that you can perform operations on the | |
3595 messages quickly without reading them. This is an excellent way to | |
3596 prune out your junk mail or to refile a group of messages to another | |
3597 folder for later examination. | |
3598 | |
3599 @cindex MH-Folder mode | |
3600 @cindex MH-Show mode | |
3601 @cindex modes, MH-Folder | |
3602 @cindex modes, MH-Show | |
3603 @cindex moving between messages | |
3604 @kindex t | |
3605 @vindex mh-recenter-summary-flag | |
3606 | |
3607 When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder | |
3608 mode, the MH-Show buffer is hidden and the MH-Folder buffer is left | |
3609 alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil} | |
3610 value causes the toggle to display as many scan lines as possible, | |
3611 with the cursor at the middle. The effect of | |
3612 @code{mh-recenter-summary-flag} is rather useful, but it can be | |
3613 annoying on a slow network connection. | |
3614 | |
3615 @findex mh-visit-folder | |
3616 @kindex F v | |
3617 @vindex mh-large-folder | |
3618 | |
3619 When you want to read the messages that you have refiled into folders, | |
3620 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the | |
3621 folder. You are prompted for the folder name. The folder buffer will | |
3622 show just unseen messages if there are any; otherwise, it will show | |
3623 all the messages in the buffer as long there are fewer than | |
3624 @code{mh-large-folder} messages. If there are more, then you are | |
3625 prompted for a range of messages to scan. You can provide a prefix | |
3626 argument in order to specify a range of messages to show when you | |
3627 visit the folder (@pxref{Ranges}). In this case, regions are not used | |
3628 to specify the range and @code{mh-large-folder} is ignored. Note that | |
3629 this command can also be used to create folders. If you specify a | |
3630 folder that does not exist, you will be prompted to create it. | |
3631 | |
3632 @findex mh-search | |
3633 @kindex F s | |
3634 | |
3635 If you forget where you've refiled your messages, you can find them | |
3636 using @kbd{F s} (@code{mh-search}). @xref{Searching}. | |
3637 | |
3638 @cindex @command{procmail} | |
3639 @cindex @samp{unseen} sequence | |
3640 @cindex sequence, @samp{unseen} | |
3641 @cindex Unix commands, @command{procmail} | |
3642 @cindex unseen messages, viewing | |
3643 @findex mh-index-new-messages | |
3644 @kindex F n | |
3645 @vindex mh-new-messages-folders | |
3646 | |
3647 If you use a program such as @command{procmail} to file your incoming | |
3648 mail automatically, you can display new, unseen, messages using the | |
3649 command @kbd{F n} (@code{mh-index-new-messages}). All messages in the | |
3650 @samp{unseen} sequence from the folders in | |
3651 @code{mh-new-messages-folders} are listed. However, this list of | |
3652 folders can be overridden with a prefix argument: with a prefix | |
3653 argument, enter a space-separated list of folders, or nothing to | |
3654 search all folders. | |
3655 | |
3656 @cindex @samp{tick} sequence | |
3657 @cindex sequence, @samp{tick} | |
3658 @cindex ticked messages, viewing | |
3659 @findex mh-index-ticked-messages | |
3660 @kindex F ' | |
3661 @vindex mh-ticked-messages-folders | |
3662 | |
3663 If you have ticked messages (@pxref{Sequences}), you can display them | |
3664 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All | |
3665 messages in the @samp{tick} sequence from the folders in | |
3666 @code{mh-ticked-messages-folders} are listed. With a prefix argument, | |
3667 enter a space-separated list of folders, or nothing to search all | |
3668 folders. | |
3669 | |
3670 @findex mh-index-sequenced-messages | |
3671 @kindex F q | |
3672 @vindex mh-new-messages-folders | |
3673 | |
3674 You can display messages in any sequence with the command @kbd{F q} | |
3675 (@code{mh-index-sequenced-messages}). All messages from the folders in | |
3676 @code{mh-new-messages-folders} in the sequence you provide are listed. | |
3677 With a prefix argument, enter a space-separated list of folders at the | |
3678 prompt, or nothing to search all folders. | |
3679 | |
3680 @vindex mh-new-messages-folders | |
3681 @vindex mh-recursive-folders-flag | |
3682 @vindex mh-ticked-messages-folders | |
3683 | |
3684 Set the options @code{mh-new-messages-folders} and | |
3685 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the | |
3686 @samp{+inbox} folder or @samp{All} to search all of the top level | |
3687 folders. Otherwise, list the folders that should be searched with the | |
3688 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}. | |
3689 | |
3690 @cindex buffers, @samp{*MH-E Folders*} | |
3691 @cindex @samp{*MH-E Folders*} | |
3692 @findex mh-kill-folder | |
3693 @findex mh-list-folders | |
3694 @findex mh-pack-folder | |
3695 @findex mh-rescan-folder | |
3696 @findex mh-sort-folder | |
3697 @kindex F k | |
3698 @kindex F l | |
3699 @kindex F p | |
3700 @kindex F r | |
3701 @kindex F S | |
3702 | |
3703 Other commands you can perform on folders include: @kbd{F l} | |
3704 (@code{mh-list-folders}), to place a listing of all the folders in | |
3705 your mail directory in a buffer called @samp{*MH-E Folders*} | |
3706 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove | |
3707 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by | |
3708 date (see @command{sortm}(1) to see how to sort by other criteria); | |
3709 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps | |
3710 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}), | |
3711 to rescan the folder, which is useful to grab all messages in your | |
3712 @samp{+inbox} after processing your new mail for the first time. If | |
3713 you don't want to rescan the entire folder, the commands @kbd{F r} or | |
3714 @kbd{F p} will accept a range (@pxref{Ranges}). | |
3715 | |
3716 @kindex @key{TAB} | |
3717 @vindex mh-recursive-folders-flag | |
3718 | |
3719 By default, operations on folders work only one level at a time. Set | |
3720 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all | |
3721 folders. This mostly means that you'll be able to see all your folders | |
3722 when you press @key{TAB} when prompted for a folder name. | |
3723 | |
3724 @findex mh-search-p | |
3725 @kindex k | |
3726 @vindex mh-kill-folder-suppress-prompt-hooks | |
3727 | |
3728 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal | |
3729 hook run at the beginning of the command @kbd{k}. The hook functions | |
3730 are called with no arguments and should return a non-nil value to | |
3731 suppress the normal prompt when you remove a folder. This is useful | |
3732 for folders that are easily regenerated. The default value of | |
3733 @code{mh-search-p} suppresses the prompt on folders generated by | |
3734 searching. | |
3735 | |
3736 @sp 1 | |
3737 @center @strong{NOTE} | |
3738 | |
3739 @quotation | |
3740 Use this hook with care. If there is a bug in your hook which returns | |
3741 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the | |
3742 @code{+inbox} folder, you will not be happy. | |
3743 @end quotation | |
3744 @sp 1 | |
3745 | |
3746 @cindex @command{sortm} | |
3747 @cindex @file{.mh_profile} | |
3748 @cindex files, @file{.mh_profile} | |
3749 @cindex MH commands, @command{sortm} | |
3750 @cindex MH profile component, @samp{sortm:} | |
3751 @cindex @samp{sortm:} MH profile component | |
3752 @kindex F S | |
3753 @vindex mh-sortm-args | |
3754 | |
3755 The option @code{mh-sortm-args} holds extra arguments to pass on to | |
3756 the command @command{sortm}@footnote{See the section | |
3757 @uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the | |
3758 MH book.} when a prefix argument is used with @kbd{F S}. Normally | |
3759 default arguments to @command{sortm} are specified in the MH profile. | |
3760 This option may be used to provide an alternate view. For example, | |
3761 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting. | |
3762 | |
3763 @cindex exiting | |
3764 @cindex quitting | |
3765 @findex mh-quit | |
3766 @kindex q | |
3767 | |
3768 When you want to quit using MH-E and go back to editing, you can use | |
3769 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the | |
3770 current MH-E folder and restores the buffers that were present when | |
3771 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working | |
3772 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E } | |
3773 (@pxref{Miscellaneous}). You can later restore your MH-E session by | |
3774 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail} | |
3775 again. | |
3776 | |
3777 @findex mh-execute-commands | |
3778 @kindex q | |
3779 @vindex mh-before-quit-hook | |
3780 @vindex mh-before-quit-hook, example | |
3781 @vindex mh-quit-hook | |
3782 @vindex mh-quit-hook, example | |
3783 | |
3784 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are | |
3785 called by @kbd{q}. The former one is called before the quit occurs, so | |
3786 you might use it to perform any MH-E operations; you could perform | |
3787 some query and abort the quit or call @code{mh-execute-commands}, for | |
3788 example. The latter is not run in an MH-E context, so you might use it | |
3789 to modify the window setup. If you find that @kbd{q} buries a lot of | |
3790 buffers that you would rather remove, you can use both | |
3791 @code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that. | |
3792 | |
3793 @smalllisp | |
3794 @group | |
3795 (defvar my-mh-folder-buffer-to-delete nil | |
3796 "Folder buffer that is being quit.") | |
3797 | |
3798 (defun my-mh-before-quit-hook () | |
3799 "Save folder buffer that is to be deleted." | |
3800 (setq my-mh-folder-buffer-to-delete (current-buffer))) | |
3801 | |
3802 (defun my-mh-quit-hook () | |
3803 "Kill folder buffer rather than just bury it." | |
3804 (set-buffer my-mh-folder-buffer-to-delete) | |
3805 (if (get-buffer mh-show-buffer) | |
3806 (kill-buffer mh-show-buffer)) | |
3807 (kill-buffer (current-buffer))) | |
3808 | |
3809 @i{Kill MH-Folder buffer instead of burying it} | |
3810 @end group | |
3811 @end smalllisp | |
3812 | |
3813 @cindex folders, renaming | |
3814 @cindex renaming folders | |
3815 @findex dired | |
3816 @findex dired-do-rename | |
3817 | |
3818 You can use dired to manipulate the folders themselves. For example, I | |
3819 renamed my @samp{+out} folder to the more common @samp{+outbox} by | |
3820 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}), | |
3821 moving my cursor to @samp{out} and using the command @kbd{R} | |
3822 (@code{dired-do-rename}). | |
3823 | |
3824 @node Sending Mail, Editing Drafts, Folders, Top | |
3825 @chapter Sending Mail | |
3826 | |
3827 @cindex sending mail | |
3828 @findex mh-smail | |
3829 @kindex M-x mh-smail | |
3830 | |
3831 You can send a mail message in several ways. You can call @kbd{M-x | |
3832 mh-smail} directly, or from the command line like this: | |
3833 | |
3834 @cindex starting from command line | |
3835 | |
3836 @smallexample | |
3837 $ @kbd{emacs -f mh-smail} | |
3838 @end smallexample | |
3839 | |
3840 @findex goto-address-at-point | |
3841 @vindex mail-user-agent | |
3842 | |
3843 There are some commands that need to send a mail message, such as | |
3844 @code{goto-address-at-point}. You can configure Emacs to have these | |
3845 commands use MH-E by setting the option @code{mail-user-agent} to | |
3846 @samp{Emacs interface to MH}. | |
3847 | |
3848 @cindex @samp{Message} menu | |
3849 @cindex menu, @samp{Message} | |
3850 | |
3851 From within MH-E's MH-Folder mode, other methods of sending mail are | |
3852 available as well. These can also be found in the @samp{Message} menu. | |
3853 | |
3854 @table @kbd | |
3855 @cindex @samp{Message > Edit Message Again} menu item | |
3856 @cindex menu item, @samp{Message > Edit Message Again} | |
3857 @kindex e | |
3858 @findex mh-edit-again | |
3859 @item e | |
3860 Edit a message to send it again (@code{mh-edit-again}). | |
3861 @c ------------------------- | |
3862 @cindex @samp{Message > Re-edit a Bounced Message} menu item | |
3863 @cindex menu item, @samp{Message > Re-edit a Bounced Message} | |
3864 @kindex E | |
3865 @findex mh-extract-rejected-mail | |
3866 @item E | |
3867 Edit a message that was returned by the mail system | |
3868 (@code{mh-extract-rejected-mail}). | |
3869 @c ------------------------- | |
3870 @cindex @samp{Message > Forward Message...} menu item | |
3871 @cindex menu item, @samp{Message > Forward Message...} | |
3872 @kindex f | |
3873 @findex mh-forward | |
3874 @item f | |
3875 Forward message (@code{mh-forward}). | |
3876 @c ------------------------- | |
3877 @cindex @samp{Message > Reply to Message...} menu item | |
3878 @cindex menu item, @samp{Message > Reply to Message...} | |
3879 @kindex r | |
3880 @findex mh-reply | |
3881 @item r | |
3882 Reply to a message (@code{mh-reply}). | |
3883 @c ------------------------- | |
3884 @cindex @samp{Message > Compose a New Message} menu item | |
3885 @cindex menu item, @samp{Message > Compose a New Message} | |
3886 @kindex s | |
3887 @findex mh-send | |
3888 @item s | |
3889 Compose a message (@code{mh-send}). | |
3890 @c ------------------------- | |
3891 @cindex @samp{Message > Redistribute Message...} menu item | |
3892 @cindex menu item, @samp{Message > Redistribute Message...} | |
3893 @kindex M-d | |
3894 @findex mh-redistribute | |
3895 @item M-d | |
3896 Redistribute a message (@code{mh-redistribute}). | |
3897 @c ------------------------- | |
3898 @findex mh-smail | |
3899 @item M-x mh-smail | |
3900 Compose a message with the MH mail system. | |
3901 @c ------------------------- | |
3902 @findex mh-smail-other-window | |
3903 @item M-x mh-smail-other-window | |
3904 Compose a message with the MH mail system in other window. | |
3905 @end table | |
3906 | |
3907 @cindex @samp{mh-sending-mail} customization group | |
3908 @cindex customization group, @samp{mh-sending-mail} | |
3909 | |
3910 In addition, several options from the @samp{mh-sending-mail} | |
3911 customization group are useful when sending mail or replying to mail. | |
3912 They are summarized in the following table. | |
3913 | |
3914 @vtable @code | |
3915 @item mh-compose-forward-as-mime-flag | |
3916 On means that messages are forwarded as attachments (default: | |
3917 @samp{on}). | |
3918 @c ------------------------- | |
3919 @item mh-compose-letter-function | |
3920 Hook run when starting a new draft (default: @code{nil}). | |
3921 @c ------------------------- | |
3922 @item mh-compose-prompt-flag | |
3923 On means prompt for header fields when composing a new draft (default: | |
3924 @samp{off}). | |
3925 @c ------------------------- | |
3926 @item mh-forward-subject-format | |
3927 Format string for forwarded message subject (default: @code{"%s: | |
3928 %s"}). | |
3929 @c ------------------------- | |
3930 @item mh-insert-x-mailer-flag | |
3931 On means append an @samp{X-Mailer:} header field to the header | |
3932 (default: @samp{on}). | |
3933 @c ------------------------- | |
3934 @item mh-redist-full-contents-flag | |
3935 On means the @command{dist} command needs entire letter for | |
3936 redistribution (default: @samp{off}). | |
3937 @c ------------------------- | |
3938 @item mh-reply-default-reply-to | |
3939 Sets the person or persons to whom a reply will be sent (default: | |
3940 @samp{Prompt}). | |
3941 @c ------------------------- | |
3942 @item mh-reply-show-message-flag | |
3943 On means the MH-Show buffer is displayed using @kbd{r} | |
3944 (@code{mh-reply}) (default: @samp{on}). | |
3945 @end vtable | |
3946 | |
3947 The following hooks are available. | |
3948 | |
3949 @vtable @code | |
97192 | 3950 @item mh-annotate-msg-hook |
3951 Hook run by @code{mh-annotate-msg} after annotation (default: | |
3952 @code{nil}). | |
3953 @c ------------------------- | |
84306 | 3954 @item mh-forward-hook |
3955 Hook run by @code{mh-forward} on a forwarded letter (default: | |
3956 @code{nil}). | |
3957 @c ------------------------- | |
3958 @item mh-letter-mode-hook | |
3959 Hook run by @code{mh-letter-mode} on a new letter (default: | |
3960 @code{nil}). | |
3961 @end vtable | |
3962 | |
97192 | 3963 @findex mh-annotate-msg |
3964 @vindex mh-annotate-list | |
3965 @vindex mh-annotate-msg-hook | |
3966 @vindex mh-current-folder | |
3967 | |
3968 A hook that is called whenever a message is sent and after the scan | |
3969 lines and message are annotated is @code{mh-annotate-msg-hook}. Hook | |
3970 functions can access the current folder name with | |
3971 @code{mh-current-folder} and obtain the message numbers of the | |
3972 annotated messages with @code{mh-annotate-list}. | |
3973 | |
3974 The rest of the functions and options introduced here are explained in | |
3975 more detail in the following sections. | |
84306 | 3976 |
3977 @menu | |
3978 * Composing:: | |
3979 * Replying:: | |
3980 * Forwarding:: | |
3981 * Redistributing:: | |
3982 * Editing Again:: | |
3983 @end menu | |
3984 | |
3985 @node Composing, Replying, Sending Mail, Sending Mail | |
3986 @section Composing | |
3987 | |
3988 @cindex @file{.emacs} | |
3989 @cindex MH-Folder mode | |
3990 @cindex composing mail | |
3991 @cindex draft | |
3992 @cindex files, @file{.emacs} | |
3993 @cindex modes, MH-Folder | |
3994 @cindex sending mail | |
3995 @findex mh-smail | |
3996 @findex mh-smail-other-window | |
3997 @kindex M-x mh-smail | |
3998 @kindex M-x mh-smail-other-window | |
3999 | |
4000 Outside of an MH-Folder buffer, you must call either @kbd{M-x | |
4001 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message. | |
4002 The former command always creates a two-window layout with the current | |
4003 buffer on top and the draft on the bottom. Use the latter command if | |
4004 you would rather preserve the window layout. You may find adding the | |
4005 following key bindings to @file{~/.emacs} useful: | |
4006 | |
4007 @smalllisp | |
4008 (global-set-key "\C-xm" 'mh-smail) | |
4009 (global-set-key "\C-x4m" 'mh-smail-other-window) | |
4010 @end smalllisp | |
4011 | |
4012 @cindex draft folder | |
4013 @cindex MH-Letter mode | |
4014 @cindex modes, MH-Letter | |
4015 @findex mh-send | |
4016 @kindex m | |
4017 | |
4018 From within a MH-Folder buffer, you can simply use the command @kbd{m} | |
4019 (@code{mh-send}). However you invoke @code{mh-send}, your letter | |
4020 appears in an Emacs buffer whose mode is MH-Letter (to see what the | |
4021 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows | |
4022 you to edit your message, to check the validity of the recipients, to | |
4023 insert attachments and other messages into your message, and to send | |
4024 the message. We'll go more into depth about editing a | |
4025 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft | |
4026 folder} so that you can edit several drafts in parallel. To do so, | |
4027 create a folder named @samp{+drafts} for example, and add the profile | |
4028 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a | |
4029 message you're composing) in just a moment (@pxref{Editing Drafts}). | |
4030 | |
4031 @vindex mh-compose-prompt-flag | |
4032 | |
4033 If you prefer to be prompted for the recipient and subject fields | |
4034 before the MH-Letter buffer appears, turn on the option | |
4035 @code{mh-compose-prompt-flag}. | |
4036 | |
4037 @cindex header field, @samp{X-Mailer:} | |
4038 @cindex @samp{X-Mailer:} header field | |
4039 @vindex mh-insert-x-mailer-flag | |
4040 | |
4041 MH-E adds an @samp{X-Mailer:} header field to the header that includes | |
4042 the version of MH-E and Emacs that you are using. If you don't want to | |
4043 participate in our marketing, you can turn off the option | |
4044 @code{mh-insert-x-mailer-flag}. | |
4045 | |
4046 @cindex @command{repl} | |
4047 @cindex @file{components} | |
4048 @cindex MH commands, @command{repl} | |
4049 @cindex MH-Letter mode | |
4050 @cindex Mail mode | |
4051 @cindex files, @file{components} | |
4052 @cindex modes, MH-Letter | |
4053 @cindex modes, Mail | |
4054 @vindex mail-mode-hook | |
4055 @vindex mh-letter-mode-hook | |
4056 @vindex text-mode-hook | |
4057 | |
4058 Two hooks are provided to run commands on your freshly created draft. | |
4059 The first hook, @code{mh-letter-mode-hook}, allows you to do some | |
4060 processing before editing a letter@footnote{Actually, because | |
4061 MH-Letter mode inherits from Mail mode, the hooks | |
4062 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that | |
4063 order) before @code{mh-letter-mode-hook}.}. For example, you may wish | |
4064 to modify the header after @command{repl} has done its work, or you | |
4065 may have a complicated @file{components} file and need to tell MH-E | |
4066 where the cursor should go. Here's an example of how you would use | |
4067 this hook. | |
4068 | |
4069 @findex mh-insert-signature, example | |
4070 | |
4071 @smalllisp | |
4072 @group | |
4073 (defvar letter-mode-init-done-flag nil | |
4074 "Non-nil means one-time MH-E settings have been made.") | |
4075 | |
4076 (defun my-mh-letter-mode-hook () | |
4077 "Prepare letter for editing." | |
4078 (when (not letter-mode-init-done) ; @r{only need to bind the keys once} | |
4079 (local-set-key "\C-ctb" 'add-enriched-text) | |
4080 (local-set-key "\C-cti" 'add-enriched-text) | |
4081 (local-set-key "\C-ctf" 'add-enriched-text) | |
4082 (local-set-key "\C-cts" 'add-enriched-text) | |
4083 (local-set-key "\C-ctB" 'add-enriched-text) | |
4084 (local-set-key "\C-ctu" 'add-enriched-text) | |
4085 (local-set-key "\C-ctc" 'add-enriched-text) | |
4086 (setq letter-mode-init-done t)) | |
4087 (save-excursion | |
4088 (goto-char (point-max)) ; @r{go to end of message to} | |
4089 (mh-insert-signature))) ; @r{insert signature} | |
4090 | |
4091 @i{Prepare draft for editing via mh-letter-mode-hook} | |
4092 | |
4093 @end group | |
4094 @end smalllisp | |
4095 | |
4096 The function, @code{add-enriched-text} is defined in the example in | |
4097 @ref{Adding Attachments}. | |
4098 | |
4099 @vindex mh-compose-letter-function | |
4100 @vindex mh-letter-mode-hook | |
4101 | |
4102 The second hook, a function really, is | |
4103 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it | |
4104 is called just before editing a new message; however, it is the last | |
4105 function called before you edit your message. The consequence of this | |
4106 is that you can write a function to write and send the message for | |
4107 you. This function is passed three arguments: the contents of the | |
4108 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields. | |
4109 | |
4110 @node Replying, Forwarding, Composing, Sending Mail | |
4111 @section Replying to Mail | |
4112 | |
4113 @cindex @command{mhl} | |
4114 @cindex @file{mhl.reply} | |
4115 @cindex MH commands, @command{mhl} | |
4116 @cindex files, @file{mhl.reply} | |
4117 @cindex replying | |
4118 @findex mh-reply | |
4119 @kindex r | |
4120 | |
4121 To compose a reply to a message, use the @kbd{r} (@code{mh-reply}) | |
4122 command. | |
4123 | |
4124 When you reply to a message, you are first prompted with @samp{Reply | |
4125 to whom?}. You have several choices here. | |
4126 | |
4127 @quotation | |
4128 @multitable @columnfractions .20 .80 | |
4129 @c @headitem Response @tab Reply Goes To | |
4130 @c XXX @headitem not yet supported by SourceForge's texi2pdf. | |
4131 @item @b{Response} @tab @b{Reply Goes To} | |
4132 @c ------------------------- | |
4133 @item @kbd{from} | |
4134 @tab | |
4135 The person who sent the message. This is the default, so @key{RET} is | |
4136 sufficient. | |
4137 @c ------------------------- | |
4138 @item @kbd{to} | |
4139 @tab | |
4140 Replies to the sender, plus all recipients in the @samp{To:} header field. | |
4141 @c ------------------------- | |
4142 @item @kbd{cc}@*@kbd{all} | |
4143 @tab | |
4144 Forms a reply to the addresses in the @samp{Mail-Followup-To:} header | |
4145 field if one exists; otherwise forms a reply to the sender, plus all | |
4146 recipients. | |
4147 @end multitable | |
4148 @end quotation | |
4149 | |
4150 @cindex @command{repl} | |
4151 @cindex MH commands, @command{repl} | |
4152 @vindex mh-reply-default-reply-to | |
4153 | |
4154 Depending on your answer, @command{repl}@footnote{See the section | |
4155 @uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in | |
4156 the MH book.} is given a different argument to form your reply. | |
4157 Specifically, a choice of @kbd{from} or none at all runs @samp{repl | |
4158 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally, | |
4159 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you | |
4160 find that most of the time you specify one of these choices when you | |
4161 reply to a message, you can change the option | |
4162 @code{mh-reply-default-reply-to} from its default value of | |
4163 @samp{Prompt} to one of the choices listed above. You can always edit | |
4164 the recipients in the draft. | |
4165 | |
4166 @cindex @samp{repl:} MH profile component | |
4167 @cindex MH profile component, @samp{repl:} | |
4168 @cindex MH-Letter mode | |
4169 @cindex MH-Show mode | |
4170 @cindex draft | |
4171 @cindex modes, MH-Letter | |
4172 @cindex modes, MH-Show | |
4173 | |
4174 Two windows are then created. One window contains the message to which | |
4175 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode | |
4176 (@pxref{Editing Drafts}), is in the other window. If the reply draft | |
4177 was not one that you expected, check the things that affect the | |
4178 behavior of @command{repl} which include the @samp{repl:} profile | |
4179 component and the @file{replcomps} and @file{replgroupcomps} files. | |
4180 | |
4181 If you supply a prefix argument (as in @kbd{C-u r}), the message you | |
4182 are replying to is inserted in your reply after having first been run | |
4183 through @command{mhl} with the format file @file{mhl.reply}. See | |
4184 @command{mhl}(1) or the section | |
4185 @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH | |
4186 book to see how you can modify the default @file{mhl.reply} file. | |
4187 | |
4188 @vindex mh-yank-behavior | |
4189 | |
4190 Alternatively, you can customize the option @code{mh-yank-behavior} | |
4191 and choose one of its @samp{Automatically} variants to do the same | |
4192 thing. @xref{Inserting Letter}. If you do so, the prefix argument has | |
4193 no effect. | |
4194 | |
4195 Another way to include the message automatically in your draft is to | |
4196 use @samp{repl: -filter repl.filter} in your MH profile. | |
4197 | |
4198 @vindex mh-reply-show-message-flag | |
4199 | |
4200 If you include the message automatically, you can hide the MH-Show | |
4201 buffer by turning off the option @code{mh-reply-show-message-flag}. | |
4202 | |
4203 If you wish to customize the header or other parts of the reply draft, | |
4204 please see @command{repl}(1) and @code{mh-format}(5). | |
4205 | |
4206 @node Forwarding, Redistributing, Replying, Sending Mail | |
4207 @section Forwarding Mail | |
4208 | |
4209 @cindex @command{forw} | |
4210 @cindex draft | |
4211 @cindex forwarding | |
4212 @cindex MH commands, @command{forw} | |
4213 @findex mh-forward | |
4214 @kindex f | |
4215 @vindex mh-forward-hook | |
4216 | |
4217 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You | |
4218 are prompted for the @samp{To:} and @samp{cc:} recipients. You are | |
4219 given a draft to edit that looks like it would if you had run the MH | |
4220 command @command{forw}@footnote{See the section | |
4221 @uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in | |
4222 the MH book.}. You can then add some text (@pxref{Editing Drafts}). | |
4223 You can forward several messages by using a range (@pxref{Ranges}). | |
4224 All of the messages in the range are inserted into your draft. The | |
4225 hook @code{mh-forward-hook} is called on the draft. | |
4226 | |
4227 @cindex @file{.mh_profile} | |
4228 @cindex files, @file{.mh_profile} | |
4229 @cindex MH profile component, @samp{forw:} | |
4230 @cindex @samp{forw:} MH profile component | |
4231 @vindex mh-compose-forward-as-mime-flag | |
4232 | |
4233 By default, the option @code{mh-compose-forward-as-mime-flag} is on | |
4234 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
|
4235 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
|
4236 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
|
4237 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
|
4238 option. Forwarding messages verbatim works well for short, textual |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4239 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
|
4240 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
|
4241 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
|
4242 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
|
4243 @code{mh-compose-forward-as-mime-flag}. |
84306 | 4244 |
4245 @vindex mh-forward-subject-format | |
4246 | |
4247 The format of the @samp{Subject:} header field for forwarded messages | |
4248 is controlled by the option @code{mh-forward-subject-format}. This | |
4249 option is a string which includes two escapes (@samp{%s}). The first | |
4250 @samp{%s} is replaced with the sender of the original message, and the | |
4251 second one is replaced with the original @samp{Subject:}. The default | |
4252 value of @code{"%s: %s"} takes a message with the header: | |
4253 | |
4254 @smallexample | |
4255 @group | |
4256 To: Bill Wohler <wohler@@stop.mail-abuse.org> | |
4257 Subject: Re: 49er football | |
4258 From: Greg DesBrisay <gd@@stop.mail-abuse.org> | |
4259 @end group | |
4260 @end smallexample | |
4261 | |
4262 and creates a subject header field of: | |
4263 | |
4264 @smallexample | |
4265 Subject: Greg DesBrisay: Re: 49er football | |
4266 @end smallexample | |
4267 | |
4268 @node Redistributing, Editing Again, Forwarding, Sending Mail | |
4269 @section Redistributing Your Mail | |
4270 | |
4271 @cindex @command{dist} | |
4272 @cindex MH commands, @command{dist} | |
4273 @cindex redistributing | |
4274 @findex mh-redistribute | |
4275 @kindex M-d | |
4276 | |
4277 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function | |
4278 to forwarding mail, but it does not allow you to edit the message, nor | |
4279 does it add your name to the @samp{From:} header field. It appears to | |
4280 the recipient as if the message had come from the original sender. | |
4281 When you run this command, you are prompted for the recipients. | |
4282 | |
4283 @findex mh-edit-again | |
4284 @kindex e | |
4285 | |
4286 For more information on redistributing messages, see | |
4287 @command{dist}(1). Also investigate the command @kbd{e} | |
4288 (@code{mh-edit-again}) for another way to redistribute messages | |
4289 (@pxref{Editing Again}). | |
4290 | |
4291 @cindex @command{send} | |
4292 @cindex MH commands, @command{send} | |
4293 @vindex mh-redist-full-contents-flag | |
4294 | |
4295 The option @code{mh-redist-full-contents-flag} must be turned on if | |
4296 @command{dist}@footnote{See the section | |
4297 @uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with | |
4298 dist} in the MH book.} requires the whole letter for redistribution, | |
4299 which is the case if @command{send}@footnote{See the section | |
4300 @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} | |
4301 in the MH book.} is compiled with the @sc{berk} option (which many | |
4302 people abhor). If you find that MH will not allow you to redistribute | |
4303 a message that has been redistributed before, turn off this option. | |
4304 | |
97192 | 4305 The hook @code{mh-annotate-msg-hook} is run after annotating the |
4306 message and scan line (@pxref{Sending Mail}). | |
4307 | |
84306 | 4308 @node Editing Again, , Redistributing, Sending Mail |
4309 @section Editing Old Drafts and Bounced Messages | |
4310 | |
4311 @cindex @file{draft} | |
4312 @cindex files, @file{draft} | |
4313 @cindex re-editing drafts | |
4314 @findex mh-edit-again | |
4315 @kindex F v drafts | |
4316 @kindex e | |
4317 @kindex n | |
4318 | |
4319 If you don't complete a draft for one reason or another, and if the | |
4320 draft buffer is no longer available, you can pick your draft up again | |
4321 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft | |
4322 folder, your last @file{draft} file will be used. If you use draft | |
4323 folders, you'll need to visit the draft folder with @kbd{F v drafts | |
4324 @key{RET}}, use @kbd{n} to move to the appropriate message, and then | |
4325 use @kbd{e} to prepare the message for editing. | |
4326 | |
4327 @kindex e | |
4328 | |
4329 The @kbd{e} command can also be used to take messages that were sent | |
4330 to you and to send them to more people. | |
4331 | |
4332 @cindex Mailer-Daemon | |
4333 @findex mh-extract-rejected-mail | |
4334 @kindex C-c C-c | |
4335 @kindex E | |
4336 | |
4337 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who | |
4338 complained that your mail wasn't posted for some reason or another. In | |
4339 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare | |
4340 the message for editing by removing the @i{Mailer-Daemon} envelope and | |
4341 unneeded header fields. Fix whatever addressing problem you had, and | |
4342 send the message again with @kbd{C-c C-c}. | |
4343 | |
4344 @node Editing Drafts, Aliases, Sending Mail, Top | |
4345 @chapter Editing a Draft | |
4346 | |
4347 @cindex @samp{Letter} menu | |
4348 @cindex MH-Letter mode | |
4349 @cindex draft | |
4350 @cindex editing draft | |
4351 @cindex menu, @samp{Letter} | |
4352 @cindex modes, MH-Letter | |
4353 | |
4354 When you edit a message that you want to send (called a @dfn{draft} in | |
4355 this case), the mode used is MH-Letter. This mode provides several | |
4356 commands in addition to the normal Emacs editing commands to help you | |
4357 edit your draft. These can also be found in the @samp{Letter} menu. | |
4358 | |
4359 @table @kbd | |
4360 @kindex @key{SPC} | |
4361 @findex mh-letter-complete-or-space | |
4362 @item @key{SPC} | |
4363 Perform completion or insert space (@code{mh-letter-complete-or-space}). | |
4364 @c ------------------------- | |
4365 @kindex M-@key{TAB} | |
4366 @findex mh-letter-complete | |
4367 @item M-@key{TAB} | |
4368 Perform completion on header field or word preceding point | |
4369 (@code{mh-letter-complete}). | |
4370 @c ------------------------- | |
4371 @kindex , (comma) | |
4372 @findex mh-letter-confirm-address | |
4373 @item , (comma) | |
4374 Flash alias expansion (@code{mh-letter-confirm-address}). | |
4375 @c ------------------------- | |
4376 @kindex @key{TAB} | |
4377 @findex mh-letter-next-header-field-or-indent | |
4378 @item @key{TAB} | |
4379 Cycle to next field (@code{mh-letter-next-header-field-or-indent}). | |
4380 @c ------------------------- | |
4381 @kindex S-@key{TAB} | |
4382 @findex mh-letter-previous-header-field | |
4383 @item S-@key{TAB} | |
4384 Cycle to the previous header field | |
4385 (@code{mh-letter-previous-header-field}). | |
4386 @c ------------------------- | |
4387 @kindex C-c ? | |
4388 @findex mh-help | |
4389 @item C-c ? | |
4390 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
4391 @c ------------------------- | |
4392 @cindex @samp{Letter > Send This Draft} menu item | |
4393 @cindex menu item, @samp{Letter > Send This Draft} | |
4394 @kindex C-c C-c | |
4395 @findex mh-send-letter | |
4396 @item C-c C-c | |
4397 Save draft and send message (@code{mh-send-letter}). | |
4398 @c ------------------------- | |
4399 @kindex C-c C-d | |
4400 @findex mh-insert-identity | |
4401 @item C-c C-d | |
4402 Insert fields specified by the given identity | |
4403 (@code{mh-insert-identity}). @xref{Identities}. | |
4404 @c ------------------------- | |
4405 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item | |
4406 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)} | |
4407 @kindex C-c C-e | |
4408 @findex mh-mh-to-mime | |
4409 @item C-c C-e | |
4410 Compose @sc{mime} message from MH-style directives | |
4411 (@code{mh-mh-to-mime}). | |
4412 @c ------------------------- | |
4413 @kindex C-c C-f C-a | |
4414 @kindex C-c C-f a | |
4415 @findex mh-to-field | |
4416 @item C-c C-f C-a | |
4417 @itemx C-c C-f a | |
4418 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}). | |
4419 @c ------------------------- | |
4420 @kindex C-c C-f C-b | |
4421 @kindex C-c C-f b | |
4422 @item C-c C-f C-b | |
4423 @itemx C-c C-f b | |
4424 Move to @samp{Bcc:} header field (@code{mh-to-field}). | |
4425 @c ------------------------- | |
4426 @kindex C-c C-f C-c | |
4427 @kindex C-c C-f c | |
4428 @item C-c C-f C-c | |
4429 @itemx C-c C-f c | |
4430 Move to @samp{Cc:} header field (@code{mh-to-field}). | |
4431 @c ------------------------- | |
4432 @kindex C-c C-f C-d | |
4433 @kindex C-c C-f d | |
4434 @item C-c C-f C-d | |
4435 @itemx C-c C-f d | |
4436 Move to @samp{Dcc:} header field (@code{mh-to-field}). | |
4437 @c ------------------------- | |
4438 @kindex C-c C-f C-f | |
4439 @kindex C-c C-f f | |
4440 @findex mh-to-fcc | |
4441 @item C-c C-f C-f | |
4442 @itemx C-c C-f f | |
4443 Move to @samp{Fcc:} header field (@code{mh-to-fcc}). | |
4444 @c ------------------------- | |
4445 @kindex C-c C-f C-l | |
4446 @kindex C-c C-f l | |
4447 @item C-c C-f C-l | |
4448 @itemx C-c C-f l | |
4449 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}). | |
4450 @c ------------------------- | |
4451 @kindex C-c C-f C-m | |
4452 @kindex C-c C-f m | |
4453 @item C-c C-f C-m | |
4454 @itemx C-c C-f m | |
4455 Move to @samp{From:} header field (@code{mh-to-field}). | |
4456 @c ------------------------- | |
4457 @kindex C-c C-f C-r | |
4458 @kindex C-c C-f r | |
4459 @item C-c C-f C-r | |
4460 @itemx C-c C-f r | |
4461 Move to @samp{Reply-To:} header field (@code{mh-to-field}). | |
4462 @c ------------------------- | |
4463 @kindex C-c C-f C-s | |
4464 @kindex C-c C-f s | |
4465 @item C-c C-f C-s | |
4466 @itemx C-c C-f s | |
4467 Move to @samp{Subject:} header field (@code{mh-to-field}). | |
4468 @c ------------------------- | |
4469 @kindex C-c C-f C-t | |
4470 @kindex C-c C-f t | |
4471 @item C-c C-f C-t | |
4472 @itemx C-c C-f t | |
4473 Move to @samp{To:} header field (@code{mh-to-field}). | |
4474 @c ------------------------- | |
4475 @cindex @samp{Letter > Insert a Message...} menu item | |
4476 @cindex menu item, @samp{Letter > Insert a Message...} | |
4477 @kindex C-c C-i | |
4478 @findex mh-insert-letter | |
4479 @item C-c C-i | |
4480 Insert a message (@code{mh-insert-letter}). | |
4481 @c ------------------------- | |
4482 @kindex C-c C-m C-e | |
4483 @findex mh-mml-secure-message-encrypt | |
4484 @item C-c C-m C-e | |
4485 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}). | |
4486 @c ------------------------- | |
4487 @cindex @samp{Letter > Compose Forward...} menu item | |
4488 @cindex menu item, @samp{Letter > Compose Forward...} | |
4489 @kindex C-c C-m C-f | |
4490 @kindex C-c C-m f | |
4491 @findex mh-compose-forward | |
4492 @item C-c C-m C-f | |
4493 @itemx C-c C-m f | |
4494 Add tag to forward a message (@code{mh-compose-forward}). | |
4495 @c ------------------------- | |
4496 @cindex @samp{Letter > Compose Get File (MH)...} menu item | |
4497 @cindex menu item, @samp{Letter > Compose Get File (MH)...} | |
4498 @kindex C-c C-m C-g | |
4499 @kindex C-c C-m g | |
4500 @findex mh-mh-compose-anon-ftp | |
4501 @item C-c C-m C-g | |
4502 @itemx C-c C-m g | |
4503 Add tag to include anonymous ftp reference to a file | |
4504 (@code{mh-mh-compose-anon-ftp}). | |
4505 @c ------------------------- | |
4506 @cindex @samp{Letter > Compose Insertion...} menu item | |
4507 @cindex menu item, @samp{Letter > Compose Insertion...} | |
4508 @kindex C-c C-m C-i | |
4509 @kindex C-c C-m i | |
4510 @findex mh-compose-insertion | |
4511 @item C-c C-m C-i | |
4512 @itemx C-c C-m i | |
4513 Add tag to include a file such as an image or sound | |
4514 (@code{mh-compose-insertion}). | |
4515 @c ------------------------- | |
4516 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item | |
4517 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)} | |
4518 @kindex C-c C-m C-m | |
4519 @kindex C-c C-m m | |
4520 @findex mh-mml-to-mime | |
4521 @item C-c C-m C-m | |
4522 @itemx C-c C-m m | |
4523 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}). | |
4524 @c ------------------------- | |
4525 @kindex C-c C-m C-n | |
4526 @kindex C-c C-m n | |
4527 @findex mh-mml-unsecure-message | |
4528 @item C-c C-m C-n | |
4529 @itemx C-c C-m n | |
4530 Remove any secure message tags (@code{mh-mml-unsecure-message}). | |
4531 @c ------------------------- | |
4532 @kindex C-c C-m C-s | |
4533 @findex mh-mml-secure-message-sign | |
4534 @item C-c C-m C-s | |
4535 Add tag to sign the message (@code{mh-mml-secure-message-sign}). | |
4536 @c ------------------------- | |
4537 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item | |
4538 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...} | |
4539 @kindex C-c C-m C-t | |
4540 @kindex C-c C-m t | |
4541 @findex mh-mh-compose-external-compressed-tar | |
4542 @item C-c C-m C-t | |
4543 @itemx C-c C-m t | |
4544 Add tag to include anonymous ftp reference to a compressed tar file | |
4545 (@code{mh-mh-compose-external-compressed-tar}). | |
4546 @c ------------------------- | |
4547 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item | |
4548 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)} | |
4549 @kindex C-c C-m C-u | |
4550 @kindex C-c C-m u | |
4551 @findex mh-mh-to-mime-undo | |
4552 @item C-c C-m C-u | |
4553 @itemx C-c C-m u | |
4554 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}). | |
4555 @c ------------------------- | |
4556 @kindex C-c C-m C-x | |
4557 @kindex C-c C-m x | |
4558 @findex mh-mh-compose-external-type | |
4559 @item C-c C-m C-x | |
4560 @itemx C-c C-m x | |
4561 Add tag to refer to a remote file | |
4562 (@code{mh-mh-compose-external-type}). | |
4563 @c ------------------------- | |
4564 @kindex C-c C-m e e | |
4565 @findex mh-mml-secure-message-encrypt | |
4566 @item C-c C-m e e | |
4567 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}). | |
4568 @c ------------------------- | |
4569 @kindex C-c C-m e s | |
4570 @findex mh-mml-secure-message-signencrypt | |
4571 @item C-c C-m e s | |
4572 Add tag to encrypt and sign the message@* | |
4573 (@code{mh-mml-secure-message-signencrypt}). | |
4574 @c ------------------------- | |
4575 @kindex C-c C-m s e | |
4576 @findex mh-mml-secure-message-signencrypt | |
4577 @item C-c C-m s e | |
4578 Add tag to encrypt and sign the message@* | |
4579 (@code{mh-mml-secure-message-signencrypt}). | |
4580 @c ------------------------- | |
4581 @kindex C-c C-m s s | |
4582 @findex mh-mml-secure-message-sign | |
4583 @item C-c C-m s s | |
4584 Add tag to sign the message (@code{mh-mml-secure-message-sign}). | |
4585 @c ------------------------- | |
4586 @cindex @samp{Letter > Split Current Line} menu item | |
4587 @cindex menu item, @samp{Letter > Split Current Line} | |
4588 @kindex C-c C-o | |
4589 @findex mh-open-line | |
4590 @item C-c C-o | |
4591 Insert a newline and leave point before it (@code{mh-open-line}). | |
4592 @c ------------------------- | |
4593 @cindex @samp{Letter > Kill This Draft} menu item | |
4594 @cindex menu item, @samp{Letter > Kill This Draft} | |
4595 @kindex C-c C-q | |
4596 @findex mh-fully-kill-draft | |
4597 @item C-c C-q | |
4598 Quit editing and delete draft message (@code{mh-fully-kill-draft}). | |
4599 @c ------------------------- | |
4600 @cindex @samp{Letter > Insert Signature} menu item | |
4601 @cindex menu item, @samp{Letter > Insert Signature} | |
4602 @kindex C-c C-s | |
4603 @findex mh-insert-signature | |
4604 @item C-c C-s | |
4605 Insert signature in message (@code{mh-insert-signature}). | |
4606 @c ------------------------- | |
4607 @kindex C-c C-t | |
4608 @findex mh-letter-toggle-header-field-display | |
4609 @item C-c C-t | |
4610 Toggle display of header field at point | |
4611 (@code{mh-letter-toggle-header-field-display}). | |
4612 @c ------------------------- | |
4613 @cindex @samp{Letter > Check Recipient} menu item | |
4614 @cindex menu item, @samp{Letter > Check Recipient} | |
4615 @kindex C-c C-w | |
4616 @findex mh-check-whom | |
4617 @item C-c C-w | |
4618 Verify recipients, showing expansion of any aliases | |
4619 (@code{mh-check-whom}). | |
4620 @c ------------------------- | |
4621 @cindex @samp{Letter > Yank Current Message} menu item | |
4622 @cindex menu item, @samp{Letter > Yank Current Message} | |
4623 @kindex C-c C-y | |
4624 @findex mh-yank-cur-msg | |
4625 @item C-c C-y | |
4626 Insert the current message into the draft buffer | |
4627 (@code{mh-yank-cur-msg}). | |
4628 @c ------------------------- | |
4629 @kindex C-c M-d | |
4630 @findex mh-insert-auto-fields | |
4631 @item C-c M-d | |
4632 Insert custom fields if recipient is found in | |
4633 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}). | |
4634 @xref{Identities}. | |
4635 @end table | |
4636 | |
4637 @cindex @samp{mh-letter} customization group | |
4638 @cindex customization group, @samp{mh-letter} | |
4639 | |
4640 Several options from the @samp{mh-letter} customization group are used | |
4641 while editing a draft. | |
4642 | |
4643 @vtable @code | |
4644 @item mh-compose-insertion | |
4645 Type of @sc{mime} message tags in messages (default: @samp{MML} if | |
4646 available; otherwise @samp{MH}). | |
4647 @c ------------------------- | |
4648 @item mh-compose-skipped-header-fields | |
4649 List of header fields to skip over when navigating in draft (default: | |
4650 @code{'("From"} @code{"Organization"} @code{"References"} | |
4651 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"} | |
4652 @code{"X-Image-URL"} @code{"X-Mailer")}. | |
4653 @c ------------------------- | |
4654 @item mh-compose-space-does-completion-flag | |
4655 On means @key{SPC} does completion in message header (default: | |
4656 @samp{off}). | |
4657 @c ------------------------- | |
4658 @item mh-delete-yanked-msg-window-flag | |
4659 On means delete any window displaying the message (default: @samp{off}). | |
4660 @c ------------------------- | |
4661 @item mh-extract-from-attribution-verb | |
4662 Verb to use for attribution when a message is yanked by @kbd{C-c C-y} | |
4663 (default: @code{"wrote:"}). | |
4664 @c ------------------------- | |
4665 @item mh-ins-buf-prefix | |
4666 String to put before each line of a yanked or inserted message | |
4667 (default: @code{"> "}). | |
4668 @c ------------------------- | |
4669 @item mh-letter-complete-function | |
4670 Function to call when completing outside of address or folder fields | |
4671 (default: @code{ispell-complete-word}). | |
4672 @c ------------------------- | |
4673 @item mh-letter-fill-column | |
4674 Fill column to use in MH-Letter mode (default: 72). | |
4675 @c ------------------------- | |
4676 @item mh-mml-method-default | |
4677 Default method to use in security tags (default: @samp{PGP (MIME)} if | |
4678 support for it is available; otherwise @samp{None}). | |
4679 @c ------------------------- | |
4680 @item mh-signature-file-name | |
4681 Source of user's signature (default: @code{"~/.signature"}). | |
4682 @c ------------------------- | |
4683 @item mh-signature-separator-flag | |
4684 On means a signature separator should be inserted (default: | |
4685 @samp{on}). | |
4686 @c ------------------------- | |
4687 @item mh-x-face-file | |
4688 File containing X-Face or Face header field to insert in outgoing mail. | |
4689 (default: @code{"~/.face"}). | |
4690 @c ------------------------- | |
4691 @item mh-yank-behavior | |
4692 Controls which part of a message is yanked by @kbd{C-c C-y} (default: | |
4693 @samp{Body With Attribution}). | |
4694 @end vtable | |
4695 | |
4696 The following hooks are available. | |
4697 | |
4698 @vtable @code | |
4699 @item mail-citation-hook | |
4700 Hook for modifying a citation just inserted in the mail buffer | |
4701 (default: @code{nil}). | |
4702 @c ------------------------- | |
4703 @item mh-before-send-letter-hook | |
4704 Hook run at the beginning of the @kbd{C-c C-c} command (default: | |
4705 @samp{nil}). | |
4706 @c ------------------------- | |
4707 @item mh-mh-to-mime-hook | |
4708 Hook run on the formatted letter by @kbd{C-c C-e} (default: | |
4709 @samp{nil}). | |
4710 @c ------------------------- | |
4711 @item mh-insert-signature-hook | |
4712 Hook run by @kbd{C-c C-s} after signature has been inserted (default: | |
4713 @code{nil}). | |
4714 @end vtable | |
4715 | |
4716 The following face is available. | |
4717 | |
4718 @vtable @code | |
4719 @item mh-letter-header-field | |
4720 Editable header field value face in draft buffers. | |
4721 @end vtable | |
4722 | |
4723 The commands and options introduced here are explained in more | |
4724 detail in the following sections. | |
4725 | |
4726 @menu | |
4727 * Editing Message:: | |
4728 * Inserting Letter:: | |
4729 * Inserting Messages:: | |
4730 * Signature:: | |
4731 * Picture:: | |
4732 * Adding Attachments:: | |
4733 * Sending PGP:: | |
4734 * Checking Recipients:: | |
4735 * Sending Message:: | |
4736 * Killing Draft:: | |
4737 @end menu | |
4738 | |
4739 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts | |
4740 @section Editing the Message | |
4741 | |
4742 @cindex @samp{Bcc:} header field | |
4743 @cindex @samp{Cc:} header field | |
4744 @cindex @samp{Dcc:} header field | |
4745 @cindex @samp{From:} header field | |
4746 @cindex @samp{Mail-Followup-To:} header field | |
4747 @cindex @samp{Mail-Reply-To:} header field | |
4748 @cindex @samp{Reply-To:} header field | |
4749 @cindex @samp{Subject:} header field | |
4750 @cindex @samp{To:} header field | |
4751 @cindex editing header | |
4752 @cindex header field, @samp{Bcc:} | |
4753 @cindex header field, @samp{Cc:} | |
4754 @cindex header field, @samp{Dcc:} | |
4755 @cindex header field, @samp{From:} | |
4756 @cindex header field, @samp{Mail-Followup-To:} | |
4757 @cindex header field, @samp{Mail-Reply-To:} | |
4758 @cindex header field, @samp{Reply-To:} | |
4759 @cindex header field, @samp{Subject:} | |
4760 @cindex header field, @samp{To:} | |
4761 @findex mh-to-field | |
4762 @kindex C-c C-f C-t | |
4763 @kindex C-c C-f t | |
4764 | |
4765 Because the header is part of the message, you can edit the header | |
4766 fields as you wish. However, several convenience commands exist to | |
4767 help you create and edit them. For example, the command @kbd{C-c C-f | |
4768 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the | |
4769 cursor to the @samp{To:} header field, creating it if necessary. The | |
4770 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:}, | |
4771 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To}, | |
4772 @samp{Bcc:}, and @samp{Dcc:} header fields are similar. | |
4773 | |
4774 @findex mh-to-fcc | |
4775 @kindex C-c C-f C-f | |
4776 @kindex C-c C-f f | |
4777 | |
4778 One command behaves differently from the others, namely, @kbd{C-c C-f | |
4779 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command | |
4780 will prompt you for the folder name in which to file a copy of the | |
4781 draft. @xref{Folder Selection}. | |
4782 | |
4783 @findex indent-relative | |
4784 @findex mh-letter-next-header-field-or-indent | |
4785 @findex mh-letter-previous-header-field | |
4786 @kindex @key{TAB} | |
4787 @kindex S-@key{TAB} | |
4788 @vindex mh-compose-skipped-header-fields | |
4789 @vindex mh-letter-header-field | |
4790 | |
4791 Within the header of the message, the command@* @key{TAB} | |
4792 (@code{mh-letter-next-header-field-or-indent}) moves between fields | |
4793 that are highlighted with the face @code{mh-letter-header-field}, | |
4794 skipping those fields listed in | |
4795 @code{mh-compose-skipped-header-fields}. After the last field, this | |
4796 command then moves point to the message body before cycling back to | |
4797 the first field. If point is already past the first line of the | |
4798 message body, then this command indents by calling | |
4799 @code{indent-relative} with the given prefix argument. The command | |
4800 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves | |
4801 backwards between the fields and cycles to the body of the message | |
4802 after the first field. Unlike the command @key{TAB}, it will always | |
4803 take point to the last field from anywhere in the body. | |
4804 | |
4805 @cindex alias completion | |
4806 @cindex completion | |
4807 @cindex spell check | |
4808 @findex ispell-complete-word | |
4809 @findex mh-letter-complete | |
4810 @findex mh-letter-complete-or-space | |
4811 @findex mh-letter-confirm-address | |
4812 @kindex , (comma) | |
4813 @kindex @key{SPC} | |
4814 @kindex M-@key{TAB} | |
4815 @vindex mh-alias-flash-on-comma | |
4816 @vindex mh-compose-space-does-completion-flag | |
4817 @vindex mh-letter-complete-function | |
4818 | |
4819 If the field contains addresses (for example, @samp{To:} or | |
4820 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command | |
4821 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias | |
4822 completion (@pxref{Aliases}). In the body of the message, | |
4823 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead, | |
4824 which is set to @samp{'ispell-complete-word} by default. The command | |
4825 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument | |
4826 that is passed to the @code{mh-letter-complete-function}. In addition, | |
4827 turn on the option @code{mh-compose-space-does-completion-flag} to use | |
4828 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform | |
4829 completion in the header as well; use a prefix argument to specify | |
4830 more than one space. Addresses are separated by a comma; when you | |
4831 press the comma, the command @code{mh-letter-confirm-address} flashes | |
4832 the alias expansion in the minibuffer if | |
4833 @code{mh-alias-flash-on-comma} is turned on. | |
4834 | |
4835 @c XXX Document the replacement for the inaccessible 'long argument. | |
4836 | |
4837 @findex mh-letter-toggle-header-field-display | |
4838 @kindex C-c C-t | |
4839 | |
4840 Use the command @kbd{C-c C-t} | |
4841 @code{mh-letter-toggle-header-field-display} to display truncated | |
4842 header fields. This command is a toggle so entering it again will hide | |
4843 the field. This command takes a prefix argument: if negative then the | |
4844 field is hidden, if positive then the field is displayed (for example, | |
4845 @kbd{C-u C-c C-t}). | |
4846 | |
4847 Be sure to leave a row of dashes or a blank line between the header | |
4848 and the body of the message. | |
4849 | |
4850 @vindex mh-letter-fill-column | |
4851 | |
4852 The body of the message is edited as you would edit any Emacs buffer | |
4853 although there are a few commands and options to assist you. You can | |
4854 change the fill column in MH-Letter mode with the option | |
4855 @code{mh-letter-fill-column}. By default, this option is 72 to allow | |
4856 others to quote your message without line wrapping. | |
4857 | |
4858 @cindex filling paragraphs | |
4859 @cindex paragraphs, filling | |
4860 @findex fill-paragraph | |
4861 @kindex M-q | |
4862 @vindex mh-ins-buf-prefix | |
4863 | |
4864 You'll often include messages that were sent from user agents that | |
4865 haven't yet realized that paragraphs consist of more than a single | |
4866 line. This makes for long lines that wrap in an ugly fashion. You'll | |
4867 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these | |
4868 quoted messages, even if they are nested, just as long as all of the | |
4869 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting | |
4870 Letter}). For example, let's assume you have the following in your | |
4871 draft: | |
4872 | |
4873 @smallexample | |
4874 @group | |
4875 > Hopefully this gives you an idea of what I'm currently doing. I'm \ | |
4876 not sure yet whether I'm completely satisfied with my setup, but \ | |
4877 it's worked okay for me so far. | |
4878 @end group | |
4879 @end smallexample | |
4880 | |
4881 Running @kbd{M-q} on this paragraph produces: | |
4882 | |
4883 @smallexample | |
4884 @group | |
4885 > Hopefully this gives you an idea of what I'm currently doing. I'm not | |
4886 > sure yet whether I'm completely satisfied with my setup, but it's | |
4887 > worked okay for me so far. | |
4888 @end group | |
4889 @end smallexample | |
4890 | |
4891 @findex mh-open-line | |
4892 @findex open-line | |
4893 @kindex C-c C-o | |
4894 @kindex C-o | |
4895 | |
4896 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the | |
4897 command @kbd{C-o} (@code{open-line}) in that it inserts a newline | |
4898 after point. It differs in that it also inserts the right number of | |
4899 quoting characters and spaces so that the next line begins in the same | |
4900 column as it was. This is useful when breaking up paragraphs in | |
4901 replies. For example, if this command was used when point was after | |
4902 the first period in the paragraph above, the result would be this: | |
4903 | |
4904 @smallexample | |
4905 @group | |
4906 > Hopefully this gives you an idea of what I'm currently doing. | |
4907 | |
4908 > I'm not | |
4909 > sure yet whether I'm completely satisfied with my setup, but it's | |
4910 > worked okay for me so far. | |
4911 @end group | |
4912 @end smallexample | |
4913 | |
4914 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts | |
4915 @section Inserting Letter to Which You're Replying | |
4916 | |
4917 @cindex inserting messages | |
4918 @cindex replying to messages | |
4919 @cindex yanking messages | |
4920 @findex mh-yank-cur-msg | |
4921 @kindex C-c C-y | |
4922 @vindex mh-ins-buf-prefix | |
4923 | |
4924 It is often useful to insert a snippet of text from a letter that | |
4925 someone mailed to provide some context for your reply. The command | |
4926 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an | |
4927 attribution, yanking a portion of text from the message to which | |
4928 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> }) | |
4929 before each line. | |
4930 | |
4931 @smallexample | |
4932 @group | |
4933 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote: | |
4934 | |
4935 > Hopefully this gives you an idea of what I'm currently doing. I'm not | |
4936 > sure yet whether I'm completely satisfied with my setup, but it's | |
4937 > worked okay for me so far. | |
4938 @end group | |
4939 @end smallexample | |
4940 | |
4941 @vindex mh-extract-from-attribution-verb | |
4942 | |
4943 The attribution consists of the sender's name and email address | |
4944 followed by the content of the option | |
4945 @code{mh-extract-from-attribution-verb}. This option can be set to | |
4946 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use | |
4947 the @samp{Custom String} menu item to enter your own verb. | |
4948 | |
4949 @vindex mail-citation-hook | |
4950 @vindex mh-ins-buf-prefix | |
4951 @vindex mh-yank-behavior | |
4952 | |
4953 The prefix @code{"> "} is the default setting for the option | |
4954 @code{mh-ins-buf-prefix}. I suggest that you not modify this option | |
4955 since it is used by many mailers and news readers: messages are far | |
4956 easier to read if several included messages have all been indented by | |
4957 the same string. This prefix is not inserted if you use one of the | |
4958 supercite flavors of @code{mh-yank-behavior} or you have added a | |
4959 @code{mail-citation-hook} as described below. | |
4960 | |
4961 @vindex mh-delete-yanked-msg-window-flag | |
4962 | |
4963 You can also turn on the @code{mh-delete-yanked-msg-window-flag} | |
4964 option to delete the window containing the original message after | |
4965 yanking it to make more room on your screen for your reply. | |
4966 | |
4967 @cindex Emacs, packages, supercite | |
4968 @cindex supercite package | |
4969 @kindex r | |
4970 @vindex mail-citation-hook | |
4971 @vindex mh-yank-behavior | |
4972 | |
4973 You can control how the message to which you are replying is yanked | |
4974 into your reply using @code{mh-yank-behavior}. To include the entire | |
4975 message, including the entire header, use @samp{Body and | |
4976 Header}@footnote{If you'd rather have the header cleaned up, use | |
4977 @kbd{C-u r} instead of @kbd{r} when replying | |
4978 (@pxref{Replying}).}@footnote{In the past you would use this setting | |
4979 and set @code{mail-citation-hook} to @samp{supercite}, but this usage | |
4980 is now deprecated in favor of the @samp{Invoke supercite} setting.}. | |
4981 Use @samp{Body} to yank just the body without the header. To yank only | |
4982 the portion of the message following the point, set this option to | |
4983 @samp{Below Point}. | |
4984 | |
4985 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a | |
4986 full-bodied, full-featured, citation package that comes standard with | |
4987 Emacs.} to pass the entire message and header through supercite. | |
4988 | |
4989 @vindex mh-extract-from-attribution-verb | |
4990 | |
4991 If the @samp{Body With Attribution} setting is used, then the message | |
4992 minus the header is yanked and a simple attribution line is added at | |
4993 the top using the value of the option | |
4994 @code{mh-extract-from-attribution-verb}. This is the default. | |
4995 | |
4996 @kindex C-c C-y | |
4997 @vindex mh-delete-yanked-msg-window-flag | |
4998 | |
4999 If the @samp{Invoke supercite} or @samp{Body With Attribution} | |
5000 settings are used, the @samp{-noformat} argument is passed to the | |
5001 @command{repl} program to override a @samp{-filter} or @samp{-format} | |
5002 argument. These settings also have @samp{Automatically} variants that | |
5003 perform the action automatically when you reply so that you don't need | |
5004 to use @kbd{C-c C-y} at all. Note that this automatic action is only | |
5005 performed if the show buffer matches the message being replied to. | |
5006 People who use the automatic variants tend to turn on the option | |
5007 @code{mh-delete-yanked-msg-window-flag} as well so that the show | |
5008 window is never displayed. | |
5009 | |
5010 @vindex mh-yank-behavior | |
5011 | |
5012 If the show buffer has a region, the option @code{mh-yank-behavior} is | |
5013 ignored unless its value is one of @samp{Attribution} variants in | |
5014 which case the attribution is added to the yanked region. | |
5015 | |
5016 @findex trivial-cite | |
5017 @vindex mail-citation-hook | |
5018 @vindex mh-ins-buf-prefix | |
5019 @vindex mh-yank-behavior | |
5020 | |
5021 If this isn't enough, you can gain full control over the appearance of | |
5022 the included text by setting @code{mail-citation-hook} to a function | |
5023 that modifies it. This hook is ignored if the option | |
5024 @code{mh-yank-behavior} is set to one of the supercite flavors. | |
5025 Otherwise, this option controls how much of the message is passed to | |
5026 the hook. The function can find the citation between point and mark | |
5027 and it should leave point and mark around the modified citation text | |
5028 for the next hook function. The standard prefix | |
5029 @code{mh-ins-buf-prefix} is not added if this hook is set. | |
5030 | |
5031 @cindex Emacs, packages, trivial-cite | |
5032 @cindex trivial-cite package | |
5033 @vindex mh-yank-behavior | |
5034 | |
5035 For example, if you use the hook function | |
5036 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html, | |
5037 @code{trivial-cite}} (which is NOT part of Emacs), set | |
5038 @code{mh-yank-behavior} to @samp{Body and Header}. | |
5039 | |
5040 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts | |
5041 @section Inserting Messages | |
5042 | |
5043 @cindex inserting messages | |
5044 @findex mh-insert-letter | |
5045 @findex mh-yank-behavior | |
5046 @kindex C-c C-i | |
5047 @vindex mh-ins-buf-prefix | |
5048 @vindex mh-invisible-header-fields-compiled | |
5049 @vindex mh-yank-behavior | |
5050 | |
5051 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}). | |
5052 This command prompts you for the folder and message number, which | |
5053 defaults to the current message in that folder. It then inserts the | |
5054 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless | |
5055 @code{mh-yank-behavior} is set to one of the supercite flavors in | |
5056 which case supercite is used to format the message. Certain | |
5057 undesirable header fields (see | |
5058 @code{mh-invisible-header-fields-compiled}) are removed before | |
5059 insertion. | |
5060 | |
5061 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is | |
5062 left intact, the message is not indented, and @samp{> } is not | |
5063 inserted before each line. This command leaves the mark before the | |
5064 letter and point after it. | |
5065 | |
5066 @node Signature, Picture, Inserting Messages, Editing Drafts | |
5067 @section Inserting Your Signature | |
5068 | |
5069 @cindex signature | |
5070 @findex mh-insert-signature | |
5071 @kindex C-c C-s | |
5072 | |
5073 You can insert your signature at the current cursor location with the | |
5074 command @kbd{C-c C-s} (@code{mh-insert-signature}). | |
5075 | |
5076 @cindex files, @file{.signature} | |
5077 @cindex @file{.signature} | |
5078 @cindex vCard | |
5079 @vindex mh-signature-file-name | |
5080 | |
5081 By default, the text of your signature is taken from the file | |
5082 @file{~/.signature}. You can read from other sources by changing the | |
5083 option @code{mh-signature-file-name}. This file may contain a | |
5084 @dfn{vCard} in which case an attachment is added with the vCard. | |
5085 | |
5086 @findex mh-signature-separator-p | |
5087 @vindex mh-signature-file-name | |
5088 @vindex mh-signature-separator | |
5089 @vindex mh-signature-separator-regexp | |
5090 | |
5091 The option @code{mh-signature-file-name} may also be a symbol, in | |
5092 which case that function is called. You may not want a signature | |
5093 separator to be added for you; instead you may want to insert one | |
5094 yourself. Options that you may find useful to do this include | |
5095 @code{mh-signature-separator} (when inserting a signature separator) | |
5096 and @code{mh-signature-separator-regexp} (for finding said separator). | |
5097 The function @code{mh-signature-separator-p}, which reports @code{t} | |
5098 if the buffer contains a separator, may be useful as well. | |
5099 | |
5100 @cindex signature separator | |
5101 @vindex mh-signature-separator-flag | |
5102 | |
5103 A signature separator (@code{"-- "}) will be added if the signature | |
5104 block does not contain one and @code{mh-signature-separator-flag} is | |
5105 on. It is not recommended that you change this option since various | |
5106 mail user agents, including MH-E, use the separator to present the | |
5107 signature differently, and to suppress the signature when replying or | |
5108 yanking a letter into a draft. | |
5109 | |
5110 @vindex mh-insert-signature-hook | |
5111 @vindex mh-signature-file-name | |
5112 | |
5113 The hook @code{mh-insert-signature-hook} is run after the signature is | |
5114 inserted. Hook functions may access the actual name of the file or the | |
5115 function used to insert the signature with | |
5116 @code{mh-signature-file-name}. | |
5117 | |
5118 The signature can also be inserted using Identities. | |
5119 @xref{Identities}. | |
5120 | |
5121 @node Picture, Adding Attachments, Signature, Editing Drafts | |
5122 @section Inserting Your Picture | |
5123 | |
5124 @cindex @file{.face} | |
5125 @cindex files, @file{.face} | |
5126 @vindex mh-x-face-file | |
5127 | |
5128 You can insert your picture in the header of your mail message so that | |
5129 recipients see your face in the @samp{From:} header field if their | |
5130 mail user agent is sophisticated enough. In MH-E, this is done by | |
5131 placing your image in the file named by the option | |
5132 @code{mh-x-face-file} which is @file{~/.face} by default. | |
5133 | |
5134 @cindex @samp{Face:} header field | |
5135 @cindex @samp{X-Face:} header field | |
5136 @cindex @samp{X-Image-URL:} header field | |
5137 @cindex header field, @samp{Face:} | |
5138 @cindex header field, @samp{X-Face:} | |
5139 @cindex header field, @samp{X-Image-URL:} | |
5140 | |
5141 If the file starts with either of the strings @samp{X-Face:}, | |
5142 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the | |
5143 message header verbatim. Otherwise it is assumed that the file | |
5144 contains the value of the @samp{X-Face:} header field. | |
5145 | |
5146 @cindex @command{compface} | |
5147 @cindex Unix commands, @command{compface} | |
5148 | |
5149 The @samp{X-Face:} header field, which is a low-resolution, black and | |
5150 white image, can be generated using the | |
5151 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, | |
5152 @command{compface}} command. The @uref{http://www.dairiki.org/xface/, | |
5153 @cite{Online X-Face Converter}} is a useful resource for quick | |
5154 conversion of images into @samp{X-Face:} header fields. | |
5155 | |
5156 Use the @uref{http://quimby.gnus.org/circus/face/make-face, | |
5157 @command{make-face}} script to convert a JPEG image to the higher | |
5158 resolution, color, @samp{Face:} header field. | |
5159 | |
5160 The URL of any image can be used for the @samp{X-Image-URL:} field and | |
5161 no processing of the image is required. | |
5162 | |
5163 @vindex mh-x-face-file | |
5164 | |
5165 To prevent the setting of any of these header fields, either set | |
5166 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file | |
5167 defined by this option doesn't exist. | |
5168 | |
5169 @xref{Viewing}, to see how these header fields are displayed in MH-E. | |
5170 | |
5171 @node Adding Attachments, Sending PGP, Picture, Editing Drafts | |
5172 @section Adding Attachments | |
5173 | |
5174 @cindex @command{mhbuild} | |
5175 @cindex @command{mhn} | |
5176 @cindex MH commands, @command{mhbuild} | |
5177 @cindex MH commands, @command{mhn} | |
5178 @cindex MIME | |
5179 @cindex multimedia mail | |
5180 | |
5181 MH-E has the capability to create multimedia messages. It uses the | |
5182 @sc{mime} (Multipurpose Internet Mail Extensions) | |
5183 protocol@footnote{@sc{mime} is defined in | |
5184 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The | |
5185 @sc{mime} protocol allows you to incorporate images, sound, video, | |
5186 binary files, and even commands that fetch a file with @samp{ftp} when | |
5187 your recipient reads the message! | |
5188 | |
5189 @kindex C-c C-m | |
5190 | |
5191 If you were to create a multimedia message with plain MH commands, you | |
5192 would insert @command{mhbuild} or @command{mhn} directives (henceforth | |
5193 called @dfn{MH-style directives} into your draft and use the | |
5194 @command{mhbuild} command in nmh or @command{mhn} command in MH and | |
5195 GNU mailutils to expand them. MH-E works in much the same way, | |
5196 although it provides a handful of commands prefixed with @kbd{C-c C-m} | |
5197 to insert the directives so you don't need to remember the syntax of | |
5198 them. Remember: you can always add MH-style directives by | |
5199 hand@footnote{See the section | |
5200 @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in | |
5201 the MH book.}. | |
5202 | |
5203 @cindex MIME Meta Language (MML) | |
5204 @cindex MML | |
5205 @vindex mh-compose-insertion | |
5206 | |
5207 In addition to MH-style directives, MH-E also supports MML (@sc{mime} | |
5208 Meta Language) tags@footnote{ | |
5209 @ifinfo | |
5210 @c Although the third argument should default to the | |
5211 @c first, makeinfo goes to the wrong Info file without it being | |
5212 @c different--it seems to be getting our own Composing node. | |
5213 @xref{Composing,,Composing with MML,emacs-mime}. | |
5214 @end ifinfo | |
5215 @ifnotinfo | |
5216 See the section Composing in | |
5217 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME | |
5218 Manual}}. | |
5219 @end ifnotinfo | |
5220 }. The option @code{mh-compose-insertion} can be used to choose | |
5221 between them. By default, this option is set to @samp{MML} if it is | |
5222 supported since it provides a lot more functionality. This option can | |
5223 also be set to @samp{MH} if MH-style directives are preferred. | |
5224 | |
5225 @cindex media types | |
5226 @cindex MIME, media types | |
5227 | |
5228 The MH-E @sc{mime} commands require a @dfn{media type} for each body | |
5229 part or attachment. For example, a PDF document is of type | |
5230 @samp{application/pdf} and an HTML document is of type | |
5231 @samp{text/html}. Some commands fill in the media type for you, | |
5232 whereas others require you to enter one. | |
5233 | |
5234 @cindex @command{file} | |
5235 @cindex @file{/etc/mime.types} | |
5236 @cindex files, @file{/etc/mime.types} | |
5237 @cindex Unix commands, @command{file} | |
5238 @findex mailcap-mime-types | |
5239 | |
5240 In the cases where MH-E can do so, it will determine the media type | |
5241 automatically. It uses the @command{file} command to do this. Failing | |
5242 that, the Emacs function @code{mailcap-mime-types} is used to provide | |
5243 a list from which to choose. This function usually reads the file | |
5244 @file{/etc/mime.types}. | |
5245 | |
5246 Whether the media type is chosen automatically, or you choose it from | |
5247 a list, use the type that seems to match best the file that you are | |
5248 including. In the case of binaries, the media type | |
5249 @samp{application/x-executable} can be useful. If you can't find an | |
5250 appropriate media type, use @samp{text/plain} for text messages and | |
5251 @samp{application/octet-stream} for everything else. | |
5252 | |
5253 @cindex content description | |
5254 @cindex MIME, content description | |
5255 | |
5256 You are also sometimes asked for a @dfn{content description}. This is | |
5257 simply an optional brief phrase, in your own words, that describes the | |
5258 object. If you don't care to enter a content description, just press | |
5259 return and none will be included; however, a reader may skip over | |
5260 multimedia fields unless the content description is compelling. | |
5261 | |
5262 You can also create your own @sc{mime} body parts. In the following | |
5263 example, I describe how you can create and edit a @samp{text/enriched} | |
5264 body part to liven up your plain text messages with boldface, | |
5265 underlining, and italics. I include an Emacs function which inserts | |
5266 enriched text tags. | |
5267 | |
5268 @smalllisp | |
5269 @group | |
5270 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic") | |
5271 ("u" . "underline") | |
5272 ("s" . "smaller") ("B" . "bigger") | |
5273 ("f" . "fixed") | |
5274 ("c" . "center")) | |
5275 "Alist of (final-character . tag) choices for add-enriched-text. | |
5276 Additional types can be found in RFC 1563.") | |
5277 | |
5278 (defun add-enriched-text (begin end) | |
5279 "Add enriched text tags around region. | |
5280 The tag used comes from the list enriched-text-types and is | |
5281 specified by the last keystroke of the command. When called from Lisp, | |
5282 arguments are BEGIN and END@." | |
5283 (interactive "r") | |
5284 ;; @r{Set type to the tag indicated by the last keystroke.} | |
5285 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`})) | |
5286 enriched-text-types)))) | |
5287 (save-restriction ; @r{restores state from narrow-to-region} | |
5288 (narrow-to-region begin end) ; @r{narrow view to region} | |
5289 (goto-char (point-min)) ; @r{move to beginning of text} | |
5290 (insert "<" type ">") ; @r{insert beginning tag} | |
5291 (goto-char (point-max)) ; @r{move to end of text} | |
5292 (insert "</" type ">")))) ; @r{insert terminating tag} | |
5293 @i{Emacs function for entering enriched text} | |
5294 | |
5295 @end group | |
5296 @end smalllisp | |
5297 | |
5298 To use the function @code{add-enriched-text}, first add it to | |
5299 @file{~/.emacs} and create key bindings for it (@pxref{Composing}). | |
5300 | |
5301 Then, in your plain text message, set the mark with @kbd{C-@@} or | |
5302 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t | |
5303 b}. This adds @samp{<bold>} where you set the mark and adds | |
5304 @samp{</bold>} at the location of your cursor, giving you something | |
5305 like: @samp{You should be <bold>very</bold>}. | |
5306 | |
5307 Before sending this message, use @kbd{C-c C-m C-m} | |
5308 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e} | |
5309 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add | |
5310 MIME header fields. Then replace @samp{text/plain} with | |
5311 @samp{text/enriched} in the @samp{Content-Type:} header field. | |
5312 | |
5313 You may also be interested in investigating @code{sgml-mode}. | |
5314 | |
5315 @subheading Including Files | |
5316 | |
5317 @cindex attachments, inserting | |
5318 @cindex images | |
5319 @cindex MIME, images | |
5320 @cindex MIME, sound | |
5321 @cindex MIME, video | |
5322 @cindex sound | |
5323 @cindex video | |
5324 @findex mh-compose-insertion | |
5325 @kindex C-c C-m C-i | |
5326 @kindex C-c C-m i | |
5327 @vindex mh-compose-insertion | |
5328 | |
5329 Binaries, images, sound, and video can be inserted in your message | |
5330 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You | |
5331 are prompted for the filename containing the object, the media type if | |
5332 it cannot be determined automatically, and a content description. If | |
5333 you're using MH-style directives, you will also be prompted for | |
5334 additional attributes. | |
5335 | |
5336 @subheading Forwarding Multimedia Messages | |
5337 | |
5338 @findex mh-compose-forward | |
5339 @kindex C-c C-m C-f | |
5340 @kindex C-c C-m f | |
5341 | |
5342 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m | |
5343 C-f} (@code{mh-compose-forward}). You are prompted for a content | |
5344 description, the name of the folder in which the messages to forward | |
5345 are located, and a range of messages, which defaults to the current | |
5346 message in that folder. @xref{Ranges}. | |
5347 | |
5348 @subheading Including an FTP Reference | |
5349 | |
5350 @cindex @command{ftp} | |
5351 @cindex MIME, @command{ftp} | |
5352 @cindex Unix commands, @command{ftp} | |
5353 @findex mh-mh-compose-anon-ftp | |
5354 @kindex C-c C-m C-g | |
5355 @kindex C-c C-m g | |
5356 | |
5357 You can have your message initiate an @command{ftp} transfer when the | |
5358 recipient reads the message. To do this, use the command @kbd{C-c C-m | |
5359 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote | |
5360 host and filename, the media type, and the content description. | |
5361 | |
5362 @subheading Including tar Files | |
5363 | |
5364 @cindex @command{ftp} | |
5365 @cindex @command{tar} | |
5366 @cindex MIME, @command{ftp} | |
5367 @cindex MIME, @command{tar} | |
5368 @cindex Unix commands, @command{ftp} | |
5369 @cindex Unix commands, @command{tar} | |
5370 @findex mh-mh-compose-anon-ftp | |
5371 @findex mh-mh-compose-external-compressed-tar | |
5372 @kindex C-c C-m C-g | |
5373 @kindex C-c C-m C-t | |
5374 @kindex C-c C-m t | |
5375 | |
5376 If the remote file is a compressed tar file, you can use @kbd{C-c C-m | |
5377 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition | |
5378 to retrieving the file via anonymous @emph{ftp} as per the command | |
5379 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also | |
5380 be uncompressed and untarred. You are prompted for the remote host and | |
5381 filename and the content description. | |
5382 | |
5383 @subheading Including Other External Files | |
5384 | |
5385 @findex mh-mh-compose-external-type | |
5386 @kindex C-c C-m C-x | |
5387 @kindex C-c C-m x | |
5388 | |
5389 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is | |
5390 a general utility for referencing external files. In fact, all of the | |
5391 other commands that insert tags to access external files call this | |
5392 command. You are prompted for the access type, remote host and | |
5393 filename, and content type. If you provide a prefix argument, you are | |
5394 also prompted for a content description, attributes, parameters, and a | |
5395 comment. | |
5396 | |
5397 @subheading Previewing Multimedia Messages | |
5398 | |
5399 When you are finished editing a @sc{mime} message, it might look like this: | |
5400 | |
5401 @cartouche | |
5402 @smallexample | |
5403 3 t08/24 root received fax files on Wed Aug 24 11:00: | |
5404 4+t08/24 To:wohler Test<<This is a test message to get the | |
5405 | |
5406 | |
5407 | |
5408 | |
5409 | |
5410 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)--------------- | |
5411 To: wohler | |
5412 cc: | |
5413 Subject: Test of MIME | |
5414 -------- | |
5415 Here is the SETI@@Home logo: | |
5416 | |
5417 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm" | |
5418 disposition=inline description="SETI@@home logo"> | |
5419 <#/part> | |
5420 --:** @{draft@} All L8 (MH-Letter)---------------------------------- | |
5421 | |
5422 @end smallexample | |
5423 @end cartouche | |
5424 @i{MH-E @sc{mime} draft} | |
5425 | |
5426 @findex mh-mml-to-mime | |
5427 @kindex C-c C-m C-m | |
5428 @kindex C-c C-m m | |
5429 | |
5430 Typically, you send a message with attachments just like any other | |
5431 message (@pxref{Sending Message}). | |
5432 | |
5433 @findex mh-mml-to-mime | |
5434 @kindex C-c C-m C-m | |
5435 | |
5436 However, you may take a sneak preview of the @sc{mime} encoding if you | |
5437 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}). | |
5438 The following screen shows the @sc{mime} encoding specified by the | |
5439 tags. You can see why mail user agents are usually built to hide these | |
5440 details from the user. | |
5441 | |
5442 @cartouche | |
5443 @smallexample | |
5444 To: wohler | |
5445 cc: | |
5446 Subject: Test of MIME | |
97555 | 5447 X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 |
84306 | 5448 MIME-Version: 1.0 |
5449 Content-Type: multipart/mixed; boundary="=-=-=" | |
5450 -------- | |
5451 --=-=-= | |
5452 | |
5453 Here is the SETI@@Home logo: | |
5454 | |
5455 | |
5456 --=-=-= | |
5457 Content-Type: image/x-xpm | |
5458 Content-Disposition: inline; filename=setiathome.xpm | |
5459 Content-Transfer-Encoding: base64 | |
5460 Content-Description: SETI@@home logo | |
5461 | |
5462 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N | |
5463 --:-- @{draft@} Top L1 (MH-Letter)---------------------------------- | |
5464 | |
5465 @end smallexample | |
5466 @end cartouche | |
5467 @i{MH-E @sc{mime} draft ready to send} | |
5468 | |
5469 @cindex undo effects of mh-mml-to-mime | |
5470 | |
5471 This action can be undone by running @kbd{C-_} (@code{undo}). | |
5472 | |
5473 @cindex @command{mhbuild} | |
5474 @cindex @command{mhn} | |
5475 @cindex MH commands, @command{mhbuild} | |
5476 @cindex MH commands, @command{mhn} | |
5477 @cindex undo effects of mh-mh-to-mime | |
5478 @findex mh-mh-to-mime | |
5479 @findex mh-mh-to-mime-undo | |
5480 @kindex C-c C-e | |
5481 @kindex C-c C-m C-m | |
5482 @kindex C-c C-m C-u | |
5483 @kindex C-c C-m u | |
5484 | |
5485 If you're using MH-style directives, use @kbd{C-c C-e} | |
5486 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the | |
5487 command @command{mhbuild} (@command{mhn}) on the message which expands | |
5488 the tags@footnote{See the section | |
5489 @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in | |
5490 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u} | |
5491 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup | |
5492 file. You are prompted to confirm this action, but you can avoid the | |
5493 confirmation by adding an argument (for example, @kbd{C-u C-c C-m | |
5494 C-u}). | |
5495 | |
5496 @kindex C-c C-e | |
5497 @vindex mh-mh-to-mime-args | |
5498 | |
5499 If you wish to pass additional arguments to @command{mhbuild} | |
5500 (@command{mhn}) to affect how it builds your message, use the option | |
5501 @code{mh-mh-to-mime-args}. For example, you can build a consistency | |
5502 check into the message by setting @code{mh-mh-to-mime-args} to | |
5503 @samp{-check}. The recipient of your message can then run | |
5504 @samp{mhbuild -check} on the message---@command{mhbuild} | |
5505 (@command{mhn}) will complain if the message has been corrupted on the | |
5506 way. The command @kbd{C-c C-e} only consults this option when given a | |
5507 prefix argument (as in @kbd{C-u C-c C-e}). | |
5508 | |
5509 @kindex C-c C-e | |
5510 @vindex mh-mh-to-mime-hook | |
5511 | |
5512 The hook @code{mh-mh-to-mime-hook} is called after the message has | |
5513 been formatted by @kbd{C-c C-e}. | |
5514 | |
5515 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts | |
5516 @section Signing and Encrypting Messages | |
5517 | |
5518 @cindex signing messages | |
5519 @cindex encrypting messages | |
5520 @cindex RFC 3156 | |
5521 | |
5522 MH-E can sign and encrypt messages as defined in | |
5523 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you | |
5524 should choose to sign or encrypt your message, use one of the | |
5525 following commands to do so any time before sending your message. | |
5526 | |
5527 @findex mh-mml-secure-message-encrypt | |
5528 @findex mh-mml-secure-message-sign | |
5529 @findex mh-mml-secure-message-signencrypt | |
5530 @kindex C-c C-m C-e | |
5531 @kindex C-c C-m C-s | |
5532 @kindex C-c C-m e e | |
5533 @kindex C-c C-m e s | |
5534 @kindex C-c C-m s e | |
5535 @kindex C-c C-m s s | |
5536 | |
5537 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign}) | |
5538 inserts the following tag: | |
5539 | |
5540 @smallexample | |
5541 <#secure method=pgpmime mode=sign> | |
5542 @end smallexample | |
5543 | |
5544 This is used to sign your message digitally. Likewise, the command | |
5545 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the | |
5546 following tag: | |
5547 | |
5548 @smallexample | |
5549 <#secure method=pgpmime mode=encrypt> | |
5550 @end smallexample | |
5551 | |
5552 This is used to encrypt your message. Finally, the command @kbd{C-c | |
5553 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the | |
5554 following tag: | |
5555 | |
5556 @smallexample | |
5557 <#secure method=pgpmime mode=signencrypt> | |
5558 @end smallexample | |
5559 | |
5560 @findex mh-mml-unsecure-message | |
5561 @kindex C-c C-m C-n | |
5562 @kindex C-c C-m n | |
5563 @vindex mh-mml-method-default | |
5564 | |
5565 This is used to sign and encrypt your message. In each of these cases, | |
5566 a proper multipart message is created for you when you send the | |
5567 message. Use the command @kbd{C-c C-m C-n} | |
5568 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix | |
5569 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the | |
5570 possible security methods (see @code{mh-mml-method-default}). | |
5571 | |
5572 @vindex mh-mml-method-default | |
5573 | |
5574 The option @code{mh-mml-method-default} is used to select between a | |
5575 variety of mail security mechanisms. The default is @samp{PGP (MIME)} | |
5576 if it is supported; otherwise, the default is @samp{None}. Other | |
5577 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}. | |
5578 | |
5579 @cindex @samp{pgg} customization group | |
5580 @cindex PGG | |
5581 @cindex customization group, @samp{pgg} | |
5582 | |
5583 The @samp{pgg} customization group may have some settings which may | |
5584 interest you. | |
5585 @iftex | |
5586 See @cite{The PGG Manual}. | |
5587 @end iftex | |
5588 @ifinfo | |
5589 @xref{Top, , The PGG Manual, pgg, The PGG Manual}. | |
5590 @end ifinfo | |
5591 @ifhtml | |
5592 See | |
5593 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html, | |
5594 @cite{The PGG Manual}}. | |
5595 @end ifhtml | |
5596 | |
5597 @cindex header field, @samp{Fcc:} | |
5598 @cindex @samp{Fcc:} header field | |
5599 @vindex pgg-encrypt-for-me | |
5600 | |
5601 In particular, I turn on the option @code{pgg-encrypt-for-me} so that | |
5602 all messages I encrypt are encrypted with my public key as well. If | |
5603 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header | |
5604 field, this setting is vital so that you can read the mail you write! | |
5605 | |
5606 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts | |
5607 @section Checking Recipients | |
5608 | |
5609 @cindex @samp{*MH-E Recipients*} | |
5610 @cindex @command{whom} | |
5611 @cindex MH commands, @command{whom} | |
5612 @cindex buffers, @samp{*MH-E Recipients*} | |
5613 @cindex checking recipients | |
5614 @cindex recipients, checking | |
5615 @findex mh-check-whom | |
5616 @kindex C-c C-w | |
5617 | |
5618 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so | |
5619 you can check the actual address(es) in the alias. A new buffer named | |
5620 @samp{*MH-E Recipients*} is created with the output of @command{whom} | |
5621 (@pxref{Miscellaneous})@footnote{See the section | |
5622 @uref{@value{MH-BOOK-HOME}/senove.html#WhaPro, What now? -- and the | |
5623 whatnow Program} in the MH book.}. | |
5624 | |
5625 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts | |
5626 @section Sending a Message | |
5627 | |
5628 @cindex buffers, @samp{*MH-E Mail Delivery*} | |
5629 @cindex @samp{*MH-E Mail Delivery*} | |
5630 @cindex sending mail | |
5631 @findex mh-send-letter | |
5632 @kindex C-c C-c | |
5633 | |
5634 When you are all through editing a message, you send it with the | |
5635 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix | |
5636 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the | |
5637 delivery; this output can be found in a buffer called @samp{*MH-E Mail | |
5638 Delivery*} (@pxref{Miscellaneous}). | |
5639 | |
5640 @cindex sending mail | |
5641 @cindex spell check | |
5642 @findex ispell-message | |
5643 @kindex C-c C-c | |
5644 @vindex mh-before-send-letter-hook | |
5645 | |
5646 The hook @code{mh-before-send-letter-hook} is run at the beginning of | |
5647 the command @kbd{C-c C-c}. For example, if you want to check your | |
5648 spelling in your message before sending, add the function | |
5649 @code{ispell-message}. | |
5650 | |
5651 @cindex @command{send} | |
5652 @cindex MH commands, @command{send} | |
5653 @vindex mh-send-prog | |
5654 | |
5655 In case the MH @command{send} program@footnote{See the section | |
5656 @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} | |
5657 in the MH book.} is installed under a different name, use | |
5658 @code{mh-send-prog} to tell MH-E the name. | |
5659 | |
97192 | 5660 The hook @code{mh-annotate-msg-hook} is run after annotating the |
5661 message and scan line (@pxref{Sending Mail}). | |
5662 | |
84306 | 5663 @node Killing Draft, , Sending Message, Editing Drafts |
5664 @section Killing the Draft | |
5665 | |
5666 @cindex killing draft | |
5667 @findex kill-buffer | |
5668 @findex mh-fully-kill-draft | |
5669 @kindex C-c C-q | |
5670 @kindex C-x k | |
5671 | |
5672 If for some reason you are not happy with the draft, you can use the | |
5673 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft | |
5674 buffer and delete the draft message. Use the command @kbd{C-x k} | |
5675 (@code{kill-buffer}) if you don't want to delete the draft message. | |
5676 | |
5677 @node Aliases, Identities, Editing Drafts, Top | |
5678 @chapter Aliases | |
5679 | |
5680 @cindex aliases | |
5681 | |
5682 MH aliases are used in the same way in MH-E as they are in MH. Any | |
5683 alias listed as a recipient will be expanded when the message is sent. | |
5684 This chapter discusses other things you can do with aliases in MH-E. | |
5685 | |
5686 @cindex MH-Letter mode | |
5687 @cindex modes, MH-Letter | |
5688 | |
5689 The following commands are available in MH-Letter mode with the | |
5690 exception of @code{mh-alias-reload} which can be called from anywhere. | |
5691 | |
5692 @table @kbd | |
5693 @kindex @key{SPC} | |
5694 @findex mh-letter-complete-or-space | |
5695 @item @key{SPC} | |
5696 Perform completion or insert space (@code{mh-letter-complete-or-space}). | |
5697 @c ------------------------- | |
5698 @kindex M-@key{TAB} | |
5699 @findex mh-letter-complete | |
5700 @item M-@key{TAB} | |
5701 Perform completion on header field or word preceding point | |
5702 (@code{mh-letter-complete}). | |
5703 @c ------------------------- | |
5704 @findex mh-alias-apropos | |
5705 @item mh-alias-apropos | |
5706 Show all aliases or addresses that match a regular expression. | |
5707 @c ------------------------- | |
5708 @findex mh-alias-grab-from-field | |
5709 @item mh-alias-grab-from-field | |
5710 Add alias for the sender of the current message | |
5711 @c ------------------------- | |
5712 @findex mh-alias-reload | |
5713 @item mh-alias-reload | |
5714 Reload MH aliases. | |
5715 @end table | |
5716 | |
5717 @cindex @samp{mh-alias} customization group | |
5718 @cindex customization group, @samp{mh-alias} | |
5719 | |
5720 The @samp{mh-alias} customization group contains options associated | |
5721 with aliases. | |
5722 | |
5723 @vtable @code | |
5724 @item mh-alias-completion-ignore-case-flag | |
5725 On means don't consider case significant in MH alias completion | |
5726 (default: @samp{on}). | |
5727 @c ------------------------- | |
5728 @item mh-alias-expand-aliases-flag | |
5729 On means to expand aliases entered in the minibuffer (default: | |
5730 @samp{off}). | |
5731 @c ------------------------- | |
5732 @item mh-alias-flash-on-comma | |
5733 Specify whether to flash address or warn on translation (default: @samp{Flash | |
5734 but Don't Warn If No Alias}). | |
5735 @c ------------------------- | |
5736 @item mh-alias-insert-file | |
5737 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile | |
5738 Profile Component}). | |
5739 @c ------------------------- | |
5740 @item mh-alias-insertion-location | |
5741 Specifies where new aliases are entered in alias files (default: | |
5742 @samp{Alphabetical}). | |
5743 @c ------------------------- | |
5744 @item mh-alias-local-users | |
5745 If @samp{on}, local users are added to alias completion (default: | |
5746 @samp{on}). | |
5747 @c ------------------------- | |
5748 @item mh-alias-local-users-prefix | |
5749 String prefixed to the real names of users from the password file | |
5750 (default: @code{"local."}. | |
5751 @c ------------------------- | |
5752 @item mh-alias-passwd-gecos-comma-separator-flag | |
5753 On means the GECOS field in the password file uses a comma separator | |
5754 (default: @samp{on}). | |
5755 @end vtable | |
5756 | |
5757 The following hook is available. | |
5758 | |
5759 @vtable @code | |
5760 @item mh-alias-reloaded-hook | |
5761 Hook run by @code{mh-alias-reload} after loading aliases (default: | |
5762 @code{nil}). | |
5763 @end vtable | |
5764 | |
5765 @subheading Adding Addresses to Draft | |
5766 | |
5767 You can use aliases when you are adding recipients to a message. | |
5768 | |
5769 @findex minibuffer-complete | |
5770 @kindex @key{TAB} | |
5771 @vindex mh-alias-expand-aliases-flag | |
5772 @vindex mh-compose-prompt-flag | |
5773 | |
5774 In order to use minibuffer prompting for recipients and the subject | |
5775 line in the minibuffer, turn on the option | |
5776 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the | |
5777 @key{TAB} (@code{minibuffer-complete}) command to complete aliases | |
5778 (and optionally local logins) when prompted for the recipients. Turn | |
5779 on the option @code{mh-alias-expand-aliases-flag} if you want these | |
5780 aliases to be expanded to their respective addresses in the draft. | |
5781 | |
5782 @findex mh-letter-complete | |
5783 @findex mh-letter-complete-or-space | |
5784 @kindex @key{SPC} | |
5785 @kindex M-@key{TAB} | |
5786 | |
5787 Otherwise, you can complete aliases in the header of the draft with | |
5788 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC} | |
5789 (@code{mh-letter-complete-or-space}). | |
5790 | |
5791 @vindex mh-alias-completion-ignore-case-flag | |
5792 | |
5793 As MH ignores case in the aliases, so too does MH-E. However, you may | |
5794 turn off the option @code{mh-alias-completion-ignore-case-flag} to | |
5795 make case significant which can be used to segregate completion of | |
5796 your aliases. You might use uppercase for mailing lists and lowercase | |
5797 for people. For example, you might have: | |
5798 | |
5799 @smallexample | |
5800 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org> | |
5801 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org> | |
5802 @end smallexample | |
5803 | |
5804 When this option is turned off, if you were to type @kbd{M} in the | |
5805 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list; | |
5806 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then | |
5807 you'd get Mark's address. Note that this option affects completion | |
5808 only. If you were to enter @kbd{Mark.Baushke}, it would still be | |
5809 identified with your @samp{mark.baushke} alias. | |
5810 | |
5811 @findex mh-alias-minibuffer-confirm-address | |
5812 @findex mh-letter-confirm-address | |
5813 @vindex mh-alias-flash-on-comma | |
5814 @vindex mh-compose-prompt-flag | |
5815 | |
5816 To verify that the alias you've entered is valid, the alias will be | |
5817 displayed in the minibuffer when you type a comma | |
5818 (@code{mh-letter-confirm-address} or | |
5819 @code{mh-alias-minibuffer-confirm-address} if the option | |
5820 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This | |
5821 behavior can be controlled with the option | |
5822 @code{mh-alias-flash-on-comma} which provides three choices: | |
5823 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No | |
5824 Alias}, and @samp{Don't Flash Nor Warn If No Alias}. | |
5825 | |
5826 For another way to verify the alias expansion, see @ref{Checking | |
5827 Recipients}. | |
5828 | |
5829 @subheading Loading Aliases | |
5830 | |
5831 @cindex @command{ali} | |
5832 @cindex @file{/etc/nmh/MailAliases} | |
5833 @cindex @samp{Aliasfile:} MH profile component | |
5834 @cindex MH commands, @command{ali} | |
5835 @cindex MH profile component, @samp{Aliasfile:} | |
5836 @cindex files, @file{/etc/nmh/MailAliases} | |
5837 | |
5838 MH-E loads aliases for completion and folder name hints from various | |
5839 places. It uses the MH command @command{ali}@footnote{See the section | |
5840 @uref{@value{MH-BOOK-HOME}/mh.html, MH Aliases} in the MH book.} to | |
5841 read aliases from the files listed in the profile component | |
5842 @samp{Aliasfile:} as well as system-wide aliases (for example, | |
5843 @file{/etc/nmh/MailAliases}). | |
5844 | |
5845 @cindex @file{/etc/passwd} | |
5846 @cindex files, @file{/etc/passwd} | |
5847 | |
5848 In addition, aliases are created from @file{/etc/passwd} entries with | |
5849 a user ID larger than a magical number, typically 200. This can be a | |
5850 handy tool on a machine where you and co-workers exchange messages. | |
5851 These aliases have the form @samp{local.@var{first.last}} if a real | |
5852 name is present in the password file. Otherwise, the alias will have | |
5853 the form @samp{local.@var{login}}. | |
5854 | |
5855 @vindex mh-alias-local-users-prefix | |
5856 | |
5857 The prefix @samp{local.} can be modified via the option | |
5858 @code{mh-alias-local-users-prefix}. This option can also be set to | |
5859 @samp{Use Login}. | |
5860 | |
5861 For example, consider the following password file entry: | |
5862 | |
5863 @smallexample | |
5864 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh | |
5865 @end smallexample | |
5866 | |
5867 @vindex mh-alias-local-users-prefix | |
5868 | |
5869 The following settings of option @code{mh-alias-local-users-prefix} | |
5870 will produce the associated aliases: | |
5871 | |
5872 @table @code | |
5873 @item "local." | |
5874 local.peter.galbraith | |
5875 @c ------------------------- | |
5876 @item "" | |
5877 peter.galbraith | |
5878 @c ------------------------- | |
5879 @item Use Login | |
5880 psg | |
5881 @end table | |
5882 | |
5883 @vindex mh-alias-passwd-gecos-comma-separator-flag | |
5884 | |
5885 In the example above, commas are used to separate different values | |
5886 within the so-called GECOS field. This is a fairly common usage. | |
5887 However, in the rare case that the GECOS field in your password file | |
5888 is not separated by commas and whose contents may contain commas, you | |
5889 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag} | |
5890 off. | |
5891 | |
5892 @cindex NIS, obtaining local aliases from | |
5893 @cindex @samp{ypcat passwd} | |
5894 @vindex mh-alias-local-users | |
5895 | |
5896 If you're on a system with thousands of users you don't know, and the | |
5897 loading of local aliases slows MH-E down noticeably, then the local | |
5898 alias feature can be disabled by turning off the option | |
5899 @code{mh-alias-local-users}. This option also takes a string which is | |
5900 executed to generate the password file. For example, use @samp{ypcat | |
5901 passwd} to obtain the NIS password file. | |
5902 | |
5903 @findex mh-alias-reload | |
5904 @kindex M-x mh-alias-reload | |
5905 @vindex mh-alias-reloaded-hook | |
5906 | |
5907 Since aliases are updated frequently, MH-E reloads aliases | |
5908 automatically whenever an alias lookup occurs if an alias source has | |
5909 changed. However, you can reload your aliases manually by calling the | |
5910 command @kbd{M-x mh-alias-reload} directly. This command runs | |
5911 @code{mh-alias-reloaded-hook} after the aliases have been loaded. | |
5912 | |
5913 @subheading Adding Aliases | |
5914 | |
5915 In the past, you have manually added aliases to your alias file(s) | |
5916 listed in your @samp{Aliasfile:} profile component. MH-E provides | |
5917 other methods for maintaining your alias file(s). | |
5918 | |
5919 @findex mh-alias-add-alias | |
5920 @kindex M-x mh-alias-add-alias | |
5921 | |
5922 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt | |
5923 you for the alias and address that you would like to add. If the alias | |
5924 exists already, you will have the choice of inserting the new alias | |
5925 before or after the old alias. In the former case, this alias will be | |
5926 used when sending mail to this alias. In the latter case, the alias | |
5927 serves as an additional folder name hint when filing messages | |
5928 (@pxref{Folder Selection}). | |
5929 | |
5930 Earlier, the alias prefix @samp{local} was presented. You can use | |
5931 other prefixes to organize your aliases or disambiguate entries. You | |
5932 might use prefixes for locales, jobs, or activities. For example, I | |
5933 have: | |
5934 | |
5935 @smallexample | |
5936 @group | |
5937 ; Work | |
5938 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com> | |
5939 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com> | |
5940 ... | |
5941 ; Sport | |
5942 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com> | |
5943 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com> | |
5944 ... | |
5945 ; Personal | |
5946 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com> | |
5947 ... | |
5948 @end group | |
5949 @end smallexample | |
5950 | |
5951 Using prefixes instead of postfixes helps you explore aliases during | |
5952 completion. If you forget the name of an old dive buddy, you can enter | |
5953 @samp{div} and then @key{SPC} to get a listing of all your dive buddies. | |
5954 | |
5955 @kindex M-x mh-alias-add-address-under-point | |
5956 @kindex M-x mh-alias-grab-from-field | |
5957 | |
5958 An alias for the sender of the current message is added automatically | |
5959 by clicking on the @samp{Grab From alias} tool bar button or by running | |
5960 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other | |
5961 recipients of the current message are added by placing your cursor | |
5962 over the desired recipient and giving the @kbd{M-x | |
5963 mh-alias-add-address-under-point} command. | |
5964 | |
5965 @vindex mh-alias-insert-file | |
5966 @vindex mh-alias-insertion-location | |
5967 | |
5968 The options @code{mh-alias-insert-file} and | |
5969 @code{mh-alias-insertion-location} controls how and where these aliases | |
5970 are inserted. | |
5971 | |
5972 @vindex mh-alias-insert-file | |
5973 | |
5974 The default setting of option @code{mh-alias-insert-file} is @samp{Use | |
5975 Aliasfile Profile Component}. This option can also hold the name of a | |
5976 file or a list a file names. If this option is set to a list of file | |
5977 names, or the @samp{Aliasfile:} profile component contains more than | |
5978 one file name, MH-E will prompt for one of them. | |
5979 | |
5980 @vindex mh-alias-insertion-location | |
5981 | |
5982 The option @code{mh-alias-insertion-location} is set to | |
5983 @samp{Alphabetical} by default. If you organize your alias file in | |
5984 other ways, then the settings @samp{Top} and @samp{Bottom} might be | |
5985 more appropriate. | |
5986 | |
5987 @subheading Querying Aliases | |
5988 | |
5989 @cindex regular expressions, @code{mh-alias-apropos} | |
5990 @findex mh-alias-apropos | |
5991 @kindex M-x mh-alias-apropos | |
5992 | |
5993 If you can't quite remember an alias, you can use @kbd{M-x | |
5994 mh-alias-apropos} to show all aliases or addresses that match a | |
5995 regular expression | |
5996 @ifnothtml | |
5997 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The | |
5998 GNU Emacs Manual}). | |
5999 @end ifnothtml | |
6000 @ifhtml | |
6001 (see the section | |
6002 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
6003 Syntax of Regular Expressions} in | |
6004 @cite{The GNU Emacs Manual}). | |
6005 @end ifhtml | |
6006 | |
6007 @node Identities, Speedbar, Aliases, Top | |
6008 @chapter Identities | |
6009 | |
6010 @cindex identities | |
6011 @cindex multiple personalities | |
6012 | |
6013 MH-E supports the concept of multiple personalities or identities. | |
6014 This means that you can easily have a different header and signature | |
6015 at home and at work. | |
6016 | |
6017 @cindex @samp{Identity} menu | |
6018 @cindex menu, @samp{Identity} | |
6019 | |
6020 A couple of commands are used to insert identities in MH-Letter mode | |
6021 which are also found in the @samp{Identity} menu. | |
6022 | |
6023 @table @kbd | |
6024 @kindex C-c C-d | |
6025 @findex mh-insert-identity | |
6026 @item C-c C-d | |
6027 Insert fields specified by given identity (@code{mh-insert-identity}). | |
6028 @c ------------------------- | |
6029 @cindex @samp{Identity > Insert Auto Fields} menu item | |
6030 @cindex menu item, @samp{Identity > Insert Auto Fields} | |
6031 @kindex C-c M-d | |
6032 @findex mh-insert-auto-fields | |
6033 @item C-c M-d | |
6034 Insert custom fields if recipient found in @code{mh-auto-fields-list} | |
6035 (@code{mh-insert-auto-fields}). | |
6036 @end table | |
6037 | |
6038 @cindex @samp{mh-identity} customization group | |
6039 @cindex customization group, @samp{mh-identity} | |
6040 | |
6041 The @samp{mh-identity} customization group contains the following | |
6042 options. | |
6043 | |
6044 @vtable @code | |
6045 @item mh-auto-fields-list | |
6046 List of recipients for which header lines are automatically inserted | |
6047 (default: @code{nil}). | |
6048 @c ------------------------- | |
6049 @item mh-auto-fields-prompt-flag | |
6050 On means to prompt before sending if fields inserted (default: | |
6051 @samp{on}) | |
6052 @c ------------------------- | |
6053 @item mh-identity-default | |
6054 Default identity to use when @code{mh-letter-mode} is called (default: | |
6055 @samp{None}). | |
6056 @c ------------------------- | |
6057 @item mh-identity-handlers | |
6058 Handler functions for fields in @code{mh-identity-list}. | |
6059 @c ------------------------- | |
6060 @item mh-identity-list | |
6061 List of identities (default: @code{nil}). | |
6062 @end vtable | |
6063 | |
6064 Some of the common header fields that people change depending on the | |
6065 context are the @samp{From:} and @samp{Organization:} fields, as well | |
6066 as the signature. | |
6067 | |
6068 @vindex mh-identity-list | |
6069 | |
6070 This is done by customizing the option @code{mh-identity-list}. In the | |
6071 customization buffer for this option, click on the @samp{INS} button | |
6072 and enter a label such as @samp{Home} or @samp{Work}. Then click on | |
6073 the @samp{INS} button with the label @samp{Add at least one item | |
6074 below}. The @samp{Value Menu} has the following menu items: | |
6075 | |
6076 @table @samp | |
6077 @cindex header field, @samp{From:} | |
6078 @cindex @samp{From:} header field | |
6079 @item From Field | |
6080 Specify an alternate @samp{From:} header field. You must include a | |
6081 valid email address. A standard format is @samp{First Last | |
6082 <login@@host.domain>}. If you use an initial with a period, then you | |
6083 must quote your name as in @samp{"First I. Last" | |
6084 <login@@host.domain>}. | |
6085 @c ------------------------- | |
6086 @cindex header field, @samp{Organization:} | |
6087 @cindex @samp{Organization:} header field | |
6088 @item Organization Field | |
6089 People usually list the name of the company where they work here. | |
6090 @c ------------------------- | |
6091 @item Other Field | |
6092 Set any arbitrary header field and value here. Unless the header field | |
6093 is a standard one, precede the name of your field's label with | |
6094 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}. | |
6095 @c ------------------------- | |
6096 @item Attribution Verb | |
6097 This value overrides the setting of | |
6098 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}. | |
6099 @c ------------------------- | |
6100 @cindex signature | |
6101 @vindex mh-signature-file-name | |
6102 @item Signature | |
6103 Set your signature with this item. You can specify the contents of | |
6104 @code{mh-signature-file-name}, a file, or a function. | |
6105 @xref{Signature}. | |
6106 @c ------------------------- | |
6107 @item GPG Key ID | |
6108 Specify a different key to sign or encrypt messages. | |
6109 @end table | |
6110 | |
6111 @cindex Identity menu | |
6112 @cindex menu, Identity | |
6113 @findex mh-insert-identity | |
6114 @kindex C-c C-d | |
6115 | |
6116 You can select the identities you have added via the menu called | |
6117 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c | |
6118 C-d} (@code{mh-insert-identity}). To clear the fields and signature | |
6119 added by the identity, select the @samp{None} identity. | |
6120 | |
6121 @cindex menu item, @samp{Identity > Customize Identities} | |
6122 @cindex menu item, @samp{Identity > Save as Default} | |
6123 @cindex menu item, @samp{Identity > Set Default for Session} | |
6124 @cindex @samp{Identity > Customize Identities} menu item | |
6125 @cindex @samp{Identity > Save as Default} menu item | |
6126 @cindex @samp{Identity > Set Default for Session} menu item | |
6127 @vindex mh-identity-default | |
6128 | |
6129 The @samp{Identity} menu contains two other items to save you from | |
6130 having to set the identity on every message. The menu item @samp{Set | |
6131 Default for Session} can be used to set the default identity to the | |
6132 current identity until you exit Emacs. The menu item @samp{Save as | |
6133 Default} sets the option @code{mh-identity-default} to the current | |
6134 identity setting. You can also customize the option | |
6135 @code{mh-identity-default} in the usual fashion. If you find that you | |
6136 need to add another identity, the menu item @samp{Customize | |
6137 Identities} is available for your convenience. | |
6138 | |
6139 @cindex regular expressions, @code{mh-auto-fields-list} | |
6140 @vindex mh-auto-fields-list | |
6141 | |
6142 The option @code{mh-auto-fields-list} can also be used to set the | |
6143 identity depending on the recipient to provide even more control. To | |
6144 customize @code{mh-auto-fields-list}, click on the @samp{INS} button | |
6145 and enter a regular expression for the recipient's address | |
6146 @ifnothtml | |
6147 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The | |
6148 GNU Emacs Manual}). | |
6149 @end ifnothtml | |
6150 @ifhtml | |
6151 (see the section | |
6152 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
6153 Syntax of Regular Expressions} in | |
6154 @cite{The GNU Emacs Manual}). | |
6155 @end ifhtml | |
6156 Click on the @samp{INS} button with the @samp{Add at least one item | |
6157 below} label. The @samp{Value Menu} contains the following menu items: | |
6158 | |
6159 @table @samp | |
6160 @item Identity | |
6161 Select an identity from those configured in @code{mh-identity-list}. | |
6162 All of the information for that identity will be added if the | |
6163 recipient matches. | |
6164 @c ------------------------- | |
6165 @cindex @samp{Fcc:} header field | |
6166 @cindex header field, @samp{Fcc:} | |
6167 @item Fcc Field | |
6168 Insert an @samp{Fcc:} header field with the folder you provide. When | |
6169 you send the message, MH will put a copy of your message in this | |
6170 folder. | |
6171 @c ------------------------- | |
6172 @cindex @samp{Mail-Followup-To:} header field | |
6173 @cindex header field, @samp{Mail-Followup-To:} | |
6174 @item Mail-Followup-To Field | |
6175 Insert an @samp{Mail-Followup-To:} header field with the recipients | |
6176 you provide. If the recipient's mail user agent supports this header | |
6177 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then | |
6178 their replies will go to the addresses listed. This is useful if their | |
6179 replies go both to the list and to you and you don't have a mechanism | |
6180 to suppress duplicates. If you reply to someone not on the list, you | |
6181 must either remove the @samp{Mail-Followup-To:} field, or ensure the | |
6182 recipient is also listed there so that he receives replies to your | |
6183 reply. | |
6184 @c ------------------------- | |
6185 @item Other Field | |
6186 Other header fields may be added using this menu item. | |
6187 @end table | |
6188 | |
6189 @findex mh-insert-auto-fields | |
6190 @kindex C-c M-d | |
6191 @vindex mh-auto-fields-prompt-flag | |
6192 | |
6193 These fields can only be added after the recipient is known. Because | |
6194 you can continue to add recipients as you edit the draft, MH-E waits | |
6195 until the message is sent to perform the auto-insertions. This seems | |
6196 strange at first, but you'll get used to it. There are two ways to | |
6197 help you feel that the desired fields are added. The first is the | |
6198 action when the message is sent: if any fields are added | |
6199 automatically, you are given a chance to see and to confirm these | |
6200 fields before the message is actually sent. You can do away with this | |
6201 confirmation by turning off the option | |
6202 @code{mh-auto-fields-prompt-flag}. The second method is manual: once | |
6203 the header contains one or more recipients, you may run the command | |
6204 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the | |
6205 @samp{Identity -> Insert Auto Fields} menu item to insert these fields | |
6206 manually. However, if you use this command, the automatic insertion | |
6207 when the message is sent is disabled. | |
6208 | |
6209 @vindex mh-auto-fields-list | |
6210 @vindex mh-identity-list | |
6211 | |
6212 You should avoid using the same header field in | |
6213 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions | |
6214 that may apply to the same message as the result is undefined. | |
6215 | |
6216 @vindex mh-identity-handlers | |
6217 @vindex mh-identity-list | |
6218 | |
6219 The option @code{mh-identity-handlers} is used to change the way that | |
6220 fields, signatures, and attributions in @code{mh-identity-list} are | |
6221 added. To customize @code{mh-identity-handlers}, replace the name of | |
6222 an existing handler function associated with the field you want to | |
6223 change with the name of a function you have written. You can also | |
6224 click on an @samp{INS} button and insert a field of your choice and | |
6225 the name of the function you have written to handle it. | |
6226 | |
6227 @vindex mh-identity-list | |
6228 | |
6229 The @samp{Field} field can be any field that you've used in your | |
6230 @code{mh-identity-list}. The special fields @samp{:attribution-verb}, | |
6231 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the | |
6232 @code{mh-identity-list} choices @samp{Attribution Verb}, | |
6233 @samp{Signature}, and @samp{GPG Key ID} respectively. | |
6234 | |
6235 The handler associated with the @samp{:default} field is used when no | |
6236 other field matches. | |
6237 | |
6238 The handler functions are passed two or three arguments: the field | |
6239 itself (for example, @samp{From}), or one of the special fields (for | |
6240 example, @samp{:signature}), and the action @samp{'remove} or | |
6241 @samp{'add}. If the action is @samp{'add}, an additional argument | |
6242 containing the value for the field is given. | |
6243 | |
6244 @node Speedbar, Menu Bar, Identities, Top | |
6245 @chapter The Speedbar | |
6246 | |
6247 @cindex folder navigation | |
6248 @cindex speedbar | |
6249 @findex mh-visit-folder | |
6250 @kindex F v | |
6251 @kindex M-x speedbar | |
6252 @kindex Mouse-2 | |
6253 | |
6254 You can also use the speedbar | |
6255 @ifnothtml | |
6256 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},) | |
6257 @end ifnothtml | |
6258 @ifhtml | |
6259 (see the section | |
6260 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html, | |
6261 Speedbar Frames} in @cite{The GNU Emacs Manual}) | |
6262 @end ifhtml | |
6263 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar | |
6264 @key{RET}}. You will see a new frame appear with all of your MH | |
6265 folders. Folders with unseen messages appear in boldface. Click on a | |
6266 folder name with @kbd{Mouse-2} to visit that folder in a similar | |
6267 fashion to the command @kbd{F v} (@code{mh-visit-folder}) | |
6268 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the | |
6269 sub-folders of that folder. | |
6270 | |
6271 The speedbar can be manipulated with the keyboard as well. Use the | |
6272 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move | |
6273 the cursor over the desired folder and then use the shortcuts for the | |
6274 menu items listed in the table below. | |
6275 | |
6276 @table @samp | |
6277 @findex mh-speed-view | |
6278 @item Visit Folder (@key{RET}) | |
6279 Visits the selected folder just as if you had used @kbd{F v} | |
6280 (@code{mh-speed-view}). | |
6281 @c ------------------------- | |
6282 @findex mh-speed-expand-folder | |
6283 @item Expand Nested Folders (@kbd{+}) | |
6284 Expands the selected folder in the speedbar, exposing the children | |
6285 folders inside it (@code{mh-speed-expand-folder}). | |
6286 @c ------------------------- | |
6287 @findex mh-speed-contract-folder | |
6288 @item Contract Nested Folders (@kbd{-}) | |
6289 Contracts or collapses the selected folder in the speedbar, hiding the | |
6290 children folders inside it (@code{mh-speed-contract-folder}). | |
6291 @c ------------------------- | |
6292 @findex mh-speed-refresh | |
6293 @item Refresh Speedbar (@kbd{r}) | |
6294 Regenerates the list of folders in the speedbar. Run this command if | |
6295 you've added or deleted a folder, or want to update the unseen message | |
6296 count before the next automatic update (@code{mh-speed-refresh}). | |
6297 @end table | |
6298 | |
6299 @findex delete-frame | |
6300 @kindex C-x 5 0 | |
6301 @kindex Mouse-3 | |
6302 | |
6303 You can click on @kbd{Mouse-3} to bring up a context menu that | |
6304 contains these items. Dismiss the speedbar with @kbd{C-x 5 0} | |
6305 (@code{delete-frame}). | |
6306 | |
6307 @cindex @command{flists} | |
6308 @cindex MH commands, @command{flists} | |
6309 @cindex @samp{mh-speedbar} customization group | |
6310 @cindex customization group, @samp{mh-speedbar} | |
6311 | |
6312 The MH-E speedbar uses the MH command @command{flists}@footnote{See | |
6313 the section @uref{@value{MH-BOOK-HOME}/morseq.html#flist, Searching for | |
6314 Sequences with flist} in the MH book.} to generate the list of | |
6315 folders. The @samp{mh-speedbar} customization group contains the | |
6316 following option which controls how often the speedbar calls | |
6317 @command{flists}. | |
6318 | |
6319 @vtable @code | |
6320 @item mh-speed-update-interval | |
6321 Time between speedbar updates in seconds (default: 60). Set to 0 to | |
6322 disable automatic update. | |
6323 @end vtable | |
6324 | |
6325 You can modify the appearance of the folders in the speedbar by | |
6326 customizing the following faces. | |
6327 | |
6328 @vtable @code | |
6329 @item mh-speedbar-folder | |
6330 Basic folder face. | |
6331 @c ------------------------- | |
6332 @item mh-speedbar-folder-with-unseen-messages | |
6333 Folder face when folder contains unread messages. | |
6334 @c ------------------------- | |
6335 @item mh-speedbar-selected-folder | |
6336 Selected folder face. | |
6337 @c ------------------------- | |
6338 @item mh-speedbar-selected-folder-with-unseen-messages | |
6339 Selected folder face when folder contains unread messages. | |
6340 @end vtable | |
6341 | |
6342 @node Menu Bar, Tool Bar, Speedbar, Top | |
6343 @chapter The Menu Bar | |
6344 | |
6345 @cindex @samp{Folder} menu | |
6346 @cindex @samp{Identity} menu | |
6347 @cindex @samp{Letter} menu | |
6348 @cindex @samp{Message} menu | |
6349 @cindex @samp{Search} menu | |
6350 @cindex @samp{Sequence} menu | |
6351 @cindex Folder menu | |
6352 @cindex Identity menu | |
6353 @cindex Letter menu | |
6354 @cindex MH-Folder mode | |
6355 @cindex MH-Letter mode | |
6356 @cindex MH-Search mode | |
6357 @cindex Message menu | |
6358 @cindex Search menu | |
6359 @cindex Sequence menu | |
6360 @cindex menu bar | |
6361 @cindex menu, Folder | |
6362 @cindex menu, Identity | |
6363 @cindex menu, Letter | |
6364 @cindex menu, Message | |
6365 @cindex menu, Search | |
6366 @cindex menu, Sequence | |
6367 @cindex menu, @samp{Folder} | |
6368 @cindex menu, @samp{Identity} | |
6369 @cindex menu, @samp{Letter} | |
6370 @cindex menu, @samp{Message} | |
6371 @cindex menu, @samp{Search} | |
6372 @cindex menu, @samp{Sequence} | |
6373 @cindex modes, MH-Folder | |
6374 @cindex modes, MH-Letter | |
6375 @cindex modes, MH-Search | |
6376 | |
6377 For those of you who prefer to mouse and menu instead of using the | |
6378 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its | |
6379 functions. The MH-Folder buffer adds the @samp{Folder}, | |
6380 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds | |
6381 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds | |
6382 the @samp{Search} menu. There's no need to list the actual items here, | |
6383 as you can more easily see them for yourself, and the functions are | |
6384 already described elsewhere in this manual. | |
6385 | |
6386 For a description of the menu bar, please | |
6387 @ifnothtml | |
6388 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}. | |
6389 @end ifnothtml | |
6390 @ifhtml | |
6391 see the section | |
6392 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html, | |
6393 The Menu Bar} in @cite{The GNU Emacs Manual}. | |
6394 @end ifhtml | |
6395 | |
6396 The Emacs manual describes how to get online help for a particular | |
6397 menu item. You can also look up a menu item in the index of this | |
6398 manual in two ways: all of the menu items are listed alphabetically, | |
6399 and you can also browse all of the items under the index entry | |
6400 @samp{menu item}. | |
6401 | |
6402 @node Tool Bar, Searching, Menu Bar, Top | |
6403 @chapter The Tool Bar | |
6404 | |
6405 @cindex tool bar | |
6406 | |
6407 Emacs also provides a graphical tool bar. For a description of the | |
6408 tool bar, please | |
6409 @ifnothtml | |
6410 @xref{Tool Bars, , Tool Bars, emacs, The GNU Emacs Manual}. | |
6411 @end ifnothtml | |
6412 @ifhtml | |
6413 see the section | |
6414 @uref{http://www.gnu.org/software/emacs/manual/html_node/Tool-Bars.html, | |
6415 Tool Bars} in @cite{The GNU Emacs Manual}. | |
6416 @end ifhtml | |
6417 | |
6418 @cindex @samp{mh-tool-bar} customization group | |
6419 @cindex customization group, @samp{mh-tool-bar} | |
6420 | |
6421 MH-E adds several icons to this tool bar; you can modify the MH-E | |
6422 aspects of the tool bar via the @samp{mh-tool-bar} customization group. | |
6423 | |
6424 @vtable @code | |
6425 @item mh-tool-bar-folder-buttons | |
6426 List of buttons to include in MH-Folder tool bar (default: a checklist | |
6427 too long to list here). | |
6428 @c ------------------------- | |
6429 @item mh-tool-bar-letter-buttons | |
6430 List of buttons to include in MH-Letter tool bar (default: a checklist | |
6431 too long to list here). | |
6432 @c ------------------------- | |
6433 @item mh-tool-bar-search-function | |
6434 Function called by the tool bar search button (default: | |
6435 @code{mh-search}). | |
6436 @c ------------------------- | |
6437 @item mh-xemacs-tool-bar-position | |
6438 Tool bar location (default: @samp{Same As Default Tool Bar}). | |
6439 @c ------------------------- | |
6440 @item mh-xemacs-use-tool-bar-flag | |
6441 If @samp{on}, use tool bar (default: @samp{on}, if supported). | |
6442 @end vtable | |
6443 | |
6444 In GNU Emacs, icons for some of MH-E's functions are added to the tool | |
6445 bar. In XEmacs, you have the opportunity to create a separate tool bar for | |
6446 the MH-E icons. | |
6447 | |
6448 @vindex mh-tool-bar-folder-buttons | |
6449 @vindex mh-tool-bar-letter-buttons | |
6450 | |
6451 In either case, you can select which of these functions you'd like to | |
6452 see by customizing the options @code{mh-tool-bar-folder-buttons} and | |
6453 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former | |
6454 customizes the tool bar in MH-Folder mode and the latter in MH-Letter | |
6455 mode. Both of these options present you with a list of functions; | |
6456 check the functions whose icons you want to see and clear the check | |
6457 boxes for those you don't. | |
6458 | |
6459 @findex mh-search | |
6460 @vindex mh-tool-bar-search-function | |
6461 | |
6462 The function associated with the searching icon can be set via the | |
6463 option @code{mh-tool-bar-search-function}. By default, this is set to | |
6464 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other | |
6465 Function} from the @samp{Value Menu} and enter a function of your own | |
6466 choosing. | |
6467 | |
6468 @vindex mh-xemacs-use-tool-bar-flag | |
6469 | |
6470 XEmacs provides a couple of extra options. The first, | |
6471 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E | |
6472 icons at all. By default, this option is turned on if the window | |
6473 system supports tool bars. If your system doesn't support tool bars, | |
6474 then you won't be able to turn on this option. | |
6475 | |
6476 @vindex mh-xemacs-tool-bar-position | |
6477 | |
6478 The second extra option is @code{mh-xemacs-tool-bar-position} which | |
6479 controls the placement of the tool bar along the four edges of the | |
6480 frame. You can choose from one of @samp{Same As Default Tool Bar}, | |
6481 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this | |
6482 variable is set to anything other than @samp{Same As Default Tool Bar} | |
6483 and the default tool bar is in a different location, then two tool | |
6484 bars will be displayed: the MH-E tool bar and the default tool bar. | |
6485 | |
6486 @node Searching, Threading, Tool Bar, Top | |
6487 @chapter Searching Through Messages | |
6488 | |
6489 @cindex @samp{Search} menu | |
6490 @cindex menu, @samp{Search} | |
6491 @cindex searching | |
6492 @findex mh-search | |
6493 @kindex F s | |
6494 | |
6495 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which | |
6496 helps you find messages that lie buried in your folders | |
6497 (@pxref{Folders}). This chapter covers this command in more detail. | |
6498 Several commands are used to compose the search criteria and to start | |
6499 searching. A couple of them can be found in the @samp{Search} menu. | |
6500 | |
6501 @table @kbd | |
6502 @kindex C-c ? | |
6503 @findex mh-help | |
6504 @item C-c ? | |
6505 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
6506 @c ------------------------- | |
6507 @cindex @samp{Search > Perform Search} menu item | |
6508 @cindex menu item, @samp{Search > Perform Search} | |
6509 @kindex C-c C-c | |
6510 @findex mh-index-do-search | |
6511 @item C-c C-c | |
6512 Find messages using @code{mh-search-program} | |
6513 (@code{mh-index-do-search}). | |
6514 @c ------------------------- | |
6515 @cindex @samp{Search > Search with pick} menu item | |
6516 @cindex menu item, @samp{Search > Search with pick} | |
6517 @kindex C-c C-p | |
6518 @findex mh-pick-do-search | |
6519 @item C-c C-p | |
6520 Find messages using @command{pick} (@code{mh-pick-do-search}). | |
6521 @c ------------------------- | |
6522 @kindex C-c ? | |
6523 @findex mh-help | |
6524 @item C-c ? | |
6525 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
6526 @c ------------------------- | |
6527 @kindex C-c C-f C-a | |
6528 @kindex C-c C-f a | |
6529 @findex mh-to-field | |
6530 @item C-c C-f a | |
6531 @itemx C-c C-f C-a | |
6532 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}). | |
6533 @c ------------------------- | |
6534 @kindex C-c C-f C-b | |
6535 @kindex C-c C-f b | |
6536 @item C-c C-f b | |
6537 @itemx C-c C-f C-b | |
6538 Move to @samp{Bcc:} header field (@code{mh-to-field}). | |
6539 @c ------------------------- | |
6540 @kindex C-c C-f C-c | |
6541 @kindex C-c C-f c | |
6542 @item C-c C-f c | |
6543 @itemx C-c C-f C-c | |
6544 Move to @samp{Cc:} header field (@code{mh-to-field}). | |
6545 @c ------------------------- | |
6546 @kindex C-c C-f C-d | |
6547 @kindex C-c C-f d | |
6548 @item C-c C-f d | |
6549 @itemx C-c C-f C-d | |
6550 Move to @samp{Dcc:} header field (@code{mh-to-field}). | |
6551 @c ------------------------- | |
6552 @kindex C-c C-f C-f | |
6553 @kindex C-c C-f f | |
6554 @item C-c C-f f | |
6555 @itemx C-c C-f C-f | |
6556 Move to @samp{Fcc:} header field (@code{mh-to-field}). | |
6557 @c ------------------------- | |
6558 @kindex C-c C-f C-l | |
6559 @kindex C-c C-f l | |
6560 @item C-c C-f l | |
6561 @itemx C-c C-f C-l | |
6562 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}). | |
6563 @c ------------------------- | |
6564 @kindex C-c C-f C-m | |
6565 @kindex C-c C-f m | |
6566 @item C-c C-f m | |
6567 @itemx C-c C-f C-m | |
6568 Move to @samp{From:} header field (@code{mh-to-field}). | |
6569 @c ------------------------- | |
6570 @kindex C-c C-f C-r | |
6571 @kindex C-c C-f r | |
6572 @item C-c C-f r | |
6573 @itemx C-c C-f C-r | |
6574 Move to @samp{Reply-To:} header field (@code{mh-to-field}). | |
6575 @c ------------------------- | |
6576 @kindex C-c C-f C-s | |
6577 @kindex C-c C-f s | |
6578 @item C-c C-f s | |
6579 @itemx C-c C-f C-s | |
6580 Move to @samp{Subject:} header field (@code{mh-to-field}). | |
6581 @c ------------------------- | |
6582 @kindex C-c C-f C-t | |
6583 @kindex C-c C-f t | |
6584 @item C-c C-f t | |
6585 @itemx C-c C-f C-t | |
6586 Move to @samp{To:} header field (@code{mh-to-field}). | |
6587 @end table | |
6588 | |
6589 Another few commands are available in the MH-Folder buffer resulting | |
6590 from a search. | |
6591 | |
6592 @table @kbd | |
6593 @kindex @key{TAB} | |
6594 @findex mh-index-next-folder | |
6595 @item @key{TAB} | |
6596 Jump to the next folder marker (@code{mh-index-next-folder}). | |
6597 @c ------------------------- | |
6598 @kindex S-@key{TAB} | |
6599 @findex mh-index-previous-folder | |
6600 @item S-@key{TAB} | |
6601 Jump to the previous folder marker (@code{mh-index-previous-folder}). | |
6602 @c ------------------------- | |
6603 @kindex v | |
6604 @findex mh-index-visit-folder | |
6605 @item v | |
6606 Visit original folder from where the message at point was found | |
6607 (@code{mh-index-visit-folder}). | |
6608 @end table | |
6609 | |
6610 @cindex @samp{mh-search} customization group | |
6611 @cindex customization group, @samp{mh-search} | |
6612 | |
6613 There is one option from the @samp{mh-search} customization group used | |
6614 in searching. | |
6615 | |
6616 @vtable @code | |
6617 @item mh-search-program | |
6618 Search program that MH-E shall use (default: @samp{Auto-detect}). | |
6619 @end vtable | |
6620 | |
6621 The following hook is available. | |
6622 | |
6623 @vtable @code | |
6624 @item mh-search-mode-hook | |
6625 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}). | |
6626 @end vtable | |
6627 | |
6628 The following face is available. | |
6629 | |
6630 @vtable @code | |
6631 @item mh-search-folder | |
6632 Folder heading face in MH-Folder buffers created by searches. | |
6633 @end vtable | |
6634 | |
6635 @findex mh-search-folder | |
6636 @kindex F s | |
6637 | |
6638 The command @kbd{F s} (@code{mh-search-folder}) helps you find | |
6639 messages in your entire corpus of mail. You can search for messages to | |
6640 or from a particular person or about a particular subject. In fact, | |
6641 you can also search for messages containing selected strings in any | |
6642 arbitrary header field or any string found within the messages. | |
6643 | |
6644 @cindex @command{pick} | |
6645 @cindex MH commands, @command{pick} | |
6646 | |
6647 Out of the box, MH-E uses @command{pick} to find messages. With a | |
6648 little extra effort, you can set an indexing program which rewards you | |
6649 with extremely quick results. The drawback is that sometimes the index | |
6650 does not contain the words you're looking for. You can still use | |
6651 @command{pick} in these situations. | |
6652 | |
6653 You are prompted for the folder to search. This can be @samp{all} to | |
6654 search all folders. Note that the search works recursively on the | |
6655 listed folder. | |
6656 | |
6657 @cindex MH-Search mode | |
6658 @cindex modes, MH-Search | |
6659 | |
6660 Next, an MH-Search buffer appears where you can enter search criteria. | |
6661 | |
6662 @cartouche | |
6663 @smallexample | |
6664 From: | |
6665 To: | |
6666 Cc: | |
6667 Date: | |
6668 Subject: | |
6669 -------- | |
6670 # | |
6671 | |
6672 | |
6673 | |
6674 | |
6675 | |
6676 | |
6677 | |
6678 | |
6679 --:** search-pattern All L7 (MH-Search)--------------------------- | |
6680 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help | |
6681 @end smallexample | |
6682 @end cartouche | |
6683 @i{Search window} | |
6684 | |
6685 @cindex @command{pick} | |
6686 @cindex MH commands, @command{pick} | |
6687 | |
6688 Edit this template by entering your search criteria in an appropriate | |
6689 header field that is already there, or create a new field yourself. If | |
6690 the string you're looking for could be anywhere in a message, then | |
6691 place the string underneath the row of dashes. | |
6692 | |
6693 As an example, let's say that we want to find messages from Ginnean | |
6694 about horseback riding in the Kosciusko National Park (Australia) | |
6695 during January, 1994. Normally we would start with a broad search and | |
6696 narrow it down if necessary to produce a manageable amount of data, | |
6697 but we'll cut to the chase and create a fairly restrictive set of | |
6698 criteria as follows: | |
6699 | |
6700 @smallexample | |
6701 @group | |
6702 From: ginnean | |
6703 To: | |
6704 Cc: | |
6705 Date: Jan 1994 | |
6706 Subject: | |
6707 -------- | |
6708 horse | |
6709 kosciusko | |
6710 @end group | |
6711 @end smallexample | |
6712 | |
6713 @findex mh-to-field | |
6714 @kindex C-c C-f C-t | |
6715 | |
6716 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f | |
6717 C-t} (@code{mh-to-field}) to help you fill in the blanks. | |
6718 @xref{Editing Message}. | |
6719 | |
6720 @kindex F s | |
6721 @vindex mh-search-mode-hook | |
6722 | |
6723 If you find that you do the same thing over and over when editing the | |
6724 search template, you may wish to bind some shortcuts to keys. This can | |
6725 be done with the variable @code{mh-search-mode-hook}, which is called | |
6726 when @kbd{F s} is run on a new pattern. | |
6727 | |
6728 @findex mh-index-do-search | |
6729 @findex mh-pick-do-search | |
6730 @kindex C-c C-c | |
6731 @kindex C-c C-p | |
6732 | |
6733 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}). | |
6734 Sometimes you're searching for text that is either not indexed, or | |
6735 hasn't been indexed yet. In this case you can override the default | |
6736 method with the pick method by running the command @kbd{C-c C-p} | |
6737 (@code{mh-pick-do-search}). | |
6738 | |
6739 @cindex folders, @samp{+mhe-index} | |
6740 @cindex @samp{+mhe-index} | |
6741 @findex mh-index-next-folder | |
6742 @findex mh-index-previous-folder | |
6743 @kindex @key{TAB} | |
6744 @kindex S-@key{TAB} | |
6745 @vindex mh-search-folder | |
6746 | |
6747 The messages that are found are put in a temporary sub-folder of | |
6748 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This | |
6749 buffer is special because it displays messages from multiple folders; | |
6750 each set of messages from a given folder has a heading with the folder | |
6751 name. The appearance of the heading can be modified by customizing the | |
6752 face @code{mh-search-folder}. You can jump back and forth between the | |
6753 headings using the commands @kbd{@key{TAB}} | |
6754 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}} | |
6755 (@code{mh-index-previous-folder}). | |
6756 | |
6757 @findex mh-index-visit-folder | |
6758 @findex mh-rescan-folder | |
6759 @kindex F r | |
6760 @kindex v | |
6761 | |
6762 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be | |
6763 used to visit the folder of the message at point. Initially, only the | |
6764 messages that matched the search criteria are displayed in the folder. | |
6765 While the temporary buffer has its own set of message numbers, the | |
6766 actual messages numbers are shown in the visited folder. Thus, the | |
6767 command @kbd{v} is useful to find the actual message number of an | |
6768 interesting message, or to view surrounding messages with the command | |
6769 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}. | |
6770 | |
6771 @findex mh-kill-folder | |
6772 @kindex F k | |
6773 | |
6774 Because this folder is temporary, you'll probably get in the habit of | |
6775 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}). | |
6776 @xref{Folders}. | |
6777 | |
6778 @kindex F s | |
6779 | |
6780 You can regenerate the results by running @kbd{F s} with a prefix | |
6781 argument. | |
6782 | |
6783 @cindex @command{procmail} | |
6784 @cindex Unix commands, @command{procmail} | |
6785 @cindex @samp{X-MHE-Checksum:} header field | |
6786 @cindex header field, @samp{X-MHE-Checksum:} | |
6787 | |
6788 Note: This command uses an @samp{X-MHE-Checksum:} header field to | |
6789 cache the MD5 checksum of a message. This means that if an incoming | |
6790 message already contains an @samp{X-MHE-Checksum:} field, that message | |
6791 might not be found by this command. The following @command{procmail} | |
6792 recipe avoids this problem by renaming the existing header field: | |
6793 | |
6794 @smallexample | |
6795 @group | |
6796 :0 wf | |
6797 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum" | |
6798 @end group | |
6799 @end smallexample | |
6800 | |
6801 @xref{Limits}, for an alternative interface to searching. | |
6802 | |
6803 @section Configuring Indexed Searches | |
6804 | |
6805 @cindex @command{grep} | |
6806 @cindex @command{mairix} | |
6807 @cindex @command{namazu} | |
6808 @cindex @command{pick} | |
6809 @cindex @command{swish++} | |
6810 @cindex @command{swish-e} | |
6811 @cindex Unix commands, @command{grep} | |
6812 @cindex Unix commands, @command{mairix} | |
6813 @cindex Unix commands, @command{namazu} | |
6814 @cindex Unix commands, @command{pick} | |
6815 @cindex Unix commands, @command{swish++} | |
6816 @cindex Unix commands, @command{swish-e} | |
6817 @findex mh-search | |
6818 @kindex F s | |
6819 @vindex mh-search-program | |
6820 | |
6821 The command @kbd{F s} (@code{mh-search}) runs the command defined by | |
6822 the option @code{mh-search-program}. The default value is | |
6823 @samp{Auto-detect} which means that MH-E will automatically choose one | |
6824 of @command{swish++}, @command{swish-e}, @command{mairix}, | |
6825 @command{namazu}, @command{pick} and @command{grep} in that order. If, | |
6826 for example, you have both @command{swish++} and @command{mairix} | |
6827 installed and you want to use @command{mairix}, then you can set this | |
6828 option to @samp{mairix}. | |
6829 | |
6830 The following sub-sections describe how to set up the various indexing | |
6831 programs to use with MH-E. | |
6832 | |
6833 @subsection swish++ | |
6834 | |
6835 @cindex @command{swish++} | |
6836 @cindex Unix commands, @command{swish++} | |
6837 | |
6838 In the examples below, replace @file{/home/user/Mail} with the path to | |
6839 your MH directory. | |
6840 | |
6841 First create the directory @file{/home/user/Mail/.swish++}. Then | |
6842 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the | |
6843 following contents: | |
6844 | |
6845 @smallexample | |
6846 @group | |
6847 IncludeMeta Bcc Cc Comments Content-Description From Keywords | |
6848 IncludeMeta Newsgroups Resent-To Subject To | |
6849 IncludeMeta Message-Id References In-Reply-To | |
6850 IncludeFile Mail * | |
6851 IndexFile /home/user/Mail/.swish++/swish++.index | |
6852 @end group | |
6853 @end smallexample | |
6854 | |
6855 Use the following command line to generate the swish index. Run this | |
6856 daily from cron: | |
6857 | |
6858 @smallexample | |
6859 @group | |
6860 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \ | |
6861 -o -path /home/user/Mail/.swish++ -prune \ | |
6862 -o -name "[0-9]*" -print \ | |
6863 | index -c /home/user/Mail/.swish++/swish++.conf - | |
6864 @end group | |
6865 @end smallexample | |
6866 | |
6867 This command does not index the folders that hold the results of your | |
6868 searches in @samp{+mhe-index} since they tend to be ephemeral and the | |
6869 original messages are indexed anyway. | |
6870 | |
6871 @cindex @command{index} | |
6872 @cindex Unix commands, @command{index} | |
6873 @cindex @command{index++} | |
6874 @cindex Unix commands, @command{index++} | |
6875 | |
6876 On some systems (Debian GNU/Linux, for example), use @command{index++} | |
6877 instead of @command{index}. | |
6878 | |
6879 @subsection swish | |
6880 | |
6881 @cindex @command{swish-e} | |
6882 @cindex Unix commands, @command{swish-e} | |
6883 | |
6884 In the examples below, replace @file{/home/user/Mail} with the path to | |
6885 your MH directory. | |
6886 | |
6887 First create the directory @file{/home/user/Mail/.swish}. Then create | |
6888 the file @file{/home/user/Mail/.swish/config} with the following | |
6889 contents: | |
6890 | |
6891 @smallexample | |
6892 @group | |
6893 DefaultContents TXT* | |
6894 IndexDir /home/user/Mail | |
6895 IndexFile /home/user/Mail/.swish/index | |
6896 IndexName "Mail Index" | |
6897 IndexDescription "Mail Index" | |
6898 IndexPointer "http://nowhere" | |
6899 IndexAdmin "nobody" | |
6900 #MetaNames automatic | |
6901 IndexReport 3 | |
6902 FollowSymLinks no | |
6903 UseStemming no | |
6904 IgnoreTotalWordCountWhenRanking yes | |
6905 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- | |
6906 BeginCharacters abcdefghijklmnopqrstuvwxyz | |
6907 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 | |
6908 IgnoreLimit 50 1000 | |
6909 IndexComments 0 | |
6910 FileRules filename contains \D | |
6911 FileRules pathname contains /home/user/Mail/.swish | |
6912 FileRules pathname contains /home/user/Mail/mhe-index | |
6913 FileRules filename is index | |
6914 @end group | |
6915 @end smallexample | |
6916 | |
6917 This configuration does not index the folders that hold the results of | |
6918 your searches in @samp{+mhe-index} since they tend to be ephemeral and | |
6919 the original messages are indexed anyway. | |
6920 | |
6921 If there are any directories you would like to ignore, append lines | |
6922 like the following to @file{config}: | |
6923 | |
6924 @smallexample | |
6925 FileRules pathname contains /home/user/Mail/scripts | |
6926 @end smallexample | |
6927 | |
6928 @cindex @command{swish-e} | |
6929 @cindex Unix commands, @command{swish-e} | |
6930 | |
6931 Use the following command line to generate the swish index. Run this | |
6932 daily from cron: | |
6933 | |
6934 @smallexample | |
6935 swish-e -c /home/user/Mail/.swish/config | |
6936 @end smallexample | |
6937 | |
6938 @subsection mairix | |
6939 | |
6940 @cindex @command{mairix} | |
6941 @cindex Unix commands, @command{mairix} | |
6942 | |
6943 In the examples below, replace @file{/home/user/Mail} with the path to | |
6944 your MH directory. | |
6945 | |
6946 First create the directory @file{/home/user/Mail/.mairix}. Then create | |
6947 the file @file{/home/user/Mail/.mairix/config} with the following | |
6948 contents: | |
6949 | |
6950 @smallexample | |
6951 @group | |
6952 base=/home/user/Mail | |
6953 | |
6954 # List of folders that should be indexed. 3 dots at the end means there | |
6955 # are subfolders within the folder | |
6956 mh=archive...:inbox:drafts:news:sent:trash | |
6957 | |
6958 vfolder_format=raw | |
6959 database=/home/user/Mail/mairix/database | |
6960 @end group | |
6961 @end smallexample | |
6962 | |
6963 Use the following command line to generate the mairix index. Run this daily | |
6964 from cron: | |
6965 | |
6966 @smallexample | |
6967 mairix -f /home/user/Mail/.mairix/config | |
6968 @end smallexample | |
6969 | |
6970 @subsection namazu | |
6971 | |
6972 @cindex @command{namazu} | |
6973 @cindex Unix commands, @command{namazu} | |
6974 | |
6975 In the examples below, replace @file{/home/user/Mail} with the path to | |
6976 your MH directory. | |
6977 | |
6978 First create the directory @file{/home/user/Mail/.namazu}. Then create | |
6979 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following | |
6980 contents: | |
6981 | |
6982 @smallexample | |
6983 @group | |
6984 package conf; # Don't remove this line! | |
6985 $ADDRESS = 'user@@localhost'; | |
6986 $ALLOW_FILE = "[0-9]*"; | |
6987 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)"; | |
6988 @end group | |
6989 @end smallexample | |
6990 | |
6991 This configuration does not index the folders that hold the results of | |
6992 your searches in @samp{+mhe-index} since they tend to be ephemeral and | |
6993 the original messages are indexed anyway. | |
6994 | |
6995 Use the following command line to generate the namazu index. Run this | |
6996 daily from cron: | |
6997 | |
6998 @smallexample | |
6999 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \ | |
7000 /home/user/Mail | |
7001 @end smallexample | |
7002 | |
7003 @subsection pick | |
7004 | |
7005 @cindex @command{pick} | |
7006 @cindex MH commands, @command{pick} | |
7007 | |
7008 This search method does not require any setup. | |
7009 | |
7010 Read @command{pick}(1) or the section | |
7011 @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in | |
7012 the MH book to find out more about how to enter the criteria. | |
7013 | |
7014 @subsection grep | |
7015 | |
7016 @cindex @command{grep} | |
7017 @cindex Unix commands, @command{grep} | |
7018 | |
7019 This search method does not require any setup. | |
7020 | |
7021 Unlike the other search methods, this method does not use the | |
7022 MH-Search buffer. Instead, you simply enter a regular expression in | |
7023 the minibuffer. For help in constructing regular expressions, see your | |
7024 man page for @command{grep}. | |
7025 | |
7026 @node Threading, Limits, Searching, Top | |
7027 @chapter Viewing Message Threads | |
7028 | |
7029 @cindex threading | |
7030 | |
7031 MH-E groups messages by @dfn{threads} which are messages that are part | |
7032 of the same discussion and usually all have the same @samp{Subject:} | |
7033 header field. Other ways to organize messages in a folder include | |
7034 limiting (@pxref{Limits}) or using full-text indexed searches | |
7035 (@pxref{Searching}). | |
7036 | |
7037 @cindex root, in threads | |
7038 @cindex siblings, in threads | |
7039 @cindex ancestor, in threads | |
7040 | |
7041 A thread begins with a single message called a @dfn{root}. All replies | |
7042 to the same message are @dfn{siblings} of each other. Any message that | |
7043 has replies to it is an @dfn{ancestor} of those replies. | |
7044 | |
7045 There are several commands that you can use to navigate and operate on | |
7046 threads. | |
7047 | |
7048 @table @kbd | |
7049 @kindex T ? | |
7050 @findex mh-prefix-help | |
7051 @item T ? | |
7052 Display cheat sheet for the commands of the current prefix in | |
7053 minibuffer (@code{mh-prefix-help}). | |
7054 @c ------------------------- | |
7055 @kindex T o | |
7056 @findex mh-thread-refile | |
7057 @item T o | |
7058 Refile (output) thread into folder (@code{mh-thread-refile}). | |
7059 @c ------------------------- | |
7060 @kindex T d | |
7061 @findex mh-thread-delete | |
7062 @item T d | |
7063 Delete thread (@code{mh-thread-delete}). | |
7064 @c ------------------------- | |
7065 @kindex T t | |
7066 @findex mh-toggle-threads | |
7067 @item T t | |
7068 Toggle threaded view of folder (@code{mh-toggle-threads}). | |
7069 @c ------------------------- | |
7070 @kindex T n | |
7071 @findex mh-thread-next-sibling | |
7072 @item T n | |
7073 Display next sibling (@code{mh-thread-next-sibling}). | |
7074 @c ------------------------- | |
7075 @kindex T p | |
7076 @findex mh-thread-previous-sibling | |
7077 @item T p | |
7078 Display previous sibling (@code{mh-thread-previous-sibling}). | |
7079 @c ------------------------- | |
7080 @kindex T u | |
7081 @findex mh-thread-ancestor | |
7082 @item T u | |
7083 Display ancestor of current message (@code{mh-thread-ancestor}). | |
7084 @end table | |
7085 | |
7086 @cindex @samp{mh-thread} customization group | |
7087 @cindex customization group, @samp{mh-thread} | |
7088 | |
7089 The @samp{mh-thread} customization group contains one option. | |
7090 | |
7091 @vtable @code | |
7092 @item mh-show-threads-flag | |
7093 On means new folders start in threaded mode (default: @samp{off}). | |
7094 @end vtable | |
7095 | |
7096 @findex mh-toggle-threads | |
7097 @kindex T t | |
7098 @vindex mh-large-folder | |
7099 @vindex mh-show-threads-flag | |
7100 | |
7101 Threading large number of messages can be time consuming so the option | |
7102 @code{mh-show-threads-flag} is turned off by default. If you turn on | |
7103 this option, then threading will be done only if the number of | |
7104 messages being threaded is less than @code{mh-large-folder}. In any | |
7105 event, threading can be turned on (and off) with the command @kbd{T t} | |
7106 (@code{mh-toggle-threads}). | |
7107 | |
7108 @findex mh-thread-ancestor | |
7109 @findex mh-thread-next-sibling | |
7110 @findex mh-thread-previous-sibling | |
7111 @kindex T n | |
7112 @kindex T p | |
7113 @kindex T u | |
7114 | |
7115 There are a few commands to help you navigate threads. If you do not | |
7116 care for the way a particular thread has turned, you can move up the | |
7117 chain of messages with the command @kbd{T u} | |
7118 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n} | |
7119 (@code{mh-thread-next-sibling} or @kbd{T p} | |
7120 (@code{mh-thread-previous-sibling}) to jump to the next or previous | |
7121 sibling, skipping the sub-threads. The command @kbd{T u} can also take | |
7122 a prefix argument to jump to the message that started everything. | |
7123 | |
7124 @findex mh-delete-subject-or-thread | |
7125 @findex mh-thread-delete | |
7126 @findex mh-thread-refile | |
7127 @kindex k | |
7128 @kindex T d | |
7129 @kindex T o | |
7130 | |
7131 There are threaded equivalents for the commands that delete and refile | |
7132 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the | |
7133 current message and all its children. Similarly, the command @kbd{T d} | |
7134 (@code{mh-thread-delete}) deletes the current message and all its | |
7135 children. These commands do not refile or delete sibling messages. | |
7136 @xref{Navigating}, for a description of the similar command @kbd{k} | |
7137 (@code{mh-delete-subject-or-thread}). | |
7138 | |
7139 @vindex mh-large-folder | |
7140 | |
7141 If you find that threading is too slow, it may be that you have | |
7142 @code{mh-large-folder} set too high. Also, threading is one of the few | |
7143 features of MH-E that really benefits from compiling. If you haven't | |
7144 compiled MH-E, I encourage you to do so@footnote{If you're not sure if | |
7145 MH-E has been byte-compiled, you could try running @samp{locate | |
7146 mh-thread.elc} or otherwise find MH-E on your system and ensure that | |
7147 @file{mh-thread.elc} exists. If you have multiple versions and you | |
7148 find that one is compiled but the other is not, then go into your | |
7149 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and | |
7150 ensure that the byte-compiled version appears first in the | |
7151 @code{load-path}. If you find that MH-E is not compiled and you | |
7152 installed MH-E yourself, please refer to the installation directions | |
7153 in the file @file{README} in the distribution.}. | |
7154 | |
7155 @node Limits, Sequences, Threading, Top | |
7156 @chapter Limiting Display | |
7157 | |
7158 @cindex limits | |
7159 @cindex filters | |
7160 | |
7161 Another way to organize messages in a folder besides threading | |
7162 (@pxref{Threading}) or using full-text indexed searches | |
7163 (@pxref{Searching}) is by limiting the folder display to messages that | |
7164 are similar to the current message. | |
7165 | |
7166 @table @kbd | |
7167 @kindex / ? | |
7168 @findex mh-prefix-help | |
7169 @item / ? | |
7170 Display cheat sheet for the commands of the current prefix in | |
7171 minibuffer (@code{mh-prefix-help}). | |
7172 @c ------------------------- | |
7173 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item | |
7174 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence} | |
7175 @kindex / ' | |
7176 @findex mh-narrow-to-tick | |
7177 @item / ' | |
7178 Limit to messages in the @samp{tick} sequence | |
7179 (@code{mh-narrow-to-tick}). | |
7180 @c ------------------------- | |
7181 @kindex / c | |
7182 @findex mh-narrow-to-cc | |
7183 @item / c | |
7184 Limit to messages with the same @samp{Cc:} field | |
7185 (@code{mh-narrow-to-cc}). | |
7186 @c ------------------------- | |
7187 @kindex / m | |
7188 @findex mh-narrow-to-from | |
7189 @item / m | |
7190 Limit to messages with the same @samp{From:} field | |
7191 (@code{mh-narrow-to-from}). | |
7192 @c ------------------------- | |
7193 @kindex / g | |
7194 @findex mh-narrow-to-range | |
7195 @item / g | |
7196 Limit to range (@code{mh-narrow-to-range}). | |
7197 @c ------------------------- | |
7198 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item | |
7199 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence} | |
7200 @kindex / s | |
7201 @findex mh-narrow-to-subject | |
7202 @item / s | |
7203 Limit to messages with the same @samp{Subject:} field | |
7204 (@code{mh-narrow-to-subject}). | |
7205 @c ------------------------- | |
7206 @kindex / t | |
7207 @findex mh-narrow-to-to | |
7208 @item / t | |
7209 Limit to messages with the same @samp{To:} field | |
7210 (@code{mh-narrow-to-to}). | |
7211 @c ------------------------- | |
7212 @cindex @samp{Sequence > Widen from Sequence} menu item | |
7213 @cindex menu item, @samp{Sequence > Widen from Sequence} | |
7214 @kindex / w | |
7215 @findex mh-widen | |
7216 @item / w | |
7217 Remove last restriction (@code{mh-widen}). | |
7218 @end table | |
7219 | |
7220 All of the limiting commands above refine the display in some way. | |
7221 | |
7222 @cindex @command{pick} | |
7223 @cindex MH commands, @command{pick} | |
7224 @findex mh-narrow-to-cc | |
7225 @findex mh-narrow-to-from | |
7226 @findex mh-narrow-to-subject | |
7227 @findex mh-narrow-to-to | |
7228 @kindex / c | |
7229 @kindex / m | |
7230 @kindex / s | |
7231 @kindex / t | |
7232 | |
7233 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m} | |
7234 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}), | |
7235 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to | |
7236 messages matching the content of the respective field in the current | |
7237 message. However, you can give any of these a prefix argument to edit | |
7238 the @command{pick} expression used to narrow the view@footnote{See | |
7239 @command{pick}(1) or the section | |
7240 @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in | |
7241 the MH book.}. | |
7242 | |
7243 @cindex @samp{tick} sequence | |
7244 @cindex sequence, @samp{tick} | |
7245 @cindex ticked messages, viewing | |
7246 @findex mh-narrow-to-range | |
7247 @findex mh-narrow-to-tick | |
7248 @kindex / ' | |
7249 @kindex / g | |
7250 | |
7251 You can also limit the display to messages in the @samp{tick} sequence | |
7252 with the command @kbd{/ '} (@code{mh-narrow-to-tick}). | |
7253 @xref{Sequences}, for information on putting message into the | |
7254 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range}) | |
7255 command to limit the display to messages in a range (@pxref{Ranges}). | |
7256 | |
7257 @findex mh-widen | |
7258 @kindex / w | |
7259 | |
7260 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen}) | |
7261 command. Give this command a prefix argument to remove all limits. | |
7262 | |
7263 @node Sequences, Junk, Limits, Top | |
7264 @chapter Using Sequences | |
7265 | |
7266 @cindex @samp{Sequence} menu | |
7267 @cindex menu, @samp{Sequence} | |
7268 @cindex sequences | |
7269 | |
7270 For the whole scoop on MH sequences, refer to | |
7271 @samp{mh-sequence}(5)@footnote{See the section | |
7272 @uref{@value{MH-BOOK-HOME}/morseq.html, More About Sequences} in the MH | |
7273 book.}. As you've read, several of the MH-E commands can operate on a | |
7274 sequence, which is a shorthand for a range or group of messages. For | |
7275 example, you might want to forward several messages to a friend or | |
7276 colleague. Here's how to manipulate sequences. These commands are also | |
7277 available in the @samp{Sequence} menu. | |
7278 | |
7279 @table @kbd | |
7280 @cindex @samp{Sequence > Toggle Tick Mark} menu item | |
7281 @cindex menu item, @samp{Sequence > Toggle Tick Mark} | |
7282 @kindex ' | |
7283 @findex mh-toggle-tick | |
7284 @item ' | |
7285 Toggle tick mark of range (@code{mh-toggle-tick}). | |
7286 @c ------------------------- | |
7287 @kindex S ? | |
7288 @findex mh-prefix-help | |
7289 @item S ? | |
7290 Display cheat sheet for the commands of the current prefix in | |
7291 minibuffer (@code{mh-prefix-help}). | |
7292 @c ------------------------- | |
7293 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item | |
7294 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence} | |
7295 @kindex S ' | |
7296 @findex mh-narrow-to-tick | |
7297 @item S ' | |
7298 Limit to ticked messages (@code{mh-narrow-to-tick}). | |
7299 @c ------------------------- | |
7300 @cindex @samp{Sequence > Delete Message from Sequence...} menu item | |
7301 @cindex menu item, @samp{Sequence > Delete Message from Sequence...} | |
7302 @kindex S d | |
7303 @findex mh-delete-msg-from-seq | |
7304 @item S d | |
7305 Delete range from sequence (@code{mh-delete-msg-from-seq}). | |
7306 @c ------------------------- | |
7307 @cindex @samp{Sequence > Delete Sequence...} menu item | |
7308 @cindex menu item, @samp{Sequence > Delete Sequence...} | |
7309 @kindex S k | |
7310 @findex mh-delete-seq | |
7311 @item S k | |
7312 Delete sequence (@code{mh-delete-seq}). | |
7313 @c ------------------------- | |
7314 @cindex @samp{Sequence > List Sequences in Folder...} menu item | |
7315 @cindex menu item, @samp{Sequence > List Sequences in Folder...} | |
7316 @kindex S l | |
7317 @findex mh-list-sequences | |
7318 @item S l | |
7319 List all sequences in folder (@code{mh-list-sequences}). | |
7320 @c ------------------------- | |
7321 @cindex @samp{Sequence > Narrow to Sequence...} menu item | |
7322 @cindex menu item, @samp{Sequence > Narrow to Sequence...} | |
7323 @kindex S n | |
7324 @findex mh-narrow-to-seq | |
7325 @item S n | |
7326 Restrict display to messages in sequence (@code{mh-narrow-to-seq}). | |
7327 @c ------------------------- | |
7328 @cindex @samp{Sequence > Add Message to Sequence...} menu item | |
7329 @cindex menu item, @samp{Sequence > Add Message to Sequence...} | |
7330 @kindex S p | |
7331 @findex mh-put-msg-in-seq | |
7332 @item S p | |
7333 Add range to sequence (@code{mh-put-msg-in-seq}). | |
7334 @c ------------------------- | |
7335 @cindex @samp{Sequence > List Sequences for Message} menu item | |
7336 @cindex menu item, @samp{Sequence > List Sequences for Message} | |
7337 @kindex S s | |
7338 @findex mh-msg-is-in-seq | |
7339 @item S s | |
7340 Display the sequences in which the current message appears | |
7341 (@code{mh-msg-is-in-seq}). | |
7342 @c ------------------------- | |
7343 @cindex @samp{Sequence > Widen from Sequence} menu item | |
7344 @cindex menu item, @samp{Sequence > Widen from Sequence} | |
7345 @kindex S w | |
7346 @findex mh-widen | |
7347 @item S w | |
7348 Remove last restriction (@code{mh-widen}). | |
7349 @c ------------------------- | |
7350 @findex mh-update-sequences | |
7351 @item M-x mh-update-sequences | |
7352 Flush MH-E's state out to MH@. | |
7353 @end table | |
7354 | |
7355 @cindex @samp{mh-sequences} customization group | |
7356 @cindex customization group, @samp{mh-sequences} | |
7357 | |
7358 The @samp{mh-sequences} customization group contains the options | |
7359 associated with sequences. | |
7360 | |
7361 @vtable @code | |
7362 @item mh-refile-preserves-sequences-flag | |
7363 On means that sequences are preserved when messages are refiled | |
7364 (default: @samp{on}). | |
7365 @c ------------------------- | |
7366 @item mh-tick-seq | |
7367 The name of the MH sequence for ticked messages (default: @samp{'tick}). | |
7368 @c ------------------------- | |
7369 @item mh-update-sequences-after-mh-show-flag | |
7370 On means flush MH sequences to disk after message is shown (default: | |
7371 @samp{on}). | |
7372 @end vtable | |
7373 | |
7374 The following hook is available. | |
7375 | |
7376 @vtable @code | |
7377 @item mh-unseen-updated-hook | |
7378 Hook run after the unseen sequence has been updated (default: @code{nil}). | |
7379 @end vtable | |
7380 | |
7381 @cindex @command{pick} | |
7382 @cindex MH commands, @command{pick} | |
7383 @findex mh-put-msg-in-seq | |
7384 @kindex S p | |
7385 | |
7386 To place a message in a sequence, use @kbd{S p} | |
7387 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all | |
7388 the messages in a sequence to another sequence (for example, @kbd{C-u | |
7389 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}). | |
7390 | |
7391 @cindex @samp{tick} sequence | |
7392 @cindex sequence, @samp{tick} | |
7393 @cindex ticking messages | |
7394 @findex mh-index-ticked-messages | |
7395 @findex mh-toggle-tick | |
7396 @kindex ' | |
7397 @kindex F ' | |
7398 @kindex S p | |
7399 | |
7400 One specific use of the @kbd{S p} command is @kbd{'} | |
7401 (@code{mh-toggle-tick}) which adds messages to the @samp{tick} | |
7402 sequence. This sequence can be viewed later with the @kbd{F '} | |
7403 (@code{mh-index-ticked-messages}) command (@pxref{Folders}). | |
7404 | |
7405 @vindex mh-tick-seq | |
7406 | |
7407 You can customize the option @code{mh-tick-seq} if you already use the | |
7408 @samp{tick} sequence for your own use. You can also disable all of the | |
7409 ticking functions by choosing the @samp{Disable Ticking} item but | |
7410 there isn't much advantage to that. | |
7411 | |
7412 @cindex MH-Folder mode | |
7413 @cindex modes, MH-Folder | |
7414 @findex mh-narrow-to-seq | |
7415 @findex mh-narrow-to-tick | |
7416 @findex mh-widen | |
7417 @kindex S ' | |
7418 @kindex S n | |
7419 @kindex S w | |
7420 | |
7421 Once you've placed some messages in a sequence, you may wish to narrow | |
7422 the field of view to just those messages in the sequence you've | |
7423 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are | |
7424 prompted for the name of the sequence. What this does is show only | |
7425 those messages that are in the selected sequence in the MH-Folder | |
7426 buffer. In addition, it limits further MH-E searches to just those | |
7427 messages. To narrow the view to the messages in the @samp{tick} | |
7428 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to | |
7429 widen the view to all your messages again, use @kbd{S w} | |
7430 (@code{mh-widen}). | |
7431 | |
7432 @cindex buffers, @samp{*MH-E Sequences*} | |
7433 @cindex @samp{*MH-E Sequences*} | |
7434 @findex mh-list-sequences | |
7435 @findex mh-msg-is-in-seq | |
7436 @kindex S l | |
7437 @kindex S s | |
7438 | |
7439 You can see which sequences in which a message appears with the | |
7440 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to | |
7441 display the sequences in which another message appears (as in @kbd{C-u | |
7442 42 S s @key{RET}}). Or, you can list all sequences in a selected | |
7443 folder (default is current folder) with @kbd{S l} | |
7444 (@code{mh-list-sequences}). The list appears in a buffer named | |
7445 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}). | |
7446 | |
7447 @cindex MH profile component, @samp{Previous-Sequence:} | |
7448 @cindex @samp{cur} sequence | |
7449 @cindex @samp{Previous-Sequence:} MH profile component | |
7450 @cindex sequence, @samp{cur} | |
7451 @cindex sequence, @samp{Previous-Sequence} | |
7452 @vindex mh-refile-preserves-sequences-flag | |
7453 | |
7454 If a message is in any sequence (except | |
7455 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and | |
7456 @samp{cur}) when it is refiled, then it will still be in those | |
7457 sequences in the destination folder. If this behavior is not desired, | |
7458 then turn off the option @code{mh-refile-preserves-sequences-flag}. | |
7459 | |
7460 @findex mh-delete-msg-from-seq | |
7461 @findex mh-delete-seq | |
7462 @kindex d | |
7463 @kindex S d | |
7464 @kindex S k | |
7465 | |
7466 If you want to remove a message (or range, @pxref{Ranges}) from a | |
7467 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want | |
7468 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In | |
7469 the latter case you are prompted for the sequence to delete. Note that | |
7470 this deletes only the sequence, not the messages in the sequence. If | |
7471 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading | |
7472 Mail}). | |
7473 | |
7474 @cindex @samp{Unseen-Sequence:} MH profile component | |
7475 @cindex @samp{cur} sequence | |
7476 @cindex @samp{tick} sequence | |
7477 @cindex MH profile component, @samp{Unseen-Sequence:} | |
7478 @cindex sequence, @samp{Unseen-Sequence} | |
7479 @cindex sequence, @samp{cur} | |
7480 @cindex sequence, @samp{tick} | |
7481 @findex mh-update-sequences | |
7482 @kindex M-x mh-update-sequences | |
7483 @kindex q | |
7484 @kindex x | |
7485 @vindex mh-tick-seq | |
7486 @vindex mh-update-sequences-after-mh-show-flag | |
7487 | |
7488 Three sequences are maintained internally by MH-E and pushed out to MH | |
7489 when a message is shown. They include the sequence specified by your | |
7490 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the | |
7491 sequence listed by the option @code{mh-tick-seq} which is @samp{tick} | |
7492 by default. If you do not like this behavior, turn off the option | |
7493 @code{mh-update-sequences-after-mh-show-flag}. You can then update the | |
7494 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x | |
7495 mh-update-sequences} commands. | |
7496 | |
7497 @vindex mh-seen-list | |
7498 @vindex mh-unseen-updated-hook | |
7499 | |
7500 The hook @code{mh-unseen-updated-hook} is run after the unseen | |
7501 sequence has been updated. The variable @code{mh-seen-list} can be | |
7502 used by this hook to obtain the list of messages which were removed | |
7503 from the unseen sequence. | |
7504 | |
7505 @cindex @command{mark} | |
7506 @cindex MH commands, @command{mark} | |
7507 @kindex S n | |
7508 @kindex S w | |
7509 | |
7510 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH | |
7511 command dealing with sequences is @command{mark}@footnote{See the | |
7512 section @uref{@value{MH-BOOK-HOME}/mmbwm.html, Make Message Bookmarks | |
7513 with mark} in the MH book.}. | |
7514 | |
7515 @node Junk, Miscellaneous, Sequences, Top | |
7516 @chapter Dealing With Junk Mail | |
7517 | |
7518 @cindex Marshall Rose | |
7519 @cindex junk mail | |
7520 @cindex spam | |
7521 | |
7522 Marshall Rose once wrote a paper on MH entitled, @cite{How to process | |
7523 200 messages a day and still get some real work done}. This chapter | |
7524 could be entitled, @cite{How to process 1000 spams a day and still get | |
7525 some real work done}. | |
7526 | |
7527 @cindex blacklisting | |
7528 @cindex ham | |
7529 @cindex viruses | |
7530 @cindex whitelisting | |
7531 @cindex worms | |
7532 | |
7533 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for | |
7534 any unwanted message which includes spam, @dfn{viruses}, and | |
7535 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying | |
7536 a sender as one who sends junk mail is called @dfn{blacklisting}; the | |
7537 opposite is called @dfn{whitelisting}. | |
7538 | |
7539 @table @kbd | |
7540 @kindex J ? | |
7541 @findex mh-prefix-help | |
7542 @item J ? | |
7543 Display cheat sheet for the commands of the current prefix in | |
7544 minibuffer (@code{mh-prefix-help}). | |
7545 @c ------------------------- | |
7546 @kindex J b | |
7547 @findex mh-junk-blacklist | |
7548 @item J b | |
7549 Blacklist range as spam (@code{mh-junk-blacklist}). | |
7550 @c ------------------------- | |
7551 @kindex J w | |
7552 @findex mh-junk-whitelist | |
7553 @item J w | |
7554 Whitelist range as ham (@code{mh-junk-whitelist}). | |
7555 @c ------------------------- | |
7556 @item @code{mh-spamassassin-identify-spammers} | |
7557 Identify spammers who are repeat offenders. | |
7558 @end table | |
7559 | |
7560 @cindex @samp{mh-junk} customization group | |
7561 @cindex customization group, @samp{mh-junk} | |
7562 | |
7563 The following table lists the options from the @samp{mh-junk} | |
7564 customization group. | |
7565 | |
7566 @vtable @code | |
7567 @item mh-junk-background | |
7568 If on, spam programs are run in background (default: @samp{off}). | |
7569 @c ------------------------- | |
7570 @item mh-junk-disposition | |
7571 Disposition of junk mail (default: @samp{Delete Spam}). | |
7572 @c ------------------------- | |
7573 @item mh-junk-program | |
7574 Spam program that MH-E should use (default: @samp{Auto-detect}). | |
7575 @end vtable | |
7576 | |
7577 @cindex SpamProbe | |
7578 @cindex Spamassassin | |
7579 @cindex bogofilter | |
7580 @cindex spam filters, SpamProbe | |
7581 @cindex spam filters, Spamassassin | |
7582 @cindex spam filters, bogofilter | |
7583 | |
7584 MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin}, | |
7585 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or | |
7586 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck | |
7587 away. This chapter describes briefly how to configure these programs | |
7588 to work well with MH-E and how to use MH-E's interface that provides | |
7589 continuing education for these programs. | |
7590 | |
7591 @vindex mh-junk-program | |
7592 | |
7593 The default setting of the option @code{mh-junk-program} is | |
7594 @samp{Auto-detect} which means that MH-E will automatically choose one | |
7595 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for | |
7596 example, you have both SpamAssassin and bogofilter installed and you | |
7597 want to use bogofilter, then you can set this option to | |
7598 @samp{Bogofilter}. | |
7599 | |
7600 @findex mh-junk-blacklist | |
7601 @kindex J b | |
7602 @vindex mh-junk-disposition | |
7603 | |
7604 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam | |
7605 program in use with the content of the range (@pxref{Ranges}) and then | |
7606 handles the message(s) as specified by the option | |
7607 @code{mh-junk-disposition}. By default, this option is set to | |
7608 @samp{Delete Spam} but you can also specify the name of the folder | |
7609 which is useful for building a corpus of spam for training purposes. | |
7610 | |
7611 @findex mh-junk-whitelist | |
7612 @kindex J w | |
7613 | |
7614 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist}) | |
7615 reclassifies a range of messages (@pxref{Ranges}) as ham if it were | |
7616 incorrectly classified as spam. It then refiles the message into the | |
7617 @file{+inbox} folder. | |
7618 | |
7619 @cindex @samp{*MH-E Log*} | |
7620 @cindex buffers, @samp{*MH-E Log*} | |
7621 @findex call-process | |
7622 @vindex mh-junk-background | |
7623 | |
7624 By default, the programs are run in the foreground, but this can be | |
7625 slow when junking large numbers of messages. If you have enough memory | |
7626 or don't junk that many messages at the same time, you might try | |
7627 turning on the option @code{mh-junk-background}. @footnote{Note that | |
7628 the option @code{mh-junk-background} is used as the @code{display} | |
7629 argument in the call to @code{call-process}. Therefore, turning on | |
7630 this option means setting its value to @samp{0}. You can also set its | |
7631 value to @samp{t} to direct the programs' output to the @samp{*MH-E | |
7632 Log*} buffer; this may be useful for debugging.} | |
7633 | |
7634 The following sections discuss the various counter-spam measures that | |
7635 MH-E can work with. | |
7636 | |
7637 @cindex @file{.procmailrc} | |
7638 @cindex files, @file{.procmailrc} | |
7639 | |
7640 @subheading SpamAssassin | |
7641 | |
7642 @cindex Spamassassin | |
7643 @cindex spam filters, Spamassassin | |
7644 | |
7645 SpamAssassin is one of the more popular spam filtering programs. Get | |
7646 it from your local distribution or from the | |
7647 @uref{http://spamassassin.apache.org/, SpamAssassin web site}. | |
7648 | |
7649 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}: | |
7650 | |
7651 @cindex @command{spamc} | |
7652 @cindex @samp{X-Spam-Level:} header field | |
7653 @cindex @samp{X-Spam-Status:} header field | |
7654 @cindex header field, @samp{X-Spam-Level:} | |
7655 @cindex header field, @samp{X-Spam-Status:} | |
7656 | |
7657 @smallexample | |
7658 PATH=$PATH:/usr/bin/mh | |
7659 MAILDIR=$HOME/`mhparam Path` | |
7660 | |
7661 # Fight spam with SpamAssassin. | |
7662 :0fw | |
7663 | spamc | |
7664 | |
7665 # Anything with a spam level of 10 or more is junked immediately. | |
7666 :0: | |
7667 * ^X-Spam-Level: .......... | |
7668 /dev/null | |
7669 | |
7670 :0: | |
7671 * ^X-Spam-Status: Yes | |
7672 spam/. | |
7673 @end smallexample | |
7674 | |
7675 If you don't use @command{spamc}, use @samp{spamassassin -P -a}. | |
7676 | |
7677 Note that one of the recipes above throws away messages with a score | |
7678 greater than or equal to 10. Here's how you can determine a value that | |
7679 works best for you. | |
7680 | |
7681 First, run @samp{spamassassin -t} on every mail message in your | |
7682 archive and use @command{gnumeric} to verify that the average plus the | |
7683 standard deviation of good mail is under 5, the SpamAssassin default | |
7684 for ``spam''. | |
7685 | |
7686 Using @command{gnumeric}, sort the messages by score and view the | |
7687 messages with the highest score. Determine the score which encompasses | |
7688 all of your interesting messages and add a couple of points to be | |
7689 conservative. Add that many dots to the @samp{X-Spam-Level:} header | |
7690 field above to send messages with that score down the drain. | |
7691 | |
7692 In the example above, messages with a score of 5-9 are set aside in | |
7693 the @samp{+spam} folder for later review. The major weakness of | |
7694 rules-based filters is a plethora of false positives so it is | |
7695 worthwhile to check. | |
7696 | |
7697 @findex mh-junk-blacklist | |
7698 @findex mh-junk-whitelist | |
7699 @kindex J b | |
7700 @kindex J w | |
7701 | |
7702 If SpamAssassin classifies a message incorrectly, or is unsure, you can | |
7703 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and | |
7704 @kbd{J w} (@code{mh-junk-whitelist}). | |
7705 | |
7706 @cindex @command{sa-learn} | |
7707 @cindex @file{.spamassassin/user_prefs} | |
7708 @cindex files, @file{.spamassassin/user_prefs} | |
7709 | |
7710 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a | |
7711 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs}, | |
7712 deletes the message, and sends the message to the Razor, so that | |
7713 others might not see this spam. If the @command{sa-learn} command is | |
7714 available, the message is also recategorized as spam. | |
7715 | |
7716 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a | |
7717 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If | |
7718 the @command{sa-learn} command is available, the message is also | |
7719 recategorized as ham. | |
7720 | |
7721 Over time, you'll observe that the same host or domain occurs | |
7722 repeatedly in the @samp{blacklist_from} entries, so you might think | |
7723 that you could avoid future spam by blacklisting all mail from a | |
7724 particular domain. The utility function | |
7725 @code{mh-spamassassin-identify-spammers} helps you do precisely that. | |
7726 This function displays a frequency count of the hosts and domains in | |
7727 the @samp{blacklist_from} entries from the last blank line in | |
7728 @file{~/.spamassassin/user_prefs} to the end of the file. This | |
7729 information can be used so that you can replace multiple | |
7730 @samp{blacklist_from} entries with a single wildcard entry such as: | |
7731 | |
7732 @smallexample | |
7733 blacklist_from *@@*amazingoffersdirect2u.com | |
7734 @end smallexample | |
7735 | |
7736 In versions of SpamAssassin (2.50 and on) that support a Bayesian | |
7737 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program | |
7738 @command{sa-learn} to recategorize the message as spam. Neither MH-E, | |
7739 nor SpamAssassin, rebuilds the database after adding words, so you | |
7740 will need to run @samp{sa-learn --rebuild} periodically. This can be | |
7741 done by adding the following to your @file{crontab}: | |
7742 | |
7743 @smallexample | |
7744 0 * * * * sa-learn --rebuild > /dev/null 2>&1 | |
7745 @end smallexample | |
7746 | |
7747 @subheading Bogofilter | |
7748 | |
7749 @cindex bogofilter | |
7750 @cindex spam filters, bogofilter | |
7751 | |
7752 Bogofilter is a Bayesian spam filtering program. Get it from your | |
7753 local distribution or from the | |
7754 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}. | |
7755 | |
7756 Bogofilter is taught by running: | |
7757 | |
7758 @smallexample | |
7759 bogofilter -n < good-message | |
7760 @end smallexample | |
7761 | |
7762 on every good message, and | |
7763 | |
7764 @smallexample | |
7765 bogofilter -s < spam-message | |
7766 @end smallexample | |
7767 | |
7768 @cindex full training | |
7769 | |
7770 on every spam message. This is called a @dfn{full training}; three | |
7771 other training methods are described in the FAQ that is distributed | |
7772 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of | |
7773 each type of message to start doing a good job. | |
7774 | |
7775 To use bogofilter, add the following recipes to @file{~/.procmailrc}: | |
7776 | |
7777 @cindex @samp{X-Bogosity:} header field | |
7778 @cindex header field, @samp{X-Bogosity:} | |
7779 | |
7780 @smallexample | |
7781 PATH=$PATH:/usr/bin/mh | |
7782 MAILDIR=$HOME/`mhparam Path` | |
7783 | |
7784 # Fight spam with Bogofilter. | |
7785 :0fw | |
7786 | bogofilter -3 -e -p | |
7787 | |
7788 :0: | |
7789 * ^X-Bogosity: Yes, tests=bogofilter | |
7790 spam/. | |
7791 | |
7792 :0: | |
7793 * ^X-Bogosity: Unsure, tests=bogofilter | |
7794 spam/unsure/. | |
7795 @end smallexample | |
7796 | |
7797 @findex mh-junk-blacklist | |
7798 @findex mh-junk-whitelist | |
7799 @kindex J b | |
7800 @kindex J w | |
7801 | |
7802 If bogofilter classifies a message incorrectly, or is unsure, you can | |
7803 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J | |
7804 w} (@code{mh-junk-whitelist}) to update bogofilter's training. | |
7805 | |
7806 The @cite{Bogofilter FAQ} suggests that you run the following | |
7807 occasionally to shrink the database: | |
7808 | |
7809 @smallexample | |
7810 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new | |
7811 mv wordlist.db wordlist.db.prv | |
7812 mv wordlist.db.new wordlist.db | |
7813 @end smallexample | |
7814 | |
7815 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune | |
7816 bogofilter. | |
7817 | |
7818 @subheading SpamProbe | |
7819 | |
7820 @cindex SpamProbe | |
7821 @cindex spam filters, SpamProbe | |
7822 | |
7823 SpamProbe is a Bayesian spam filtering program. Get it from your local | |
7824 distribution or from the @uref{http://spamprobe.sourceforge.net, | |
7825 SpamProbe web site}. | |
7826 | |
7827 To use SpamProbe, add the following recipes to @file{~/.procmailrc}: | |
7828 | |
7829 @cindex @command{formail} | |
7830 @cindex @samp{X-SpamProbe:} header field | |
7831 @cindex header field, @samp{X-SpamProbe:} | |
7832 | |
7833 @smallexample | |
7834 PATH=$PATH:/usr/bin/mh | |
7835 MAILDIR=$HOME/`mhparam Path` | |
7836 | |
7837 # Fight spam with SpamProbe. | |
7838 :0 | |
7839 SCORE=| spamprobe receive | |
7840 | |
7841 :0 wf | |
7842 | formail -I "X-SpamProbe: $SCORE" | |
7843 | |
7844 :0: | |
7845 *^X-SpamProbe: SPAM | |
7846 spam/. | |
7847 @end smallexample | |
7848 | |
7849 @findex mh-junk-blacklist | |
7850 @findex mh-junk-whitelist | |
7851 @kindex J b | |
7852 @kindex J w | |
7853 | |
7854 If SpamProbe classifies a message incorrectly, you can use the MH-E | |
7855 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w} | |
7856 (@code{mh-junk-whitelist}) to update SpamProbe's training. | |
7857 | |
7858 @subheading Other Things You Can Do | |
7859 | |
7860 There are a couple of things that you can add to @file{~/.procmailrc} | |
7861 in order to filter out a lot of spam and viruses. The first is to | |
7862 eliminate any message with a Windows executable (which is most likely | |
7863 a virus). The second is to eliminate mail in character sets that you | |
7864 can't read. | |
7865 | |
7866 @cindex @samp{Content-Transfer-Encoding:} header field | |
7867 @cindex @samp{Content-Type:} header field | |
7868 @cindex @samp{Subject:} header field | |
7869 @cindex header field, @samp{Content-Transfer-Encoding:} | |
7870 @cindex header field, @samp{Content-Type:} | |
7871 @cindex header field, @samp{Subject:} | |
7872 | |
7873 @smallexample | |
7874 PATH=$PATH:/usr/bin/mh | |
7875 MAILDIR=$HOME/`mhparam Path` | |
7876 | |
7877 # | |
7878 # Filter messages with win32 executables/virii. | |
7879 # | |
7880 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg | |
7881 # pattern. The string "this program cannot be run in MS-DOS mode" | |
7882 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false | |
7883 # positives (Roland Smith via Pete from the bogofilter mailing list). | |
7884 # | |
7885 :0 B: | |
7886 * ^Content-Transfer-Encoding:.*base64 | |
7887 * ^TVqQAAMAAAAEAAAA//8AALg | |
7888 * 4fug4AtAnNIbg | |
7889 spam/exe/. | |
7890 | |
7891 # | |
7892 # Filter mail in unreadable character sets (from the Bogofilter FAQ). | |
7893 # | |
7894 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987' | |
7895 | |
7896 :0: | |
7897 * 1^0 $ ^Subject:.*=\?($UNREADABLE) | |
7898 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE) | |
7899 spam/unreadable/. | |
7900 | |
7901 :0: | |
7902 * ^Content-Type:.*multipart | |
7903 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE) | |
7904 spam/unreadable/. | |
7905 @end smallexample | |
7906 | |
7907 @node Miscellaneous, Scan Line Formats, Junk, Top | |
7908 @chapter Miscellaneous Commands, Variables, and Buffers | |
7909 | |
7910 This chapter covers the following command and the various MH-E | |
7911 buffers, | |
7912 | |
7913 @ftable @code | |
7914 @item mh-version | |
7915 Display version information about MH-E and the MH mail handling | |
7916 system. | |
7917 @end ftable | |
7918 | |
7919 @cindex buffers, @samp{*MH-E Info*} | |
7920 @cindex MH-E version | |
7921 @cindex @samp{*MH-E Info*} | |
7922 @cindex version | |
7923 @kindex M-x mh-version | |
7924 | |
7925 One command worth noting is @kbd{M-x mh-version}. You can compare the | |
7926 version this command prints to the latest release (@pxref{Getting | |
7927 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named | |
7928 @samp{*MH-E Info*}, should usually be included with any bug report you | |
7929 submit (@pxref{Bug Reports}). | |
7930 | |
7931 @subheading MH-E Buffers | |
7932 | |
7933 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates | |
7934 several other buffers. They are: | |
7935 | |
7936 @table @samp | |
7937 @cindex @samp{*MH-E Folders*} | |
7938 @cindex buffers, @samp{*MH-E Folders*} | |
7939 @findex mh-list-folders | |
7940 @item *MH-E Folders* | |
7941 @kindex F l | |
7942 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}). | |
7943 @xref{Folders}. | |
7944 @c ------------------------- | |
7945 @cindex @samp{*MH-E Help*} | |
7946 @cindex buffers, @samp{*MH-E Help*} | |
7947 @findex mh-help | |
7948 @item *MH-E Help* | |
7949 @kindex ? | |
7950 @kindex C-c ? | |
7951 This buffer contains the output of @kbd{?} (@code{mh-help}) and | |
7952 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}. | |
7953 @c ------------------------- | |
7954 @cindex @samp{*MH-E Info*} | |
7955 @cindex buffers, @samp{*MH-E Info*} | |
7956 @item *MH-E Info* | |
7957 This buffer contains the output of @kbd{M-x mh-version @key{RET}}. | |
7958 @c ------------------------- | |
7959 @cindex @samp{*MH-E Log*} | |
7960 @cindex buffers, @samp{*MH-E Log*} | |
7961 @item *MH-E Log* | |
7962 This buffer contains the last 100 lines of the output of the various | |
7963 MH commands. | |
7964 @c ------------------------- | |
7965 @cindex @samp{*MH-E Mail Delivery*} | |
7966 @cindex buffers, @samp{*MH-E Mail Delivery*} | |
7967 @item *MH-E Mail Delivery* | |
7968 This buffer contains the transcript of a mail delivery. @xref{Sending | |
7969 Message}. | |
7970 @c ------------------------- | |
7971 @cindex @samp{*MH-E Recipients*} | |
7972 @cindex buffers, @samp{*MH-E Recipients*} | |
7973 @findex mh-check-whom | |
7974 @item *MH-E Recipients* | |
7975 @kindex C-c C-w | |
7976 This buffer contains the output of @kbd{C-c C-w} | |
7977 (@code{mh-check-whom}) and is killed when draft is sent. | |
7978 @xref{Checking Recipients}. | |
7979 @c ------------------------- | |
7980 @cindex @samp{*MH-E Sequences*} | |
7981 @cindex buffers, @samp{*MH-E Sequences*} | |
7982 @item *MH-E Sequences* | |
7983 This buffer contains the output of @kbd{S l} | |
7984 (@code{mh-list-sequences}). @xref{Sequences}. | |
7985 @c ------------------------- | |
7986 @cindex @samp{*mh-temp*} | |
7987 @cindex buffers, @samp{*mh-temp*} | |
7988 @item *mh-temp* | |
7989 This is a scratch, ephemeral, buffer used by MH-E functions. Note that | |
7990 it is hidden because the first character in the name is a space. | |
7991 You'll generally not have any need for this buffer. | |
7992 @end table | |
7993 | |
7994 @node Scan Line Formats, Procmail, Miscellaneous, Top | |
7995 @appendix Scan Line Formats | |
7996 | |
7997 @cindex scan line formats | |
7998 | |
7999 This appendix discusses how MH-E creates, parses, and manipulates scan | |
8000 lines. If you have your own MH scan or inc format files, you | |
8001 @strong{can} teach MH-E how to handle them, but it isn't easy as | |
8002 you'll see. | |
8003 | |
8004 @cindex @samp{mh-scan-line-formats} customization group | |
8005 @cindex customization group, @samp{mh-scan-line-formats} | |
8006 | |
8007 This table lists the options in the @samp{mh-scan-line-formats} | |
8008 customization group. | |
8009 | |
8010 @vtable @code | |
8011 @item mh-adaptive-cmd-note-flag | |
8012 On means that the message number width is determined dynamically | |
8013 (default: @samp{on}). | |
8014 @c ------------------------- | |
8015 @item mh-scan-format-file | |
8016 Specifies the format file to pass to the scan program (default: | |
8017 @samp{Use MH-E scan Format}). | |
8018 @c ------------------------- | |
8019 @item mh-scan-prog | |
8020 Program used to scan messages (default: @code{"scan"}). | |
8021 @end vtable | |
8022 | |
8023 @vindex mh-adaptive-cmd-note-flag | |
8024 | |
8025 There are a couple of caveats when creating your own scan format file. | |
8026 First, MH-E will not work if your scan lines do not include message | |
8027 numbers. It will work poorly if you don't dedicate a column for | |
8028 showing the current message and notations. You won't be able to use | |
8029 the option @code{mh-adaptive-cmd-note-flag} or the threading features | |
8030 (@pxref{Threading}). | |
8031 | |
8032 @cindex message numbers | |
8033 @findex mh-set-cmd-note | |
8034 @vindex mh-adaptive-cmd-note-flag | |
8035 @vindex mh-scan-format-file | |
8036 | |
8037 If you've created your own format to handle long message numbers, | |
8038 you'll be pleased to know you no longer need it since MH-E adapts its | |
8039 internal format based upon the largest message number if | |
8040 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer | |
8041 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag} | |
8042 and call @code{mh-set-cmd-note} with the width specified by your | |
8043 format file (see @code{mh-scan-format-file}). For example, the default | |
8044 width is 4, so you would use @samp{(mh-set-cmd-note 4)}. | |
8045 | |
8046 @vindex mh-adaptive-cmd-note-flag | |
8047 @vindex mh-scan-format-file | |
8048 @vindex mh-scan-format-mh | |
8049 @vindex mh-scan-format-nmh | |
8050 | |
8051 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E | |
8052 scan Format}. This means that the format string will be taken from the | |
8053 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
|
8054 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
|
8055 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
|
8056 @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
|
8057 @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
|
8058 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
|
8059 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
|
8060 @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
|
8061 file. |
84306 | 8062 |
8063 @vindex mh-scan-format-file | |
8064 @vindex mh-scan-format-mh | |
8065 @vindex mh-scan-format-nmh | |
8066 | |
8067 The scan format that MH-E uses when @code{mh-scan-format-file} is set | |
8068 to its default of @samp{Use MH-E scan Format} is held in the variables | |
8069 @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
|
8070 whether you are using nmh (or GNU mailutils MH) or not. Typically, you |
84306 | 8071 create your own format files rather than modifying these variables. |
8072 The value of @code{mh-scan-format-nmh} is: | |
8073 | |
8074 @smallexample | |
8075 (concat | |
8076 "%4(msg)" | |
8077 "%<(cur)+%| %>" | |
8078 "%<@{replied@}-" | |
8079 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>" | |
8080 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>" | |
8081 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>" | |
8082 "%?(nonnull(comp@{newsgroups@}))n%>" | |
8083 "%<(zero) %>" | |
8084 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>" | |
8085 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>" | |
8086 "%<(zero)%17(decode(friendly@{from@}))%> " | |
8087 "%(decode@{subject@})%<@{body@}<<%@{body@}%>") | |
8088 @end smallexample | |
8089 | |
8090 @cindex decoding RFC 2047 | |
8091 @cindex RFC 2047, decoding | |
8092 @vindex mh-scan-format-mh | |
8093 | |
8094 The setting for @code{mh-scan-format-mh} is similar, except that MH | |
8095 doesn't have the function @code{decode} (which is used to decode RFC | |
8096 2047 encodings). | |
8097 | |
8098 @cindex notations, scan line | |
8099 @cindex scan line notations | |
8100 | |
8101 These strings are passed to the @command{scan} program via the | |
8102 @option{-format} argument. The formats are identical to the defaults | |
8103 except that additional hints for fontification have been added to the | |
8104 existing notations in the fifth column (remember that in Emacs, the | |
8105 columns start at 0). The values of the fifth column, in priority | |
8106 order, are: @samp{-} if the message has been replied to, @samp{t} if | |
8107 an address in the @samp{To:} field matches one of the mailboxes of the | |
8108 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if | |
8109 the @samp{Bcc:} field matches, and @samp{n} if a non-empty | |
8110 @samp{Newsgroups:} field is present. | |
8111 | |
8112 @cindex @command{scan} | |
8113 @cindex MH commands, @command{scan} | |
8114 @vindex mh-progs | |
8115 @vindex mh-scan-prog | |
8116 | |
8117 The name of the program that generates a listing of one line per | |
8118 message is held in @code{mh-scan-prog} (default: @code{"scan"}). | |
8119 Unless this variable contains an absolute pathname, it is assumed to | |
8120 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may | |
8121 link another program to @command{scan} (see @samp{mh-profile}(5)) to | |
8122 produce a different type of listing@footnote{See the section | |
8123 @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan | |
8124 pick Ranges Sequences} in the MH book.}. | |
8125 | |
8126 @cindex regular expressions, scan line formats | |
8127 @findex mh-set-cmd-note | |
8128 @findex setq | |
8129 | |
8130 If you change the format of the scan lines you'll need to tell MH-E | |
8131 how to parse the new format. As you will see, quite a lot of variables | |
8132 are involved to do that. Use @kbd{M-x apropos @key{RET} | |
8133 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You | |
8134 will also have to call @code{mh-set-cmd-note} if your notations are | |
8135 not in column 4 (columns in Emacs start with 0). Note that unlike most | |
8136 of the user options described in this manual, these are variables and | |
8137 must be set with @code{setq} instead of in a customization buffer. For | |
8138 help with regular expressions, see | |
8139 @ifnothtml | |
8140 @ref{Regexps, , Syntax of Regular Expressions, emacs, The | |
8141 GNU Emacs Manual}. | |
8142 @end ifnothtml | |
8143 @ifhtml | |
8144 section | |
8145 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
8146 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}. | |
8147 @end ifhtml | |
8148 | |
8149 The first variable has to do with pruning out garbage. | |
8150 | |
8151 @vtable @code | |
8152 @cindex @command{inc} | |
8153 @cindex MH commands, @command{inc} | |
8154 @cindex @command{scan} | |
8155 @cindex MH commands, @command{scan} | |
8156 @item mh-scan-valid-regexp | |
8157 This regular expression describes a valid scan line. This is used to | |
8158 eliminate error messages that are occasionally produced by | |
8159 @command{inc}@footnote{See the section | |
8160 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
8161 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}). | |
8162 @end vtable | |
8163 | |
8164 Next, many variables control how the scan lines are parsed. | |
8165 | |
8166 @vtable @code | |
8167 @vindex mh-folder-body | |
8168 @vindex mh-folder-font-lock-keywords | |
8169 @item mh-scan-body-regexp | |
8170 This regular expression matches the message body fragment. Note that | |
8171 the default setting of @code{mh-folder-font-lock-keywords} expects | |
8172 this expression to contain at least one parenthesized expression which | |
8173 matches the body text as in the default of | |
8174 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not | |
8175 correct, the body fragment will not be highlighted with the face | |
8176 @code{mh-folder-body}. | |
8177 @c ------------------------- | |
8178 @vindex mh-folder-cur-msg-number | |
8179 @vindex mh-folder-font-lock-keywords | |
8180 @vindex mh-note-cur | |
8181 @item mh-scan-cur-msg-number-regexp | |
8182 This regular expression matches the current message. It must match | |
8183 from the beginning of the line. Note that the default setting of | |
8184 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8185 at least one parenthesized expression which matches the message number | |
8186 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This | |
8187 expression includes the leading space and current message marker | |
8188 @samp{+} within the parenthesis since it looks better to highlight | |
8189 these items as well. The highlighting is done with the face | |
8190 @code{mh-folder-cur-msg-number}. This regular expression should be | |
8191 correct as it is needed by non-fontification functions. See also | |
8192 @code{mh-note-cur}. | |
8193 @c ------------------------- | |
8194 @vindex mh-folder-date | |
8195 @vindex mh-folder-font-lock-keywords | |
8196 @vindex mh-scan-sent-to-me-sender-regexp | |
8197 @item mh-scan-date-regexp | |
8198 This regular expression matches a valid date. It must @strong{not} be | |
8199 anchored to the beginning or the end of the line. Note that the | |
8200 default setting of @code{mh-folder-font-lock-keywords} expects this | |
8201 expression to contain only one parenthesized expression which matches | |
8202 the date field as in the default of | |
8203 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is | |
8204 not correct, the date will not be highlighted with the face | |
8205 @code{mh-folder-date}. | |
8206 @c ------------------------- | |
8207 @vindex mh-folder-deleted | |
8208 @vindex mh-folder-font-lock-keywords | |
8209 @vindex mh-note-deleted | |
8210 @item mh-scan-deleted-msg-regexp | |
8211 This regular expression matches deleted messages. It must match from | |
8212 the beginning of the line. Note that the default setting of | |
8213 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8214 at least one parenthesized expression which matches the message number | |
8215 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression | |
8216 includes the leading space within the parenthesis since it looks | |
8217 better to highlight it as well. The highlighting is done with the face | |
8218 @code{mh-folder-deleted}. This regular expression should be correct as | |
8219 it is needed by non-fontification functions. See also | |
8220 @code{mh-note-deleted}. | |
8221 @c ------------------------- | |
8222 @vindex mh-folder-font-lock-keywords | |
8223 @vindex mh-folder-msg-number | |
8224 @item mh-scan-good-msg-regexp | |
8225 This regular expression matches ``good'' messages. It must match from | |
8226 the beginning of the line. Note that the default setting of | |
8227 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8228 at least one parenthesized expression which matches the message number | |
8229 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This | |
8230 expression includes the leading space within the parenthesis since it | |
8231 looks better to highlight it as well. The highlighting is done with | |
8232 the face @code{mh-folder-msg-number}. This regular expression should | |
8233 be correct as it is needed by non-fontification functions. | |
8234 @c ------------------------- | |
8235 @vindex mh-scan-format-file | |
8236 @item mh-scan-msg-format-regexp | |
8237 This regular expression finds the message number width in a scan | |
8238 format. Note that the message number must be placed in a parenthesized | |
8239 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This | |
8240 variable is only consulted if @code{mh-scan-format-file} is set to | |
8241 @samp{Use MH-E scan Format}. | |
8242 @c ------------------------- | |
8243 @vindex mh-scan-format-file | |
8244 @item mh-scan-msg-format-string | |
8245 This is a format string for the width of the message number in a scan | |
8246 format. Use @samp{0%d} for zero-filled message numbers. This variable | |
8247 is only consulted if @code{mh-scan-format-file} is set to @samp{Use | |
8248 MH-E scan Format} (default: @code{"%d"}). | |
8249 @c ------------------------- | |
8250 @item mh-scan-msg-number-regexp | |
8251 This regular expression extracts the message number. It must match | |
8252 from the beginning of the line. Note that the message number must be | |
8253 placed in a parenthesized expression as in the default of @w{@code{"^ | |
8254 *\\([0-9]+\\)"}}. | |
8255 @c ------------------------- | |
8256 @item mh-scan-msg-overflow-regexp | |
8257 This regular expression matches overflowed message numbers (default: | |
8258 @code{"^[?0-9][0-9]"}). | |
8259 @c ------------------------- | |
8260 @item mh-scan-msg-search-regexp | |
8261 This regular expression matches a particular message. It is a format | |
8262 string; use @samp{%d} to represent the location of the message number | |
8263 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}. | |
8264 @c ------------------------- | |
8265 @vindex mh-folder-address | |
8266 @vindex mh-folder-font-lock-keywords | |
8267 @vindex mh-folder-to | |
8268 @item mh-scan-rcpt-regexp | |
8269 This regular expression specifies the recipient in messages you sent. | |
8270 Note that the default setting of @code{mh-folder-font-lock-keywords} | |
8271 expects this expression to contain two parenthesized expressions. The | |
8272 first is expected to match the @samp{To:} that the default scan format | |
8273 file generates. The second is expected to match the recipient's name | |
8274 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this | |
8275 regular expression is not correct, the @samp{To:} string will not be | |
8276 highlighted with the face @code{mh-folder-to} and the recipient will not be | |
8277 highlighted with the face @code{mh-folder-address}. | |
8278 @c ------------------------- | |
8279 @vindex mh-folder-font-lock-keywords | |
8280 @vindex mh-folder-refiled | |
8281 @vindex mh-note-refiled | |
8282 @item mh-scan-refiled-msg-regexp | |
8283 This regular expression matches refiled messages. It must match from | |
8284 the beginning of the line. Note that the default setting of | |
8285 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8286 at least one parenthesized expression which matches the message number | |
8287 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression | |
8288 includes the leading space within the parenthesis since it looks | |
8289 better to highlight it as well. The highlighting is done with the face | |
8290 @code{mh-folder-refiled}. This regular expression should be correct as | |
8291 it is needed by non-fontification functions. See also | |
8292 @code{mh-note-refiled}. | |
8293 @c ------------------------- | |
8294 @vindex mh-folder-font-lock-keywords | |
8295 @vindex mh-folder-sent-to-me-sender | |
8296 @vindex mh-mh-folder-sent-to-me-hint | |
8297 @vindex mh-scan-format-nmh | |
8298 @item mh-scan-sent-to-me-sender-regexp | |
8299 This regular expression matches messages sent to us. Note that the | |
8300 default setting of @code{mh-folder-font-lock-keywords} expects this | |
8301 expression to contain at least two parenthesized expressions. The | |
8302 first should match the fontification hint (see | |
8303 @code{mh-scan-format-nmh}) and the second should match the user name | |
8304 as in the default of | |
8305 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}. | |
8306 If this regular expression is not correct, the notation hints will not | |
8307 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and | |
8308 the sender will not be highlighted with the face | |
8309 @code{mh-folder-sent-to-me-sender}. | |
8310 @c ------------------------- | |
8311 @vindex mh-folder-followup | |
8312 @vindex mh-folder-font-lock-keywords | |
8313 @vindex mh-folder-subject | |
8314 @item mh-scan-subject-regexp | |
8315 This regular expression matches the subject. It must match from the | |
8316 beginning of the line. Note that the default setting of | |
8317 @samp{mh-folder-font-lock-keywords} expects this expression to contain | |
8318 at least three parenthesized expressions. The first is expected to | |
8319 match the @samp{Re:} string, if any, and is highlighted with the face | |
8320 @code{mh-folder-followup}. The second matches an optional bracketed | |
8321 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a | |
8322 sub-expression of the first expression). The third is expected to | |
8323 match the subject line itself which is highlighted with the face | |
8324 @code{mh-folder-subject}. For example, the default is | |
8325 @w{@code{"^ *[0-9]+........[ ]*...................}}@* | |
8326 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}. | |
8327 This regular expression should be correct as it is needed by | |
8328 non-fontification functions. Note that this example is broken up on | |
8329 two lines for readability, but is actually a single string. | |
8330 @end vtable | |
8331 | |
8332 Finally, there are a slew of variables that control how MH-E annotates | |
8333 the scan lines. | |
8334 | |
8335 @vtable @code | |
8336 @findex mh-set-cmd-note | |
8337 @vindex mh-adaptive-cmd-note-flag | |
8338 @item mh-cmd-note | |
8339 Column for notations (default: 4). This variable should be set with | |
8340 the function @code{mh-set-cmd-note}. This variable may be updated | |
8341 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following | |
8342 variables contain the notational characters. Note that columns in | |
8343 Emacs start with 0. | |
8344 @c ------------------------- | |
8345 @item mh-note-copied | |
8346 Messages that have been copied are marked by this character (default: | |
8347 @code{?C}). | |
8348 @c ------------------------- | |
8349 @vindex mh-scan-cur-msg-number-regexp | |
8350 @item mh-note-cur | |
8351 The current message (in MH, not in MH-E) is marked by this character | |
8352 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}. | |
8353 @c ------------------------- | |
8354 @vindex mh-scan-deleted-msg-regexp | |
8355 @item mh-note-deleted | |
8356 Messages that have been deleted are marked by this character (default: | |
8357 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}. | |
8358 @c ------------------------- | |
8359 @item mh-note-dist | |
8360 Messages that have been redistributed are marked by this character | |
8361 (default: @code{?R}). | |
8362 @c ------------------------- | |
8363 @item mh-note-forw | |
8364 Messages that have been forwarded are marked by this character | |
8365 (default: @code{?F}). | |
8366 @c ------------------------- | |
8367 @item mh-note-printed | |
8368 Messages that have been printed are marked by this character (default: | |
8369 @code{?P}). | |
8370 @c ------------------------- | |
8371 @vindex mh-scan-refiled-msg-regexp | |
8372 @item mh-note-refiled | |
8373 Messages that have been refiled are marked by this character (default: | |
8374 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}. | |
8375 @c ------------------------- | |
8376 @item mh-note-repl | |
8377 Messages that have been replied to are marked by this character | |
8378 (default: @code{?-}). | |
8379 @c ------------------------- | |
8380 @item mh-note-seq | |
8381 Messages in a user-defined sequence are marked by this character | |
8382 (default: @code{?%}). Messages in the @samp{search} sequence are | |
8383 marked by this character as well. | |
8384 @end vtable | |
8385 | |
8386 For example, let's say I have the following in @file{scan.format} | |
8387 which displays the sender, the subject, and the message number. This | |
8388 format places a @samp{+} after the message number for the current | |
8389 message according to MH; it also uses that column for notations. | |
8390 | |
8391 @smallexample | |
8392 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %> | |
8393 @end smallexample | |
8394 | |
8395 @vindex mh-adaptive-cmd-note-flag | |
8396 @vindex mh-scan-format-file | |
8397 @vindex mh-scan-format-file, example | |
8398 | |
8399 The first thing you have to do is tell MH-E to use this file. | |
8400 Customize @code{mh-scan-format-file} and set its value to @samp{Use | |
8401 Default scan Format}. If you didn't get already turn off | |
8402 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first. | |
8403 | |
8404 Next, tell MH-E what a valid scan line looks like so that you can at | |
8405 least display the output of scan in your MH-Folder buffer. | |
8406 | |
8407 @vindex mh-scan-valid-regexp, example | |
8408 | |
8409 @smalllisp | |
8410 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$") | |
8411 @end smalllisp | |
8412 | |
8413 Now, in order to get rid of the @samp{Cursor not pointing to message} | |
8414 message, you need to tell MH-E how to access the message number. You | |
8415 should also see why MH-E requires that you include a message number in | |
8416 the first place. | |
8417 | |
8418 @vindex mh-scan-msg-number-regexp, example | |
8419 @vindex mh-scan-msg-search-regexp, example | |
8420 | |
8421 @smalllisp | |
8422 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$") | |
8423 (setq mh-scan-msg-search-regexp " %d[+D^ ]$") | |
8424 @end smalllisp | |
8425 | |
8426 In order to get the next and previous commands working, add this. | |
8427 | |
8428 @vindex mh-scan-good-msg-regexp, example | |
8429 | |
8430 @smalllisp | |
8431 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$") | |
8432 @end smalllisp | |
8433 | |
8434 Note that the current message isn't marked with a @samp{+} when moving | |
8435 between the next and previous messages. Here is the code required to | |
8436 get this working. | |
8437 | |
8438 @vindex set-mh-cmd-note, example | |
8439 @vindex mh-scan-cur-msg-number-regexp, example | |
8440 | |
8441 @smalllisp | |
8442 (set-mh-cmd-note 76) | |
8443 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$") | |
8444 @end smalllisp | |
8445 | |
8446 Finally, add the following to delete and refile messages. | |
8447 | |
8448 @vindex mh-scan-deleted-msg-regexp, example | |
8449 @vindex mh-scan-refiled-msg-regexp, example | |
8450 | |
8451 @smalllisp | |
8452 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$") | |
8453 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$") | |
8454 @end smalllisp | |
8455 | |
8456 This is just a bare minimum; it's best to adjust all of the regular | |
8457 expressions to ensure that MH-E and highlighting perform well. | |
8458 | |
8459 @node Procmail, Odds and Ends, Scan Line Formats, Top | |
8460 @appendix Reading Mailing Lists Effectively | |
8461 | |
8462 @cindex @command{procmail} | |
8463 @cindex @command{slocal} | |
8464 @cindex Gnus | |
8465 @cindex MH commands, @command{slocal} | |
8466 @cindex Unix commands, @command{procmail} | |
8467 @cindex mailing lists, reading | |
8468 | |
8469 This appendix explains how to use @uref{http://www.procmail.org/, | |
8470 procmail} to file mail from mailing lists into folders which can then | |
8471 be read easily with MH-E@footnote{The MH equivalent, @command{slocal}, | |
8472 can be used as well, but procmail is more flexible and more packages | |
8473 exist for procmail than for slocal.}. Some mailing lists have such | |
8474 high traffic that Gnus must be used and I discuss how to use Gnus | |
8475 side-by-side with MH-E. | |
8476 | |
8477 @cindex @file{.procmailrc} | |
8478 @cindex files, @file{.procmailrc} | |
8479 | |
8480 First, I'll describe how to put mail from your mailing lists directly | |
8481 into an MH folder using @command{procmail}. First, add the following | |
8482 to @file{~/.procmailrc}. While the logging variables aren't strictly | |
8483 necessary, they are extremely useful. | |
8484 | |
8485 @smallexample | |
8486 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam. | |
8487 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin | |
8488 [3] | |
8489 [4] # Point LOGFILE at the actual log file. | |
8490 [5] LOGFILE=$HOME/.procmail.log | |
8491 [6] | |
8492 [7] # This setting provides just the right amount of information. | |
8493 [8] LOGABSTRACT=all | |
8494 [9] | |
8495 [10] # Uncomment the following line to see how your patterns match. | |
8496 [11] #VERBOSE=yes | |
8497 [12] | |
8498 [13] # Place mail sent to any MH-E mailing list in +mh-e. | |
8499 [14] :0 w: mh-e$LOCKEXT | |
8500 [15] * ^TO.*mh-e-.*@.*sourceforge.net | |
8501 [16] | myrcvstore -create +mh-e | |
8502 @end smallexample | |
8503 | |
8504 @cindex @command{rcvstore} | |
8505 @cindex MH commands, @command{rcvstore} | |
8506 | |
8507 Line 14 creates a lock file in your mail directory based upon the name | |
8508 of the folder. This is done because @command{rcvstore} does not | |
8509 perform locking. While this lock file will prevent @command{procmail} | |
8510 from writing to a folder concurrently, there is a slight chance that | |
8511 you might lose a message if you're performing operations on a folder | |
8512 at the same time @command{rcvstore} is placing a message there. You | |
8513 have been warned. Now that that disclaimer is out of the way, note | |
8514 that I've been using this set-up for over a decade and haven't lost | |
8515 anything to my knowledge@footnote{See | |
8516 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166, | |
8517 Savannah issue #4361} to see if @command{rcvstore} locking is still an | |
8518 issue.}. | |
8519 | |
8520 @cindex @samp{Unseen-Sequence:} MH profile component | |
8521 @cindex MH profile component, @samp{Unseen-Sequence:} | |
8522 | |
8523 Line 16 uses the following script, @code{myrcvstore}, to massage the | |
8524 message as described in the comment and file the message in the given | |
8525 folder@footnote{The @samp{-create} argument wasn't always the default | |
8526 to @command{rcvstore}.}. | |
8527 | |
8528 @smallexample | |
8529 #! /bin/sh | |
8530 | |
8531 # Accepts a message on standard input and passes it through rcvstore | |
8532 # after first passing it through any filters. All arguments are passed | |
8533 # on to rcvstore. | |
8534 | |
8535 # Force the "From user date" to become part of header. One reason this | |
8536 # is done is because the presence of the From field confuses dist so | |
8537 # that dist adds a new header, rather than using the existing header. | |
8538 # Note that this should not be done for any message that goes into a | |
8539 # Gnus incoming file (Gnus will thrown an error) nor should it be | |
8540 # applied to any message that goes to the system mailbox because the | |
8541 # entire mailbox will be incorporated as a single message. | |
8542 formail -c -z -R 'From ' X-Envelope-From: | | |
8543 rcvstore $@@ | |
8544 @end smallexample | |
8545 | |
8546 If your version of @command{rcvstore} doesn't add messages to the | |
8547 @samp{unseen} sequence by default, add the following line to your MH | |
8548 profile: | |
8549 | |
8550 @smallexample | |
8551 Unseen-Sequence: unseen | |
8552 @end smallexample | |
8553 | |
8554 Now view your new messages with the speedbar (@pxref{Speedbar}) or with | |
8555 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}. | |
8556 | |
8557 If you're on a mailing list that is so voluminous that it is | |
8558 impossible to read every message, it usually better to read the | |
8559 mailing list like a newsgroup in a news reader. Emacs has a built-in | |
8560 newsreader called Gnus. The remainder of this appendix talks about how | |
8561 to use Gnus with an MH message store. The version of Gnus that was | |
8562 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should | |
8563 work but versions prior to 5.8 use different options. | |
8564 | |
8565 This table contains a list of Gnus options that you will have to | |
8566 modify. Note that for them to become accessible, you'll have to load | |
8567 @file{nnml.el} first. This can be done with @kbd{M-x load-library | |
8568 @key{RET} nnml @key{RET}}. | |
8569 | |
8570 @vtable @code | |
8571 @item gnus-secondary-select-methods | |
8572 Select the @samp{nnml} value. This select method uses directories for | |
8573 folders and individual files for messages, just like MH. You do not | |
8574 have to set an address. | |
8575 @c ------------------------- | |
8576 @item mail-sources | |
8577 Select the @samp{Several files in a directory} value, check the | |
8578 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find | |
8579 your mail. | |
8580 @c ------------------------- | |
8581 @vindex mail-user-agent | |
8582 @item message-mail-user-agent | |
8583 In order to send mail within Gnus using MH-E, set this option to | |
8584 @samp{mail-user-agent} and set the @code{mail-user-agent} option to | |
8585 @samp{Emacs interface to MH}. | |
8586 @c ------------------------- | |
8587 @item nnmail-keep-last-article | |
8588 Since Gnus keeps track of which messages you have read, it would be | |
8589 bad if Gnus expired the last message, for example, message 100, and | |
8590 @command{rcvstore} gave the next new message number 1. Gnus would then | |
8591 ignore it since it thinks that you've read messages 1-100. Turning on | |
8592 this option ensures that the last message is never removed thereby | |
8593 eliminating this problem. | |
8594 @end vtable | |
8595 | |
8596 Next add the following to @file{~/.procmailrc}. If you don't subscribe | |
8597 to the GnuCash mailing list, substitute one to which you are | |
8598 subscribed. | |
8599 | |
8600 @smallexample | |
8601 PATH=$PATH:/usr/bin/mh | |
8602 MAILDIR=$HOME/`mhparam Path` | |
8603 # Place mail sent to the GnuCash mailing list in gnucash.spool, where | |
8604 # Gnus will pick it up. | |
8605 :0: | |
8606 * ^TO.*gnucash.*@.*gnucash.org | |
8607 gnucash.spool | |
8608 @end smallexample | |
8609 | |
8610 Wait for some messages to appear in @file{gnucash.spool} and run Gnus | |
8611 with @kbd{M-x gnus @key{RET}}. To view the folder created in the | |
8612 example above, you would tell Gnus about it the first time only with | |
8613 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is | |
8614 known as @samp{+gnucash}. | |
8615 | |
8616 @node Odds and Ends, History, Procmail, Top | |
8617 @appendix Odds and Ends | |
8618 | |
8619 This appendix covers a few topics that don't fit elsewhere. Here I | |
8620 tell you how to report bugs and how to get on the MH-E mailing lists. | |
8621 I also point out some additional sources of information. | |
8622 | |
8623 @menu | |
8624 * Bug Reports:: | |
8625 * Mailing Lists:: | |
8626 * MH FAQ and Support:: | |
8627 * Getting MH-E:: | |
8628 @end menu | |
8629 | |
8630 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends | |
8631 @appendixsec Bug Reports | |
8632 | |
8633 @cindex bugs | |
8634 @cindex SourceForge | |
8635 @kindex M-x mh-version | |
8636 | |
8637 Bug reports should be filed at | |
8638 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=113357, | |
8639 SourceForge}. You need to be a SourceForge user to submit bug reports, | |
8640 but this is easy enough to do that it shouldn't be a restriction for | |
8641 you. Please include the output of @kbd{M-x mh-version} | |
8642 (@pxref{Miscellaneous}) in any bug report you send unless you're 110% | |
8643 positive we won't ask for it. | |
8644 | |
8645 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends | |
8646 @appendixsec MH-E Mailing Lists | |
8647 | |
8648 @cindex SourceForge | |
8649 @cindex mailing lists | |
8650 | |
8651 There are several mailing lists for MH-E. They are @i{mh-e-users at | |
8652 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net}, | |
8653 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view | |
8654 the archives at @uref{https://sourceforge.net/mail/?group_id=13357, | |
8655 SourceForge}. Do not report bugs on these lists; please submit them | |
8656 via SourceForge (@pxref{Bug Reports}). | |
8657 | |
8658 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends | |
8659 @appendixsec MH FAQ and Support | |
8660 | |
8661 @cindex FAQ | |
8662 @cindex MH FAQ | |
8663 | |
8664 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently | |
8665 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup | |
8666 @samp{comp.mail.mh}. While very little is there that deals with MH-E | |
8667 specifically, there is an incredible wealth of material about MH | |
8668 itself which you will find useful. | |
8669 | |
8670 @cindex support | |
8671 | |
8672 You can find FAQs on MH-E at the | |
8673 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=213357, | |
8674 Support Requests} page on SourceForge. If you don't find the answer to | |
8675 your question, file a support request and your question will become a | |
8676 new FAQ! | |
8677 | |
8678 @node Getting MH-E, , MH FAQ and Support, Odds and Ends | |
8679 @appendixsec Getting MH-E | |
8680 | |
8681 @cindex MH-E, obtaining | |
8682 @cindex getting MH-E | |
8683 @cindex obtaining MH-E | |
8684 | |
8685 Because MH-E is undergoing a phase of sustained growth, the version of | |
8686 MH-E in your Emacs is likely to be out of date although it is most | |
8687 likely to be more up to date than the copy that comes with the MH | |
8688 distribution in @file{miscellany/mh-e}. | |
8689 | |
8690 @cindex change log | |
8691 @cindex release notes | |
8692 | |
8693 New MH-E releases are always available for downloading at | |
8694 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357, | |
8695 SourceForge} before they appear in an Emacs release. You can read the | |
8696 release notes on that page to determine if the given release of MH-E | |
8697 is already installed in your version of Emacs. You can also read the | |
8698 change log to see if you are interested in what the given release of | |
8699 MH-E has to offer (although we have no doubt that you will be | |
8700 extremely interested in all new releases). | |
8701 | |
8702 @cindex Debian | |
8703 | |
8704 If you use Debian, you can install the Debian | |
8705 @uref{http://packages.debian.org/unstable/mail/mh-e, mh-e package} | |
8706 instead. | |
8707 | |
8708 @cindex files, @samp{MH-E-NEWS} | |
8709 @cindex files, @samp{README} | |
8710 @cindex news | |
8711 @cindex @samp{MH-E-NEWS} | |
8712 @cindex @samp{README} | |
8713 @kindex M-x mh-version | |
8714 | |
8715 After you download and extract the MH-E tarball, read the | |
8716 @file{README} file and @file{MH-E-NEWS}. These correspond to the | |
8717 release notes and change log mentioned above. The file @file{README} | |
8718 contains instructions on installing MH-E. If you're already running | |
8719 Emacs, please quit that session and start again to load in the new | |
8720 MH-E. Check that you're running the new version with the command | |
8721 @kbd{M-x mh-version}. | |
8722 | |
8723 @cindex contributed software | |
8724 @cindex manual | |
8725 @cindex documentation | |
8726 | |
8727 In addition to the mh-e package, the | |
8728 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357, | |
8729 SourceForge} site also contains doc and contrib packages. The former | |
8730 is the latest release of this manual, and the latter contains a few | |
8731 contributed packages you might find useful. | |
8732 | |
8733 @node History, GFDL, Odds and Ends, Top | |
8734 @appendix History of MH-E | |
8735 | |
8736 @cindex Bill Wohler | |
8737 @cindex Brian Reid | |
8738 @cindex Gildea, Stephen | |
8739 @cindex Jim Larus | |
8740 @cindex Larus, Jim | |
8741 @cindex MH-E, versions | |
8742 @cindex Reid, Brian | |
8743 @cindex SourceForge | |
8744 @cindex Stephen Gildea | |
8745 @cindex Wohler, Bill | |
8746 @cindex history of MH-E | |
8747 @cindex versions of MH-E | |
8748 | |
8749 MH-E was originally written by Brian Reid in 1983 and has changed | |
8750 hands several times since then. Jim Larus wanted to do something | |
8751 similar for GNU Emacs, and ended up completely rewriting it that same | |
8752 year. In 1989, Stephen Gildea picked it up and added many | |
8753 improvements. Bill Wohler then took over in 2000 and moved its | |
8754 development to @uref{http://sourceforge.net/, SourceForge} where it | |
8755 lives today. | |
8756 | |
8757 @menu | |
8758 * From Brian Reid:: | |
8759 * From Jim Larus:: | |
8760 * From Stephen Gildea:: | |
8761 * From Bill Wohler:: | |
8762 @end menu | |
8763 | |
8764 @node From Brian Reid, From Jim Larus, History, History | |
8765 @appendixsec From Brian Reid | |
8766 | |
8767 @cindex Brian Reid | |
8768 @cindex Reid, Brian | |
8769 | |
8770 One day in 1983 I got the flu and had to stay home from work for three | |
8771 days with nothing to do. I used that time to write MHE@. The | |
8772 fundamental idea behind MHE was that it was a ``puppeteer'' driving | |
8773 the MH programs underneath it. MH had a model that the editor was | |
8774 supposed to run as a sub-process of the mailer, which seemed to me at | |
8775 the time to be the tail wagging the dog. So I turned it around and | |
8776 made the editor drive the MH programs. I made sure that the UCI people | |
8777 (who were maintaining MH at the time) took in my changes and made them | |
8778 stick. | |
8779 | |
8780 Today, I still use my own version of MHE because I don't at all like | |
8781 the way that GNU MH-E works and I've never gotten to be good enough at | |
8782 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs | |
8783 version of MHE and the GNU Emacs version of MH-E have almost nothing | |
8784 in common except similar names. They work differently, have different | |
8785 conceptual models, and have different key bindings@footnote{After | |
8786 reading this article, I questioned Brian about his version of MHE, and | |
8787 received some great ideas for improving MH-E such as a dired-like | |
8788 method of selecting folders; and removing the prompting when sending | |
8789 mail, filling in the blanks in the draft buffer instead. I passed them | |
8790 on to Stephen Gildea, the current maintainer, and he was excited about | |
8791 the ideas as well. Perhaps one day, MH-E will again resemble MHE | |
8792 (draft form editing was introduced in version 7.4).}. | |
8793 | |
8794 Brian Reid, June 1994 | |
8795 | |
8796 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History | |
8797 @appendixsec From Jim Larus | |
8798 | |
8799 @cindex Jim Larus | |
8800 @cindex Larus, Jim | |
8801 | |
8802 Brian Reid, while at CMU or shortly after going to Stanford wrote a | |
8803 mail reading program called MHE for Gosling Emacs. It had much the | |
8804 same structure as MH-E (i.e., invoked MH programs), though it was | |
8805 simpler and the commands were slightly different. Unfortunately, I no | |
8806 longer have a copy so the differences are lost in the mists of time. | |
8807 | |
8808 In '82-83, I was working at BBN and wrote a lot of mlisp code in | |
8809 Gosling Emacs to make it look more like Tennex Emacs. One of the | |
8810 packages that I picked up and improved was Reid's mail system. In '83, | |
8811 I went back to Berkeley. About that time, Stallman's first version of | |
8812 GNU Emacs came out and people started to move to it from Gosling Emacs | |
8813 (as I recall, the transition took a year or two). I decided to port | |
8814 Reid's MHE and used the mlisp to Emacs Lisp translator that came with | |
8815 GNU Emacs. It did a lousy job and the resulting code didn't work, so I | |
8816 bit the bullet and rewrote the code by hand (it was a lot smaller and | |
8817 simpler then, so it took only a day or two). | |
8818 | |
8819 Soon after that, MH-E became part of the standard Emacs distribution | |
8820 and suggestions kept dribbling in for improvements. MH-E soon reached | |
8821 sufficient functionality to keep me happy, but I kept on improving it | |
8822 because I was a graduate student with plenty of time on my hands and | |
8823 it was more fun than my dissertation. In retrospect, the one thing | |
8824 that I regret is not writing any documentation, which seriously | |
8825 limited the use and appeal of the package. | |
8826 | |
8827 @cindex @command{xmh}, in MH-E history | |
8828 | |
8829 In '89, I came to Wisconsin as a professor and decided not to work on | |
8830 MH-E. It was stable, except for minor bugs, and had enough | |
8831 functionality, so I let it be for a few years. Stephen Gildea of BBN | |
8832 began to pester me about the bugs, but I ignored them. In 1990, he | |
8833 went off to the X Consortium, said good bye, and said that he would | |
8834 now be using @command{xmh}. A few months later, he came back and said | |
8835 that he couldn't stand @command{xmh} and could I put a few more bug fixes | |
8836 into MH-E. At that point, I had no interest in fixing MH-E, so I gave | |
8837 the responsibility of maintenance to him and he has done a fine job | |
8838 since then. | |
8839 | |
8840 Jim Larus, June 1994 | |
8841 | |
8842 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History | |
8843 @appendixsec From Stephen Gildea | |
8844 | |
8845 @cindex Gildea, Stephen | |
8846 @cindex Stephen Gildea | |
8847 | |
8848 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before | |
8849 me. In my previous job, I had been using RMAIL, but as my folders tend | |
8850 to run large, I was frustrated with the speed of RMAIL@. However, I | |
8851 stuck with it because I wanted the GNU Emacs interface. I am very | |
8852 familiar and comfortable with the Emacs interface (with just a few | |
8853 modifications of my own) and dislike having to use applications with | |
8854 embedded editors; they never live up to Emacs. | |
8855 | |
8856 MH is the mail reader of choice at BBN, so I converted to it. Since I | |
8857 didn't want to give up using an Emacs interface, I started using MH-E. | |
8858 As is my wont, I started hacking on it almost immediately. I first | |
8859 used version 3.4m. One of the first features I added was to treat the | |
8860 folder buffer as a file-visiting buffer: you could lock it, save it, | |
8861 and be warned of unsaved changes when killing it. I also worked to | |
8862 bring its functionality a little closer to RMAIL@. Jim Larus was very | |
8863 cooperative about merging in my changes, and my efforts first appeared | |
8864 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided | |
8865 MH-E was too slow and optimized it a lot. Version, 3.7, distributed | |
8866 with Emacs 18.56 in 1990, was noticeably faster. | |
8867 | |
8868 When I moved to the X Consortium I became the first person there to | |
8869 not use xmh. (There is now one other engineer there using MH-E.) About | |
8870 this point I took over maintenance of MH-E from Jim and was finally | |
8871 able to add some features Jim hadn't accepted, such as the backward | |
8872 searching undo. My first release was 3.8 (Emacs 18.58) in 1992. | |
8873 | |
8874 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0. | |
8875 Version 4.0 added many new features, including background folder | |
8876 collection and support for composing @sc{mime} messages. (Reading | |
8877 @sc{mime} messages remains to be done, alas.) While writing this book, | |
8878 Bill Wohler gave MH-E its closest examination ever, uncovering bugs | |
8879 and inconsistencies that required a new major version to fix, and so | |
8880 version 5 was released. | |
8881 | |
8882 Stephen Gildea, June 1994 | |
8883 | |
8884 @node From Bill Wohler, , From Stephen Gildea, History | |
8885 @appendixsec From Bill Wohler | |
8886 | |
8887 @cindex Wohler, Bill | |
8888 @cindex Bill Wohler | |
8889 | |
8890 The preface originally included the following text which I use to | |
8891 begin my story: | |
8892 | |
8893 @quotation | |
8894 But it's important to note a brief history of MH-E. | |
8895 | |
8896 @w{Version 3} was prevalent through the @w{Emacs 18} and early | |
8897 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}), | |
8898 which introduced several new and changed commands. Next, @w{Version | |
8899 5.0} was released, which fixed some bugs and incompatibilities, and | |
8900 was incorporated into @w{Emacs 19.29}. | |
8901 @end quotation | |
8902 | |
8903 After a long break, Stephen handed the reins over to me in 2000. I | |
8904 moved the project to a new site called SourceForge and organized a | |
8905 great team of developers. Our first release in late 2001 was version | |
8906 6. It appeared around the time of Emacs 21.2 and had menus and tool | |
8907 bar buttons. | |
8908 | |
8909 Then, indexed searches, improved MIME handling, a speedbar, multiple | |
8910 identities, alias completion, an index view of unseen messages, spam | |
8911 software support, Face and X-Image-URL header field support, Fcc | |
8912 completion, arbitrary range handling, and draft form editing were | |
8913 introduced in the version 7 series around the time of Emacs 21.4 | |
8914 (2004). Still, Emacs itself contained version 5 of MH-E released back | |
8915 in 1994. | |
8916 | |
8917 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
|
8918 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
|
8919 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
|
8920 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
|
8921 files that were already part of Emacs) and the software was completely |
97555 | 8922 reorganized to push back two decades of entropy. Version 8 appeared in |
8923 Emacs 22.1 in 2006. | |
8924 | |
8925 Development was then quiet for a couple of years. Emacs 23.1, which is | |
8926 due out in 2009, will contain version 8.1. This version includes a few | |
8927 new features and several bug fixes. | |
8928 | |
8929 Bill Wohler, August 2008 | |
84306 | 8930 |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8931 @node GFDL, Key Index, History, Top |
84306 | 8932 @appendix GNU FREE DOCUMENTATION LICENSE |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8933 @include doclicense.texi |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8934 |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8935 @node Key Index, Command Index, GFDL, Top |
84306 | 8936 @unnumbered Key (Character) Index |
8937 @printindex ky | |
8938 | |
8939 @node Command Index, Option Index, Key Index, Top | |
8940 @unnumbered Command Index | |
8941 @printindex fn | |
8942 | |
8943 @node Option Index, Concept Index, Command Index, Top | |
8944 @unnumbered Option (Variable) Index | |
8945 @printindex vr | |
8946 | |
8947 @node Concept Index, , Option Index, Top | |
8948 @unnumbered Concept Index | |
8949 @printindex cp | |
8950 | |
8951 @bye | |
8952 | |
8953 @c Ispell Helpers | |
8954 @c | |
8955 @c The following are words that ispell should ignore that would not | |
8956 @c normally be in a dictionary (global or personal). Be careful not to | |
8957 @c include words here that could potentially be typos of other words | |
8958 @c (such as url, elisp, or MHE). | |
8959 @c | |
8960 @c LocalWords: CTRL ESC SPC f's | |
8961 @c LocalWords: addr Aliasfile alist | |
8962 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's | |
8963 @c LocalWords: cmd CMU contrib cron | |
8964 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw | |
8965 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm | |
8966 @c LocalWords: ImageMagick inbox ispell keychain | |
8967 @c LocalWords: Larus licensor LocalWords lookup lpr | |
8968 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp | |
8969 @c LocalWords: MML msg multipart | |
8970 @c LocalWords: Namazu NIS nenscript nnml num | |
8971 @c LocalWords: packmbox passphrase pathname prev procmail prog repl | |
8972 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's | |
8973 @c LocalWords: sublicense supercite speedbar | |
8974 @c LocalWords: Tennex texi texinfo Thelen thelenm | |
8975 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat | |
8976 @c | |
8977 @c See http://www.oreilly.com/oreilly/author/stylesheet.html. | |
8978 @c See http://en.wikipedia.org/. | |
8979 @c | |
8980 @c Note the lowercase mh which is needed to avoid hits in the | |
8981 @c functions and variables. Occasionally, check for accidental | |
8982 @c inclusion of mh in text by uncommenting the following and executing | |
8983 @c it with C-x C-e. You want to see "Search failed" | |
8984 @c (let ((case-fold-search nil)) | |
8985 @c (goto-char (point-min)) | |
8986 @c (search-forward-regexp "^mh\\( \\|$\\)")) | |
8987 @c | |
8988 @c An extremely useful setting for texinfo-mode-hook is: | |
8989 @c (add-to-list | |
8990 @c 'ispell-skip-region-alist | |
8991 @c (list | |
8992 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)" | |
8993 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|" | |
8994 @c "@[@{}.]\\|" | |
8995 @c "[^@]\\|" | |
8996 @c "@\\(end \\)?group\\|" | |
8997 @c "@\\(end \\)?cartouche\\)+" | |
8998 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|" | |
8999 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|" | |
9000 @c "^@end [a-z]+$\\|" | |
9001 @c "^@\\([fv]\\|print\\)index .*$\\|" | |
9002 @c "@uref{[^,]+,\\|" | |
9003 @c "@[a-z]+\\|" | |
9004 @c "/[a-z.]+[/}]\\)"))))) | |
9005 @c | |
9006 @c Cross References | |
9007 @c | |
9008 @c See existing cross-references to the Emacs manual and the Emacs | |
9009 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU | |
9010 @c Emacs Lisp Reference Manual'' respectively). | |
9011 | |
9012 @c @ftable Sorting | |
9013 @c | |
9014 @c As per index (sort of): Punctuation, keyboard characters (such as | |
9015 @c RET and BS) upper and lowercase mixed (lower comes before | |
9016 @c uppercase), control characters go with uppercase C, meta characters | |
9017 @c go with uppercase M. | |
9018 @c In some cases, the sort isn't strictly ASCII. | |
9019 @c For example, SPC (mh-page-msg) reads better before BS | |
9020 @c (mh-previous-page) and . (mh-show) is better before , | |
9021 @c (mh-header-display). | |
9022 | |
9023 @c @vtable Sorting | |
9024 @c | |
9025 @c Alphabetical, pull hooks into their own table. | |
9026 | |
9027 @c Local Variables: | |
9028 @c sentence-end-double-space: nil | |
9029 @c End: | |
9030 | |
9031 @ignore | |
9032 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef | |
9033 @end ignore |