mh-e.texi 315 KB
 Glenn Morris committed Sep 06, 2007 1 2 3 4 5 ``````\input texinfo @c -*-texinfo-*- @c @c Note: This document requires makeinfo version 4.6 or greater to build. @c @c %**start of header `````` Glenn Morris committed Sep 06, 2007 6 ``````@setfilename ../../info/mh-e `````` Glenn Morris committed Sep 06, 2007 7 8 9 10 ``````@settitle The MH-E Manual @c %**end of header @c Version of the software and manual. `````` Bill Wohler committed Sep 20, 2011 11 ``````@set VERSION 8.3 `````` Glenn Morris committed Sep 06, 2007 12 13 ``````@c Edition of the manual. It is either empty for the first edition or @c has the form ", nth Edition" (without the quotes). `````` Bill Wohler committed Jun 13, 2009 14 ``````@set EDITION `````` Bill Wohler committed Sep 20, 2011 15 16 ``````@set UPDATED 2011-09-20 @set UPDATE-MONTH September, 2011 `````` Glenn Morris committed Sep 06, 2007 17 18 19 20 21 22 23 24 25 26 `````` @c Other variables. @set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh @set MH-E-HOME http://mh-e.sourceforge.net/ @c Copyright @copying This is version @value{VERSION}@value{EDITION} of @cite{The MH-E Manual}, last updated @value{UPDATED}. `````` Glenn Morris committed Jan 05, 2012 27 ``````Copyright @copyright{} 1995, 2001-2003, 2005-2012 Free Software Foundation, Inc. `````` Glenn Morris committed Sep 06, 2007 28 `````` `````` Bill Wohler committed Sep 21, 2008 29 30 ``````@c This dual license has been agreed upon by the FSF. `````` Glenn Morris committed Sep 06, 2007 31 ``````@quotation `````` Glenn Morris committed Jun 15, 2008 32 ``````Permission is granted to copy, distribute and/or modify this document `````` Bill Wohler committed Sep 21, 2008 33 34 35 36 ``````under the terms of either: @enumerate a @item `````` Glenn Morris committed Nov 19, 2008 37 ``````the GNU Free Documentation License, Version 1.3 or any later version `````` Bill Wohler committed Sep 21, 2008 38 39 40 41 ``````published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' `````` Glenn Morris committed Jun 15, 2008 42 43 `````` (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and `````` Bill Wohler committed Sep 21, 2008 44 ``````modify this GNU manual. Buying copies from the FSF supports it in `````` Glenn Morris committed Jun 15, 2008 45 ``````developing GNU and promoting software freedom.'' `````` Bill Wohler committed Sep 21, 2008 46 47 48 49 50 51 52 53 `````` @item the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. A copy of the license is included in the section entitled ``GNU General Public License.'' @end enumerate `````` Glenn Morris committed Sep 06, 2007 54 55 56 57 ``````@end quotation @end copying @c Info Directory Entry `````` Eli Zaretskii committed Feb 18, 2011 58 ``````@dircategory Emacs network features `````` Glenn Morris committed Sep 06, 2007 59 ``````@direntry `````` Glenn Morris committed Jun 22, 2010 60 ``````* MH-E: (mh-e). Emacs interface to the MH mail system. `````` Glenn Morris committed Sep 06, 2007 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 ``````@end direntry @c Title Page @titlepage @title The MH-E Manual @subtitle Version @value{VERSION}@value{EDITION} @subtitle @value{UPDATE-MONTH} @author Bill Wohler @c Copyright Page @page @vskip 0pt plus 1filll @insertcopying @end titlepage @ifnottex @html @end html @insertcopying @end ifnottex @c Table of Contents @contents @html @end html @node Preface, Conventions, Top, Top @unnumbered Preface @cindex Emacs @cindex Unix commands, Emacs @cindex preface This manual introduces another interface to the MH mail system that is accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is easy to use. I don't assume that you know GNU Emacs or even MH at this point, since I didn't know either of them when I discovered MH-E. However, MH-E was the tip of the iceberg, and I discovered more and more niceties about GNU Emacs and MH@. Now I'm fully hooked on both of them. `````` Glenn Morris committed Feb 19, 2011 214 ``````The MH-E package is distributed with Emacs@footnote{Version `````` Bill Wohler committed Sep 20, 2011 215 216 217 218 219 ``````@value{VERSION} of MH-E appeared in Emacs 24.1. It is supported in GNU Emacs 23 and higher, as well as XEmacs 21.4.22 and 21.5.31. MH-E is known not to work with GNU Emacs versions 20 and below, and XEmacs version 21.5.9 - 21.5.16. It is compatible with MH versions 6.8.4 and higher, all versions of nmh, and GNU mailutils 1.0 and higher}, so you `````` Bill Wohler committed Mar 16, 2008 220 221 ``````shouldn't have to do anything special to use it. Gnus is also required; version 5.10 or higher is recommended. This manual covers `````` Glenn Morris committed Sep 06, 2007 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 ``````MH-E version @value{VERSION}. To help you decide which version you have, see @ref{Getting Started}. @findex help-with-tutorial @kindex C-h t If you don't already use GNU Emacs but want to learn more, you can read an online tutorial by starting GNU Emacs and typing @kbd{C-h t} (@code{help-with-tutorial}). (To learn about this notation, see @ref{Conventions}.) If you want to take the plunge, consult the @iftex @cite{GNU Emacs Manual}, @end iftex @ifinfo @ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual}, @end ifinfo @ifhtml @uref{http://www.gnu.org/software/emacs/manual/html_node/, @cite{GNU Emacs Manual}}, @end ifhtml from the Free Software Foundation. If more information is needed, you can go to the Unix manual pages of the individual MH commands. When the name is not obvious, I'll guide you to a relevant MH manual page that describes the action more fully. @cindex @cite{MH & nmh: Email for Users & Programmers} @cindex MH book @cindex info @kindex C-h i This manual is available in both Info and online formats. The Info version is distributed with Emacs and can be accessed with the @command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i m mh-e @key{RET}}). The online version is available at @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great online resource is the book @uref{http://www.ics.uci.edu/~mh/book/, @cite{MH & nmh: Email for Users & Programmers}} (also known as @dfn{the MH book}). I hope you enjoy this manual! If you have any comments, or suggestions for this document, please let me know. @cindex Bill Wohler @cindex Wohler, Bill @noindent Bill Wohler <@i{wohler at newt.com}>@* 8 February 1995@* 24 February 2006 @node Conventions, Getting Started, Preface, Top @chapter GNU Emacs Terms and Conventions @cindex Emacs @cindex Emacs, conventions @cindex Emacs, terms @cindex Unix commands, Emacs @cindex conventions, Emacs @cindex terms, Emacs If you're an experienced Emacs user, you can skip the following conventions and definition of terms and go directly to the next section (@pxref{Getting Started}). @cindex Emacs commands @cindex MH commands @cindex Unix commands @cindex commands @cindex commands, MH @cindex commands, Unix @cindex commands, shell @cindex functions @cindex shell commands In general, @dfn{functions} in this text refer to Emacs Lisp functions that one would call from within Emacs Lisp programs (for example, @code{(mh-inc-folder)}). On the other hand, @dfn{commands} are those things that are run by the user, such as @kbd{i} or @kbd{M-x mh-inc-folder}. Programs outside of Emacs are specifically called MH commands, shell commands, or Unix commands. @cindex conventions, key names @cindex key names The conventions for key names are as follows: @table @kbd @item C-x Hold down the @key{CTRL} (Control) key and press the @kbd{x} key. @c ------------------------- @item M-x Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key. Since some keyboards don't have a @key{META} key, you can generate @kbd{M-x}, for example, by pressing @key{ESC} (Escape), @emph{releasing it}, and then pressing the @kbd{x} key. @c ------------------------- @item @key{RET} Press the @key{RETURN} or @key{ENTER} key. This is normally used to complete a command. @c ------------------------- @item @key{SPC} Press the space bar. @c ------------------------- @item @key{TAB} Press the @key{TAB} key. @c ------------------------- @item @key{DEL} Press the @key{DELETE} key. @c ------------------------- @item @key{BS} Press the @key{BACKSPACE} key@footnote{If you are using Version 20 or earlier of Emacs, you will need to use the @key{DEL} key.}. @end table @cindex Emacs, prefix argument @cindex prefix argument @kindex C-u A @dfn{prefix argument} allows you to pass an argument to any Emacs function. To pass an argument, type @kbd{C-u} before the Emacs command or keystroke. Numeric arguments can be passed as well. For example, to insert five f's, use @kbd{C-u 5 f}. There is a default of four when using @kbd{C-u}, and you can use multiple prefix arguments to provide arguments of powers of four. To continue our example, you could insert four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with @kbd{C-u C-u C-u f}, and so on. Numeric and valueless negative arguments can also be inserted with the @key{META} key. Examples include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which specifies a negative argument with no particular value. @sp 1 @center @strong{NOTE} @quotation The prefix @kbd{C-u} or @kbd{M-} is not necessary in MH-E's MH-Folder mode (@pxref{Reading Mail Tour}). In this mode, simply enter the numerical argument before entering the command. @end quotation @sp 1 @cindex @file{.emacs} @cindex Emacs, variables @cindex files, @file{.emacs} @cindex variables @findex setq Emacs uses @dfn{variables} to hold values. These can be changed via calls to the function @code{setq} in @file{~/.emacs}. @cindex Emacs, options @cindex options @findex customize-group @findex customize-option Variables in MH-E that are normally modified by the user are called @dfn{options} and are modified through the customize functions (such as @kbd{M-x customize-option} or @kbd{M-x customize-group}). @ifnothtml @xref{Easy Customization,,,emacs,The GNU Emacs Manual}, in @cite{The GNU Emacs Manual}. @end ifnothtml @ifhtml See section @uref{http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html, Easy Customization} in @cite{The GNU Emacs Manual}. @end ifhtml @xref{Options}. @cindex Emacs, faces @cindex faces @cindex highlighting @findex customize-face You can specify various styles for displaying text using @dfn{faces}. MH-E provides a set of faces that you can use to personalize the look of your MH-E buffers. Use the command @kbd{M-x customize-face} to do this. @ifnothtml @xref{Face Customization,,,emacs,The GNU Emacs Manual}, in @cite{The GNU Emacs Manual}. @end ifnothtml @ifhtml See section @uref{http://www.gnu.org/software/emacs/manual/html_node/Face-Customization.html, Face Customization} in @cite{The GNU Emacs Manual}. @end ifhtml @cindex abnormal hooks @cindex hooks @cindex normal hooks @findex add-hook @findex customize-option Commands often offer @dfn{hooks} which enable you to extend or modify the way a command works. @ifnothtml @ref{Hooks, , Hooks, emacs, The GNU Emacs Manual}, in @cite{The GNU Emacs Manual} @end ifnothtml @ifhtml See section @uref{http://www.gnu.org/software/emacs/manual/html_node/Hooks.html, Hooks} in @cite{The GNU Emacs Manual} @end ifhtml for a description about @dfn{normal hooks} and @dfn{abnormal hooks}. MH-E uses normal hooks in nearly all cases, so you can assume that we are talking about normal hooks unless we explicitly mention that a hook is abnormal. We also follow the conventions described in that `````` Stefan Monnier committed Oct 23, 2012 432 ``````section: the name of the abnormal hooks end in @code{-functions} and all `````` Glenn Morris committed Sep 06, 2007 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 ``````the rest of the MH-E hooks end in @code{-hook}. You can add hooks with either @code{customize-option} or @code{add-hook}. @cindex Emacs, mark @cindex Emacs, point @cindex Emacs, region @cindex mark @cindex point @cindex region @kindex C-@@ @kindex C-@key{SPC} There are several other terms that are used in Emacs that you should know. The @dfn{point} is where the cursor currently is. You can save your current place in the file by setting a @dfn{mark}. This operation is useful in several ways. The mark can be later used when defining a @dfn{region}, which is the text between the point and mark. Many commands operate on regions, such as those for deleting text or filling paragraphs. A mark can be set with @kbd{C-@@} (or @kbd{C-@key{SPC}}). @cindex completion @cindex Emacs, completion @cindex Emacs, file completion @cindex Emacs, folder completion @cindex Emacs, minibuffer @cindex file completion @cindex folder completion @cindex minibuffer @kindex SPC @kindex TAB The @dfn{minibuffer} is the bottom line of the Emacs window, where all prompting and multiple-character input is directed. You can use @dfn{completion} to enter values such as folders. Completion means that Emacs fills in text for you when you type @key{SPC} or @key{TAB}. A second @key{SPC} or @key{TAB} will list all possibilities at that point. @ifnothtml @xref{Completion, , Completion, emacs, The GNU Emacs Manual}. @end ifnothtml @ifhtml See the section @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html, Completion} in @cite{The GNU Emacs Manual}. @end ifhtml Note that @key{SPC} cannot be used for completing filenames and folders. @findex help-with-tutorial @kindex C-h t @kindex M-x The minibuffer is also where you enter Emacs function names after typing @kbd{M-x}. For example, in the preface, I mentioned that you could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What this means is that you can get a tutorial by typing either @kbd{C-h t} or @kbd{M-x help-with-tutorial}. In the latter case, you are prompted for @samp{help-with-tutorial} in the minibuffer after typing @kbd{M-x}. @cindex ~ The @samp{~} notation in filenames represents your home directory. This notation is used by many shells including @command{bash}, @code{tcsh}, and @command{csh}. It is analogous to the environment variable @samp{\$HOME}. For example, @file{~/.emacs} can be written @file{\$HOME/.emacs} or using the absolute path as in @file{/home/wohler/.emacs} instead. @cindex Emacs, interrupting @cindex Emacs, quitting @cindex interrupting @cindex quitting @i{In case of trouble:} Emacs can be interrupted at any time with @kbd{C-g}. For example, if you've started a command that requests that you enter something in the minibuffer, but then you change your mind, type @kbd{C-g} and you'll be back where you started. If you want to exit Emacs entirely, use @kbd{C-x C-c}. @node Getting Started, Tour Through MH-E, Conventions, Top @chapter Getting Started @cindex MH-E, versions @cindex history @cindex versions of MH-E Because there are many old versions of MH-E out there, it is important to know which version you have. I'll be talking about @w{Version 8} which is pretty close to @w{Version 6} and @w{Version 7}. It differs from @w{Version 4} and @w{Version 5} and is vastly different from @w{Version 3}. @xref{History}. @findex mh-version To determine which version of MH-E that you have, enter @kbd{M-x mh-version @key{RET}}. Hopefully it says that you're running @w{Version @value{VERSION}} which is the latest version as of this printing. If your version is much older than this, please consider upgrading. You can have your system administrator upgrade the system-wide version, or you can install your own personal version. It's really quite easy. @xref{Getting MH-E}, for instructions for getting and installing MH-E. If the @code{mh-version} command displays @samp{No MH variant detected}@footnote{In very old versions of MH-E, you may get the error message, @samp{Cannot find the commands `inc' and `mhl' and the file `components'} if MH-E can't find MH. In this case, you need to update MH-E, and you may need to install MH too. However, newer versions of MH-E are better at finding MH if it is on your system.}, then you need to install MH or tell MH-E where to find MH. @cindex Debian @cindex nmh `````` Bill Wohler committed Aug 10, 2008 550 ``````@cindex GNU mailutils MH `````` Glenn Morris committed Sep 06, 2007 551 552 553 554 555 `````` If you don't have MH on your system already, you must install a variant of MH. The Debian mh-e package does this for you automatically (@pxref{Getting MH-E}). Most people use @uref{http://www.nongnu.org/nmh/, nmh}, but you may be interested in `````` Bill Wohler committed Aug 10, 2008 556 557 558 ``````trying out @uref{http://www.gnu.org/software/mailutils/, GNU mailutils MH}, which supports IMAP. Your GNU/Linux distribution probably has packages for both of these. `````` Glenn Morris committed Sep 06, 2007 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 `````` @cindex @command{install-mh} @cindex MH commands, @command{install-mh} @cindex MH book If you've never run MH before, you need to run @command{install-mh} from the shell before you continue. This sets up your personal MH environment@footnote{See the section @uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the MH book.}. If you don't, you'll be greeted with the error message: @samp{Install MH and run install-mh before running MH-E}. This is all you need to know about MH to use MH-E, but the more you know about MH, the more you can leverage its power. See the @uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH. @cindex @samp{Path:} MH profile component @cindex MH profile @cindex MH profile component @cindex MH profile component, @samp{Path:} Your MH environment includes your @dfn{MH profile} which is found in `````` Stephen Eglen committed Jan 23, 2009 580 581 ``````the file @file{~/.mh_profile}, or the file named in the environment variable @samp{\$MH}. This file contains a number of @dfn{MH `````` Glenn Morris committed Sep 06, 2007 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 ``````profile components}. For example, the @samp{Path:} MH profile component contains the path to your mail directory, which is @file{~/Mail} by default. @cindex @command{mhparam} @cindex MH commands, @command{mhparam} @vindex exec-path @vindex mh-path @vindex mh-sys-path @vindex mh-variant @vindex mh-variant-in-use There are several options MH-E uses to interact with your MH installation. The option @code{mh-variant} specifies the variant used by MH-E (@pxref{Options}). The default setting of this option is @samp{Auto-detect} which means that MH-E will automatically choose the `````` Bill Wohler committed Aug 10, 2008 598 ``````first of nmh, MH, or GNU mailutils MH that it finds in the directories `````` Glenn Morris committed Sep 06, 2007 599 600 601 602 ``````listed in @code{mh-path} (which you can customize), @code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at all, you may have to customize @code{mh-path} and add the directory in which the command @command{mhparam} is located. If, on the other hand, `````` Bill Wohler committed Aug 10, 2008 603 ``````you have both nmh and GNU mailutils MH installed (for example) and `````` Glenn Morris committed Sep 06, 2007 604 ``````@code{mh-variant-in-use} was initialized to nmh but you want to use `````` Bill Wohler committed Aug 10, 2008 605 606 ``````GNU mailutils MH, then you can set @code{mh-variant} to @samp{gnu-mh}. `````` Glenn Morris committed Sep 06, 2007 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 `````` @vindex mh-flists-present-flag @vindex mh-lib @vindex mh-lib-progs @vindex mh-progs When @code{mh-variant} is changed, MH-E resets @code{mh-progs}, @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and @code{mh-variant-in-use} accordingly. @cindex @file{.emacs} @cindex files, @file{.emacs} @sp 1 @center @strong{NOTE} @quotation Prior to version 8, it was often necessary to set some of these variables in @file{~/.emacs}; now it is no longer necessary and can actually cause problems. @end quotation @sp 1 @cindex MH profile component, @samp{Draft-Folder:} @cindex MH profile component, @samp{Path:} @cindex MH profile component, @samp{Previous-Sequence:} @cindex MH profile component, @samp{Unseen-Sequence:} @cindex @samp{Draft-Folder:} MH profile component @cindex @samp{Path:} MH profile component @cindex @samp{Previous-Sequence:} MH profile component @cindex @samp{Unseen-Sequence:} MH profile component @findex mh-find-path @vindex mh-draft-folder @vindex mh-find-path-hook @vindex mh-inbox @vindex mh-previous-seq @vindex mh-unseen-seq @vindex mh-user-path In addition to setting variables that point to MH itself, MH-E also sets a handful of variables that point to where you keep your mail. During initialization, the function @code{mh-find-path} sets @code{mh-user-path} from your @samp{Path:} MH profile component (but defaults to @samp{Mail} if one isn't present), @code{mh-draft-folder} from @samp{Draft-Folder:}, @code{mh-unseen-seq} from @samp{Unseen-Sequence:}, @code{mh-previous-seq} from @samp{Previous-Sequence:}, and @code{mh-inbox} from @samp{Inbox:} (defaults to @samp{+inbox}). The hook @code{mh-find-path-hook} is run after these variables have been set. This hook can be used the change the value of these variables if you need to run with different values between MH and MH-E. @node Tour Through MH-E, Using This Manual, Getting Started, Top @chapter Tour Through MH-E @cindex introduction @cindex tour @cindex tutorial This chapter introduces some of the terms you'll need to know and then takes you on a tour of MH-E@footnote{The keys mentioned in these chapters refer to the default key bindings. If you've changed the bindings, refer to the command summaries at the beginning of each chapter for a mapping between default key bindings and function names.}. When you're done, you'll be able to send, read, and file mail, which is all that a lot of people ever do. But if you're the curious or adventurous type, read the rest of the manual to be able to use all the features of MH-E. I suggest you read this chapter first to get the big picture, and then you can read the manual as you wish. @menu * Sending Mail Tour:: * Reading Mail Tour:: * Processing Mail Tour:: * Leaving MH-E:: * More About MH-E:: @end menu @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E @section Sending Mail @cindex MH-Letter mode @cindex mode @cindex modes, MH-Letter @cindex sending mail @findex mh-smail @kindex M-x mh-smail Let's start our tour by sending ourselves a message which we can later read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program to send messages. Your message appears in an Emacs buffer whose mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a particular type of text.} is MH-Letter. Enter your login name in the @samp{To:} header field. Press the @key{TAB} twice to move the cursor past the @samp{Cc:} field, since no carbon copies are to be sent, and on to the @samp{Subject:} field. Enter @kbd{Test} or anything else that comes to mind. Press @key{TAB} again to move the cursor to the body of the message. Enter some text, using normal Emacs commands. You should now have something like this@footnote{If you're running Emacs under the X Window System, then you would also see a menu bar and a tool bar. I've left out the menu bar and tool bar in all of the example screens.}: @cartouche @smallexample --:-- *scratch* All L1 (Lisp Interaction)------------------------- To: wohler cc: Subject: Test `````` Bill Wohler committed Aug 19, 2008 724 ``````X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 `````` Glenn Morris committed Sep 06, 2007 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 ``````-------- This is a test message to get the wheels churning...# --:** @{draft@} All L5 (MH-Letter)---------------------------------- Type C-c C-c to send message, C-C ? for help @end smallexample @end cartouche @i{MH-E message composition window} Note the line of dashes that separates the header and the body of the message. It is essential that these dashes (or a blank line) are present or the body of your message will be considered to be part of the header. @cindex help @findex describe-mode @kindex C-c ? @kindex C-c C-c @kindex C-h m There are several commands specific to MH-Letter mode@footnote{You can get quick help for the commands used most often with @kbd{C-c ?} or more complete help with the @kbd{C-h m} (@code{describe-mode}) command.}, but at this time we'll only use @kbd{C-c C-c} to send your message. Type @kbd{C-c C-c} now. That's all there is to it! @node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through MH-E @section Receiving Mail @cindex @command{inc} @cindex @command{scan} @cindex MH commands, @command{inc} @cindex MH commands, @command{scan} @cindex MH-Folder mode @cindex modes, MH-Folder @cindex reading mail @findex mh-rmail @kindex M-x mh-rmail To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. This incorporates the new mail and puts the output from @command{inc}@footnote{See the section @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next prev} in the MH book.} (called @dfn{scan lines} after the MH program @command{scan}@footnote{See the section @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan pick Ranges Sequences} in the MH book.} which prints a one-line summary of each message) into a buffer called @samp{+inbox} whose major mode is MH-Folder. @findex mh-rmail @kindex F r @kindex M-x mh-rmail @sp 1 @center @strong{NOTE} @quotation The @kbd{M-x mh-rmail} command will show you only new mail, not mail you have already read. If you were to run this tour again, you would use @kbd{F r} to pull all your messages into MH-E. @end quotation @sp 1 @kindex @key{RET} @kindex n @kindex p You should see the scan line for your message, and perhaps others. Use @kbd{n} or @kbd{p} to move the cursor to your test message and type @key{RET} to read your message. You should see something like: @cartouche @smallexample 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1 # 4+t08/24 To:wohler Test< This is a test message to get the wheels churning... --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- @end smallexample @end cartouche @i{After incorporating new messages} @kindex @key{DEL} @kindex @key{SPC} If you typed a long message, you can view subsequent pages with @key{SPC} and previous pages with @key{DEL}. @node Processing Mail Tour, Leaving MH-E, Reading Mail Tour, Tour Through MH-E @section Processing Mail @cindex processing mail @kindex @key{RET} @kindex r The first thing we want to do is reply to the message that we sent ourselves. Ensure that the cursor is still on the same line as your test message and type @kbd{r}. You are prompted in the minibuffer with @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply to the original sender only, to the sender and primary recipients, or to the sender and all recipients. You can press @key{TAB} to see these choices. If you simply press @key{RET}, you'll reply only to the sender. Press @key{RET} now. You'll find yourself in an Emacs buffer similar to that when you were sending the original message, like this: @cartouche @smallexample To: cc: Subject: Re: Test In-reply-to: <31054.1142621351@@stop.mail-abuse.org> References: <31054.1142621351@@stop.mail-abuse.org> Comments: In-reply-to Bill Wohler message dated "Fri, 17 Mar 2006 10:49:11 -0800." `````` Bill Wohler committed Aug 19, 2008 855 ``````X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 `````` Glenn Morris committed Sep 06, 2007 856 857 858 859 860 861 ``````-------- # --:-- @{draft@} All L10 (MH-Letter)---------------------------------- To: wohler Subject: Test `````` Bill Wohler committed Aug 19, 2008 862 ``````X-Mailer: MH-E 8.1; nmh 1.1; GNU Emacs 23.1 `````` Glenn Morris committed Sep 06, 2007 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 ``````Date: Fri, 17 Mar 2006 10:49:11 -0800 From: Bill Wohler This is a test message to get the wheels churning... --:-- @{show-+inbox@} 4 All L1 (MH-Show)---------------------------- Type C-c C-c to send message, C-c ? for help @end smallexample @end cartouche @i{Composition window during reply} @findex backward-char @findex forward-char @findex next-line @findex previous-line @kindex C-b @kindex C-c C-c @kindex C-c C-f C-t @kindex C-f @kindex C-n @kindex C-p @kindex @key{BS} By default, MH will not add you to the address list of your replies, so if you find that the @samp{To:} header field is missing, don't worry. In this case, type @kbd{C-c C-f C-t} to create and go to the @samp{To:} field, where you can type your login name again. You can move around with the arrow keys or with @kbd{C-p} (@code{previous-line}), @kbd{C-n} (@code{next-line}), @kbd{C-b} (@code{backward-char}), and @kbd{C-f} (@code{forward-char}) and can delete the previous character with @key{BS}. When you're finished editing your message, send it with @kbd{C-c C-c} as before. @cindex @command{refile} @cindex MH commands, @command{refile} @cindex folders @kindex @key{SPC} @kindex o You'll often want to save messages that were sent to you in an organized fashion. This is done with @dfn{folders}. You can use folders to keep messages from your friends, or messages related to a particular topic. With your cursor in the MH-Folder buffer and positioned on the message you sent to yourself, type @kbd{o} to output (@command{refile} in MH parlance) that message to a folder. Enter @kbd{test} at the @samp{Destination folder:} prompt and type @kbd{y} (or @key{SPC}) when MH-E asks to create the folder @samp{+test}. Note that a @samp{^} (caret) appears next to the message number, which means that the message has been marked for refiling but has not yet been refiled. We'll talk about how the refile is actually carried out in a moment. @cindex MH-Folder mode @cindex modes, MH-Folder @kindex d @kindex i @kindex @key{RET} @kindex n @kindex p @kindex x Your previous reply is now waiting in the system mailbox. You incorporate this mail into your MH-Folder buffer named @samp{+inbox} with the @kbd{i} command. Do this now. After the mail is incorporated, use @kbd{n} or @kbd{p} to move the cursor to the new message, and read it with @key{RET}. Let's delete this message by typing @kbd{d}. Note that a @samp{D} appears next to the message number. This means that the message is marked for deletion but is not yet deleted. To perform the deletion (and the refile we did previously), use the @kbd{x} command. @findex mh-smail @kindex m @kindex M-x mh-smail If you want to send another message you can use @kbd{m} instead of @kbd{M-x mh-smail}. So go ahead, send some mail to your friends! @cindex help @cindex prefix characters @findex describe-mode @kindex ? @kindex C-h m @kindex F ? You can get a quick reminder about these commands by typing @kbd{?}. This lists several @dfn{prefix characters}. To list the commands available via the prefix characters, type the prefix character followed by a @kbd{?}, for example, @kbd{F ?}. More complete help is available with the @kbd{C-h m} (@code{describe-mode}) command. @node Leaving MH-E, More About MH-E, Processing Mail Tour, Tour Through MH-E @section Leaving MH-E @cindex Emacs, quitting @cindex quitting @kindex C-x C-c @kindex x You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c} to exit @command{emacs}. If you exited without running @kbd{x} in the @samp{+inbox} buffer, Emacs will offer to save it for you. Type @kbd{y} or @key{SPC} to save @samp{+inbox} changes, which means to perform any refiles and deletes that you did there. @findex mh-rmail @kindex C-x b @kindex C-x k @kindex M-x mh-rmail @kindex q If you don't want to leave Emacs, you can type @kbd{q} to bury (hide) the MH-E folder or delete it entirely with @kbd{C-x k}. You can then later recall it with @kbd{C-x b} or @kbd{M-x mh-rmail}. @cindex @command{packf} @cindex MH commands, @command{packf} @cindex exporting folders @cindex folders, exporting @cindex mbox-style folder On the other hand, if you no longer want to use MH and MH-E, you can take your mail with you. You can copy all of your mail into a single file, mbox-style, by using the MH command @command{packf}. For example, to create a file called @file{msgbox} with the messages in your @samp{+inbox} folder, use @samp{packf +inbox}. The @command{packf} command will append the messages to the file if it already exists, so you can use @samp{folders -recurse -fast} in a script to copy all of your messages into a single file, or using the @samp{-file} argument, a file for each folder. @node More About MH-E, , Leaving MH-E, Tour Through MH-E @section More About MH-E These are the basic commands to get you going, but there are plenty more. If you think that MH-E is for you, read the rest of the manual to find out how you can: @itemize @bullet @item Print your messages (@pxref{Printing}). @c ------------------------- @item Edit messages and include your signature (@pxref{Editing Drafts}). @c ------------------------- @item Forward messages (@pxref{Forwarding}). @c ------------------------- @item Read digests (@pxref{Digests}). @c ------------------------- @item Edit bounced messages (@pxref{Editing Again}). @c ------------------------- @item Send multimedia messages (@pxref{Adding Attachments}). @c ------------------------- @item Read HTML messages (@pxref{HTML}). @c ------------------------- @item Use aliases and identities (see @ref{Aliases}, @pxref{Identities}). @c ------------------------- @item Create different views of your mail (see @ref{Threading}, @pxref{Limits}). @c ------------------------- @item Deal with junk mail (@pxref{Junk}). @c ------------------------- @item Handle signed and encrypted messages (see @ref{Reading PGP}, @pxref{Sending PGP}). @c ------------------------- @item Process mail that was sent with @command{shar} or @command{uuencode} (@pxref{Files and Pipes}). @c ------------------------- @item Use sequences conveniently (@pxref{Sequences}). @c ------------------------- @item Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool Bar}, @pxref{Menu Bar}). @c ------------------------- @item Show header fields in different fonts (@pxref{Reading Mail}). @c ------------------------- @item Find previously refiled messages (@pxref{Searching}). @c ------------------------- @item Place messages in a file (@pxref{Files and Pipes}). @end itemize Remember that you can also use MH commands when you're not running MH-E (and when you are!). @node Using This Manual, Incorporating Mail, Tour Through MH-E, Top @chapter Using This Manual This chapter begins the meat of the manual which goes into more detail about every MH-E command and option. @cindex Emacs, info @cindex Emacs, online help @cindex info @cindex online help @findex describe-mode @findex mh-help @kindex ? @kindex C-c ? @kindex C-h C-h @kindex C-h C-k i @kindex C-h i @kindex C-h m There are many commands, but don't get intimidated. There are command summaries at the beginning of each chapter. In case you have or would like to rebind the keys, the command summaries also list the associated Emacs Lisp function. Furthermore, even if you're stranded on a desert island with a laptop and are without your manuals, you can get a summary of all these commands with GNU Emacs online help: use @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands, @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This help appears in a buffer called @samp{*MH-E Help*} (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h i} to read this manual via Info. The online help is quite good; try running @kbd{C-h C-h}. This brings up a list of available help topics, one of which displays the documentation for a given key (like @kbd{C-h k C-n}). Another useful help feature is to view the manual section that describes a given key (such as @kbd{C-h K i}). In addition, review @ref{Conventions}, if any of the GNU Emacs conventions are strange to you. In addition to all of the commands, it is also possible to reconfigure MH-E to fit the needs of even the most demanding user. The following chapters also describe all of the options, show the defaults, and make recommendations for customization. However, when customizing your mail environment, first try to change what you want in MH, and only change MH-E if changing MH is not possible. That way you will get the same behavior inside and outside GNU Emacs. Note that MH-E does not provide hooks for customizations that can be done in MH; this omission is intentional. @cindex Emacs Lisp Manual @cindex Emacs, Emacs Lisp Manual @cindex Emacs, info @cindex Emacs, online help @cindex info @cindex online help I hope I've included enough examples here to get you well on your way. If you want to explore Emacs Lisp further, a programming manual does exist, @c Yes, some of the stuff in the following sections is redundant, but @c TeX barfs if the @ifs are inside the @footnote. @iftex @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available online in the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. It is also available online at @* @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You can also order a printed manual, which has the desirable side-effect of helping to support the Free Software Foundation which made all this great software available. You can find an order form by running @kbd{C-h C-d}, or you can request an order form from @i{gnu at gnu.org}.} @end iftex @ifinfo @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU Emacs Lisp Reference Manual}, which may be available online in the Info system. It is also available online at @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/}. You can also order a printed manual, which has the desirable side-effect of helping to support the Free Software Foundation which made all this great software available. You can find an order form by running @kbd{C-h C-d}, or you can request an order form from @i{gnu at gnu.org}.} @end ifinfo @ifhtml @footnote{The @uref{http://www.gnu.org/software/emacs/elisp-manual/html_node/, The GNU Emacs Lisp Reference Manual} may also be available online in the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can also order a printed manual, which has the desirable side-effect of helping to support the Free Software Foundation which made all this great software available. You can find an order form by running @kbd{C-h C-d}, or you can request an order form from @i{gnu at gnu.org}.} @end ifhtml and you can look at the code itself for examples. Look in the Emacs Lisp directory on your system (such as @file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el} files there. When calling MH-E and other Emacs Lisp functions directly from Emacs Lisp code, you'll need to know the correct arguments. Use the online help for this. For example, try @kbd{C-h f mh-execute-commands @key{RET}}. If you write your own functions, please do not prefix your symbols (variables and functions) with @samp{mh-}. This prefix is reserved for the MH-E package. To avoid conflicts with existing MH-E symbols, use a prefix like @samp{my-} or your initials. (Unless, of course, your initials happen to be @emph{mh}!) @menu * Options:: * Ranges:: * Folder Selection:: @end menu @node Options, Ranges, Using This Manual, Using This Manual @section Options @cindex Emacs, customizing @cindex Emacs, setting options @cindex customizing MH-E @cindex setting options @findex customize-option @vindex mh-lpr-command-format, example Many string or integer options are easy to modify using @kbd{M-x customize-option}. For example, to modify the option that controls printing, you would run @kbd{M-x customize-option @key{RET} mh-lpr-command-format @key{RET}}. In the buffer that appears, modify the string to the right of the variable. For example, you may change the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then use the @samp{State} combo box and select @samp{Save for Future Sessions}. To read more about @code{mh-lpr-command-format}, see @ref{Printing}. @cindex nil @cindex off, option @cindex on, option @cindex option, turning on and off @cindex t @findex customize-option @vindex mh-bury-show-buffer-flag, example Options can also hold boolean values. In Emacs Lisp, the boolean values are @code{nil}, which means false, and @code{t}, which means true. The @code{customize-option} function makes it easy to change boolean values; simply click on the toggle button in the customize buffer to switch between @samp{on} (@code{t}) and @samp{off} (@code{nil}). For example, try setting @code{mh-bury-show-buffer-flag} to @samp{off} to keep the MH-Show buffer at the top of the buffer stack. Use the @samp{State} combo box and choose @samp{Set for Current Session} to see how the option affects the show buffer. Then choose the @samp{Erase Customization} menu item to reset the option to the default, which places the MH-Show buffer at the bottom of the buffer stack. @vindex mh-mhl-format-file, example The text usually says to turn on an option by setting it to a @emph{non-@code{nil}} value, because sometimes values other than @samp{on} are meaningful. An example of this is the variable @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as hooks, involve a little more Emacs Lisp programming expertise. @cindex customization group, @samp{mh} @cindex @samp{mh} customization group @findex customize-group @findex mh-customize You can browse all of the MH-E options with the @code{customize-group} function. Try entering @kbd{M-x customize-group @key{RET} mh @key{RET}} to view the top-level options as well as buttons for all of the MH-E customization groups. Another way to view the MH-E customization group is to use @kbd{M-x mh-customize @key{RET}}. @node Ranges, Folder Selection, Options, Using This Manual @section Ranges @c Sync with mh-folder-mode docstring. @cindex message abbreviations @cindex message ranges @cindex ranges Many commands that operate on individual messages, such as @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE} argument. This argument can be used in several ways. @kindex C-u, with ranges If you provide the prefix argument @kbd{C-u} to these commands, then you will be prompted for the message range. This can be any valid MH range which can include messages, sequences (@pxref{Sequences}), and the abbreviations (described in the @command{mh}(1) man page): @table @samp @item - Indicates all messages in the range to , inclusive. The range must be nonempty. @c ------------------------- @item :N @itemx :+N @itemx :-N Up to N messages beginning with (or ending with) message num. Num may be any of the predefined symbols: first, prev, cur, next or last. @c ------------------------- @item first:N @itemx prev:N @itemx next:N @itemx last:N The first, previous, next or last messages, if they exist. @c ------------------------- @item all All of the messages. @end table For example, a range that shows all of these things is @samp{1 2 3 5-10 last:5 unseen}. @vindex transient-mark-mode If the option @code{transient-mark-mode} is turned on and you set a region in the MH-Folder buffer, then the MH-E command will perform the operation on all messages in that region. @cindex @samp{mh-range} customization group @cindex customization group, @samp{mh-range} The @samp{mh-range} customization group contains a single option which affects how ranges are interpreted. @vtable @code @item mh-interpret-number-as-range-flag On means interpret a number as a range (default: @samp{on}). @end vtable @vindex mh-interpret-number-as-range-flag Since one of the most frequent ranges used is @samp{last:N}, MH-E will interpret input such as @samp{200} as @samp{last:200} if the @code{mh-interpret-number-as-range-flag} option is on (which is the default). If you need to scan just the message 200, then use the range @samp{200:1} or @samp{200-200}. @node Folder Selection, , Ranges, Using This Manual @section Folder Selection @cindex completion, folders @cindex folders, completion @cindex folders, selecting When you choose a folder in MH-E via a command such as @kbd{o} (@code{mh-refile-msg}), completion is used to enter the folder @ifnothtml (@pxref{Completion, , , emacs, The GNU Emacs Manual}). @end ifnothtml @ifhtml (see the section @uref{http://www.gnu.org/software/emacs/manual/html_node/Completion.html, Completion} in @cite{The GNU Emacs Manual}). @end ifhtml In addition, MH-E has several ways of choosing a suitable default so that the folder can often be selected with a single @key{RET} key. @cindex customization group, @samp{mh-folder-selection} @cindex @samp{mh-folder-selection} customization group The @samp{mh-folder-selection} customization group contains some options which are used to help with this. @vtable @code @item mh-default-folder-for-message-function Function to select a default folder for refiling or @samp{Fcc:} (default: @code{nil}). @c ------------------------- @item mh-default-folder-list List of addresses and folders (default: @code{nil}). @c ------------------------- @item mh-default-folder-must-exist-flag On means guessed folder name must exist to be used (default: @samp{on}). @c ------------------------- @item mh-default-folder-prefix Prefix used for folder names generated from aliases (default: @code{""}). @end vtable @vindex mh-default-folder-for-message-function You can set the option @code{mh-default-folder-for-message-function} to a function that provides a default folder for the message to be refiled. When this function is called, the current buffer contains the message being refiled and point is at the start of the message. This function should return the default folder as a string with a leading @samp{+} sign. It can also return @code{nil} so that the last folder name is used as the default, or an empty string to suppress the default entirely. Otherwise, the name of the destination folder is derived from the sender as follows: @enumerate @vindex mh-default-folder-list @item The folder name associated with the first address found in the list @code{mh-default-folder-list} is used. Each element in this list contains a @samp{Check Recipient} item. If this item is turned on, then the address is checked against the recipient instead of the sender. This is useful for mailing lists. @c ------------------------- @vindex mh-default-folder-prefix @item An alias prefixed by @code{mh-default-folder-prefix} corresponding to the address is used. The prefix is used to prevent clutter in your mail directory. @xref{Aliases}. @end enumerate @vindex mh-default-folder-must-exist-flag If the derived folder does not exist, and @code{mh-default-folder-must-exist-flag} is @code{t}, then the last folder name used is suggested. This is useful if you get mail from various people for whom you have an alias, but file them all in the same project folder. @node Incorporating Mail, Reading Mail, Using This Manual, Top @chapter Incorporating Your Mail @cindex @samp{Folder} menu @cindex incorporating @cindex menu, @samp{Folder} This chapter talks about getting mail from your system mailbox into your MH @samp{+inbox} folder. The following command accomplishes that and is found in the @samp{Folder} menu. @table @kbd @cindex @samp{Folder > Incorporate New Mail} menu item @cindex menu item, @samp{Folder > Incorporate New Mail} @findex mh-inc-folder @kindex i @item i Incorporate new mail into a folder (@code{mh-inc-folder}). @end table @cindex @samp{mh-inc} customization group @cindex customization group, @samp{mh-inc} The following options in the @samp{mh-inc} customization group are used. @vtable @code @item mh-inc-prog Program to incorporate mail (default: @code{"inc"}). @c ------------------------- @item mh-inc-spool-list Alternate spool files (default: @code{nil}). @end vtable The following hook is available. @vtable @code @findex mh-inc-folder @item mh-inc-folder-hook Hook run by @code{mh-inc-folder} after incorporating mail into a folder (default: @code{nil}). @end vtable @cindex @samp{+inbox} @findex mh-inc-folder @kindex i If at any time you receive new mail, incorporate the new mail into your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note that @kbd{i} will display the @samp{+inbox} buffer, even if there isn't any new mail. You can incorporate mail from any file into the current folder by specifying a prefix argument; you'll be prompted for the name of the file to use as well as the destination folder (for example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}). @cindex @file{.emacs} @cindex Emacs, notification of new mail @cindex files, @file{.emacs} @cindex new mail @cindex notification of new mail Emacs can notify you when you have new mail by displaying @samp{Mail} in the mode line. To enable this behavior, and to have a clock in the mode line as well, add the following to @file{~/.emacs}: @findex display-time @smalllisp (display-time) @end smalllisp @cindex @command{inc} @cindex incorporating @cindex MH commands, @command{inc} @vindex mh-inc-prog @vindex mh-progs The name of the program that incorporates new mail is stored in @code{mh-inc-prog}; it is @code{"inc"} by default. This program generates a one-line summary for each of the new messages. Unless it is an absolute pathname, the file is assumed to be in the @code{mh-progs} directory (@pxref{Getting Started}). You may also link a file to @command{inc} that uses a different format (see @samp{mh-profile}(5), and sections @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in the MH book). You'll then need to modify several variables appropriately (@pxref{Scan Line Formats}). @vindex mh-inc-spool-list You can use the @code{mh-inc-spool-list} variable to direct MH-E to retrieve mail from arbitrary spool files other than your system mailbox, file it in folders other than your @samp{+inbox}, and assign key bindings to incorporate this mail. @cindex @command{procmail} @cindex @file{.procmailrc} @cindex Unix commands, @command{procmail} @cindex files, @file{.procmailrc} Suppose you are subscribed to the @i{mh-e-devel} mailing list and you use @command{procmail} to filter this mail into @file{~/mail/mh-e} with the following recipe in @file{.procmailrc}: @smallexample PATH=\$PATH:/usr/bin/mh MAILDIR=\$HOME/`mhparam Path` :0: * ^From mh-e-devel-admin@@stop.mail-abuse.org mh-e @end smallexample @findex mh-inc-spool-* @kindex I * In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option, and click on the @samp{INS} button. Enter a @samp{Spool File} of @samp{~/mail/mh-e}, a @samp{Folder} of @samp{mh-e}, and a @samp{Key Binding} of @samp{m}. @cindex @command{emacsclient} @cindex @command{gnuclient} @cindex @command{xbuffy} @cindex @samp{gnuserv} @cindex Unix commands, @command{emacsclient} @cindex Unix commands, @command{gnuclient} @cindex Unix commands, @command{xbuffy} You can use @command{xbuffy} to automate the incorporation of this `````` Bill Wohler committed Aug 19, 2008 1511 ``````mail using the Emacs 23 command @command{emacsclient} as follows: `````` Glenn Morris committed Sep 06, 2007 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 `````` @smallexample box ~/mail/mh-e title mh-e origMode polltime 10 headertime 0 command emacsclient --eval '(mh-inc-spool-mh-e)' @end smallexample In XEmacs, the command @command{gnuclient} is used in a similar fashion. @findex mh-inc-folder @kindex i @vindex mh-inc-folder-hook You can set the hook @code{mh-inc-folder-hook}, which is called after new mail is incorporated by the @kbd{i} (@code{mh-inc-folder}) command. A good use of this hook is to rescan the whole folder either after running @kbd{M-x mh-rmail} the first time or when you've changed the message numbers from outside of MH-E. @findex mh-execute-commands @findex mh-rescan-folder, example @findex mh-show, example @vindex mh-inc-folder-hook, example @smalllisp @group (defun my-mh-inc-folder-hook () "Hook to rescan folder after incorporating mail." (if (buffer-modified-p) ; @r{if outstanding refiles and deletes,} (mh-execute-commands)) ; @r{carry them out} (mh-rescan-folder) ; @r{synchronize with +inbox} (mh-show)) ; @r{show the current message} (add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook) @i{Rescan folder after incorporating new mail via mh-inc-folder-hook} @end group @end smalllisp @node Reading Mail, Folders, Incorporating Mail, Top @chapter Reading Your Mail @cindex @samp{+inbox} @cindex MH-Folder mode @cindex MH-Show mode @cindex modes, MH-Folder @cindex modes, MH-Show @cindex reading mail @findex mh-rmail @kindex F r @kindex F v @kindex M-x mh-rmail The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This command incorporates your mail and creates a buffer called @samp{+inbox} in MH-Folder mode. The command @kbd{M-x mh-rmail} shows you only new mail, not mail you have already read@footnote{If you want to see your old mail as well, use @kbd{F r} to pull all your messages into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}. @findex display-time @vindex read-mail-command There are some commands that need to read mail, such as @kbd{Mouse-2} over the @samp{Mail} button that @code{display-time} adds to the mode line. You can configure Emacs to have these commands use MH-E by setting the option @code{read-mail-command} to @samp{mh-rmail}. @cindex @command{scan} @cindex @samp{Message} menu @cindex MH commands, @command{scan} @cindex menu, @samp{Message} @cindex scan lines The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line summaries of each incorporated message. You can perform most MH commands on these messages via one- or two-letter commands in either the MH-Folder or MH-Show buffers or by using the @samp{Message} menu. See @command{scan}(1) for a description of the contents of the scan lines, and see the Figure in @ref{Reading Mail Tour}, for an example. @table @kbd @kindex ? @findex mh-help @item ? Display cheat sheet for the MH-E commands (@code{mh-help}). @c ------------------------- @cindex @samp{Message > Show Message} menu item @cindex menu item, @samp{Message > Show Message} @kindex @key{RET} @findex mh-show @item @key{RET} Display message (@code{mh-show}). @c ------------------------- @cindex @samp{Message > Show Message with Header} menu item @cindex menu item, @samp{Message > Show Message with Header} @kindex , (comma) @findex mh-header-display @item , (comma) Display message with all header fields (@code{mh-header-display}). @c ------------------------- `````` Bill Wohler committed Aug 01, 2008 1620 1621 1622 1623 1624 1625 1626 1627 ``````@cindex @samp{Message > Show Message with Preferred Alternative} menu item @cindex menu item, @samp{Message > Show Message with Preferred Alternative} @kindex : (colon) @findex mh-show-preferred-alternative @item : (colon) Display message with the default preferred alternative (@code{mh-show-preferred-alternative}). @c ------------------------- `````` Glenn Morris committed Sep 06, 2007 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 ``````@kindex ; (semicolon) @findex mh-toggle-mh-decode-mime-flag @item ; (semicolon) Toggle the value of @code{mh-decode-mime-flag} (@code{mh-toggle-mh-decode-mime-flag}). @c ------------------------- @kindex @key{SPC} @findex mh-page-msg @item @key{SPC} Display next page in message (@code{mh-page-msg}). @c ------------------------- @kindex @key{BS} @findex mh-previous-page @item @key{BS} Display previous page in message (@code{mh-previous-page}). @c ------------------------- @cindex @samp{Message > Write Message to File...} menu item @cindex menu item, @samp{Message > Write Message to File...} @kindex > @findex mh-write-msg-to-file @item > Append message to end of file (@code{mh-write-msg-to-file}). @c ------------------------- @cindex @samp{Message > Pipe Message to Command...} menu item @cindex menu item, @samp{Message > Pipe Message to Command...} @kindex | @findex mh-pipe-msg @item | Pipe message through shell command (@code{mh-pipe-msg}). @c ------------------------- @kindex C-d @findex mh-delete-msg-no-motion @item C-d Delete range, don't move to next message (@code{mh-delete-msg-no-motion}). @c ------------------------- @cindex @samp{Message > Delete Message} menu item @cindex menu item, @samp{Message > Delete Message} @kindex d @findex mh-delete-msg @item d Delete range (@code{mh-delete-msg}). @c ------------------------- @kindex D ? @findex mh-prefix-help @item D ? Display cheat sheet for the commands of the current prefix in minibuffer (@code{mh-prefix-help}). @c ------------------------- @kindex D @key{SPC} @findex mh-page-digest @item D @key{SPC} Display next message in digest (@code{mh-page-digest}). @c ------------------------- @kindex D @key{BS} @findex mh-page-digest-backwards @item D @key{BS} Display previous message in digest (@code{mh-page-digest-backwards}). @c ------------------------- @cindex @samp{Message > Burst Digest Message} menu item @cindex menu item, @samp{Message > Burst Digest Message} @kindex D b @findex mh-burst-digest @item D b Break up digest into separate messages (@code{mh-burst-digest}). @c ------------------------- @cindex @samp{Message > Go to Message by Number...} menu item @cindex menu item, @samp{Message > Go to Message by Number...} @kindex g @findex mh-goto-msg @item g Go to a message (@code{mh-goto-msg}). @c ------------------------- @kindex k @findex mh-delete-subject-or-thread @item k Delete messages with same subject or thread (@code{mh-delete-subject-or-thread}). @c ------------------------- @kindex K ? @findex mh-prefix-help @item K ? Display cheat sheet for the commands of the current prefix in minibuffer (@code{mh-prefix-help}). @c ------------------------- @kindex K @key{TAB} @findex mh-next-button @item K @key{TAB} Go to the next button (@code{mh-next-button}). @c ------------------------- @kindex K S-@key{TAB} @findex mh-prev-button @item K S-@key{TAB} Go to the previous button (@code{mh-prev-button}). @c ------------------------- @kindex K a @findex mh-mime-save-parts @item K a Save attachments (@code{mh-mime-save-parts}). @c ------------------------- @kindex K e @findex mh-display-with-external-viewer @item K e View attachment externally (@code{mh-display-with-external-viewer}). @c ------------------------- @kindex K i @findex mh-folder-inline-mime-part @item K i Show attachment verbatim (@code{mh-folder-inline-mime-part}). @c ------------------------- @kindex K o @findex mh-folder-save-mime-part @item K o Save (output) attachment (@code{mh-folder-save-mime-part}). @c ------------------------- @kindex K t @findex mh-toggle-mime-buttons @item K t Toggle option @code{mh-display-buttons-for-inline-parts-flag} (@code{mh-toggle-mime-buttons}). @c ------------------------- @kindex K v @findex mh-folder-toggle-mime-part @item K v View attachment (@code{mh-folder-toggle-mime-part}). @c ------------------------- @cindex @samp{Message > Modify Message} menu item @cindex menu item, @samp{Message > Modify Message} @kindex M @findex mh-modify @item M Edit message (@code{mh-modify}). @c ------------------------- @cindex @samp{Message > Go to First Message} menu item @cindex menu item, @samp{Message > Go to First Message} @kindex M-< @findex mh-first-msg @item M-< Display first message (@code{mh-first-msg}). @c ------------------------- @cindex @samp{Message > Go to Last Message} menu item @cindex menu item, @samp{Message > Go to Last Message} @kindex M-> @findex mh-last-msg @item M-> Display last message (@code{mh-last-msg}). @c ------------------------- @kindex M-n @findex mh-next-unread-msg @item M-n Display next unread message (@code{mh-next-unread-msg}). @c ------------------------- @kindex M-p @findex mh-previous-unread-msg @item M-p Display previous unread message (@code{mh-previous-unread-msg}). @c ------------------------- @cindex @samp{Message > Next Message} menu item @cindex menu item, @samp{Message > Next Message} @kindex n @findex mh-next-undeleted-msg @item n Display next message (@code{mh-next-undeleted-msg}). @c ------------------------- @cindex @samp{Message > Previous Message} menu item @cindex menu item, @samp{Message > Previous Message} @kindex p @findex mh-previous-undeleted-msg @item p Display previous message (@code{mh-previous-undeleted-msg}). @c ------------------------- @kindex P ? @findex mh-prefix-help @item P ? Display cheat sheet for the commands of the current prefix in minibuffer (@code{mh-prefix-help}). @c ------------------------- @kindex P C @findex mh-ps-print-toggle-color @item P C Toggle whether color is used in printing messages (@code{mh-ps-print-toggle-color}). @c ------------------------- @kindex P F @findex mh-ps-print-toggle-faces @item P F Toggle whether printing is done with faces or not (@code{mh-ps-print-toggle-faces}). @c ------------------------- @kindex P f @findex mh-ps-print-msg-file @item P f Print range to file (@code{mh-ps-print-msg-file}). @c ------------------------- @cindex @samp{Message > Print Message} menu item @cindex menu item, @samp{Message > Print Message} @kindex P l @findex mh-print-msg @item P l Print range the old fashioned way (@code{mh-print-msg}). @c ------------------------- @kindex P p @findex mh-ps-print-msg @item P p Print range (@code{mh-ps-print-msg}). @c ------------------------- @kindex X ? @findex mh-prefix-help @item X ? Display cheat sheet for the commands of the current prefix in minibuffer (@code{mh-prefix-help}). @c ------------------------- @cindex @samp{Message > Unpack Uuencoded Message...} menu item @cindex menu item, @samp{Message > Unpack Uuencoded Message...} @kindex X s @kindex X u @findex mh-store-msg @item X s @itemx X u Unpack message created with @command{uudecode} or @command{shar} (@code{mh-store-msg}). @c ------------------------- @kindex Mouse-2 @findex mh-show-mouse @item Mouse-2 Move point to mouse event and show message (@code{mh-show-mouse}). @end table Within the MH-Show buffer, the following command is defined. @table @kbd @kindex @key{RET} @kindex Mouse-1 @kindex Mouse-2 @findex mh-press-button @item @key{RET} @itemx Mouse-1 @itemx Mouse-2 View contents of button (@code{mh-press-button}). @end table @cindex @samp{mh-show} customization group @cindex customization group, @samp{mh-show} The following table lists options in the @samp{mh-show} customization group that are used while reading mail. @vtable @code @item mh-bury-show-buffer-flag On means show buffer is buried (default: @samp{on}). @c ------------------------- @item mh-clean-message-header-flag On means remove extraneous header fields (default: @samp{on}). @c ------------------------- @item mh-decode-mime-flag On means attachments are handled (default: @samp{on} if the Gnus @samp{mm-decode} package is present). @c ------------------------- @item mh-display-buttons-for-alternatives-flag On means display buttons for all alternative attachments (default: @samp{off}). @c ------------------------- @item mh-display-buttons-for-inline-parts-flag On means display buttons for all inline attachments (default: @samp{off}). @c ------------------------- @item mh-do-not-confirm-flag On means non-reversible commands do not prompt for confirmation (default: @samp{off}). @c ------------------------- @item mh-fetch-x-image-url Control fetching of @samp{X-Image-URL:} header field image (default: @samp{Never Fetch}). @c ------------------------- @item mh-graphical-smileys-flag On means graphical smileys are displayed (default: @samp{on}). @c ------------------------- @item mh-graphical-emphasis-flag On means graphical emphasis is displayed (default: @samp{on}). @c ------------------------- @item mh-highlight-citation-style Style for highlighting citations (default: @samp{Multicolor}). @c ------------------------- @item mh-invisible-header-fields-default List of hidden header fields (default: a checklist too long to list here). @c ------------------------- @item mh-invisible-header-fields Additional header fields to hide (default: @code{nil}). @c ------------------------- @item mh-lpr-command-format Command used to print (default: @code{"lpr -J '%s'"}). @c ------------------------- @item mh-max-inline-image-height Maximum inline image height if @samp{Content-Disposition:} is not present (default: 0). @c ------------------------- @item mh-max-inline-image-width Maximum inline image width if @samp{Content-Disposition:} is not present(default: 0). @c ------------------------- @item mh-mhl-format-file Specifies the format file to pass to the @command{mhl} program (default: @samp{Use Default mhl Format (Printing Only)}). @c ------------------------- @item mh-mime-save-parts-default-directory Default directory to use for @kbd{K a}. @c ------------------------- @item mh-print-background-flag On means messages should be printed in the background (default: @samp{off}). @c ------------------------- @item mh-show-buffer-mode-line-buffer-id Format string to produce @code{mode-line-buffer-identification} for show buffers (default: @code{" @{show-%s@} %d"}). @c ------------------------- @item mh-show-maximum-size Maximum size of message (in bytes) to display automatically (default: 0). @c ------------------------- @item mh-show-use-xface-flag On means display face images in MH-Show buffers (default: @samp{on}). @c ------------------------- @item mh-store-default-directory Default directory for @kbd{X s} (default: @samp{Current}). @c ------------------------- @item mh-summary-height Number of lines in MH-Folder buffer (including the mode line) (default: depends on size of frame). @end vtable The following hooks are available. @vtable @code @item mh-delete-msg-hook Hook run after marking each message for deletion (default: @code{nil}). @c ------------------------- @item mh-show-hook Hook run after @key{RET} shows a message (default: @code{nil}). @c ------------------------- @item mh-show-mode-hook Hook run upon entry to @code{mh-show-mode} (default: @code{nil}). @end vtable The following faces are available. @vtable @code @item mh-show-cc Face used to highlight @samp{cc:} header fields. @c ------------------------- @item mh-show-date Face used to highlight @samp{Date:} header fields. @c ------------------------- @item mh-show-from Face used to highlight @samp{From:} header fields. @c ------------------------- @item mh-show-header Face used to deemphasize less interesting header fields. @c ------------------------- @item mh-show-pgg-bad Bad PGG signature face. @c ------------------------- @item mh-show-pgg-good Good PGG signature face. @c ------------------------- @item mh-show-pgg-unknown Unknown or untrusted PGG signature face. @c ------------------------- @item mh-show-signature Signature face. @c ------------------------- @item mh-show-subject Face used to highlight @samp{Subject:} header fields. @c ------------------------- @item mh-show-to Face used to highlight @samp{To:} header fields. @c ------------------------- @item mh-show-xface X-Face image face. @end vtable The functions and variables introduced here are explained in more detail in the following sections. @menu * Viewing:: * Viewing Attachments:: * HTML:: * Digests:: * Reading PGP:: * Printing:: * Files and Pipes:: * Navigating:: * Miscellaneous Commands and Options:: @end menu @node Viewing, Viewing Attachments, Reading Mail, Reading Mail @section Viewing Your Mail @findex mh-header-display @findex mh-page-msg @findex mh-previous-page @findex mh-show @findex mh-show-mouse @kindex , (comma) @kindex . (period) @kindex @key{BS} @kindex @key{RET} @kindex @key{SPC} @kindex Mouse-2 The command @key{RET} (@code{mh-show}) displays the message that the cursor is on while @kbd{Mouse-2} (@code{mh-show-mouse}) displays the message that the mouse cursor is on. If the message is already displayed, it scrolls to the beginning of the message. Use @key{SPC} (@code{mh-page-msg}) and @key{BS} (@code{mh-previous-page}) to move forwards and backwards one page at a time through the message. You can give either of these commands a prefix argument that specifies the number of lines to scroll (such as @kbd{10 @key{SPC}}). The @key{SPC} command will also show the next undeleted message if it is used at the bottom of a message. MH-E normally hides a lot of the superfluous header fields that mailers add to a message, but if you wish to see all of them, use the command @kbd{,} (comma; @code{mh-header-display}). @vindex mh-show-maximum-size The option @code{mh-show-maximum-size} provides an opportunity to skip over large messages which may be slow to load. The default value of 0 means that all message are shown regardless of size. A litany of options control what displayed messages look like. @vindex mh-show-cc @vindex mh-show-date @vindex mh-show-from @vindex mh-show-header @vindex mh-show-subject @vindex mh-show-to First, the appearance of the header fields can be modified by customizing the associated face: @code{mh-show-to}, @code{mh-show-cc}, @code{mh-show-from}, @code{mh-show-date}, and @code{mh-show-subject}. The face @code{mh-show-header} is used to deemphasize the other, less interesting, header fields. @cindex regular expressions, @code{mh-invisible-header-fields} @vindex mh-clean-message-header-flag @vindex mh-invisible-header-fields @vindex mh-invisible-header-fields-default Normally messages are delivered with a handful of uninteresting header fields. These are hidden by turning on the option @code{mh-clean-message-header-flag} (which it is by default). The header fields listed in the option @code{mh-invisible-header-fields-default} are hidden, although you can check off any field that you would like to see. Header fields that you would like to hide that aren't listed can be added to the option @code{mh-invisible-header-fields} with a couple of caveats. Regular expressions are not allowed. Unique fields should have a @samp{:} suffix; otherwise, the element can be used to render invisible an entire class of fields that start with the same prefix. If you think a `````` Bill Wohler committed Mar 17, 2008 2091 2092 2093 ``````header field should be generally ignored, please update @uref{https://sourceforge.net/tracker/index.php?func=detail&aid=1916032&group_id=13357&atid=113357, SF #1916032}. `````` Glenn Morris committed Sep 06, 2007 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 `````` @cindex header field, @samp{Face:} @cindex header field, @samp{X-Face:} @cindex header field, @samp{X-Image-URL:} @cindex @samp{Face:} header field @cindex @samp{X-Face:} header field @cindex @samp{X-Image-URL:} header field @vindex mh-show-use-xface-flag MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and @samp{X-Image-URL:} header fields. If any of these fields occur in the header of your message, the sender's face will appear in the @samp{From:} header field. If more than one of these fields appear, then the first field found in the order @samp{Face:}, @samp{X-Face:}, and @samp{X-Image-URL:} will be used. The option @code{mh-show-use-xface-flag} is used to turn this feature on and off. This feature will be turned on by default if your system supports it. The first header field used, if present, is the Gnus-specific @samp{Face:} field@footnote{The @samp{Face:} field appeared in GNU Emacs 21 and XEmacs. For more information, see @uref{http://quimby.gnus.org/circus/face/}.}. @cindex @command{uncompface} @cindex Emacs, packages, x-face @cindex Unix commands, @command{uncompface} @cindex x-face package @vindex mh-show-xface Next is the traditional @samp{X-Face:} header field@footnote{The display of this field requires the @uref{ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z, @command{uncompface} program}. Recent versions of XEmacs have internal support for @samp{X-Face:} images. If your version of XEmacs does not, then you'll need both @command{uncompface} and the @uref{ftp://ftp.jpl.org/pub/elisp/, @samp{x-face} package}.}. MH-E renders the foreground and background of the image using the associated attributes of the face @code{mh-show-xface}. @cindex @command{convert} @cindex @command{wget} @cindex ImageMagick @cindex Unix commands, @command{convert} @cindex Unix commands, @command{wget} @vindex mh-fetch-x-image-url Finally, MH-E will display images referenced by the @samp{X-Image-URL:} header field if neither the @samp{Face:} nor the @samp{X-Face:} fields are present@footnote{The display of the images requires the @uref{http://www.gnu.org/software/wget/wget.html, @command{wget} program} to fetch the image and the @command{convert} program from the @uref{http://www.imagemagick.org/, ImageMagick suite}.}. Of the three header fields this is the most efficient in terms of network usage since the image doesn't need to be transmitted with every single mail. The option @code{mh-fetch-x-image-url} controls the fetching of the @samp{X-Image-URL:} header field image with the following values: @table @samp @item Ask Before Fetching You are prompted before the image is fetched. MH-E will remember your reply and will either use the already fetched image the next time the same URL is encountered or silently skip it if you didn't fetch it the first time. This is a good setting. @c ------------------------- @item Never Fetch Images are never fetched and only displayed if they are already present in the cache. This is the default. @end table There isn't a value of @samp{Always Fetch} for privacy and DOS (denial of service) reasons. For example, fetching a URL can tip off a spammer that you've read his email (which is why you shouldn't blindly answer yes if you've set this option to @samp{Ask Before Fetching}). Someone may also flood your network and fill your disk drive by sending a torrent of messages, each specifying a unique URL to a very large file. @cindex @file{.mhe-x-image-cache} @cindex files, @file{.mhe-x-image-cache} The cache of images is found in the directory @file{.mhe-x-image-cache} within your MH directory. You can add your own face to the @samp{From:} field too. @xref{Picture}. @cindex @command{mhl} @cindex MH commands, @command{mhl} @vindex mh-mhl-format-file Normally MH-E takes care of displaying messages itself (rather than calling an MH program to do the work). If you'd rather have @command{mhl} display the message (within MH-E), change the option @code{mh-mhl-format-file} from its default value of @samp{Use Default mhl Format (Printing Only)}. You can set this option to @samp{Use Default mhl Format} to get the same output as you would get if you ran @command{mhl} from the shell. If you have a format file that you want MH-E to use, you can set this option to @samp{Specify an mhl Format File} and enter the name of your format file (@command{mhl}(1) or section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH book tells you how to write one). Your format file should specify a non-zero value for @samp{overflowoffset} to allow MH-E to parse the header. Note that @command{mhl} is always used for printing and forwarding; in this case, the value of @code{mh-mhl-format-file} is consulted if you have specified a format file. @cindex citations, highlighting @cindex highlighting citations @vindex mh-highlight-citation-style If the sender of the message has cited other messages in his message, then MH-E will highlight these citations to emphasize the sender's actual response. The option @code{mh-highlight-citation-style} can be customized to change the highlighting style. The @samp{Multicolor} method uses a different color for each indentation while the @samp{Monotone} method highlights all citations in red. To disable highlighting of citations entirely, choose @samp{None}. @cindex URLs, highlighting @cindex email addresses, highlighting @cindex highlighting URLs @cindex highlighting email addresses @cindex links, following @findex goto-address-at-point @kindex C-c @key{RET} @kindex Mouse-2 @vindex goto-address-highlight-p Email addresses and URLs in the message are highlighted if the option @code{goto-address-highlight-p} is on, which it is by default. To view the web page for a highlighted URL or to send a message using a highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}} (@code{goto-address-at-point}). @xref{Sending Mail}, to see how to configure Emacs to send the message using MH-E. @cindex boldface, showing @cindex emphasis @cindex italics, showing @cindex smileys @cindex typesetting @cindex underline, showing @vindex gnus-emphasis-alist @vindex mh-decode-mime-flag @vindex mh-graphical-emphasis-flag @vindex mh-graphical-smileys-flag It is a long standing custom to inject body language using a cornucopia of punctuation, also known as the @dfn{smileys}. MH-E can render these as graphical widgets if the option @code{mh-graphical-smileys-flag} is turned on, which it is by default. Smileys include patterns such as :-) and ;-). Similarly, a few typesetting features are indicated in ASCII text with certain characters. If your terminal supports it, MH-E can render these typesetting directives naturally if the option @code{mh-graphical-emphasis-flag} is turned on, which it is by default. For example, _underline_ will be @ifhtml @html underlined, @end html @end ifhtml ``````