Commit | Line | Data |
---|---|---|
4009494e GM |
1 | \input texinfo @c -*-texinfo-*- |
2 | @c | |
3 | @c Note: This document requires makeinfo version 4.6 or greater to build. | |
4 | @c | |
5 | @c %**start of header | |
db78a8cb | 6 | @setfilename ../../info/mh-e |
4009494e GM |
7 | @settitle The MH-E Manual |
8 | @c %**end of header | |
9 | ||
10 | @c Version of the software and manual. | |
567b9191 | 11 | @set VERSION 8.0.3+CVS |
4009494e GM |
12 | @c Edition of the manual. It is either empty for the first edition or |
13 | @c has the form ", nth Edition" (without the quotes). | |
14 | @set EDITION | |
2940c053 BW |
15 | @set UPDATED 2008-03-16 |
16 | @set UPDATE-MONTH March, 2008 | |
4009494e GM |
17 | |
18 | @c Other variables. | |
19 | @set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh | |
20 | @set MH-E-HOME http://mh-e.sourceforge.net/ | |
21 | ||
22 | @c Copyright | |
23 | @copying | |
24 | This is version @value{VERSION}@value{EDITION} of @cite{The MH-E | |
25 | Manual}, last updated @value{UPDATED}. | |
26 | ||
6a359279 GM |
27 | Copyright @copyright{} 1995, 2001, 2002, 2003, 2005, 2006, 2007, 2008 |
28 | Free Software Foundation, Inc. | |
4009494e GM |
29 | |
30 | @quotation | |
6a359279 GM |
31 | Permission is granted to copy, distribute and/or modify this document |
32 | under the terms of the GNU Free Documentation License, Version 1.2 or | |
33 | any later version published by the Free Software Foundation; with no | |
34 | Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' | |
35 | and with the Back-Cover Texts as in (a) below. A copy of the license | |
36 | is included in the section entitled ``GNU Free Documentation License.'' | |
37 | ||
38 | (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and | |
39 | modify this GNU manual. Buying copies from the FSF supports it in | |
40 | developing GNU and promoting software freedom.'' | |
4009494e GM |
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 | |
4009494e GM |
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 | |
30864d5f BW |
206 | shouldn't have to do anything special to use it. Gnus is also |
207 | required; version 5.10 or higher is recommended. This manual covers | |
4009494e GM |
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 ------------------------- | |
bfe16263 BW |
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 ------------------------- | |
4009494e GM |
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 | |
2940c053 BW |
2075 | header field should be generally ignored, please update |
2076 | @uref{https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357, | |
2077 | SF #1916032}. | |
4009494e GM |
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 | ||
bfe16263 BW |
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 | ||
4009494e GM |
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 | |
4009494e GM |
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 | |
567b9191 BW |
2567 | the content of the link in @samp{w3m}. The @samp{w3m} browser handles |
2568 | tables well and actually respects the table's width parameter (which | |
2569 | can cause text to wrap if the author didn't anticipate that the page | |
2570 | would be viewed in Emacs). | |
4009494e GM |
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 | ||
567b9191 BW |
2648 | @cindex @file{.emacs} |
2649 | @cindex files, @file{.emacs} | |
2650 | @findex browse-url-at-mouse | |
2651 | @kindex S-Mouse-2 | |
2652 | ||
2653 | A useful key binding that you can add to to @file{~/.emacs} is the | |
2654 | following which displays an HTML link or textual URL in an external | |
2655 | browser when clicked with @kbd{S-mouse-2}. This binding works in any | |
2656 | buffer, including HTML buffers. | |
2657 | ||
2658 | @smalllisp | |
2659 | (global-set-key [S-mouse-2] 'browse-url-at-mouse) | |
2660 | @end smalllisp | |
2661 | ||
4009494e GM |
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 | |
bfe16263 | 3556 | @vindex mh-current-folder |
4009494e GM |
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 | |
bfe16263 BW |
3949 | @item mh-annotate-msg-hook |
3950 | Hook run by @code{mh-annotate-msg} after annotation (default: | |
3951 | @code{nil}). | |
3952 | @c ------------------------- | |
4009494e GM |
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 | ||
bfe16263 BW |
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. | |
4009494e GM |
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. | |
30864d5f BW |
4234 | These are inline attachments so the forwarded message should appear in |
4235 | the body of your recipient's mail program. If you would prefer to | |
4236 | forward your messages verbatim (as text, inline), then turn off this | |
4237 | option. Forwarding messages verbatim works well for short, textual | |
4238 | messages, but your recipient won't be able to view any non-textual | |
4239 | attachments that were in the forwarded message. Be aware that if you | |
4240 | have @samp{forw: -mime} in your MH profile, then forwarded messages | |
4241 | will always be included as attachments regardless of the settings of | |
4242 | @code{mh-compose-forward-as-mime-flag}. | |
4009494e GM |
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 | ||
bfe16263 BW |
4304 | The hook @code{mh-annotate-msg-hook} is run after annotating the |
4305 | message and scan line (@pxref{Sending Mail}). | |
4306 | ||
4009494e GM |
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 |