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
|
<html lang="en">
<head>
<title>Viewing Attachments - The MH-E Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The MH-E Manual">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Reading-Mail.html#Reading-Mail" title="Reading Mail">
<link rel="prev" href="Viewing.html#Viewing" title="Viewing">
<link rel="next" href="HTML.html#HTML" title="HTML">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is version 8.0.3 of `The MH-E
Manual', last updated 2006-11-12.
Copyright (C) 1995, 2001, 2002, 2003, 2005, 2006 Free
Software Foundation, Inc.
The MH-E manual is free documentation; you can redistribute it
and/or modify it under the terms of either:
a. the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
b. the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option)
any later version.
The MH-E manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License or GNU Free Documentation License for more
details.
The GNU General Public License and the GNU Free Documentation
License appear as appendices to this document. You may also
request copies by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Viewing-Attachments"></a>
Next: <a rel="next" accesskey="n" href="HTML.html#HTML">HTML</a>,
Previous: <a rel="previous" accesskey="p" href="Viewing.html#Viewing">Viewing</a>,
Up: <a rel="up" accesskey="u" href="Reading-Mail.html#Reading-Mail">Reading Mail</a>
<hr>
</div>
<h3 class="section">6.2 Viewing Attachments</h3>
<p><a name="index-attachments-551"></a><a name="index-body-parts-552"></a><a name="index-g_t_0040command_007bmhshow_007d-553"></a><a name="index-g_t_0040command_007bshow_007d-554"></a><a name="index-MH-commands_002c-_0040command_007bmhshow_007d-555"></a><a name="index-MH-commands_002c-_0040command_007bshow_007d-556"></a><a name="index-MIME-557"></a><a name="index-multimedia-mail-558"></a>
MH has the ability to display <span class="sc">mime</span> (Multipurpose Internet
Mail Extensions) messages which are simply messages with additional
<dfn>body parts</dfn> or <dfn>attachments</dfn>. You can use the MH commands
<samp><span class="command">show</span></samp><a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a> or <samp><span class="command">mhshow</span></samp><a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a> from the shell to read <span class="sc">mime</span> messages<a rel="footnote" href="#fn-3" name="fnd-3"><sup>3</sup></a>.
<p><a name="index-Emacs_002c-packages_002c-mm_002ddecode-559"></a><a name="index-mm_002ddecode-package-560"></a><a name="index-mh_002dtoggle_002dmh_002ddecode_002dmime_002dflag-561"></a><a name="index-g_t_003b-_0028semicolon_0029-562"></a><a name="index-mh_002ddecode_002dmime_002dflag-563"></a>
MH-E can handle attachments as well if the Gnus `<samp><span class="samp">mm-decode</span></samp>'
package is present. If so, the option <code>mh-decode-mime-flag</code> will
be on. Otherwise, you'll see the <span class="sc">mime</span> body parts rather than text
or attachments. There isn't much point in turning off the option
<code>mh-decode-mime-flag</code>; however, you can inspect it if it appears
that the body parts are not being interpreted correctly or toggle it
with the command <kbd>;</kbd> (semicolon;
<code>mh-toggle-mh-decode-mime-flag</code>) to view the raw message. This
option also controls the display of quoted-printable messages and
other graphical widgets. See <a href="Viewing.html#Viewing">Viewing</a>.
<p><a name="index-buttons-564"></a>
Attachments in MH-E are indicated by <dfn>buttons</dfn> like this:
<pre class="smallexample"> [1. image/jpeg; foo.jpg]...
</pre>
<p><a name="index-mh_002dnext_002dbutton-565"></a><a name="index-mh_002dpress_002dbutton-566"></a><a name="index-mh_002dprev_002dbutton-567"></a><a name="index-g_t_0040key_007bRET_007d-568"></a><a name="index-K-_0040key_007bTAB_007d-569"></a><a name="index-K-S_002d_0040key_007bTAB_007d-570"></a><a name="index-Mouse_002d1-571"></a><a name="index-Mouse_002d2-572"></a>
To view the contents of the button, use either <kbd>Mouse-1</kbd> or
<kbd>Mouse-2</kbd> on the button or <RET> (<code>mh-press-button</code>) when
the cursor is over the button. This command is a toggle so if you use
it again on the same attachment, it is hidden. If Emacs does not know
how to display the attachment, then Emacs offers to save the
attachment in a file. To move the cursor to the next button, use the
command <kbd>K <TAB></kbd> (<code>mh-next-button</code>). If the end of the
buffer is reached then the search wraps over to the start of the
buffer. To move the cursor to the previous button, use the command
<kbd>K S-<TAB></kbd> (<code>mh-prev-button</code>). If the beginning of the
buffer is reached then the search wraps over to the end of the buffer.
<p><a name="index-attachments_002c-viewing-573"></a><a name="index-viewing-attachments-574"></a><a name="index-mh_002dfolder_002dtoggle_002dmime_002dpart-575"></a><a name="index-K-v-576"></a>
Another way to view the contents of a button is to use the command
<kbd>K v</kbd> (<code>mh-folder-toggle-mime-part</code>). This command displays
(or hides) the attachment associated with the button under the cursor.
If the cursor is not located over a button, then the cursor first
moves to the next button, wrapping to the beginning of the message if
necessary. This command has the advantage over the previous commands
of working from the MH-Folder buffer. You can also provide a numeric
prefix argument (as in <kbd>4 K v</kbd>) to view the attachment labeled
with that number. If Emacs does not know how to display the
attachment, then Emacs offers to save the attachment in a file.
<p><a name="index-g_t_0040file_007b_002fetc_002fmailcap_007d-577"></a><a name="index-files_002c-_0040file_007b_002fetc_002fmailcap_007d-578"></a><a name="index-mailcap_002dmime_002dinfo-579"></a><a name="index-mh_002ddisplay_002dwith_002dexternal_002dviewer-580"></a><a name="index-K-e-581"></a>
If Emacs does not know how to view an attachment, you could save it
into a file and then run some program to open it. It is easier,
however, to launch the program directly from MH-E with the command
<kbd>K e</kbd> (<code>mh-display-with-external-viewer</code>). While you'll most
likely use this to view spreadsheets and documents, it is also useful
to use your browser to view HTML attachments with higher fidelity than
what Emacs can provide. This command displays the attachment
associated with the button under the cursor. If the cursor is not
located over a button, then the cursor first moves to the next button,
wrapping to the beginning of the message if necessary. You can provide
a numeric prefix argument (as in <kbd>4 K e</kbd>) to view the attachment
labeled with that number. This command tries to provide a reasonable
default for the viewer by calling the Emacs function
<code>mailcap-mime-info</code>. This function usually reads the file
<samp><span class="file">/etc/mailcap</span></samp>.
<p><a name="index-attachments_002c-saving-582"></a><a name="index-saving-attachments-583"></a><a name="index-mh_002dfolder_002dsave_002dmime_002dpart-584"></a><a name="index-K-o-585"></a>
Use the command <kbd>K o</kbd> (<code>mh-folder-save-mime-part</code>) to save
attachments (the mnemonic is “output”). This command saves the
attachment associated with the button under the cursor. If the cursor
is not located over a button, then the cursor first moves to the next
button, wrapping to the beginning of the message if necessary. You can
also provide a numeric prefix argument (as in <kbd>3 K o</kbd>) to save the
attachment labeled with that number. This command prompts you for a
filename and suggests a specific name if it is available.
<p><a name="index-g_t_0040command_007bmhn_007d-586"></a><a name="index-g_t_0040command_007bmhstore_007d-587"></a><a name="index-MH-commands_002c-_0040command_007bmhn_007d-588"></a><a name="index-MH-commands_002c-_0040command_007bmhstore_007d-589"></a><a name="index-mh_002dmime_002dsave_002dparts-590"></a><a name="index-K-a-591"></a><a name="index-mh_002dmime_002dsave_002dparts_002ddefault_002ddirectory-592"></a>
You can save all of the attachments at once with the command <kbd>K a</kbd>
(<code>mh-mime-save-parts</code>). The attachments are saved in the
directory specified by the option
<code>mh-mime-save-parts-default-directory</code> unless you use a prefix
argument (as in <kbd>C-u K a</kbd>) in which case you are prompted for the
directory. These directories may be superseded by MH profile
components, since this function calls on <samp><span class="command">mhstore</span></samp>
(<samp><span class="command">mhn</span></samp>) to do the work.
<p><a name="index-mh_002dmime_002dsave_002dparts_002ddefault_002ddirectory-593"></a>
The default value for the option
<code>mh-mime-save-parts-default-directory</code> is `<samp><span class="samp">Prompt Always</span></samp>' so
that you are always prompted for the directory in which to save the
attachments. However, if you usually use the same directory within a
session, then you can set this option to `<samp><span class="samp">Prompt the First Time</span></samp>'
to avoid the prompt each time. you can make this directory permanent
by choosing `<samp><span class="samp">Directory</span></samp>' and entering the directory's name.
<p><a name="index-attachments_002c-inline-594"></a><a name="index-inline-attachments-595"></a><a name="index-mh_002dtoggle_002dmime_002dbuttons-596"></a><a name="index-K-t-597"></a><a name="index-mh_002ddisplay_002dbuttons_002dfor_002dinline_002dparts_002dflag-598"></a>
The sender can request that attachments should be viewed inline so
that they do not really appear like an attachment at all to the
reader. Most of the time, this is desirable, so by default MH-E
suppresses the buttons for inline attachments. On the other hand, you
may receive code or HTML which the sender has added to his message as
inline attachments so that you can read them in MH-E. In this case, it
is useful to see the buttons so that you know you don't have to cut
and paste the code into a file; you can simply save the attachment. If
you want to make the buttons visible for inline attachments, you can
use the command <kbd>K t</kbd> (<code>mh-toggle-mime-buttons</code>) to toggle
the visibility of these buttons. You can turn on these buttons
permanently by turning on the option
<code>mh-display-buttons-for-inline-parts-flag</code>.
<p>MH-E cannot display all attachments inline however. It can display
text (including <span class="sc">html</span>) and images.
<p><a name="index-header-field_002c-_0040samp_007bContent_002dDisposition_003a_007d-599"></a><a name="index-inline-images-600"></a><a name="index-g_t_0040samp_007bContent_002dDisposition_003a_007d-header-field-601"></a><a name="index-mh_002dmax_002dinline_002dimage_002dheight-602"></a><a name="index-mh_002dmax_002dinline_002dimage_002dwidth-603"></a>
Some older mail programs do not insert the needed
plumbing<a rel="footnote" href="#fn-4" name="fnd-4"><sup>4</sup></a> to tell MH-E whether to display the attachments inline
or not. If this is the case, MH-E will display these images inline if
they are smaller than the window. However, you might want to allow
larger images to be displayed inline. To do this, you can change the
options <code>mh-max-inline-image-width</code> and
<code>mh-max-inline-image-height</code> from their default value of zero to
a large number. The size of your screen is a good choice for these
numbers.
<p><a name="index-alternatives-604"></a><a name="index-attachments_002c-alternatives-605"></a><a name="index-mh_002ddisplay_002dbuttons_002dfor_002dalternatives_002dflag-606"></a>
Sometimes, a mail program will produce multiple alternatives of an
attachment in increasing degree of faithfulness to the original
content. By default, only the preferred alternative is displayed. If
the option <code>mh-display-buttons-for-alternatives-flag</code> is on, then
the preferred part is shown inline and buttons are shown for each of
the other alternatives.
<p><a name="index-mm_002ddiscouraged_002dalternatives-607"></a>
Many people prefer to see the `<samp><span class="samp">text/plain</span></samp>' alternative rather
than the `<samp><span class="samp">text/html</span></samp>' alternative. To do this in MH-E, customize
the option <code>mm-discouraged-alternatives</code>, and add
`<samp><span class="samp">text/html</span></samp>'. The next best alternative, if any, will be shown.
<p><a name="index-K-i-608"></a><a name="index-mh_002dfolder_002dinline_002dmime_002dpart-609"></a>
You can view the raw contents of an attachment with the command <kbd>K
i</kbd> (<code>mh-folder-inline-mime-part</code>). This command displays (or
hides) the contents of the attachment associated with the button under
the cursor verbatim. If the cursor is not located over a button, then
the cursor first moves to the next button, wrapping to the beginning
of the message if necessary. You can also provide a numeric prefix
argument (as in <kbd>4 K i</kbd>) to view the attachment labeled with that
number.
<p>For additional information on buttons, see
the chapters <a href="http://www.gnus.org/manual/gnus_101.html#SEC101">Article Buttons</a> and
<a href="http://www.gnus.org/manual/gnus_108.html#SEC108">MIME Commands</a>
in the <cite>The Gnus Manual</cite>.
<div class="footnote">
<hr>
<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> See the section
<a href="http://rand-mh.sourceforge.net/book/mh/reapre.html">Reading Mail: inc show next prev</a> in the MH book.</p>
<p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> See the section
<a href="http://rand-mh.sourceforge.net/book/mh/usimim.html#ReMIMa">Reading MIME Mail</a> in
the MH book.</p>
<p class="footnote"><small>[<a name="fn-3" href="#fnd-3">3</a>]</small> You
can call them directly from Emacs if you're running the X Window
System: type <kbd>M-! xterm -e mhshow </kbd><var>message-number</var>. You can
leave out the `<samp><span class="samp">xterm -e</span></samp>' if you use <samp><span class="command">mhlist</span></samp> or
<samp><span class="command">mhstore</span></samp>.</p>
<p class="footnote"><small>[<a name="fn-4" href="#fnd-4">4</a>]</small> This plumbing is the `<samp><span class="samp">Content-Disposition:</span></samp>'
header field.</p>
<p><hr></div>
</body></html>
|