/usr/share/doc/vm/html/Reading-Messages.html is in vm 8.2.0b-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 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 432 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 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 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 724 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 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>VM User’s Manual: Reading Messages</title>
<meta name="description" content="VM User’s Manual: Reading Messages">
<meta name="keywords" content="VM User’s Manual: Reading Messages">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="License.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="Sending-Messages.html#Sending-Messages" rel="next" title="Sending Messages">
<link href="Selecting-Messages.html#Selecting-Messages" rel="prev" title="Selecting Messages">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Reading-Messages"></a>
<div class="header">
<p>
Next: <a href="Sending-Messages.html#Sending-Messages" accesskey="n" rel="next">Sending Messages</a>, Previous: <a href="Selecting-Messages.html#Selecting-Messages" accesskey="p" rel="prev">Selecting Messages</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Reading-Messages-1"></a>
<h2 class="chapter">3 Reading Messages</h2>
<p>Once a message has been selected, VM will show it to you. By default,
presentation is done in two stages: <em>previewing</em> and <em>paging</em>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#Previewing" accesskey="1">Previewing</a>:</td><td> </td><td align="left" valign="top">Customizing message previews.
</td></tr>
<tr><td align="left" valign="top">• <a href="#Paging" accesskey="2">Paging</a>:</td><td> </td><td align="left" valign="top">Viewing the current message.
</td></tr>
<tr><td align="left" valign="top">• <a href="#MIME-Messages" accesskey="3"><acronym>MIME</acronym> Messages</a>:</td><td> </td><td align="left" valign="top">Using VM’s <acronym>MIME</acronym> display features.
</td></tr>
</table>
<hr>
<a name="Previewing"></a>
<div class="header">
<p>
Next: <a href="#Paging" accesskey="n" rel="next">Paging</a>, Previous: <a href="#Reading-Messages" accesskey="p" rel="prev">Reading Messages</a>, Up: <a href="#Reading-Messages" accesskey="u" rel="up">Reading Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Previewing-1"></a>
<h3 class="section">3.1 Previewing</h3>
<p><em>Previewing</em> means showing you a small portion of a message
and allowing you to decide whether you want to read it. Typing
<tt class="key">SPC</tt> exposes the body of the message, and from there you can
repeatedly type <tt class="key">SPC</tt> to page through the message.
</p>
<p>By default, the sender, recipient, subject and date headers are shown
when previewing; the rest of the message is hidden. This behavior may
be altered by changing the settings of three variables:
<code>vm-visible-headers</code>, <code>vm-invisible-header-regexp</code> and
<code>vm-preview-lines</code>.
</p>
<a name="index-vm_002dpreview_002dlines"></a>
<p>If the value of <code>vm-preview-lines</code> is a number, it tells VM how
many lines of the text of the message should be visible. The default
value of this variable is 0. If <code>vm-preview-lines</code> is <code>nil</code>,
then previewing is not done at all; when a message is first presented it
is immediately exposed in its entirety and is flagged as read. If
<code>vm-preview-lines</code> is <code>t</code>, the message body is displayed fully
but the message is not flagged as read until you type <tt class="key">SPC</tt>.
</p>
<a name="index-vm_002dvisible_002dheaders"></a>
<p>The value of <code>vm-visible-headers</code> should be a list of regular
expressions matching the beginnings of headers that should be made
visible when a message is presented. The regexps should be listed in
the preferred presentation order of the headers they match.
</p>
<a name="index-vm_002dinvisible_002dheader_002dregexp"></a>
<p>If non-<code>nil</code>, the variable <code>vm-invisible-header-regexp</code>
specifies what headers should <em>not</em> be displayed. Its value should
be a string containing a regular expression that matches all headers you
do not want to see. Setting this variable non-<code>nil</code> implies that
you want to see all headers not matched by it; therefore the value of
<code>vm-visible-headers</code> is only used to determine the order of the
visible headers in this case. Headers not matched by
<code>vm-invisible-header-regexp</code> or <code>vm-visible-headers</code> are
displayed last.
</p>
<p>If you change the value of either <code>vm-visible-headers</code> or
<code>vm-invisible-header-regexp</code> in the middle of a VM session the
effects will not be immediate. You will need to use the command
<code>vm-discard-cached-data</code> on each message (bound to <kbd>j</kbd> by
default) to force VM to rearrange the message headers. A good way to do
this is to mark all the messages in the folder and apply
<code>vm-discard-cached-data</code> to the marked messages
See <a href="Marking-Messages.html#Marking-Messages">Marking Messages</a>.
</p>
<a name="index-vm_002dhighlighted_002dheader_002dregexp"></a>
<a name="index-vm_002dhighlighted_002dheader_002dface"></a>
<p>Another variable of interest is <code>vm-highlighted-header-regexp</code>.
The value of this variable should be a single regular expression that
matches the beginnings of any header that should be presented in inverse
video when previewing. For example, a value of
‘<samp>"^From\\|^Subject"</samp>’ causes the From and Subject headers to be
highlighted. Highlighted headers will be displayed using the face
specified by <code>vm-highlighted-header-face</code>, which defaults to
’bold.
</p>
<a name="index-vm_002dpreview_002dread_002dmessages"></a>
<p>By default, VM will not preview messages that are flagged as read. To
have VM preview all messages, set the value of
<code>vm-preview-read-messages</code> to <code>t</code>.
</p>
<a name="index-vm_002dexpose_002dhidden_002dheaders"></a>
<a name="index-t"></a>
<p>Typing <kbd>t</kbd> (<code>vm-expose-hidden-headers</code>) makes VM toggle
between exposing and hiding headers that would ordinarily be hidden.
</p>
<hr>
<a name="Paging"></a>
<div class="header">
<p>
Next: <a href="#MIME-Messages" accesskey="n" rel="next"><acronym>MIME</acronym> Messages</a>, Previous: <a href="#Previewing" accesskey="p" rel="prev">Previewing</a>, Up: <a href="#Reading-Messages" accesskey="u" rel="up">Reading Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Paging-1"></a>
<h3 class="section">3.2 Paging</h3>
<a name="index-SPC-1"></a>
<a name="index-DEL-1"></a>
<a name="index-vm_002dauto_002dnext_002dmessage"></a>
<p>Typing <tt class="key">SPC</tt> during a message preview exposes the body of the
message. If the message was new or previously unread, it will be
flagged “read”. At this point you can use <tt class="key">SPC</tt> to scroll
forward, and <tt class="key">DEL</tt> to scroll backward a windowful of
text at a time. A prefix argument <var>n</var> applied to these commands
causes VM to scroll forward or backward <var>n</var> lines. Typing space
at the end of a message moves you to the next message. If the value
of <code>vm-auto-next-message</code> is <code>nil</code>, <tt class="key">SPC</tt> will not
move to the next message; you must type <kbd>n</kbd> explicitly.
</p>
<p>If the value of <code>vm-honor-page-delimiters</code> is non-<code>nil</code>, VM
will recognize and honor page delimiters. This means that when you
scroll through a document, VM will display text only up to the next page
delimiter. Text after the delimiter will be hidden until you type
another <tt class="key">SPC</tt>, at which point the text preceding the delimiter will
become hidden. The Emacs variable <code>page-delimiter</code> determines what
VM will consider to be a page delimiter.
</p>
<a name="index-vm_002dunread_002dmessage"></a>
<a name="index-vm_002dmark_002dmessage_002dread"></a>
<a name="index-vm_002dmark_002dmessage_002dunread"></a>
<a name="index-U"></a>
<a name="index-_002e"></a>
<p>You can “unread” a message (so to speak) by typing <kbd>U</kbd>
(<code>vm-unread-message</code>, also called <code>vm-mark-message-unread</code>).
The current message will be marked unread. Conversely, you can mark
an unread message as read by typing <kbd>.</kbd>
(<code>vm-mark-message-read</code>).
</p>
<a name="index-vm_002dtoggle_002dflag_002dmessage"></a>
<a name="index-_0021"></a>
<p>As you read messages, you might want to flag important messages so
that you can come back to them later. You can do so by typing
<code>!</code> (<code>vm-toggle-flag-message</code>). You can also turn off the
flag on a flagged message by typing <code>!</code> again. In the Summary
display, the flagged messages are highlighted using the
<code>vm-summary-high-priority-face</code>. (See <a href="Summaries.html#predefined-summary-faces">predefined summary faces</a>.)
</p>
<a name="index-longlines_002eel"></a>
<a name="index-filling-paragraphs"></a>
<a name="index-word-wrapping"></a>
<a name="index-visual-line-mode"></a>
<a name="index-vm_002dparagraph_002dfill_002dcolumn"></a>
<a name="index-vm_002dfill_002dparagraphs_002dcontaining_002dlong_002dlines"></a>
<a name="index-vm_002dword_002dwrap_002dparagraphs"></a>
<p>Sometimes you will receive messages that contain lines that are
too long to fit on your screen without wrapping. Setting
<code>vm-word-wrap-paragraphs</code> to t will cause VM to use the
<samp>longlines.el</samp> library by Grossjohann, Schroeder and Yidong to
carry out word wrapping. You must have this library installed
somewhere on your <code>load-path</code>. Another way to deal with the
problem is to use the <code>visual-line-mode</code> in Emacs 23. You can
activate it automatically for viewing messages by adding the function
<code>turn-on-visual-line-mode</code> to the
<code>vm-presentation-mode-hook</code>.
</p>
<p>If you are unable to use either of these solutions, then you can use
Emacs’s paragraph filling facility. If you set
<code>vm-fill-paragraphs-containing-long-lines</code> to a positive numeric
value <var>N</var>, VM will call <code>fill-paragraph</code> on all paragraphs that
contain lines spanning <var>N</var> columns or more. You can also set this
variable to the symbol <code>window-width</code>, in which case the width of
the current window is used the limiting width beyond which paragraph
filling is invoked. As with other things that VM does for presentation
purposes, this does not change the message contents. VM copies the
message contents to a “presentation” buffer before altering them. The
fill column that VM uses is controlled by
<code>vm-paragraph-fill-column</code>. Unlike the Emacs variable
<code>fill-column</code>, this variable is not buffer-local by default.
</p>
<hr>
<a name="MIME-Messages"></a>
<div class="header">
<p>
Previous: <a href="#Paging" accesskey="p" rel="prev">Paging</a>, Up: <a href="#Reading-Messages" accesskey="u" rel="up">Reading Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Reading-MIME-Messages"></a>
<h3 class="section">3.3 Reading <acronym>MIME</acronym> Messages</h3>
<a name="index-MIME-1"></a>
<a name="index-vm_002ddisplay_002dusing_002dmime"></a>
<p><em><acronym>MIME</acronym></em> is a set of extensions to the standard Internet message
format that allows reliable transmission of arbitrary data including images,
audio and video, as well as ordinary text in different languages. By
default, VM will recognize <acronym>MIME</acronym> encoded messages and display them
as specified by the various <acronym>MIME</acronym> standards specifications. This
can be turned off by setting the variable <code>vm-display-using-mime</code> to
<code>nil</code> and VM will then display <acronym>MIME</acronym> messages as plain text
messages.
</p>
<a name="index-vm_002dmime_002dbase64_002ddecoder_002dprogram"></a>
<a name="index-vm_002dmime_002dbase64_002dencoder_002dprogram"></a>
<a name="index-vm_002dmime_002dbase64_002ddecoder_002dswitches"></a>
<a name="index-vm_002dmime_002dbase64_002dencoder_002dswitches"></a>
<a name="index-vm_002dmime_002dqp_002ddecoder_002dprogram"></a>
<a name="index-vm_002dmime_002dqp_002ddecoder_002dswitches"></a>
<a name="index-vm_002dmime_002dqp_002dencoder_002dprogram"></a>
<a name="index-vm_002dmime_002dqp_002dencoder_002dswitches"></a>
<a name="index-vm_002dmime_002duuencode_002ddecoder_002dprogram"></a>
<a name="index-vm_002dmime_002duuencode_002ddecoder_002dswitches"></a>
<p>At its most basic <acronym>MIME</acronym> is a set of transfer encodings used to
ensure error free transport, and a set of content types. VM understands the
two standard <acronym>MIME</acronym> transport encodings, Quoted-Printable and
BASE64, and will decode messages that use them as necessary. VM also will
try to recognize and decode messages using the UNIX “uuencode” encoding
system. While this is not an official <acronym>MIME</acronym> transfer encoding and
never will be, enough old mailers still use it that it is worthwhile to
attempt to decode it. VM has Emacs-Lisp based Quoted-Printable and BASE64
encoders and decoders, but you can have VM use external programs to perform
these tasks and the process will almost certainly be faster. The variables
<code>vm-mime-qp-decoder-program</code>, <code>vm-mime-qp-decoder-switches</code>,
<code>vm-mime-qp-encoder-program</code>, <code>vm-mime-qp-encoder-switches</code>,
<code>vm-mime-base64-decoder-switches</code>,
<code>vm-mime-base64-encoder-switches</code>,
<code>vm-mime-base64-decoder-program</code>,
<code>vm-mime-base64-encoder-program</code>, tell VM which programs to use and
what command line switches to pass to them. There are C programs at VM’s
distribution sites on the Internet to handle BASE64 and Quoted-Printable.
VM does not have a built-in “uuencode” decoder, so
<code>vm-mime-uuencode-decoder-program</code> must be set non-<code>nil</code> for VM to
decode uuencoded <acronym>MIME</acronym> objects.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#Viewing-MIME" accesskey="1">Viewing <acronym>MIME</acronym></a>:</td><td> </td><td align="left" valign="top">Decoding <acronym>MIME</acronym> for viewing
</td></tr>
<tr><td align="left" valign="top">• <a href="#Attachments" accesskey="2">Attachments</a>:</td><td> </td><td align="left" valign="top">Operating on <acronym>MIME</acronym> attachments
</td></tr>
<tr><td align="left" valign="top">• <a href="#Internal-display" accesskey="3">Internal display</a>:</td><td> </td><td align="left" valign="top">Viewing attachments internally in Emacs
</td></tr>
<tr><td align="left" valign="top">• <a href="#External-display" accesskey="4">External display</a>:</td><td> </td><td align="left" valign="top">Viewing attachments with external viewers
</td></tr>
<tr><td align="left" valign="top">• <a href="#Displaying-images" accesskey="5">Displaying images</a>:</td><td> </td><td align="left" valign="top">Using Emacs facilities for images
</td></tr>
<tr><td align="left" valign="top">• <a href="#MIME-type-conversion" accesskey="6"><acronym>MIME</acronym> type conversion</a>:</td><td> </td><td align="left" valign="top">Converting external attachments to internal
</td></tr>
<tr><td align="left" valign="top">• <a href="#Character-sets" accesskey="7">Character sets</a>:</td><td> </td><td align="left" valign="top"><acronym>MIME</acronym> character sets
</td></tr>
<tr><td align="left" valign="top">• <a href="#multipart_002falternative" accesskey="8">multipart/alternative</a>:</td><td> </td><td align="left" valign="top"><acronym>MIME</acronym> content in alternative formats
</td></tr>
<tr><td align="left" valign="top">• <a href="#Inferring-MIME-types" accesskey="9">Inferring <acronym>MIME</acronym> types</a>:</td><td> </td><td align="left" valign="top">Inferring types from attachment file names
</td></tr>
</table>
<hr>
<a name="Viewing-MIME"></a>
<div class="header">
<p>
Next: <a href="#Attachments" accesskey="n" rel="next">Attachments</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Viewing-MIME-messages"></a>
<h4 class="unnumberedsubsec">Viewing <acronym>MIME</acronym> messages</h4>
<p>By default VM will display as many content types as possible
within Emacs. Images and audio are also supported if
support for images and audio has been compiled in. Types that
cannot be displayed internally within Emacs can be converted to a
type that can, or be displayed using an external viewer.
</p>
<a name="index-vm_002dauto_002ddecode_002dmime_002dmessages"></a>
<a name="index-vm_002dmime_002ddecode_002dfor_002dpreview"></a>
<a name="index-D"></a>
<p>The first step in displaying a <acronym>MIME</acronym> message is decoding it to
determine what object types it contains. The variable
<code>vm-auto-decode-mime-messages</code> controls when this happens.
A value of <code>t</code> means VM should decode the message as soon as
the message body is exposed, or during previewing if
<code>vm-mime-decode-for-preview</code> is also set non-<code>nil</code>. A
<code>nil</code> value means wait until decoding is explicitly
requested. Type <kbd>D</kbd> (<code>vm-decode-mime-message</code>) to
manually initiate <acronym>MIME</acronym> decoding.
</p>
<a name="index-vm_002dmime_002dbutton_002dformat_002dalist"></a>
<a name="index-MIME-button"></a>
<p>When VM does not display a <acronym>MIME</acronym> object immediately, it displays a
<b><acronym>MIME</acronym> button</b> or tag line in its place that describes the object
and what you have to do to display it. The value of
<code>vm-mime-button-format-alist</code> determines the format of the text in
those buttons.
</p>
<p>After decoding you will see either the decoded <acronym>MIME</acronym> objects or
button lines that must be activated to attempt display of the
<acronym>MIME</acronym> object.
</p>
<a name="index-vm_002dmime_002dauto_002ddisplayed_002dcontent_002dtypes"></a>
<a name="index-vm_002dmime_002dauto_002ddisplayed_002dcontent_002dtype_002dexceptions"></a>
<p>The variable <code>vm-mime-auto-displayed-content-types</code> specifies the types
that are displayed immediately. Its value should be a list of
<acronym>MIME</acronym> content types that should be displayed immediately after
decoding. Other types will be displayed as a button that you must activate
to display the object. The variable
<code>vm-mime-auto-displayed-content-type-exceptions</code> can be used to specify
any exceptions to the types listed in
<code>vm-mime-auto-displayed-content-types</code>.
</p>
<a name="index-Content_002dDisposition"></a>
<a name="index-vm_002dmime_002dhonor_002dcontent_002ddisposition"></a>
<a name="index-attachments"></a>
<p>The <acronym>MIME</acronym> objects in messages come with a header called
<em>Content-Disposition</em>, which specifies whether the <acronym>MIME</acronym> object
should be displayed as part of the message display (the “inline”
disposition) or whether it should be displayed as a button that should be
invoked to view the object (the <em>attachment</em> disposition). However, not
all mail clients do a good job of adding this header. It is not uncommon to
find mail clients that declare all <acronym>MIME</acronym> objects to be “inline”
and others that declare all <acronym>MIME</acronym> objects to be “attachment”.
The variable <code>vm-mime-honor-content-disposition</code> can be customized to
tell VM whether it should follow the suggestions in the Content-Disposition
headers. A value of <code>t</code> means that they should be always honored and a
value of <code>nil</code> means that they should be ignored. It can also be set
to the symbol <code>internal-only</code>, which means that the Content-Disposition
suggestions should be honored for only the internally displayable types.
(See <a href="#Internal-display-of-MIME-attachments">Internal display of <acronym>MIME</acronym> attachments</a>.)
</p>
<a name="index-vm_002dnext_002dbutton"></a>
<a name="index-vm_002dprevious_002dbutton"></a>
<a name="index-_005b"></a>
<a name="index-_005d"></a>
<p>The commands <kbd>[</kbd> and <kbd>]</kbd> (<code>vm-previous-button</code>) and
<code>vm-next-button</code>, respectively) can be
used move to particular buttons within the message presentation.
</p>
<hr>
<a name="Attachments"></a>
<div class="header">
<p>
Next: <a href="#Internal-display" accesskey="n" rel="next">Internal display</a>, Previous: <a href="#Viewing-MIME" accesskey="p" rel="prev">Viewing <acronym>MIME</acronym></a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Operating-on-MIME-attachments-1"></a>
<h4 class="unnumberedsubsec">Operating on <acronym>MIME</acronym> attachments</h4>
<a name="Operating-on-MIME-attachments"></a><a name="index-attachments-1"></a>
<a name="index-_0024-_007c"></a>
<a name="index-_0024-d"></a>
<a name="index-_0024-RET"></a>
<a name="index-_0024-s"></a>
<a name="index-_0024-w"></a>
<a name="index-_0024-p"></a>
<a name="index-_0024-d-1"></a>
<a name="index-_0024-e"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002dpipe_002dto_002dcommand"></a>
<a name="index-vm_002ddelete_002dmime_002dobject"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002ddisplay_002dusing_002ddefault"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002ddisplay_002dobject_002das_002dtype"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002dsave_002dmessage"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002dsave_002dfile"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002dpipe_002dto_002dprinter"></a>
<a name="index-vm_002ddelete_002dmime_002dobject-1"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002ddisplay_002dusing_002dexternal_002dviewer"></a>
<a name="index-vm_002dmime_002dreader_002dmap_002dattach_002dto_002dcomposition"></a>
<p>To activate a button, either click the middle mouse button over it, or move
the cursor to the line and press <tt class="key">RET</tt>. If you are running under a
window system, you can use the right mouse button over a <acronym>MIME</acronym>
button to display a menu of actions you can take on the <acronym>MIME</acronym>
object. If you prefer using keyboard commands, you can save the
<acronym>MIME</acronym> object with <kbd>$ w</kbd>, print it with <kbd>$ p</kbd>, or pipe it to
a shell command with <kbd>$ |</kbd>. Use <kbd>$ s</kbd> to append an encapsulated
message or USENET news article to a folder. If you want to display the
object with its characters displayed using Emacs’ default face, use <kbd>$
<span class="key">RET</span></kbd>. To display the object using an external viewer, type <kbd>$ e</kbd>.
</p>
<table>
<tr><td width="20%">$ w</td><td width="80%"><code>vm-mime-reader-map-save-file</code></td></tr>
<tr><td width="20%">$ s</td><td width="80%"><code>vm-mime-reader-map-save-message</code></td></tr>
<tr><td width="20%">$ p</td><td width="80%"><code>vm-mime-reader-map-pipe-to-printer</code></td></tr>
<tr><td width="20%">$ |</td><td width="80%"><code>vm-mime-reader-map-pipe-to-command</code></td></tr>
<tr><td width="20%">$ <tt class="key">RET</tt></td><td width="80%"><code>vm-mime-reader-map-display-using-default</code></td></tr>
<tr><td width="20%">$ e</td><td width="80%"><code>vm-mime-reader-map-display-using-external-viewer</code></td></tr>
<tr><td width="20%">$ v</td><td width="80%"><code>vm-mime-reader-map-display-object-as-type</code></td></tr>
<tr><td width="20%">$ d</td><td width="80%"><code>vm-delete-mime-object</code></td></tr>
<tr><td width="20%">$ a</td><td width="80%"><code>vm-mime-reader-map-attach-to-composition</code></td></tr>
</table>
<a name="index-vm_002dmime_002ddelete_002dafter_002dsaving"></a>
<a name="index-vm_002dmime_002dattachment_002dsave_002ddirectory"></a>
<a name="index-vm_002dmime_002dconfirm_002ddelete"></a>
<p>The <acronym>MIME</acronym> attachments can be saved to disk with <kbd>$ w</kbd>
(<code>vm-mime-reader-map-save-file</code>). They can be deleted at the
same time by setting the variable <code>vm-mime-delete-after-saving</code>.
In this case, the attachment is deleted and replaced by a <acronym>MIME</acronym> part
that refers to the saved copy. The variable
<code>vm-mime-attachment-save-directory</code> specifies the default
directory to save the attachments in. The <acronym>MIME</acronym> attachments can also
be deleted directly from the message bodies with <kbd>$ d</kbd>
(<code>vm-delete-mime-object</code>). The variable
<code>vm-mime-confirm-delete</code> controls whether a confirmation is asked
for.
</p>
<p>It is a good idea to use <code>vm-mime-delete-after-saving</code> to delete
saved attachments instead of deleting them manually, because with the
former approach the message will have a handle to the saved copy,
which can be retrieved when desired.
</p>
<p>Saving attachments to the file system and deleting them from message
bodies has the beneficial effect of reducing the size of VM folders.
That leads to a better utilization of the computer resources and
usually a faster operation of VM.
</p>
<a name="index-vm_002dsave_002dall_002dattachments"></a>
<a name="index-vm_002ddelete_002dall_002dattachments"></a>
<a name="index-vm_002dmime_002ddeletable_002dtypes"></a>
<a name="index-vm_002dmime_002ddeletable_002dtype_002dexceptions"></a>
<a name="index-vm_002dmime_002dsavable_002dtypes"></a>
<a name="index-vm_002dmime_002dsavable_002dtype_002dexceptions"></a>
<p>The commands <code>vm-save-all-attachments</code> and
<code>vm-delete-all-attachments</code> can be used to save or delete
<i>all</i> the attachments in a message. An "attachment" in this context
is any <acronym>MIME</acronym> part that has "attachment" as its content-disposition or
simply has a file name. In addition, all <acronym>MIME</acronym> parts that have types
matching <code>vm-mime-savable-types</code> or <code>vm-mime-deletable-types</code>
(but not the corresponding <code>-exceptions</code>) are included.
</p>
<hr>
<a name="Internal-display"></a>
<div class="header">
<p>
Next: <a href="#External-display" accesskey="n" rel="next">External display</a>, Previous: <a href="#Attachments" accesskey="p" rel="prev">Attachments</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Internal-display-of-MIME-attachments-1"></a>
<h4 class="unnumberedsubsec">Internal display of <acronym>MIME</acronym> attachments</h4>
<a name="Internal-display-of-MIME-attachments"></a>
<a name="index-vm_002dmime_002dauto_002ddisplayed_002dcontent_002dtypes-1"></a>
<p>A value of t for <code>vm-mime-auto-displayed-content-types</code> means that
all types should be displayed immediately. A nil value means
never display <acronym>MIME</acronym> objects immediately; only use buttons. If
the value of <code>vm-mime-auto-displayed-content-types</code> is a list, it
should be a list of strings, which should all be <acronym>MIME</acronym> types or
type/subtype pairs. Example:
</p>
<div class="example">
<pre class="example">(setq vm-mime-auto-displayed-content-types '("text" "image/jpeg"))
</pre></div>
<p>If a top-level type is listed without a subtype then all
subtypes of that type are assumed to be included. The example above
says that all text types should be displayed immediately, but only
JPEG images should be displayed this way.
</p>
<a name="index-vm_002dmime_002dauto_002ddisplayed_002dcontent_002dtype_002dexceptions-1"></a>
<p>The variable <code>vm-mime-auto-displayed-content-type-exceptions</code>
should be a list of <acronym>MIME</acronym> content types that should not be
displayed immediately after decoding. This variable acts as
an exception list for <code>vm-mime-auto-displayed-content-types</code>;
all types listed there will be auto-displayed except those in
the exception list.
</p>
<div class="example">
<pre class="example">(setq vm-mime-auto-displayed-content-type-exceptions '("text/html"))
</pre></div>
<p>If “code” has been included in
<code>vm-mime-auto-displayed-content-types</code> then the effect of this
setting is to allow the auto-display of all text types <i>except</i> for
html.
</p>
<a name="index-vm_002dmime_002dinternal_002dcontent_002dtypes"></a>
<p>The variable <code>vm-mime-internal-content-types</code> specifies which
types should be displayed internally within Emacs. Like
<code>vm-mime-auto-displayed-content-types</code> its value should be a list
of <acronym>MIME</acronym> content types. A value of t means that VM should always
display an object internally if possible. VM knows which object types
can be displayed internally, so you can specify the types you want
without worrying about potential errors. If the value is a list, it
should be a list of strings. Example:
</p>
<div class="example">
<pre class="example">(setq vm-mime-internal-content-types '("text" "message" "image/jpeg"))
</pre></div>
<a name="index-multipart-types"></a>
<p>If a top-level type is listed without a subtype then all
subtypes of that type are assumed to be included. Note that multipart
types are always handled internally regardless of the setting of this
variable.
</p>
<a name="index-vm_002dmime_002dinternal_002dcontent_002dtype_002dexceptions"></a>
<p>The variable <code>vm-mime-internal-content-type-exceptions</code> serves as
the exception list for <code>vm-mime-internal-content-types</code>. Its value
should be a list of types that should not be displayed internally.
</p>
<a name="index-HTML"></a>
<a name="index-vm_002dmime_002dtext_002fhtml_002dhandler"></a>
<p>The <acronym>HTML</acronym> content in text/html <acronym>MIME</acronym> parts can be
displayed in Emacs using a variety of packages. VM knows about:
</p>
<a name="index-lynx"></a>
<a name="index-w3m"></a>
<a name="index-w3"></a>
<table>
<tr><td width="15%">lynx</td><td width="85%">The <code>lynx</code> browser used externally to convert <acronym>HTML</acronym>
to plain text</td></tr>
<tr><td width="15%">w3m</td><td width="85%">The <code>w3m</code> browser used externally to convert <acronym>HTML</acronym>
to plain text</td></tr>
<tr><td width="15%">emacs-w3</td><td width="85%">The ‘<samp>Emacs/W3</samp>’ browser used internally in Emacs</td></tr>
<tr><td width="15%">emacs-w3m</td><td width="85%">The ‘<samp>Emacs/W3M</samp>’ browser used internally in Emacs</td></tr>
</table>
<p>You can set the variable <code>vm-mime-text/html-handler</code> to one of
these values to use the appropriate package. A value of
<code>auto-select</code> causes VM to select the best package available. A
value of <code>nil</code> asks VM not to display <acronym>HTML</acronym> content internally.
The default value is <code>auto-select</code>, allowing VM to give you the
best display possible in your environment. If you do not like the
results, you may set the variable to a different value or
<code>nil</code>.
</p>
<hr>
<a name="External-display"></a>
<div class="header">
<p>
Next: <a href="#Displaying-images" accesskey="n" rel="next">Displaying images</a>, Previous: <a href="#Internal-display" accesskey="p" rel="prev">Internal display</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="External-display-of-MIME-attachments"></a>
<h4 class="unnumberedsubsec">External display of <acronym>MIME</acronym> attachments</h4>
<a name="index-vm_002dmime_002dexternal_002dcontent_002dtypes_002dalist"></a>
<p>For types that you want displayed externally, set the value
of <code>vm-mime-external-content-types-alist</code> to specify external
viewers for the types. The value of this variable should be an
associative list of <acronym>MIME</acronym> content types and the external programs
used to display them. If VM cannot display a type internally or
a type is not listed in <code>vm-mime-internal-content-types</code> VM will
try to launch an external program to display that type.
</p>
<p>The alist format is a list of lists, each sublist having the form
</p>
<div class="example">
<pre class="example">(<var>TYPE</var> <var>FUNCTION</var> <var>ARG</var> <var>ARG</var> ... )
</pre></div>
<p>or
</p>
<div class="example">
<pre class="example">(<var>TYPE</var> <var>PROGRAM</var> <var>ARG</var> <var>ARG</var> ... )
</pre></div>
<p>or
</p>
<div class="example">
<pre class="example">(<var>TYPE</var> <var>COMMAND-LINE</var>)
</pre></div>
<p><var>TYPE</var> is a string specifying a <acronym>MIME</acronym> type or
type/subtype pair. For example “text” or “image/jpeg”. If a
top-level type is listed without a subtype, all subtypes of that type
are assumed to be included.
</p>
<p>In the first form, <var>FUNCTION</var> is a lisp function that is responsible
for displaying the attachment in an external application. Any
<var>ARG</var>s will be passed to the function as arguments. The octets that
compose the object will be written into a temporary file and the name of
the file is passed as an additional argument.
</p>
<p>In the second form, <var>PROGRAM</var> is a string naming a program to
run to display an object. Any <var>ARG</var>s will be passed to the
program as arguments. The octets that compose the object will be
written into a temporary file and the name of the file can be
inserted into an <var>ARG</var> string by writing ‘<samp>%f</samp>’ in the
<var>ARG</var> string. In earlier versions of VM the filename was
always added as the last argument; as of VM 6.49 this is only done
if ‘<samp>%f</samp>’ does not appear in any of the <var>ARG</var> strings.
</p>
<p>If the <var>COMMAND-LINE</var> form is used, the program and its
arguments are specified as a single string and that string is
passed to the shell ("sh -c" typically) for execution. Since
the command line will be passed to the shell, you can use shell
variables and input/output redirection if needed. As with the
<var>PROGRAM/ARGS</var> form, the name of the temporary file that
contains the <acronym>MIME</acronym> object will be appended to the command line if
‘<samp>%f</samp>’ does not appear in the command line string.
</p>
<p>In either the <var>PROGRAM/ARG</var> or <var>COMMAND-LINE</var> forms, all the
program and argument strings will have any %-specifiers in
them expanded as described in the documentation for the
variable <code>vm-mime-button-format-alist</code>. The only difference
is that ‘<samp>%f</samp>’ refers to the temporary file VM creates to store
the object to be displayed, not the filename that the sender
may have associated with the attachment.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(setq vm-mime-external-content-types-alist
'(
("text/html" browse-url-of-file)
("image/gif" "xv")
("image/jpeg" "xv")
("video/mpeg" "mpeg_play")
("video" w32-shell-execute "open")
)
)
</pre></div>
<p>The first matching list element will be used.
</p>
<p>No multipart message will ever be sent to an external viewer.
</p>
<p>External viewer processes are normally killed when you select
a new message in the current folder. If you want viewer
processes to not be killed, set
<code>vm-mime-delete-viewer-processes</code> to a <code>nil</code> value.
</p>
<p>Any type that cannot be displayed internally or externally or
converted to a type that can be displayed, will be displayed as a
button that allows you to save the body to a file.
</p>
<a name="index-vm_002dmime_002dexternal_002dcontent_002dtype_002dexceptions"></a>
<p>As with the internal type list, there is an exception list that
you can use to specify types that you do not want displayed
externally. When VM is considering whether it should
automatically launch an external viewer, it will consult the
variable <code>vm-mime-external-content-type-exceptions</code>. If the
type to be displayed is listed, VM will not launch a viewer.
This allows you to setup viewers for types that ordinarily you
would not want VM to display or for types that you normally want
to convert to some other type using <code>vm-mime-type-converter-alist</code>.
You can still display such a type with an external viewer by using
<kbd>$ e</kbd>.
</p>
<a name="index-vm_002dmime_002dattachment_002dauto_002dsuffix_002dalist"></a>
<p>When a <acronym>MIME</acronym> object is displayed using an external viewer VM must
first write the object to a temporary file. The external viewer
then opens and displays that file. Some viewers will not open a
file unless the filename ends with some extension that it
recognizes such as ‘<samp>.html</samp>’ or ‘<samp>.jpg</samp>’. You can use the
variable <code>vm-mime-attachment-auto-suffix-alist</code> to map <acronym>MIME</acronym>
types to extensions that your external viewers will recognize.
The value of this variable should be a list of type and suffix
pairs. The list format is:
</p>
<div class="example">
<pre class="example">((<var>TYPE</var> . <var>SUFFIX</var>) ...)
</pre></div>
<p><var>TYPE</var> is a string specifying a <acronym>MIME</acronym> top-level type or a type/subtype pair.
If a top-level type is listed without a subtype, all subtypes of
that type are matched.
</p>
<p><var>SUFFIX</var> is a string specifying the suffix that should be used for
the accompanying type.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(setq vm-mime-attachment-auto-suffix-alist
'(
("image/jpeg" . ".jpg")
("image/gif" . ".gif")
("image/png" . ".png")
("text" . ".txt")
)
)
</pre></div>
<p>VM will search the list for a matching type. The suffix
associated with the first type that matches will be used for the
temporary filename.
</p>
<hr>
<a name="Displaying-images"></a>
<div class="header">
<p>
Next: <a href="#MIME-type-conversion" accesskey="n" rel="next"><acronym>MIME</acronym> type conversion</a>, Previous: <a href="#External-display" accesskey="p" rel="prev">External display</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Displaying-inline-images-in-messages"></a>
<h4 class="unnumberedsubsec">Displaying inline images in messages</h4>
<a name="index-images"></a>
<p>Most versions of Emacs can display images when used on graphical
screens. You can verify if the Emacs version is able to do so by
calling the function <code>display-images-p</code>. However, Emacs relies
on external libraries to create graphical images, which are specified
through the variable <code>image-library-alist</code>. Even if Emacs has
the ability to display some image type, it cannot display such images
unless appropriate libraries are installed and specified to Emacs. You
can verify which image types are really available by calling the
function <code>image-type-available-p</code> with an image type such as
‘<samp>tiff</samp>’ or ‘<samp>gif</samp>’ as the argument.
</p>
<a name="index-vm_002dmime_002dinternal_002dcontent_002dtypes-1"></a>
<a name="index-vm_002dmime_002dauto_002ddisplayed_002dcontent_002dtypes-2"></a>
<p>Assuming that a particular image type, say ‘<samp>tiff</samp>’ is available,
you can include its <acronym>MIME</acronym> type in
<code>vm-mime-internal-content-types</code>, e.g.,
</p><div class="example">
<pre class="example">(add-to-list 'vm-mime-internal-content-types "image/tiff")
</pre></div>
<p>You can also add the <acronym>MIME</acronym> type to the variable
<code>vm-mime-auto-displayed-content-types</code> so that VM will
automatically display all images of the type.
If the type is not included among the auto-displayed types, then the
image is initially shown as a button with a thumbnail image. Clicking on the
button with the middle mouse button expands the image to its full size.
</p>
<a name="index-ImageMagick"></a>
<a name="index-vm_002dimagemagick_002didentify_002dprogram"></a>
<a name="index-vm_002dimagemagick_002dconvert_002dprogram"></a>
<p>Once an image is displayed, you can use the right mouse button to do
various image manipulations on it, such as enlarging/reducing it,
rotating it etc. To do such operations, VM uses the ‘<samp>ImageMagick</samp>’
graphics manipulation software. You can install ImageMagick on your
system and specify the location of its <code>identify</code> and
<code>convert</code> programs to VM via the variables
<code>vm-imagemagick-identify-program</code> and
<code>vm-imagemagick-convert-program</code>.
</p>
<a name="index-vm_002dmime_002duse_002dimage_002dstrips"></a>
<p>By default, VM displays images by slicing them into contiguous
horizontal strips and displaying the strips in order. This
facilitates vertical scrolling within an image. The variable
<code>vm-mime-use-image-strips</code> controls whether VM uses strips for
image display. It is ‘<samp>t</samp>’ by default.
</p>
<p>VM also uses the ImageMagick’s <code>convert</code> program to convert
between image formats, so that an image that is not displayable in
Emacs is converted to another format that is displayable. You can
turn off such conversion by setting the variable
<code>vm-imagemagick-convert-program</code> to ‘<samp>nil</samp>’.
</p>
<hr>
<a name="MIME-type-conversion"></a>
<div class="header">
<p>
Next: <a href="#Character-sets" accesskey="n" rel="next">Character sets</a>, Previous: <a href="#Displaying-images" accesskey="p" rel="prev">Displaying images</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="MIME-type-conversion-1"></a>
<h4 class="unnumberedsubsec"><acronym>MIME</acronym> type conversion</h4>
<a name="index-vm_002dmime_002dtype_002dconverter_002dalist"></a>
<p>Types that cannot be displayed internally or externally are
checked against an associative list of types that can be converted to other
types. If an object can be converted to a type that VM can
display, then the conversion is done and the new object is
subject to the auto-display rules which determine whether the
object is displayed immediately or a button is displayed in its
place. The conversion list is stored in the variable
<code>vm-mime-type-converter-alist</code>.
</p>
<p>The alist format is
</p>
<div class="example">
<pre class="example">( (START-TYPE END-TYPE COMMAND-LINE ) ... )
</pre></div>
<p><var>START-TYPE</var> is a string specifying a <acronym>MIME</acronym> type or type/subtype pair.
Example ‘<samp>"text"</samp>’ or ‘<samp>"image/jpeg"</samp>’. If a top-level type is
listed without a subtype, all subtypes of that type are assumed
to be included.
</p>
<p><var>END-TYPE</var> must be an exact type/subtype pair. This is the type
to which <var>START-TYPE</var> will be converted.
</p>
<p><var>COMMAND-LINE</var> is a string giving a command line to be passed to
the shell. The octets that compose the object will be written to
the standard input of the shell command.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(setq vm-mime-type-converter-alist
'(
("image/jpeg" "image/gif" "jpeg2gif")
("text/html" "text/plain" "striptags")
)
)
</pre></div>
<p>The first matching list element will be used.
</p>
<hr>
<a name="Character-sets"></a>
<div class="header">
<p>
Next: <a href="#multipart_002falternative" accesskey="n" rel="next">multipart/alternative</a>, Previous: <a href="#MIME-type-conversion" accesskey="p" rel="prev"><acronym>MIME</acronym> type conversion</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="MIME-character-sets"></a>
<h4 class="unnumberedsubsec"><acronym>MIME</acronym> character sets</h4>
<p>For text type messages, <acronym>MIME</acronym> also requires that a character set
be specified, so that the recipient’s mail reader knows what
character glyphs to use to display each character code. To
display a message properly VM needs to know how to choose a font
for a given character set.
</p>
<a name="index-vm_002dmime_002ddefault_002dface_002dcharsets"></a>
<a name="index-character-sets"></a>
<a name="index-Windows_002d1252"></a>
<a name="index-CP1252"></a>
<a name="index-GB2312"></a>
<a name="index-ISO_002d8859_002d1"></a>
<a name="index-US_002dASCII"></a>
<p>The variable <code>vm-mime-default-face-charsets</code> tells VM what character
sets your default face can display. For most American and European
users using X Windows, Emacs’ default face displays the ISO-8859-1
and US-ASCII characters, US-ASCII being a subset of ISO-8859-1.
Additional character sets can be included if you think that the
messages only contain characters that your system can display. For
example, messages sent by a Chinese sender might declare the character
set to be GB2312 but the message might contain only English characters
that you might be able to display and read. Messages sent by Microsoft
Windows users might declare the character set to be Windows-1252 or
CP1252, but the majority of the characters might be in ISO-8859-1. By
including such character sets in <code>vm-mime-default-face-charsets</code>,
you might be able to view the majority of the characters even if your
system cannot fully handle the character set.
</p>
<p>The value of <code>vm-mime-default-face-charsets</code> must be a list of
strings specifying the character sets that your default face can
display. Example:
</p>
<div class="example">
<pre class="example">(add-to-list 'vm-mime-default-face-charsets "Windows-1251")
(add-to-list 'vm-mime-default-face-charsets "Windows-1252")
(add-to-list 'vm-mime-default-face-charsets "Windows-1257")
</pre></div>
<p>Note that for character sets listed in this variable, VM’s <acronym>MIME</acronym>
decoding is bypassed. So you should not add charsets like "UTF-8"
that require additional decoding.
</p>
<a name="index-vm_002dmime_002dcharset_002dconverter_002dalist"></a>
<a name="index-UTF_002d8"></a>
<a name="index-ISO_002d2022_002dJP"></a>
<p>Sometimes a charset that VM cannot display can be converted to a
one that VM can display. An example would be a message encoded
using UTF-8 but in fact only contains Japanese characters. In
that case the message text could probably be converted to
iso-2022-jp which VM running on a MULE-enabled Emacs could
display.
</p>
<p>VM offers a way to do such conversions. The variable
<code>vm-mime-charset-converter-alist</code> is an associative list of <acronym>MIME</acronym>
charsets and programs that can convert between them. If VM
cannot display a particular character set, it will scan this list
to see if the charset can be converted into a charset that it can
display.
</p>
<p>The alist format is:
</p>
<div class="example">
<pre class="example"> ( ( START-CHARSET END-CHARSET COMMAND-LINE ) ... )
</pre></div>
<p><var>START-CHARSET</var> is a string specifying a <acronym>MIME</acronym> charset.
Example ‘<samp>"iso-8859-1"</samp>’ or ‘<samp>"utf-8"</samp>’.
</p>
<p><var>END-CHARSET</var> is a string specifying the charset to which
<var>START-CHARSET</var> will be converted.
</p>
<p><var>COMMAND-LINE</var> is a string giving a command line to be passed to
the shell. The characters in <var>START-CHARSET</var> will be written to the
standard input of the shell command and VM expects characters
encoded in <var>END-CHARSET</var> to appear at the standard output of the
<var>COMMAND-LINE</var>. <var>COMMAND-LINE</var> is passed to the shell, so you can
use pipelines, shell variables and redirections.
</p>
<a name="index-iconv"></a>
<p>Example:
</p>
<div class="example">
<pre class="example">(setq vm-mime-charset-converter-alist
'(
("utf-8" "iso-2022-jp" "iconv -f utf-8 -t iso-2022-jp -c")
)
)
</pre></div>
<p>The first matching list element will be used. Be sure to include the
<code>-c</code> option so that nonconvertible characters are ignored instead
of causing error messages.
</p>
<a name="index-vm_002dmime_002dcharset_002dfont_002dalist"></a>
<p>The variable <code>vm-mime-charset-font-alist</code> tells VM what font to use
to display a character set that cannot be displayed using
the default face. The value of this variable should be an
assoc list of character sets and fonts that can be used to display
them. The format of the list is:
</p>
<p>( (<var>CHARSET</var> . <var>FONT</var>) ...)
</p>
<p><var>CHARSET</var> is a string naming a <acronym>MIME</acronym> registered character set such
as ‘<samp>"iso-8859-5"</samp>’.
</p>
<p><var>FONT</var> is a string naming a font that can be used to display
<var>CHARSET</var>.
</p>
<p>An example setup might be:
</p>
<div class="example">
<pre class="example">(setq vm-mime-charset-font-alist
'(
("iso-8859-5" . "-*-*-medium-r-normal-*-16-160-72-72-c-80-iso8859-5")
)
)
</pre></div>
<p>This variable is only useful for character sets whose
characters can all be encoded in single 8-bit bytes. Also multiple
fonts can only be displayed if you’re running under a window system
e.g. X Windows. So this variable will have no effect if you’re
running Emacs on a tty.
</p>
<p>Note that under FSF Emacs 19 any fonts you use must be the
same height as your default font. XEmacs and Emacs 21 do not
have this limitation. Under Emacs 20 and beyond, and under
any XEmacs version compiled with MULE support, the value of
<code>vm-mime-charset-font-alist</code> has no effect. This is
because all characters are displayed using fonts discovered by
MULE and VM has no control over them.
</p>
<hr>
<a name="multipart_002falternative"></a>
<div class="header">
<p>
Next: <a href="#Inferring-MIME-types" accesskey="n" rel="next">Inferring <acronym>MIME</acronym> types</a>, Previous: <a href="#Character-sets" accesskey="p" rel="prev">Character sets</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="MIME-multipart_002falternative"></a>
<h4 class="unnumberedsubsec"><acronym>MIME</acronym> multipart/alternative</h4>
<a name="index-MIME-alternatives"></a>
<p><acronym>MIME</acronym> allows a message to be sent with its content encoded in multiple
formats, simultaneously, in the same message. Such messages have a
content type of <em>multipart/alternative</em>. The idea is that the sender
might have different <acronym>MIME</acronym> decoding or display capabilities than some
of his recipients. For instance, the sender may be able to compose a
message using fancy text formatting constructs like tables, italics
and equations but some of the recipients may only be able to display
plain text. The ‘<samp>multipart/alternative</samp>’ type message is the solution
to this dilemma. Such a message would contain at least two text
subparts, one in plain text and the other in the full featured text
formatting language that the sender used.
</p>
<a name="index-vm_002dmime_002dalternative_002dshow_002dmethod"></a>
<a name="index-MIME-alternative_002c-best"></a>
<a name="index-MIME-alternative_002c-best_002dinternal"></a>
<p>To control how VM displays ‘<samp>multipart/alternative</samp>’ messages, you must
set the variable <code>vm-mime-alternative-show-method</code>. Its value must be
a symbol. A value of <code>best</code> tells VM to display the message
using the subpart closest in appearance to what the sender used to
compose the message. In the example above this would mean displaying
the fully featured text subpart, if VM knows how to display that type.
VM will display the type either internally or externally. A
value of <code>best-internal</code> tells VM to use the closest subpart that
it can display internally. External viewers won’t be used in this
case. A value of <code>all</code> asks VM to display all the alternatives.
</p>
<a name="index-MIME-alternative_002c-favorite"></a>
<a name="index-MIME-alternative_002c-favorite_002dinternal"></a>
<p>The value can also be a list of the form
</p>
<div class="example">
<pre class="example"> (favorite <var>TYPE</var> ...)
</pre></div>
<p>with the first element of the list being the symbol <code>favorite</code>.
The remaining elements of the list are strings specifying <acronym>MIME</acronym> types.
VM will look for each TYPE in turn in the list of alternatives and
choose the first matching alternative found that can be displayed. If
instead of the symbol <code>favorite</code>, <code>favorite-internal</code> is
used then the first <var>TYPE</var> that matches an alternative that can be
displayed internally will be chosen.
</p>
<a name="index-vm_002dnuke_002dalternative_002dtext_002fhtml"></a>
<p>Messages with multiple alternatives use up extra file space and slow
down the operation of vm. If you would like keep the text/plain
alternatives but erase the text/html alternatives, you can use the
<code>vm-nuke-alternative-text/html</code> command. This operation may not
always be safe because the <code>text/html</code> alternative is often the
most faithful representation of the sender’s message and it may
include attachments that are not replicated in the other
alternatives. Please use caution.
</p>
<hr>
<a name="Inferring-MIME-types"></a>
<div class="header">
<p>
Previous: <a href="#multipart_002falternative" accesskey="p" rel="prev">multipart/alternative</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Inferring-MIME-types-1"></a>
<h4 class="unnumberedsubsec">Inferring <acronym>MIME</acronym> types</h4>
<p>Some mailers incorrectly use the generic
‘<samp>application/octet-stream</samp>’ type when sending files that
really have a specific <acronym>MIME</acronym> type. For example, a JPEG image
might be sent using ‘<samp>application/octet-stream</samp>’ type instead
of ‘<samp>image/jpeg</samp>’, which would be the correct type. In many
cases the filename sent along with the mistyped file
(e.g. <samp>foo.jpg</samp>) suggests the correct type.
</p>
<a name="index-vm_002dinfer_002dmime_002dtypes"></a>
<p>If the variable
<code>vm-infer-mime-types</code> is set non-<code>nil</code>, VM will attempt to use
the filename sent with a <acronym>MIME</acronym> attachment to guess an attachment’s
type if the attachment is of type ‘<samp>application/octet-stream</samp>’.
</p>
<a name="index-vm_002dinfer_002dmime_002dtypes_002dfor_002dtext"></a>
<p>If the variable
<code>vm-infer-mime-types-for-text</code> is set non-<code>nil</code>, VM will
attempt to use filenames for attachments of type ‘<samp>text/plain</samp>’ as
well.
</p>
<hr>
<div class="header">
<p>
Previous: <a href="#multipart_002falternative" accesskey="p" rel="prev">multipart/alternative</a>, Up: <a href="#MIME-Messages" accesskey="u" rel="up"><acronym>MIME</acronym> Messages</a> [<a href="License.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|