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