Mercurial > emacs
annotate doc/misc/mh-e.texi @ 97192:31496191ccd4
(Reading Mail)
(Viewing Attachments): Describe new function
mh-show-preferred-alternative.
(Sending Mail, Redistributing, Sending Message): Describe new hook
mh-annotate-msg-hook.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Fri, 01 Aug 2008 04:47:41 +0000 |
parents | 6e1d885ba36a |
children | d38d8feaaa82 |
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. | |
84934
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
11 @set VERSION 8.0.3+CVS |
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 | |
93018
230091ad831d
(Viewing): Update URL for adding header fields to
Bill Wohler <wohler@newt.com>
parents:
92984
diff
changeset
|
15 @set UPDATED 2008-03-16 |
230091ad831d
(Viewing): Update URL for adding header fields to
Bill Wohler <wohler@newt.com>
parents:
92984
diff
changeset
|
16 @set UPDATE-MONTH March, 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 | |
202 @value{VERSION} of MH-E will appear in GNU Emacs 22.1. It is supported | |
203 in GNU Emacs 21, as well as XEmacs 21 (except for versions | |
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 | |
536 @cindex GNU mailutils | |
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 | |
542 trying out @uref{http://www.gnu.org/software/mailutils/, GNU | |
543 mailutils}, which supports IMAP. Your GNU/Linux distribution probably | |
544 has packages for both of these. | |
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 | |
583 first of nmh, MH, or GNU mailutils that it finds in the directories | |
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, | |
588 you have both nmh and mailutils installed (for example) and | |
589 @code{mh-variant-in-use} was initialized to nmh but you want to use | |
590 mailutils, then you can set @code{mh-variant} to @samp{mailutils}. | |
591 | |
592 @vindex mh-flists-present-flag | |
593 @vindex mh-lib | |
594 @vindex mh-lib-progs | |
595 @vindex mh-progs | |
596 | |
597 When @code{mh-variant} is changed, MH-E resets @code{mh-progs}, | |
598 @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and | |
599 @code{mh-variant-in-use} accordingly. | |
600 | |
601 @cindex @file{.emacs} | |
602 @cindex files, @file{.emacs} | |
603 | |
604 @sp 1 | |
605 @center @strong{NOTE} | |
606 | |
607 @quotation | |
608 Prior to version 8, it was often necessary to set some of these | |
609 variables in @file{~/.emacs}; now it is no longer necessary and can | |
610 actually cause problems. | |
611 @end quotation | |
612 @sp 1 | |
613 | |
614 @cindex MH profile component, @samp{Draft-Folder:} | |
615 @cindex MH profile component, @samp{Path:} | |
616 @cindex MH profile component, @samp{Previous-Sequence:} | |
617 @cindex MH profile component, @samp{Unseen-Sequence:} | |
618 @cindex @samp{Draft-Folder:} MH profile component | |
619 @cindex @samp{Path:} MH profile component | |
620 @cindex @samp{Previous-Sequence:} MH profile component | |
621 @cindex @samp{Unseen-Sequence:} MH profile component | |
622 @findex mh-find-path | |
623 @vindex mh-draft-folder | |
624 @vindex mh-find-path-hook | |
625 @vindex mh-inbox | |
626 @vindex mh-previous-seq | |
627 @vindex mh-unseen-seq | |
628 @vindex mh-user-path | |
629 | |
630 In addition to setting variables that point to MH itself, MH-E also | |
631 sets a handful of variables that point to where you keep your mail. | |
632 During initialization, the function @code{mh-find-path} sets | |
633 @code{mh-user-path} from your @samp{Path:} MH profile component (but | |
634 defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder} | |
635 from @samp{Draft-Folder:}, @code{mh-unseen-seq} from | |
636 @samp{Unseen-Sequence:}, @code{mh-previous-seq} from | |
637 @samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:} | |
638 (defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run | |
639 after these variables have been set. This hook can be used the change | |
640 the value of these variables if you need to run with different values | |
641 between MH and MH-E. | |
642 | |
643 @node Tour Through MH-E, Using This Manual, Getting Started, Top | |
644 @chapter Tour Through MH-E | |
645 | |
646 @cindex introduction | |
647 @cindex tour | |
648 @cindex tutorial | |
649 | |
650 This chapter introduces some of the terms you'll need to know and then | |
651 takes you on a tour of MH-E@footnote{The keys mentioned in these | |
652 chapters refer to the default key bindings. If you've changed the | |
653 bindings, refer to the command summaries at the beginning of each | |
654 chapter for a mapping between default key bindings and function | |
655 names.}. When you're done, you'll be able to send, read, and file | |
656 mail, which is all that a lot of people ever do. But if you're the | |
657 curious or adventurous type, read the rest of the manual to be able to | |
658 use all the features of MH-E. I suggest you read this chapter first to | |
659 get the big picture, and then you can read the manual as you wish. | |
660 | |
661 @menu | |
662 * Sending Mail Tour:: | |
663 * Reading Mail Tour:: | |
664 * Processing Mail Tour:: | |
665 * Leaving MH-E:: | |
666 * More About MH-E:: | |
667 @end menu | |
668 | |
669 @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E | |
670 @section Sending Mail | |
671 | |
672 @cindex MH-Letter mode | |
673 @cindex mode | |
674 @cindex modes, MH-Letter | |
675 @cindex sending mail | |
676 @findex mh-smail | |
677 @kindex M-x mh-smail | |
678 | |
679 Let's start our tour by sending ourselves a message which we can later | |
680 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program | |
681 to send messages. Your message appears in an Emacs buffer whose | |
682 mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a | |
683 particular type of text.} is MH-Letter. | |
684 | |
685 Enter your login name in the @samp{To:} header field. Press the | |
686 @key{TAB} twice to move the cursor past the @samp{Cc:} field, since no | |
687 carbon copies are to be sent, and on to the @samp{Subject:} field. | |
688 Enter @kbd{Test} or anything else that comes to mind. | |
689 | |
690 Press @key{TAB} again to move the cursor to the body of the message. | |
691 Enter some text, using normal Emacs commands. You should now have | |
692 something like this@footnote{If you're running Emacs under the X | |
693 Window System, then you would also see a menu bar and a tool bar. I've | |
694 left out the menu bar and tool bar in all of the example screens.}: | |
695 | |
696 @cartouche | |
697 @smallexample | |
698 | |
699 | |
700 | |
701 | |
702 | |
703 | |
704 --:-- *scratch* All L1 (Lisp Interaction)------------------------- | |
705 To: wohler | |
706 cc: | |
707 Subject: Test | |
708 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1 | |
709 -------- | |
710 This is a test message to get the wheels churning...# | |
711 | |
712 | |
713 --:** @{draft@} All L5 (MH-Letter)---------------------------------- | |
714 Type C-c C-c to send message, C-C ? for help | |
715 @end smallexample | |
716 @end cartouche | |
717 @i{MH-E message composition window} | |
718 | |
719 Note the line of dashes that separates the header and the body of the | |
720 message. It is essential that these dashes (or a blank line) are | |
721 present or the body of your message will be considered to be part of | |
722 the header. | |
723 | |
724 @cindex help | |
725 @findex describe-mode | |
726 @kindex C-c ? | |
727 @kindex C-c C-c | |
728 @kindex C-h m | |
729 | |
730 There are several commands specific to MH-Letter mode@footnote{You can | |
731 get quick help for the commands used most often with @kbd{C-c ?} or | |
732 more complete help with the @kbd{C-h m} (@code{describe-mode}) | |
733 command.}, but at this time we'll only use @kbd{C-c C-c} to send your | |
734 message. Type @kbd{C-c C-c} now. That's all there is to it! | |
735 | |
736 @node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E | |
737 @section Receiving Mail | |
738 | |
739 @cindex @command{inc} | |
740 @cindex @command{scan} | |
741 @cindex MH commands, @command{inc} | |
742 @cindex MH commands, @command{scan} | |
743 @cindex MH-Folder mode | |
744 @cindex modes, MH-Folder | |
745 @cindex reading mail | |
746 @findex mh-rmail | |
747 @kindex M-x mh-rmail | |
748 | |
749 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. | |
750 This incorporates the new mail and puts the output from | |
751 @command{inc}@footnote{See the section | |
752 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
753 prev} in the MH book.} (called @dfn{scan lines} after the MH program | |
754 @command{scan}@footnote{See the section | |
755 @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan | |
756 pick Ranges Sequences} in the MH book.} which prints a one-line | |
757 summary of each message) into a buffer called @samp{+inbox} whose | |
758 major mode is MH-Folder. | |
759 | |
760 @findex mh-rmail | |
761 @kindex F r | |
762 @kindex M-x mh-rmail | |
763 | |
764 @sp 1 | |
765 @center @strong{NOTE} | |
766 | |
767 @quotation | |
768 | |
769 The @kbd{M-x mh-rmail} command will show you only new mail, not mail | |
770 you have already read. If you were to run this tour again, you would | |
771 use @kbd{F r} to pull all your messages into MH-E. | |
772 @end quotation | |
773 @sp 1 | |
774 | |
775 @kindex @key{RET} | |
776 @kindex n | |
777 @kindex p | |
778 | |
779 You should see the scan line for your message, and perhaps others. Use | |
780 @kbd{n} or @kbd{p} to move the cursor to your test message and type | |
781 @key{RET} to read your message. You should see something like: | |
782 | |
783 @cartouche | |
784 @smallexample | |
785 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1 | |
786 # 4+t08/24 To:wohler Test<<This is a test message to get the wheels | |
787 | |
788 -:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)--------- | |
789 To: wohler | |
790 Subject: Test | |
791 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1 | |
792 Date: Fri, 17 Mar 2006 10:49:11 -0800 | |
793 From: Bill Wohler <wohler@@stop.mail-abuse.org> | |
794 | |
795 This is a test message to get the wheels churning... | |
796 | |
797 | |
798 | |
799 --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- | |
800 | |
801 @end smallexample | |
802 @end cartouche | |
803 @i{After incorporating new messages} | |
804 | |
805 @kindex @key{DEL} | |
806 @kindex @key{SPC} | |
807 | |
808 If you typed a long message, you can view subsequent pages with | |
809 @key{SPC} and previous pages with @key{DEL}. | |
810 | |
811 @node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E | |
812 @section Processing Mail | |
813 | |
814 @cindex processing mail | |
815 @kindex @key{RET} | |
816 @kindex r | |
817 | |
818 The first thing we want to do is reply to the message that we sent | |
819 ourselves. Ensure that the cursor is still on the same line as your | |
820 test message and type @kbd{r}. You are prompted in the minibuffer with | |
821 @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply | |
822 to the original sender only, to the sender and primary recipients, or | |
823 to the sender and all recipients. You can press @key{TAB} to see these | |
824 choices. If you simply press @key{RET}, you'll reply only to the | |
825 sender. Press @key{RET} now. | |
826 | |
827 You'll find yourself in an Emacs buffer similar to that when you were | |
828 sending the original message, like this: | |
829 | |
830 @cartouche | |
831 @smallexample | |
832 To: | |
833 cc: | |
834 Subject: Re: Test | |
835 In-reply-to: <31054.1142621351@@stop.mail-abuse.org> | |
836 References: <31054.1142621351@@stop.mail-abuse.org> | |
837 Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org> | |
838 message dated "Fri, 17 Mar 2006 10:49:11 -0800." | |
839 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1 | |
840 -------- | |
841 # | |
842 | |
843 --:-- @{draft@} All L10 (MH-Letter)---------------------------------- | |
844 To: wohler | |
845 Subject: Test | |
846 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1 | |
847 Date: Fri, 17 Mar 2006 10:49:11 -0800 | |
848 From: Bill Wohler <wohler@@stop.mail-abuse.org> | |
849 | |
850 This is a test message to get the wheels churning... | |
851 | |
852 --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- | |
853 Type C-c C-c to send message, C-c ? for help | |
854 @end smallexample | |
855 @end cartouche | |
856 @i{Composition window during reply} | |
857 | |
858 @findex backward-char | |
859 @findex forward-char | |
860 @findex next-line | |
861 @findex previous-line | |
862 @kindex C-b | |
863 @kindex C-c C-c | |
864 @kindex C-c C-f C-t | |
865 @kindex C-f | |
866 @kindex C-n | |
867 @kindex C-p | |
868 @kindex @key{BS} | |
869 | |
870 By default, MH will not add you to the address list of your replies, | |
871 so if you find that the @samp{To:} header field is missing, don't | |
872 worry. In this case, type @kbd{C-c C-f C-t} to create and go to the | |
873 @samp{To:} field, where you can type your login name again. You can | |
874 move around with the arrow keys or with @kbd{C-p} | |
875 (@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b} | |
876 (@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can | |
877 delete the previous character with @key{BS}. When you're finished | |
878 editing your message, send it with @kbd{C-c C-c} as before. | |
879 | |
880 @cindex @command{refile} | |
881 @cindex MH commands, @command{refile} | |
882 @cindex folders | |
883 @kindex @key{SPC} | |
884 @kindex o | |
885 | |
886 You'll often want to save messages that were sent to you in an | |
887 organized fashion. This is done with @dfn{folders}. You can use | |
888 folders to keep messages from your friends, or messages related to a | |
889 particular topic. With your cursor in the MH-Folder buffer and | |
890 positioned on the message you sent to yourself, type @kbd{o} to output | |
891 (@command{refile} in MH parlance) that message to a folder. Enter | |
892 @kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y} | |
893 (or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note | |
894 that a @samp{^} (caret) appears next to the message number, which | |
895 means that the message has been marked for refiling but has not yet | |
896 been refiled. We'll talk about how the refile is actually carried out | |
897 in a moment. | |
898 | |
899 @cindex MH-Folder mode | |
900 @cindex modes, MH-Folder | |
901 @kindex d | |
902 @kindex i | |
903 @kindex @key{RET} | |
904 @kindex n | |
905 @kindex p | |
906 @kindex x | |
907 | |
908 Your previous reply is now waiting in the system mailbox. You | |
909 incorporate this mail into your MH-Folder buffer named @samp{+inbox} | |
910 with the @kbd{i} command. Do this now. After the mail is incorporated, | |
911 use @kbd{n} or @kbd{p} to move the cursor to the new message, and read | |
912 it with @key{RET}. Let's delete this message by typing @kbd{d}. Note | |
913 that a @samp{D} appears next to the message number. This means that | |
914 the message is marked for deletion but is not yet deleted. To perform | |
915 the deletion (and the refile we did previously), use the @kbd{x} | |
916 command. | |
917 | |
918 @findex mh-smail | |
919 @kindex m | |
920 @kindex M-x mh-smail | |
921 | |
922 If you want to send another message you can use @kbd{m} instead of | |
923 @kbd{M-x mh-smail}. So go ahead, send some mail to your friends! | |
924 | |
925 @cindex help | |
926 @cindex prefix characters | |
927 @findex describe-mode | |
928 @kindex ? | |
929 @kindex C-h m | |
930 @kindex F ? | |
931 | |
932 You can get a quick reminder about these commands by typing @kbd{?}. | |
933 This lists several @dfn{prefix characters}. To list the commands | |
934 available via the prefix characters, type the prefix character | |
935 followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is | |
936 available with the @kbd{C-h m} (@code{describe-mode}) command. | |
937 | |
938 @node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E | |
939 @section Leaving MH-E | |
940 | |
941 @cindex Emacs, quitting | |
942 @cindex quitting | |
943 @kindex C-x C-c | |
944 @kindex x | |
945 | |
946 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c} | |
947 to exit @command{emacs}. If you exited without running @kbd{x} in the | |
948 @samp{+inbox} buffer, Emacs will offer to save it for you. Type | |
949 @kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to | |
950 perform any refiles and deletes that you did there. | |
951 | |
952 @findex mh-rmail | |
953 @kindex C-x b | |
954 @kindex C-x k | |
955 @kindex M-x mh-rmail | |
956 @kindex q | |
957 | |
958 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide) | |
959 the MH-E folder or delete it entirely with @kbd{C-x k}. You can then | |
960 later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}. | |
961 | |
962 @cindex @command{packf} | |
963 @cindex MH commands, @command{packf} | |
964 @cindex exporting folders | |
965 @cindex folders, exporting | |
966 @cindex mbox-style folder | |
967 | |
968 On the other hand, if you no longer want to use MH and MH-E, you can | |
969 take your mail with you. You can copy all of your mail into a single | |
970 file, mbox-style, by using the MH command @command{packf}. For | |
971 example, to create a file called @file{msgbox} with the messages in | |
972 your @samp{+inbox} folder, use @samp{packf +inbox}. The | |
973 @command{packf} command will append the messages to the file if it | |
974 already exists, so you can use @samp{folders -recurse -fast} in a | |
975 script to copy all of your messages into a single file, or using the | |
976 @samp{-file} argument, a file for each folder. | |
977 | |
978 @node More About MH-E, , Leaving MH-E, Tour Through MH-E | |
979 @section More About MH-E | |
980 | |
981 These are the basic commands to get you going, but there are plenty | |
982 more. If you think that MH-E is for you, read the rest of the manual | |
983 to find out how you can: | |
984 | |
985 @itemize @bullet | |
986 @item | |
987 Print your messages (@pxref{Printing}). | |
988 @c ------------------------- | |
989 @item | |
990 Edit messages and include your signature (@pxref{Editing Drafts}). | |
991 @c ------------------------- | |
992 @item | |
993 Forward messages (@pxref{Forwarding}). | |
994 @c ------------------------- | |
995 @item | |
996 Read digests (@pxref{Digests}). | |
997 @c ------------------------- | |
998 @item | |
999 Edit bounced messages (@pxref{Editing Again}). | |
1000 @c ------------------------- | |
1001 @item | |
1002 Send multimedia messages (@pxref{Adding Attachments}). | |
1003 @c ------------------------- | |
1004 @item | |
1005 Read HTML messages (@pxref{HTML}). | |
1006 @c ------------------------- | |
1007 @item | |
1008 Use aliases and identities (see @ref{Aliases}, @pxref{Identities}). | |
1009 @c ------------------------- | |
1010 @item | |
1011 Create different views of your mail (see @ref{Threading}, @pxref{Limits}). | |
1012 @c ------------------------- | |
1013 @item | |
1014 Deal with junk mail (@pxref{Junk}). | |
1015 @c ------------------------- | |
1016 @item | |
1017 Handle signed and encrypted messages (see @ref{Reading PGP}, | |
1018 @pxref{Sending PGP}). | |
1019 @c ------------------------- | |
1020 @item | |
1021 Process mail that was sent with @command{shar} or @command{uuencode} | |
1022 (@pxref{Files and Pipes}). | |
1023 @c ------------------------- | |
1024 @item | |
1025 Use sequences conveniently (@pxref{Sequences}). | |
1026 @c ------------------------- | |
1027 @item | |
1028 Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool | |
1029 Bar}, @pxref{Menu Bar}). | |
1030 @c ------------------------- | |
1031 @item | |
1032 Show header fields in different fonts (@pxref{Reading Mail}). | |
1033 @c ------------------------- | |
1034 @item | |
1035 Find previously refiled messages (@pxref{Searching}). | |
1036 @c ------------------------- | |
1037 @item | |
1038 Place messages in a file (@pxref{Files and Pipes}). | |
1039 @end itemize | |
1040 | |
1041 Remember that you can also use MH commands when you're not running | |
1042 MH-E (and when you are!). | |
1043 | |
1044 @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top | |
1045 @chapter Using This Manual | |
1046 | |
1047 This chapter begins the meat of the manual which goes into more detail | |
1048 about every MH-E command and option. | |
1049 | |
1050 @cindex Emacs, info | |
1051 @cindex Emacs, online help | |
1052 @cindex info | |
1053 @cindex online help | |
1054 @findex describe-mode | |
1055 @findex mh-help | |
1056 @kindex ? | |
1057 @kindex C-c ? | |
1058 @kindex C-h C-h | |
1059 @kindex C-h C-k i | |
1060 @kindex C-h i | |
1061 @kindex C-h m | |
1062 | |
1063 There are many commands, but don't get intimidated. There are command | |
1064 summaries at the beginning of each chapter. In case you have or would | |
1065 like to rebind the keys, the command summaries also list the | |
1066 associated Emacs Lisp function. Furthermore, even if you're stranded | |
1067 on a desert island with a laptop and are without your manuals, you can | |
1068 get a summary of all these commands with GNU Emacs online help: use | |
1069 @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands, | |
1070 @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This | |
1071 help appears in a buffer called @samp{*MH-E Help*} | |
1072 (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h | |
1073 i} to read this manual via Info. The online help is quite good; try | |
1074 running @kbd{C-h C-h}. This brings up a list of available help topics, | |
1075 one of which displays the documentation for a given key (like @kbd{C-h | |
1076 k C-n}). Another useful help feature is to view the manual section | |
1077 that describes a given key (such as @kbd{C-h K i}). In addition, | |
1078 review @ref{Conventions}, if any of the GNU Emacs conventions are | |
1079 strange to you. | |
1080 | |
1081 In addition to all of the commands, it is also possible to reconfigure | |
1082 MH-E to fit the needs of even the most demanding user. The following | |
1083 chapters also describe all of the options, show the defaults, and make | |
1084 recommendations for customization. | |
1085 | |
1086 However, when customizing your mail environment, first try to change | |
1087 what you want in MH, and only change MH-E if changing MH is not | |
1088 possible. That way you will get the same behavior inside and outside | |
1089 GNU Emacs. Note that MH-E does not provide hooks for customizations | |
1090 that can be done in MH; this omission is intentional. | |
1091 | |
1092 @cindex Emacs Lisp Manual | |
1093 @cindex Emacs, Emacs Lisp Manual | |
1094 @cindex Emacs, info | |
1095 @cindex Emacs, online help | |
1096 @cindex info | |
1097 @cindex online help | |
1098 | |
1099 I hope I've included enough examples here to get you well on your way. | |
1100 If you want to explore Emacs Lisp further, a programming manual does | |
1101 exist, | |
1102 @c Yes, some of the stuff in the following sections is redundant, but | |
1103 @c TeX barfs if the @ifs are inside the @footnote. | |
1104 @iftex | |
1105 @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available | |
1106 online in the Info system by typing @kbd{C-h i m Emacs Lisp | |
1107 @key{RET}}. It is also available online at @* | |
1108 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You | |
1109 can also order a printed manual, which has the desirable side-effect | |
1110 of helping to support the Free Software Foundation which made all this | |
1111 great software available. You can find an order form by running | |
1112 @kbd{C-h C-d}, or you can request an order form from @i{gnu at | |
1113 gnu.org}.} | |
1114 @end iftex | |
1115 @ifinfo | |
1116 @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU | |
1117 Emacs Lisp Reference Manual}, which may be available online in the | |
1118 Info system. It is also available online at | |
1119 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You | |
1120 can also order a printed manual, which has the desirable side-effect | |
1121 of helping to support the Free Software Foundation which made all this | |
1122 great software available. You can find an order form by running | |
1123 @kbd{C-h C-d}, or you can request an order form from @i{gnu at | |
1124 gnu.org}.} | |
1125 @end ifinfo | |
1126 @ifhtml | |
1127 @footnote{The | |
1128 @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/, | |
1129 The GNU Emacs Lisp Reference Manual} may also be available online in | |
1130 the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can | |
1131 also order a printed manual, which has the desirable side-effect of | |
1132 helping to support the Free Software Foundation which made all this | |
1133 great software available. You can find an order form by running | |
1134 @kbd{C-h C-d}, or you can request an order form from @i{gnu at | |
1135 gnu.org}.} | |
1136 @end ifhtml | |
1137 and you can look at the code itself for examples. Look in the Emacs | |
1138 Lisp directory on your system (such as | |
1139 @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el} | |
1140 files there. When calling MH-E and other Emacs Lisp functions directly | |
1141 from Emacs Lisp code, you'll need to know the correct arguments. Use | |
1142 the online help for this. For example, try @kbd{C-h f | |
1143 mh-execute-commands @key{RET}}. If you write your own functions, | |
1144 please do not prefix your symbols (variables and functions) with | |
1145 @samp{mh-}. This prefix is reserved for the MH-E package. To avoid | |
1146 conflicts with existing MH-E symbols, use a prefix like @samp{my-} or | |
1147 your initials. (Unless, of course, your initials happen to be @emph{mh}!) | |
1148 | |
1149 @menu | |
1150 * Options:: | |
1151 * Ranges:: | |
1152 * Folder Selection:: | |
1153 @end menu | |
1154 | |
1155 @node Options, Ranges, Using This Manual, Using This Manual | |
1156 @section Options | |
1157 | |
1158 @cindex Emacs, customizing | |
1159 @cindex Emacs, setting options | |
1160 @cindex customizing MH-E | |
1161 @cindex setting options | |
1162 @findex customize-option | |
1163 @vindex mh-lpr-command-format, example | |
1164 | |
1165 Many string or integer options are easy to modify using @kbd{M-x | |
1166 customize-option}. For example, to modify the option that controls | |
1167 printing, you would run @kbd{M-x customize-option @key{RET} | |
1168 mh-lpr-command-format @key{RET}}. In the buffer that appears, modify | |
1169 the string to the right of the variable. For example, you may change | |
1170 the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then | |
1171 use the @samp{State} combo box and select @samp{Save for Future | |
1172 Sessions}. To read more about @code{mh-lpr-command-format}, see | |
1173 @ref{Printing}. | |
1174 | |
1175 @cindex nil | |
1176 @cindex off, option | |
1177 @cindex on, option | |
1178 @cindex option, turning on and off | |
1179 @cindex t | |
1180 @findex customize-option | |
1181 @vindex mh-bury-show-buffer-flag, example | |
1182 | |
1183 Options can also hold boolean values. In Emacs Lisp, the boolean | |
1184 values are @code{nil}, which means false, and @code{t}, which means | |
1185 true. The @code{customize-option} function makes it easy to change | |
1186 boolean values; simply click on the toggle button in the customize | |
1187 buffer to switch between @samp{on} (@code{t}) and @samp{off} | |
1188 (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag} | |
1189 to @samp{off} to keep the MH-Show buffer at the top of the buffer | |
1190 stack. Use the @samp{State} combo box and choose @samp{Set for Current | |
1191 Session} to see how the option affects the show buffer. Then choose | |
1192 the @samp{Erase Customization} menu item to reset the option to the | |
1193 default, which places the MH-Show buffer at the bottom of the buffer | |
1194 stack. | |
1195 | |
1196 @vindex mh-mhl-format-file, example | |
1197 | |
1198 The text usually says to turn on an option by setting it to a | |
1199 @emph{non-@code{nil}} value, because sometimes values other than | |
1200 @samp{on} are meaningful. An example of this is the variable | |
1201 @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as | |
1202 hooks, involve a little more Emacs Lisp programming expertise. | |
1203 | |
1204 @cindex customization group, @samp{mh} | |
1205 @cindex @samp{mh} customization group | |
1206 @findex customize-group | |
1207 @findex mh-customize | |
1208 | |
1209 You can browse all of the MH-E options with the @code{customize-group} | |
1210 function. Try entering @kbd{M-x customize-group @key{RET} mh | |
1211 @key{RET}} to view the top-level options as well as buttons for all of | |
1212 the MH-E customization groups. Another way to view the MH-E | |
1213 customization group is to use @kbd{M-x mh-customize @key{RET}}. | |
1214 | |
1215 @node Ranges, Folder Selection, Options, Using This Manual | |
1216 @section Ranges | |
1217 | |
1218 @c Sync with mh-folder-mode docstring. | |
1219 | |
1220 @cindex message abbreviations | |
1221 @cindex message ranges | |
1222 @cindex ranges | |
1223 | |
1224 Many commands that operate on individual messages, such as | |
1225 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE} | |
1226 argument. This argument can be used in several ways. | |
1227 | |
1228 @kindex C-u, with ranges | |
1229 | |
1230 If you provide the prefix argument @kbd{C-u} to these commands, then | |
1231 you will be prompted for the message range. This can be any valid MH | |
1232 range which can include messages, sequences (@pxref{Sequences}), and | |
1233 the abbreviations (described in the @command{mh}(1) man page): | |
1234 | |
1235 @table @samp | |
1236 @item <num1>-<num2> | |
1237 Indicates all messages in the range <num1> to <num2>, inclusive. The | |
1238 range must be nonempty. | |
1239 @c ------------------------- | |
1240 @item <num>:N | |
1241 @itemx <num>:+N | |
1242 @itemx <num>:-N | |
1243 Up to N messages beginning with (or ending with) message num. Num may | |
1244 be any of the predefined symbols: first, prev, cur, next or last. | |
1245 @c ------------------------- | |
1246 @item first:N | |
1247 @itemx prev:N | |
1248 @itemx next:N | |
1249 @itemx last:N | |
1250 The first, previous, next or last messages, if they exist. | |
1251 @c ------------------------- | |
1252 @item all | |
1253 All of the messages. | |
1254 @end table | |
1255 | |
1256 For example, a range that shows all of these things is @samp{1 2 3 | |
1257 5-10 last:5 unseen}. | |
1258 | |
1259 @vindex transient-mark-mode | |
1260 | |
1261 If the option @code{transient-mark-mode} is turned on and you set a | |
1262 region in the MH-Folder buffer, then the MH-E command will perform the | |
1263 operation on all messages in that region. | |
1264 | |
1265 @cindex @samp{mh-range} customization group | |
1266 @cindex customization group, @samp{mh-range} | |
1267 | |
1268 The @samp{mh-range} customization group contains a single option which | |
1269 affects how ranges are interpreted. | |
1270 | |
1271 @vtable @code | |
1272 @item mh-interpret-number-as-range-flag | |
1273 On means interpret a number as a range (default: @samp{on}). | |
1274 @end vtable | |
1275 | |
1276 @vindex mh-interpret-number-as-range-flag | |
1277 | |
1278 Since one of the most frequent ranges used is @samp{last:N}, MH-E will | |
1279 interpret input such as @samp{200} as @samp{last:200} if the | |
1280 @code{mh-interpret-number-as-range-flag} option is on (which is the | |
1281 default). If you need to scan just the message 200, then use the range | |
1282 @samp{200:1} or @samp{200-200}. | |
1283 | |
1284 @node Folder Selection, , Ranges, Using This Manual | |
1285 @section Folder Selection | |
1286 | |
1287 @cindex completion, folders | |
1288 @cindex folders, completion | |
1289 @cindex folders, selecting | |
1290 | |
1291 When you choose a folder in MH-E via a command such as @kbd{o} | |
1292 (@code{mh-refile-msg}), completion is used to enter the folder | |
1293 @ifnothtml | |
1294 (@pxref{Completion, , , emacs, The GNU Emacs Manual}). | |
1295 @end ifnothtml | |
1296 @ifhtml | |
1297 (see the section | |
1298 @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html, | |
1299 Completion} in @cite{The GNU Emacs Manual}). | |
1300 @end ifhtml | |
1301 In addition, MH-E has several ways of choosing a suitable default so | |
1302 that the folder can often be selected with a single @key{RET} key. | |
1303 | |
1304 @cindex customization group, @samp{mh-folder-selection} | |
1305 @cindex @samp{mh-folder-selection} customization group | |
1306 | |
1307 The @samp{mh-folder-selection} customization group contains some | |
1308 options which are used to help with this. | |
1309 | |
1310 @vtable @code | |
1311 @item mh-default-folder-for-message-function | |
1312 Function to select a default folder for refiling or @samp{Fcc:} | |
1313 (default: @code{nil}). | |
1314 @c ------------------------- | |
1315 @item mh-default-folder-list | |
1316 List of addresses and folders (default: @code{nil}). | |
1317 @c ------------------------- | |
1318 @item mh-default-folder-must-exist-flag | |
1319 On means guessed folder name must exist to be used (default: | |
1320 @samp{on}). | |
1321 @c ------------------------- | |
1322 @item mh-default-folder-prefix | |
1323 Prefix used for folder names generated from aliases (default: @code{""}). | |
1324 @end vtable | |
1325 | |
1326 @vindex mh-default-folder-for-message-function | |
1327 | |
1328 You can set the option @code{mh-default-folder-for-message-function} | |
1329 to a function that provides a default folder for the message to be | |
1330 refiled. When this function is called, the current buffer contains the | |
1331 message being refiled and point is at the start of the message. This | |
1332 function should return the default folder as a string with a leading | |
1333 @samp{+} sign. It can also return @code{nil} so that the last folder | |
1334 name is used as the default, or an empty string to suppress the | |
1335 default entirely. | |
1336 | |
1337 Otherwise, the name of the destination folder is derived from the | |
1338 sender as follows: | |
1339 | |
1340 @enumerate | |
1341 @vindex mh-default-folder-list | |
1342 @item | |
1343 The folder name associated with the first address found in the list | |
1344 @code{mh-default-folder-list} is used. Each element in this list | |
1345 contains a @samp{Check Recipient} item. If this item is turned on, | |
1346 then the address is checked against the recipient instead of the | |
1347 sender. This is useful for mailing lists. | |
1348 @c ------------------------- | |
1349 @vindex mh-default-folder-prefix | |
1350 @item | |
1351 An alias prefixed by @code{mh-default-folder-prefix} corresponding to | |
1352 the address is used. The prefix is used to prevent clutter in your | |
1353 mail directory. @xref{Aliases}. | |
1354 @end enumerate | |
1355 | |
1356 @vindex mh-default-folder-must-exist-flag | |
1357 | |
1358 If the derived folder does not exist, and | |
1359 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last | |
1360 folder name used is suggested. This is useful if you get mail from | |
1361 various people for whom you have an alias, but file them all in the | |
1362 same project folder. | |
1363 | |
1364 @node Incorporating Mail, Reading Mail, Using This Manual, Top | |
1365 @chapter Incorporating Your Mail | |
1366 | |
1367 @cindex @samp{Folder} menu | |
1368 @cindex incorporating | |
1369 @cindex menu, @samp{Folder} | |
1370 | |
1371 This chapter talks about getting mail from your system mailbox into | |
1372 your MH @samp{+inbox} folder. The following command accomplishes that | |
1373 and is found in the @samp{Folder} menu. | |
1374 | |
1375 @table @kbd | |
1376 @cindex @samp{Folder > Incorporate New Mail} menu item | |
1377 @cindex menu item, @samp{Folder > Incorporate New Mail} | |
1378 @findex mh-inc-folder | |
1379 @kindex i | |
1380 @item i | |
1381 Incorporate new mail into a folder (@code{mh-inc-folder}). | |
1382 @end table | |
1383 | |
1384 @cindex @samp{mh-inc} customization group | |
1385 @cindex customization group, @samp{mh-inc} | |
1386 | |
1387 The following options in the @samp{mh-inc} customization group are | |
1388 used. | |
1389 | |
1390 @vtable @code | |
1391 @item mh-inc-prog | |
1392 Program to incorporate mail (default: @code{"inc"}). | |
1393 @c ------------------------- | |
1394 @item mh-inc-spool-list | |
1395 Alternate spool files (default: @code{nil}). | |
1396 @end vtable | |
1397 | |
1398 The following hook is available. | |
1399 | |
1400 @vtable @code | |
1401 @findex mh-inc-folder | |
1402 @item mh-inc-folder-hook | |
1403 Hook run by @code{mh-inc-folder} after incorporating mail into a | |
1404 folder (default: @code{nil}). | |
1405 @end vtable | |
1406 | |
1407 @cindex @samp{+inbox} | |
1408 @findex mh-inc-folder | |
1409 @kindex i | |
1410 | |
1411 If at any time you receive new mail, incorporate the new mail into | |
1412 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note | |
1413 that @kbd{i} will display the @samp{+inbox} buffer, even if there | |
1414 isn't any new mail. You can incorporate mail from any file into the | |
1415 current folder by specifying a prefix argument; you'll be prompted for | |
1416 the name of the file to use as well as the destination folder (for | |
1417 example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}). | |
1418 | |
1419 @cindex @file{.emacs} | |
1420 @cindex Emacs, notification of new mail | |
1421 @cindex files, @file{.emacs} | |
1422 @cindex new mail | |
1423 @cindex notification of new mail | |
1424 | |
1425 Emacs can notify you when you have new mail by displaying @samp{Mail} | |
1426 in the mode line. To enable this behavior, and to have a clock in the | |
1427 mode line as well, add the following to @file{~/.emacs}: | |
1428 | |
1429 @findex display-time | |
1430 | |
1431 @smalllisp | |
1432 (display-time) | |
1433 @end smalllisp | |
1434 | |
1435 @cindex @command{inc} | |
1436 @cindex incorporating | |
1437 @cindex MH commands, @command{inc} | |
1438 @vindex mh-inc-prog | |
1439 @vindex mh-progs | |
1440 | |
1441 The name of the program that incorporates new mail is stored in | |
1442 @code{mh-inc-prog}; it is @code{"inc"} by default. This program | |
1443 generates a one-line summary for each of the new messages. Unless it | |
1444 is an absolute pathname, the file is assumed to be in the | |
1445 @code{mh-progs} directory (@pxref{Getting Started}). You may also link | |
1446 a file to @command{inc} that uses a different format (see | |
1447 @samp{mh-profile}(5), and sections | |
1448 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
1449 prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in | |
1450 the MH book). You'll then need to modify several variables | |
1451 appropriately (@pxref{Scan Line Formats}). | |
1452 | |
1453 @vindex mh-inc-spool-list | |
1454 | |
1455 You can use the @code{mh-inc-spool-list} variable to direct MH-E to | |
1456 retrieve mail from arbitrary spool files other than your system | |
1457 mailbox, file it in folders other than your @samp{+inbox}, and assign | |
1458 key bindings to incorporate this mail. | |
1459 | |
1460 @cindex @command{procmail} | |
1461 @cindex @file{.procmailrc} | |
1462 @cindex Unix commands, @command{procmail} | |
1463 @cindex files, @file{.procmailrc} | |
1464 | |
1465 Suppose you are subscribed to the @i{mh-e-devel} mailing list and you | |
1466 use @command{procmail} to filter this mail into @file{~/mail/mh-e} | |
1467 with the following recipe in @file{.procmailrc}: | |
1468 | |
1469 @smallexample | |
1470 PATH=$PATH:/usr/bin/mh | |
1471 MAILDIR=$HOME/`mhparam Path` | |
1472 :0: | |
1473 * ^From mh-e-devel-admin@@stop.mail-abuse.org | |
1474 mh-e | |
1475 @end smallexample | |
1476 | |
1477 @findex mh-inc-spool-* | |
1478 @kindex I * | |
1479 | |
1480 In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an | |
1481 @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option, | |
1482 and click on the @samp{INS} button. Enter a @samp{Spool File} of | |
1483 @samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key | |
1484 Binding} of @samp{m}. | |
1485 | |
1486 @cindex @command{emacsclient} | |
1487 @cindex @command{gnuclient} | |
1488 @cindex @command{xbuffy} | |
1489 @cindex @samp{gnuserv} | |
1490 @cindex Unix commands, @command{emacsclient} | |
1491 @cindex Unix commands, @command{gnuclient} | |
1492 @cindex Unix commands, @command{xbuffy} | |
1493 | |
1494 You can use @command{xbuffy} to automate the incorporation of this | |
1495 mail using the Emacs 22 command @command{emacsclient} as follows: | |
1496 | |
1497 @smallexample | |
1498 box ~/mail/mh-e | |
1499 title mh-e | |
1500 origMode | |
1501 polltime 10 | |
1502 headertime 0 | |
1503 command emacsclient --eval '(mh-inc-spool-mh-e)' | |
1504 @end smallexample | |
1505 | |
1506 In XEmacs, the command @command{gnuclient} is used in a similar | |
1507 fashion. | |
1508 | |
1509 @findex mh-inc-folder | |
1510 @kindex i | |
1511 @vindex mh-inc-folder-hook | |
1512 | |
1513 You can set the hook @code{mh-inc-folder-hook}, which is called after | |
1514 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder}) | |
1515 command. A good use of this hook is to rescan the whole folder either | |
1516 after running @kbd{M-x mh-rmail} the first time or when you've changed | |
1517 the message numbers from outside of MH-E. | |
1518 | |
1519 @findex mh-execute-commands | |
1520 @findex mh-rescan-folder, example | |
1521 @findex mh-show, example | |
1522 @vindex mh-inc-folder-hook, example | |
1523 | |
1524 @smalllisp | |
1525 @group | |
1526 (defun my-mh-inc-folder-hook () | |
1527 "Hook to rescan folder after incorporating mail." | |
1528 (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,} | |
1529 (mh-execute-commands)) ; @r{carry them out} | |
1530 (mh-rescan-folder) ; @r{synchronize with +inbox} | |
1531 (mh-show)) ; @r{show the current message} | |
1532 | |
1533 (add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook) | |
1534 | |
1535 @i{Rescan folder after incorporating new mail via mh-inc-folder-hook} | |
1536 | |
1537 @end group | |
1538 @end smalllisp | |
1539 | |
1540 @node Reading Mail, Folders, Incorporating Mail, Top | |
1541 @chapter Reading Your Mail | |
1542 | |
1543 @cindex @samp{+inbox} | |
1544 @cindex MH-Folder mode | |
1545 @cindex MH-Show mode | |
1546 @cindex modes, MH-Folder | |
1547 @cindex modes, MH-Show | |
1548 @cindex reading mail | |
1549 @findex mh-rmail | |
1550 @kindex F r | |
1551 @kindex F v | |
1552 @kindex M-x mh-rmail | |
1553 | |
1554 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This | |
1555 command incorporates your mail and creates a buffer called | |
1556 @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows | |
1557 you only new mail, not mail you have already read@footnote{If you want | |
1558 to see your old mail as well, use @kbd{F r} to pull all your messages | |
1559 into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will | |
1560 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u | |
1561 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}. | |
1562 | |
1563 @findex display-time | |
1564 @vindex read-mail-command | |
1565 | |
1566 There are some commands that need to read mail, such as @kbd{Mouse-2} | |
1567 over the @samp{Mail} button that @code{display-time} adds to the mode | |
1568 line. You can configure Emacs to have these commands use MH-E by | |
1569 setting the option @code{read-mail-command} to @samp{mh-rmail}. | |
1570 | |
1571 @cindex @command{scan} | |
1572 @cindex @samp{Message} menu | |
1573 @cindex MH commands, @command{scan} | |
1574 @cindex menu, @samp{Message} | |
1575 @cindex scan lines | |
1576 | |
1577 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line | |
1578 summaries of each incorporated message. You can perform most MH | |
1579 commands on these messages via one- or two-letter commands in either | |
1580 the MH-Folder or MH-Show buffers or by using the @samp{Message} menu. | |
1581 See @command{scan}(1) for a description of the contents of the scan | |
1582 lines, and see the Figure in @ref{Reading Mail Tour}, for an example. | |
1583 | |
1584 @table @kbd | |
1585 @kindex ? | |
1586 @findex mh-help | |
1587 @item ? | |
1588 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
1589 @c ------------------------- | |
1590 @cindex @samp{Message > Show Message} menu item | |
1591 @cindex menu item, @samp{Message > Show Message} | |
1592 @kindex @key{RET} | |
1593 @findex mh-show | |
1594 @item @key{RET} | |
1595 Display message (@code{mh-show}). | |
1596 @c ------------------------- | |
1597 @cindex @samp{Message > Show Message with Header} menu item | |
1598 @cindex menu item, @samp{Message > Show Message with Header} | |
1599 @kindex , (comma) | |
1600 @findex mh-header-display | |
1601 @item , (comma) | |
1602 Display message with all header fields (@code{mh-header-display}). | |
1603 @c ------------------------- | |
97192 | 1604 @cindex @samp{Message > Show Message with Preferred Alternative} menu item |
1605 @cindex menu item, @samp{Message > Show Message with Preferred Alternative} | |
1606 @kindex : (colon) | |
1607 @findex mh-show-preferred-alternative | |
1608 @item : (colon) | |
1609 Display message with the default preferred alternative | |
1610 (@code{mh-show-preferred-alternative}). | |
1611 @c ------------------------- | |
84306 | 1612 @kindex ; (semicolon) |
1613 @findex mh-toggle-mh-decode-mime-flag | |
1614 @item ; (semicolon) | |
1615 Toggle the value of @code{mh-decode-mime-flag} | |
1616 (@code{mh-toggle-mh-decode-mime-flag}). | |
1617 @c ------------------------- | |
1618 @kindex @key{SPC} | |
1619 @findex mh-page-msg | |
1620 @item @key{SPC} | |
1621 Display next page in message (@code{mh-page-msg}). | |
1622 @c ------------------------- | |
1623 @kindex @key{BS} | |
1624 @findex mh-previous-page | |
1625 @item @key{BS} | |
1626 Display previous page in message (@code{mh-previous-page}). | |
1627 @c ------------------------- | |
1628 @cindex @samp{Message > Write Message to File...} menu item | |
1629 @cindex menu item, @samp{Message > Write Message to File...} | |
1630 @kindex > | |
1631 @findex mh-write-msg-to-file | |
1632 @item > | |
1633 Append message to end of file (@code{mh-write-msg-to-file}). | |
1634 @c ------------------------- | |
1635 @cindex @samp{Message > Pipe Message to Command...} menu item | |
1636 @cindex menu item, @samp{Message > Pipe Message to Command...} | |
1637 @kindex | | |
1638 @findex mh-pipe-msg | |
1639 @item | | |
1640 Pipe message through shell command (@code{mh-pipe-msg}). | |
1641 @c ------------------------- | |
1642 @kindex C-d | |
1643 @findex mh-delete-msg-no-motion | |
1644 @item C-d | |
1645 Delete range, don't move to next message | |
1646 (@code{mh-delete-msg-no-motion}). | |
1647 @c ------------------------- | |
1648 @cindex @samp{Message > Delete Message} menu item | |
1649 @cindex menu item, @samp{Message > Delete Message} | |
1650 @kindex d | |
1651 @findex mh-delete-msg | |
1652 @item d | |
1653 Delete range (@code{mh-delete-msg}). | |
1654 @c ------------------------- | |
1655 @kindex D ? | |
1656 @findex mh-prefix-help | |
1657 @item D ? | |
1658 Display cheat sheet for the commands of the current prefix in | |
1659 minibuffer (@code{mh-prefix-help}). | |
1660 @c ------------------------- | |
1661 @kindex D @key{SPC} | |
1662 @findex mh-page-digest | |
1663 @item D @key{SPC} | |
1664 Display next message in digest (@code{mh-page-digest}). | |
1665 @c ------------------------- | |
1666 @kindex D @key{BS} | |
1667 @findex mh-page-digest-backwards | |
1668 @item D @key{BS} | |
1669 Display previous message in digest (@code{mh-page-digest-backwards}). | |
1670 @c ------------------------- | |
1671 @cindex @samp{Message > Burst Digest Message} menu item | |
1672 @cindex menu item, @samp{Message > Burst Digest Message} | |
1673 @kindex D b | |
1674 @findex mh-burst-digest | |
1675 @item D b | |
1676 Break up digest into separate messages (@code{mh-burst-digest}). | |
1677 @c ------------------------- | |
1678 @cindex @samp{Message > Go to Message by Number...} menu item | |
1679 @cindex menu item, @samp{Message > Go to Message by Number...} | |
1680 @kindex g | |
1681 @findex mh-goto-msg | |
1682 @item g | |
1683 Go to a message (@code{mh-goto-msg}). | |
1684 @c ------------------------- | |
1685 @kindex k | |
1686 @findex mh-delete-subject-or-thread | |
1687 @item k | |
1688 Delete messages with same subject or thread | |
1689 (@code{mh-delete-subject-or-thread}). | |
1690 @c ------------------------- | |
1691 @kindex K ? | |
1692 @findex mh-prefix-help | |
1693 @item K ? | |
1694 Display cheat sheet for the commands of the current prefix in | |
1695 minibuffer (@code{mh-prefix-help}). | |
1696 @c ------------------------- | |
1697 @kindex K @key{TAB} | |
1698 @findex mh-next-button | |
1699 @item K @key{TAB} | |
1700 Go to the next button (@code{mh-next-button}). | |
1701 @c ------------------------- | |
1702 @kindex K S-@key{TAB} | |
1703 @findex mh-prev-button | |
1704 @item K S-@key{TAB} | |
1705 Go to the previous button (@code{mh-prev-button}). | |
1706 @c ------------------------- | |
1707 @kindex K a | |
1708 @findex mh-mime-save-parts | |
1709 @item K a | |
1710 Save attachments (@code{mh-mime-save-parts}). | |
1711 @c ------------------------- | |
1712 @kindex K e | |
1713 @findex mh-display-with-external-viewer | |
1714 @item K e | |
1715 View attachment externally (@code{mh-display-with-external-viewer}). | |
1716 @c ------------------------- | |
1717 @kindex K i | |
1718 @findex mh-folder-inline-mime-part | |
1719 @item K i | |
1720 Show attachment verbatim (@code{mh-folder-inline-mime-part}). | |
1721 @c ------------------------- | |
1722 @kindex K o | |
1723 @findex mh-folder-save-mime-part | |
1724 @item K o | |
1725 Save (output) attachment (@code{mh-folder-save-mime-part}). | |
1726 @c ------------------------- | |
1727 @kindex K t | |
1728 @findex mh-toggle-mime-buttons | |
1729 @item K t | |
1730 Toggle option @code{mh-display-buttons-for-inline-parts-flag} | |
1731 (@code{mh-toggle-mime-buttons}). | |
1732 @c ------------------------- | |
1733 @kindex K v | |
1734 @findex mh-folder-toggle-mime-part | |
1735 @item K v | |
1736 View attachment (@code{mh-folder-toggle-mime-part}). | |
1737 @c ------------------------- | |
1738 @cindex @samp{Message > Modify Message} menu item | |
1739 @cindex menu item, @samp{Message > Modify Message} | |
1740 @kindex M | |
1741 @findex mh-modify | |
1742 @item M | |
1743 Edit message (@code{mh-modify}). | |
1744 @c ------------------------- | |
1745 @cindex @samp{Message > Go to First Message} menu item | |
1746 @cindex menu item, @samp{Message > Go to First Message} | |
1747 @kindex M-< | |
1748 @findex mh-first-msg | |
1749 @item M-< | |
1750 Display first message (@code{mh-first-msg}). | |
1751 @c ------------------------- | |
1752 @cindex @samp{Message > Go to Last Message} menu item | |
1753 @cindex menu item, @samp{Message > Go to Last Message} | |
1754 @kindex M-> | |
1755 @findex mh-last-msg | |
1756 @item M-> | |
1757 Display last message (@code{mh-last-msg}). | |
1758 @c ------------------------- | |
1759 @kindex M-n | |
1760 @findex mh-next-unread-msg | |
1761 @item M-n | |
1762 Display next unread message (@code{mh-next-unread-msg}). | |
1763 @c ------------------------- | |
1764 @kindex M-p | |
1765 @findex mh-previous-unread-msg | |
1766 @item M-p | |
1767 Display previous unread message (@code{mh-previous-unread-msg}). | |
1768 @c ------------------------- | |
1769 @cindex @samp{Message > Next Message} menu item | |
1770 @cindex menu item, @samp{Message > Next Message} | |
1771 @kindex n | |
1772 @findex mh-next-undeleted-msg | |
1773 @item n | |
1774 Display next message (@code{mh-next-undeleted-msg}). | |
1775 @c ------------------------- | |
1776 @cindex @samp{Message > Previous Message} menu item | |
1777 @cindex menu item, @samp{Message > Previous Message} | |
1778 @kindex p | |
1779 @findex mh-previous-undeleted-msg | |
1780 @item p | |
1781 Display previous message (@code{mh-previous-undeleted-msg}). | |
1782 @c ------------------------- | |
1783 @kindex P ? | |
1784 @findex mh-prefix-help | |
1785 @item P ? | |
1786 Display cheat sheet for the commands of the current prefix in | |
1787 minibuffer (@code{mh-prefix-help}). | |
1788 @c ------------------------- | |
1789 @kindex P C | |
1790 @findex mh-ps-print-toggle-color | |
1791 @item P C | |
1792 Toggle whether color is used in printing messages | |
1793 (@code{mh-ps-print-toggle-color}). | |
1794 @c ------------------------- | |
1795 @kindex P F | |
1796 @findex mh-ps-print-toggle-faces | |
1797 @item P F | |
1798 Toggle whether printing is done with faces or not | |
1799 (@code{mh-ps-print-toggle-faces}). | |
1800 @c ------------------------- | |
1801 @kindex P f | |
1802 @findex mh-ps-print-msg-file | |
1803 @item P f | |
1804 Print range to file (@code{mh-ps-print-msg-file}). | |
1805 @c ------------------------- | |
1806 @cindex @samp{Message > Print Message} menu item | |
1807 @cindex menu item, @samp{Message > Print Message} | |
1808 @kindex P l | |
1809 @findex mh-print-msg | |
1810 @item P l | |
1811 Print range the old fashioned way | |
1812 (@code{mh-print-msg}). | |
1813 @c ------------------------- | |
1814 @kindex P p | |
1815 @findex mh-ps-print-msg | |
1816 @item P p | |
1817 Print range (@code{mh-ps-print-msg}). | |
1818 @c ------------------------- | |
1819 @kindex X ? | |
1820 @findex mh-prefix-help | |
1821 @item X ? | |
1822 Display cheat sheet for the commands of the current prefix in | |
1823 minibuffer (@code{mh-prefix-help}). | |
1824 @c ------------------------- | |
1825 @cindex @samp{Message > Unpack Uuencoded Message...} menu item | |
1826 @cindex menu item, @samp{Message > Unpack Uuencoded Message...} | |
1827 @kindex X s | |
1828 @kindex X u | |
1829 @findex mh-store-msg | |
1830 @item X s | |
1831 @itemx X u | |
1832 Unpack message created with @command{uudecode} or @command{shar} | |
1833 (@code{mh-store-msg}). | |
1834 @c ------------------------- | |
1835 @kindex Mouse-2 | |
1836 @findex mh-show-mouse | |
1837 @item Mouse-2 | |
1838 Move point to mouse event and show message (@code{mh-show-mouse}). | |
1839 @end table | |
1840 | |
1841 Within the MH-Show buffer, the following command is defined. | |
1842 | |
1843 @table @kbd | |
1844 @kindex @key{RET} | |
1845 @kindex Mouse-1 | |
1846 @kindex Mouse-2 | |
1847 @findex mh-press-button | |
1848 @item @key{RET} | |
1849 @itemx Mouse-1 | |
1850 @itemx Mouse-2 | |
1851 View contents of button (@code{mh-press-button}). | |
1852 @end table | |
1853 | |
1854 @cindex @samp{mh-show} customization group | |
1855 @cindex customization group, @samp{mh-show} | |
1856 | |
1857 The following table lists options in the @samp{mh-show} customization | |
1858 group that are used while reading mail. | |
1859 | |
1860 @vtable @code | |
1861 @item mh-bury-show-buffer-flag | |
1862 On means show buffer is buried (default: @samp{on}). | |
1863 @c ------------------------- | |
1864 @item mh-clean-message-header-flag | |
1865 On means remove extraneous header fields (default: @samp{on}). | |
1866 @c ------------------------- | |
1867 @item mh-decode-mime-flag | |
1868 On means attachments are handled (default: @samp{on} if the Gnus | |
1869 @samp{mm-decode} package is present). | |
1870 @c ------------------------- | |
1871 @item mh-display-buttons-for-alternatives-flag | |
1872 On means display buttons for all alternative attachments (default: | |
1873 @samp{off}). | |
1874 @c ------------------------- | |
1875 @item mh-display-buttons-for-inline-parts-flag | |
1876 On means display buttons for all inline attachments (default: | |
1877 @samp{off}). | |
1878 @c ------------------------- | |
1879 @item mh-do-not-confirm-flag | |
1880 On means non-reversible commands do not prompt for confirmation | |
1881 (default: @samp{off}). | |
1882 @c ------------------------- | |
1883 @item mh-fetch-x-image-url | |
1884 Control fetching of @samp{X-Image-URL:} header field image (default: | |
1885 @samp{Never Fetch}). | |
1886 @c ------------------------- | |
1887 @item mh-graphical-smileys-flag | |
1888 On means graphical smileys are displayed (default: @samp{on}). | |
1889 @c ------------------------- | |
1890 @item mh-graphical-emphasis-flag | |
1891 On means graphical emphasis is displayed (default: @samp{on}). | |
1892 @c ------------------------- | |
1893 @item mh-highlight-citation-style | |
1894 Style for highlighting citations (default: @samp{Multicolor}). | |
1895 @c ------------------------- | |
1896 @item mh-invisible-header-fields-default | |
1897 List of hidden header fields (default: a checklist too long to list | |
1898 here). | |
1899 @c ------------------------- | |
1900 @item mh-invisible-header-fields | |
1901 Additional header fields to hide (default: @code{nil}). | |
1902 @c ------------------------- | |
1903 @item mh-lpr-command-format | |
1904 Command used to print (default: @code{"lpr -J '%s'"}). | |
1905 @c ------------------------- | |
1906 @item mh-max-inline-image-height | |
1907 Maximum inline image height if @samp{Content-Disposition:} is not | |
1908 present (default: 0). | |
1909 @c ------------------------- | |
1910 @item mh-max-inline-image-width | |
1911 Maximum inline image width if @samp{Content-Disposition:} is not | |
1912 present(default: 0). | |
1913 @c ------------------------- | |
1914 @item mh-mhl-format-file | |
1915 Specifies the format file to pass to the @command{mhl} program | |
1916 (default: @samp{Use Default mhl Format (Printing Only)}). | |
1917 @c ------------------------- | |
1918 @item mh-mime-save-parts-default-directory | |
1919 Default directory to use for @kbd{K a}. | |
1920 @c ------------------------- | |
1921 @item mh-print-background-flag | |
1922 On means messages should be printed in the background (default: | |
1923 @samp{off}). | |
1924 @c ------------------------- | |
1925 @item mh-show-buffer-mode-line-buffer-id | |
1926 Format string to produce @code{mode-line-buffer-identification} for | |
1927 show buffers (default: @code{" @{show-%s@} %d"}). | |
1928 @c ------------------------- | |
1929 @item mh-show-maximum-size | |
1930 Maximum size of message (in bytes) to display automatically (default: | |
1931 0). | |
1932 @c ------------------------- | |
1933 @item mh-show-use-xface-flag | |
1934 On means display face images in MH-Show buffers (default: @samp{on}). | |
1935 @c ------------------------- | |
1936 @item mh-store-default-directory | |
1937 Default directory for @kbd{X s} (default: @samp{Current}). | |
1938 @c ------------------------- | |
1939 @item mh-summary-height | |
1940 Number of lines in MH-Folder buffer (including the mode line) | |
1941 (default: depends on size of frame). | |
1942 @end vtable | |
1943 | |
1944 The following hooks are available. | |
1945 | |
1946 @vtable @code | |
1947 @item mh-delete-msg-hook | |
1948 Hook run after marking each message for deletion (default: @code{nil}). | |
1949 @c ------------------------- | |
1950 @item mh-show-hook | |
1951 Hook run after @key{RET} shows a message (default: @code{nil}). | |
1952 @c ------------------------- | |
1953 @item mh-show-mode-hook | |
1954 Hook run upon entry to @code{mh-show-mode} (default: @code{nil}). | |
1955 @end vtable | |
1956 | |
1957 The following faces are available. | |
1958 | |
1959 @vtable @code | |
1960 @item mh-show-cc | |
1961 Face used to highlight @samp{cc:} header fields. | |
1962 @c ------------------------- | |
1963 @item mh-show-date | |
1964 Face used to highlight @samp{Date:} header fields. | |
1965 @c ------------------------- | |
1966 @item mh-show-from | |
1967 Face used to highlight @samp{From:} header fields. | |
1968 @c ------------------------- | |
1969 @item mh-show-header | |
1970 Face used to deemphasize less interesting header fields. | |
1971 @c ------------------------- | |
1972 @item mh-show-pgg-bad | |
1973 Bad PGG signature face. | |
1974 @c ------------------------- | |
1975 @item mh-show-pgg-good | |
1976 Good PGG signature face. | |
1977 @c ------------------------- | |
1978 @item mh-show-pgg-unknown | |
1979 Unknown or untrusted PGG signature face. | |
1980 @c ------------------------- | |
1981 @item mh-show-signature | |
1982 Signature face. | |
1983 @c ------------------------- | |
1984 @item mh-show-subject | |
1985 Face used to highlight @samp{Subject:} header fields. | |
1986 @c ------------------------- | |
1987 @item mh-show-to | |
1988 Face used to highlight @samp{To:} header fields. | |
1989 @c ------------------------- | |
1990 @item mh-show-xface | |
1991 X-Face image face. | |
1992 @end vtable | |
1993 | |
1994 The functions and variables introduced here are explained in more | |
1995 detail in the following sections. | |
1996 | |
1997 @menu | |
1998 * Viewing:: | |
1999 * Viewing Attachments:: | |
2000 * HTML:: | |
2001 * Digests:: | |
2002 * Reading PGP:: | |
2003 * Printing:: | |
2004 * Files and Pipes:: | |
2005 * Navigating:: | |
2006 * Miscellaneous Commands and Options:: | |
2007 @end menu | |
2008 | |
2009 @node Viewing, Viewing Attachments, Reading Mail, Reading Mail | |
2010 @section Viewing Your Mail | |
2011 | |
2012 @findex mh-header-display | |
2013 @findex mh-page-msg | |
2014 @findex mh-previous-page | |
2015 @findex mh-show | |
2016 @findex mh-show-mouse | |
2017 @kindex , (comma) | |
2018 @kindex . (period) | |
2019 @kindex @key{BS} | |
2020 @kindex @key{RET} | |
2021 @kindex @key{SPC} | |
2022 @kindex Mouse-2 | |
2023 | |
2024 The command @key{RET} (@code{mh-show}) displays the message that the | |
2025 cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the | |
2026 message that the mouse cursor is on. If the message is already | |
2027 displayed, it scrolls to the beginning of the message. Use @key{SPC} | |
2028 (@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move | |
2029 forwards and backwards one page at a time through the message. You can | |
2030 give either of these commands a prefix argument that specifies the | |
2031 number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC} | |
2032 command will also show the next undeleted message if it is used at the | |
2033 bottom of a message. MH-E normally hides a lot of the superfluous | |
2034 header fields that mailers add to a message, but if you wish to see | |
2035 all of them, use the command @kbd{,} (comma; | |
2036 @code{mh-header-display}). | |
2037 | |
2038 @vindex mh-show-maximum-size | |
2039 | |
2040 The option @code{mh-show-maximum-size} provides an opportunity to skip | |
2041 over large messages which may be slow to load. The default value of 0 | |
2042 means that all message are shown regardless of size. | |
2043 | |
2044 A litany of options control what displayed messages look like. | |
2045 | |
2046 @vindex mh-show-cc | |
2047 @vindex mh-show-date | |
2048 @vindex mh-show-from | |
2049 @vindex mh-show-header | |
2050 @vindex mh-show-subject | |
2051 @vindex mh-show-to | |
2052 | |
2053 First, the appearance of the header fields can be modified by | |
2054 customizing the associated face: @code{mh-show-to}, @code{mh-show-cc}, | |
2055 @code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}. | |
2056 The face @code{mh-show-header} is used to deemphasize the other, less | |
2057 interesting, header fields. | |
2058 | |
2059 @cindex regular expressions, @code{mh-invisible-header-fields} | |
2060 @vindex mh-clean-message-header-flag | |
2061 @vindex mh-invisible-header-fields | |
2062 @vindex mh-invisible-header-fields-default | |
2063 | |
2064 Normally messages are delivered with a handful of uninteresting header | |
2065 fields. These are hidden by turning on the option | |
2066 @code{mh-clean-message-header-flag} (which it is by default). The | |
2067 header fields listed in the option | |
2068 @code{mh-invisible-header-fields-default} are hidden, although you can | |
2069 check off any field that you would like to see. Header fields that you | |
2070 would like to hide that aren't listed can be added to the option | |
2071 @code{mh-invisible-header-fields} with a couple of caveats. Regular | |
2072 expressions are not allowed. Unique fields should have a @samp{:} | |
2073 suffix; otherwise, the element can be used to render invisible an | |
2074 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
|
2075 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
|
2076 @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
|
2077 SF #1916032}. |
84306 | 2078 |
2079 @cindex header field, @samp{Face:} | |
2080 @cindex header field, @samp{X-Face:} | |
2081 @cindex header field, @samp{X-Image-URL:} | |
2082 @cindex @samp{Face:} header field | |
2083 @cindex @samp{X-Face:} header field | |
2084 @cindex @samp{X-Image-URL:} header field | |
2085 @vindex mh-show-use-xface-flag | |
2086 | |
2087 MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and | |
2088 @samp{X-Image-URL:} header fields. If any of these fields occur in the | |
2089 header of your message, the sender's face will appear in the | |
2090 @samp{From:} header field. If more than one of these fields appear, | |
2091 then the first field found in the order @samp{Face:}, @samp{X-Face:}, | |
2092 and @samp{X-Image-URL:} will be used. The option | |
2093 @code{mh-show-use-xface-flag} is used to turn this feature on and off. | |
2094 This feature will be turned on by default if your system supports it. | |
2095 | |
2096 The first header field used, if present, is the Gnus-specific | |
2097 @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU | |
2098 Emacs 21 and XEmacs. For more information, see | |
2099 @uref{http://quimby.gnus.org/circus/face/}.}. | |
2100 | |
2101 @cindex @command{uncompface} | |
2102 @cindex Emacs, packages, x-face | |
2103 @cindex Unix commands, @command{uncompface} | |
2104 @cindex x-face package | |
2105 @vindex mh-show-xface | |
2106 | |
2107 Next is the traditional @samp{X-Face:} header field@footnote{The | |
2108 display of this field requires the | |
2109 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, | |
2110 @command{uncompface} program}. Recent versions of XEmacs have internal | |
2111 support for @samp{X-Face:} images. If your version of XEmacs does not, | |
2112 then you'll need both @command{uncompface} and the | |
2113 @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E | |
2114 renders the foreground and background of the image using the | |
2115 associated attributes of the face @code{mh-show-xface}. | |
2116 | |
2117 @cindex @command{convert} | |
2118 @cindex @command{wget} | |
2119 @cindex ImageMagick | |
2120 @cindex Unix commands, @command{convert} | |
2121 @cindex Unix commands, @command{wget} | |
2122 @vindex mh-fetch-x-image-url | |
2123 | |
2124 Finally, MH-E will display images referenced by the | |
2125 @samp{X-Image-URL:} header field if neither the @samp{Face:} nor the | |
2126 @samp{X-Face:} fields are present@footnote{The display of the images | |
2127 requires the @uref{http://www.gnu.org/software/wget/wget.html, | |
2128 @command{wget} program} to fetch the image and the @command{convert} | |
2129 program from the @uref{http://www.imagemagick.org/, ImageMagick | |
2130 suite}.}. Of the three header fields this is the most efficient in | |
2131 terms of network usage since the image doesn't need to be transmitted | |
2132 with every single mail. The option @code{mh-fetch-x-image-url} | |
2133 controls the fetching of the @samp{X-Image-URL:} header field image | |
2134 with the following values: | |
2135 | |
2136 @table @samp | |
2137 @item Ask Before Fetching | |
2138 You are prompted before the image is fetched. MH-E will remember your | |
2139 reply and will either use the already fetched image the next time the | |
2140 same URL is encountered or silently skip it if you didn't fetch it the | |
2141 first time. This is a good setting. | |
2142 @c ------------------------- | |
2143 @item Never Fetch | |
2144 Images are never fetched and only displayed if they are already | |
2145 present in the cache. This is the default. | |
2146 @end table | |
2147 | |
2148 There isn't a value of @samp{Always Fetch} for privacy and DOS (denial | |
2149 of service) reasons. For example, fetching a URL can tip off a spammer | |
2150 that you've read his email (which is why you shouldn't blindly answer | |
2151 yes if you've set this option to @samp{Ask Before Fetching}). Someone | |
2152 may also flood your network and fill your disk drive by sending a | |
2153 torrent of messages, each specifying a unique URL to a very large | |
2154 file. | |
2155 | |
2156 @cindex @file{.mhe-x-image-cache} | |
2157 @cindex files, @file{.mhe-x-image-cache} | |
2158 | |
2159 The cache of images is found in the directory | |
2160 @file{.mhe-x-image-cache} within your MH directory. You can add your | |
2161 own face to the @samp{From:} field too. @xref{Picture}. | |
2162 | |
2163 @cindex @command{mhl} | |
2164 @cindex MH commands, @command{mhl} | |
2165 @vindex mh-mhl-format-file | |
2166 | |
2167 Normally MH-E takes care of displaying messages itself (rather than | |
2168 calling an MH program to do the work). If you'd rather have | |
2169 @command{mhl} display the message (within MH-E), change the option | |
2170 @code{mh-mhl-format-file} from its default value of @samp{Use Default | |
2171 mhl Format (Printing Only)}. You can set this option to @samp{Use | |
2172 Default mhl Format} to get the same output as you would get if you ran | |
2173 @command{mhl} from the shell. If you have a format file that you want | |
2174 MH-E to use, you can set this option to @samp{Specify an mhl Format | |
2175 File} and enter the name of your format file (@command{mhl}(1) or | |
2176 section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in | |
2177 the MH book tells you how to write one). Your format file should | |
2178 specify a non-zero value for @samp{overflowoffset} to allow MH-E to | |
2179 parse the header. Note that @command{mhl} is always used for printing | |
2180 and forwarding; in this case, the value of @code{mh-mhl-format-file} | |
2181 is consulted if you have specified a format file. | |
2182 | |
2183 @cindex citations, highlighting | |
2184 @cindex highlighting citations | |
2185 @vindex mh-highlight-citation-style | |
2186 | |
2187 If the sender of the message has cited other messages in his message, | |
2188 then MH-E will highlight these citations to emphasize the sender's | |
2189 actual response. The option @code{mh-highlight-citation-style} can be | |
2190 customized to change the highlighting style. The @samp{Multicolor} | |
2191 method uses a different color for each indentation while the | |
2192 @samp{Monotone} method highlights all citations in red. To disable | |
2193 highlighting of citations entirely, choose @samp{None}. | |
2194 | |
2195 @cindex URLs, highlighting | |
2196 @cindex email addresses, highlighting | |
2197 @cindex highlighting URLs | |
2198 @cindex highlighting email addresses | |
2199 @cindex links, following | |
2200 @findex goto-address-at-point | |
2201 @kindex C-c @key{RET} | |
2202 @kindex Mouse-2 | |
2203 @vindex goto-address-highlight-p | |
2204 | |
2205 Email addresses and URLs in the message are highlighted if the option | |
2206 @code{goto-address-highlight-p} is on, which it is by default. To view | |
2207 the web page for a highlighted URL or to send a message using a | |
2208 highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}} | |
2209 (@code{goto-address-at-point}). @xref{Sending Mail}, to see how to | |
2210 configure Emacs to send the message using MH-E. | |
2211 | |
2212 @cindex boldface, showing | |
2213 @cindex emphasis | |
2214 @cindex italics, showing | |
2215 @cindex smileys | |
2216 @cindex typesetting | |
2217 @cindex underline, showing | |
2218 @vindex gnus-emphasis-alist | |
2219 @vindex mh-decode-mime-flag | |
2220 @vindex mh-graphical-emphasis-flag | |
2221 @vindex mh-graphical-smileys-flag | |
2222 | |
2223 It is a long standing custom to inject body language using a | |
2224 cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can | |
2225 render these as graphical widgets if the option | |
2226 @code{mh-graphical-smileys-flag} is turned on, which it is by default. | |
2227 Smileys include patterns such as :-) and ;-). Similarly, a few | |
2228 typesetting features are indicated in ASCII text with certain | |
2229 characters. If your terminal supports it, MH-E can render these | |
2230 typesetting directives naturally if the option | |
2231 @code{mh-graphical-emphasis-flag} is turned on, which it is by | |
2232 default. For example, _underline_ will be | |
2233 @ifhtml | |
2234 @html | |
2235 <u>underlined</u>, | |
2236 @end html | |
2237 @end ifhtml | |
2238 @ifnothtml | |
2239 underlined, | |
2240 @end ifnothtml | |
2241 *bold* will appear in @b{bold}, /italics/ will appear in @i{italics}, | |
2242 and so on. See the option @code{gnus-emphasis-alist} for the whole | |
2243 list. Both of these options are disabled if the option | |
2244 @code{mh-decode-mime-flag} is turned off. @xref{Viewing Attachments}. | |
2245 | |
2246 @cindex signature separator | |
2247 @cindex vCard | |
2248 @vindex mh-show-signature | |
2249 | |
2250 MH-E normally renders signatures and vCards in italics so that the | |
2251 body of the message stands out more. MH-E depends on the presence of | |
2252 the @dfn{signature separator} (@code{"-- "}) to do this. You can also | |
2253 customize the face @code{mh-show-signature} so the appearance of the | |
2254 signature block is more to your liking. | |
2255 | |
2256 @vindex mh-show-hook | |
2257 @vindex mh-show-mode-hook | |
2258 | |
2259 Two hooks can be used to control how messages are displayed. The first | |
2260 hook, @code{mh-show-mode-hook}, is called early on in the process of | |
2261 the message display. It is usually used to perform some action on the | |
2262 message's content. The second hook, @code{mh-show-hook}, is the last | |
2263 thing called after messages are displayed. It's used to affect the | |
2264 behavior of MH-E in general or when @code{mh-show-mode-hook} is too | |
2265 early. | |
2266 | |
2267 @cindex MH-Show mode | |
2268 @cindex modes, MH-Show | |
2269 @vindex mh-show-buffer-mode-line-buffer-id | |
2270 | |
2271 For those who like to modify their mode lines, use | |
2272 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in | |
2273 the MH-Show buffers. Place the two escape strings @samp{%s} and | |
2274 @samp{%d}, which will display the folder name and the message number, | |
2275 respectively, somewhere in the string in that order. The default value | |
2276 of @code{"@{show-%s@} %d"} yields a mode line of | |
2277 | |
2278 @smallexample | |
2279 -----@{show-+inbox@} 4 (MH-Show)--Bot-------------------------------- | |
2280 @end smallexample | |
2281 | |
2282 @node Viewing Attachments, HTML, Viewing, Reading Mail | |
2283 @section Viewing Attachments | |
2284 | |
2285 @cindex attachments | |
2286 @cindex body parts | |
2287 @cindex @command{mhshow} | |
2288 @cindex @command{show} | |
2289 @cindex MH commands, @command{mhshow} | |
2290 @cindex MH commands, @command{show} | |
2291 @cindex MIME | |
2292 @cindex multimedia mail | |
2293 | |
2294 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet | |
2295 Mail Extensions) messages which are simply messages with additional | |
2296 @dfn{body parts} or @dfn{attachments}. You can use the MH commands | |
2297 @command{show}@footnote{See the section | |
2298 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
2299 prev} in the MH book.} or @command{mhshow}@footnote{See the section | |
2300 @uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in | |
2301 the MH book.} from the shell to read @sc{mime} messages@footnote{You | |
2302 can call them directly from Emacs if you're running the X Window | |
2303 System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can | |
2304 leave out the @samp{xterm -e} if you use @command{mhlist} or | |
2305 @command{mhstore}.}. | |
2306 | |
2307 @cindex Emacs, packages, mm-decode | |
2308 @cindex mm-decode package | |
2309 @findex mh-toggle-mh-decode-mime-flag | |
2310 @kindex ; (semicolon) | |
2311 @vindex mh-decode-mime-flag | |
2312 | |
2313 MH-E can handle attachments as well if the Gnus @samp{mm-decode} | |
2314 package is present. If so, the option @code{mh-decode-mime-flag} will | |
2315 be on. Otherwise, you'll see the @sc{mime} body parts rather than text | |
2316 or attachments. There isn't much point in turning off the option | |
2317 @code{mh-decode-mime-flag}; however, you can inspect it if it appears | |
2318 that the body parts are not being interpreted correctly or toggle it | |
2319 with the command @kbd{;} (semicolon; | |
2320 @code{mh-toggle-mh-decode-mime-flag}) to view the raw message. This | |
2321 option also controls the display of quoted-printable messages and | |
2322 other graphical widgets. @xref{Viewing}. | |
2323 | |
2324 @cindex buttons | |
2325 | |
2326 Attachments in MH-E are indicated by @dfn{buttons} like this: | |
2327 | |
2328 @smallexample | |
2329 [1. image/jpeg; foo.jpg]... | |
2330 @end smallexample | |
2331 | |
2332 @findex mh-next-button | |
2333 @findex mh-press-button | |
2334 @findex mh-prev-button | |
2335 @kindex @key{RET} | |
2336 @kindex K @key{TAB} | |
2337 @kindex K S-@key{TAB} | |
2338 @kindex Mouse-1 | |
2339 @kindex Mouse-2 | |
2340 | |
2341 To view the contents of the button, use either @kbd{Mouse-1} or | |
2342 @kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when | |
2343 the cursor is over the button. This command is a toggle so if you use | |
2344 it again on the same attachment, it is hidden. If Emacs does not know | |
2345 how to display the attachment, then Emacs offers to save the | |
2346 attachment in a file. To move the cursor to the next button, use the | |
2347 command @kbd{K @key{TAB}} (@code{mh-next-button}). If the end of the | |
2348 buffer is reached then the search wraps over to the start of the | |
2349 buffer. To move the cursor to the previous button, use the command | |
2350 @kbd{K S-@key{TAB}} (@code{mh-prev-button}). If the beginning of the | |
2351 buffer is reached then the search wraps over to the end of the buffer. | |
2352 | |
2353 @cindex attachments, viewing | |
2354 @cindex viewing attachments | |
2355 @findex mh-folder-toggle-mime-part | |
2356 @kindex K v | |
2357 | |
2358 Another way to view the contents of a button is to use the command | |
2359 @kbd{K v} (@code{mh-folder-toggle-mime-part}). This command displays | |
2360 (or hides) the attachment associated with the button under the cursor. | |
2361 If the cursor is not located over a button, then the cursor first | |
2362 moves to the next button, wrapping to the beginning of the message if | |
2363 necessary. This command has the advantage over the previous commands | |
2364 of working from the MH-Folder buffer. You can also provide a numeric | |
2365 prefix argument (as in @kbd{4 K v}) to view the attachment labeled | |
2366 with that number. If Emacs does not know how to display the | |
2367 attachment, then Emacs offers to save the attachment in a file. | |
2368 | |
2369 @cindex @file{/etc/mailcap} | |
2370 @cindex files, @file{/etc/mailcap} | |
2371 @findex mailcap-mime-info | |
2372 @findex mh-display-with-external-viewer | |
2373 @kindex K e | |
2374 | |
2375 If Emacs does not know how to view an attachment, you could save it | |
2376 into a file and then run some program to open it. It is easier, | |
2377 however, to launch the program directly from MH-E with the command | |
2378 @kbd{K e} (@code{mh-display-with-external-viewer}). While you'll most | |
2379 likely use this to view spreadsheets and documents, it is also useful | |
2380 to use your browser to view HTML attachments with higher fidelity than | |
2381 what Emacs can provide. This command displays the attachment | |
2382 associated with the button under the cursor. If the cursor is not | |
2383 located over a button, then the cursor first moves to the next button, | |
2384 wrapping to the beginning of the message if necessary. You can provide | |
2385 a numeric prefix argument (as in @kbd{4 K e}) to view the attachment | |
2386 labeled with that number. This command tries to provide a reasonable | |
2387 default for the viewer by calling the Emacs function | |
2388 @code{mailcap-mime-info}. This function usually reads the file | |
2389 @file{/etc/mailcap}. | |
2390 | |
2391 @cindex attachments, saving | |
2392 @cindex saving attachments | |
2393 @findex mh-folder-save-mime-part | |
2394 @kindex K o | |
2395 | |
2396 Use the command @kbd{K o} (@code{mh-folder-save-mime-part}) to save | |
2397 attachments (the mnemonic is ``output''). This command saves the | |
2398 attachment associated with the button under the cursor. If the cursor | |
2399 is not located over a button, then the cursor first moves to the next | |
2400 button, wrapping to the beginning of the message if necessary. You can | |
2401 also provide a numeric prefix argument (as in @kbd{3 K o}) to save the | |
2402 attachment labeled with that number. This command prompts you for a | |
2403 filename and suggests a specific name if it is available. | |
2404 | |
2405 @cindex @command{mhn} | |
2406 @cindex @command{mhstore} | |
2407 @cindex MH commands, @command{mhn} | |
2408 @cindex MH commands, @command{mhstore} | |
2409 @findex mh-mime-save-parts | |
2410 @kindex K a | |
2411 @vindex mh-mime-save-parts-default-directory | |
2412 | |
2413 You can save all of the attachments at once with the command @kbd{K a} | |
2414 (@code{mh-mime-save-parts}). The attachments are saved in the | |
2415 directory specified by the option | |
2416 @code{mh-mime-save-parts-default-directory} unless you use a prefix | |
2417 argument (as in @kbd{C-u K a}) in which case you are prompted for the | |
2418 directory. These directories may be superseded by MH profile | |
2419 components, since this function calls on @command{mhstore} | |
2420 (@command{mhn}) to do the work. | |
2421 | |
2422 @vindex mh-mime-save-parts-default-directory | |
2423 | |
2424 The default value for the option | |
2425 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so | |
2426 that you are always prompted for the directory in which to save the | |
2427 attachments. However, if you usually use the same directory within a | |
2428 session, then you can set this option to @samp{Prompt the First Time} | |
2429 to avoid the prompt each time. you can make this directory permanent | |
2430 by choosing @samp{Directory} and entering the directory's name. | |
2431 | |
2432 @cindex attachments, inline | |
2433 @cindex inline attachments | |
2434 @findex mh-toggle-mime-buttons | |
2435 @kindex K t | |
2436 @vindex mh-display-buttons-for-inline-parts-flag | |
2437 | |
2438 The sender can request that attachments should be viewed inline so | |
2439 that they do not really appear like an attachment at all to the | |
2440 reader. Most of the time, this is desirable, so by default MH-E | |
2441 suppresses the buttons for inline attachments. On the other hand, you | |
2442 may receive code or HTML which the sender has added to his message as | |
2443 inline attachments so that you can read them in MH-E. In this case, it | |
2444 is useful to see the buttons so that you know you don't have to cut | |
2445 and paste the code into a file; you can simply save the attachment. If | |
2446 you want to make the buttons visible for inline attachments, you can | |
2447 use the command @kbd{K t} (@code{mh-toggle-mime-buttons}) to toggle | |
2448 the visibility of these buttons. You can turn on these buttons | |
2449 permanently by turning on the option | |
2450 @code{mh-display-buttons-for-inline-parts-flag}. | |
2451 | |
2452 MH-E cannot display all attachments inline however. It can display | |
2453 text (including @sc{html}) and images. | |
2454 | |
2455 @cindex header field, @samp{Content-Disposition:} | |
2456 @cindex inline images | |
2457 @cindex @samp{Content-Disposition:} header field | |
2458 @vindex mh-max-inline-image-height | |
2459 @vindex mh-max-inline-image-width | |
2460 | |
2461 Some older mail programs do not insert the needed | |
2462 plumbing@footnote{This plumbing is the @samp{Content-Disposition:} | |
2463 header field.} to tell MH-E whether to display the attachments inline | |
2464 or not. If this is the case, MH-E will display these images inline if | |
2465 they are smaller than the window. However, you might want to allow | |
2466 larger images to be displayed inline. To do this, you can change the | |
2467 options @code{mh-max-inline-image-width} and | |
2468 @code{mh-max-inline-image-height} from their default value of zero to | |
2469 a large number. The size of your screen is a good choice for these | |
2470 numbers. | |
2471 | |
2472 @cindex alternatives | |
2473 @cindex attachments, alternatives | |
2474 @vindex mh-display-buttons-for-alternatives-flag | |
2475 | |
2476 Sometimes, a mail program will produce multiple alternatives of an | |
2477 attachment in increasing degree of faithfulness to the original | |
2478 content. By default, only the preferred alternative is displayed. If | |
2479 the option @code{mh-display-buttons-for-alternatives-flag} is on, then | |
2480 the preferred part is shown inline and buttons are shown for each of | |
2481 the other alternatives. | |
2482 | |
2483 @vindex mm-discouraged-alternatives | |
2484 | |
2485 Many people prefer to see the @samp{text/plain} alternative rather | |
2486 than the @samp{text/html} alternative. To do this in MH-E, customize | |
2487 the option @code{mm-discouraged-alternatives}, and add | |
2488 @samp{text/html}. The next best alternative, if any, will be shown. | |
2489 | |
97192 | 2490 @findex mh-show-preferred-alternative |
2491 @kindex : (colon) | |
2492 | |
2493 Occasionally, though, you might want to see the preferred alternative. | |
2494 The command @kbd{:} (@code{mh-show-preferred-alternative}) displays | |
2495 the message with the default preferred alternative. This is as if | |
2496 @code{mm-discouraged-alternatives} is set to @samp{nil}. Use the | |
2497 command @key{RET} (@code{mh-show}) to show the message normally again. | |
2498 | |
84306 | 2499 @kindex K i |
2500 @findex mh-folder-inline-mime-part | |
2501 | |
2502 You can view the raw contents of an attachment with the command @kbd{K | |
2503 i} (@code{mh-folder-inline-mime-part}). This command displays (or | |
2504 hides) the contents of the attachment associated with the button under | |
2505 the cursor verbatim. If the cursor is not located over a button, then | |
2506 the cursor first moves to the next button, wrapping to the beginning | |
2507 of the message if necessary. You can also provide a numeric prefix | |
2508 argument (as in @kbd{4 K i}) to view the attachment labeled with that | |
2509 number. | |
2510 | |
2511 For additional information on buttons, see | |
2512 @ifinfo | |
2513 @ref{Article Buttons,,,gnus}, and @ref{MIME Commands,,,gnus}. | |
2514 @end ifinfo | |
2515 @ifnotinfo | |
2516 the chapters @uref{http://www.gnus.org/manual/gnus_101.html#SEC101, | |
2517 Article Buttons} and | |
2518 @uref{http://www.gnus.org/manual/gnus_108.html#SEC108, MIME Commands} | |
2519 in the @cite{The Gnus Manual}. | |
2520 @end ifnotinfo | |
2521 | |
2522 @node HTML, Digests, Viewing Attachments, Reading Mail | |
2523 @section HTML | |
2524 | |
2525 @cindex HTML | |
2526 @cindex Gnus | |
2527 | |
2528 MH-E can display messages that have been sent in HTML@footnote{This | |
2529 feature depends on a version of Gnus that is at least 5.10.}. The | |
2530 content of the message will appear in the MH-Show buffer as you would | |
2531 expect if the entire message is HTML, or there is an inline HTML body | |
2532 part. However, if there is an HTML body part that is an attachment, | |
2533 then you'll see a button like this: | |
2534 | |
2535 @smallexample | |
2536 [1. text/html; foo.html]... | |
2537 @end smallexample | |
2538 | |
2539 To see how to read the contents of this body part, see @ref{Viewing | |
2540 Attachments}. | |
2541 | |
2542 @vindex mm-text-html-renderer | |
2543 | |
2544 The browser that MH-E uses is determined by the option | |
2545 @code{mm-text-html-renderer}. The default setting is set automatically | |
2546 based upon the presence of a known browser on your system. If you wish | |
2547 to use a different browser, then set this option accordingly. See the | |
2548 documentation for the browser you use for additional information on | |
2549 how to use it. In particular, find and disable the option to render | |
2550 images as this can tip off spammers that the email address they have | |
2551 used is valid. | |
2552 | |
2553 @vindex mm-text-html-renderer | |
2554 | |
2555 If you're confused about which @code{mm-text-html-renderer} to use, | |
2556 here's a brief description of each, sorted by popularity, that | |
2557 includes the results of a quick poll of MH-E users from 2005-12-23. | |
2558 | |
2559 @table @asis | |
2560 @cindex browser, @samp{w3m} | |
2561 @cindex @samp{w3m} | |
2562 @kindex Mouse-2 | |
2563 @item @samp{w3m} 7 | |
2564 The @samp{w3m} browser requires an external program. It's quick, | |
2565 produces pretty nice output, and best of all, it's the only browser | |
2566 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
|
2567 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
|
2568 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
|
2569 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
|
2570 would be viewed in Emacs). |
84306 | 2571 @c ------------------------- |
2572 @cindex browser, @samp{w3m-standalone} | |
2573 @cindex @samp{w3m-standalone} | |
2574 @item @samp{w3m-standalone} 3 | |
2575 This browser, along with @samp{nil} for the external browser, are the | |
2576 only choices that work without having to download a separate lisp | |
2577 package or external program. This browser is quick, but does not show | |
2578 links. It handles simple tables but some tables get rendered much | |
2579 wider than the Emacs frame. This browser was the only one not to | |
2580 handle the escape @samp{–} (it printed a @samp{?}), but it did | |
2581 render @samp{®}. | |
2582 @c ------------------------- | |
2583 @cindex browser, @samp{links} | |
2584 @cindex @samp{links} | |
2585 @item @samp{links} 1 | |
2586 The @samp{links} browser requires an external program. It's quick, and | |
2587 produces nicer output than @samp{lynx} on single column mails in | |
2588 tables. However, it doesn't show links and it doesn't do as nice a job | |
2589 on multi-column tables as some lines wrap. At least it fits in 80 | |
2590 columns and thus seems better than @samp{w3} and | |
2591 @samp{w3m-standalone}. Converts escapes such as @samp{®} to (R). | |
2592 @c ------------------------- | |
2593 @cindex browser, @samp{lynx} | |
2594 @cindex @samp{lynx} | |
2595 @item @samp{lynx} 1 | |
2596 The @samp{lynx} browser requires an external program. It's quick and | |
2597 produces pretty decent output but it doesn't show links. It doesn't | |
2598 seem to do multi-column tables which makes output much cleaner. It | |
2599 centers the output and wraps long lines more than most. Handles | |
2600 @samp{®}. | |
2601 @c ------------------------- | |
2602 @item @samp{nil} 1 | |
2603 This choice obviously requires an external browser. Like | |
2604 @samp{w3m-standalone}, it works out of the box. With this setting, | |
2605 HTML messages have a button for the body part which you can view with | |
2606 @kbd{K v} (@code{mh-folder-toggle-mime-part}). | |
2607 @c ------------------------- | |
2608 @cindex browser, @samp{w3} | |
2609 @cindex @samp{w3} | |
2610 @item @samp{w3} 0 | |
2611 This choice does not require an external program as all of the | |
2612 rendering is done in lisp. You do need to get the package separately. | |
2613 This browser is @strong{slow}, and doesn't appear to have been updated | |
2614 since 2001 and the author hasn't responded to my emails. It displays | |
2615 unknown tags instead of hiding them, so you get to see all the | |
2616 Microsoft crap in certain messages. Tends to make multi-column tables | |
2617 wider than even a full-screen Emacs can handle. Like @samp{w3m}, you | |
2618 can follow links, but you have to find them first as they are not | |
2619 highlighted. Performs well on single-column tables and handles escapes | |
2620 such as @samp{®}. | |
2621 @c ------------------------- | |
2622 @cindex browser, @samp{html2text} | |
2623 @cindex @samp{html2text} | |
2624 @item @samp{html2text} 0 | |
2625 The @samp{html2text} browser requires an external program. I noticed | |
2626 that it can do some nasty things with simple HTML mails (like filling | |
2627 the entire message as if it were one paragraph, including signature). | |
2628 On another message, it displayed half of the HTML tags for some | |
2629 reason. | |
2630 @end table | |
2631 | |
2632 @vindex mm-text-html-renderer | |
2633 | |
2634 For a couple more sources of information about | |
2635 @code{mm-text-html-renderer}, | |
2636 @ifinfo | |
2637 @xref{Display Customization,,,emacs-mime}, and the documentation for | |
2638 the Gnus command @kbd{W h} (@pxref{Article Washing,,,gnus},). | |
2639 @end ifinfo | |
2640 @ifnotinfo | |
2641 see section @uref{http://www.gnus.org/manual/emacs-mime_6.html, | |
2642 Display Customization} in the @cite{The Emacs MIME Manual} and the | |
2643 documentation for the Gnus command @kbd{W h} (see section | |
2644 @uref{http://www.gnus.org/manual/gnus_99.html, Article Washing} in the | |
2645 @cite{The Gnus Manual}). | |
2646 @end ifnotinfo | |
2647 | |
84934
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2648 @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
|
2649 @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
|
2650 @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
|
2651 @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
|
2652 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2653 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
|
2654 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
|
2655 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
|
2656 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
|
2657 |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2658 @smalllisp |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2659 (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
|
2660 @end smalllisp |
659f550b9193
(HTML): Mention binding of S-mouse-2 to browse-url-at-mouse.
Bill Wohler <wohler@newt.com>
parents:
84329
diff
changeset
|
2661 |
84306 | 2662 @node Digests, Reading PGP, HTML, Reading Mail |
2663 @section Digests | |
2664 | |
2665 @cindex digests | |
2666 @findex mh-page-digest | |
2667 @findex mh-page-digest-backwards | |
2668 @kindex D @key{BS} | |
2669 @kindex D @key{SPC} | |
2670 @kindex @key{BS} | |
2671 @kindex @key{SPC} | |
2672 | |
2673 A digest is a message that contains other messages. Special MH-E | |
2674 commands let you read digests conveniently. You can use @key{SPC} and | |
2675 @key{BS} to page through the digest as if it were a normal message, | |
2676 but if you wish to skip to the next message in the digest, use | |
2677 @kbd{D @key{SPC}} (@code{mh-page-digest}). To return to a previous message, | |
2678 use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}). | |
2679 | |
2680 @cindex @command{burst} | |
2681 @cindex MH commands, @command{burst} | |
2682 @cindex MH-Folder Show mode | |
2683 @cindex modes, MH-Folder Show | |
2684 @findex mh-burst-digest | |
2685 @kindex d | |
2686 @kindex D b | |
2687 @kindex t | |
2688 | |
2689 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This | |
2690 command uses the MH command @command{burst}@footnote{See the section | |
2691 @uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH | |
2692 book.} to break out each message in the digest into its own message. | |
2693 Using this command, you can quickly delete unwanted messages, like | |
2694 this: Once the digest is split up, toggle out of MH-Folder Show mode | |
2695 with @kbd{t} (@pxref{Folders}) so that the scan lines fill the screen | |
2696 and messages aren't displayed. Then use @kbd{d} (@pxref{Reading Mail}) | |
2697 to quickly delete messages that you don't want to read (based on the | |
2698 @samp{Subject:} header field). You can also burst the digest to reply | |
2699 directly to the people who posted the messages in the digest. One | |
2700 problem you may encounter is that the @samp{From:} header fields are | |
2701 preceded with a @samp{>} so that your reply can't create the | |
2702 @samp{To:} field correctly. In this case, you must correct the | |
2703 @samp{To:} field yourself. This is described later (@pxref{Editing | |
2704 Drafts}). | |
2705 | |
2706 @node Reading PGP, Printing, Digests, Reading Mail | |
2707 @section Signed and Encrypted Messages | |
2708 | |
2709 @cindex GPG | |
2710 @cindex GnuPG | |
2711 @cindex Gnus | |
2712 @cindex OpenPGP | |
2713 @cindex PGP | |
2714 @cindex RFC 3156 | |
2715 @cindex encrypted messages | |
2716 @cindex security | |
2717 @cindex signed messages | |
2718 | |
2719 You can read encrypted or signed PGP or GPG messages with | |
2720 MH-E@footnote{This feature depends on post-5.10 versions of Gnus. | |
2721 @cite{MIME Security with OpenPGP} is documented in | |
2722 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. However, | |
2723 MH-E can also decrypt old-style PGP messages that are not in MIME | |
2724 format.}. This section assumes that you already have a good | |
2725 understanding of GPG and have set up your keys appropriately. | |
2726 | |
2727 If someone sends you a signed message, here is what you'll see: | |
2728 | |
2729 @smallexample | |
2730 @group | |
2731 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]] | |
2732 This is a signed message. | |
2733 | |
2734 [[End of PGP Signed Part]] | |
2735 @end group | |
2736 @end smallexample | |
2737 | |
2738 @cindex keychain | |
2739 @cindex key server | |
2740 @cindex signed messages | |
2741 | |
2742 If the key for the given signature is not in your keychain, you'll be | |
2743 given the opportunity to fetch the key from a key server and verify | |
2744 the key. If the message is really large, the verification process can | |
2745 take a long time. You can press @kbd{C-g} at any time to | |
2746 cancel@footnote{Unfortunately in the current version, the validation | |
2747 process doesn't display a message so it appears that MH-E has hung. We | |
2748 hope that this will be fixed in the future.}. | |
2749 | |
2750 If the signature doesn't check out, you might see something like this: | |
2751 | |
2752 @smallexample | |
2753 @group | |
2754 [[PGP Signed Part:Failed]] | |
2755 This is a signed message. | |
2756 This is garbage added after the signature was made. | |
2757 | |
2758 [[End of PGP Signed Part]] | |
2759 @end group | |
2760 @end smallexample | |
2761 | |
2762 @cindex decrypting messages | |
2763 | |
2764 If someone sends you an encrypted message, MH-E will ask for your | |
2765 passphrase to decrypt the message. You should see something like this: | |
2766 | |
2767 @smallexample | |
2768 @group | |
2769 [[PGP Encrypted Part:OK]] | |
2770 | |
2771 [[PGP Signed Part:Bill Wohler <wohler@@stop.mail-abuse.org>]] | |
2772 This is the secret message. | |
2773 | |
2774 [[End of PGP Signed Part]] | |
2775 | |
2776 [[End of PGP Encrypted Part]] | |
2777 @end group | |
2778 @end smallexample | |
2779 | |
2780 If there is a problem decrypting the message, the button will say: | |
2781 | |
2782 @smallexample | |
2783 [[PGP Encrypted Part:Failed]] | |
2784 @end smallexample | |
2785 | |
2786 You can read the contents of this button using the methods described in | |
2787 @ref{Viewing Attachments}. If the message were corrupted, you'd see | |
2788 this: | |
2789 | |
2790 @smallexample | |
2791 [[PGP Encrypted Part:Failed] | |
2792 Invalid base64 data] | |
2793 @end smallexample | |
2794 | |
2795 If your passphrase were incorrect, you'd see something like this: | |
2796 | |
2797 @smallexample | |
2798 [GNUPG:] ENC_TO CD9C88BB610BD9AD 1 0 | |
2799 [GNUPG:] USERID_HINT CD9C88BB610BD9AD Bill Wohler <wohler@@stop.mail-abuse.org> | |
2800 [GNUPG:] NEED_PASSPHRASE CD9C88BB610BD9AD CD9C88BB610BD9AD 1 0 | |
2801 [GNUPG:] BAD_PASSPHRASE CD9C88BB610BD9AD | |
2802 gpg: encrypted with 1024-bit RSA key, ID 610BD9AD, created 1997-09-09 | |
2803 "Bill Wohler <wohler@@stop.mail-abuse.org>" | |
2804 gpg: public key decryption failed: bad passphrase | |
2805 [GNUPG:] BEGIN_DECRYPTION | |
2806 [GNUPG:] DECRYPTION_FAILED | |
2807 gpg: decryption failed: secret key not available | |
2808 [GNUPG:] END_DECRYPTION | |
2809 | |
2810 gpg exited abnormally: '2' | |
2811 @end smallexample | |
2812 | |
2813 @vindex mh-show-pgg-bad | |
2814 @vindex mh-show-pgg-good | |
2815 @vindex mh-show-pgg-unknown | |
2816 | |
2817 The appearance of the buttons is controlled by the faces | |
2818 @code{mh-show-pgg-good}, @code{mh-show-pgg-bad}, and | |
2819 @code{mh-show-pgg-unknown} depending on the validity of the signature. | |
2820 The latter is used whether the signature is unknown or untrusted. | |
2821 | |
2822 @cindex @samp{pgg} customization group | |
2823 @cindex PGG | |
2824 @cindex customization group, @samp{pgg} | |
2825 | |
2826 The @samp{pgg} customization group may have some settings which may | |
2827 interest you. | |
2828 @iftex | |
2829 See @cite{The PGG Manual}. | |
2830 @end iftex | |
2831 @ifinfo | |
2832 @xref{Top, , The PGG Manual, pgg, The PGG Manual}. | |
2833 @end ifinfo | |
2834 @ifhtml | |
2835 See | |
2836 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html, | |
2837 @cite{The PGG Manual}}. | |
2838 @end ifhtml | |
2839 | |
2840 @node Printing, Files and Pipes, Reading PGP, Reading Mail | |
2841 @section Printing Your Mail | |
2842 | |
2843 @cindex printing | |
2844 @findex mh-ps-print-msg | |
2845 @findex mh-ps-print-msg-file | |
2846 @kindex P f | |
2847 @kindex P p | |
2848 @vindex mh-lpr-command-format | |
2849 @vindex mh-print-background-flag | |
2850 | |
2851 To print messages in MH-E, use the command @kbd{P p} | |
2852 (@code{mh-ps-print-msg}). You can print all the messages in a range | |
2853 (as in @kbd{C-u P p 1 3 5-7 last:5 frombob @key{RET}}, | |
2854 @pxref{Ranges}). You can also send the output to a file with @kbd{P f} | |
2855 (@code{mh-ps-print-msg-file}). This command will print inline text | |
2856 attachments but will not decrypt messages. However, when a message is | |
2857 displayed in an MH-Show buffer, then that buffer is used verbatim for | |
2858 printing with the caveat that only text attachments, if opened inline, | |
2859 are printed. Therefore, encrypted messages can be printed by showing | |
2860 and decrypting them first. The commands @kbd{P p} and @kbd{P f} do not | |
2861 use the options @code{mh-lpr-command-format} or | |
2862 @code{mh-print-background-flag}, described below. | |
2863 | |
2864 @findex mh-ps-print-toggle-color | |
2865 @kindex P C | |
2866 @vindex ps-print-color-p | |
2867 | |
2868 Colors are emulated on black-and-white printers with shades of gray. | |
2869 This might produce illegible output, even if your screen colors only | |
2870 use shades of gray. If this is the case, try using the command @kbd{P | |
2871 C} (@code{mh-ps-print-toggle-color}) to toggle between color, no | |
2872 color, and a black and white representation of the colors and see | |
2873 which works best. You change this setting permanently by customizing | |
2874 the option @code{ps-print-color-p}. | |
2875 | |
2876 @findex mh-ps-print-toggle-faces | |
2877 @kindex P F | |
2878 | |
2879 Another related function is the command @kbd{P F} | |
2880 (@code{mh-ps-print-toggle-faces}). This command toggles between using | |
2881 faces and not. When faces are enabled, the printed message will look | |
2882 very similar to the message in the MH-Show buffer. | |
2883 | |
2884 @cindex ps-print package | |
2885 @cindex Emacs, packages, ps-print | |
2886 | |
2887 MH-E uses the @samp{ps-print} package to do the printing, so you can | |
2888 customize the printing further by going to the @samp{ps-print} | |
2889 customization group. | |
2890 | |
2891 @cindex @command{lpr} | |
2892 @cindex @command{mhl} | |
2893 @cindex MH commands, @command{mhl} | |
2894 @cindex Unix commands, @command{lpr} | |
2895 @findex mh-print-msg | |
2896 @kindex P l | |
2897 | |
2898 An alternative to using the @samp{ps-print} package is the command | |
2899 @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or | |
2900 @i{l}pr). You can print all the messages in a range. The message is | |
2901 formatted with @command{mhl}@footnote{See the section | |
2902 @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH | |
2903 book.} and printed with the @command{lpr} command. | |
2904 | |
2905 @kindex P f | |
2906 @kindex P l | |
2907 @kindex P p | |
2908 @vindex mh-lpr-command-format | |
2909 @vindex mh-print-background-flag | |
2910 | |
2911 The command @kbd{P l} uses two options. The option | |
2912 @code{mh-lpr-command-format} contains the Unix command line which | |
2913 performs the actual printing. The string can contain one escape, | |
2914 @samp{%s}, which is replaced by the name of the folder and the message | |
2915 number and is useful for print job names. The default setting is | |
2916 @code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb | |
2917 -P"} which produces a nice header and adds a bit of margin so the text | |
2918 fits within my printer's margins. Normally messages are printed in the | |
2919 foreground. If this is slow on your system, you may elect to turn on | |
2920 the option @code{mh-print-background-flag} to print in the background. | |
2921 If you do this, do not delete the message until it is printed or else | |
2922 the output may be truncated. These options are not used by the | |
2923 commands @kbd{P p} or @kbd{P f}. | |
2924 | |
2925 @node Files and Pipes, Navigating, Printing, Reading Mail | |
2926 @section Files and Pipes | |
2927 | |
2928 @cindex files | |
2929 @cindex pipes | |
2930 @findex mh-refile-or-write-again | |
2931 @findex mh-write-msg-to-file | |
2932 @kindex > | |
2933 @kindex ! | |
2934 | |
2935 MH-E does offer a couple of commands that are not a part of MH@. The | |
2936 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to | |
2937 a file. You are prompted for the filename. If the file already exists, | |
2938 the message is appended to it. You can also write the message to the | |
2939 file without the header by specifying a prefix argument (such as | |
2940 @kbd{C-u > /tmp/foobar @key{RET}}). Subsequent writes to the same file | |
2941 can be made with the command @kbd{!} | |
2942 (@code{mh-refile-or-write-again}). | |
2943 | |
2944 @findex mh-pipe-msg | |
2945 @kindex | | |
2946 @kindex l | |
2947 | |
2948 You can also pipe the message through a Unix shell command with the | |
2949 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix | |
2950 command through which you wish to run your message. If you give a | |
2951 prefix argument to this command, the message header is included in the | |
2952 text passed to the command (the contrived example @kbd{C-u | lpr} | |
2953 would be done with the @kbd{l} command instead). | |
2954 | |
2955 @cindex @command{shar} | |
2956 @cindex @command{uuencode} | |
2957 @cindex Unix commands, @command{shar} | |
2958 @cindex Unix commands, @command{uuencode} | |
2959 @findex mh-store-msg | |
2960 @kindex X s | |
2961 @vindex mh-store-default-directory | |
2962 | |
2963 If the message is a shell archive @command{shar} or has been run | |
2964 through @command{uuencode} use @kbd{X s} (@code{mh-store-msg}) to | |
2965 extract the body of the message. The default directory for extraction | |
2966 is the current directory; however, you have a chance to specify a | |
2967 different extraction directory. The next time you use this command, | |
2968 the default directory is the last directory you used. If you would | |
2969 like to change the initial default directory, customize the option | |
2970 @code{mh-store-default-directory}, change the value from | |
2971 @samp{Current} to @samp{Directory}, and then enter the name of the | |
2972 directory for storing the content of these messages. | |
2973 | |
2974 @findex mh-store-buffer | |
2975 @kindex @key{RET} | |
2976 @kindex X s | |
2977 | |
2978 By the way, @kbd{X s} calls the Emacs Lisp function | |
2979 @code{mh-store-buffer}. I mention this because you can use it directly | |
2980 if you're editing a buffer that contains a file that has been run | |
2981 through @command{uuencode} or @command{shar}. For example, you can | |
2982 extract the contents of the current buffer in your home directory by | |
2983 typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}. | |
2984 | |
2985 @node Navigating, Miscellaneous Commands and Options, Files and Pipes, Reading Mail | |
2986 @section Navigating | |
2987 | |
2988 @cindex moving between messages | |
2989 @cindex navigation | |
2990 @findex mh-first-msg | |
2991 @findex mh-goto-msg | |
2992 @findex mh-last-msg | |
2993 @findex mh-next-undeleted-msg | |
2994 @findex mh-next-unread-msg | |
2995 @findex mh-previous-undeleted-msg | |
2996 @findex mh-previous-unread-msg | |
2997 @kindex g | |
2998 @kindex M-< | |
2999 @kindex M-> | |
3000 @kindex M-n | |
3001 @kindex M-p | |
3002 @kindex n | |
3003 @kindex p | |
3004 | |
3005 To move on to the next message, use the command @kbd{n} | |
3006 (@code{mh-next-undeleted-msg}); use @kbd{p} | |
3007 (@code{mh-previous-undeleted-msg}) to read the previous message. To | |
3008 move to the next unread message, use @kbd{M-n} | |
3009 (@code{mh-next-unread-msg}); use @kbd{M-p} | |
3010 (@code{mh-previous-unread-msg}) to move to the previous unread | |
3011 message. These commands can be given a prefix argument to specify how | |
3012 many messages to skip (for example, @kbd{5 n}). You can also move to a | |
3013 specific message with @kbd{g} (@code{mh-goto-msg}). You can enter the | |
3014 message number either before or after typing @kbd{g}. In the latter | |
3015 case, Emacs prompts you. Finally, you can go to the first or last | |
3016 message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->} | |
3017 (@code{mh-last-msg}) respectively. | |
3018 | |
3019 @cindex MH-Folder mode | |
3020 @cindex modes, MH-Folder | |
3021 @findex next-line | |
3022 @findex previous-line | |
3023 @kindex C-n | |
3024 @kindex C-p | |
3025 @kindex @key{RET} | |
3026 | |
3027 You can also use the Emacs commands @kbd{C-p} (@code{previous-line}) | |
3028 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in | |
3029 the MH-Folder window. These commands can be used in conjunction with | |
3030 @key{RET} to look at deleted or refiled messages. | |
3031 | |
3032 @cindex deleting messages | |
3033 @findex mh-delete-msg | |
3034 @kindex d | |
3035 @kindex n | |
3036 @kindex p | |
3037 | |
3038 To mark a message for deletion, use the command @kbd{d} | |
3039 (@code{mh-delete-msg}). A @samp{D} is placed by the message in the | |
3040 scan window, and the next undeleted message is displayed. If the | |
3041 previous command had been @kbd{p}, then the next message displayed is | |
3042 the first undeleted message previous to the message just deleted. Use | |
3043 @kbd{n} to force subsequent @kbd{d} commands to move forward to the | |
3044 next undeleted message after deleting the message under the cursor. | |
3045 You may also specify a range (for example, @kbd{C-u d 1 3 5-7 last:5 | |
3046 frombob @key{RET}}, @pxref{Ranges}). | |
3047 | |
3048 @findex mh-delete-msg-no-motion | |
3049 @kindex C-d | |
3050 | |
3051 The command @kbd{C-d} (@code{mh-delete-msg-no-motion}) marks the | |
3052 message (or messages in range) for deletion but leaves the cursor at | |
3053 the current message in case you wish to perform other operations on | |
3054 the message. | |
3055 | |
3056 @findex mh-delete-subject | |
3057 @findex mh-delete-subject-or-thread | |
3058 @findex mh-thread-delete | |
3059 @findex mh-undo | |
3060 @kindex k | |
3061 @kindex T d | |
3062 @kindex u | |
3063 | |
3064 And to delete more messages faster, you can use @kbd{k} | |
3065 (@code{mh-delete-subject-or-thread}) to delete all the messages with | |
3066 the same subject as the current message. This command puts these | |
3067 messages in a sequence named @samp{subject}. You can undo this action | |
3068 by using @kbd{u} (@code{mh-undo}) with a prefix argument and then | |
3069 specifying the @samp{subject} sequence. However, if the buffer is | |
3070 displaying a threaded view of the folder then @kbd{k} behaves like | |
3071 @kbd{T d} (@code{mh-thread-delete}). @xref{Threading}. | |
3072 | |
3073 @findex mh-execute-commands | |
3074 @kindex x | |
3075 | |
3076 However you mark a message for deletion, the command @kbd{x} | |
3077 (@code{mh-execute-commands}) actually carries out the deletion | |
3078 (@pxref{Folders}). | |
3079 | |
3080 @vindex mh-delete-msg-hook | |
3081 | |
3082 The hook @code{mh-delete-msg-hook} is called after you mark a message | |
3083 for deletion. For example, a past maintainer of MH-E used this once | |
3084 when he kept statistics on his mail usage. | |
3085 | |
3086 @node Miscellaneous Commands and Options, , Navigating, Reading Mail | |
3087 @section Miscellaneous Commands and Options | |
3088 | |
3089 This section contains a few more miscellaneous commands and options. | |
3090 | |
3091 @cindex editing message | |
3092 @findex mh-modify | |
3093 @kindex M | |
3094 | |
3095 There are times when you need to edit a message. For example, you may | |
3096 need to fix a broken Content-Type header field. You can do this with | |
3097 the command @kbd{M} (@code{mh-modify}). It displays the raw message in | |
3098 an editable buffer. When you are done editing, save and kill the | |
3099 buffer as you would any other. | |
3100 | |
3101 @findex mh-kill-folder | |
3102 @findex mh-pack-folder | |
3103 @vindex mh-do-not-confirm-flag | |
3104 | |
3105 Commands such as @code{mh-pack-folder} prompt to confirm whether to | |
3106 process outstanding moves and deletes or not before continuing. | |
3107 Turning on the option @code{mh-do-not-confirm-flag} means that these | |
3108 actions will be performed---which is usually desired but cannot be | |
3109 retracted---without question@footnote{In previous versions of MH-E, | |
3110 this option suppressed the confirmation in @code{mh-kill-folder}. | |
3111 Since this kept most users from setting this option, | |
3112 @code{mh-kill-folder} was modified in version 6.0 to always ask for | |
3113 confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}. | |
3114 @xref{Folders}.}. | |
3115 | |
3116 @cindex MH-Folder mode | |
3117 @cindex modes, MH-Folder | |
3118 @vindex mh-summary-height | |
3119 | |
3120 The option @code{mh-summary-height} controls the number of scan lines | |
3121 displayed in the MH-Folder window, including the mode line. The | |
3122 default value of this option is @samp{Automatic} which means that the | |
3123 MH-Folder buffer will maintain the same proportional size if the frame | |
3124 is resized. If you'd prefer a fixed height, then choose the | |
3125 @samp{Fixed Size} option and enter the number of lines you'd like to | |
3126 see. | |
3127 | |
3128 @vindex mh-bury-show-buffer-flag | |
3129 | |
3130 Normally the buffer for displaying messages is buried at the bottom at | |
3131 the buffer stack. You may wish to disable this feature by turning off | |
3132 the option @code{mh-bury-show-buffer-flag}. One advantage of not | |
3133 burying the show buffer is that one can delete the show buffer more | |
3134 easily in an electric buffer list because of its proximity to its | |
3135 associated MH-Folder buffer. Try running @kbd{M-x | |
3136 electric-buffer-list} to see what I mean. | |
3137 | |
3138 @cindex @file{.emacs} | |
3139 @cindex files, @file{.emacs} | |
3140 @cindex reading mail | |
3141 | |
3142 Before we leave this section, I'll include a function that I use as a | |
3143 front end to MH-E@footnote{Stephen Gildea's favorite binding is | |
3144 @kbd{(global-set-key "\C-cr" 'mh-rmail)}.}. It toggles between your | |
3145 working window configuration, which may be quite involved---windows | |
3146 filled with source, compilation output, man pages, and other | |
3147 documentation---and your MH-E window configuration. Like the rest of | |
3148 the customization described in this section, simply add the following | |
3149 code to @file{~/.emacs}. | |
3150 | |
3151 @iftex | |
3152 @filbreak | |
3153 @end iftex | |
3154 | |
3155 @findex mh-rmail, example | |
3156 | |
3157 @smalllisp | |
3158 @group | |
3159 (defvar my-mh-screen-saved nil | |
3160 "Set to non-@code{nil} when MH-E window configuration shown.") | |
3161 (defvar my-normal-screen nil "Normal window configuration.") | |
3162 (defvar my-mh-screen nil "MH-E window configuration.") | |
3163 | |
3164 (defun my-mh-rmail (&optional arg) | |
3165 "Toggle between MH-E and normal screen configurations. | |
3166 With non-@code{nil} or prefix argument, @i{inc} mailbox as well | |
3167 when going into mail." | |
3168 (interactive "P") ; @r{user callable function, P=prefix arg} | |
3169 (setq my-mh-screen-saved ; @r{save state} | |
3170 (cond | |
3171 ;; @r{Bring up MH-E screen if arg or normal window configuration.} | |
3172 ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.} | |
3173 ((or arg (null my-mh-screen-saved)) | |
3174 (setq my-normal-screen (current-window-configuration)) | |
3175 (if (or arg (null (get-buffer "+inbox"))) | |
3176 (mh-rmail) | |
3177 (set-window-configuration my-mh-screen)) | |
3178 t) ; @r{set my-mh-screen-saved to @code{t}} | |
3179 ;; @r{Otherwise, save MH-E screen and restore normal screen.} | |
3180 (t | |
3181 (setq my-mh-screen (current-window-configuration)) | |
3182 (set-window-configuration my-normal-screen) | |
3183 nil)))) ; @r{set my-mh-screen-saved to nil} | |
3184 | |
3185 (global-set-key "\C-x\r" 'my-mh-rmail) ;@r{ call with C-x @key{RET}} | |
3186 | |
3187 @i{Starting MH-E} | |
3188 | |
3189 @end group | |
3190 @end smalllisp | |
3191 | |
3192 If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved} is | |
3193 @code{nil} (meaning a non-MH-E window configuration), the current | |
3194 window configuration is saved, either the @samp{+inbox} buffer is | |
3195 displayed or @code{mh-rmail} is run, and the MH-E window configuration | |
3196 is shown. Otherwise, the MH-E window configuration is saved and the | |
3197 original configuration is displayed. | |
3198 | |
3199 @node Folders, Sending Mail, Reading Mail, Top | |
3200 @chapter Organizing Your Mail with Folders | |
3201 | |
3202 @cindex @samp{Folder} menu | |
3203 @cindex @samp{Message} menu | |
3204 @cindex folders | |
3205 @cindex menu, @samp{Folder} | |
3206 @cindex menu, @samp{Message} | |
3207 @cindex using folders | |
3208 | |
3209 This chapter discusses the things you can do with folders within MH-E. | |
3210 The commands in this chapter are also found in the @samp{Folder} and | |
3211 @samp{Message} menus. | |
3212 | |
3213 @table @kbd | |
3214 @kindex ? | |
3215 @findex mh-help | |
3216 @item ? | |
3217 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
3218 @c ------------------------- | |
3219 @kindex ! | |
3220 @findex mh-refile-or-write-again | |
3221 @item ! | |
3222 Repeat last output command (@code{mh-refile-or-write-again}). | |
3223 @c ------------------------- | |
3224 @cindex @samp{Message > Copy Message to Folder...} menu item | |
3225 @cindex menu item, @samp{Message > Copy Message to Folder...} | |
3226 @kindex c | |
3227 @findex mh-copy-msg | |
3228 @item c | |
3229 Copy range to folder (@code{mh-copy-msg}). | |
3230 @c ------------------------- | |
3231 @kindex F ? | |
3232 @findex mh-prefix-help | |
3233 @item F ? | |
3234 Display cheat sheet for the commands of the current prefix in | |
3235 minibuffer (@code{mh-prefix-help}). | |
3236 @c ------------------------- | |
3237 @kindex F ' | |
3238 @findex mh-index-ticked-messages | |
3239 @item F ' | |
3240 Display ticked messages (@code{mh-index-ticked-messages}). | |
3241 @c ------------------------- | |
3242 @kindex F c | |
3243 @findex mh-catchup | |
3244 @item F c | |
3245 Delete range from the @samp{unseen} sequence (@code{mh-catchup}). | |
3246 @c ------------------------- | |
3247 @kindex F k | |
3248 @findex mh-kill-folder | |
3249 @item F k | |
3250 Remove folder (@code{mh-kill-folder}). | |
3251 @c ------------------------- | |
3252 @cindex @samp{Folder > List Folders} menu item | |
3253 @cindex menu item, @samp{Folder > List Folders} | |
3254 @kindex F l | |
3255 @findex mh-list-folders | |
3256 @item F l | |
3257 List all folders (@code{mh-list-folders}). | |
3258 @c ------------------------- | |
3259 @cindex @samp{Folder > View New Messages} menu item | |
3260 @cindex menu item, @samp{Folder > View New Messages} | |
3261 @kindex F n | |
3262 @findex mh-index-new-messages | |
3263 @item F n | |
3264 Display unseen messages (@code{mh-index-new-messages}). | |
3265 @c ------------------------- | |
3266 @cindex @samp{Folder > Pack Folder} menu item | |
3267 @cindex menu item, @samp{Folder > Pack Folder} | |
3268 @kindex F p | |
3269 @findex mh-pack-folder | |
3270 @item F p | |
3271 Pack folder (@code{mh-pack-folder}). | |
3272 @c ------------------------- | |
3273 @kindex F q | |
3274 @findex mh-index-sequenced-messages | |
3275 @item F q | |
3276 Display messages in any sequence (@code{mh-index-sequenced-messages}). | |
3277 @c ------------------------- | |
3278 @cindex @samp{Folder > Rescan Folder} menu item | |
3279 @cindex menu item, @samp{Folder > Rescan Folder} | |
3280 @kindex F r | |
3281 @findex mh-rescan-folder | |
3282 @item F r | |
3283 Rescan folder (@code{mh-rescan-folder}). | |
3284 @c ------------------------- | |
3285 @cindex @samp{Folder > Search...} menu item | |
3286 @cindex menu item, @samp{Folder > Search...} | |
3287 @kindex F s | |
3288 @findex mh-search | |
3289 @item F s | |
3290 Search your MH mail (@code{mh-search}). | |
3291 @c ------------------------- | |
3292 @cindex @samp{Folder > Sort Folder} menu item | |
3293 @cindex menu item, @samp{Folder > Sort Folder} | |
3294 @kindex F S | |
3295 @findex mh-sort-folder | |
3296 @item F S | |
3297 Sort folder (@code{mh-sort-folder}). | |
3298 @c ------------------------- | |
3299 @kindex F u | |
3300 @findex mh-undo-folder | |
3301 @item F u | |
3302 Undo all refiles and deletes in the current folder (@code{mh-undo-folder}). | |
3303 @c ------------------------- | |
3304 @cindex @samp{Folder > Visit a Folder...} menu item | |
3305 @cindex menu item, @samp{Folder > Visit a Folder...} | |
3306 @kindex F v | |
3307 @findex mh-visit-folder | |
3308 @item F v | |
3309 Visit folder (@code{mh-visit-folder}). | |
3310 @c ------------------------- | |
3311 @cindex @samp{Message > Refile Message} menu item | |
3312 @cindex menu item, @samp{Message > Refile Message} | |
3313 @kindex o | |
3314 @findex mh-refile-msg | |
3315 @item o | |
3316 Refile (output) range into folder (@code{mh-refile-msg}). | |
3317 @c ------------------------- | |
3318 @cindex @samp{Folder > Quit MH-E} menu item | |
3319 @cindex menu item, @samp{Folder > Quit MH-E} | |
3320 @kindex q | |
3321 @findex mh-quit | |
3322 @item q | |
3323 Quit the current MH-E folder (@code{mh-quit}). | |
3324 @c ------------------------- | |
3325 @cindex @samp{Folder > Toggle Show/Folder} menu item | |
3326 @cindex menu item, @samp{Folder > Toggle Show/Folder} | |
3327 @kindex t | |
3328 @findex mh-toggle-showing | |
3329 @item t | |
3330 Toggle between MH-Folder and MH-Folder Show modes | |
3331 (@code{mh-toggle-showing}). | |
3332 @c ------------------------- | |
3333 @cindex @samp{Message > Undo Delete/Refile} menu item | |
3334 @cindex menu item, @samp{Message > Undo Delete/Refile} | |
3335 @kindex u | |
3336 @findex mh-undo | |
3337 @item u | |
3338 Undo pending deletes or refiles in range (@code{mh-undo}). | |
3339 @c ------------------------- | |
3340 @cindex @samp{Message > Execute Delete/Refile} menu item | |
3341 @cindex menu item, @samp{Message > Execute Delete/Refile} | |
3342 @kindex x | |
3343 @findex mh-execute-commands | |
3344 @item x | |
3345 Process outstanding delete and refile requests | |
3346 (@code{mh-execute-commands}). | |
3347 @end table | |
3348 | |
3349 @cindex @samp{mh-folder} customization group | |
3350 @cindex customization group, @samp{mh-folder} | |
3351 | |
3352 The @samp{mh-folder} customization group is used to tune these | |
3353 commands. | |
3354 | |
3355 @vtable @code | |
3356 @item mh-new-messages-folders | |
3357 Folders searched for the @samp{unseen} sequence (default: | |
3358 @code{Inbox}). | |
3359 @c ------------------------- | |
3360 @item mh-ticked-messages-folders | |
3361 Folders searched for @code{mh-tick-seq} (default: @code{t}). | |
3362 @c ------------------------- | |
3363 @item mh-large-folder | |
3364 The number of messages that indicates a large folder (default: 200). | |
3365 @c ------------------------- | |
3366 @item mh-recenter-summary-flag | |
3367 On means to recenter the summary window (default: @samp{off}). | |
3368 @c ------------------------- | |
3369 @item mh-recursive-folders-flag | |
3370 On means that commands which operate on folders do so recursively | |
3371 (default: @samp{off}). | |
3372 @c ------------------------- | |
3373 @item mh-sortm-args | |
3374 Additional arguments for @command{sortm} (default: @code{nil}). | |
3375 @end vtable | |
3376 | |
3377 The following hooks are available. | |
3378 | |
3379 @vtable @code | |
3380 @item mh-after-commands-processed-hook | |
3381 Hook run by @kbd{x} after performing outstanding refile and delete | |
3382 requests (default: @code{nil}). | |
3383 @c ------------------------- | |
3384 @item mh-before-commands-processed-hook | |
3385 Hook run by @kbd{x} before performing outstanding refile and delete | |
3386 requests (default: @code{nil}). | |
3387 @c ------------------------- | |
3388 @item mh-before-quit-hook | |
3389 Hook run by q before quitting MH-E (default: @code{nil}). | |
3390 @c ------------------------- | |
3391 @item mh-folder-mode-hook | |
3392 Hook run by @code{mh-folder-mode} when visiting a new folder (default: | |
3393 @code{nil}). | |
3394 @c ------------------------- | |
3395 @item mh-kill-folder-suppress-prompt-hook | |
3396 Abnormal hook run at the beginning of @code{mh-kill-folder} (default: | |
3397 @code{'mh-search-p}). | |
3398 @c ------------------------- | |
3399 @item mh-quit-hook | |
3400 Hook run by q after quitting MH-E (default: @code{nil}). | |
3401 @c ------------------------- | |
3402 @item mh-refile-msg-hook | |
3403 Hook run by o after marking each message for refiling (default: | |
3404 @code{nil}). | |
3405 @end vtable | |
3406 | |
3407 The following faces are available for customizing the appearance of | |
3408 the MH-Folder buffer. @xref{Scan Line Formats}. | |
3409 | |
3410 @vtable @code | |
3411 @item mh-folder-address | |
3412 Recipient face. | |
3413 @c ------------------------- | |
3414 @item mh-folder-body | |
3415 Body text face. | |
3416 @c ------------------------- | |
3417 @item mh-folder-cur-msg-number | |
3418 Current message number face. | |
3419 @c ------------------------- | |
3420 @item mh-folder-date | |
3421 Date face. | |
3422 @c ------------------------- | |
3423 @item mh-folder-deleted | |
3424 Deleted message face. | |
3425 @c ------------------------- | |
3426 @item mh-folder-followup | |
3427 @samp{Re:} face. | |
3428 @c ------------------------- | |
3429 @item mh-folder-msg-number | |
3430 Message number face. | |
3431 @c ------------------------- | |
3432 @item mh-folder-refiled | |
3433 Refiled message face. | |
3434 @c ------------------------- | |
3435 @vindex mh-scan-format-nmh | |
3436 @vindex mh-scan-sent-to-me-sender-regexp | |
3437 @item mh-folder-sent-to-me-hint | |
3438 Fontification hint face in messages sent directly to us. The detection | |
3439 of messages sent to us is governed by the scan format | |
3440 @code{mh-scan-format-nmh} and regular expression | |
3441 @code{mh-scan-sent-to-me-sender-regexp}. | |
3442 @c ------------------------- | |
3443 @vindex mh-scan-format-nmh | |
3444 @vindex mh-scan-sent-to-me-sender-regexp | |
3445 @item mh-folder-scan-format | |
3446 Sender face in messages sent directly to us. The detection of messages | |
3447 sent to us is governed by the scan format @code{mh-scan-format-nmh} | |
3448 and regular expression @code{mh-scan-sent-to-me-sender-regexp}. | |
3449 @c ------------------------- | |
3450 @item mh-folder-subject | |
3451 Subject face. | |
3452 @c ------------------------- | |
3453 @item mh-folder-tick | |
3454 Ticked message face. | |
3455 @c ------------------------- | |
3456 @item mh-folder-to | |
3457 @samp{To:} face. | |
3458 @end vtable | |
3459 | |
3460 @vindex mh-folder-mode-hook | |
3461 | |
3462 The hook @code{mh-folder-mode-hook} is called when visiting a new | |
3463 folder in MH-Folder mode. This could be used to set your own key | |
3464 bindings, for example: | |
3465 | |
3466 @vindex mh-folder-mode-hook, example | |
3467 | |
3468 @smalllisp | |
3469 @group | |
3470 (defvar my-mh-init-done nil | |
3471 "Non-@code{nil} when one-time MH-E settings made.") | |
3472 | |
3473 (defun my-mh-folder-mode-hook () | |
3474 "Hook to set key bindings in MH-Folder mode." | |
3475 (if (not my-mh-init-done) ; @r{only need to bind the keys once } | |
3476 (progn | |
3477 (local-set-key "//" 'my-search-msg) | |
3478 (local-set-key "b" 'mh-burst-digest) ; @r{better use of @kbd{b}} | |
3479 (setq my-mh-init-done t)))) | |
3480 | |
3481 (add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook) | |
3482 | |
3483 (defun my-search-msg () | |
3484 "Search for a regexp in the current message." | |
3485 (interactive) ; @r{user function} | |
3486 (save-window-excursion | |
3487 (other-window 1) ; @r{go to next window} | |
3488 (isearch-forward-regexp))) ; @r{string search; hit return} | |
3489 ; @r{ when done} | |
3490 | |
3491 @i{Create additional key bindings via mh-folder-mode-hook} | |
3492 | |
3493 @end group | |
3494 @end smalllisp | |
3495 | |
3496 @cindex @command{folder} | |
3497 @cindex @command{refile} | |
3498 @cindex MH commands, @command{folder} | |
3499 @cindex MH commands, @command{refile} | |
3500 @findex mh-refile-msg | |
3501 @kindex o | |
3502 @vindex mh-refile-msg-hook | |
3503 | |
3504 MH-E has analogies for each of the MH @command{folder} and | |
3505 @command{refile} commands@footnote{See the sections | |
3506 @uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder: | |
3507 folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and | |
3508 Linking Messages: refile} in the MH book.}. To refile a message in | |
3509 another folder, use the command @kbd{o} (@code{mh-refile-msg}) | |
3510 (mnemonic: ``output''). You are prompted for the folder name | |
3511 (@pxref{Folder Selection}). Note that this command can also be used to | |
3512 create folders. If you specify a folder that does not exist, you will | |
3513 be prompted to create it. The hook @code{mh-refile-msg-hook} is called | |
3514 after a message is marked to be refiled. | |
3515 | |
3516 @findex mh-write-msg-to-file | |
3517 @kindex ! | |
3518 | |
3519 If you are refiling several messages into the same folder, you can use | |
3520 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the | |
3521 last refile or write (for the description of @kbd{>} | |
3522 (@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a | |
3523 range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob | |
3524 @key{RET}}, @pxref{Ranges}). | |
3525 | |
3526 @cindex expunging refiles and deletes | |
3527 @cindex undoing refiles and deletes | |
3528 @findex mh-undo | |
3529 @kindex u | |
3530 | |
3531 If you've deleted a message or refiled it, but changed your mind, you | |
3532 can cancel the action before you've executed it. Use @kbd{u} | |
3533 (@code{mh-undo}) to undo a refile on or deletion of a single message. | |
3534 You can also undo refiles and deletes for messages that are found in a | |
3535 given range (@pxref{Ranges}). | |
3536 | |
3537 @findex mh-undo-folder | |
3538 @kindex F u | |
3539 | |
3540 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo | |
3541 all refiles and deletes in the current folder. | |
3542 | |
3543 @findex mh-execute-commands | |
3544 @kindex x | |
3545 | |
3546 If you've marked messages to be deleted or refiled and you want to go | |
3547 ahead and delete or refile the messages, use @kbd{x} | |
3548 (@code{mh-execute-commands}). Many MH-E commands that may affect the | |
3549 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if | |
3550 you want to process refiles or deletes first and then either run | |
3551 @kbd{x} for you or undo the pending refiles and deletes. | |
3552 | |
3553 @kindex x | |
3554 @vindex mh-after-commands-processed-hook | |
3555 @vindex mh-before-commands-processed-hook | |
97192 | 3556 @vindex mh-current-folder |
84306 | 3557 |
3558 The command @kbd{x} runs @code{mh-before-commands-processed-hook} | |
3559 before the commands are processed and | |
3560 @code{mh-after-commands-processed-hook} after the commands are | |
3561 processed. Variables that are useful with the former hook include | |
3562 @code{mh-delete-list} and @code{mh-refile-list} which can be used to | |
3563 see which changes will be made to the current folder, | |
3564 @code{mh-current-folder}. Variables that are useful with the latter | |
3565 hook include @code{mh-folders-changed}, which lists which folders were | |
3566 affected by deletes and refiles. This list will always include the | |
3567 current folder @code{mh-current-folder}. | |
3568 | |
3569 @findex mh-copy-msg | |
3570 @kindex c | |
3571 @kindex o | |
3572 | |
3573 If you wish to copy a message to another folder, you can use the | |
3574 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument | |
3575 to @command{refile}(1)). Like the command @kbd{o}, this command | |
3576 prompts you for the name of the target folder and you can specify a | |
3577 range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy | |
3578 takes place immediately. The original copy remains in the current | |
3579 folder. | |
3580 | |
3581 @cindex junk mail | |
3582 @cindex MH-Folder mode | |
3583 @cindex MH-Folder Show mode | |
3584 @cindex modes, MH-Folder | |
3585 @cindex modes, MH-Folder Show | |
3586 @cindex spam | |
3587 @findex mh-toggle-showing | |
3588 @kindex t | |
3589 | |
3590 The command @kbd{t} (@code{mh-toggle-showing}) switches between | |
3591 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards, | |
3592 this is implemented as an Emacs minor mode.}. MH-Folder mode turns off | |
3593 the associated show buffer so that you can perform operations on the | |
3594 messages quickly without reading them. This is an excellent way to | |
3595 prune out your junk mail or to refile a group of messages to another | |
3596 folder for later examination. | |
3597 | |
3598 @cindex MH-Folder mode | |
3599 @cindex MH-Show mode | |
3600 @cindex modes, MH-Folder | |
3601 @cindex modes, MH-Show | |
3602 @cindex moving between messages | |
3603 @kindex t | |
3604 @vindex mh-recenter-summary-flag | |
3605 | |
3606 When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder | |
3607 mode, the MH-Show buffer is hidden and the MH-Folder buffer is left | |
3608 alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil} | |
3609 value causes the toggle to display as many scan lines as possible, | |
3610 with the cursor at the middle. The effect of | |
3611 @code{mh-recenter-summary-flag} is rather useful, but it can be | |
3612 annoying on a slow network connection. | |
3613 | |
3614 @findex mh-visit-folder | |
3615 @kindex F v | |
3616 @vindex mh-large-folder | |
3617 | |
3618 When you want to read the messages that you have refiled into folders, | |
3619 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the | |
3620 folder. You are prompted for the folder name. The folder buffer will | |
3621 show just unseen messages if there are any; otherwise, it will show | |
3622 all the messages in the buffer as long there are fewer than | |
3623 @code{mh-large-folder} messages. If there are more, then you are | |
3624 prompted for a range of messages to scan. You can provide a prefix | |
3625 argument in order to specify a range of messages to show when you | |
3626 visit the folder (@pxref{Ranges}). In this case, regions are not used | |
3627 to specify the range and @code{mh-large-folder} is ignored. Note that | |
3628 this command can also be used to create folders. If you specify a | |
3629 folder that does not exist, you will be prompted to create it. | |
3630 | |
3631 @findex mh-search | |
3632 @kindex F s | |
3633 | |
3634 If you forget where you've refiled your messages, you can find them | |
3635 using @kbd{F s} (@code{mh-search}). @xref{Searching}. | |
3636 | |
3637 @cindex @command{procmail} | |
3638 @cindex @samp{unseen} sequence | |
3639 @cindex sequence, @samp{unseen} | |
3640 @cindex Unix commands, @command{procmail} | |
3641 @cindex unseen messages, viewing | |
3642 @findex mh-index-new-messages | |
3643 @kindex F n | |
3644 @vindex mh-new-messages-folders | |
3645 | |
3646 If you use a program such as @command{procmail} to file your incoming | |
3647 mail automatically, you can display new, unseen, messages using the | |
3648 command @kbd{F n} (@code{mh-index-new-messages}). All messages in the | |
3649 @samp{unseen} sequence from the folders in | |
3650 @code{mh-new-messages-folders} are listed. However, this list of | |
3651 folders can be overridden with a prefix argument: with a prefix | |
3652 argument, enter a space-separated list of folders, or nothing to | |
3653 search all folders. | |
3654 | |
3655 @cindex @samp{tick} sequence | |
3656 @cindex sequence, @samp{tick} | |
3657 @cindex ticked messages, viewing | |
3658 @findex mh-index-ticked-messages | |
3659 @kindex F ' | |
3660 @vindex mh-ticked-messages-folders | |
3661 | |
3662 If you have ticked messages (@pxref{Sequences}), you can display them | |
3663 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All | |
3664 messages in the @samp{tick} sequence from the folders in | |
3665 @code{mh-ticked-messages-folders} are listed. With a prefix argument, | |
3666 enter a space-separated list of folders, or nothing to search all | |
3667 folders. | |
3668 | |
3669 @findex mh-index-sequenced-messages | |
3670 @kindex F q | |
3671 @vindex mh-new-messages-folders | |
3672 | |
3673 You can display messages in any sequence with the command @kbd{F q} | |
3674 (@code{mh-index-sequenced-messages}). All messages from the folders in | |
3675 @code{mh-new-messages-folders} in the sequence you provide are listed. | |
3676 With a prefix argument, enter a space-separated list of folders at the | |
3677 prompt, or nothing to search all folders. | |
3678 | |
3679 @vindex mh-new-messages-folders | |
3680 @vindex mh-recursive-folders-flag | |
3681 @vindex mh-ticked-messages-folders | |
3682 | |
3683 Set the options @code{mh-new-messages-folders} and | |
3684 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the | |
3685 @samp{+inbox} folder or @samp{All} to search all of the top level | |
3686 folders. Otherwise, list the folders that should be searched with the | |
3687 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}. | |
3688 | |
3689 @cindex buffers, @samp{*MH-E Folders*} | |
3690 @cindex @samp{*MH-E Folders*} | |
3691 @findex mh-kill-folder | |
3692 @findex mh-list-folders | |
3693 @findex mh-pack-folder | |
3694 @findex mh-rescan-folder | |
3695 @findex mh-sort-folder | |
3696 @kindex F k | |
3697 @kindex F l | |
3698 @kindex F p | |
3699 @kindex F r | |
3700 @kindex F S | |
3701 | |
3702 Other commands you can perform on folders include: @kbd{F l} | |
3703 (@code{mh-list-folders}), to place a listing of all the folders in | |
3704 your mail directory in a buffer called @samp{*MH-E Folders*} | |
3705 (@pxref{Miscellaneous}); @kbd{F k} (@code{mh-kill-folder}), to remove | |
3706 a folder; @kbd{F S} (@code{mh-sort-folder}), to sort the messages by | |
3707 date (see @command{sortm}(1) to see how to sort by other criteria); | |
3708 @kbd{F p} (@code{mh-pack-folder}), to pack a folder, removing gaps | |
3709 from the numbering sequence; and @kbd{F r} (@code{mh-rescan-folder}), | |
3710 to rescan the folder, which is useful to grab all messages in your | |
3711 @samp{+inbox} after processing your new mail for the first time. If | |
3712 you don't want to rescan the entire folder, the commands @kbd{F r} or | |
3713 @kbd{F p} will accept a range (@pxref{Ranges}). | |
3714 | |
3715 @kindex @key{TAB} | |
3716 @vindex mh-recursive-folders-flag | |
3717 | |
3718 By default, operations on folders work only one level at a time. Set | |
3719 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all | |
3720 folders. This mostly means that you'll be able to see all your folders | |
3721 when you press @key{TAB} when prompted for a folder name. | |
3722 | |
3723 @findex mh-search-p | |
3724 @kindex k | |
3725 @vindex mh-kill-folder-suppress-prompt-hooks | |
3726 | |
3727 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal | |
3728 hook run at the beginning of the command @kbd{k}. The hook functions | |
3729 are called with no arguments and should return a non-nil value to | |
3730 suppress the normal prompt when you remove a folder. This is useful | |
3731 for folders that are easily regenerated. The default value of | |
3732 @code{mh-search-p} suppresses the prompt on folders generated by | |
3733 searching. | |
3734 | |
3735 @sp 1 | |
3736 @center @strong{NOTE} | |
3737 | |
3738 @quotation | |
3739 Use this hook with care. If there is a bug in your hook which returns | |
3740 @code{t} on @samp{+inbox} and you press @kbd{k} by accident in the | |
3741 @code{+inbox} folder, you will not be happy. | |
3742 @end quotation | |
3743 @sp 1 | |
3744 | |
3745 @cindex @command{sortm} | |
3746 @cindex @file{.mh_profile} | |
3747 @cindex files, @file{.mh_profile} | |
3748 @cindex MH commands, @command{sortm} | |
3749 @cindex MH profile component, @samp{sortm:} | |
3750 @cindex @samp{sortm:} MH profile component | |
3751 @kindex F S | |
3752 @vindex mh-sortm-args | |
3753 | |
3754 The option @code{mh-sortm-args} holds extra arguments to pass on to | |
3755 the command @command{sortm}@footnote{See the section | |
3756 @uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the | |
3757 MH book.} when a prefix argument is used with @kbd{F S}. Normally | |
3758 default arguments to @command{sortm} are specified in the MH profile. | |
3759 This option may be used to provide an alternate view. For example, | |
3760 @samp{'(\"-nolimit\" \"-textfield\" \"subject\")} is a useful setting. | |
3761 | |
3762 @cindex exiting | |
3763 @cindex quitting | |
3764 @findex mh-quit | |
3765 @kindex q | |
3766 | |
3767 When you want to quit using MH-E and go back to editing, you can use | |
3768 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the | |
3769 current MH-E folder and restores the buffers that were present when | |
3770 you first ran @kbd{M-x mh-rmail}. It also removes any MH-E working | |
3771 buffers whose name begins with @samp{ *mh-} or @samp{*MH-E } | |
3772 (@pxref{Miscellaneous}). You can later restore your MH-E session by | |
3773 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail} | |
3774 again. | |
3775 | |
3776 @findex mh-execute-commands | |
3777 @kindex q | |
3778 @vindex mh-before-quit-hook | |
3779 @vindex mh-before-quit-hook, example | |
3780 @vindex mh-quit-hook | |
3781 @vindex mh-quit-hook, example | |
3782 | |
3783 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are | |
3784 called by @kbd{q}. The former one is called before the quit occurs, so | |
3785 you might use it to perform any MH-E operations; you could perform | |
3786 some query and abort the quit or call @code{mh-execute-commands}, for | |
3787 example. The latter is not run in an MH-E context, so you might use it | |
3788 to modify the window setup. If you find that @kbd{q} buries a lot of | |
3789 buffers that you would rather remove, you can use both | |
3790 @code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that. | |
3791 | |
3792 @smalllisp | |
3793 @group | |
3794 (defvar my-mh-folder-buffer-to-delete nil | |
3795 "Folder buffer that is being quit.") | |
3796 | |
3797 (defun my-mh-before-quit-hook () | |
3798 "Save folder buffer that is to be deleted." | |
3799 (setq my-mh-folder-buffer-to-delete (current-buffer))) | |
3800 | |
3801 (defun my-mh-quit-hook () | |
3802 "Kill folder buffer rather than just bury it." | |
3803 (set-buffer my-mh-folder-buffer-to-delete) | |
3804 (if (get-buffer mh-show-buffer) | |
3805 (kill-buffer mh-show-buffer)) | |
3806 (kill-buffer (current-buffer))) | |
3807 | |
3808 @i{Kill MH-Folder buffer instead of burying it} | |
3809 @end group | |
3810 @end smalllisp | |
3811 | |
3812 @cindex folders, renaming | |
3813 @cindex renaming folders | |
3814 @findex dired | |
3815 @findex dired-do-rename | |
3816 | |
3817 You can use dired to manipulate the folders themselves. For example, I | |
3818 renamed my @samp{+out} folder to the more common @samp{+outbox} by | |
3819 running dired on my mail directory (@kbd{M-x dired RET ~/Mail RET}), | |
3820 moving my cursor to @samp{out} and using the command @kbd{R} | |
3821 (@code{dired-do-rename}). | |
3822 | |
3823 @node Sending Mail, Editing Drafts, Folders, Top | |
3824 @chapter Sending Mail | |
3825 | |
3826 @cindex sending mail | |
3827 @findex mh-smail | |
3828 @kindex M-x mh-smail | |
3829 | |
3830 You can send a mail message in several ways. You can call @kbd{M-x | |
3831 mh-smail} directly, or from the command line like this: | |
3832 | |
3833 @cindex starting from command line | |
3834 | |
3835 @smallexample | |
3836 $ @kbd{emacs -f mh-smail} | |
3837 @end smallexample | |
3838 | |
3839 @findex goto-address-at-point | |
3840 @vindex mail-user-agent | |
3841 | |
3842 There are some commands that need to send a mail message, such as | |
3843 @code{goto-address-at-point}. You can configure Emacs to have these | |
3844 commands use MH-E by setting the option @code{mail-user-agent} to | |
3845 @samp{Emacs interface to MH}. | |
3846 | |
3847 @cindex @samp{Message} menu | |
3848 @cindex menu, @samp{Message} | |
3849 | |
3850 From within MH-E's MH-Folder mode, other methods of sending mail are | |
3851 available as well. These can also be found in the @samp{Message} menu. | |
3852 | |
3853 @table @kbd | |
3854 @cindex @samp{Message > Edit Message Again} menu item | |
3855 @cindex menu item, @samp{Message > Edit Message Again} | |
3856 @kindex e | |
3857 @findex mh-edit-again | |
3858 @item e | |
3859 Edit a message to send it again (@code{mh-edit-again}). | |
3860 @c ------------------------- | |
3861 @cindex @samp{Message > Re-edit a Bounced Message} menu item | |
3862 @cindex menu item, @samp{Message > Re-edit a Bounced Message} | |
3863 @kindex E | |
3864 @findex mh-extract-rejected-mail | |
3865 @item E | |
3866 Edit a message that was returned by the mail system | |
3867 (@code{mh-extract-rejected-mail}). | |
3868 @c ------------------------- | |
3869 @cindex @samp{Message > Forward Message...} menu item | |
3870 @cindex menu item, @samp{Message > Forward Message...} | |
3871 @kindex f | |
3872 @findex mh-forward | |
3873 @item f | |
3874 Forward message (@code{mh-forward}). | |
3875 @c ------------------------- | |
3876 @cindex @samp{Message > Reply to Message...} menu item | |
3877 @cindex menu item, @samp{Message > Reply to Message...} | |
3878 @kindex r | |
3879 @findex mh-reply | |
3880 @item r | |
3881 Reply to a message (@code{mh-reply}). | |
3882 @c ------------------------- | |
3883 @cindex @samp{Message > Compose a New Message} menu item | |
3884 @cindex menu item, @samp{Message > Compose a New Message} | |
3885 @kindex s | |
3886 @findex mh-send | |
3887 @item s | |
3888 Compose a message (@code{mh-send}). | |
3889 @c ------------------------- | |
3890 @cindex @samp{Message > Redistribute Message...} menu item | |
3891 @cindex menu item, @samp{Message > Redistribute Message...} | |
3892 @kindex M-d | |
3893 @findex mh-redistribute | |
3894 @item M-d | |
3895 Redistribute a message (@code{mh-redistribute}). | |
3896 @c ------------------------- | |
3897 @findex mh-smail | |
3898 @item M-x mh-smail | |
3899 Compose a message with the MH mail system. | |
3900 @c ------------------------- | |
3901 @findex mh-smail-other-window | |
3902 @item M-x mh-smail-other-window | |
3903 Compose a message with the MH mail system in other window. | |
3904 @end table | |
3905 | |
3906 @cindex @samp{mh-sending-mail} customization group | |
3907 @cindex customization group, @samp{mh-sending-mail} | |
3908 | |
3909 In addition, several options from the @samp{mh-sending-mail} | |
3910 customization group are useful when sending mail or replying to mail. | |
3911 They are summarized in the following table. | |
3912 | |
3913 @vtable @code | |
3914 @item mh-compose-forward-as-mime-flag | |
3915 On means that messages are forwarded as attachments (default: | |
3916 @samp{on}). | |
3917 @c ------------------------- | |
3918 @item mh-compose-letter-function | |
3919 Hook run when starting a new draft (default: @code{nil}). | |
3920 @c ------------------------- | |
3921 @item mh-compose-prompt-flag | |
3922 On means prompt for header fields when composing a new draft (default: | |
3923 @samp{off}). | |
3924 @c ------------------------- | |
3925 @item mh-forward-subject-format | |
3926 Format string for forwarded message subject (default: @code{"%s: | |
3927 %s"}). | |
3928 @c ------------------------- | |
3929 @item mh-insert-x-mailer-flag | |
3930 On means append an @samp{X-Mailer:} header field to the header | |
3931 (default: @samp{on}). | |
3932 @c ------------------------- | |
3933 @item mh-redist-full-contents-flag | |
3934 On means the @command{dist} command needs entire letter for | |
3935 redistribution (default: @samp{off}). | |
3936 @c ------------------------- | |
3937 @item mh-reply-default-reply-to | |
3938 Sets the person or persons to whom a reply will be sent (default: | |
3939 @samp{Prompt}). | |
3940 @c ------------------------- | |
3941 @item mh-reply-show-message-flag | |
3942 On means the MH-Show buffer is displayed using @kbd{r} | |
3943 (@code{mh-reply}) (default: @samp{on}). | |
3944 @end vtable | |
3945 | |
3946 The following hooks are available. | |
3947 | |
3948 @vtable @code | |
97192 | 3949 @item mh-annotate-msg-hook |
3950 Hook run by @code{mh-annotate-msg} after annotation (default: | |
3951 @code{nil}). | |
3952 @c ------------------------- | |
84306 | 3953 @item mh-forward-hook |
3954 Hook run by @code{mh-forward} on a forwarded letter (default: | |
3955 @code{nil}). | |
3956 @c ------------------------- | |
3957 @item mh-letter-mode-hook | |
3958 Hook run by @code{mh-letter-mode} on a new letter (default: | |
3959 @code{nil}). | |
3960 @end vtable | |
3961 | |
97192 | 3962 @findex mh-annotate-msg |
3963 @vindex mh-annotate-list | |
3964 @vindex mh-annotate-msg-hook | |
3965 @vindex mh-current-folder | |
3966 | |
3967 A hook that is called whenever a message is sent and after the scan | |
3968 lines and message are annotated is @code{mh-annotate-msg-hook}. Hook | |
3969 functions can access the current folder name with | |
3970 @code{mh-current-folder} and obtain the message numbers of the | |
3971 annotated messages with @code{mh-annotate-list}. | |
3972 | |
3973 The rest of the functions and options introduced here are explained in | |
3974 more detail in the following sections. | |
84306 | 3975 |
3976 @menu | |
3977 * Composing:: | |
3978 * Replying:: | |
3979 * Forwarding:: | |
3980 * Redistributing:: | |
3981 * Editing Again:: | |
3982 @end menu | |
3983 | |
3984 @node Composing, Replying, Sending Mail, Sending Mail | |
3985 @section Composing | |
3986 | |
3987 @cindex @file{.emacs} | |
3988 @cindex MH-Folder mode | |
3989 @cindex composing mail | |
3990 @cindex draft | |
3991 @cindex files, @file{.emacs} | |
3992 @cindex modes, MH-Folder | |
3993 @cindex sending mail | |
3994 @findex mh-smail | |
3995 @findex mh-smail-other-window | |
3996 @kindex M-x mh-smail | |
3997 @kindex M-x mh-smail-other-window | |
3998 | |
3999 Outside of an MH-Folder buffer, you must call either @kbd{M-x | |
4000 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message. | |
4001 The former command always creates a two-window layout with the current | |
4002 buffer on top and the draft on the bottom. Use the latter command if | |
4003 you would rather preserve the window layout. You may find adding the | |
4004 following key bindings to @file{~/.emacs} useful: | |
4005 | |
4006 @smalllisp | |
4007 (global-set-key "\C-xm" 'mh-smail) | |
4008 (global-set-key "\C-x4m" 'mh-smail-other-window) | |
4009 @end smalllisp | |
4010 | |
4011 @cindex draft folder | |
4012 @cindex MH-Letter mode | |
4013 @cindex modes, MH-Letter | |
4014 @findex mh-send | |
4015 @kindex m | |
4016 | |
4017 From within a MH-Folder buffer, you can simply use the command @kbd{m} | |
4018 (@code{mh-send}). However you invoke @code{mh-send}, your letter | |
4019 appears in an Emacs buffer whose mode is MH-Letter (to see what the | |
4020 buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows | |
4021 you to edit your message, to check the validity of the recipients, to | |
4022 insert attachments and other messages into your message, and to send | |
4023 the message. We'll go more into depth about editing a | |
4024 @dfn{draft}@footnote{I highly recommend that you use a @dfn{draft | |
4025 folder} so that you can edit several drafts in parallel. To do so, | |
4026 create a folder named @samp{+drafts} for example, and add the profile | |
4027 component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a | |
4028 message you're composing) in just a moment (@pxref{Editing Drafts}). | |
4029 | |
4030 @vindex mh-compose-prompt-flag | |
4031 | |
4032 If you prefer to be prompted for the recipient and subject fields | |
4033 before the MH-Letter buffer appears, turn on the option | |
4034 @code{mh-compose-prompt-flag}. | |
4035 | |
4036 @cindex header field, @samp{X-Mailer:} | |
4037 @cindex @samp{X-Mailer:} header field | |
4038 @vindex mh-insert-x-mailer-flag | |
4039 | |
4040 MH-E adds an @samp{X-Mailer:} header field to the header that includes | |
4041 the version of MH-E and Emacs that you are using. If you don't want to | |
4042 participate in our marketing, you can turn off the option | |
4043 @code{mh-insert-x-mailer-flag}. | |
4044 | |
4045 @cindex @command{repl} | |
4046 @cindex @file{components} | |
4047 @cindex MH commands, @command{repl} | |
4048 @cindex MH-Letter mode | |
4049 @cindex Mail mode | |
4050 @cindex files, @file{components} | |
4051 @cindex modes, MH-Letter | |
4052 @cindex modes, Mail | |
4053 @vindex mail-mode-hook | |
4054 @vindex mh-letter-mode-hook | |
4055 @vindex text-mode-hook | |
4056 | |
4057 Two hooks are provided to run commands on your freshly created draft. | |
4058 The first hook, @code{mh-letter-mode-hook}, allows you to do some | |
4059 processing before editing a letter@footnote{Actually, because | |
4060 MH-Letter mode inherits from Mail mode, the hooks | |
4061 @code{text-mode-hook} and @code{mail-mode-hook} are run (in that | |
4062 order) before @code{mh-letter-mode-hook}.}. For example, you may wish | |
4063 to modify the header after @command{repl} has done its work, or you | |
4064 may have a complicated @file{components} file and need to tell MH-E | |
4065 where the cursor should go. Here's an example of how you would use | |
4066 this hook. | |
4067 | |
4068 @findex mh-insert-signature, example | |
4069 | |
4070 @smalllisp | |
4071 @group | |
4072 (defvar letter-mode-init-done-flag nil | |
4073 "Non-nil means one-time MH-E settings have been made.") | |
4074 | |
4075 (defun my-mh-letter-mode-hook () | |
4076 "Prepare letter for editing." | |
4077 (when (not letter-mode-init-done) ; @r{only need to bind the keys once} | |
4078 (local-set-key "\C-ctb" 'add-enriched-text) | |
4079 (local-set-key "\C-cti" 'add-enriched-text) | |
4080 (local-set-key "\C-ctf" 'add-enriched-text) | |
4081 (local-set-key "\C-cts" 'add-enriched-text) | |
4082 (local-set-key "\C-ctB" 'add-enriched-text) | |
4083 (local-set-key "\C-ctu" 'add-enriched-text) | |
4084 (local-set-key "\C-ctc" 'add-enriched-text) | |
4085 (setq letter-mode-init-done t)) | |
4086 (save-excursion | |
4087 (goto-char (point-max)) ; @r{go to end of message to} | |
4088 (mh-insert-signature))) ; @r{insert signature} | |
4089 | |
4090 @i{Prepare draft for editing via mh-letter-mode-hook} | |
4091 | |
4092 @end group | |
4093 @end smalllisp | |
4094 | |
4095 The function, @code{add-enriched-text} is defined in the example in | |
4096 @ref{Adding Attachments}. | |
4097 | |
4098 @vindex mh-compose-letter-function | |
4099 @vindex mh-letter-mode-hook | |
4100 | |
4101 The second hook, a function really, is | |
4102 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it | |
4103 is called just before editing a new message; however, it is the last | |
4104 function called before you edit your message. The consequence of this | |
4105 is that you can write a function to write and send the message for | |
4106 you. This function is passed three arguments: the contents of the | |
4107 @samp{To:}, @samp{Subject:}, and @samp{Cc:} header fields. | |
4108 | |
4109 @node Replying, Forwarding, Composing, Sending Mail | |
4110 @section Replying to Mail | |
4111 | |
4112 @cindex @command{mhl} | |
4113 @cindex @file{mhl.reply} | |
4114 @cindex MH commands, @command{mhl} | |
4115 @cindex files, @file{mhl.reply} | |
4116 @cindex replying | |
4117 @findex mh-reply | |
4118 @kindex r | |
4119 | |
4120 To compose a reply to a message, use the @kbd{r} (@code{mh-reply}) | |
4121 command. | |
4122 | |
4123 When you reply to a message, you are first prompted with @samp{Reply | |
4124 to whom?}. You have several choices here. | |
4125 | |
4126 @quotation | |
4127 @multitable @columnfractions .20 .80 | |
4128 @c @headitem Response @tab Reply Goes To | |
4129 @c XXX @headitem not yet supported by SourceForge's texi2pdf. | |
4130 @item @b{Response} @tab @b{Reply Goes To} | |
4131 @c ------------------------- | |
4132 @item @kbd{from} | |
4133 @tab | |
4134 The person who sent the message. This is the default, so @key{RET} is | |
4135 sufficient. | |
4136 @c ------------------------- | |
4137 @item @kbd{to} | |
4138 @tab | |
4139 Replies to the sender, plus all recipients in the @samp{To:} header field. | |
4140 @c ------------------------- | |
4141 @item @kbd{cc}@*@kbd{all} | |
4142 @tab | |
4143 Forms a reply to the addresses in the @samp{Mail-Followup-To:} header | |
4144 field if one exists; otherwise forms a reply to the sender, plus all | |
4145 recipients. | |
4146 @end multitable | |
4147 @end quotation | |
4148 | |
4149 @cindex @command{repl} | |
4150 @cindex MH commands, @command{repl} | |
4151 @vindex mh-reply-default-reply-to | |
4152 | |
4153 Depending on your answer, @command{repl}@footnote{See the section | |
4154 @uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in | |
4155 the MH book.} is given a different argument to form your reply. | |
4156 Specifically, a choice of @kbd{from} or none at all runs @samp{repl | |
4157 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally, | |
4158 either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you | |
4159 find that most of the time you specify one of these choices when you | |
4160 reply to a message, you can change the option | |
4161 @code{mh-reply-default-reply-to} from its default value of | |
4162 @samp{Prompt} to one of the choices listed above. You can always edit | |
4163 the recipients in the draft. | |
4164 | |
4165 @cindex @samp{repl:} MH profile component | |
4166 @cindex MH profile component, @samp{repl:} | |
4167 @cindex MH-Letter mode | |
4168 @cindex MH-Show mode | |
4169 @cindex draft | |
4170 @cindex modes, MH-Letter | |
4171 @cindex modes, MH-Show | |
4172 | |
4173 Two windows are then created. One window contains the message to which | |
4174 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode | |
4175 (@pxref{Editing Drafts}), is in the other window. If the reply draft | |
4176 was not one that you expected, check the things that affect the | |
4177 behavior of @command{repl} which include the @samp{repl:} profile | |
4178 component and the @file{replcomps} and @file{replgroupcomps} files. | |
4179 | |
4180 If you supply a prefix argument (as in @kbd{C-u r}), the message you | |
4181 are replying to is inserted in your reply after having first been run | |
4182 through @command{mhl} with the format file @file{mhl.reply}. See | |
4183 @command{mhl}(1) or the section | |
4184 @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH | |
4185 book to see how you can modify the default @file{mhl.reply} file. | |
4186 | |
4187 @vindex mh-yank-behavior | |
4188 | |
4189 Alternatively, you can customize the option @code{mh-yank-behavior} | |
4190 and choose one of its @samp{Automatically} variants to do the same | |
4191 thing. @xref{Inserting Letter}. If you do so, the prefix argument has | |
4192 no effect. | |
4193 | |
4194 Another way to include the message automatically in your draft is to | |
4195 use @samp{repl: -filter repl.filter} in your MH profile. | |
4196 | |
4197 @vindex mh-reply-show-message-flag | |
4198 | |
4199 If you include the message automatically, you can hide the MH-Show | |
4200 buffer by turning off the option @code{mh-reply-show-message-flag}. | |
4201 | |
4202 If you wish to customize the header or other parts of the reply draft, | |
4203 please see @command{repl}(1) and @code{mh-format}(5). | |
4204 | |
4205 @node Forwarding, Redistributing, Replying, Sending Mail | |
4206 @section Forwarding Mail | |
4207 | |
4208 @cindex @command{forw} | |
4209 @cindex draft | |
4210 @cindex forwarding | |
4211 @cindex MH commands, @command{forw} | |
4212 @findex mh-forward | |
4213 @kindex f | |
4214 @vindex mh-forward-hook | |
4215 | |
4216 To forward a message, use the @kbd{f} (@code{mh-forward}) command. You | |
4217 are prompted for the @samp{To:} and @samp{cc:} recipients. You are | |
4218 given a draft to edit that looks like it would if you had run the MH | |
4219 command @command{forw}@footnote{See the section | |
4220 @uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in | |
4221 the MH book.}. You can then add some text (@pxref{Editing Drafts}). | |
4222 You can forward several messages by using a range (@pxref{Ranges}). | |
4223 All of the messages in the range are inserted into your draft. The | |
4224 hook @code{mh-forward-hook} is called on the draft. | |
4225 | |
4226 @cindex @file{.mh_profile} | |
4227 @cindex files, @file{.mh_profile} | |
4228 @cindex MH profile component, @samp{forw:} | |
4229 @cindex @samp{forw:} MH profile component | |
4230 @vindex mh-compose-forward-as-mime-flag | |
4231 | |
4232 By default, the option @code{mh-compose-forward-as-mime-flag} is on | |
4233 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
|
4234 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
|
4235 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
|
4236 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
|
4237 option. Forwarding messages verbatim works well for short, textual |
46a2b7ab3cd6
(Preface): Add Gnus to requirements.
Bill Wohler <wohler@newt.com>
parents:
87903
diff
changeset
|
4238 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
|
4239 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
|
4240 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
|
4241 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
|
4242 @code{mh-compose-forward-as-mime-flag}. |
84306 | 4243 |
4244 @vindex mh-forward-subject-format | |
4245 | |
4246 The format of the @samp{Subject:} header field for forwarded messages | |
4247 is controlled by the option @code{mh-forward-subject-format}. This | |
4248 option is a string which includes two escapes (@samp{%s}). The first | |
4249 @samp{%s} is replaced with the sender of the original message, and the | |
4250 second one is replaced with the original @samp{Subject:}. The default | |
4251 value of @code{"%s: %s"} takes a message with the header: | |
4252 | |
4253 @smallexample | |
4254 @group | |
4255 To: Bill Wohler <wohler@@stop.mail-abuse.org> | |
4256 Subject: Re: 49er football | |
4257 From: Greg DesBrisay <gd@@stop.mail-abuse.org> | |
4258 @end group | |
4259 @end smallexample | |
4260 | |
4261 and creates a subject header field of: | |
4262 | |
4263 @smallexample | |
4264 Subject: Greg DesBrisay: Re: 49er football | |
4265 @end smallexample | |
4266 | |
4267 @node Redistributing, Editing Again, Forwarding, Sending Mail | |
4268 @section Redistributing Your Mail | |
4269 | |
4270 @cindex @command{dist} | |
4271 @cindex MH commands, @command{dist} | |
4272 @cindex redistributing | |
4273 @findex mh-redistribute | |
4274 @kindex M-d | |
4275 | |
4276 The command @kbd{M-d} (@code{mh-redistribute}) is similar in function | |
4277 to forwarding mail, but it does not allow you to edit the message, nor | |
4278 does it add your name to the @samp{From:} header field. It appears to | |
4279 the recipient as if the message had come from the original sender. | |
4280 When you run this command, you are prompted for the recipients. | |
4281 | |
4282 @findex mh-edit-again | |
4283 @kindex e | |
4284 | |
4285 For more information on redistributing messages, see | |
4286 @command{dist}(1). Also investigate the command @kbd{e} | |
4287 (@code{mh-edit-again}) for another way to redistribute messages | |
4288 (@pxref{Editing Again}). | |
4289 | |
4290 @cindex @command{send} | |
4291 @cindex MH commands, @command{send} | |
4292 @vindex mh-redist-full-contents-flag | |
4293 | |
4294 The option @code{mh-redist-full-contents-flag} must be turned on if | |
4295 @command{dist}@footnote{See the section | |
4296 @uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with | |
4297 dist} in the MH book.} requires the whole letter for redistribution, | |
4298 which is the case if @command{send}@footnote{See the section | |
4299 @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} | |
4300 in the MH book.} is compiled with the @sc{berk} option (which many | |
4301 people abhor). If you find that MH will not allow you to redistribute | |
4302 a message that has been redistributed before, turn off this option. | |
4303 | |
97192 | 4304 The hook @code{mh-annotate-msg-hook} is run after annotating the |
4305 message and scan line (@pxref{Sending Mail}). | |
4306 | |
84306 | 4307 @node Editing Again, , Redistributing, Sending Mail |
4308 @section Editing Old Drafts and Bounced Messages | |
4309 | |
4310 @cindex @file{draft} | |
4311 @cindex files, @file{draft} | |
4312 @cindex re-editing drafts | |
4313 @findex mh-edit-again | |
4314 @kindex F v drafts | |
4315 @kindex e | |
4316 @kindex n | |
4317 | |
4318 If you don't complete a draft for one reason or another, and if the | |
4319 draft buffer is no longer available, you can pick your draft up again | |
4320 with @kbd{e} (@code{mh-edit-again}). If you don't use a draft | |
4321 folder, your last @file{draft} file will be used. If you use draft | |
4322 folders, you'll need to visit the draft folder with @kbd{F v drafts | |
4323 @key{RET}}, use @kbd{n} to move to the appropriate message, and then | |
4324 use @kbd{e} to prepare the message for editing. | |
4325 | |
4326 @kindex e | |
4327 | |
4328 The @kbd{e} command can also be used to take messages that were sent | |
4329 to you and to send them to more people. | |
4330 | |
4331 @cindex Mailer-Daemon | |
4332 @findex mh-extract-rejected-mail | |
4333 @kindex C-c C-c | |
4334 @kindex E | |
4335 | |
4336 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who | |
4337 complained that your mail wasn't posted for some reason or another. In | |
4338 this case, use @kbd{E} (@code{mh-extract-rejected-mail}) to prepare | |
4339 the message for editing by removing the @i{Mailer-Daemon} envelope and | |
4340 unneeded header fields. Fix whatever addressing problem you had, and | |
4341 send the message again with @kbd{C-c C-c}. | |
4342 | |
4343 @node Editing Drafts, Aliases, Sending Mail, Top | |
4344 @chapter Editing a Draft | |
4345 | |
4346 @cindex @samp{Letter} menu | |
4347 @cindex MH-Letter mode | |
4348 @cindex draft | |
4349 @cindex editing draft | |
4350 @cindex menu, @samp{Letter} | |
4351 @cindex modes, MH-Letter | |
4352 | |
4353 When you edit a message that you want to send (called a @dfn{draft} in | |
4354 this case), the mode used is MH-Letter. This mode provides several | |
4355 commands in addition to the normal Emacs editing commands to help you | |
4356 edit your draft. These can also be found in the @samp{Letter} menu. | |
4357 | |
4358 @table @kbd | |
4359 @kindex @key{SPC} | |
4360 @findex mh-letter-complete-or-space | |
4361 @item @key{SPC} | |
4362 Perform completion or insert space (@code{mh-letter-complete-or-space}). | |
4363 @c ------------------------- | |
4364 @kindex M-@key{TAB} | |
4365 @findex mh-letter-complete | |
4366 @item M-@key{TAB} | |
4367 Perform completion on header field or word preceding point | |
4368 (@code{mh-letter-complete}). | |
4369 @c ------------------------- | |
4370 @kindex , (comma) | |
4371 @findex mh-letter-confirm-address | |
4372 @item , (comma) | |
4373 Flash alias expansion (@code{mh-letter-confirm-address}). | |
4374 @c ------------------------- | |
4375 @kindex @key{TAB} | |
4376 @findex mh-letter-next-header-field-or-indent | |
4377 @item @key{TAB} | |
4378 Cycle to next field (@code{mh-letter-next-header-field-or-indent}). | |
4379 @c ------------------------- | |
4380 @kindex S-@key{TAB} | |
4381 @findex mh-letter-previous-header-field | |
4382 @item S-@key{TAB} | |
4383 Cycle to the previous header field | |
4384 (@code{mh-letter-previous-header-field}). | |
4385 @c ------------------------- | |
4386 @kindex C-c ? | |
4387 @findex mh-help | |
4388 @item C-c ? | |
4389 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
4390 @c ------------------------- | |
4391 @cindex @samp{Letter > Send This Draft} menu item | |
4392 @cindex menu item, @samp{Letter > Send This Draft} | |
4393 @kindex C-c C-c | |
4394 @findex mh-send-letter | |
4395 @item C-c C-c | |
4396 Save draft and send message (@code{mh-send-letter}). | |
4397 @c ------------------------- | |
4398 @kindex C-c C-d | |
4399 @findex mh-insert-identity | |
4400 @item C-c C-d | |
4401 Insert fields specified by the given identity | |
4402 (@code{mh-insert-identity}). @xref{Identities}. | |
4403 @c ------------------------- | |
4404 @cindex @samp{Letter > Pull in All Compositions (MH)} menu item | |
4405 @cindex menu item, @samp{Letter > Pull in All Compositions (MH)} | |
4406 @kindex C-c C-e | |
4407 @findex mh-mh-to-mime | |
4408 @item C-c C-e | |
4409 Compose @sc{mime} message from MH-style directives | |
4410 (@code{mh-mh-to-mime}). | |
4411 @c ------------------------- | |
4412 @kindex C-c C-f C-a | |
4413 @kindex C-c C-f a | |
4414 @findex mh-to-field | |
4415 @item C-c C-f C-a | |
4416 @itemx C-c C-f a | |
4417 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}). | |
4418 @c ------------------------- | |
4419 @kindex C-c C-f C-b | |
4420 @kindex C-c C-f b | |
4421 @item C-c C-f C-b | |
4422 @itemx C-c C-f b | |
4423 Move to @samp{Bcc:} header field (@code{mh-to-field}). | |
4424 @c ------------------------- | |
4425 @kindex C-c C-f C-c | |
4426 @kindex C-c C-f c | |
4427 @item C-c C-f C-c | |
4428 @itemx C-c C-f c | |
4429 Move to @samp{Cc:} header field (@code{mh-to-field}). | |
4430 @c ------------------------- | |
4431 @kindex C-c C-f C-d | |
4432 @kindex C-c C-f d | |
4433 @item C-c C-f C-d | |
4434 @itemx C-c C-f d | |
4435 Move to @samp{Dcc:} header field (@code{mh-to-field}). | |
4436 @c ------------------------- | |
4437 @kindex C-c C-f C-f | |
4438 @kindex C-c C-f f | |
4439 @findex mh-to-fcc | |
4440 @item C-c C-f C-f | |
4441 @itemx C-c C-f f | |
4442 Move to @samp{Fcc:} header field (@code{mh-to-fcc}). | |
4443 @c ------------------------- | |
4444 @kindex C-c C-f C-l | |
4445 @kindex C-c C-f l | |
4446 @item C-c C-f C-l | |
4447 @itemx C-c C-f l | |
4448 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}). | |
4449 @c ------------------------- | |
4450 @kindex C-c C-f C-m | |
4451 @kindex C-c C-f m | |
4452 @item C-c C-f C-m | |
4453 @itemx C-c C-f m | |
4454 Move to @samp{From:} header field (@code{mh-to-field}). | |
4455 @c ------------------------- | |
4456 @kindex C-c C-f C-r | |
4457 @kindex C-c C-f r | |
4458 @item C-c C-f C-r | |
4459 @itemx C-c C-f r | |
4460 Move to @samp{Reply-To:} header field (@code{mh-to-field}). | |
4461 @c ------------------------- | |
4462 @kindex C-c C-f C-s | |
4463 @kindex C-c C-f s | |
4464 @item C-c C-f C-s | |
4465 @itemx C-c C-f s | |
4466 Move to @samp{Subject:} header field (@code{mh-to-field}). | |
4467 @c ------------------------- | |
4468 @kindex C-c C-f C-t | |
4469 @kindex C-c C-f t | |
4470 @item C-c C-f C-t | |
4471 @itemx C-c C-f t | |
4472 Move to @samp{To:} header field (@code{mh-to-field}). | |
4473 @c ------------------------- | |
4474 @cindex @samp{Letter > Insert a Message...} menu item | |
4475 @cindex menu item, @samp{Letter > Insert a Message...} | |
4476 @kindex C-c C-i | |
4477 @findex mh-insert-letter | |
4478 @item C-c C-i | |
4479 Insert a message (@code{mh-insert-letter}). | |
4480 @c ------------------------- | |
4481 @kindex C-c C-m C-e | |
4482 @findex mh-mml-secure-message-encrypt | |
4483 @item C-c C-m C-e | |
4484 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}). | |
4485 @c ------------------------- | |
4486 @cindex @samp{Letter > Compose Forward...} menu item | |
4487 @cindex menu item, @samp{Letter > Compose Forward...} | |
4488 @kindex C-c C-m C-f | |
4489 @kindex C-c C-m f | |
4490 @findex mh-compose-forward | |
4491 @item C-c C-m C-f | |
4492 @itemx C-c C-m f | |
4493 Add tag to forward a message (@code{mh-compose-forward}). | |
4494 @c ------------------------- | |
4495 @cindex @samp{Letter > Compose Get File (MH)...} menu item | |
4496 @cindex menu item, @samp{Letter > Compose Get File (MH)...} | |
4497 @kindex C-c C-m C-g | |
4498 @kindex C-c C-m g | |
4499 @findex mh-mh-compose-anon-ftp | |
4500 @item C-c C-m C-g | |
4501 @itemx C-c C-m g | |
4502 Add tag to include anonymous ftp reference to a file | |
4503 (@code{mh-mh-compose-anon-ftp}). | |
4504 @c ------------------------- | |
4505 @cindex @samp{Letter > Compose Insertion...} menu item | |
4506 @cindex menu item, @samp{Letter > Compose Insertion...} | |
4507 @kindex C-c C-m C-i | |
4508 @kindex C-c C-m i | |
4509 @findex mh-compose-insertion | |
4510 @item C-c C-m C-i | |
4511 @itemx C-c C-m i | |
4512 Add tag to include a file such as an image or sound | |
4513 (@code{mh-compose-insertion}). | |
4514 @c ------------------------- | |
4515 @cindex @samp{Letter > Pull in All Compositions (MML)} menu item | |
4516 @cindex menu item, @samp{Letter > Pull in All Compositions (MML)} | |
4517 @kindex C-c C-m C-m | |
4518 @kindex C-c C-m m | |
4519 @findex mh-mml-to-mime | |
4520 @item C-c C-m C-m | |
4521 @itemx C-c C-m m | |
4522 Compose @sc{mime} message from MML tags (@code{mh-mml-to-mime}). | |
4523 @c ------------------------- | |
4524 @kindex C-c C-m C-n | |
4525 @kindex C-c C-m n | |
4526 @findex mh-mml-unsecure-message | |
4527 @item C-c C-m C-n | |
4528 @itemx C-c C-m n | |
4529 Remove any secure message tags (@code{mh-mml-unsecure-message}). | |
4530 @c ------------------------- | |
4531 @kindex C-c C-m C-s | |
4532 @findex mh-mml-secure-message-sign | |
4533 @item C-c C-m C-s | |
4534 Add tag to sign the message (@code{mh-mml-secure-message-sign}). | |
4535 @c ------------------------- | |
4536 @cindex @samp{Letter > Compose Compressed tar (MH)...} menu item | |
4537 @cindex menu item, @samp{Letter > Compose Compressed tar (MH)...} | |
4538 @kindex C-c C-m C-t | |
4539 @kindex C-c C-m t | |
4540 @findex mh-mh-compose-external-compressed-tar | |
4541 @item C-c C-m C-t | |
4542 @itemx C-c C-m t | |
4543 Add tag to include anonymous ftp reference to a compressed tar file | |
4544 (@code{mh-mh-compose-external-compressed-tar}). | |
4545 @c ------------------------- | |
4546 @cindex @samp{Letter > Revert to Non-MIME Edit (MH)} menu item | |
4547 @cindex menu item, @samp{Letter > Revert to Non-MIME Edit (MH)} | |
4548 @kindex C-c C-m C-u | |
4549 @kindex C-c C-m u | |
4550 @findex mh-mh-to-mime-undo | |
4551 @item C-c C-m C-u | |
4552 @itemx C-c C-m u | |
4553 Undo effects of @kbd{C-c C-e} (@code{mh-mh-to-mime-undo}). | |
4554 @c ------------------------- | |
4555 @kindex C-c C-m C-x | |
4556 @kindex C-c C-m x | |
4557 @findex mh-mh-compose-external-type | |
4558 @item C-c C-m C-x | |
4559 @itemx C-c C-m x | |
4560 Add tag to refer to a remote file | |
4561 (@code{mh-mh-compose-external-type}). | |
4562 @c ------------------------- | |
4563 @kindex C-c C-m e e | |
4564 @findex mh-mml-secure-message-encrypt | |
4565 @item C-c C-m e e | |
4566 Add tag to encrypt the message (@code{mh-mml-secure-message-encrypt}). | |
4567 @c ------------------------- | |
4568 @kindex C-c C-m e s | |
4569 @findex mh-mml-secure-message-signencrypt | |
4570 @item C-c C-m e s | |
4571 Add tag to encrypt and sign the message@* | |
4572 (@code{mh-mml-secure-message-signencrypt}). | |
4573 @c ------------------------- | |
4574 @kindex C-c C-m s e | |
4575 @findex mh-mml-secure-message-signencrypt | |
4576 @item C-c C-m s e | |
4577 Add tag to encrypt and sign the message@* | |
4578 (@code{mh-mml-secure-message-signencrypt}). | |
4579 @c ------------------------- | |
4580 @kindex C-c C-m s s | |
4581 @findex mh-mml-secure-message-sign | |
4582 @item C-c C-m s s | |
4583 Add tag to sign the message (@code{mh-mml-secure-message-sign}). | |
4584 @c ------------------------- | |
4585 @cindex @samp{Letter > Split Current Line} menu item | |
4586 @cindex menu item, @samp{Letter > Split Current Line} | |
4587 @kindex C-c C-o | |
4588 @findex mh-open-line | |
4589 @item C-c C-o | |
4590 Insert a newline and leave point before it (@code{mh-open-line}). | |
4591 @c ------------------------- | |
4592 @cindex @samp{Letter > Kill This Draft} menu item | |
4593 @cindex menu item, @samp{Letter > Kill This Draft} | |
4594 @kindex C-c C-q | |
4595 @findex mh-fully-kill-draft | |
4596 @item C-c C-q | |
4597 Quit editing and delete draft message (@code{mh-fully-kill-draft}). | |
4598 @c ------------------------- | |
4599 @cindex @samp{Letter > Insert Signature} menu item | |
4600 @cindex menu item, @samp{Letter > Insert Signature} | |
4601 @kindex C-c C-s | |
4602 @findex mh-insert-signature | |
4603 @item C-c C-s | |
4604 Insert signature in message (@code{mh-insert-signature}). | |
4605 @c ------------------------- | |
4606 @kindex C-c C-t | |
4607 @findex mh-letter-toggle-header-field-display | |
4608 @item C-c C-t | |
4609 Toggle display of header field at point | |
4610 (@code{mh-letter-toggle-header-field-display}). | |
4611 @c ------------------------- | |
4612 @cindex @samp{Letter > Check Recipient} menu item | |
4613 @cindex menu item, @samp{Letter > Check Recipient} | |
4614 @kindex C-c C-w | |
4615 @findex mh-check-whom | |
4616 @item C-c C-w | |
4617 Verify recipients, showing expansion of any aliases | |
4618 (@code{mh-check-whom}). | |
4619 @c ------------------------- | |
4620 @cindex @samp{Letter > Yank Current Message} menu item | |
4621 @cindex menu item, @samp{Letter > Yank Current Message} | |
4622 @kindex C-c C-y | |
4623 @findex mh-yank-cur-msg | |
4624 @item C-c C-y | |
4625 Insert the current message into the draft buffer | |
4626 (@code{mh-yank-cur-msg}). | |
4627 @c ------------------------- | |
4628 @kindex C-c M-d | |
4629 @findex mh-insert-auto-fields | |
4630 @item C-c M-d | |
4631 Insert custom fields if recipient is found in | |
4632 @code{mh-auto-fields-list} (@code{mh-insert-auto-fields}). | |
4633 @xref{Identities}. | |
4634 @end table | |
4635 | |
4636 @cindex @samp{mh-letter} customization group | |
4637 @cindex customization group, @samp{mh-letter} | |
4638 | |
4639 Several options from the @samp{mh-letter} customization group are used | |
4640 while editing a draft. | |
4641 | |
4642 @vtable @code | |
4643 @item mh-compose-insertion | |
4644 Type of @sc{mime} message tags in messages (default: @samp{MML} if | |
4645 available; otherwise @samp{MH}). | |
4646 @c ------------------------- | |
4647 @item mh-compose-skipped-header-fields | |
4648 List of header fields to skip over when navigating in draft (default: | |
4649 @code{'("From"} @code{"Organization"} @code{"References"} | |
4650 @code{"In-Reply-To"} @code{"X-Face"} @code{"Face"} | |
4651 @code{"X-Image-URL"} @code{"X-Mailer")}. | |
4652 @c ------------------------- | |
4653 @item mh-compose-space-does-completion-flag | |
4654 On means @key{SPC} does completion in message header (default: | |
4655 @samp{off}). | |
4656 @c ------------------------- | |
4657 @item mh-delete-yanked-msg-window-flag | |
4658 On means delete any window displaying the message (default: @samp{off}). | |
4659 @c ------------------------- | |
4660 @item mh-extract-from-attribution-verb | |
4661 Verb to use for attribution when a message is yanked by @kbd{C-c C-y} | |
4662 (default: @code{"wrote:"}). | |
4663 @c ------------------------- | |
4664 @item mh-ins-buf-prefix | |
4665 String to put before each line of a yanked or inserted message | |
4666 (default: @code{"> "}). | |
4667 @c ------------------------- | |
4668 @item mh-letter-complete-function | |
4669 Function to call when completing outside of address or folder fields | |
4670 (default: @code{ispell-complete-word}). | |
4671 @c ------------------------- | |
4672 @item mh-letter-fill-column | |
4673 Fill column to use in MH-Letter mode (default: 72). | |
4674 @c ------------------------- | |
4675 @item mh-mml-method-default | |
4676 Default method to use in security tags (default: @samp{PGP (MIME)} if | |
4677 support for it is available; otherwise @samp{None}). | |
4678 @c ------------------------- | |
4679 @item mh-signature-file-name | |
4680 Source of user's signature (default: @code{"~/.signature"}). | |
4681 @c ------------------------- | |
4682 @item mh-signature-separator-flag | |
4683 On means a signature separator should be inserted (default: | |
4684 @samp{on}). | |
4685 @c ------------------------- | |
4686 @item mh-x-face-file | |
4687 File containing X-Face or Face header field to insert in outgoing mail. | |
4688 (default: @code{"~/.face"}). | |
4689 @c ------------------------- | |
4690 @item mh-yank-behavior | |
4691 Controls which part of a message is yanked by @kbd{C-c C-y} (default: | |
4692 @samp{Body With Attribution}). | |
4693 @end vtable | |
4694 | |
4695 The following hooks are available. | |
4696 | |
4697 @vtable @code | |
4698 @item mail-citation-hook | |
4699 Hook for modifying a citation just inserted in the mail buffer | |
4700 (default: @code{nil}). | |
4701 @c ------------------------- | |
4702 @item mh-before-send-letter-hook | |
4703 Hook run at the beginning of the @kbd{C-c C-c} command (default: | |
4704 @samp{nil}). | |
4705 @c ------------------------- | |
4706 @item mh-mh-to-mime-hook | |
4707 Hook run on the formatted letter by @kbd{C-c C-e} (default: | |
4708 @samp{nil}). | |
4709 @c ------------------------- | |
4710 @item mh-insert-signature-hook | |
4711 Hook run by @kbd{C-c C-s} after signature has been inserted (default: | |
4712 @code{nil}). | |
4713 @end vtable | |
4714 | |
4715 The following face is available. | |
4716 | |
4717 @vtable @code | |
4718 @item mh-letter-header-field | |
4719 Editable header field value face in draft buffers. | |
4720 @end vtable | |
4721 | |
4722 The commands and options introduced here are explained in more | |
4723 detail in the following sections. | |
4724 | |
4725 @menu | |
4726 * Editing Message:: | |
4727 * Inserting Letter:: | |
4728 * Inserting Messages:: | |
4729 * Signature:: | |
4730 * Picture:: | |
4731 * Adding Attachments:: | |
4732 * Sending PGP:: | |
4733 * Checking Recipients:: | |
4734 * Sending Message:: | |
4735 * Killing Draft:: | |
4736 @end menu | |
4737 | |
4738 @node Editing Message, Inserting Letter, Editing Drafts, Editing Drafts | |
4739 @section Editing the Message | |
4740 | |
4741 @cindex @samp{Bcc:} header field | |
4742 @cindex @samp{Cc:} header field | |
4743 @cindex @samp{Dcc:} header field | |
4744 @cindex @samp{From:} header field | |
4745 @cindex @samp{Mail-Followup-To:} header field | |
4746 @cindex @samp{Mail-Reply-To:} header field | |
4747 @cindex @samp{Reply-To:} header field | |
4748 @cindex @samp{Subject:} header field | |
4749 @cindex @samp{To:} header field | |
4750 @cindex editing header | |
4751 @cindex header field, @samp{Bcc:} | |
4752 @cindex header field, @samp{Cc:} | |
4753 @cindex header field, @samp{Dcc:} | |
4754 @cindex header field, @samp{From:} | |
4755 @cindex header field, @samp{Mail-Followup-To:} | |
4756 @cindex header field, @samp{Mail-Reply-To:} | |
4757 @cindex header field, @samp{Reply-To:} | |
4758 @cindex header field, @samp{Subject:} | |
4759 @cindex header field, @samp{To:} | |
4760 @findex mh-to-field | |
4761 @kindex C-c C-f C-t | |
4762 @kindex C-c C-f t | |
4763 | |
4764 Because the header is part of the message, you can edit the header | |
4765 fields as you wish. However, several convenience commands exist to | |
4766 help you create and edit them. For example, the command @kbd{C-c C-f | |
4767 C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the | |
4768 cursor to the @samp{To:} header field, creating it if necessary. The | |
4769 commands for moving to the @samp{Cc:}, @samp{Subject:}, @samp{From:}, | |
4770 @samp{Reply-To:}, @samp{Mail-Reply-To:}, @samp{Mail-Followup-To}, | |
4771 @samp{Bcc:}, and @samp{Dcc:} header fields are similar. | |
4772 | |
4773 @findex mh-to-fcc | |
4774 @kindex C-c C-f C-f | |
4775 @kindex C-c C-f f | |
4776 | |
4777 One command behaves differently from the others, namely, @kbd{C-c C-f | |
4778 C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}). This command | |
4779 will prompt you for the folder name in which to file a copy of the | |
4780 draft. @xref{Folder Selection}. | |
4781 | |
4782 @findex indent-relative | |
4783 @findex mh-letter-next-header-field-or-indent | |
4784 @findex mh-letter-previous-header-field | |
4785 @kindex @key{TAB} | |
4786 @kindex S-@key{TAB} | |
4787 @vindex mh-compose-skipped-header-fields | |
4788 @vindex mh-letter-header-field | |
4789 | |
4790 Within the header of the message, the command@* @key{TAB} | |
4791 (@code{mh-letter-next-header-field-or-indent}) moves between fields | |
4792 that are highlighted with the face @code{mh-letter-header-field}, | |
4793 skipping those fields listed in | |
4794 @code{mh-compose-skipped-header-fields}. After the last field, this | |
4795 command then moves point to the message body before cycling back to | |
4796 the first field. If point is already past the first line of the | |
4797 message body, then this command indents by calling | |
4798 @code{indent-relative} with the given prefix argument. The command | |
4799 @kbd{S-@key{TAB}} (@code{mh-letter-previous-header-field}) moves | |
4800 backwards between the fields and cycles to the body of the message | |
4801 after the first field. Unlike the command @key{TAB}, it will always | |
4802 take point to the last field from anywhere in the body. | |
4803 | |
4804 @cindex alias completion | |
4805 @cindex completion | |
4806 @cindex spell check | |
4807 @findex ispell-complete-word | |
4808 @findex mh-letter-complete | |
4809 @findex mh-letter-complete-or-space | |
4810 @findex mh-letter-confirm-address | |
4811 @kindex , (comma) | |
4812 @kindex @key{SPC} | |
4813 @kindex M-@key{TAB} | |
4814 @vindex mh-alias-flash-on-comma | |
4815 @vindex mh-compose-space-does-completion-flag | |
4816 @vindex mh-letter-complete-function | |
4817 | |
4818 If the field contains addresses (for example, @samp{To:} or | |
4819 @samp{Cc:}) or folders (for example, @samp{Fcc:}) then the command | |
4820 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) will provide alias | |
4821 completion (@pxref{Aliases}). In the body of the message, | |
4822 @kbd{M-@key{TAB}} runs @code{mh-letter-complete-function} instead, | |
4823 which is set to @samp{'ispell-complete-word} by default. The command | |
4824 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) takes a prefix argument | |
4825 that is passed to the @code{mh-letter-complete-function}. In addition, | |
4826 turn on the option @code{mh-compose-space-does-completion-flag} to use | |
4827 the command @key{SPC} (@code{mh-letter-complete-or-space}) to perform | |
4828 completion in the header as well; use a prefix argument to specify | |
4829 more than one space. Addresses are separated by a comma; when you | |
4830 press the comma, the command @code{mh-letter-confirm-address} flashes | |
4831 the alias expansion in the minibuffer if | |
4832 @code{mh-alias-flash-on-comma} is turned on. | |
4833 | |
4834 @c XXX Document the replacement for the inaccessible 'long argument. | |
4835 | |
4836 @findex mh-letter-toggle-header-field-display | |
4837 @kindex C-c C-t | |
4838 | |
4839 Use the command @kbd{C-c C-t} | |
4840 @code{mh-letter-toggle-header-field-display} to display truncated | |
4841 header fields. This command is a toggle so entering it again will hide | |
4842 the field. This command takes a prefix argument: if negative then the | |
4843 field is hidden, if positive then the field is displayed (for example, | |
4844 @kbd{C-u C-c C-t}). | |
4845 | |
4846 Be sure to leave a row of dashes or a blank line between the header | |
4847 and the body of the message. | |
4848 | |
4849 @vindex mh-letter-fill-column | |
4850 | |
4851 The body of the message is edited as you would edit any Emacs buffer | |
4852 although there are a few commands and options to assist you. You can | |
4853 change the fill column in MH-Letter mode with the option | |
4854 @code{mh-letter-fill-column}. By default, this option is 72 to allow | |
4855 others to quote your message without line wrapping. | |
4856 | |
4857 @cindex filling paragraphs | |
4858 @cindex paragraphs, filling | |
4859 @findex fill-paragraph | |
4860 @kindex M-q | |
4861 @vindex mh-ins-buf-prefix | |
4862 | |
4863 You'll often include messages that were sent from user agents that | |
4864 haven't yet realized that paragraphs consist of more than a single | |
4865 line. This makes for long lines that wrap in an ugly fashion. You'll | |
4866 find that @kbd{M-q} (@code{fill-paragraph}) works well even on these | |
4867 quoted messages, even if they are nested, just as long as all of the | |
4868 quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting | |
4869 Letter}). For example, let's assume you have the following in your | |
4870 draft: | |
4871 | |
4872 @smallexample | |
4873 @group | |
4874 > Hopefully this gives you an idea of what I'm currently doing. I'm \ | |
4875 not sure yet whether I'm completely satisfied with my setup, but \ | |
4876 it's worked okay for me so far. | |
4877 @end group | |
4878 @end smallexample | |
4879 | |
4880 Running @kbd{M-q} on this paragraph produces: | |
4881 | |
4882 @smallexample | |
4883 @group | |
4884 > Hopefully this gives you an idea of what I'm currently doing. I'm not | |
4885 > sure yet whether I'm completely satisfied with my setup, but it's | |
4886 > worked okay for me so far. | |
4887 @end group | |
4888 @end smallexample | |
4889 | |
4890 @findex mh-open-line | |
4891 @findex open-line | |
4892 @kindex C-c C-o | |
4893 @kindex C-o | |
4894 | |
4895 The command @kbd{C-c C-o} (@code{mh-open-line}) is similar to the | |
4896 command @kbd{C-o} (@code{open-line}) in that it inserts a newline | |
4897 after point. It differs in that it also inserts the right number of | |
4898 quoting characters and spaces so that the next line begins in the same | |
4899 column as it was. This is useful when breaking up paragraphs in | |
4900 replies. For example, if this command was used when point was after | |
4901 the first period in the paragraph above, the result would be this: | |
4902 | |
4903 @smallexample | |
4904 @group | |
4905 > Hopefully this gives you an idea of what I'm currently doing. | |
4906 | |
4907 > I'm not | |
4908 > sure yet whether I'm completely satisfied with my setup, but it's | |
4909 > worked okay for me so far. | |
4910 @end group | |
4911 @end smallexample | |
4912 | |
4913 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts | |
4914 @section Inserting Letter to Which You're Replying | |
4915 | |
4916 @cindex inserting messages | |
4917 @cindex replying to messages | |
4918 @cindex yanking messages | |
4919 @findex mh-yank-cur-msg | |
4920 @kindex C-c C-y | |
4921 @vindex mh-ins-buf-prefix | |
4922 | |
4923 It is often useful to insert a snippet of text from a letter that | |
4924 someone mailed to provide some context for your reply. The command | |
4925 @kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by adding an | |
4926 attribution, yanking a portion of text from the message to which | |
4927 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> }) | |
4928 before each line. | |
4929 | |
4930 @smallexample | |
4931 @group | |
4932 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote: | |
4933 | |
4934 > Hopefully this gives you an idea of what I'm currently doing. I'm not | |
4935 > sure yet whether I'm completely satisfied with my setup, but it's | |
4936 > worked okay for me so far. | |
4937 @end group | |
4938 @end smallexample | |
4939 | |
4940 @vindex mh-extract-from-attribution-verb | |
4941 | |
4942 The attribution consists of the sender's name and email address | |
4943 followed by the content of the option | |
4944 @code{mh-extract-from-attribution-verb}. This option can be set to | |
4945 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use | |
4946 the @samp{Custom String} menu item to enter your own verb. | |
4947 | |
4948 @vindex mail-citation-hook | |
4949 @vindex mh-ins-buf-prefix | |
4950 @vindex mh-yank-behavior | |
4951 | |
4952 The prefix @code{"> "} is the default setting for the option | |
4953 @code{mh-ins-buf-prefix}. I suggest that you not modify this option | |
4954 since it is used by many mailers and news readers: messages are far | |
4955 easier to read if several included messages have all been indented by | |
4956 the same string. This prefix is not inserted if you use one of the | |
4957 supercite flavors of @code{mh-yank-behavior} or you have added a | |
4958 @code{mail-citation-hook} as described below. | |
4959 | |
4960 @vindex mh-delete-yanked-msg-window-flag | |
4961 | |
4962 You can also turn on the @code{mh-delete-yanked-msg-window-flag} | |
4963 option to delete the window containing the original message after | |
4964 yanking it to make more room on your screen for your reply. | |
4965 | |
4966 @cindex Emacs, packages, supercite | |
4967 @cindex supercite package | |
4968 @kindex r | |
4969 @vindex mail-citation-hook | |
4970 @vindex mh-yank-behavior | |
4971 | |
4972 You can control how the message to which you are replying is yanked | |
4973 into your reply using @code{mh-yank-behavior}. To include the entire | |
4974 message, including the entire header, use @samp{Body and | |
4975 Header}@footnote{If you'd rather have the header cleaned up, use | |
4976 @kbd{C-u r} instead of @kbd{r} when replying | |
4977 (@pxref{Replying}).}@footnote{In the past you would use this setting | |
4978 and set @code{mail-citation-hook} to @samp{supercite}, but this usage | |
4979 is now deprecated in favor of the @samp{Invoke supercite} setting.}. | |
4980 Use @samp{Body} to yank just the body without the header. To yank only | |
4981 the portion of the message following the point, set this option to | |
4982 @samp{Below Point}. | |
4983 | |
4984 Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a | |
4985 full-bodied, full-featured, citation package that comes standard with | |
4986 Emacs.} to pass the entire message and header through supercite. | |
4987 | |
4988 @vindex mh-extract-from-attribution-verb | |
4989 | |
4990 If the @samp{Body With Attribution} setting is used, then the message | |
4991 minus the header is yanked and a simple attribution line is added at | |
4992 the top using the value of the option | |
4993 @code{mh-extract-from-attribution-verb}. This is the default. | |
4994 | |
4995 @kindex C-c C-y | |
4996 @vindex mh-delete-yanked-msg-window-flag | |
4997 | |
4998 If the @samp{Invoke supercite} or @samp{Body With Attribution} | |
4999 settings are used, the @samp{-noformat} argument is passed to the | |
5000 @command{repl} program to override a @samp{-filter} or @samp{-format} | |
5001 argument. These settings also have @samp{Automatically} variants that | |
5002 perform the action automatically when you reply so that you don't need | |
5003 to use @kbd{C-c C-y} at all. Note that this automatic action is only | |
5004 performed if the show buffer matches the message being replied to. | |
5005 People who use the automatic variants tend to turn on the option | |
5006 @code{mh-delete-yanked-msg-window-flag} as well so that the show | |
5007 window is never displayed. | |
5008 | |
5009 @vindex mh-yank-behavior | |
5010 | |
5011 If the show buffer has a region, the option @code{mh-yank-behavior} is | |
5012 ignored unless its value is one of @samp{Attribution} variants in | |
5013 which case the attribution is added to the yanked region. | |
5014 | |
5015 @findex trivial-cite | |
5016 @vindex mail-citation-hook | |
5017 @vindex mh-ins-buf-prefix | |
5018 @vindex mh-yank-behavior | |
5019 | |
5020 If this isn't enough, you can gain full control over the appearance of | |
5021 the included text by setting @code{mail-citation-hook} to a function | |
5022 that modifies it. This hook is ignored if the option | |
5023 @code{mh-yank-behavior} is set to one of the supercite flavors. | |
5024 Otherwise, this option controls how much of the message is passed to | |
5025 the hook. The function can find the citation between point and mark | |
5026 and it should leave point and mark around the modified citation text | |
5027 for the next hook function. The standard prefix | |
5028 @code{mh-ins-buf-prefix} is not added if this hook is set. | |
5029 | |
5030 @cindex Emacs, packages, trivial-cite | |
5031 @cindex trivial-cite package | |
5032 @vindex mh-yank-behavior | |
5033 | |
5034 For example, if you use the hook function | |
5035 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html, | |
5036 @code{trivial-cite}} (which is NOT part of Emacs), set | |
5037 @code{mh-yank-behavior} to @samp{Body and Header}. | |
5038 | |
5039 @node Inserting Messages, Signature, Inserting Letter, Editing Drafts | |
5040 @section Inserting Messages | |
5041 | |
5042 @cindex inserting messages | |
5043 @findex mh-insert-letter | |
5044 @findex mh-yank-behavior | |
5045 @kindex C-c C-i | |
5046 @vindex mh-ins-buf-prefix | |
5047 @vindex mh-invisible-header-fields-compiled | |
5048 @vindex mh-yank-behavior | |
5049 | |
5050 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}). | |
5051 This command prompts you for the folder and message number, which | |
5052 defaults to the current message in that folder. It then inserts the | |
5053 messages, indented by @code{mh-ins-buf-prefix} (@samp{> }) unless | |
5054 @code{mh-yank-behavior} is set to one of the supercite flavors in | |
5055 which case supercite is used to format the message. Certain | |
5056 undesirable header fields (see | |
5057 @code{mh-invisible-header-fields-compiled}) are removed before | |
5058 insertion. | |
5059 | |
5060 If given a prefix argument (like @kbd{C-u C-c C-i}), the header is | |
5061 left intact, the message is not indented, and @samp{> } is not | |
5062 inserted before each line. This command leaves the mark before the | |
5063 letter and point after it. | |
5064 | |
5065 @node Signature, Picture, Inserting Messages, Editing Drafts | |
5066 @section Inserting Your Signature | |
5067 | |
5068 @cindex signature | |
5069 @findex mh-insert-signature | |
5070 @kindex C-c C-s | |
5071 | |
5072 You can insert your signature at the current cursor location with the | |
5073 command @kbd{C-c C-s} (@code{mh-insert-signature}). | |
5074 | |
5075 @cindex files, @file{.signature} | |
5076 @cindex @file{.signature} | |
5077 @cindex vCard | |
5078 @vindex mh-signature-file-name | |
5079 | |
5080 By default, the text of your signature is taken from the file | |
5081 @file{~/.signature}. You can read from other sources by changing the | |
5082 option @code{mh-signature-file-name}. This file may contain a | |
5083 @dfn{vCard} in which case an attachment is added with the vCard. | |
5084 | |
5085 @findex mh-signature-separator-p | |
5086 @vindex mh-signature-file-name | |
5087 @vindex mh-signature-separator | |
5088 @vindex mh-signature-separator-regexp | |
5089 | |
5090 The option @code{mh-signature-file-name} may also be a symbol, in | |
5091 which case that function is called. You may not want a signature | |
5092 separator to be added for you; instead you may want to insert one | |
5093 yourself. Options that you may find useful to do this include | |
5094 @code{mh-signature-separator} (when inserting a signature separator) | |
5095 and @code{mh-signature-separator-regexp} (for finding said separator). | |
5096 The function @code{mh-signature-separator-p}, which reports @code{t} | |
5097 if the buffer contains a separator, may be useful as well. | |
5098 | |
5099 @cindex signature separator | |
5100 @vindex mh-signature-separator-flag | |
5101 | |
5102 A signature separator (@code{"-- "}) will be added if the signature | |
5103 block does not contain one and @code{mh-signature-separator-flag} is | |
5104 on. It is not recommended that you change this option since various | |
5105 mail user agents, including MH-E, use the separator to present the | |
5106 signature differently, and to suppress the signature when replying or | |
5107 yanking a letter into a draft. | |
5108 | |
5109 @vindex mh-insert-signature-hook | |
5110 @vindex mh-signature-file-name | |
5111 | |
5112 The hook @code{mh-insert-signature-hook} is run after the signature is | |
5113 inserted. Hook functions may access the actual name of the file or the | |
5114 function used to insert the signature with | |
5115 @code{mh-signature-file-name}. | |
5116 | |
5117 The signature can also be inserted using Identities. | |
5118 @xref{Identities}. | |
5119 | |
5120 @node Picture, Adding Attachments, Signature, Editing Drafts | |
5121 @section Inserting Your Picture | |
5122 | |
5123 @cindex @file{.face} | |
5124 @cindex files, @file{.face} | |
5125 @vindex mh-x-face-file | |
5126 | |
5127 You can insert your picture in the header of your mail message so that | |
5128 recipients see your face in the @samp{From:} header field if their | |
5129 mail user agent is sophisticated enough. In MH-E, this is done by | |
5130 placing your image in the file named by the option | |
5131 @code{mh-x-face-file} which is @file{~/.face} by default. | |
5132 | |
5133 @cindex @samp{Face:} header field | |
5134 @cindex @samp{X-Face:} header field | |
5135 @cindex @samp{X-Image-URL:} header field | |
5136 @cindex header field, @samp{Face:} | |
5137 @cindex header field, @samp{X-Face:} | |
5138 @cindex header field, @samp{X-Image-URL:} | |
5139 | |
5140 If the file starts with either of the strings @samp{X-Face:}, | |
5141 @samp{Face:} or @samp{X-Image-URL:} then the contents are added to the | |
5142 message header verbatim. Otherwise it is assumed that the file | |
5143 contains the value of the @samp{X-Face:} header field. | |
5144 | |
5145 @cindex @command{compface} | |
5146 @cindex Unix commands, @command{compface} | |
5147 | |
5148 The @samp{X-Face:} header field, which is a low-resolution, black and | |
5149 white image, can be generated using the | |
5150 @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, | |
5151 @command{compface}} command. The @uref{http://www.dairiki.org/xface/, | |
5152 @cite{Online X-Face Converter}} is a useful resource for quick | |
5153 conversion of images into @samp{X-Face:} header fields. | |
5154 | |
5155 Use the @uref{http://quimby.gnus.org/circus/face/make-face, | |
5156 @command{make-face}} script to convert a JPEG image to the higher | |
5157 resolution, color, @samp{Face:} header field. | |
5158 | |
5159 The URL of any image can be used for the @samp{X-Image-URL:} field and | |
5160 no processing of the image is required. | |
5161 | |
5162 @vindex mh-x-face-file | |
5163 | |
5164 To prevent the setting of any of these header fields, either set | |
5165 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file | |
5166 defined by this option doesn't exist. | |
5167 | |
5168 @xref{Viewing}, to see how these header fields are displayed in MH-E. | |
5169 | |
5170 @node Adding Attachments, Sending PGP, Picture, Editing Drafts | |
5171 @section Adding Attachments | |
5172 | |
5173 @cindex @command{mhbuild} | |
5174 @cindex @command{mhn} | |
5175 @cindex MH commands, @command{mhbuild} | |
5176 @cindex MH commands, @command{mhn} | |
5177 @cindex MIME | |
5178 @cindex multimedia mail | |
5179 | |
5180 MH-E has the capability to create multimedia messages. It uses the | |
5181 @sc{mime} (Multipurpose Internet Mail Extensions) | |
5182 protocol@footnote{@sc{mime} is defined in | |
5183 @uref{http://www.rfc-editor.org/rfc/rfc2045.txt, RFC 2045}.} The | |
5184 @sc{mime} protocol allows you to incorporate images, sound, video, | |
5185 binary files, and even commands that fetch a file with @samp{ftp} when | |
5186 your recipient reads the message! | |
5187 | |
5188 @kindex C-c C-m | |
5189 | |
5190 If you were to create a multimedia message with plain MH commands, you | |
5191 would insert @command{mhbuild} or @command{mhn} directives (henceforth | |
5192 called @dfn{MH-style directives} into your draft and use the | |
5193 @command{mhbuild} command in nmh or @command{mhn} command in MH and | |
5194 GNU mailutils to expand them. MH-E works in much the same way, | |
5195 although it provides a handful of commands prefixed with @kbd{C-c C-m} | |
5196 to insert the directives so you don't need to remember the syntax of | |
5197 them. Remember: you can always add MH-style directives by | |
5198 hand@footnote{See the section | |
5199 @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in | |
5200 the MH book.}. | |
5201 | |
5202 @cindex MIME Meta Language (MML) | |
5203 @cindex MML | |
5204 @vindex mh-compose-insertion | |
5205 | |
5206 In addition to MH-style directives, MH-E also supports MML (@sc{mime} | |
5207 Meta Language) tags@footnote{ | |
5208 @ifinfo | |
5209 @c Although the third argument should default to the | |
5210 @c first, makeinfo goes to the wrong Info file without it being | |
5211 @c different--it seems to be getting our own Composing node. | |
5212 @xref{Composing,,Composing with MML,emacs-mime}. | |
5213 @end ifinfo | |
5214 @ifnotinfo | |
5215 See the section Composing in | |
5216 @uref{http://www.gnus.org/manual/emacs-mime.html, @cite{The Emacs MIME | |
5217 Manual}}. | |
5218 @end ifnotinfo | |
5219 }. The option @code{mh-compose-insertion} can be used to choose | |
5220 between them. By default, this option is set to @samp{MML} if it is | |
5221 supported since it provides a lot more functionality. This option can | |
5222 also be set to @samp{MH} if MH-style directives are preferred. | |
5223 | |
5224 @cindex media types | |
5225 @cindex MIME, media types | |
5226 | |
5227 The MH-E @sc{mime} commands require a @dfn{media type} for each body | |
5228 part or attachment. For example, a PDF document is of type | |
5229 @samp{application/pdf} and an HTML document is of type | |
5230 @samp{text/html}. Some commands fill in the media type for you, | |
5231 whereas others require you to enter one. | |
5232 | |
5233 @cindex @command{file} | |
5234 @cindex @file{/etc/mime.types} | |
5235 @cindex files, @file{/etc/mime.types} | |
5236 @cindex Unix commands, @command{file} | |
5237 @findex mailcap-mime-types | |
5238 | |
5239 In the cases where MH-E can do so, it will determine the media type | |
5240 automatically. It uses the @command{file} command to do this. Failing | |
5241 that, the Emacs function @code{mailcap-mime-types} is used to provide | |
5242 a list from which to choose. This function usually reads the file | |
5243 @file{/etc/mime.types}. | |
5244 | |
5245 Whether the media type is chosen automatically, or you choose it from | |
5246 a list, use the type that seems to match best the file that you are | |
5247 including. In the case of binaries, the media type | |
5248 @samp{application/x-executable} can be useful. If you can't find an | |
5249 appropriate media type, use @samp{text/plain} for text messages and | |
5250 @samp{application/octet-stream} for everything else. | |
5251 | |
5252 @cindex content description | |
5253 @cindex MIME, content description | |
5254 | |
5255 You are also sometimes asked for a @dfn{content description}. This is | |
5256 simply an optional brief phrase, in your own words, that describes the | |
5257 object. If you don't care to enter a content description, just press | |
5258 return and none will be included; however, a reader may skip over | |
5259 multimedia fields unless the content description is compelling. | |
5260 | |
5261 You can also create your own @sc{mime} body parts. In the following | |
5262 example, I describe how you can create and edit a @samp{text/enriched} | |
5263 body part to liven up your plain text messages with boldface, | |
5264 underlining, and italics. I include an Emacs function which inserts | |
5265 enriched text tags. | |
5266 | |
5267 @smalllisp | |
5268 @group | |
5269 (defvar enriched-text-types '(("b" . "bold") ("i" . "italic") | |
5270 ("u" . "underline") | |
5271 ("s" . "smaller") ("B" . "bigger") | |
5272 ("f" . "fixed") | |
5273 ("c" . "center")) | |
5274 "Alist of (final-character . tag) choices for add-enriched-text. | |
5275 Additional types can be found in RFC 1563.") | |
5276 | |
5277 (defun add-enriched-text (begin end) | |
5278 "Add enriched text tags around region. | |
5279 The tag used comes from the list enriched-text-types and is | |
5280 specified by the last keystroke of the command. When called from Lisp, | |
5281 arguments are BEGIN and END@." | |
5282 (interactive "r") | |
5283 ;; @r{Set type to the tag indicated by the last keystroke.} | |
5284 (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`})) | |
5285 enriched-text-types)))) | |
5286 (save-restriction ; @r{restores state from narrow-to-region} | |
5287 (narrow-to-region begin end) ; @r{narrow view to region} | |
5288 (goto-char (point-min)) ; @r{move to beginning of text} | |
5289 (insert "<" type ">") ; @r{insert beginning tag} | |
5290 (goto-char (point-max)) ; @r{move to end of text} | |
5291 (insert "</" type ">")))) ; @r{insert terminating tag} | |
5292 @i{Emacs function for entering enriched text} | |
5293 | |
5294 @end group | |
5295 @end smalllisp | |
5296 | |
5297 To use the function @code{add-enriched-text}, first add it to | |
5298 @file{~/.emacs} and create key bindings for it (@pxref{Composing}). | |
5299 | |
5300 Then, in your plain text message, set the mark with @kbd{C-@@} or | |
5301 @kbd{C-@key{SPC}}, type in the text to be highlighted, and type @kbd{C-c t | |
5302 b}. This adds @samp{<bold>} where you set the mark and adds | |
5303 @samp{</bold>} at the location of your cursor, giving you something | |
5304 like: @samp{You should be <bold>very</bold>}. | |
5305 | |
5306 Before sending this message, use @kbd{C-c C-m C-m} | |
5307 (@code{mh-mml-to-mime})@footnote{Use @kbd{C-c C-e} | |
5308 (@code{mh-mh-to-mime}) if you're using MH-style directives.} to add | |
5309 MIME header fields. Then replace @samp{text/plain} with | |
5310 @samp{text/enriched} in the @samp{Content-Type:} header field. | |
5311 | |
5312 You may also be interested in investigating @code{sgml-mode}. | |
5313 | |
5314 @subheading Including Files | |
5315 | |
5316 @cindex attachments, inserting | |
5317 @cindex images | |
5318 @cindex MIME, images | |
5319 @cindex MIME, sound | |
5320 @cindex MIME, video | |
5321 @cindex sound | |
5322 @cindex video | |
5323 @findex mh-compose-insertion | |
5324 @kindex C-c C-m C-i | |
5325 @kindex C-c C-m i | |
5326 @vindex mh-compose-insertion | |
5327 | |
5328 Binaries, images, sound, and video can be inserted in your message | |
5329 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You | |
5330 are prompted for the filename containing the object, the media type if | |
5331 it cannot be determined automatically, and a content description. If | |
5332 you're using MH-style directives, you will also be prompted for | |
5333 additional attributes. | |
5334 | |
5335 @subheading Forwarding Multimedia Messages | |
5336 | |
5337 @findex mh-compose-forward | |
5338 @kindex C-c C-m C-f | |
5339 @kindex C-c C-m f | |
5340 | |
5341 Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m | |
5342 C-f} (@code{mh-compose-forward}). You are prompted for a content | |
5343 description, the name of the folder in which the messages to forward | |
5344 are located, and a range of messages, which defaults to the current | |
5345 message in that folder. @xref{Ranges}. | |
5346 | |
5347 @subheading Including an FTP Reference | |
5348 | |
5349 @cindex @command{ftp} | |
5350 @cindex MIME, @command{ftp} | |
5351 @cindex Unix commands, @command{ftp} | |
5352 @findex mh-mh-compose-anon-ftp | |
5353 @kindex C-c C-m C-g | |
5354 @kindex C-c C-m g | |
5355 | |
5356 You can have your message initiate an @command{ftp} transfer when the | |
5357 recipient reads the message. To do this, use the command @kbd{C-c C-m | |
5358 C-g} (@code{mh-mh-compose-anon-ftp}). You are prompted for the remote | |
5359 host and filename, the media type, and the content description. | |
5360 | |
5361 @subheading Including tar Files | |
5362 | |
5363 @cindex @command{ftp} | |
5364 @cindex @command{tar} | |
5365 @cindex MIME, @command{ftp} | |
5366 @cindex MIME, @command{tar} | |
5367 @cindex Unix commands, @command{ftp} | |
5368 @cindex Unix commands, @command{tar} | |
5369 @findex mh-mh-compose-anon-ftp | |
5370 @findex mh-mh-compose-external-compressed-tar | |
5371 @kindex C-c C-m C-g | |
5372 @kindex C-c C-m C-t | |
5373 @kindex C-c C-m t | |
5374 | |
5375 If the remote file is a compressed tar file, you can use @kbd{C-c C-m | |
5376 C-t} (@code{mh-mh-compose-external-compressed-tar}). Then, in addition | |
5377 to retrieving the file via anonymous @emph{ftp} as per the command | |
5378 @kbd{C-c C-m C-g} (@code{mh-mh-compose-anon-ftp}), the file will also | |
5379 be uncompressed and untarred. You are prompted for the remote host and | |
5380 filename and the content description. | |
5381 | |
5382 @subheading Including Other External Files | |
5383 | |
5384 @findex mh-mh-compose-external-type | |
5385 @kindex C-c C-m C-x | |
5386 @kindex C-c C-m x | |
5387 | |
5388 The command @kbd{C-c C-m C-x} (@code{mh-mh-compose-external-type}) is | |
5389 a general utility for referencing external files. In fact, all of the | |
5390 other commands that insert tags to access external files call this | |
5391 command. You are prompted for the access type, remote host and | |
5392 filename, and content type. If you provide a prefix argument, you are | |
5393 also prompted for a content description, attributes, parameters, and a | |
5394 comment. | |
5395 | |
5396 @subheading Previewing Multimedia Messages | |
5397 | |
5398 When you are finished editing a @sc{mime} message, it might look like this: | |
5399 | |
5400 @cartouche | |
5401 @smallexample | |
5402 3 t08/24 root received fax files on Wed Aug 24 11:00: | |
5403 4+t08/24 To:wohler Test<<This is a test message to get the | |
5404 | |
5405 | |
5406 | |
5407 | |
5408 | |
5409 --:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)--------------- | |
5410 To: wohler | |
5411 cc: | |
5412 Subject: Test of MIME | |
5413 -------- | |
5414 Here is the SETI@@Home logo: | |
5415 | |
5416 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm" | |
5417 disposition=inline description="SETI@@home logo"> | |
5418 <#/part> | |
5419 --:** @{draft@} All L8 (MH-Letter)---------------------------------- | |
5420 | |
5421 @end smallexample | |
5422 @end cartouche | |
5423 @i{MH-E @sc{mime} draft} | |
5424 | |
5425 @findex mh-mml-to-mime | |
5426 @kindex C-c C-m C-m | |
5427 @kindex C-c C-m m | |
5428 | |
5429 Typically, you send a message with attachments just like any other | |
5430 message (@pxref{Sending Message}). | |
5431 | |
5432 @findex mh-mml-to-mime | |
5433 @kindex C-c C-m C-m | |
5434 | |
5435 However, you may take a sneak preview of the @sc{mime} encoding if you | |
5436 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}). | |
5437 The following screen shows the @sc{mime} encoding specified by the | |
5438 tags. You can see why mail user agents are usually built to hide these | |
5439 details from the user. | |
5440 | |
5441 @cartouche | |
5442 @smallexample | |
5443 To: wohler | |
5444 cc: | |
5445 Subject: Test of MIME | |
5446 X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1 | |
5447 MIME-Version: 1.0 | |
5448 Content-Type: multipart/mixed; boundary="=-=-=" | |
5449 -------- | |
5450 --=-=-= | |
5451 | |
5452 Here is the SETI@@Home logo: | |
5453 | |
5454 | |
5455 --=-=-= | |
5456 Content-Type: image/x-xpm | |
5457 Content-Disposition: inline; filename=setiathome.xpm | |
5458 Content-Transfer-Encoding: base64 | |
5459 Content-Description: SETI@@home logo | |
5460 | |
5461 LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N | |
5462 --:-- @{draft@} Top L1 (MH-Letter)---------------------------------- | |
5463 | |
5464 @end smallexample | |
5465 @end cartouche | |
5466 @i{MH-E @sc{mime} draft ready to send} | |
5467 | |
5468 @cindex undo effects of mh-mml-to-mime | |
5469 | |
5470 This action can be undone by running @kbd{C-_} (@code{undo}). | |
5471 | |
5472 @cindex @command{mhbuild} | |
5473 @cindex @command{mhn} | |
5474 @cindex MH commands, @command{mhbuild} | |
5475 @cindex MH commands, @command{mhn} | |
5476 @cindex undo effects of mh-mh-to-mime | |
5477 @findex mh-mh-to-mime | |
5478 @findex mh-mh-to-mime-undo | |
5479 @kindex C-c C-e | |
5480 @kindex C-c C-m C-m | |
5481 @kindex C-c C-m C-u | |
5482 @kindex C-c C-m u | |
5483 | |
5484 If you're using MH-style directives, use @kbd{C-c C-e} | |
5485 (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the | |
5486 command @command{mhbuild} (@command{mhn}) on the message which expands | |
5487 the tags@footnote{See the section | |
5488 @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in | |
5489 the MH book.}. This action can be undone by running @kbd{C-c C-m C-u} | |
5490 (@code{mh-mh-to-mime-undo}), which works by reverting to a backup | |
5491 file. You are prompted to confirm this action, but you can avoid the | |
5492 confirmation by adding an argument (for example, @kbd{C-u C-c C-m | |
5493 C-u}). | |
5494 | |
5495 @kindex C-c C-e | |
5496 @vindex mh-mh-to-mime-args | |
5497 | |
5498 If you wish to pass additional arguments to @command{mhbuild} | |
5499 (@command{mhn}) to affect how it builds your message, use the option | |
5500 @code{mh-mh-to-mime-args}. For example, you can build a consistency | |
5501 check into the message by setting @code{mh-mh-to-mime-args} to | |
5502 @samp{-check}. The recipient of your message can then run | |
5503 @samp{mhbuild -check} on the message---@command{mhbuild} | |
5504 (@command{mhn}) will complain if the message has been corrupted on the | |
5505 way. The command @kbd{C-c C-e} only consults this option when given a | |
5506 prefix argument (as in @kbd{C-u C-c C-e}). | |
5507 | |
5508 @kindex C-c C-e | |
5509 @vindex mh-mh-to-mime-hook | |
5510 | |
5511 The hook @code{mh-mh-to-mime-hook} is called after the message has | |
5512 been formatted by @kbd{C-c C-e}. | |
5513 | |
5514 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts | |
5515 @section Signing and Encrypting Messages | |
5516 | |
5517 @cindex signing messages | |
5518 @cindex encrypting messages | |
5519 @cindex RFC 3156 | |
5520 | |
5521 MH-E can sign and encrypt messages as defined in | |
5522 @uref{http://www.rfc-editor.org/rfc/rfc3156.txt, RFC 3156}. If you | |
5523 should choose to sign or encrypt your message, use one of the | |
5524 following commands to do so any time before sending your message. | |
5525 | |
5526 @findex mh-mml-secure-message-encrypt | |
5527 @findex mh-mml-secure-message-sign | |
5528 @findex mh-mml-secure-message-signencrypt | |
5529 @kindex C-c C-m C-e | |
5530 @kindex C-c C-m C-s | |
5531 @kindex C-c C-m e e | |
5532 @kindex C-c C-m e s | |
5533 @kindex C-c C-m s e | |
5534 @kindex C-c C-m s s | |
5535 | |
5536 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign}) | |
5537 inserts the following tag: | |
5538 | |
5539 @smallexample | |
5540 <#secure method=pgpmime mode=sign> | |
5541 @end smallexample | |
5542 | |
5543 This is used to sign your message digitally. Likewise, the command | |
5544 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the | |
5545 following tag: | |
5546 | |
5547 @smallexample | |
5548 <#secure method=pgpmime mode=encrypt> | |
5549 @end smallexample | |
5550 | |
5551 This is used to encrypt your message. Finally, the command @kbd{C-c | |
5552 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the | |
5553 following tag: | |
5554 | |
5555 @smallexample | |
5556 <#secure method=pgpmime mode=signencrypt> | |
5557 @end smallexample | |
5558 | |
5559 @findex mh-mml-unsecure-message | |
5560 @kindex C-c C-m C-n | |
5561 @kindex C-c C-m n | |
5562 @vindex mh-mml-method-default | |
5563 | |
5564 This is used to sign and encrypt your message. In each of these cases, | |
5565 a proper multipart message is created for you when you send the | |
5566 message. Use the command @kbd{C-c C-m C-n} | |
5567 (@code{mh-mml-unsecure-message}) to remove these tags. Use a prefix | |
5568 argument (as in @kbd{C-u C-c C-m s e}) to be prompted for one of the | |
5569 possible security methods (see @code{mh-mml-method-default}). | |
5570 | |
5571 @vindex mh-mml-method-default | |
5572 | |
5573 The option @code{mh-mml-method-default} is used to select between a | |
5574 variety of mail security mechanisms. The default is @samp{PGP (MIME)} | |
5575 if it is supported; otherwise, the default is @samp{None}. Other | |
5576 mechanisms include vanilla @samp{PGP} and @samp{S/MIME}. | |
5577 | |
5578 @cindex @samp{pgg} customization group | |
5579 @cindex PGG | |
5580 @cindex customization group, @samp{pgg} | |
5581 | |
5582 The @samp{pgg} customization group may have some settings which may | |
5583 interest you. | |
5584 @iftex | |
5585 See @cite{The PGG Manual}. | |
5586 @end iftex | |
5587 @ifinfo | |
5588 @xref{Top, , The PGG Manual, pgg, The PGG Manual}. | |
5589 @end ifinfo | |
5590 @ifhtml | |
5591 See | |
5592 @uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html, | |
5593 @cite{The PGG Manual}}. | |
5594 @end ifhtml | |
5595 | |
5596 @cindex header field, @samp{Fcc:} | |
5597 @cindex @samp{Fcc:} header field | |
5598 @vindex pgg-encrypt-for-me | |
5599 | |
5600 In particular, I turn on the option @code{pgg-encrypt-for-me} so that | |
5601 all messages I encrypt are encrypted with my public key as well. If | |
5602 you keep a copy of all of your outgoing mail with a @samp{Fcc:} header | |
5603 field, this setting is vital so that you can read the mail you write! | |
5604 | |
5605 @node Checking Recipients, Sending Message, Sending PGP, Editing Drafts | |
5606 @section Checking Recipients | |
5607 | |
5608 @cindex @samp{*MH-E Recipients*} | |
5609 @cindex @command{whom} | |
5610 @cindex MH commands, @command{whom} | |
5611 @cindex buffers, @samp{*MH-E Recipients*} | |
5612 @cindex checking recipients | |
5613 @cindex recipients, checking | |
5614 @findex mh-check-whom | |
5615 @kindex C-c C-w | |
5616 | |
5617 The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so | |
5618 you can check the actual address(es) in the alias. A new buffer named | |
5619 @samp{*MH-E Recipients*} is created with the output of @command{whom} | |
5620 (@pxref{Miscellaneous})@footnote{See the section | |
5621 @uref{@value{MH-BOOK-HOME}/senove.html#WhaPro, What now? -- and the | |
5622 whatnow Program} in the MH book.}. | |
5623 | |
5624 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts | |
5625 @section Sending a Message | |
5626 | |
5627 @cindex buffers, @samp{*MH-E Mail Delivery*} | |
5628 @cindex @samp{*MH-E Mail Delivery*} | |
5629 @cindex sending mail | |
5630 @findex mh-send-letter | |
5631 @kindex C-c C-c | |
5632 | |
5633 When you are all through editing a message, you send it with the | |
5634 command @kbd{C-c C-c} (@code{mh-send-letter}). You can give a prefix | |
5635 argument (as in @kbd{C-u C-c C-c}) to monitor the first stage of the | |
5636 delivery; this output can be found in a buffer called @samp{*MH-E Mail | |
5637 Delivery*} (@pxref{Miscellaneous}). | |
5638 | |
5639 @cindex sending mail | |
5640 @cindex spell check | |
5641 @findex ispell-message | |
5642 @kindex C-c C-c | |
5643 @vindex mh-before-send-letter-hook | |
5644 | |
5645 The hook @code{mh-before-send-letter-hook} is run at the beginning of | |
5646 the command @kbd{C-c C-c}. For example, if you want to check your | |
5647 spelling in your message before sending, add the function | |
5648 @code{ispell-message}. | |
5649 | |
5650 @cindex @command{send} | |
5651 @cindex MH commands, @command{send} | |
5652 @vindex mh-send-prog | |
5653 | |
5654 In case the MH @command{send} program@footnote{See the section | |
5655 @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} | |
5656 in the MH book.} is installed under a different name, use | |
5657 @code{mh-send-prog} to tell MH-E the name. | |
5658 | |
97192 | 5659 The hook @code{mh-annotate-msg-hook} is run after annotating the |
5660 message and scan line (@pxref{Sending Mail}). | |
5661 | |
84306 | 5662 @node Killing Draft, , Sending Message, Editing Drafts |
5663 @section Killing the Draft | |
5664 | |
5665 @cindex killing draft | |
5666 @findex kill-buffer | |
5667 @findex mh-fully-kill-draft | |
5668 @kindex C-c C-q | |
5669 @kindex C-x k | |
5670 | |
5671 If for some reason you are not happy with the draft, you can use the | |
5672 command @kbd{C-c C-q} (@code{mh-fully-kill-draft}) to kill the draft | |
5673 buffer and delete the draft message. Use the command @kbd{C-x k} | |
5674 (@code{kill-buffer}) if you don't want to delete the draft message. | |
5675 | |
5676 @node Aliases, Identities, Editing Drafts, Top | |
5677 @chapter Aliases | |
5678 | |
5679 @cindex aliases | |
5680 | |
5681 MH aliases are used in the same way in MH-E as they are in MH. Any | |
5682 alias listed as a recipient will be expanded when the message is sent. | |
5683 This chapter discusses other things you can do with aliases in MH-E. | |
5684 | |
5685 @cindex MH-Letter mode | |
5686 @cindex modes, MH-Letter | |
5687 | |
5688 The following commands are available in MH-Letter mode with the | |
5689 exception of @code{mh-alias-reload} which can be called from anywhere. | |
5690 | |
5691 @table @kbd | |
5692 @kindex @key{SPC} | |
5693 @findex mh-letter-complete-or-space | |
5694 @item @key{SPC} | |
5695 Perform completion or insert space (@code{mh-letter-complete-or-space}). | |
5696 @c ------------------------- | |
5697 @kindex M-@key{TAB} | |
5698 @findex mh-letter-complete | |
5699 @item M-@key{TAB} | |
5700 Perform completion on header field or word preceding point | |
5701 (@code{mh-letter-complete}). | |
5702 @c ------------------------- | |
5703 @findex mh-alias-apropos | |
5704 @item mh-alias-apropos | |
5705 Show all aliases or addresses that match a regular expression. | |
5706 @c ------------------------- | |
5707 @findex mh-alias-grab-from-field | |
5708 @item mh-alias-grab-from-field | |
5709 Add alias for the sender of the current message | |
5710 @c ------------------------- | |
5711 @findex mh-alias-reload | |
5712 @item mh-alias-reload | |
5713 Reload MH aliases. | |
5714 @end table | |
5715 | |
5716 @cindex @samp{mh-alias} customization group | |
5717 @cindex customization group, @samp{mh-alias} | |
5718 | |
5719 The @samp{mh-alias} customization group contains options associated | |
5720 with aliases. | |
5721 | |
5722 @vtable @code | |
5723 @item mh-alias-completion-ignore-case-flag | |
5724 On means don't consider case significant in MH alias completion | |
5725 (default: @samp{on}). | |
5726 @c ------------------------- | |
5727 @item mh-alias-expand-aliases-flag | |
5728 On means to expand aliases entered in the minibuffer (default: | |
5729 @samp{off}). | |
5730 @c ------------------------- | |
5731 @item mh-alias-flash-on-comma | |
5732 Specify whether to flash address or warn on translation (default: @samp{Flash | |
5733 but Don't Warn If No Alias}). | |
5734 @c ------------------------- | |
5735 @item mh-alias-insert-file | |
5736 Filename used to store a new MH-E alias (default: @samp{Use Aliasfile | |
5737 Profile Component}). | |
5738 @c ------------------------- | |
5739 @item mh-alias-insertion-location | |
5740 Specifies where new aliases are entered in alias files (default: | |
5741 @samp{Alphabetical}). | |
5742 @c ------------------------- | |
5743 @item mh-alias-local-users | |
5744 If @samp{on}, local users are added to alias completion (default: | |
5745 @samp{on}). | |
5746 @c ------------------------- | |
5747 @item mh-alias-local-users-prefix | |
5748 String prefixed to the real names of users from the password file | |
5749 (default: @code{"local."}. | |
5750 @c ------------------------- | |
5751 @item mh-alias-passwd-gecos-comma-separator-flag | |
5752 On means the GECOS field in the password file uses a comma separator | |
5753 (default: @samp{on}). | |
5754 @end vtable | |
5755 | |
5756 The following hook is available. | |
5757 | |
5758 @vtable @code | |
5759 @item mh-alias-reloaded-hook | |
5760 Hook run by @code{mh-alias-reload} after loading aliases (default: | |
5761 @code{nil}). | |
5762 @end vtable | |
5763 | |
5764 @subheading Adding Addresses to Draft | |
5765 | |
5766 You can use aliases when you are adding recipients to a message. | |
5767 | |
5768 @findex minibuffer-complete | |
5769 @kindex @key{TAB} | |
5770 @vindex mh-alias-expand-aliases-flag | |
5771 @vindex mh-compose-prompt-flag | |
5772 | |
5773 In order to use minibuffer prompting for recipients and the subject | |
5774 line in the minibuffer, turn on the option | |
5775 @code{mh-compose-prompt-flag} (@pxref{Composing}), and use the | |
5776 @key{TAB} (@code{minibuffer-complete}) command to complete aliases | |
5777 (and optionally local logins) when prompted for the recipients. Turn | |
5778 on the option @code{mh-alias-expand-aliases-flag} if you want these | |
5779 aliases to be expanded to their respective addresses in the draft. | |
5780 | |
5781 @findex mh-letter-complete | |
5782 @findex mh-letter-complete-or-space | |
5783 @kindex @key{SPC} | |
5784 @kindex M-@key{TAB} | |
5785 | |
5786 Otherwise, you can complete aliases in the header of the draft with | |
5787 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC} | |
5788 (@code{mh-letter-complete-or-space}). | |
5789 | |
5790 @vindex mh-alias-completion-ignore-case-flag | |
5791 | |
5792 As MH ignores case in the aliases, so too does MH-E. However, you may | |
5793 turn off the option @code{mh-alias-completion-ignore-case-flag} to | |
5794 make case significant which can be used to segregate completion of | |
5795 your aliases. You might use uppercase for mailing lists and lowercase | |
5796 for people. For example, you might have: | |
5797 | |
5798 @smallexample | |
5799 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org> | |
5800 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org> | |
5801 @end smallexample | |
5802 | |
5803 When this option is turned off, if you were to type @kbd{M} in the | |
5804 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list; | |
5805 if you started with @kbd{m} and then entered @kbd{M-@key{TAB}}, then | |
5806 you'd get Mark's address. Note that this option affects completion | |
5807 only. If you were to enter @kbd{Mark.Baushke}, it would still be | |
5808 identified with your @samp{mark.baushke} alias. | |
5809 | |
5810 @findex mh-alias-minibuffer-confirm-address | |
5811 @findex mh-letter-confirm-address | |
5812 @vindex mh-alias-flash-on-comma | |
5813 @vindex mh-compose-prompt-flag | |
5814 | |
5815 To verify that the alias you've entered is valid, the alias will be | |
5816 displayed in the minibuffer when you type a comma | |
5817 (@code{mh-letter-confirm-address} or | |
5818 @code{mh-alias-minibuffer-confirm-address} if the option | |
5819 @code{mh-compose-prompt-flag} is turned on). @xref{Composing}. This | |
5820 behavior can be controlled with the option | |
5821 @code{mh-alias-flash-on-comma} which provides three choices: | |
5822 @samp{Flash but Don't Warn If No Alias}, @samp{Flash and Warn If No | |
5823 Alias}, and @samp{Don't Flash Nor Warn If No Alias}. | |
5824 | |
5825 For another way to verify the alias expansion, see @ref{Checking | |
5826 Recipients}. | |
5827 | |
5828 @subheading Loading Aliases | |
5829 | |
5830 @cindex @command{ali} | |
5831 @cindex @file{/etc/nmh/MailAliases} | |
5832 @cindex @samp{Aliasfile:} MH profile component | |
5833 @cindex MH commands, @command{ali} | |
5834 @cindex MH profile component, @samp{Aliasfile:} | |
5835 @cindex files, @file{/etc/nmh/MailAliases} | |
5836 | |
5837 MH-E loads aliases for completion and folder name hints from various | |
5838 places. It uses the MH command @command{ali}@footnote{See the section | |
5839 @uref{@value{MH-BOOK-HOME}/mh.html, MH Aliases} in the MH book.} to | |
5840 read aliases from the files listed in the profile component | |
5841 @samp{Aliasfile:} as well as system-wide aliases (for example, | |
5842 @file{/etc/nmh/MailAliases}). | |
5843 | |
5844 @cindex @file{/etc/passwd} | |
5845 @cindex files, @file{/etc/passwd} | |
5846 | |
5847 In addition, aliases are created from @file{/etc/passwd} entries with | |
5848 a user ID larger than a magical number, typically 200. This can be a | |
5849 handy tool on a machine where you and co-workers exchange messages. | |
5850 These aliases have the form @samp{local.@var{first.last}} if a real | |
5851 name is present in the password file. Otherwise, the alias will have | |
5852 the form @samp{local.@var{login}}. | |
5853 | |
5854 @vindex mh-alias-local-users-prefix | |
5855 | |
5856 The prefix @samp{local.} can be modified via the option | |
5857 @code{mh-alias-local-users-prefix}. This option can also be set to | |
5858 @samp{Use Login}. | |
5859 | |
5860 For example, consider the following password file entry: | |
5861 | |
5862 @smallexample | |
5863 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh | |
5864 @end smallexample | |
5865 | |
5866 @vindex mh-alias-local-users-prefix | |
5867 | |
5868 The following settings of option @code{mh-alias-local-users-prefix} | |
5869 will produce the associated aliases: | |
5870 | |
5871 @table @code | |
5872 @item "local." | |
5873 local.peter.galbraith | |
5874 @c ------------------------- | |
5875 @item "" | |
5876 peter.galbraith | |
5877 @c ------------------------- | |
5878 @item Use Login | |
5879 psg | |
5880 @end table | |
5881 | |
5882 @vindex mh-alias-passwd-gecos-comma-separator-flag | |
5883 | |
5884 In the example above, commas are used to separate different values | |
5885 within the so-called GECOS field. This is a fairly common usage. | |
5886 However, in the rare case that the GECOS field in your password file | |
5887 is not separated by commas and whose contents may contain commas, you | |
5888 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag} | |
5889 off. | |
5890 | |
5891 @cindex NIS, obtaining local aliases from | |
5892 @cindex @samp{ypcat passwd} | |
5893 @vindex mh-alias-local-users | |
5894 | |
5895 If you're on a system with thousands of users you don't know, and the | |
5896 loading of local aliases slows MH-E down noticeably, then the local | |
5897 alias feature can be disabled by turning off the option | |
5898 @code{mh-alias-local-users}. This option also takes a string which is | |
5899 executed to generate the password file. For example, use @samp{ypcat | |
5900 passwd} to obtain the NIS password file. | |
5901 | |
5902 @findex mh-alias-reload | |
5903 @kindex M-x mh-alias-reload | |
5904 @vindex mh-alias-reloaded-hook | |
5905 | |
5906 Since aliases are updated frequently, MH-E reloads aliases | |
5907 automatically whenever an alias lookup occurs if an alias source has | |
5908 changed. However, you can reload your aliases manually by calling the | |
5909 command @kbd{M-x mh-alias-reload} directly. This command runs | |
5910 @code{mh-alias-reloaded-hook} after the aliases have been loaded. | |
5911 | |
5912 @subheading Adding Aliases | |
5913 | |
5914 In the past, you have manually added aliases to your alias file(s) | |
5915 listed in your @samp{Aliasfile:} profile component. MH-E provides | |
5916 other methods for maintaining your alias file(s). | |
5917 | |
5918 @findex mh-alias-add-alias | |
5919 @kindex M-x mh-alias-add-alias | |
5920 | |
5921 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt | |
5922 you for the alias and address that you would like to add. If the alias | |
5923 exists already, you will have the choice of inserting the new alias | |
5924 before or after the old alias. In the former case, this alias will be | |
5925 used when sending mail to this alias. In the latter case, the alias | |
5926 serves as an additional folder name hint when filing messages | |
5927 (@pxref{Folder Selection}). | |
5928 | |
5929 Earlier, the alias prefix @samp{local} was presented. You can use | |
5930 other prefixes to organize your aliases or disambiguate entries. You | |
5931 might use prefixes for locales, jobs, or activities. For example, I | |
5932 have: | |
5933 | |
5934 @smallexample | |
5935 @group | |
5936 ; Work | |
5937 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com> | |
5938 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com> | |
5939 ... | |
5940 ; Sport | |
5941 diving.ken.mayer: Ken Mayer <kmayer@@stop.mail-abuse.com> | |
5942 sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com> | |
5943 ... | |
5944 ; Personal | |
5945 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com> | |
5946 ... | |
5947 @end group | |
5948 @end smallexample | |
5949 | |
5950 Using prefixes instead of postfixes helps you explore aliases during | |
5951 completion. If you forget the name of an old dive buddy, you can enter | |
5952 @samp{div} and then @key{SPC} to get a listing of all your dive buddies. | |
5953 | |
5954 @kindex M-x mh-alias-add-address-under-point | |
5955 @kindex M-x mh-alias-grab-from-field | |
5956 | |
5957 An alias for the sender of the current message is added automatically | |
5958 by clicking on the @samp{Grab From alias} tool bar button or by running | |
5959 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other | |
5960 recipients of the current message are added by placing your cursor | |
5961 over the desired recipient and giving the @kbd{M-x | |
5962 mh-alias-add-address-under-point} command. | |
5963 | |
5964 @vindex mh-alias-insert-file | |
5965 @vindex mh-alias-insertion-location | |
5966 | |
5967 The options @code{mh-alias-insert-file} and | |
5968 @code{mh-alias-insertion-location} controls how and where these aliases | |
5969 are inserted. | |
5970 | |
5971 @vindex mh-alias-insert-file | |
5972 | |
5973 The default setting of option @code{mh-alias-insert-file} is @samp{Use | |
5974 Aliasfile Profile Component}. This option can also hold the name of a | |
5975 file or a list a file names. If this option is set to a list of file | |
5976 names, or the @samp{Aliasfile:} profile component contains more than | |
5977 one file name, MH-E will prompt for one of them. | |
5978 | |
5979 @vindex mh-alias-insertion-location | |
5980 | |
5981 The option @code{mh-alias-insertion-location} is set to | |
5982 @samp{Alphabetical} by default. If you organize your alias file in | |
5983 other ways, then the settings @samp{Top} and @samp{Bottom} might be | |
5984 more appropriate. | |
5985 | |
5986 @subheading Querying Aliases | |
5987 | |
5988 @cindex regular expressions, @code{mh-alias-apropos} | |
5989 @findex mh-alias-apropos | |
5990 @kindex M-x mh-alias-apropos | |
5991 | |
5992 If you can't quite remember an alias, you can use @kbd{M-x | |
5993 mh-alias-apropos} to show all aliases or addresses that match a | |
5994 regular expression | |
5995 @ifnothtml | |
5996 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The | |
5997 GNU Emacs Manual}). | |
5998 @end ifnothtml | |
5999 @ifhtml | |
6000 (see the section | |
6001 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
6002 Syntax of Regular Expressions} in | |
6003 @cite{The GNU Emacs Manual}). | |
6004 @end ifhtml | |
6005 | |
6006 @node Identities, Speedbar, Aliases, Top | |
6007 @chapter Identities | |
6008 | |
6009 @cindex identities | |
6010 @cindex multiple personalities | |
6011 | |
6012 MH-E supports the concept of multiple personalities or identities. | |
6013 This means that you can easily have a different header and signature | |
6014 at home and at work. | |
6015 | |
6016 @cindex @samp{Identity} menu | |
6017 @cindex menu, @samp{Identity} | |
6018 | |
6019 A couple of commands are used to insert identities in MH-Letter mode | |
6020 which are also found in the @samp{Identity} menu. | |
6021 | |
6022 @table @kbd | |
6023 @kindex C-c C-d | |
6024 @findex mh-insert-identity | |
6025 @item C-c C-d | |
6026 Insert fields specified by given identity (@code{mh-insert-identity}). | |
6027 @c ------------------------- | |
6028 @cindex @samp{Identity > Insert Auto Fields} menu item | |
6029 @cindex menu item, @samp{Identity > Insert Auto Fields} | |
6030 @kindex C-c M-d | |
6031 @findex mh-insert-auto-fields | |
6032 @item C-c M-d | |
6033 Insert custom fields if recipient found in @code{mh-auto-fields-list} | |
6034 (@code{mh-insert-auto-fields}). | |
6035 @end table | |
6036 | |
6037 @cindex @samp{mh-identity} customization group | |
6038 @cindex customization group, @samp{mh-identity} | |
6039 | |
6040 The @samp{mh-identity} customization group contains the following | |
6041 options. | |
6042 | |
6043 @vtable @code | |
6044 @item mh-auto-fields-list | |
6045 List of recipients for which header lines are automatically inserted | |
6046 (default: @code{nil}). | |
6047 @c ------------------------- | |
6048 @item mh-auto-fields-prompt-flag | |
6049 On means to prompt before sending if fields inserted (default: | |
6050 @samp{on}) | |
6051 @c ------------------------- | |
6052 @item mh-identity-default | |
6053 Default identity to use when @code{mh-letter-mode} is called (default: | |
6054 @samp{None}). | |
6055 @c ------------------------- | |
6056 @item mh-identity-handlers | |
6057 Handler functions for fields in @code{mh-identity-list}. | |
6058 @c ------------------------- | |
6059 @item mh-identity-list | |
6060 List of identities (default: @code{nil}). | |
6061 @end vtable | |
6062 | |
6063 Some of the common header fields that people change depending on the | |
6064 context are the @samp{From:} and @samp{Organization:} fields, as well | |
6065 as the signature. | |
6066 | |
6067 @vindex mh-identity-list | |
6068 | |
6069 This is done by customizing the option @code{mh-identity-list}. In the | |
6070 customization buffer for this option, click on the @samp{INS} button | |
6071 and enter a label such as @samp{Home} or @samp{Work}. Then click on | |
6072 the @samp{INS} button with the label @samp{Add at least one item | |
6073 below}. The @samp{Value Menu} has the following menu items: | |
6074 | |
6075 @table @samp | |
6076 @cindex header field, @samp{From:} | |
6077 @cindex @samp{From:} header field | |
6078 @item From Field | |
6079 Specify an alternate @samp{From:} header field. You must include a | |
6080 valid email address. A standard format is @samp{First Last | |
6081 <login@@host.domain>}. If you use an initial with a period, then you | |
6082 must quote your name as in @samp{"First I. Last" | |
6083 <login@@host.domain>}. | |
6084 @c ------------------------- | |
6085 @cindex header field, @samp{Organization:} | |
6086 @cindex @samp{Organization:} header field | |
6087 @item Organization Field | |
6088 People usually list the name of the company where they work here. | |
6089 @c ------------------------- | |
6090 @item Other Field | |
6091 Set any arbitrary header field and value here. Unless the header field | |
6092 is a standard one, precede the name of your field's label with | |
6093 @samp{X-}, as in @samp{X-Fruit-of-the-Day:}. | |
6094 @c ------------------------- | |
6095 @item Attribution Verb | |
6096 This value overrides the setting of | |
6097 @code{mh-extract-from-attribution-verb}. @xref{Inserting Letter}. | |
6098 @c ------------------------- | |
6099 @cindex signature | |
6100 @vindex mh-signature-file-name | |
6101 @item Signature | |
6102 Set your signature with this item. You can specify the contents of | |
6103 @code{mh-signature-file-name}, a file, or a function. | |
6104 @xref{Signature}. | |
6105 @c ------------------------- | |
6106 @item GPG Key ID | |
6107 Specify a different key to sign or encrypt messages. | |
6108 @end table | |
6109 | |
6110 @cindex Identity menu | |
6111 @cindex menu, Identity | |
6112 @findex mh-insert-identity | |
6113 @kindex C-c C-d | |
6114 | |
6115 You can select the identities you have added via the menu called | |
6116 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c | |
6117 C-d} (@code{mh-insert-identity}). To clear the fields and signature | |
6118 added by the identity, select the @samp{None} identity. | |
6119 | |
6120 @cindex menu item, @samp{Identity > Customize Identities} | |
6121 @cindex menu item, @samp{Identity > Save as Default} | |
6122 @cindex menu item, @samp{Identity > Set Default for Session} | |
6123 @cindex @samp{Identity > Customize Identities} menu item | |
6124 @cindex @samp{Identity > Save as Default} menu item | |
6125 @cindex @samp{Identity > Set Default for Session} menu item | |
6126 @vindex mh-identity-default | |
6127 | |
6128 The @samp{Identity} menu contains two other items to save you from | |
6129 having to set the identity on every message. The menu item @samp{Set | |
6130 Default for Session} can be used to set the default identity to the | |
6131 current identity until you exit Emacs. The menu item @samp{Save as | |
6132 Default} sets the option @code{mh-identity-default} to the current | |
6133 identity setting. You can also customize the option | |
6134 @code{mh-identity-default} in the usual fashion. If you find that you | |
6135 need to add another identity, the menu item @samp{Customize | |
6136 Identities} is available for your convenience. | |
6137 | |
6138 @cindex regular expressions, @code{mh-auto-fields-list} | |
6139 @vindex mh-auto-fields-list | |
6140 | |
6141 The option @code{mh-auto-fields-list} can also be used to set the | |
6142 identity depending on the recipient to provide even more control. To | |
6143 customize @code{mh-auto-fields-list}, click on the @samp{INS} button | |
6144 and enter a regular expression for the recipient's address | |
6145 @ifnothtml | |
6146 (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The | |
6147 GNU Emacs Manual}). | |
6148 @end ifnothtml | |
6149 @ifhtml | |
6150 (see the section | |
6151 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
6152 Syntax of Regular Expressions} in | |
6153 @cite{The GNU Emacs Manual}). | |
6154 @end ifhtml | |
6155 Click on the @samp{INS} button with the @samp{Add at least one item | |
6156 below} label. The @samp{Value Menu} contains the following menu items: | |
6157 | |
6158 @table @samp | |
6159 @item Identity | |
6160 Select an identity from those configured in @code{mh-identity-list}. | |
6161 All of the information for that identity will be added if the | |
6162 recipient matches. | |
6163 @c ------------------------- | |
6164 @cindex @samp{Fcc:} header field | |
6165 @cindex header field, @samp{Fcc:} | |
6166 @item Fcc Field | |
6167 Insert an @samp{Fcc:} header field with the folder you provide. When | |
6168 you send the message, MH will put a copy of your message in this | |
6169 folder. | |
6170 @c ------------------------- | |
6171 @cindex @samp{Mail-Followup-To:} header field | |
6172 @cindex header field, @samp{Mail-Followup-To:} | |
6173 @item Mail-Followup-To Field | |
6174 Insert an @samp{Mail-Followup-To:} header field with the recipients | |
6175 you provide. If the recipient's mail user agent supports this header | |
6176 field@footnote{@samp{Mail-Followup-To:} is supported by nmh.}, then | |
6177 their replies will go to the addresses listed. This is useful if their | |
6178 replies go both to the list and to you and you don't have a mechanism | |
6179 to suppress duplicates. If you reply to someone not on the list, you | |
6180 must either remove the @samp{Mail-Followup-To:} field, or ensure the | |
6181 recipient is also listed there so that he receives replies to your | |
6182 reply. | |
6183 @c ------------------------- | |
6184 @item Other Field | |
6185 Other header fields may be added using this menu item. | |
6186 @end table | |
6187 | |
6188 @findex mh-insert-auto-fields | |
6189 @kindex C-c M-d | |
6190 @vindex mh-auto-fields-prompt-flag | |
6191 | |
6192 These fields can only be added after the recipient is known. Because | |
6193 you can continue to add recipients as you edit the draft, MH-E waits | |
6194 until the message is sent to perform the auto-insertions. This seems | |
6195 strange at first, but you'll get used to it. There are two ways to | |
6196 help you feel that the desired fields are added. The first is the | |
6197 action when the message is sent: if any fields are added | |
6198 automatically, you are given a chance to see and to confirm these | |
6199 fields before the message is actually sent. You can do away with this | |
6200 confirmation by turning off the option | |
6201 @code{mh-auto-fields-prompt-flag}. The second method is manual: once | |
6202 the header contains one or more recipients, you may run the command | |
6203 @kbd{C-c M-d} (@code{mh-insert-auto-fields}) or choose the | |
6204 @samp{Identity -> Insert Auto Fields} menu item to insert these fields | |
6205 manually. However, if you use this command, the automatic insertion | |
6206 when the message is sent is disabled. | |
6207 | |
6208 @vindex mh-auto-fields-list | |
6209 @vindex mh-identity-list | |
6210 | |
6211 You should avoid using the same header field in | |
6212 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions | |
6213 that may apply to the same message as the result is undefined. | |
6214 | |
6215 @vindex mh-identity-handlers | |
6216 @vindex mh-identity-list | |
6217 | |
6218 The option @code{mh-identity-handlers} is used to change the way that | |
6219 fields, signatures, and attributions in @code{mh-identity-list} are | |
6220 added. To customize @code{mh-identity-handlers}, replace the name of | |
6221 an existing handler function associated with the field you want to | |
6222 change with the name of a function you have written. You can also | |
6223 click on an @samp{INS} button and insert a field of your choice and | |
6224 the name of the function you have written to handle it. | |
6225 | |
6226 @vindex mh-identity-list | |
6227 | |
6228 The @samp{Field} field can be any field that you've used in your | |
6229 @code{mh-identity-list}. The special fields @samp{:attribution-verb}, | |
6230 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the | |
6231 @code{mh-identity-list} choices @samp{Attribution Verb}, | |
6232 @samp{Signature}, and @samp{GPG Key ID} respectively. | |
6233 | |
6234 The handler associated with the @samp{:default} field is used when no | |
6235 other field matches. | |
6236 | |
6237 The handler functions are passed two or three arguments: the field | |
6238 itself (for example, @samp{From}), or one of the special fields (for | |
6239 example, @samp{:signature}), and the action @samp{'remove} or | |
6240 @samp{'add}. If the action is @samp{'add}, an additional argument | |
6241 containing the value for the field is given. | |
6242 | |
6243 @node Speedbar, Menu Bar, Identities, Top | |
6244 @chapter The Speedbar | |
6245 | |
6246 @cindex folder navigation | |
6247 @cindex speedbar | |
6248 @findex mh-visit-folder | |
6249 @kindex F v | |
6250 @kindex M-x speedbar | |
6251 @kindex Mouse-2 | |
6252 | |
6253 You can also use the speedbar | |
6254 @ifnothtml | |
6255 (@pxref{Speedbar, , Speedbar Frames, emacs, The GNU Emacs Manual},) | |
6256 @end ifnothtml | |
6257 @ifhtml | |
6258 (see the section | |
6259 @uref{http://www.gnu.org/software/emacs/manual/html_node/Speedbar.html, | |
6260 Speedbar Frames} in @cite{The GNU Emacs Manual}) | |
6261 @end ifhtml | |
6262 to view your folders. To bring up the speedbar, run @kbd{M-x speedbar | |
6263 @key{RET}}. You will see a new frame appear with all of your MH | |
6264 folders. Folders with unseen messages appear in boldface. Click on a | |
6265 folder name with @kbd{Mouse-2} to visit that folder in a similar | |
6266 fashion to the command @kbd{F v} (@code{mh-visit-folder}) | |
6267 (@pxref{Folders}). Click on the @samp{+} icon to expand and view the | |
6268 sub-folders of that folder. | |
6269 | |
6270 The speedbar can be manipulated with the keyboard as well. Use the | |
6271 Emacs navigational keys (like the arrow keys, or @kbd{C-n}) to move | |
6272 the cursor over the desired folder and then use the shortcuts for the | |
6273 menu items listed in the table below. | |
6274 | |
6275 @table @samp | |
6276 @findex mh-speed-view | |
6277 @item Visit Folder (@key{RET}) | |
6278 Visits the selected folder just as if you had used @kbd{F v} | |
6279 (@code{mh-speed-view}). | |
6280 @c ------------------------- | |
6281 @findex mh-speed-expand-folder | |
6282 @item Expand Nested Folders (@kbd{+}) | |
6283 Expands the selected folder in the speedbar, exposing the children | |
6284 folders inside it (@code{mh-speed-expand-folder}). | |
6285 @c ------------------------- | |
6286 @findex mh-speed-contract-folder | |
6287 @item Contract Nested Folders (@kbd{-}) | |
6288 Contracts or collapses the selected folder in the speedbar, hiding the | |
6289 children folders inside it (@code{mh-speed-contract-folder}). | |
6290 @c ------------------------- | |
6291 @findex mh-speed-refresh | |
6292 @item Refresh Speedbar (@kbd{r}) | |
6293 Regenerates the list of folders in the speedbar. Run this command if | |
6294 you've added or deleted a folder, or want to update the unseen message | |
6295 count before the next automatic update (@code{mh-speed-refresh}). | |
6296 @end table | |
6297 | |
6298 @findex delete-frame | |
6299 @kindex C-x 5 0 | |
6300 @kindex Mouse-3 | |
6301 | |
6302 You can click on @kbd{Mouse-3} to bring up a context menu that | |
6303 contains these items. Dismiss the speedbar with @kbd{C-x 5 0} | |
6304 (@code{delete-frame}). | |
6305 | |
6306 @cindex @command{flists} | |
6307 @cindex MH commands, @command{flists} | |
6308 @cindex @samp{mh-speedbar} customization group | |
6309 @cindex customization group, @samp{mh-speedbar} | |
6310 | |
6311 The MH-E speedbar uses the MH command @command{flists}@footnote{See | |
6312 the section @uref{@value{MH-BOOK-HOME}/morseq.html#flist, Searching for | |
6313 Sequences with flist} in the MH book.} to generate the list of | |
6314 folders. The @samp{mh-speedbar} customization group contains the | |
6315 following option which controls how often the speedbar calls | |
6316 @command{flists}. | |
6317 | |
6318 @vtable @code | |
6319 @item mh-speed-update-interval | |
6320 Time between speedbar updates in seconds (default: 60). Set to 0 to | |
6321 disable automatic update. | |
6322 @end vtable | |
6323 | |
6324 You can modify the appearance of the folders in the speedbar by | |
6325 customizing the following faces. | |
6326 | |
6327 @vtable @code | |
6328 @item mh-speedbar-folder | |
6329 Basic folder face. | |
6330 @c ------------------------- | |
6331 @item mh-speedbar-folder-with-unseen-messages | |
6332 Folder face when folder contains unread messages. | |
6333 @c ------------------------- | |
6334 @item mh-speedbar-selected-folder | |
6335 Selected folder face. | |
6336 @c ------------------------- | |
6337 @item mh-speedbar-selected-folder-with-unseen-messages | |
6338 Selected folder face when folder contains unread messages. | |
6339 @end vtable | |
6340 | |
6341 @node Menu Bar, Tool Bar, Speedbar, Top | |
6342 @chapter The Menu Bar | |
6343 | |
6344 @cindex @samp{Folder} menu | |
6345 @cindex @samp{Identity} menu | |
6346 @cindex @samp{Letter} menu | |
6347 @cindex @samp{Message} menu | |
6348 @cindex @samp{Search} menu | |
6349 @cindex @samp{Sequence} menu | |
6350 @cindex Folder menu | |
6351 @cindex Identity menu | |
6352 @cindex Letter menu | |
6353 @cindex MH-Folder mode | |
6354 @cindex MH-Letter mode | |
6355 @cindex MH-Search mode | |
6356 @cindex Message menu | |
6357 @cindex Search menu | |
6358 @cindex Sequence menu | |
6359 @cindex menu bar | |
6360 @cindex menu, Folder | |
6361 @cindex menu, Identity | |
6362 @cindex menu, Letter | |
6363 @cindex menu, Message | |
6364 @cindex menu, Search | |
6365 @cindex menu, Sequence | |
6366 @cindex menu, @samp{Folder} | |
6367 @cindex menu, @samp{Identity} | |
6368 @cindex menu, @samp{Letter} | |
6369 @cindex menu, @samp{Message} | |
6370 @cindex menu, @samp{Search} | |
6371 @cindex menu, @samp{Sequence} | |
6372 @cindex modes, MH-Folder | |
6373 @cindex modes, MH-Letter | |
6374 @cindex modes, MH-Search | |
6375 | |
6376 For those of you who prefer to mouse and menu instead of using the | |
6377 meta-coke-bottle-bucky keys, MH-E provides menu items for most of its | |
6378 functions. The MH-Folder buffer adds the @samp{Folder}, | |
6379 @samp{Message}, and @samp{Sequence} menus. The MH-Letter buffer adds | |
6380 the @samp{Identity} and @samp{Letter} menus. The MH-Search buffer adds | |
6381 the @samp{Search} menu. There's no need to list the actual items here, | |
6382 as you can more easily see them for yourself, and the functions are | |
6383 already described elsewhere in this manual. | |
6384 | |
6385 For a description of the menu bar, please | |
6386 @ifnothtml | |
6387 @xref{Menu Bar, , The Menu Bar, emacs, The GNU Emacs Manual}. | |
6388 @end ifnothtml | |
6389 @ifhtml | |
6390 see the section | |
6391 @uref{http://www.gnu.org/software/emacs/manual/html_node/Menu-Bar.html, | |
6392 The Menu Bar} in @cite{The GNU Emacs Manual}. | |
6393 @end ifhtml | |
6394 | |
6395 The Emacs manual describes how to get online help for a particular | |
6396 menu item. You can also look up a menu item in the index of this | |
6397 manual in two ways: all of the menu items are listed alphabetically, | |
6398 and you can also browse all of the items under the index entry | |
6399 @samp{menu item}. | |
6400 | |
6401 @node Tool Bar, Searching, Menu Bar, Top | |
6402 @chapter The Tool Bar | |
6403 | |
6404 @cindex tool bar | |
6405 | |
6406 Emacs also provides a graphical tool bar. For a description of the | |
6407 tool bar, please | |
6408 @ifnothtml | |
6409 @xref{Tool Bars, , Tool Bars, emacs, The GNU Emacs Manual}. | |
6410 @end ifnothtml | |
6411 @ifhtml | |
6412 see the section | |
6413 @uref{http://www.gnu.org/software/emacs/manual/html_node/Tool-Bars.html, | |
6414 Tool Bars} in @cite{The GNU Emacs Manual}. | |
6415 @end ifhtml | |
6416 | |
6417 @cindex @samp{mh-tool-bar} customization group | |
6418 @cindex customization group, @samp{mh-tool-bar} | |
6419 | |
6420 MH-E adds several icons to this tool bar; you can modify the MH-E | |
6421 aspects of the tool bar via the @samp{mh-tool-bar} customization group. | |
6422 | |
6423 @vtable @code | |
6424 @item mh-tool-bar-folder-buttons | |
6425 List of buttons to include in MH-Folder tool bar (default: a checklist | |
6426 too long to list here). | |
6427 @c ------------------------- | |
6428 @item mh-tool-bar-letter-buttons | |
6429 List of buttons to include in MH-Letter tool bar (default: a checklist | |
6430 too long to list here). | |
6431 @c ------------------------- | |
6432 @item mh-tool-bar-search-function | |
6433 Function called by the tool bar search button (default: | |
6434 @code{mh-search}). | |
6435 @c ------------------------- | |
6436 @item mh-xemacs-tool-bar-position | |
6437 Tool bar location (default: @samp{Same As Default Tool Bar}). | |
6438 @c ------------------------- | |
6439 @item mh-xemacs-use-tool-bar-flag | |
6440 If @samp{on}, use tool bar (default: @samp{on}, if supported). | |
6441 @end vtable | |
6442 | |
6443 In GNU Emacs, icons for some of MH-E's functions are added to the tool | |
6444 bar. In XEmacs, you have the opportunity to create a separate tool bar for | |
6445 the MH-E icons. | |
6446 | |
6447 @vindex mh-tool-bar-folder-buttons | |
6448 @vindex mh-tool-bar-letter-buttons | |
6449 | |
6450 In either case, you can select which of these functions you'd like to | |
6451 see by customizing the options @code{mh-tool-bar-folder-buttons} and | |
6452 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former | |
6453 customizes the tool bar in MH-Folder mode and the latter in MH-Letter | |
6454 mode. Both of these options present you with a list of functions; | |
6455 check the functions whose icons you want to see and clear the check | |
6456 boxes for those you don't. | |
6457 | |
6458 @findex mh-search | |
6459 @vindex mh-tool-bar-search-function | |
6460 | |
6461 The function associated with the searching icon can be set via the | |
6462 option @code{mh-tool-bar-search-function}. By default, this is set to | |
6463 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other | |
6464 Function} from the @samp{Value Menu} and enter a function of your own | |
6465 choosing. | |
6466 | |
6467 @vindex mh-xemacs-use-tool-bar-flag | |
6468 | |
6469 XEmacs provides a couple of extra options. The first, | |
6470 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E | |
6471 icons at all. By default, this option is turned on if the window | |
6472 system supports tool bars. If your system doesn't support tool bars, | |
6473 then you won't be able to turn on this option. | |
6474 | |
6475 @vindex mh-xemacs-tool-bar-position | |
6476 | |
6477 The second extra option is @code{mh-xemacs-tool-bar-position} which | |
6478 controls the placement of the tool bar along the four edges of the | |
6479 frame. You can choose from one of @samp{Same As Default Tool Bar}, | |
6480 @samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this | |
6481 variable is set to anything other than @samp{Same As Default Tool Bar} | |
6482 and the default tool bar is in a different location, then two tool | |
6483 bars will be displayed: the MH-E tool bar and the default tool bar. | |
6484 | |
6485 @node Searching, Threading, Tool Bar, Top | |
6486 @chapter Searching Through Messages | |
6487 | |
6488 @cindex @samp{Search} menu | |
6489 @cindex menu, @samp{Search} | |
6490 @cindex searching | |
6491 @findex mh-search | |
6492 @kindex F s | |
6493 | |
6494 Earlier, the command @kbd{F s} (@code{mh-search}) was introduced which | |
6495 helps you find messages that lie buried in your folders | |
6496 (@pxref{Folders}). This chapter covers this command in more detail. | |
6497 Several commands are used to compose the search criteria and to start | |
6498 searching. A couple of them can be found in the @samp{Search} menu. | |
6499 | |
6500 @table @kbd | |
6501 @kindex C-c ? | |
6502 @findex mh-help | |
6503 @item C-c ? | |
6504 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
6505 @c ------------------------- | |
6506 @cindex @samp{Search > Perform Search} menu item | |
6507 @cindex menu item, @samp{Search > Perform Search} | |
6508 @kindex C-c C-c | |
6509 @findex mh-index-do-search | |
6510 @item C-c C-c | |
6511 Find messages using @code{mh-search-program} | |
6512 (@code{mh-index-do-search}). | |
6513 @c ------------------------- | |
6514 @cindex @samp{Search > Search with pick} menu item | |
6515 @cindex menu item, @samp{Search > Search with pick} | |
6516 @kindex C-c C-p | |
6517 @findex mh-pick-do-search | |
6518 @item C-c C-p | |
6519 Find messages using @command{pick} (@code{mh-pick-do-search}). | |
6520 @c ------------------------- | |
6521 @kindex C-c ? | |
6522 @findex mh-help | |
6523 @item C-c ? | |
6524 Display cheat sheet for the MH-E commands (@code{mh-help}). | |
6525 @c ------------------------- | |
6526 @kindex C-c C-f C-a | |
6527 @kindex C-c C-f a | |
6528 @findex mh-to-field | |
6529 @item C-c C-f a | |
6530 @itemx C-c C-f C-a | |
6531 Move to @samp{Mail-Reply-To:} header field (@code{mh-to-field}). | |
6532 @c ------------------------- | |
6533 @kindex C-c C-f C-b | |
6534 @kindex C-c C-f b | |
6535 @item C-c C-f b | |
6536 @itemx C-c C-f C-b | |
6537 Move to @samp{Bcc:} header field (@code{mh-to-field}). | |
6538 @c ------------------------- | |
6539 @kindex C-c C-f C-c | |
6540 @kindex C-c C-f c | |
6541 @item C-c C-f c | |
6542 @itemx C-c C-f C-c | |
6543 Move to @samp{Cc:} header field (@code{mh-to-field}). | |
6544 @c ------------------------- | |
6545 @kindex C-c C-f C-d | |
6546 @kindex C-c C-f d | |
6547 @item C-c C-f d | |
6548 @itemx C-c C-f C-d | |
6549 Move to @samp{Dcc:} header field (@code{mh-to-field}). | |
6550 @c ------------------------- | |
6551 @kindex C-c C-f C-f | |
6552 @kindex C-c C-f f | |
6553 @item C-c C-f f | |
6554 @itemx C-c C-f C-f | |
6555 Move to @samp{Fcc:} header field (@code{mh-to-field}). | |
6556 @c ------------------------- | |
6557 @kindex C-c C-f C-l | |
6558 @kindex C-c C-f l | |
6559 @item C-c C-f l | |
6560 @itemx C-c C-f C-l | |
6561 Move to @samp{Mail-Followup-To:} header field (@code{mh-to-field}). | |
6562 @c ------------------------- | |
6563 @kindex C-c C-f C-m | |
6564 @kindex C-c C-f m | |
6565 @item C-c C-f m | |
6566 @itemx C-c C-f C-m | |
6567 Move to @samp{From:} header field (@code{mh-to-field}). | |
6568 @c ------------------------- | |
6569 @kindex C-c C-f C-r | |
6570 @kindex C-c C-f r | |
6571 @item C-c C-f r | |
6572 @itemx C-c C-f C-r | |
6573 Move to @samp{Reply-To:} header field (@code{mh-to-field}). | |
6574 @c ------------------------- | |
6575 @kindex C-c C-f C-s | |
6576 @kindex C-c C-f s | |
6577 @item C-c C-f s | |
6578 @itemx C-c C-f C-s | |
6579 Move to @samp{Subject:} header field (@code{mh-to-field}). | |
6580 @c ------------------------- | |
6581 @kindex C-c C-f C-t | |
6582 @kindex C-c C-f t | |
6583 @item C-c C-f t | |
6584 @itemx C-c C-f C-t | |
6585 Move to @samp{To:} header field (@code{mh-to-field}). | |
6586 @end table | |
6587 | |
6588 Another few commands are available in the MH-Folder buffer resulting | |
6589 from a search. | |
6590 | |
6591 @table @kbd | |
6592 @kindex @key{TAB} | |
6593 @findex mh-index-next-folder | |
6594 @item @key{TAB} | |
6595 Jump to the next folder marker (@code{mh-index-next-folder}). | |
6596 @c ------------------------- | |
6597 @kindex S-@key{TAB} | |
6598 @findex mh-index-previous-folder | |
6599 @item S-@key{TAB} | |
6600 Jump to the previous folder marker (@code{mh-index-previous-folder}). | |
6601 @c ------------------------- | |
6602 @kindex v | |
6603 @findex mh-index-visit-folder | |
6604 @item v | |
6605 Visit original folder from where the message at point was found | |
6606 (@code{mh-index-visit-folder}). | |
6607 @end table | |
6608 | |
6609 @cindex @samp{mh-search} customization group | |
6610 @cindex customization group, @samp{mh-search} | |
6611 | |
6612 There is one option from the @samp{mh-search} customization group used | |
6613 in searching. | |
6614 | |
6615 @vtable @code | |
6616 @item mh-search-program | |
6617 Search program that MH-E shall use (default: @samp{Auto-detect}). | |
6618 @end vtable | |
6619 | |
6620 The following hook is available. | |
6621 | |
6622 @vtable @code | |
6623 @item mh-search-mode-hook | |
6624 Hook run upon entry to @code{mh-search-mode} (default: @code{nil}). | |
6625 @end vtable | |
6626 | |
6627 The following face is available. | |
6628 | |
6629 @vtable @code | |
6630 @item mh-search-folder | |
6631 Folder heading face in MH-Folder buffers created by searches. | |
6632 @end vtable | |
6633 | |
6634 @findex mh-search-folder | |
6635 @kindex F s | |
6636 | |
6637 The command @kbd{F s} (@code{mh-search-folder}) helps you find | |
6638 messages in your entire corpus of mail. You can search for messages to | |
6639 or from a particular person or about a particular subject. In fact, | |
6640 you can also search for messages containing selected strings in any | |
6641 arbitrary header field or any string found within the messages. | |
6642 | |
6643 @cindex @command{pick} | |
6644 @cindex MH commands, @command{pick} | |
6645 | |
6646 Out of the box, MH-E uses @command{pick} to find messages. With a | |
6647 little extra effort, you can set an indexing program which rewards you | |
6648 with extremely quick results. The drawback is that sometimes the index | |
6649 does not contain the words you're looking for. You can still use | |
6650 @command{pick} in these situations. | |
6651 | |
6652 You are prompted for the folder to search. This can be @samp{all} to | |
6653 search all folders. Note that the search works recursively on the | |
6654 listed folder. | |
6655 | |
6656 @cindex MH-Search mode | |
6657 @cindex modes, MH-Search | |
6658 | |
6659 Next, an MH-Search buffer appears where you can enter search criteria. | |
6660 | |
6661 @cartouche | |
6662 @smallexample | |
6663 From: | |
6664 To: | |
6665 Cc: | |
6666 Date: | |
6667 Subject: | |
6668 -------- | |
6669 # | |
6670 | |
6671 | |
6672 | |
6673 | |
6674 | |
6675 | |
6676 | |
6677 | |
6678 --:** search-pattern All L7 (MH-Search)--------------------------- | |
6679 Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help | |
6680 @end smallexample | |
6681 @end cartouche | |
6682 @i{Search window} | |
6683 | |
6684 @cindex @command{pick} | |
6685 @cindex MH commands, @command{pick} | |
6686 | |
6687 Edit this template by entering your search criteria in an appropriate | |
6688 header field that is already there, or create a new field yourself. If | |
6689 the string you're looking for could be anywhere in a message, then | |
6690 place the string underneath the row of dashes. | |
6691 | |
6692 As an example, let's say that we want to find messages from Ginnean | |
6693 about horseback riding in the Kosciusko National Park (Australia) | |
6694 during January, 1994. Normally we would start with a broad search and | |
6695 narrow it down if necessary to produce a manageable amount of data, | |
6696 but we'll cut to the chase and create a fairly restrictive set of | |
6697 criteria as follows: | |
6698 | |
6699 @smallexample | |
6700 @group | |
6701 From: ginnean | |
6702 To: | |
6703 Cc: | |
6704 Date: Jan 1994 | |
6705 Subject: | |
6706 -------- | |
6707 horse | |
6708 kosciusko | |
6709 @end group | |
6710 @end smallexample | |
6711 | |
6712 @findex mh-to-field | |
6713 @kindex C-c C-f C-t | |
6714 | |
6715 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f | |
6716 C-t} (@code{mh-to-field}) to help you fill in the blanks. | |
6717 @xref{Editing Message}. | |
6718 | |
6719 @kindex F s | |
6720 @vindex mh-search-mode-hook | |
6721 | |
6722 If you find that you do the same thing over and over when editing the | |
6723 search template, you may wish to bind some shortcuts to keys. This can | |
6724 be done with the variable @code{mh-search-mode-hook}, which is called | |
6725 when @kbd{F s} is run on a new pattern. | |
6726 | |
6727 @findex mh-index-do-search | |
6728 @findex mh-pick-do-search | |
6729 @kindex C-c C-c | |
6730 @kindex C-c C-p | |
6731 | |
6732 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}). | |
6733 Sometimes you're searching for text that is either not indexed, or | |
6734 hasn't been indexed yet. In this case you can override the default | |
6735 method with the pick method by running the command @kbd{C-c C-p} | |
6736 (@code{mh-pick-do-search}). | |
6737 | |
6738 @cindex folders, @samp{+mhe-index} | |
6739 @cindex @samp{+mhe-index} | |
6740 @findex mh-index-next-folder | |
6741 @findex mh-index-previous-folder | |
6742 @kindex @key{TAB} | |
6743 @kindex S-@key{TAB} | |
6744 @vindex mh-search-folder | |
6745 | |
6746 The messages that are found are put in a temporary sub-folder of | |
6747 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This | |
6748 buffer is special because it displays messages from multiple folders; | |
6749 each set of messages from a given folder has a heading with the folder | |
6750 name. The appearance of the heading can be modified by customizing the | |
6751 face @code{mh-search-folder}. You can jump back and forth between the | |
6752 headings using the commands @kbd{@key{TAB}} | |
6753 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}} | |
6754 (@code{mh-index-previous-folder}). | |
6755 | |
6756 @findex mh-index-visit-folder | |
6757 @findex mh-rescan-folder | |
6758 @kindex F r | |
6759 @kindex v | |
6760 | |
6761 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be | |
6762 used to visit the folder of the message at point. Initially, only the | |
6763 messages that matched the search criteria are displayed in the folder. | |
6764 While the temporary buffer has its own set of message numbers, the | |
6765 actual messages numbers are shown in the visited folder. Thus, the | |
6766 command @kbd{v} is useful to find the actual message number of an | |
6767 interesting message, or to view surrounding messages with the command | |
6768 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}. | |
6769 | |
6770 @findex mh-kill-folder | |
6771 @kindex F k | |
6772 | |
6773 Because this folder is temporary, you'll probably get in the habit of | |
6774 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}). | |
6775 @xref{Folders}. | |
6776 | |
6777 @kindex F s | |
6778 | |
6779 You can regenerate the results by running @kbd{F s} with a prefix | |
6780 argument. | |
6781 | |
6782 @cindex @command{procmail} | |
6783 @cindex Unix commands, @command{procmail} | |
6784 @cindex @samp{X-MHE-Checksum:} header field | |
6785 @cindex header field, @samp{X-MHE-Checksum:} | |
6786 | |
6787 Note: This command uses an @samp{X-MHE-Checksum:} header field to | |
6788 cache the MD5 checksum of a message. This means that if an incoming | |
6789 message already contains an @samp{X-MHE-Checksum:} field, that message | |
6790 might not be found by this command. The following @command{procmail} | |
6791 recipe avoids this problem by renaming the existing header field: | |
6792 | |
6793 @smallexample | |
6794 @group | |
6795 :0 wf | |
6796 | formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum" | |
6797 @end group | |
6798 @end smallexample | |
6799 | |
6800 @xref{Limits}, for an alternative interface to searching. | |
6801 | |
6802 @section Configuring Indexed Searches | |
6803 | |
6804 @cindex @command{grep} | |
6805 @cindex @command{mairix} | |
6806 @cindex @command{namazu} | |
6807 @cindex @command{pick} | |
6808 @cindex @command{swish++} | |
6809 @cindex @command{swish-e} | |
6810 @cindex Unix commands, @command{grep} | |
6811 @cindex Unix commands, @command{mairix} | |
6812 @cindex Unix commands, @command{namazu} | |
6813 @cindex Unix commands, @command{pick} | |
6814 @cindex Unix commands, @command{swish++} | |
6815 @cindex Unix commands, @command{swish-e} | |
6816 @findex mh-search | |
6817 @kindex F s | |
6818 @vindex mh-search-program | |
6819 | |
6820 The command @kbd{F s} (@code{mh-search}) runs the command defined by | |
6821 the option @code{mh-search-program}. The default value is | |
6822 @samp{Auto-detect} which means that MH-E will automatically choose one | |
6823 of @command{swish++}, @command{swish-e}, @command{mairix}, | |
6824 @command{namazu}, @command{pick} and @command{grep} in that order. If, | |
6825 for example, you have both @command{swish++} and @command{mairix} | |
6826 installed and you want to use @command{mairix}, then you can set this | |
6827 option to @samp{mairix}. | |
6828 | |
6829 The following sub-sections describe how to set up the various indexing | |
6830 programs to use with MH-E. | |
6831 | |
6832 @subsection swish++ | |
6833 | |
6834 @cindex @command{swish++} | |
6835 @cindex Unix commands, @command{swish++} | |
6836 | |
6837 In the examples below, replace @file{/home/user/Mail} with the path to | |
6838 your MH directory. | |
6839 | |
6840 First create the directory @file{/home/user/Mail/.swish++}. Then | |
6841 create the file @file{/home/user/Mail/.swish++/swish++.conf} with the | |
6842 following contents: | |
6843 | |
6844 @smallexample | |
6845 @group | |
6846 IncludeMeta Bcc Cc Comments Content-Description From Keywords | |
6847 IncludeMeta Newsgroups Resent-To Subject To | |
6848 IncludeMeta Message-Id References In-Reply-To | |
6849 IncludeFile Mail * | |
6850 IndexFile /home/user/Mail/.swish++/swish++.index | |
6851 @end group | |
6852 @end smallexample | |
6853 | |
6854 Use the following command line to generate the swish index. Run this | |
6855 daily from cron: | |
6856 | |
6857 @smallexample | |
6858 @group | |
6859 find /home/user/Mail -path /home/user/Mail/mhe-index -prune \ | |
6860 -o -path /home/user/Mail/.swish++ -prune \ | |
6861 -o -name "[0-9]*" -print \ | |
6862 | index -c /home/user/Mail/.swish++/swish++.conf - | |
6863 @end group | |
6864 @end smallexample | |
6865 | |
6866 This command does not index the folders that hold the results of your | |
6867 searches in @samp{+mhe-index} since they tend to be ephemeral and the | |
6868 original messages are indexed anyway. | |
6869 | |
6870 @cindex @command{index} | |
6871 @cindex Unix commands, @command{index} | |
6872 @cindex @command{index++} | |
6873 @cindex Unix commands, @command{index++} | |
6874 | |
6875 On some systems (Debian GNU/Linux, for example), use @command{index++} | |
6876 instead of @command{index}. | |
6877 | |
6878 @subsection swish | |
6879 | |
6880 @cindex @command{swish-e} | |
6881 @cindex Unix commands, @command{swish-e} | |
6882 | |
6883 In the examples below, replace @file{/home/user/Mail} with the path to | |
6884 your MH directory. | |
6885 | |
6886 First create the directory @file{/home/user/Mail/.swish}. Then create | |
6887 the file @file{/home/user/Mail/.swish/config} with the following | |
6888 contents: | |
6889 | |
6890 @smallexample | |
6891 @group | |
6892 DefaultContents TXT* | |
6893 IndexDir /home/user/Mail | |
6894 IndexFile /home/user/Mail/.swish/index | |
6895 IndexName "Mail Index" | |
6896 IndexDescription "Mail Index" | |
6897 IndexPointer "http://nowhere" | |
6898 IndexAdmin "nobody" | |
6899 #MetaNames automatic | |
6900 IndexReport 3 | |
6901 FollowSymLinks no | |
6902 UseStemming no | |
6903 IgnoreTotalWordCountWhenRanking yes | |
6904 WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- | |
6905 BeginCharacters abcdefghijklmnopqrstuvwxyz | |
6906 EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 | |
6907 IgnoreLimit 50 1000 | |
6908 IndexComments 0 | |
6909 FileRules filename contains \D | |
6910 FileRules pathname contains /home/user/Mail/.swish | |
6911 FileRules pathname contains /home/user/Mail/mhe-index | |
6912 FileRules filename is index | |
6913 @end group | |
6914 @end smallexample | |
6915 | |
6916 This configuration does not index the folders that hold the results of | |
6917 your searches in @samp{+mhe-index} since they tend to be ephemeral and | |
6918 the original messages are indexed anyway. | |
6919 | |
6920 If there are any directories you would like to ignore, append lines | |
6921 like the following to @file{config}: | |
6922 | |
6923 @smallexample | |
6924 FileRules pathname contains /home/user/Mail/scripts | |
6925 @end smallexample | |
6926 | |
6927 @cindex @command{swish-e} | |
6928 @cindex Unix commands, @command{swish-e} | |
6929 | |
6930 Use the following command line to generate the swish index. Run this | |
6931 daily from cron: | |
6932 | |
6933 @smallexample | |
6934 swish-e -c /home/user/Mail/.swish/config | |
6935 @end smallexample | |
6936 | |
6937 @subsection mairix | |
6938 | |
6939 @cindex @command{mairix} | |
6940 @cindex Unix commands, @command{mairix} | |
6941 | |
6942 In the examples below, replace @file{/home/user/Mail} with the path to | |
6943 your MH directory. | |
6944 | |
6945 First create the directory @file{/home/user/Mail/.mairix}. Then create | |
6946 the file @file{/home/user/Mail/.mairix/config} with the following | |
6947 contents: | |
6948 | |
6949 @smallexample | |
6950 @group | |
6951 base=/home/user/Mail | |
6952 | |
6953 # List of folders that should be indexed. 3 dots at the end means there | |
6954 # are subfolders within the folder | |
6955 mh=archive...:inbox:drafts:news:sent:trash | |
6956 | |
6957 vfolder_format=raw | |
6958 database=/home/user/Mail/mairix/database | |
6959 @end group | |
6960 @end smallexample | |
6961 | |
6962 Use the following command line to generate the mairix index. Run this daily | |
6963 from cron: | |
6964 | |
6965 @smallexample | |
6966 mairix -f /home/user/Mail/.mairix/config | |
6967 @end smallexample | |
6968 | |
6969 @subsection namazu | |
6970 | |
6971 @cindex @command{namazu} | |
6972 @cindex Unix commands, @command{namazu} | |
6973 | |
6974 In the examples below, replace @file{/home/user/Mail} with the path to | |
6975 your MH directory. | |
6976 | |
6977 First create the directory @file{/home/user/Mail/.namazu}. Then create | |
6978 the file @file{/home/user/Mail/.namazu/mknmzrc} with the following | |
6979 contents: | |
6980 | |
6981 @smallexample | |
6982 @group | |
6983 package conf; # Don't remove this line! | |
6984 $ADDRESS = 'user@@localhost'; | |
6985 $ALLOW_FILE = "[0-9]*"; | |
6986 $EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)"; | |
6987 @end group | |
6988 @end smallexample | |
6989 | |
6990 This configuration does not index the folders that hold the results of | |
6991 your searches in @samp{+mhe-index} since they tend to be ephemeral and | |
6992 the original messages are indexed anyway. | |
6993 | |
6994 Use the following command line to generate the namazu index. Run this | |
6995 daily from cron: | |
6996 | |
6997 @smallexample | |
6998 mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \ | |
6999 /home/user/Mail | |
7000 @end smallexample | |
7001 | |
7002 @subsection pick | |
7003 | |
7004 @cindex @command{pick} | |
7005 @cindex MH commands, @command{pick} | |
7006 | |
7007 This search method does not require any setup. | |
7008 | |
7009 Read @command{pick}(1) or the section | |
7010 @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in | |
7011 the MH book to find out more about how to enter the criteria. | |
7012 | |
7013 @subsection grep | |
7014 | |
7015 @cindex @command{grep} | |
7016 @cindex Unix commands, @command{grep} | |
7017 | |
7018 This search method does not require any setup. | |
7019 | |
7020 Unlike the other search methods, this method does not use the | |
7021 MH-Search buffer. Instead, you simply enter a regular expression in | |
7022 the minibuffer. For help in constructing regular expressions, see your | |
7023 man page for @command{grep}. | |
7024 | |
7025 @node Threading, Limits, Searching, Top | |
7026 @chapter Viewing Message Threads | |
7027 | |
7028 @cindex threading | |
7029 | |
7030 MH-E groups messages by @dfn{threads} which are messages that are part | |
7031 of the same discussion and usually all have the same @samp{Subject:} | |
7032 header field. Other ways to organize messages in a folder include | |
7033 limiting (@pxref{Limits}) or using full-text indexed searches | |
7034 (@pxref{Searching}). | |
7035 | |
7036 @cindex root, in threads | |
7037 @cindex siblings, in threads | |
7038 @cindex ancestor, in threads | |
7039 | |
7040 A thread begins with a single message called a @dfn{root}. All replies | |
7041 to the same message are @dfn{siblings} of each other. Any message that | |
7042 has replies to it is an @dfn{ancestor} of those replies. | |
7043 | |
7044 There are several commands that you can use to navigate and operate on | |
7045 threads. | |
7046 | |
7047 @table @kbd | |
7048 @kindex T ? | |
7049 @findex mh-prefix-help | |
7050 @item T ? | |
7051 Display cheat sheet for the commands of the current prefix in | |
7052 minibuffer (@code{mh-prefix-help}). | |
7053 @c ------------------------- | |
7054 @kindex T o | |
7055 @findex mh-thread-refile | |
7056 @item T o | |
7057 Refile (output) thread into folder (@code{mh-thread-refile}). | |
7058 @c ------------------------- | |
7059 @kindex T d | |
7060 @findex mh-thread-delete | |
7061 @item T d | |
7062 Delete thread (@code{mh-thread-delete}). | |
7063 @c ------------------------- | |
7064 @kindex T t | |
7065 @findex mh-toggle-threads | |
7066 @item T t | |
7067 Toggle threaded view of folder (@code{mh-toggle-threads}). | |
7068 @c ------------------------- | |
7069 @kindex T n | |
7070 @findex mh-thread-next-sibling | |
7071 @item T n | |
7072 Display next sibling (@code{mh-thread-next-sibling}). | |
7073 @c ------------------------- | |
7074 @kindex T p | |
7075 @findex mh-thread-previous-sibling | |
7076 @item T p | |
7077 Display previous sibling (@code{mh-thread-previous-sibling}). | |
7078 @c ------------------------- | |
7079 @kindex T u | |
7080 @findex mh-thread-ancestor | |
7081 @item T u | |
7082 Display ancestor of current message (@code{mh-thread-ancestor}). | |
7083 @end table | |
7084 | |
7085 @cindex @samp{mh-thread} customization group | |
7086 @cindex customization group, @samp{mh-thread} | |
7087 | |
7088 The @samp{mh-thread} customization group contains one option. | |
7089 | |
7090 @vtable @code | |
7091 @item mh-show-threads-flag | |
7092 On means new folders start in threaded mode (default: @samp{off}). | |
7093 @end vtable | |
7094 | |
7095 @findex mh-toggle-threads | |
7096 @kindex T t | |
7097 @vindex mh-large-folder | |
7098 @vindex mh-show-threads-flag | |
7099 | |
7100 Threading large number of messages can be time consuming so the option | |
7101 @code{mh-show-threads-flag} is turned off by default. If you turn on | |
7102 this option, then threading will be done only if the number of | |
7103 messages being threaded is less than @code{mh-large-folder}. In any | |
7104 event, threading can be turned on (and off) with the command @kbd{T t} | |
7105 (@code{mh-toggle-threads}). | |
7106 | |
7107 @findex mh-thread-ancestor | |
7108 @findex mh-thread-next-sibling | |
7109 @findex mh-thread-previous-sibling | |
7110 @kindex T n | |
7111 @kindex T p | |
7112 @kindex T u | |
7113 | |
7114 There are a few commands to help you navigate threads. If you do not | |
7115 care for the way a particular thread has turned, you can move up the | |
7116 chain of messages with the command @kbd{T u} | |
7117 (@code{mh-thread-ancestor}. At any point you can use @kbd{T n} | |
7118 (@code{mh-thread-next-sibling} or @kbd{T p} | |
7119 (@code{mh-thread-previous-sibling}) to jump to the next or previous | |
7120 sibling, skipping the sub-threads. The command @kbd{T u} can also take | |
7121 a prefix argument to jump to the message that started everything. | |
7122 | |
7123 @findex mh-delete-subject-or-thread | |
7124 @findex mh-thread-delete | |
7125 @findex mh-thread-refile | |
7126 @kindex k | |
7127 @kindex T d | |
7128 @kindex T o | |
7129 | |
7130 There are threaded equivalents for the commands that delete and refile | |
7131 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the | |
7132 current message and all its children. Similarly, the command @kbd{T d} | |
7133 (@code{mh-thread-delete}) deletes the current message and all its | |
7134 children. These commands do not refile or delete sibling messages. | |
7135 @xref{Navigating}, for a description of the similar command @kbd{k} | |
7136 (@code{mh-delete-subject-or-thread}). | |
7137 | |
7138 @vindex mh-large-folder | |
7139 | |
7140 If you find that threading is too slow, it may be that you have | |
7141 @code{mh-large-folder} set too high. Also, threading is one of the few | |
7142 features of MH-E that really benefits from compiling. If you haven't | |
7143 compiled MH-E, I encourage you to do so@footnote{If you're not sure if | |
7144 MH-E has been byte-compiled, you could try running @samp{locate | |
7145 mh-thread.elc} or otherwise find MH-E on your system and ensure that | |
7146 @file{mh-thread.elc} exists. If you have multiple versions and you | |
7147 find that one is compiled but the other is not, then go into your | |
7148 @samp{*scratch*} buffer in Emacs, enter @kbd{load-path C-j}, and | |
7149 ensure that the byte-compiled version appears first in the | |
7150 @code{load-path}. If you find that MH-E is not compiled and you | |
7151 installed MH-E yourself, please refer to the installation directions | |
7152 in the file @file{README} in the distribution.}. | |
7153 | |
7154 @node Limits, Sequences, Threading, Top | |
7155 @chapter Limiting Display | |
7156 | |
7157 @cindex limits | |
7158 @cindex filters | |
7159 | |
7160 Another way to organize messages in a folder besides threading | |
7161 (@pxref{Threading}) or using full-text indexed searches | |
7162 (@pxref{Searching}) is by limiting the folder display to messages that | |
7163 are similar to the current message. | |
7164 | |
7165 @table @kbd | |
7166 @kindex / ? | |
7167 @findex mh-prefix-help | |
7168 @item / ? | |
7169 Display cheat sheet for the commands of the current prefix in | |
7170 minibuffer (@code{mh-prefix-help}). | |
7171 @c ------------------------- | |
7172 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item | |
7173 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence} | |
7174 @kindex / ' | |
7175 @findex mh-narrow-to-tick | |
7176 @item / ' | |
7177 Limit to messages in the @samp{tick} sequence | |
7178 (@code{mh-narrow-to-tick}). | |
7179 @c ------------------------- | |
7180 @kindex / c | |
7181 @findex mh-narrow-to-cc | |
7182 @item / c | |
7183 Limit to messages with the same @samp{Cc:} field | |
7184 (@code{mh-narrow-to-cc}). | |
7185 @c ------------------------- | |
7186 @kindex / m | |
7187 @findex mh-narrow-to-from | |
7188 @item / m | |
7189 Limit to messages with the same @samp{From:} field | |
7190 (@code{mh-narrow-to-from}). | |
7191 @c ------------------------- | |
7192 @kindex / g | |
7193 @findex mh-narrow-to-range | |
7194 @item / g | |
7195 Limit to range (@code{mh-narrow-to-range}). | |
7196 @c ------------------------- | |
7197 @cindex @samp{Sequence > Narrow to Subject Sequence} menu item | |
7198 @cindex menu item, @samp{Sequence > Narrow to Subject Sequence} | |
7199 @kindex / s | |
7200 @findex mh-narrow-to-subject | |
7201 @item / s | |
7202 Limit to messages with the same @samp{Subject:} field | |
7203 (@code{mh-narrow-to-subject}). | |
7204 @c ------------------------- | |
7205 @kindex / t | |
7206 @findex mh-narrow-to-to | |
7207 @item / t | |
7208 Limit to messages with the same @samp{To:} field | |
7209 (@code{mh-narrow-to-to}). | |
7210 @c ------------------------- | |
7211 @cindex @samp{Sequence > Widen from Sequence} menu item | |
7212 @cindex menu item, @samp{Sequence > Widen from Sequence} | |
7213 @kindex / w | |
7214 @findex mh-widen | |
7215 @item / w | |
7216 Remove last restriction (@code{mh-widen}). | |
7217 @end table | |
7218 | |
7219 All of the limiting commands above refine the display in some way. | |
7220 | |
7221 @cindex @command{pick} | |
7222 @cindex MH commands, @command{pick} | |
7223 @findex mh-narrow-to-cc | |
7224 @findex mh-narrow-to-from | |
7225 @findex mh-narrow-to-subject | |
7226 @findex mh-narrow-to-to | |
7227 @kindex / c | |
7228 @kindex / m | |
7229 @kindex / s | |
7230 @kindex / t | |
7231 | |
7232 The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m} | |
7233 (@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}), | |
7234 and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to | |
7235 messages matching the content of the respective field in the current | |
7236 message. However, you can give any of these a prefix argument to edit | |
7237 the @command{pick} expression used to narrow the view@footnote{See | |
7238 @command{pick}(1) or the section | |
7239 @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in | |
7240 the MH book.}. | |
7241 | |
7242 @cindex @samp{tick} sequence | |
7243 @cindex sequence, @samp{tick} | |
7244 @cindex ticked messages, viewing | |
7245 @findex mh-narrow-to-range | |
7246 @findex mh-narrow-to-tick | |
7247 @kindex / ' | |
7248 @kindex / g | |
7249 | |
7250 You can also limit the display to messages in the @samp{tick} sequence | |
7251 with the command @kbd{/ '} (@code{mh-narrow-to-tick}). | |
7252 @xref{Sequences}, for information on putting message into the | |
7253 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range}) | |
7254 command to limit the display to messages in a range (@pxref{Ranges}). | |
7255 | |
7256 @findex mh-widen | |
7257 @kindex / w | |
7258 | |
7259 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen}) | |
7260 command. Give this command a prefix argument to remove all limits. | |
7261 | |
7262 @node Sequences, Junk, Limits, Top | |
7263 @chapter Using Sequences | |
7264 | |
7265 @cindex @samp{Sequence} menu | |
7266 @cindex menu, @samp{Sequence} | |
7267 @cindex sequences | |
7268 | |
7269 For the whole scoop on MH sequences, refer to | |
7270 @samp{mh-sequence}(5)@footnote{See the section | |
7271 @uref{@value{MH-BOOK-HOME}/morseq.html, More About Sequences} in the MH | |
7272 book.}. As you've read, several of the MH-E commands can operate on a | |
7273 sequence, which is a shorthand for a range or group of messages. For | |
7274 example, you might want to forward several messages to a friend or | |
7275 colleague. Here's how to manipulate sequences. These commands are also | |
7276 available in the @samp{Sequence} menu. | |
7277 | |
7278 @table @kbd | |
7279 @cindex @samp{Sequence > Toggle Tick Mark} menu item | |
7280 @cindex menu item, @samp{Sequence > Toggle Tick Mark} | |
7281 @kindex ' | |
7282 @findex mh-toggle-tick | |
7283 @item ' | |
7284 Toggle tick mark of range (@code{mh-toggle-tick}). | |
7285 @c ------------------------- | |
7286 @kindex S ? | |
7287 @findex mh-prefix-help | |
7288 @item S ? | |
7289 Display cheat sheet for the commands of the current prefix in | |
7290 minibuffer (@code{mh-prefix-help}). | |
7291 @c ------------------------- | |
7292 @cindex @samp{Sequence > Narrow to Tick Sequence} menu item | |
7293 @cindex menu item, @samp{Sequence > Narrow to Tick Sequence} | |
7294 @kindex S ' | |
7295 @findex mh-narrow-to-tick | |
7296 @item S ' | |
7297 Limit to ticked messages (@code{mh-narrow-to-tick}). | |
7298 @c ------------------------- | |
7299 @cindex @samp{Sequence > Delete Message from Sequence...} menu item | |
7300 @cindex menu item, @samp{Sequence > Delete Message from Sequence...} | |
7301 @kindex S d | |
7302 @findex mh-delete-msg-from-seq | |
7303 @item S d | |
7304 Delete range from sequence (@code{mh-delete-msg-from-seq}). | |
7305 @c ------------------------- | |
7306 @cindex @samp{Sequence > Delete Sequence...} menu item | |
7307 @cindex menu item, @samp{Sequence > Delete Sequence...} | |
7308 @kindex S k | |
7309 @findex mh-delete-seq | |
7310 @item S k | |
7311 Delete sequence (@code{mh-delete-seq}). | |
7312 @c ------------------------- | |
7313 @cindex @samp{Sequence > List Sequences in Folder...} menu item | |
7314 @cindex menu item, @samp{Sequence > List Sequences in Folder...} | |
7315 @kindex S l | |
7316 @findex mh-list-sequences | |
7317 @item S l | |
7318 List all sequences in folder (@code{mh-list-sequences}). | |
7319 @c ------------------------- | |
7320 @cindex @samp{Sequence > Narrow to Sequence...} menu item | |
7321 @cindex menu item, @samp{Sequence > Narrow to Sequence...} | |
7322 @kindex S n | |
7323 @findex mh-narrow-to-seq | |
7324 @item S n | |
7325 Restrict display to messages in sequence (@code{mh-narrow-to-seq}). | |
7326 @c ------------------------- | |
7327 @cindex @samp{Sequence > Add Message to Sequence...} menu item | |
7328 @cindex menu item, @samp{Sequence > Add Message to Sequence...} | |
7329 @kindex S p | |
7330 @findex mh-put-msg-in-seq | |
7331 @item S p | |
7332 Add range to sequence (@code{mh-put-msg-in-seq}). | |
7333 @c ------------------------- | |
7334 @cindex @samp{Sequence > List Sequences for Message} menu item | |
7335 @cindex menu item, @samp{Sequence > List Sequences for Message} | |
7336 @kindex S s | |
7337 @findex mh-msg-is-in-seq | |
7338 @item S s | |
7339 Display the sequences in which the current message appears | |
7340 (@code{mh-msg-is-in-seq}). | |
7341 @c ------------------------- | |
7342 @cindex @samp{Sequence > Widen from Sequence} menu item | |
7343 @cindex menu item, @samp{Sequence > Widen from Sequence} | |
7344 @kindex S w | |
7345 @findex mh-widen | |
7346 @item S w | |
7347 Remove last restriction (@code{mh-widen}). | |
7348 @c ------------------------- | |
7349 @findex mh-update-sequences | |
7350 @item M-x mh-update-sequences | |
7351 Flush MH-E's state out to MH@. | |
7352 @end table | |
7353 | |
7354 @cindex @samp{mh-sequences} customization group | |
7355 @cindex customization group, @samp{mh-sequences} | |
7356 | |
7357 The @samp{mh-sequences} customization group contains the options | |
7358 associated with sequences. | |
7359 | |
7360 @vtable @code | |
7361 @item mh-refile-preserves-sequences-flag | |
7362 On means that sequences are preserved when messages are refiled | |
7363 (default: @samp{on}). | |
7364 @c ------------------------- | |
7365 @item mh-tick-seq | |
7366 The name of the MH sequence for ticked messages (default: @samp{'tick}). | |
7367 @c ------------------------- | |
7368 @item mh-update-sequences-after-mh-show-flag | |
7369 On means flush MH sequences to disk after message is shown (default: | |
7370 @samp{on}). | |
7371 @end vtable | |
7372 | |
7373 The following hook is available. | |
7374 | |
7375 @vtable @code | |
7376 @item mh-unseen-updated-hook | |
7377 Hook run after the unseen sequence has been updated (default: @code{nil}). | |
7378 @end vtable | |
7379 | |
7380 @cindex @command{pick} | |
7381 @cindex MH commands, @command{pick} | |
7382 @findex mh-put-msg-in-seq | |
7383 @kindex S p | |
7384 | |
7385 To place a message in a sequence, use @kbd{S p} | |
7386 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all | |
7387 the messages in a sequence to another sequence (for example, @kbd{C-u | |
7388 S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}). | |
7389 | |
7390 @cindex @samp{tick} sequence | |
7391 @cindex sequence, @samp{tick} | |
7392 @cindex ticking messages | |
7393 @findex mh-index-ticked-messages | |
7394 @findex mh-toggle-tick | |
7395 @kindex ' | |
7396 @kindex F ' | |
7397 @kindex S p | |
7398 | |
7399 One specific use of the @kbd{S p} command is @kbd{'} | |
7400 (@code{mh-toggle-tick}) which adds messages to the @samp{tick} | |
7401 sequence. This sequence can be viewed later with the @kbd{F '} | |
7402 (@code{mh-index-ticked-messages}) command (@pxref{Folders}). | |
7403 | |
7404 @vindex mh-tick-seq | |
7405 | |
7406 You can customize the option @code{mh-tick-seq} if you already use the | |
7407 @samp{tick} sequence for your own use. You can also disable all of the | |
7408 ticking functions by choosing the @samp{Disable Ticking} item but | |
7409 there isn't much advantage to that. | |
7410 | |
7411 @cindex MH-Folder mode | |
7412 @cindex modes, MH-Folder | |
7413 @findex mh-narrow-to-seq | |
7414 @findex mh-narrow-to-tick | |
7415 @findex mh-widen | |
7416 @kindex S ' | |
7417 @kindex S n | |
7418 @kindex S w | |
7419 | |
7420 Once you've placed some messages in a sequence, you may wish to narrow | |
7421 the field of view to just those messages in the sequence you've | |
7422 created. To do this, use @kbd{S n} (@code{mh-narrow-to-seq}). You are | |
7423 prompted for the name of the sequence. What this does is show only | |
7424 those messages that are in the selected sequence in the MH-Folder | |
7425 buffer. In addition, it limits further MH-E searches to just those | |
7426 messages. To narrow the view to the messages in the @samp{tick} | |
7427 sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to | |
7428 widen the view to all your messages again, use @kbd{S w} | |
7429 (@code{mh-widen}). | |
7430 | |
7431 @cindex buffers, @samp{*MH-E Sequences*} | |
7432 @cindex @samp{*MH-E Sequences*} | |
7433 @findex mh-list-sequences | |
7434 @findex mh-msg-is-in-seq | |
7435 @kindex S l | |
7436 @kindex S s | |
7437 | |
7438 You can see which sequences in which a message appears with the | |
7439 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to | |
7440 display the sequences in which another message appears (as in @kbd{C-u | |
7441 42 S s @key{RET}}). Or, you can list all sequences in a selected | |
7442 folder (default is current folder) with @kbd{S l} | |
7443 (@code{mh-list-sequences}). The list appears in a buffer named | |
7444 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}). | |
7445 | |
7446 @cindex MH profile component, @samp{Previous-Sequence:} | |
7447 @cindex @samp{cur} sequence | |
7448 @cindex @samp{Previous-Sequence:} MH profile component | |
7449 @cindex sequence, @samp{cur} | |
7450 @cindex sequence, @samp{Previous-Sequence} | |
7451 @vindex mh-refile-preserves-sequences-flag | |
7452 | |
7453 If a message is in any sequence (except | |
7454 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and | |
7455 @samp{cur}) when it is refiled, then it will still be in those | |
7456 sequences in the destination folder. If this behavior is not desired, | |
7457 then turn off the option @code{mh-refile-preserves-sequences-flag}. | |
7458 | |
7459 @findex mh-delete-msg-from-seq | |
7460 @findex mh-delete-seq | |
7461 @kindex d | |
7462 @kindex S d | |
7463 @kindex S k | |
7464 | |
7465 If you want to remove a message (or range, @pxref{Ranges}) from a | |
7466 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want | |
7467 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In | |
7468 the latter case you are prompted for the sequence to delete. Note that | |
7469 this deletes only the sequence, not the messages in the sequence. If | |
7470 you want to delete the messages, use @kbd{C-u d} (@pxref{Reading | |
7471 Mail}). | |
7472 | |
7473 @cindex @samp{Unseen-Sequence:} MH profile component | |
7474 @cindex @samp{cur} sequence | |
7475 @cindex @samp{tick} sequence | |
7476 @cindex MH profile component, @samp{Unseen-Sequence:} | |
7477 @cindex sequence, @samp{Unseen-Sequence} | |
7478 @cindex sequence, @samp{cur} | |
7479 @cindex sequence, @samp{tick} | |
7480 @findex mh-update-sequences | |
7481 @kindex M-x mh-update-sequences | |
7482 @kindex q | |
7483 @kindex x | |
7484 @vindex mh-tick-seq | |
7485 @vindex mh-update-sequences-after-mh-show-flag | |
7486 | |
7487 Three sequences are maintained internally by MH-E and pushed out to MH | |
7488 when a message is shown. They include the sequence specified by your | |
7489 @samp{Unseen-Sequence:} profile component, @samp{cur}, and the | |
7490 sequence listed by the option @code{mh-tick-seq} which is @samp{tick} | |
7491 by default. If you do not like this behavior, turn off the option | |
7492 @code{mh-update-sequences-after-mh-show-flag}. You can then update the | |
7493 state manually with the @kbd{x}, @kbd{q}, or @kbd{M-x | |
7494 mh-update-sequences} commands. | |
7495 | |
7496 @vindex mh-seen-list | |
7497 @vindex mh-unseen-updated-hook | |
7498 | |
7499 The hook @code{mh-unseen-updated-hook} is run after the unseen | |
7500 sequence has been updated. The variable @code{mh-seen-list} can be | |
7501 used by this hook to obtain the list of messages which were removed | |
7502 from the unseen sequence. | |
7503 | |
7504 @cindex @command{mark} | |
7505 @cindex MH commands, @command{mark} | |
7506 @kindex S n | |
7507 @kindex S w | |
7508 | |
7509 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH | |
7510 command dealing with sequences is @command{mark}@footnote{See the | |
7511 section @uref{@value{MH-BOOK-HOME}/mmbwm.html, Make Message Bookmarks | |
7512 with mark} in the MH book.}. | |
7513 | |
7514 @node Junk, Miscellaneous, Sequences, Top | |
7515 @chapter Dealing With Junk Mail | |
7516 | |
7517 @cindex Marshall Rose | |
7518 @cindex junk mail | |
7519 @cindex spam | |
7520 | |
7521 Marshall Rose once wrote a paper on MH entitled, @cite{How to process | |
7522 200 messages a day and still get some real work done}. This chapter | |
7523 could be entitled, @cite{How to process 1000 spams a day and still get | |
7524 some real work done}. | |
7525 | |
7526 @cindex blacklisting | |
7527 @cindex ham | |
7528 @cindex viruses | |
7529 @cindex whitelisting | |
7530 @cindex worms | |
7531 | |
7532 We use the terms @dfn{junk mail} and @dfn{spam} interchangeably for | |
7533 any unwanted message which includes spam, @dfn{viruses}, and | |
7534 @dfn{worms}. The opposite of spam is @dfn{ham}. The act of classifying | |
7535 a sender as one who sends junk mail is called @dfn{blacklisting}; the | |
7536 opposite is called @dfn{whitelisting}. | |
7537 | |
7538 @table @kbd | |
7539 @kindex J ? | |
7540 @findex mh-prefix-help | |
7541 @item J ? | |
7542 Display cheat sheet for the commands of the current prefix in | |
7543 minibuffer (@code{mh-prefix-help}). | |
7544 @c ------------------------- | |
7545 @kindex J b | |
7546 @findex mh-junk-blacklist | |
7547 @item J b | |
7548 Blacklist range as spam (@code{mh-junk-blacklist}). | |
7549 @c ------------------------- | |
7550 @kindex J w | |
7551 @findex mh-junk-whitelist | |
7552 @item J w | |
7553 Whitelist range as ham (@code{mh-junk-whitelist}). | |
7554 @c ------------------------- | |
7555 @item @code{mh-spamassassin-identify-spammers} | |
7556 Identify spammers who are repeat offenders. | |
7557 @end table | |
7558 | |
7559 @cindex @samp{mh-junk} customization group | |
7560 @cindex customization group, @samp{mh-junk} | |
7561 | |
7562 The following table lists the options from the @samp{mh-junk} | |
7563 customization group. | |
7564 | |
7565 @vtable @code | |
7566 @item mh-junk-background | |
7567 If on, spam programs are run in background (default: @samp{off}). | |
7568 @c ------------------------- | |
7569 @item mh-junk-disposition | |
7570 Disposition of junk mail (default: @samp{Delete Spam}). | |
7571 @c ------------------------- | |
7572 @item mh-junk-program | |
7573 Spam program that MH-E should use (default: @samp{Auto-detect}). | |
7574 @end vtable | |
7575 | |
7576 @cindex SpamProbe | |
7577 @cindex Spamassassin | |
7578 @cindex bogofilter | |
7579 @cindex spam filters, SpamProbe | |
7580 @cindex spam filters, Spamassassin | |
7581 @cindex spam filters, bogofilter | |
7582 | |
7583 MH-E depends on @uref{http://spamassassin.apache.org/, SpamAssassin}, | |
7584 @uref{http://bogofilter.sourceforge.net/, bogofilter}, or | |
7585 @uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck | |
7586 away. This chapter describes briefly how to configure these programs | |
7587 to work well with MH-E and how to use MH-E's interface that provides | |
7588 continuing education for these programs. | |
7589 | |
7590 @vindex mh-junk-program | |
7591 | |
7592 The default setting of the option @code{mh-junk-program} is | |
7593 @samp{Auto-detect} which means that MH-E will automatically choose one | |
7594 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for | |
7595 example, you have both SpamAssassin and bogofilter installed and you | |
7596 want to use bogofilter, then you can set this option to | |
7597 @samp{Bogofilter}. | |
7598 | |
7599 @findex mh-junk-blacklist | |
7600 @kindex J b | |
7601 @vindex mh-junk-disposition | |
7602 | |
7603 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam | |
7604 program in use with the content of the range (@pxref{Ranges}) and then | |
7605 handles the message(s) as specified by the option | |
7606 @code{mh-junk-disposition}. By default, this option is set to | |
7607 @samp{Delete Spam} but you can also specify the name of the folder | |
7608 which is useful for building a corpus of spam for training purposes. | |
7609 | |
7610 @findex mh-junk-whitelist | |
7611 @kindex J w | |
7612 | |
7613 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist}) | |
7614 reclassifies a range of messages (@pxref{Ranges}) as ham if it were | |
7615 incorrectly classified as spam. It then refiles the message into the | |
7616 @file{+inbox} folder. | |
7617 | |
7618 @cindex @samp{*MH-E Log*} | |
7619 @cindex buffers, @samp{*MH-E Log*} | |
7620 @findex call-process | |
7621 @vindex mh-junk-background | |
7622 | |
7623 By default, the programs are run in the foreground, but this can be | |
7624 slow when junking large numbers of messages. If you have enough memory | |
7625 or don't junk that many messages at the same time, you might try | |
7626 turning on the option @code{mh-junk-background}. @footnote{Note that | |
7627 the option @code{mh-junk-background} is used as the @code{display} | |
7628 argument in the call to @code{call-process}. Therefore, turning on | |
7629 this option means setting its value to @samp{0}. You can also set its | |
7630 value to @samp{t} to direct the programs' output to the @samp{*MH-E | |
7631 Log*} buffer; this may be useful for debugging.} | |
7632 | |
7633 The following sections discuss the various counter-spam measures that | |
7634 MH-E can work with. | |
7635 | |
7636 @cindex @file{.procmailrc} | |
7637 @cindex files, @file{.procmailrc} | |
7638 | |
7639 @subheading SpamAssassin | |
7640 | |
7641 @cindex Spamassassin | |
7642 @cindex spam filters, Spamassassin | |
7643 | |
7644 SpamAssassin is one of the more popular spam filtering programs. Get | |
7645 it from your local distribution or from the | |
7646 @uref{http://spamassassin.apache.org/, SpamAssassin web site}. | |
7647 | |
7648 To use SpamAssassin, add the following recipes to @file{~/.procmailrc}: | |
7649 | |
7650 @cindex @command{spamc} | |
7651 @cindex @samp{X-Spam-Level:} header field | |
7652 @cindex @samp{X-Spam-Status:} header field | |
7653 @cindex header field, @samp{X-Spam-Level:} | |
7654 @cindex header field, @samp{X-Spam-Status:} | |
7655 | |
7656 @smallexample | |
7657 PATH=$PATH:/usr/bin/mh | |
7658 MAILDIR=$HOME/`mhparam Path` | |
7659 | |
7660 # Fight spam with SpamAssassin. | |
7661 :0fw | |
7662 | spamc | |
7663 | |
7664 # Anything with a spam level of 10 or more is junked immediately. | |
7665 :0: | |
7666 * ^X-Spam-Level: .......... | |
7667 /dev/null | |
7668 | |
7669 :0: | |
7670 * ^X-Spam-Status: Yes | |
7671 spam/. | |
7672 @end smallexample | |
7673 | |
7674 If you don't use @command{spamc}, use @samp{spamassassin -P -a}. | |
7675 | |
7676 Note that one of the recipes above throws away messages with a score | |
7677 greater than or equal to 10. Here's how you can determine a value that | |
7678 works best for you. | |
7679 | |
7680 First, run @samp{spamassassin -t} on every mail message in your | |
7681 archive and use @command{gnumeric} to verify that the average plus the | |
7682 standard deviation of good mail is under 5, the SpamAssassin default | |
7683 for ``spam''. | |
7684 | |
7685 Using @command{gnumeric}, sort the messages by score and view the | |
7686 messages with the highest score. Determine the score which encompasses | |
7687 all of your interesting messages and add a couple of points to be | |
7688 conservative. Add that many dots to the @samp{X-Spam-Level:} header | |
7689 field above to send messages with that score down the drain. | |
7690 | |
7691 In the example above, messages with a score of 5-9 are set aside in | |
7692 the @samp{+spam} folder for later review. The major weakness of | |
7693 rules-based filters is a plethora of false positives so it is | |
7694 worthwhile to check. | |
7695 | |
7696 @findex mh-junk-blacklist | |
7697 @findex mh-junk-whitelist | |
7698 @kindex J b | |
7699 @kindex J w | |
7700 | |
7701 If SpamAssassin classifies a message incorrectly, or is unsure, you can | |
7702 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and | |
7703 @kbd{J w} (@code{mh-junk-whitelist}). | |
7704 | |
7705 @cindex @command{sa-learn} | |
7706 @cindex @file{.spamassassin/user_prefs} | |
7707 @cindex files, @file{.spamassassin/user_prefs} | |
7708 | |
7709 The command @kbd{J b} (@code{mh-junk-blacklist}) adds a | |
7710 @samp{blacklist_from} entry to @file{~/spamassassin/user_prefs}, | |
7711 deletes the message, and sends the message to the Razor, so that | |
7712 others might not see this spam. If the @command{sa-learn} command is | |
7713 available, the message is also recategorized as spam. | |
7714 | |
7715 The command@kbd{J w} (@code{mh-junk-whitelist}) adds a | |
7716 @samp{whitelist_from} rule to @samp{~/.spamassassin/user_prefs}. If | |
7717 the @command{sa-learn} command is available, the message is also | |
7718 recategorized as ham. | |
7719 | |
7720 Over time, you'll observe that the same host or domain occurs | |
7721 repeatedly in the @samp{blacklist_from} entries, so you might think | |
7722 that you could avoid future spam by blacklisting all mail from a | |
7723 particular domain. The utility function | |
7724 @code{mh-spamassassin-identify-spammers} helps you do precisely that. | |
7725 This function displays a frequency count of the hosts and domains in | |
7726 the @samp{blacklist_from} entries from the last blank line in | |
7727 @file{~/.spamassassin/user_prefs} to the end of the file. This | |
7728 information can be used so that you can replace multiple | |
7729 @samp{blacklist_from} entries with a single wildcard entry such as: | |
7730 | |
7731 @smallexample | |
7732 blacklist_from *@@*amazingoffersdirect2u.com | |
7733 @end smallexample | |
7734 | |
7735 In versions of SpamAssassin (2.50 and on) that support a Bayesian | |
7736 classifier, @kbd{J b} @code{(mh-junk-blacklist}) uses the program | |
7737 @command{sa-learn} to recategorize the message as spam. Neither MH-E, | |
7738 nor SpamAssassin, rebuilds the database after adding words, so you | |
7739 will need to run @samp{sa-learn --rebuild} periodically. This can be | |
7740 done by adding the following to your @file{crontab}: | |
7741 | |
7742 @smallexample | |
7743 0 * * * * sa-learn --rebuild > /dev/null 2>&1 | |
7744 @end smallexample | |
7745 | |
7746 @subheading Bogofilter | |
7747 | |
7748 @cindex bogofilter | |
7749 @cindex spam filters, bogofilter | |
7750 | |
7751 Bogofilter is a Bayesian spam filtering program. Get it from your | |
7752 local distribution or from the | |
7753 @uref{http://bogofilter.sourceforge.net/, bogofilter web site}. | |
7754 | |
7755 Bogofilter is taught by running: | |
7756 | |
7757 @smallexample | |
7758 bogofilter -n < good-message | |
7759 @end smallexample | |
7760 | |
7761 on every good message, and | |
7762 | |
7763 @smallexample | |
7764 bogofilter -s < spam-message | |
7765 @end smallexample | |
7766 | |
7767 @cindex full training | |
7768 | |
7769 on every spam message. This is called a @dfn{full training}; three | |
7770 other training methods are described in the FAQ that is distributed | |
7771 with bogofilter. Note that most Bayesian filters need 1000 to 5000 of | |
7772 each type of message to start doing a good job. | |
7773 | |
7774 To use bogofilter, add the following recipes to @file{~/.procmailrc}: | |
7775 | |
7776 @cindex @samp{X-Bogosity:} header field | |
7777 @cindex header field, @samp{X-Bogosity:} | |
7778 | |
7779 @smallexample | |
7780 PATH=$PATH:/usr/bin/mh | |
7781 MAILDIR=$HOME/`mhparam Path` | |
7782 | |
7783 # Fight spam with Bogofilter. | |
7784 :0fw | |
7785 | bogofilter -3 -e -p | |
7786 | |
7787 :0: | |
7788 * ^X-Bogosity: Yes, tests=bogofilter | |
7789 spam/. | |
7790 | |
7791 :0: | |
7792 * ^X-Bogosity: Unsure, tests=bogofilter | |
7793 spam/unsure/. | |
7794 @end smallexample | |
7795 | |
7796 @findex mh-junk-blacklist | |
7797 @findex mh-junk-whitelist | |
7798 @kindex J b | |
7799 @kindex J w | |
7800 | |
7801 If bogofilter classifies a message incorrectly, or is unsure, you can | |
7802 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J | |
7803 w} (@code{mh-junk-whitelist}) to update bogofilter's training. | |
7804 | |
7805 The @cite{Bogofilter FAQ} suggests that you run the following | |
7806 occasionally to shrink the database: | |
7807 | |
7808 @smallexample | |
7809 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new | |
7810 mv wordlist.db wordlist.db.prv | |
7811 mv wordlist.db.new wordlist.db | |
7812 @end smallexample | |
7813 | |
7814 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune | |
7815 bogofilter. | |
7816 | |
7817 @subheading SpamProbe | |
7818 | |
7819 @cindex SpamProbe | |
7820 @cindex spam filters, SpamProbe | |
7821 | |
7822 SpamProbe is a Bayesian spam filtering program. Get it from your local | |
7823 distribution or from the @uref{http://spamprobe.sourceforge.net, | |
7824 SpamProbe web site}. | |
7825 | |
7826 To use SpamProbe, add the following recipes to @file{~/.procmailrc}: | |
7827 | |
7828 @cindex @command{formail} | |
7829 @cindex @samp{X-SpamProbe:} header field | |
7830 @cindex header field, @samp{X-SpamProbe:} | |
7831 | |
7832 @smallexample | |
7833 PATH=$PATH:/usr/bin/mh | |
7834 MAILDIR=$HOME/`mhparam Path` | |
7835 | |
7836 # Fight spam with SpamProbe. | |
7837 :0 | |
7838 SCORE=| spamprobe receive | |
7839 | |
7840 :0 wf | |
7841 | formail -I "X-SpamProbe: $SCORE" | |
7842 | |
7843 :0: | |
7844 *^X-SpamProbe: SPAM | |
7845 spam/. | |
7846 @end smallexample | |
7847 | |
7848 @findex mh-junk-blacklist | |
7849 @findex mh-junk-whitelist | |
7850 @kindex J b | |
7851 @kindex J w | |
7852 | |
7853 If SpamProbe classifies a message incorrectly, you can use the MH-E | |
7854 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w} | |
7855 (@code{mh-junk-whitelist}) to update SpamProbe's training. | |
7856 | |
7857 @subheading Other Things You Can Do | |
7858 | |
7859 There are a couple of things that you can add to @file{~/.procmailrc} | |
7860 in order to filter out a lot of spam and viruses. The first is to | |
7861 eliminate any message with a Windows executable (which is most likely | |
7862 a virus). The second is to eliminate mail in character sets that you | |
7863 can't read. | |
7864 | |
7865 @cindex @samp{Content-Transfer-Encoding:} header field | |
7866 @cindex @samp{Content-Type:} header field | |
7867 @cindex @samp{Subject:} header field | |
7868 @cindex header field, @samp{Content-Transfer-Encoding:} | |
7869 @cindex header field, @samp{Content-Type:} | |
7870 @cindex header field, @samp{Subject:} | |
7871 | |
7872 @smallexample | |
7873 PATH=$PATH:/usr/bin/mh | |
7874 MAILDIR=$HOME/`mhparam Path` | |
7875 | |
7876 # | |
7877 # Filter messages with win32 executables/virii. | |
7878 # | |
7879 # These attachments are base64 and have a TVqQAAMAAAAEAAAA//8AALg | |
7880 # pattern. The string "this program cannot be run in MS-DOS mode" | |
7881 # encoded in base64 is 4fug4AtAnNIbg and helps to avoid false | |
7882 # positives (Roland Smith via Pete from the bogofilter mailing list). | |
7883 # | |
7884 :0 B: | |
7885 * ^Content-Transfer-Encoding:.*base64 | |
7886 * ^TVqQAAMAAAAEAAAA//8AALg | |
7887 * 4fug4AtAnNIbg | |
7888 spam/exe/. | |
7889 | |
7890 # | |
7891 # Filter mail in unreadable character sets (from the Bogofilter FAQ). | |
7892 # | |
7893 UNREADABLE='[^?"]*big5|iso-2022-jp|ISO-2022-KR|euc-kr|gb2312|ks_c_5601-1987' | |
7894 | |
7895 :0: | |
7896 * 1^0 $ ^Subject:.*=\?($UNREADABLE) | |
7897 * 1^0 $ ^Content-Type:.*charset="?($UNREADABLE) | |
7898 spam/unreadable/. | |
7899 | |
7900 :0: | |
7901 * ^Content-Type:.*multipart | |
7902 * B ?? $ ^Content-Type:.*^?.*charset="?($UNREADABLE) | |
7903 spam/unreadable/. | |
7904 @end smallexample | |
7905 | |
7906 @node Miscellaneous, Scan Line Formats, Junk, Top | |
7907 @chapter Miscellaneous Commands, Variables, and Buffers | |
7908 | |
7909 This chapter covers the following command and the various MH-E | |
7910 buffers, | |
7911 | |
7912 @ftable @code | |
7913 @item mh-version | |
7914 Display version information about MH-E and the MH mail handling | |
7915 system. | |
7916 @end ftable | |
7917 | |
7918 @cindex buffers, @samp{*MH-E Info*} | |
7919 @cindex MH-E version | |
7920 @cindex @samp{*MH-E Info*} | |
7921 @cindex version | |
7922 @kindex M-x mh-version | |
7923 | |
7924 One command worth noting is @kbd{M-x mh-version}. You can compare the | |
7925 version this command prints to the latest release (@pxref{Getting | |
7926 MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named | |
7927 @samp{*MH-E Info*}, should usually be included with any bug report you | |
7928 submit (@pxref{Bug Reports}). | |
7929 | |
7930 @subheading MH-E Buffers | |
7931 | |
7932 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates | |
7933 several other buffers. They are: | |
7934 | |
7935 @table @samp | |
7936 @cindex @samp{*MH-E Folders*} | |
7937 @cindex buffers, @samp{*MH-E Folders*} | |
7938 @findex mh-list-folders | |
7939 @item *MH-E Folders* | |
7940 @kindex F l | |
7941 This buffer contains the output of @kbd{F l} (@code{mh-list-folders}). | |
7942 @xref{Folders}. | |
7943 @c ------------------------- | |
7944 @cindex @samp{*MH-E Help*} | |
7945 @cindex buffers, @samp{*MH-E Help*} | |
7946 @findex mh-help | |
7947 @item *MH-E Help* | |
7948 @kindex ? | |
7949 @kindex C-c ? | |
7950 This buffer contains the output of @kbd{?} (@code{mh-help}) and | |
7951 @kbd{C-c ?} in MH-Letter mode. @xref{Using This Manual}. | |
7952 @c ------------------------- | |
7953 @cindex @samp{*MH-E Info*} | |
7954 @cindex buffers, @samp{*MH-E Info*} | |
7955 @item *MH-E Info* | |
7956 This buffer contains the output of @kbd{M-x mh-version @key{RET}}. | |
7957 @c ------------------------- | |
7958 @cindex @samp{*MH-E Log*} | |
7959 @cindex buffers, @samp{*MH-E Log*} | |
7960 @item *MH-E Log* | |
7961 This buffer contains the last 100 lines of the output of the various | |
7962 MH commands. | |
7963 @c ------------------------- | |
7964 @cindex @samp{*MH-E Mail Delivery*} | |
7965 @cindex buffers, @samp{*MH-E Mail Delivery*} | |
7966 @item *MH-E Mail Delivery* | |
7967 This buffer contains the transcript of a mail delivery. @xref{Sending | |
7968 Message}. | |
7969 @c ------------------------- | |
7970 @cindex @samp{*MH-E Recipients*} | |
7971 @cindex buffers, @samp{*MH-E Recipients*} | |
7972 @findex mh-check-whom | |
7973 @item *MH-E Recipients* | |
7974 @kindex C-c C-w | |
7975 This buffer contains the output of @kbd{C-c C-w} | |
7976 (@code{mh-check-whom}) and is killed when draft is sent. | |
7977 @xref{Checking Recipients}. | |
7978 @c ------------------------- | |
7979 @cindex @samp{*MH-E Sequences*} | |
7980 @cindex buffers, @samp{*MH-E Sequences*} | |
7981 @item *MH-E Sequences* | |
7982 This buffer contains the output of @kbd{S l} | |
7983 (@code{mh-list-sequences}). @xref{Sequences}. | |
7984 @c ------------------------- | |
7985 @cindex @samp{*mh-temp*} | |
7986 @cindex buffers, @samp{*mh-temp*} | |
7987 @item *mh-temp* | |
7988 This is a scratch, ephemeral, buffer used by MH-E functions. Note that | |
7989 it is hidden because the first character in the name is a space. | |
7990 You'll generally not have any need for this buffer. | |
7991 @end table | |
7992 | |
7993 @node Scan Line Formats, Procmail, Miscellaneous, Top | |
7994 @appendix Scan Line Formats | |
7995 | |
7996 @cindex scan line formats | |
7997 | |
7998 This appendix discusses how MH-E creates, parses, and manipulates scan | |
7999 lines. If you have your own MH scan or inc format files, you | |
8000 @strong{can} teach MH-E how to handle them, but it isn't easy as | |
8001 you'll see. | |
8002 | |
8003 @cindex @samp{mh-scan-line-formats} customization group | |
8004 @cindex customization group, @samp{mh-scan-line-formats} | |
8005 | |
8006 This table lists the options in the @samp{mh-scan-line-formats} | |
8007 customization group. | |
8008 | |
8009 @vtable @code | |
8010 @item mh-adaptive-cmd-note-flag | |
8011 On means that the message number width is determined dynamically | |
8012 (default: @samp{on}). | |
8013 @c ------------------------- | |
8014 @item mh-scan-format-file | |
8015 Specifies the format file to pass to the scan program (default: | |
8016 @samp{Use MH-E scan Format}). | |
8017 @c ------------------------- | |
8018 @item mh-scan-prog | |
8019 Program used to scan messages (default: @code{"scan"}). | |
8020 @end vtable | |
8021 | |
8022 @vindex mh-adaptive-cmd-note-flag | |
8023 | |
8024 There are a couple of caveats when creating your own scan format file. | |
8025 First, MH-E will not work if your scan lines do not include message | |
8026 numbers. It will work poorly if you don't dedicate a column for | |
8027 showing the current message and notations. You won't be able to use | |
8028 the option @code{mh-adaptive-cmd-note-flag} or the threading features | |
8029 (@pxref{Threading}). | |
8030 | |
8031 @cindex message numbers | |
8032 @findex mh-set-cmd-note | |
8033 @vindex mh-adaptive-cmd-note-flag | |
8034 @vindex mh-scan-format-file | |
8035 | |
8036 If you've created your own format to handle long message numbers, | |
8037 you'll be pleased to know you no longer need it since MH-E adapts its | |
8038 internal format based upon the largest message number if | |
8039 @code{mh-adaptive-cmd-note-flag} is on (the default). If you prefer | |
8040 fixed-width message numbers, turn off @code{mh-adaptive-cmd-note-flag} | |
8041 and call @code{mh-set-cmd-note} with the width specified by your | |
8042 format file (see @code{mh-scan-format-file}). For example, the default | |
8043 width is 4, so you would use @samp{(mh-set-cmd-note 4)}. | |
8044 | |
8045 @vindex mh-adaptive-cmd-note-flag | |
8046 @vindex mh-scan-format-file | |
8047 @vindex mh-scan-format-mh | |
8048 @vindex mh-scan-format-nmh | |
8049 | |
8050 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E | |
8051 scan Format}. This means that the format string will be taken from the | |
8052 either @code{mh-scan-format-mh} or @code{mh-scan-format-nmh} depending | |
8053 on whether MH or nmh (or GNU mailutils) is in use. This setting also | |
8054 enables you to turn on the option @code{mh-adaptive-cmd-note-flag}. | |
8055 You can also set this option to @samp{Use Default scan Format} to get | |
8056 the same output as you would get if you ran @command{scan} from the | |
8057 shell. If you have a format file that you want MH-E to use but not MH, | |
8058 you can set this option to @samp{Specify a scan Format File} and enter | |
8059 the name of your format file. | |
8060 | |
8061 @vindex mh-scan-format-file | |
8062 @vindex mh-scan-format-mh | |
8063 @vindex mh-scan-format-nmh | |
8064 | |
8065 The scan format that MH-E uses when @code{mh-scan-format-file} is set | |
8066 to its default of @samp{Use MH-E scan Format} is held in the variables | |
8067 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on | |
8068 whether you are using nmh (or GNU mailutils) or not. Typically, you | |
8069 create your own format files rather than modifying these variables. | |
8070 The value of @code{mh-scan-format-nmh} is: | |
8071 | |
8072 @smallexample | |
8073 (concat | |
8074 "%4(msg)" | |
8075 "%<(cur)+%| %>" | |
8076 "%<@{replied@}-" | |
8077 "%?(nonnull(comp@{to@}))%<(mymbox@{to@})t%>" | |
8078 "%?(nonnull(comp@{cc@}))%<(mymbox@{cc@})c%>" | |
8079 "%?(nonnull(comp@{bcc@}))%<(mymbox@{bcc@})b%>" | |
8080 "%?(nonnull(comp@{newsgroups@}))n%>" | |
8081 "%<(zero) %>" | |
8082 "%02(mon@{date@})/%02(mday@{date@})%<@{date@} %|*%>" | |
8083 "%<(mymbox@{from@})%<@{to@}To:%14(decode(friendly@{to@}))%>%>" | |
8084 "%<(zero)%17(decode(friendly@{from@}))%> " | |
8085 "%(decode@{subject@})%<@{body@}<<%@{body@}%>") | |
8086 @end smallexample | |
8087 | |
8088 @cindex decoding RFC 2047 | |
8089 @cindex RFC 2047, decoding | |
8090 @vindex mh-scan-format-mh | |
8091 | |
8092 The setting for @code{mh-scan-format-mh} is similar, except that MH | |
8093 doesn't have the function @code{decode} (which is used to decode RFC | |
8094 2047 encodings). | |
8095 | |
8096 @cindex notations, scan line | |
8097 @cindex scan line notations | |
8098 | |
8099 These strings are passed to the @command{scan} program via the | |
8100 @option{-format} argument. The formats are identical to the defaults | |
8101 except that additional hints for fontification have been added to the | |
8102 existing notations in the fifth column (remember that in Emacs, the | |
8103 columns start at 0). The values of the fifth column, in priority | |
8104 order, are: @samp{-} if the message has been replied to, @samp{t} if | |
8105 an address in the @samp{To:} field matches one of the mailboxes of the | |
8106 current user, @samp{c} if the @samp{Cc:} field matches, @samp{b} if | |
8107 the @samp{Bcc:} field matches, and @samp{n} if a non-empty | |
8108 @samp{Newsgroups:} field is present. | |
8109 | |
8110 @cindex @command{scan} | |
8111 @cindex MH commands, @command{scan} | |
8112 @vindex mh-progs | |
8113 @vindex mh-scan-prog | |
8114 | |
8115 The name of the program that generates a listing of one line per | |
8116 message is held in @code{mh-scan-prog} (default: @code{"scan"}). | |
8117 Unless this variable contains an absolute pathname, it is assumed to | |
8118 be in the @code{mh-progs} directory (@pxref{Getting Started}). You may | |
8119 link another program to @command{scan} (see @samp{mh-profile}(5)) to | |
8120 produce a different type of listing@footnote{See the section | |
8121 @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan | |
8122 pick Ranges Sequences} in the MH book.}. | |
8123 | |
8124 @cindex regular expressions, scan line formats | |
8125 @findex mh-set-cmd-note | |
8126 @findex setq | |
8127 | |
8128 If you change the format of the scan lines you'll need to tell MH-E | |
8129 how to parse the new format. As you will see, quite a lot of variables | |
8130 are involved to do that. Use @kbd{M-x apropos @key{RET} | |
8131 mh-scan.*regexp @key{RET}} to obtain a list of these variables. You | |
8132 will also have to call @code{mh-set-cmd-note} if your notations are | |
8133 not in column 4 (columns in Emacs start with 0). Note that unlike most | |
8134 of the user options described in this manual, these are variables and | |
8135 must be set with @code{setq} instead of in a customization buffer. For | |
8136 help with regular expressions, see | |
8137 @ifnothtml | |
8138 @ref{Regexps, , Syntax of Regular Expressions, emacs, The | |
8139 GNU Emacs Manual}. | |
8140 @end ifnothtml | |
8141 @ifhtml | |
8142 section | |
8143 @uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, | |
8144 Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}. | |
8145 @end ifhtml | |
8146 | |
8147 The first variable has to do with pruning out garbage. | |
8148 | |
8149 @vtable @code | |
8150 @cindex @command{inc} | |
8151 @cindex MH commands, @command{inc} | |
8152 @cindex @command{scan} | |
8153 @cindex MH commands, @command{scan} | |
8154 @item mh-scan-valid-regexp | |
8155 This regular expression describes a valid scan line. This is used to | |
8156 eliminate error messages that are occasionally produced by | |
8157 @command{inc}@footnote{See the section | |
8158 @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next | |
8159 prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}). | |
8160 @end vtable | |
8161 | |
8162 Next, many variables control how the scan lines are parsed. | |
8163 | |
8164 @vtable @code | |
8165 @vindex mh-folder-body | |
8166 @vindex mh-folder-font-lock-keywords | |
8167 @item mh-scan-body-regexp | |
8168 This regular expression matches the message body fragment. Note that | |
8169 the default setting of @code{mh-folder-font-lock-keywords} expects | |
8170 this expression to contain at least one parenthesized expression which | |
8171 matches the body text as in the default of | |
8172 @code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not | |
8173 correct, the body fragment will not be highlighted with the face | |
8174 @code{mh-folder-body}. | |
8175 @c ------------------------- | |
8176 @vindex mh-folder-cur-msg-number | |
8177 @vindex mh-folder-font-lock-keywords | |
8178 @vindex mh-note-cur | |
8179 @item mh-scan-cur-msg-number-regexp | |
8180 This regular expression matches the current message. It must match | |
8181 from the beginning of the line. Note that the default setting of | |
8182 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8183 at least one parenthesized expression which matches the message number | |
8184 as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This | |
8185 expression includes the leading space and current message marker | |
8186 @samp{+} within the parenthesis since it looks better to highlight | |
8187 these items as well. The highlighting is done with the face | |
8188 @code{mh-folder-cur-msg-number}. This regular expression should be | |
8189 correct as it is needed by non-fontification functions. See also | |
8190 @code{mh-note-cur}. | |
8191 @c ------------------------- | |
8192 @vindex mh-folder-date | |
8193 @vindex mh-folder-font-lock-keywords | |
8194 @vindex mh-scan-sent-to-me-sender-regexp | |
8195 @item mh-scan-date-regexp | |
8196 This regular expression matches a valid date. It must @strong{not} be | |
8197 anchored to the beginning or the end of the line. Note that the | |
8198 default setting of @code{mh-folder-font-lock-keywords} expects this | |
8199 expression to contain only one parenthesized expression which matches | |
8200 the date field as in the default of | |
8201 @code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is | |
8202 not correct, the date will not be highlighted with the face | |
8203 @code{mh-folder-date}. | |
8204 @c ------------------------- | |
8205 @vindex mh-folder-deleted | |
8206 @vindex mh-folder-font-lock-keywords | |
8207 @vindex mh-note-deleted | |
8208 @item mh-scan-deleted-msg-regexp | |
8209 This regular expression matches deleted messages. It must match from | |
8210 the beginning of the line. Note that the default setting of | |
8211 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8212 at least one parenthesized expression which matches the message number | |
8213 as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression | |
8214 includes the leading space within the parenthesis since it looks | |
8215 better to highlight it as well. The highlighting is done with the face | |
8216 @code{mh-folder-deleted}. This regular expression should be correct as | |
8217 it is needed by non-fontification functions. See also | |
8218 @code{mh-note-deleted}. | |
8219 @c ------------------------- | |
8220 @vindex mh-folder-font-lock-keywords | |
8221 @vindex mh-folder-msg-number | |
8222 @item mh-scan-good-msg-regexp | |
8223 This regular expression matches ``good'' messages. It must match from | |
8224 the beginning of the line. Note that the default setting of | |
8225 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8226 at least one parenthesized expression which matches the message number | |
8227 as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This | |
8228 expression includes the leading space within the parenthesis since it | |
8229 looks better to highlight it as well. The highlighting is done with | |
8230 the face @code{mh-folder-msg-number}. This regular expression should | |
8231 be correct as it is needed by non-fontification functions. | |
8232 @c ------------------------- | |
8233 @vindex mh-scan-format-file | |
8234 @item mh-scan-msg-format-regexp | |
8235 This regular expression finds the message number width in a scan | |
8236 format. Note that the message number must be placed in a parenthesized | |
8237 expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This | |
8238 variable is only consulted if @code{mh-scan-format-file} is set to | |
8239 @samp{Use MH-E scan Format}. | |
8240 @c ------------------------- | |
8241 @vindex mh-scan-format-file | |
8242 @item mh-scan-msg-format-string | |
8243 This is a format string for the width of the message number in a scan | |
8244 format. Use @samp{0%d} for zero-filled message numbers. This variable | |
8245 is only consulted if @code{mh-scan-format-file} is set to @samp{Use | |
8246 MH-E scan Format} (default: @code{"%d"}). | |
8247 @c ------------------------- | |
8248 @item mh-scan-msg-number-regexp | |
8249 This regular expression extracts the message number. It must match | |
8250 from the beginning of the line. Note that the message number must be | |
8251 placed in a parenthesized expression as in the default of @w{@code{"^ | |
8252 *\\([0-9]+\\)"}}. | |
8253 @c ------------------------- | |
8254 @item mh-scan-msg-overflow-regexp | |
8255 This regular expression matches overflowed message numbers (default: | |
8256 @code{"^[?0-9][0-9]"}). | |
8257 @c ------------------------- | |
8258 @item mh-scan-msg-search-regexp | |
8259 This regular expression matches a particular message. It is a format | |
8260 string; use @samp{%d} to represent the location of the message number | |
8261 within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}. | |
8262 @c ------------------------- | |
8263 @vindex mh-folder-address | |
8264 @vindex mh-folder-font-lock-keywords | |
8265 @vindex mh-folder-to | |
8266 @item mh-scan-rcpt-regexp | |
8267 This regular expression specifies the recipient in messages you sent. | |
8268 Note that the default setting of @code{mh-folder-font-lock-keywords} | |
8269 expects this expression to contain two parenthesized expressions. The | |
8270 first is expected to match the @samp{To:} that the default scan format | |
8271 file generates. The second is expected to match the recipient's name | |
8272 as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this | |
8273 regular expression is not correct, the @samp{To:} string will not be | |
8274 highlighted with the face @code{mh-folder-to} and the recipient will not be | |
8275 highlighted with the face @code{mh-folder-address}. | |
8276 @c ------------------------- | |
8277 @vindex mh-folder-font-lock-keywords | |
8278 @vindex mh-folder-refiled | |
8279 @vindex mh-note-refiled | |
8280 @item mh-scan-refiled-msg-regexp | |
8281 This regular expression matches refiled messages. It must match from | |
8282 the beginning of the line. Note that the default setting of | |
8283 @code{mh-folder-font-lock-keywords} expects this expression to contain | |
8284 at least one parenthesized expression which matches the message number | |
8285 as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression | |
8286 includes the leading space within the parenthesis since it looks | |
8287 better to highlight it as well. The highlighting is done with the face | |
8288 @code{mh-folder-refiled}. This regular expression should be correct as | |
8289 it is needed by non-fontification functions. See also | |
8290 @code{mh-note-refiled}. | |
8291 @c ------------------------- | |
8292 @vindex mh-folder-font-lock-keywords | |
8293 @vindex mh-folder-sent-to-me-sender | |
8294 @vindex mh-mh-folder-sent-to-me-hint | |
8295 @vindex mh-scan-format-nmh | |
8296 @item mh-scan-sent-to-me-sender-regexp | |
8297 This regular expression matches messages sent to us. Note that the | |
8298 default setting of @code{mh-folder-font-lock-keywords} expects this | |
8299 expression to contain at least two parenthesized expressions. The | |
8300 first should match the fontification hint (see | |
8301 @code{mh-scan-format-nmh}) and the second should match the user name | |
8302 as in the default of | |
8303 @w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}. | |
8304 If this regular expression is not correct, the notation hints will not | |
8305 be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and | |
8306 the sender will not be highlighted with the face | |
8307 @code{mh-folder-sent-to-me-sender}. | |
8308 @c ------------------------- | |
8309 @vindex mh-folder-followup | |
8310 @vindex mh-folder-font-lock-keywords | |
8311 @vindex mh-folder-subject | |
8312 @item mh-scan-subject-regexp | |
8313 This regular expression matches the subject. It must match from the | |
8314 beginning of the line. Note that the default setting of | |
8315 @samp{mh-folder-font-lock-keywords} expects this expression to contain | |
8316 at least three parenthesized expressions. The first is expected to | |
8317 match the @samp{Re:} string, if any, and is highlighted with the face | |
8318 @code{mh-folder-followup}. The second matches an optional bracketed | |
8319 number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a | |
8320 sub-expression of the first expression). The third is expected to | |
8321 match the subject line itself which is highlighted with the face | |
8322 @code{mh-folder-subject}. For example, the default is | |
8323 @w{@code{"^ *[0-9]+........[ ]*...................}}@* | |
8324 @w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}. | |
8325 This regular expression should be correct as it is needed by | |
8326 non-fontification functions. Note that this example is broken up on | |
8327 two lines for readability, but is actually a single string. | |
8328 @end vtable | |
8329 | |
8330 Finally, there are a slew of variables that control how MH-E annotates | |
8331 the scan lines. | |
8332 | |
8333 @vtable @code | |
8334 @findex mh-set-cmd-note | |
8335 @vindex mh-adaptive-cmd-note-flag | |
8336 @item mh-cmd-note | |
8337 Column for notations (default: 4). This variable should be set with | |
8338 the function @code{mh-set-cmd-note}. This variable may be updated | |
8339 dynamically if @code{mh-adaptive-cmd-note-flag} is on. The following | |
8340 variables contain the notational characters. Note that columns in | |
8341 Emacs start with 0. | |
8342 @c ------------------------- | |
8343 @item mh-note-copied | |
8344 Messages that have been copied are marked by this character (default: | |
8345 @code{?C}). | |
8346 @c ------------------------- | |
8347 @vindex mh-scan-cur-msg-number-regexp | |
8348 @item mh-note-cur | |
8349 The current message (in MH, not in MH-E) is marked by this character | |
8350 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}. | |
8351 @c ------------------------- | |
8352 @vindex mh-scan-deleted-msg-regexp | |
8353 @item mh-note-deleted | |
8354 Messages that have been deleted are marked by this character (default: | |
8355 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}. | |
8356 @c ------------------------- | |
8357 @item mh-note-dist | |
8358 Messages that have been redistributed are marked by this character | |
8359 (default: @code{?R}). | |
8360 @c ------------------------- | |
8361 @item mh-note-forw | |
8362 Messages that have been forwarded are marked by this character | |
8363 (default: @code{?F}). | |
8364 @c ------------------------- | |
8365 @item mh-note-printed | |
8366 Messages that have been printed are marked by this character (default: | |
8367 @code{?P}). | |
8368 @c ------------------------- | |
8369 @vindex mh-scan-refiled-msg-regexp | |
8370 @item mh-note-refiled | |
8371 Messages that have been refiled are marked by this character (default: | |
8372 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}. | |
8373 @c ------------------------- | |
8374 @item mh-note-repl | |
8375 Messages that have been replied to are marked by this character | |
8376 (default: @code{?-}). | |
8377 @c ------------------------- | |
8378 @item mh-note-seq | |
8379 Messages in a user-defined sequence are marked by this character | |
8380 (default: @code{?%}). Messages in the @samp{search} sequence are | |
8381 marked by this character as well. | |
8382 @end vtable | |
8383 | |
8384 For example, let's say I have the following in @file{scan.format} | |
8385 which displays the sender, the subject, and the message number. This | |
8386 format places a @samp{+} after the message number for the current | |
8387 message according to MH; it also uses that column for notations. | |
8388 | |
8389 @smallexample | |
8390 %20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %> | |
8391 @end smallexample | |
8392 | |
8393 @vindex mh-adaptive-cmd-note-flag | |
8394 @vindex mh-scan-format-file | |
8395 @vindex mh-scan-format-file, example | |
8396 | |
8397 The first thing you have to do is tell MH-E to use this file. | |
8398 Customize @code{mh-scan-format-file} and set its value to @samp{Use | |
8399 Default scan Format}. If you didn't get already turn off | |
8400 @code{mh-adaptive-cmd-note-flag}, you'll need to do that first. | |
8401 | |
8402 Next, tell MH-E what a valid scan line looks like so that you can at | |
8403 least display the output of scan in your MH-Folder buffer. | |
8404 | |
8405 @vindex mh-scan-valid-regexp, example | |
8406 | |
8407 @smalllisp | |
8408 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$") | |
8409 @end smalllisp | |
8410 | |
8411 Now, in order to get rid of the @samp{Cursor not pointing to message} | |
8412 message, you need to tell MH-E how to access the message number. You | |
8413 should also see why MH-E requires that you include a message number in | |
8414 the first place. | |
8415 | |
8416 @vindex mh-scan-msg-number-regexp, example | |
8417 @vindex mh-scan-msg-search-regexp, example | |
8418 | |
8419 @smalllisp | |
8420 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$") | |
8421 (setq mh-scan-msg-search-regexp " %d[+D^ ]$") | |
8422 @end smalllisp | |
8423 | |
8424 In order to get the next and previous commands working, add this. | |
8425 | |
8426 @vindex mh-scan-good-msg-regexp, example | |
8427 | |
8428 @smalllisp | |
8429 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$") | |
8430 @end smalllisp | |
8431 | |
8432 Note that the current message isn't marked with a @samp{+} when moving | |
8433 between the next and previous messages. Here is the code required to | |
8434 get this working. | |
8435 | |
8436 @vindex set-mh-cmd-note, example | |
8437 @vindex mh-scan-cur-msg-number-regexp, example | |
8438 | |
8439 @smalllisp | |
8440 (set-mh-cmd-note 76) | |
8441 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$") | |
8442 @end smalllisp | |
8443 | |
8444 Finally, add the following to delete and refile messages. | |
8445 | |
8446 @vindex mh-scan-deleted-msg-regexp, example | |
8447 @vindex mh-scan-refiled-msg-regexp, example | |
8448 | |
8449 @smalllisp | |
8450 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$") | |
8451 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$") | |
8452 @end smalllisp | |
8453 | |
8454 This is just a bare minimum; it's best to adjust all of the regular | |
8455 expressions to ensure that MH-E and highlighting perform well. | |
8456 | |
8457 @node Procmail, Odds and Ends, Scan Line Formats, Top | |
8458 @appendix Reading Mailing Lists Effectively | |
8459 | |
8460 @cindex @command{procmail} | |
8461 @cindex @command{slocal} | |
8462 @cindex Gnus | |
8463 @cindex MH commands, @command{slocal} | |
8464 @cindex Unix commands, @command{procmail} | |
8465 @cindex mailing lists, reading | |
8466 | |
8467 This appendix explains how to use @uref{http://www.procmail.org/, | |
8468 procmail} to file mail from mailing lists into folders which can then | |
8469 be read easily with MH-E@footnote{The MH equivalent, @command{slocal}, | |
8470 can be used as well, but procmail is more flexible and more packages | |
8471 exist for procmail than for slocal.}. Some mailing lists have such | |
8472 high traffic that Gnus must be used and I discuss how to use Gnus | |
8473 side-by-side with MH-E. | |
8474 | |
8475 @cindex @file{.procmailrc} | |
8476 @cindex files, @file{.procmailrc} | |
8477 | |
8478 First, I'll describe how to put mail from your mailing lists directly | |
8479 into an MH folder using @command{procmail}. First, add the following | |
8480 to @file{~/.procmailrc}. While the logging variables aren't strictly | |
8481 necessary, they are extremely useful. | |
8482 | |
8483 @smallexample | |
8484 [1] # Update PATH so procmail can find myrcvstore, rcvstore and mhparam. | |
8485 [2] PATH=$PATH:/usr/lib/mh:/usr/bin/mh:$HOME/bin | |
8486 [3] | |
8487 [4] # Point LOGFILE at the actual log file. | |
8488 [5] LOGFILE=$HOME/.procmail.log | |
8489 [6] | |
8490 [7] # This setting provides just the right amount of information. | |
8491 [8] LOGABSTRACT=all | |
8492 [9] | |
8493 [10] # Uncomment the following line to see how your patterns match. | |
8494 [11] #VERBOSE=yes | |
8495 [12] | |
8496 [13] # Place mail sent to any MH-E mailing list in +mh-e. | |
8497 [14] :0 w: mh-e$LOCKEXT | |
8498 [15] * ^TO.*mh-e-.*@.*sourceforge.net | |
8499 [16] | myrcvstore -create +mh-e | |
8500 @end smallexample | |
8501 | |
8502 @cindex @command{rcvstore} | |
8503 @cindex MH commands, @command{rcvstore} | |
8504 | |
8505 Line 14 creates a lock file in your mail directory based upon the name | |
8506 of the folder. This is done because @command{rcvstore} does not | |
8507 perform locking. While this lock file will prevent @command{procmail} | |
8508 from writing to a folder concurrently, there is a slight chance that | |
8509 you might lose a message if you're performing operations on a folder | |
8510 at the same time @command{rcvstore} is placing a message there. You | |
8511 have been warned. Now that that disclaimer is out of the way, note | |
8512 that I've been using this set-up for over a decade and haven't lost | |
8513 anything to my knowledge@footnote{See | |
8514 @uref{https://savannah.nongnu.org/bugs/?func=detailbug&bug_id=4361&group_id=2166, | |
8515 Savannah issue #4361} to see if @command{rcvstore} locking is still an | |
8516 issue.}. | |
8517 | |
8518 @cindex @samp{Unseen-Sequence:} MH profile component | |
8519 @cindex MH profile component, @samp{Unseen-Sequence:} | |
8520 | |
8521 Line 16 uses the following script, @code{myrcvstore}, to massage the | |
8522 message as described in the comment and file the message in the given | |
8523 folder@footnote{The @samp{-create} argument wasn't always the default | |
8524 to @command{rcvstore}.}. | |
8525 | |
8526 @smallexample | |
8527 #! /bin/sh | |
8528 | |
8529 # Accepts a message on standard input and passes it through rcvstore | |
8530 # after first passing it through any filters. All arguments are passed | |
8531 # on to rcvstore. | |
8532 | |
8533 # Force the "From user date" to become part of header. One reason this | |
8534 # is done is because the presence of the From field confuses dist so | |
8535 # that dist adds a new header, rather than using the existing header. | |
8536 # Note that this should not be done for any message that goes into a | |
8537 # Gnus incoming file (Gnus will thrown an error) nor should it be | |
8538 # applied to any message that goes to the system mailbox because the | |
8539 # entire mailbox will be incorporated as a single message. | |
8540 formail -c -z -R 'From ' X-Envelope-From: | | |
8541 rcvstore $@@ | |
8542 @end smallexample | |
8543 | |
8544 If your version of @command{rcvstore} doesn't add messages to the | |
8545 @samp{unseen} sequence by default, add the following line to your MH | |
8546 profile: | |
8547 | |
8548 @smallexample | |
8549 Unseen-Sequence: unseen | |
8550 @end smallexample | |
8551 | |
8552 Now view your new messages with the speedbar (@pxref{Speedbar}) or with | |
8553 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}. | |
8554 | |
8555 If you're on a mailing list that is so voluminous that it is | |
8556 impossible to read every message, it usually better to read the | |
8557 mailing list like a newsgroup in a news reader. Emacs has a built-in | |
8558 newsreader called Gnus. The remainder of this appendix talks about how | |
8559 to use Gnus with an MH message store. The version of Gnus that was | |
8560 used to prepare this manual was 5.10. Versions 5.8 through 5.10 should | |
8561 work but versions prior to 5.8 use different options. | |
8562 | |
8563 This table contains a list of Gnus options that you will have to | |
8564 modify. Note that for them to become accessible, you'll have to load | |
8565 @file{nnml.el} first. This can be done with @kbd{M-x load-library | |
8566 @key{RET} nnml @key{RET}}. | |
8567 | |
8568 @vtable @code | |
8569 @item gnus-secondary-select-methods | |
8570 Select the @samp{nnml} value. This select method uses directories for | |
8571 folders and individual files for messages, just like MH. You do not | |
8572 have to set an address. | |
8573 @c ------------------------- | |
8574 @item mail-sources | |
8575 Select the @samp{Several files in a directory} value, check the | |
8576 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find | |
8577 your mail. | |
8578 @c ------------------------- | |
8579 @vindex mail-user-agent | |
8580 @item message-mail-user-agent | |
8581 In order to send mail within Gnus using MH-E, set this option to | |
8582 @samp{mail-user-agent} and set the @code{mail-user-agent} option to | |
8583 @samp{Emacs interface to MH}. | |
8584 @c ------------------------- | |
8585 @item nnmail-keep-last-article | |
8586 Since Gnus keeps track of which messages you have read, it would be | |
8587 bad if Gnus expired the last message, for example, message 100, and | |
8588 @command{rcvstore} gave the next new message number 1. Gnus would then | |
8589 ignore it since it thinks that you've read messages 1-100. Turning on | |
8590 this option ensures that the last message is never removed thereby | |
8591 eliminating this problem. | |
8592 @end vtable | |
8593 | |
8594 Next add the following to @file{~/.procmailrc}. If you don't subscribe | |
8595 to the GnuCash mailing list, substitute one to which you are | |
8596 subscribed. | |
8597 | |
8598 @smallexample | |
8599 PATH=$PATH:/usr/bin/mh | |
8600 MAILDIR=$HOME/`mhparam Path` | |
8601 # Place mail sent to the GnuCash mailing list in gnucash.spool, where | |
8602 # Gnus will pick it up. | |
8603 :0: | |
8604 * ^TO.*gnucash.*@.*gnucash.org | |
8605 gnucash.spool | |
8606 @end smallexample | |
8607 | |
8608 Wait for some messages to appear in @file{gnucash.spool} and run Gnus | |
8609 with @kbd{M-x gnus @key{RET}}. To view the folder created in the | |
8610 example above, you would tell Gnus about it the first time only with | |
8611 @kbd{G m gnucash @key{RET} nnml @key{RET}}. In MH-E, this folder is | |
8612 known as @samp{+gnucash}. | |
8613 | |
8614 @node Odds and Ends, History, Procmail, Top | |
8615 @appendix Odds and Ends | |
8616 | |
8617 This appendix covers a few topics that don't fit elsewhere. Here I | |
8618 tell you how to report bugs and how to get on the MH-E mailing lists. | |
8619 I also point out some additional sources of information. | |
8620 | |
8621 @menu | |
8622 * Bug Reports:: | |
8623 * Mailing Lists:: | |
8624 * MH FAQ and Support:: | |
8625 * Getting MH-E:: | |
8626 @end menu | |
8627 | |
8628 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends | |
8629 @appendixsec Bug Reports | |
8630 | |
8631 @cindex bugs | |
8632 @cindex SourceForge | |
8633 @kindex M-x mh-version | |
8634 | |
8635 Bug reports should be filed at | |
8636 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=113357, | |
8637 SourceForge}. You need to be a SourceForge user to submit bug reports, | |
8638 but this is easy enough to do that it shouldn't be a restriction for | |
8639 you. Please include the output of @kbd{M-x mh-version} | |
8640 (@pxref{Miscellaneous}) in any bug report you send unless you're 110% | |
8641 positive we won't ask for it. | |
8642 | |
8643 @node Mailing Lists, MH FAQ and Support, Bug Reports, Odds and Ends | |
8644 @appendixsec MH-E Mailing Lists | |
8645 | |
8646 @cindex SourceForge | |
8647 @cindex mailing lists | |
8648 | |
8649 There are several mailing lists for MH-E. They are @i{mh-e-users at | |
8650 lists.sourceforge.net}, @i{mh-e-announce at lists.sourceforge.net}, | |
8651 and @i{mh-e-devel at lists.sourceforge.net}. You can subscribe or view | |
8652 the archives at @uref{https://sourceforge.net/mail/?group_id=13357, | |
8653 SourceForge}. Do not report bugs on these lists; please submit them | |
8654 via SourceForge (@pxref{Bug Reports}). | |
8655 | |
8656 @node MH FAQ and Support, Getting MH-E, Mailing Lists, Odds and Ends | |
8657 @appendixsec MH FAQ and Support | |
8658 | |
8659 @cindex FAQ | |
8660 @cindex MH FAQ | |
8661 | |
8662 The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently | |
8663 Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup | |
8664 @samp{comp.mail.mh}. While very little is there that deals with MH-E | |
8665 specifically, there is an incredible wealth of material about MH | |
8666 itself which you will find useful. | |
8667 | |
8668 @cindex support | |
8669 | |
8670 You can find FAQs on MH-E at the | |
8671 @uref{https://sourceforge.net/tracker/?group_id=13357&atid=213357, | |
8672 Support Requests} page on SourceForge. If you don't find the answer to | |
8673 your question, file a support request and your question will become a | |
8674 new FAQ! | |
8675 | |
8676 @node Getting MH-E, , MH FAQ and Support, Odds and Ends | |
8677 @appendixsec Getting MH-E | |
8678 | |
8679 @cindex MH-E, obtaining | |
8680 @cindex getting MH-E | |
8681 @cindex obtaining MH-E | |
8682 | |
8683 Because MH-E is undergoing a phase of sustained growth, the version of | |
8684 MH-E in your Emacs is likely to be out of date although it is most | |
8685 likely to be more up to date than the copy that comes with the MH | |
8686 distribution in @file{miscellany/mh-e}. | |
8687 | |
8688 @cindex change log | |
8689 @cindex release notes | |
8690 | |
8691 New MH-E releases are always available for downloading at | |
8692 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357, | |
8693 SourceForge} before they appear in an Emacs release. You can read the | |
8694 release notes on that page to determine if the given release of MH-E | |
8695 is already installed in your version of Emacs. You can also read the | |
8696 change log to see if you are interested in what the given release of | |
8697 MH-E has to offer (although we have no doubt that you will be | |
8698 extremely interested in all new releases). | |
8699 | |
8700 @cindex Debian | |
8701 | |
8702 If you use Debian, you can install the Debian | |
8703 @uref{http://packages.debian.org/unstable/mail/mh-e, mh-e package} | |
8704 instead. | |
8705 | |
8706 @cindex files, @samp{MH-E-NEWS} | |
8707 @cindex files, @samp{README} | |
8708 @cindex news | |
8709 @cindex @samp{MH-E-NEWS} | |
8710 @cindex @samp{README} | |
8711 @kindex M-x mh-version | |
8712 | |
8713 After you download and extract the MH-E tarball, read the | |
8714 @file{README} file and @file{MH-E-NEWS}. These correspond to the | |
8715 release notes and change log mentioned above. The file @file{README} | |
8716 contains instructions on installing MH-E. If you're already running | |
8717 Emacs, please quit that session and start again to load in the new | |
8718 MH-E. Check that you're running the new version with the command | |
8719 @kbd{M-x mh-version}. | |
8720 | |
8721 @cindex contributed software | |
8722 @cindex manual | |
8723 @cindex documentation | |
8724 | |
8725 In addition to the mh-e package, the | |
8726 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357, | |
8727 SourceForge} site also contains doc and contrib packages. The former | |
8728 is the latest release of this manual, and the latter contains a few | |
8729 contributed packages you might find useful. | |
8730 | |
8731 @node History, GFDL, Odds and Ends, Top | |
8732 @appendix History of MH-E | |
8733 | |
8734 @cindex Bill Wohler | |
8735 @cindex Brian Reid | |
8736 @cindex Gildea, Stephen | |
8737 @cindex Jim Larus | |
8738 @cindex Larus, Jim | |
8739 @cindex MH-E, versions | |
8740 @cindex Reid, Brian | |
8741 @cindex SourceForge | |
8742 @cindex Stephen Gildea | |
8743 @cindex Wohler, Bill | |
8744 @cindex history of MH-E | |
8745 @cindex versions of MH-E | |
8746 | |
8747 MH-E was originally written by Brian Reid in 1983 and has changed | |
8748 hands several times since then. Jim Larus wanted to do something | |
8749 similar for GNU Emacs, and ended up completely rewriting it that same | |
8750 year. In 1989, Stephen Gildea picked it up and added many | |
8751 improvements. Bill Wohler then took over in 2000 and moved its | |
8752 development to @uref{http://sourceforge.net/, SourceForge} where it | |
8753 lives today. | |
8754 | |
8755 @menu | |
8756 * From Brian Reid:: | |
8757 * From Jim Larus:: | |
8758 * From Stephen Gildea:: | |
8759 * From Bill Wohler:: | |
8760 @end menu | |
8761 | |
8762 @node From Brian Reid, From Jim Larus, History, History | |
8763 @appendixsec From Brian Reid | |
8764 | |
8765 @cindex Brian Reid | |
8766 @cindex Reid, Brian | |
8767 | |
8768 One day in 1983 I got the flu and had to stay home from work for three | |
8769 days with nothing to do. I used that time to write MHE@. The | |
8770 fundamental idea behind MHE was that it was a ``puppeteer'' driving | |
8771 the MH programs underneath it. MH had a model that the editor was | |
8772 supposed to run as a sub-process of the mailer, which seemed to me at | |
8773 the time to be the tail wagging the dog. So I turned it around and | |
8774 made the editor drive the MH programs. I made sure that the UCI people | |
8775 (who were maintaining MH at the time) took in my changes and made them | |
8776 stick. | |
8777 | |
8778 Today, I still use my own version of MHE because I don't at all like | |
8779 the way that GNU MH-E works and I've never gotten to be good enough at | |
8780 hacking Emacs Lisp to make GNU MH-E do what I want. The Gosling-emacs | |
8781 version of MHE and the GNU Emacs version of MH-E have almost nothing | |
8782 in common except similar names. They work differently, have different | |
8783 conceptual models, and have different key bindings@footnote{After | |
8784 reading this article, I questioned Brian about his version of MHE, and | |
8785 received some great ideas for improving MH-E such as a dired-like | |
8786 method of selecting folders; and removing the prompting when sending | |
8787 mail, filling in the blanks in the draft buffer instead. I passed them | |
8788 on to Stephen Gildea, the current maintainer, and he was excited about | |
8789 the ideas as well. Perhaps one day, MH-E will again resemble MHE | |
8790 (draft form editing was introduced in version 7.4).}. | |
8791 | |
8792 Brian Reid, June 1994 | |
8793 | |
8794 @node From Jim Larus, From Stephen Gildea, From Brian Reid, History | |
8795 @appendixsec From Jim Larus | |
8796 | |
8797 @cindex Jim Larus | |
8798 @cindex Larus, Jim | |
8799 | |
8800 Brian Reid, while at CMU or shortly after going to Stanford wrote a | |
8801 mail reading program called MHE for Gosling Emacs. It had much the | |
8802 same structure as MH-E (i.e., invoked MH programs), though it was | |
8803 simpler and the commands were slightly different. Unfortunately, I no | |
8804 longer have a copy so the differences are lost in the mists of time. | |
8805 | |
8806 In '82-83, I was working at BBN and wrote a lot of mlisp code in | |
8807 Gosling Emacs to make it look more like Tennex Emacs. One of the | |
8808 packages that I picked up and improved was Reid's mail system. In '83, | |
8809 I went back to Berkeley. About that time, Stallman's first version of | |
8810 GNU Emacs came out and people started to move to it from Gosling Emacs | |
8811 (as I recall, the transition took a year or two). I decided to port | |
8812 Reid's MHE and used the mlisp to Emacs Lisp translator that came with | |
8813 GNU Emacs. It did a lousy job and the resulting code didn't work, so I | |
8814 bit the bullet and rewrote the code by hand (it was a lot smaller and | |
8815 simpler then, so it took only a day or two). | |
8816 | |
8817 Soon after that, MH-E became part of the standard Emacs distribution | |
8818 and suggestions kept dribbling in for improvements. MH-E soon reached | |
8819 sufficient functionality to keep me happy, but I kept on improving it | |
8820 because I was a graduate student with plenty of time on my hands and | |
8821 it was more fun than my dissertation. In retrospect, the one thing | |
8822 that I regret is not writing any documentation, which seriously | |
8823 limited the use and appeal of the package. | |
8824 | |
8825 @cindex @command{xmh}, in MH-E history | |
8826 | |
8827 In '89, I came to Wisconsin as a professor and decided not to work on | |
8828 MH-E. It was stable, except for minor bugs, and had enough | |
8829 functionality, so I let it be for a few years. Stephen Gildea of BBN | |
8830 began to pester me about the bugs, but I ignored them. In 1990, he | |
8831 went off to the X Consortium, said good bye, and said that he would | |
8832 now be using @command{xmh}. A few months later, he came back and said | |
8833 that he couldn't stand @command{xmh} and could I put a few more bug fixes | |
8834 into MH-E. At that point, I had no interest in fixing MH-E, so I gave | |
8835 the responsibility of maintenance to him and he has done a fine job | |
8836 since then. | |
8837 | |
8838 Jim Larus, June 1994 | |
8839 | |
8840 @node From Stephen Gildea, From Bill Wohler, From Jim Larus, History | |
8841 @appendixsec From Stephen Gildea | |
8842 | |
8843 @cindex Gildea, Stephen | |
8844 @cindex Stephen Gildea | |
8845 | |
8846 In 1987 I went to work for Bolt Beranek and Newman, as Jim had before | |
8847 me. In my previous job, I had been using RMAIL, but as my folders tend | |
8848 to run large, I was frustrated with the speed of RMAIL@. However, I | |
8849 stuck with it because I wanted the GNU Emacs interface. I am very | |
8850 familiar and comfortable with the Emacs interface (with just a few | |
8851 modifications of my own) and dislike having to use applications with | |
8852 embedded editors; they never live up to Emacs. | |
8853 | |
8854 MH is the mail reader of choice at BBN, so I converted to it. Since I | |
8855 didn't want to give up using an Emacs interface, I started using MH-E. | |
8856 As is my wont, I started hacking on it almost immediately. I first | |
8857 used version 3.4m. One of the first features I added was to treat the | |
8858 folder buffer as a file-visiting buffer: you could lock it, save it, | |
8859 and be warned of unsaved changes when killing it. I also worked to | |
8860 bring its functionality a little closer to RMAIL@. Jim Larus was very | |
8861 cooperative about merging in my changes, and my efforts first appeared | |
8862 in version 3.6, distributed with Emacs 18.52 in 1988. Next I decided | |
8863 MH-E was too slow and optimized it a lot. Version, 3.7, distributed | |
8864 with Emacs 18.56 in 1990, was noticeably faster. | |
8865 | |
8866 When I moved to the X Consortium I became the first person there to | |
8867 not use xmh. (There is now one other engineer there using MH-E.) About | |
8868 this point I took over maintenance of MH-E from Jim and was finally | |
8869 able to add some features Jim hadn't accepted, such as the backward | |
8870 searching undo. My first release was 3.8 (Emacs 18.58) in 1992. | |
8871 | |
8872 Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0. | |
8873 Version 4.0 added many new features, including background folder | |
8874 collection and support for composing @sc{mime} messages. (Reading | |
8875 @sc{mime} messages remains to be done, alas.) While writing this book, | |
8876 Bill Wohler gave MH-E its closest examination ever, uncovering bugs | |
8877 and inconsistencies that required a new major version to fix, and so | |
8878 version 5 was released. | |
8879 | |
8880 Stephen Gildea, June 1994 | |
8881 | |
8882 @node From Bill Wohler, , From Stephen Gildea, History | |
8883 @appendixsec From Bill Wohler | |
8884 | |
8885 @cindex Wohler, Bill | |
8886 @cindex Bill Wohler | |
8887 | |
8888 The preface originally included the following text which I use to | |
8889 begin my story: | |
8890 | |
8891 @quotation | |
8892 But it's important to note a brief history of MH-E. | |
8893 | |
8894 @w{Version 3} was prevalent through the @w{Emacs 18} and early | |
8895 @w{Emacs 19} years. Then @w{Version 4} came out (@w{Emacs 19.23}), | |
8896 which introduced several new and changed commands. Next, @w{Version | |
8897 5.0} was released, which fixed some bugs and incompatibilities, and | |
8898 was incorporated into @w{Emacs 19.29}. | |
8899 @end quotation | |
8900 | |
8901 After a long break, Stephen handed the reins over to me in 2000. I | |
8902 moved the project to a new site called SourceForge and organized a | |
8903 great team of developers. Our first release in late 2001 was version | |
8904 6. It appeared around the time of Emacs 21.2 and had menus and tool | |
8905 bar buttons. | |
8906 | |
8907 Then, indexed searches, improved MIME handling, a speedbar, multiple | |
8908 identities, alias completion, an index view of unseen messages, spam | |
8909 software support, Face and X-Image-URL header field support, Fcc | |
8910 completion, arbitrary range handling, and draft form editing were | |
8911 introduced in the version 7 series around the time of Emacs 21.4 | |
8912 (2004). Still, Emacs itself contained version 5 of MH-E released back | |
8913 in 1994. | |
8914 | |
8915 Version 8 development was mostly driven by the rewrite of the manual. | |
8916 It also brought mailutils support, S/MIME support, picon support, and | |
8917 an improved interface for hiding header fields. The CVS repository was | |
8918 migrated from SourceForge to Savannah (only for those files that were | |
8919 already part of Emacs) and the software was completely reorganized to | |
8920 push back two decades of entropy. Version 8 will appear in Emacs 22.1, | |
8921 expected to be released in 2006. | |
8922 | |
8923 Bill Wohler, February 2006 | |
8924 | |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8925 @node GFDL, Key Index, History, Top |
84306 | 8926 @appendix GNU FREE DOCUMENTATION LICENSE |
95925
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8927 @include doclicense.texi |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8928 |
6e1d885ba36a
Remove option of licensing under GPL.
Glenn Morris <rgm@gnu.org>
parents:
95032
diff
changeset
|
8929 @node Key Index, Command Index, GFDL, Top |
84306 | 8930 @unnumbered Key (Character) Index |
8931 @printindex ky | |
8932 | |
8933 @node Command Index, Option Index, Key Index, Top | |
8934 @unnumbered Command Index | |
8935 @printindex fn | |
8936 | |
8937 @node Option Index, Concept Index, Command Index, Top | |
8938 @unnumbered Option (Variable) Index | |
8939 @printindex vr | |
8940 | |
8941 @node Concept Index, , Option Index, Top | |
8942 @unnumbered Concept Index | |
8943 @printindex cp | |
8944 | |
8945 @bye | |
8946 | |
8947 @c Ispell Helpers | |
8948 @c | |
8949 @c The following are words that ispell should ignore that would not | |
8950 @c normally be in a dictionary (global or personal). Be careful not to | |
8951 @c include words here that could potentially be typos of other words | |
8952 @c (such as url, elisp, or MHE). | |
8953 @c | |
8954 @c LocalWords: CTRL ESC SPC f's | |
8955 @c LocalWords: addr Aliasfile alist | |
8956 @c LocalWords: Baushke Bcc BBN Beranek bogofilter bogofilter's | |
8957 @c LocalWords: cmd CMU contrib cron | |
8958 @c LocalWords: DesBrisay Dcc devel dir dired docstring filll forw | |
8959 @c LocalWords: GECOS Gildea Gildea's Ginnean GnuCash goto gnuserv htm | |
8960 @c LocalWords: ImageMagick inbox ispell keychain | |
8961 @c LocalWords: Larus licensor LocalWords lookup lpr | |
8962 @c LocalWords: makeinfo mairix mbox mh mhbuild mhl mhpath mlisp | |
8963 @c LocalWords: MML msg multipart | |
8964 @c LocalWords: Namazu NIS nenscript nnml num | |
8965 @c LocalWords: packmbox passphrase pathname prev procmail prog repl | |
8966 @c LocalWords: slocal sortm SpamAssassin spammers SpamProbe SpamProbe's | |
8967 @c LocalWords: sublicense supercite speedbar | |
8968 @c LocalWords: Tennex texi texinfo Thelen thelenm | |
8969 @c LocalWords: UCI undeleted whatnow wohler xmh ypcat | |
8970 @c | |
8971 @c See http://www.oreilly.com/oreilly/author/stylesheet.html. | |
8972 @c See http://en.wikipedia.org/. | |
8973 @c | |
8974 @c Note the lowercase mh which is needed to avoid hits in the | |
8975 @c functions and variables. Occasionally, check for accidental | |
8976 @c inclusion of mh in text by uncommenting the following and executing | |
8977 @c it with C-x C-e. You want to see "Search failed" | |
8978 @c (let ((case-fold-search nil)) | |
8979 @c (goto-char (point-min)) | |
8980 @c (search-forward-regexp "^mh\\( \\|$\\)")) | |
8981 @c | |
8982 @c An extremely useful setting for texinfo-mode-hook is: | |
8983 @c (add-to-list | |
8984 @c 'ispell-skip-region-alist | |
8985 @c (list | |
8986 @c (concat "\\(@\\(small\\)?\\(example\\|lisp\\)" | |
8987 @c "\\(@\\([irw]\\|code\\|var\\){[^}]+}\\|" | |
8988 @c "@[@{}.]\\|" | |
8989 @c "[^@]\\|" | |
8990 @c "@\\(end \\)?group\\|" | |
8991 @c "@\\(end \\)?cartouche\\)+" | |
8992 @c "@end \\(small\\)?\\(example\\|lisp\\)\\|" | |
8993 @c "@\\(code\\|command\\|file\\|kbd\\|sc\\){[^}]+}\\|" | |
8994 @c "^@end [a-z]+$\\|" | |
8995 @c "^@\\([fv]\\|print\\)index .*$\\|" | |
8996 @c "@uref{[^,]+,\\|" | |
8997 @c "@[a-z]+\\|" | |
8998 @c "/[a-z.]+[/}]\\)"))))) | |
8999 @c | |
9000 @c Cross References | |
9001 @c | |
9002 @c See existing cross-references to the Emacs manual and the Emacs | |
9003 @c Lisp manual (search for ``GNU Emacs Manual'' and ``GNU | |
9004 @c Emacs Lisp Reference Manual'' respectively). | |
9005 | |
9006 @c @ftable Sorting | |
9007 @c | |
9008 @c As per index (sort of): Punctuation, keyboard characters (such as | |
9009 @c RET and BS) upper and lowercase mixed (lower comes before | |
9010 @c uppercase), control characters go with uppercase C, meta characters | |
9011 @c go with uppercase M. | |
9012 @c In some cases, the sort isn't strictly ASCII. | |
9013 @c For example, SPC (mh-page-msg) reads better before BS | |
9014 @c (mh-previous-page) and . (mh-show) is better before , | |
9015 @c (mh-header-display). | |
9016 | |
9017 @c @vtable Sorting | |
9018 @c | |
9019 @c Alphabetical, pull hooks into their own table. | |
9020 | |
9021 @c Local Variables: | |
9022 @c sentence-end-double-space: nil | |
9023 @c End: | |
9024 | |
9025 @ignore | |
9026 arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef | |
9027 @end ignore |