1 <!doctype sinfo system>
2 <!-- $Id: gnus-mime-en.sgml,v 1.1.1.1 1998-01-14 06:27:58 steve Exp $ -->
4 <title>gnus-mime 0.10 reference manual (English Version)
5 <author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail>
15 This file documents gnus-mime, a MIME extension for Gnus.
19 <h1> What is gnus-mime?
22 <concept>gnus-mime</concept> is a <dref file="tm-en">MIME</dref>
23 extender for <a file="gnus">Gnus</a> using <a file="tm-en"
24 node="tm-kernel">tm</a>.
28 gnus-mime is for only Gnus. Please use <a
29 file="tm-gnus_en">tm-gnus</a> for GNUS.
33 gnus-mime supports automatic MIME preview in <code>"*Article*"</code>
34 buffer using <a file="tm-view-en">tm-view</a>. In particular, with
35 XEmacs, it decodes images as same as text.
37 In addition, gnus-mime supports multilingual/internationalization
38 feature for mule such as <a file="tm-en" node="mule">MULE</a>,
39 XEmacs/mule and mule merged Emacs. It supports code-conversion by
40 MIME charset or depended default MIME charset of newsgroups.
42 For RFC 1522, original Gnus supports only Q-encoded <dref
43 file="tm-en">iso-8859-1</dref> <dref file="tm-en">encoded-word</dref>.
44 So gnus-mime supports more MIME charsets, such as <dref
45 file="tm-en">iso-8859-2</dref>, <dref file="tm-en">iso-8859-3</dref>,
46 ..., <dref file="tm-en">iso-2022-jp</dref>, <dref
47 file="tm-en">euc-kr</dref>, <dref file="tm-en">iso-2022-kr</dref>,
48 gb2312, <dref file="tm-en">hz-gb-2312</dref>, <dref
49 file="tm-en">cn-big5</dref>, and B-encoding. In addition, original
50 Gnus does not support unfolding or space elimination rule of RFC
51 1522. gnus-mime is more rightful.
54 <h1> Inline display for MIME message
55 <node> Automatic MIME Preview
57 <concept>automatic MIME preview</concept> feature is available for
58 gnus-mime. In automatic MIME preview mode, when reading an article in
59 summary mode, gnus-mime displays preview buffer processed by tm-view
60 instead of raw article buffer. <cf file="tm-view-en">
62 Therefore if an article is encoded by <dref file="tm-en">Base64</dref>
63 or <dref file="tm-en">Quoted-Printable</dref>, a decoded article is
64 displayed. Or rich text article, such as <dref
65 file="tm-en">text/enriched</dref> format, is automatic formated. Of
66 course, <dref file="tm-en">multipart</dref> article is dealt with
69 In addition, in <concept>XEmacs</concept>, images are displayed in
70 preview buffer as same as text.
72 Different from using metamail, speaker does not roar just then read an
73 article includes audio content, video player does not play just then
74 read an article includes video content, it does not do anonymous <dref
75 file="tm-en">ftp</dref> or send mail when read an article includes
76 external-message. These contents are played when you do decoding
77 command in preview buffer.
79 However if you use a slow machine, or are just really impatient, you
80 can stop automatic MIME preview.
83 <h2> How to process MIME in Article Buffer
84 <node> MIME processing
86 When <code>gnus-show-mime</code> is not <code>nil</code> and an
87 article has Mime-Version field in its message header, namely it is a
88 MIME message, Gnus calls <code>gnus-show-mime-method</code> to process
91 When <code>gnus-strict-mime</code> is <code>nil</code> and
92 <code>gnus-show-mime</code> is not <code>nil</code>, Gnus calls
93 <code>gnus-show-mime-method</code> even if an message does not have
94 Mime-Version field in its message header.
96 Gnus 5.2 or later calls <code>gnus-show-mime-method</code> when
97 <code>gnus-strict-mime</code> is not <code>nil</code> and an article
98 does not have Mime-Version field. Notice that old Gnus does not have
99 it, so it may be better to set <code>gnus-strict-mime</code> to
103 <defvar name="gnus-show-mime">
105 If it is not <code>nil</code>, Gnus do automatic MIME preview.
106 Default value is <code>t</code>.
108 It is a variable of Gnus, so if gnus is loaded before gnus-mime is
109 loaded, default value is not guaranteed.
111 <cf file="gnus" node="Using MIME">
114 <defvar name="gnus-show-mime-method">
116 Gnus calls function bound by it to process MIME. Default value is
117 <code>gnus-article-preview-mime-message</code>.
119 It is a variable of Gnus, so if gnus is loaded before gnus-mime is
120 loaded, default value is not guaranteed.
122 <cf file="gnus" node="Using MIME">
125 <defvar name="gnus-decode-encoded-word-method">
127 Gnus calls function bound by it to decode encoded-words. Default
128 value is <code>gnus-article-decode-encoded-word</code>.
130 It is a variable of Gnus, so if gnus is loaded before gnus-mime is
131 loaded, default value is not guaranteed.
133 In addition, it is not available at Gnus 5.0.* or Gnus 5.1.
136 <memo title="Notice">
138 gnus-mime uses some variables of Gnus and defines different default
139 values by <code>defvar</code>. For example, gnus-mime's default value
140 of <code>gnus-show-mime</code> is <code>t</code> instead of
141 <code>nil</code>. Or its default value of
142 <code>gnus-show-mime-method</code> is
143 <code>gnus-article-preview-mime-message</code> instead of
144 <code>metamail-buffer</code>.
145 <cf file="gnus" node="Using MIME">
147 gnus-mime uses <code>defvar</code> instead of <code>setq</code>,
148 because of respect user's setting before gnus-mime is loaded, such as
149 using <file>~/.emacs</file>. But it has a problem. If gnus is loaded
150 before gnus-mime is loaded, features of gnus-mime is not available in
151 default even if gnus-mime is loaded. Therefore there is serious
152 problem to load gnus before gnus-mime is loaded. In other words,
153 setting in <file>~/.gnus</file>, such as to load
154 <file>gnus-mime</file> or <file>mime-setup</file>, is not good way.
155 If you want such way, please do setting for
156 <code>gnus-show-mime</code> and <code>gnus-show-mime-method</code>.
160 <h2> Mechanism of Automatic MIME preview
161 <node> Two buffers for an article
163 Gnus 5.2 or later has two buffers for an article,
164 <code>gnus-original-article-buffer</code> (<code>" *Original
165 Article*"</code>) and <code>gnus-article-buffer</code>
166 (<code>"*Article*"</code>). The former is called <concept>raw article
167 buffer</concept>, the latter is called <concept>preview
170 Content of raw article buffer is non-processed ``raw message''. In
171 particular, for emacs variants includes <dref file="tm-en">mule</dref>
172 features, message is not code-converted in it.
174 Content of preview buffer is MIME processed message to display for
175 user. In particular, for emacs variants includes mule features,
176 non-ASCII message is code-converted in it by MIME charset or default
177 <dref file="tm-en">MIME charset</dref> for selected newsgroup.
179 Gnus 5.0.* and Gnus 5.1 don't have distinction between raw article
180 buffer and preview buffer. So gnus-mime emulate raw article buffer.
181 It is unnatural, so it may be better to use Gnus 5.2 or later, which
182 are designed for tm-view.
184 <cf file="tm-view-en" node="Two buffers for an article">
187 <h1> Internationalization
190 For emacs variants includes mule feature, such as <dref
191 file="tm-en">MULE</dref>, XEmacs/mule and Emacs/mule(*1), gnus-mime
192 supports code-conversion by <dref file="tm-en">MIME charset</dref> or
193 <code>default-mime-charset</code> of selected newsgroup.
196 (*1) It means next generation of Emacs includes mule features. Now
197 (October 1996), HANDA Ken'ichi and RMS are developing it.
201 Detail of code conversion is following:
204 <li>If a newsgroup is selected, MIME charset for the newsgroup is
205 searched from <code>gnus-newsgroup-default-charset-alist</code>. If
206 it is found, it is set to buffer local variable
207 <code>default-mime-charset</code> of Summary Buffer. If not found,
208 global value of <code>default-mime-charset</code> is used.
210 <li>Non-ASCII characters in Summary Buffer are code-converted by
211 <code>default-mime-charset</code> in Summary Buffer.
213 <li><dref file="tm-en">encoded-word</dref> are code-converted by their
214 specified <dref file="tm-en">MIME charset</dref>.
216 <li>Code-conversion of articles are following:
219 <li>If a part of a MIME message has charset parameter of <dref
220 file="tm-en">Content-Type field</dref>, it is code-converted by the
223 <li>When there are no specified MIME charset, such as message header
224 or non-MIME message, they are code-converted by
225 <code>default-mime-charset</code> in Summary Buffer.
230 <defvar name="gnus-newsgroup-default-charset-alist">
232 Association-list regexp for newsgroup vs. symbol for default MIME
235 Default setting are following:
240 <dref file="tm-en">hz-gb-2312</dref>
242 <dt>alt.chinese.text.big5, hk.*, hkstar.*, tw.*
244 <dref file="tm-en">cn-big5</dref>
248 <dref file="tm-en">iso-2022-jp-2</dref>
252 <dref file="tm-en">euc-kr</dref>
255 <dd><dref file="tm-en">koi8-r</dref>
258 If there is no MIME charsets for a newsgroup,
259 <code>default-mime-charset</code> is used as default MIME charset.
262 <defun name="gnus-set-newsgroup-default-charset">
263 <args>newsgroup charset
265 Set default MIME <var>charset</var> of <var>newsgroup</var> to
266 <code>gnus-newsgroup-default-charset-alist</code>.
268 <var>newsgroup</var> is string of newsgroup name or category, for
269 <code>"gnu.emacs.gnus"</code>, <code>"gnu.emacs"</code>,
272 <var>charset</var> is symbol of MIME charset, for example
273 <code>iso-8859-1</code>, <code>iso-2022-jp</code>.
277 <h1> Composing MIME messages
280 If using <dref file="tm-en">mime-setup</dref>, you can edit MIME
281 message in message-mode using <a file="tm-edit-en">tm-edit</a>.
283 <memo title="Notice">
285 Default setting of mime-setup avoids automatic inserting signature
286 when sending a message.
288 <cf file="tm-en" node="mime-setup">
292 gnus-mime does not have implementation for <kbd>C-c C-x C-m</kbd>
293 (<code>mime-editor/insert-mail</code>). Because gnus-mime does not
294 know which mail-reader should be used. In addition, <kbd>C-c C-x
295 C-y</kbd> (<code>mime-editor/insert-message</code>) is enough to
296 insert mail (namely to select a mail group and select a message to
297 insert, then it is available to insert the mail message).
299 However you can use <kbd>C-c C-x C-m</kbd> to specify an
300 implementation of <code>message-mode</code> to
301 <code>mime-editor/mail-inserter-alist</code>.
304 <h2> Example: same as <kbd>C-c C-x C-m</kbd>
307 (set-alist 'mime-editor/mail-inserter-alist
308 'message-mode (function message-mime-insert-article))
312 <h2> Example: including from MH folder
315 (autoload 'tm-mh-e/insert-mail "tm-mh-e")
317 (set-alist 'mime-editor/mail-inserter-alist
318 'message-mode (function tm-mh-e/insert-mail))
329 <node> Function Index
335 <node> Variable Index