1 <!doctype sinfo system>
4 <author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail>
14 This file documents SEMI, a MIME user interface for GNU Emacs.
21 SEMI is a package for GNU Emacs to provide features related with MIME
24 SEMI provides two user interfaces: MIME-View and MIME-Edit.
26 MIME-View is a kernel of user interface to display or operate MIME
27 messages, STD 11 messages or ``localized RFC 822'' messages.
29 MIME-Edit is a user interface to compose MIME messages.
31 Each MUA can use powerful MIME features to combine these features.
34 <h1> MIME message viewing
37 MIME-View
\e$B$O
\e(B GNU Emacs
\e$B$GF0:n$9$kHFMQE*$J
\e(B MIME viewer
\e$B$G$9!#
\e(B
39 MIME-View
\e$B$O
\e(B MIME message
\e$B$r1\Mw$9$k$?$a$NMxMQ<T3&LL
\e(B (user interface)
40 \e$B$N3K$G$"$j!"$3$N>e$G
\e(B presentation-method
\e$B$H8F$P$l$kI=<($r:n$k%W%m%0%i%`
\e(B
41 \e$B$rF0$+$7$?$j!"
\e(Bacting-method
\e$B$H8F$P$l$k
\e(B entity
\e$B$N=hM}%W%m%0%i%`$rF0$+$9
\e(B
42 \e$B$3$H$,2DG=$G!"$5$^$6$^$J<oN`$N
\e(B entity
\e$B$r07$&;v$,$G$-$k$h$&$K$J$C$F$$$^$9!#
\e(B
46 <node> Overview of MIME-View
48 Internet
\e$B$NEE;R=q4J!&%M%C%H%K%e!<%9$J$I$N=qLL
\e(B (message)
\e$B$NI=8=7A<0$O
\e(B
49 STD 11
\e$B$K4p$E$$$F$$$^$9!#
\e(BSTD 11
\e$B$N=qLLK\BN
\e(B (message body)
\e$B$O9T$rM#0l$N
\e(B
50 \e$B9=B$$H$9$k4J0WJ8LL
\e(B (plain text)
\e$B$G$"$j!"J8;zId9f$b
\e(B us-ascii
\e$B$HDj$a$i$l
\e(B
51 \e$B$F$$$^$9!#<B:]$K$O!"J8;zId9f$r
\e(B us-ascii
\e$B$NBe$o$j$K$=$N8@8l7w$GMQ$$$i$l
\e(B
52 \e$B$kJ8;zId9f$H$7$?!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65 \e$BJ,$G$"$j!"MxMQ<T$H$NBPOCE*$J:F@8=hM}$r9MN8$9$kI,MW$,$"$j$^$9!#
\e(BMIME
\e$B=q
\e(B
66 \e$BLL$N7A<0$O<+F0=hM}$,$7$d$9$/@_7W$5$l$F$$$^$9$,!"
\e(BMIME
\e$B=qLL$K4^$^$l$kFb
\e(B
67 \e$BMF$NCf$K$O%;%-%e%j%F%#!<>e$NLdBj$+$i<+F0=hM}$r$9$k$Y$-$G$J$$$b$N$,$"$j!"
\e(B
68 \e$B$3$&$$$C$?$b$N$N:F@8$K4X$7$F$OMxMQ<T$NH=CG$r6D$0$h$&$K@_7W$5$l$k$Y$-$G
\e(B
69 \e$B$7$g$&!#7k6I!"
\e(BMIME
\e$B=qLL$r07$&$?$a$K$O
\e(B STD 11
\e$B$*$h$S
\e(B MIME
\e$B$N9=J8$G5-=R
\e(B
70 \e$B$5$l$?%a%C%;!<%8$N>pJs8r49MQI=8=$H$=$N2r<a7k2L$G$"$kI=<(2hLL$d:F@8Ey$N
\e(B
71 \e$B=hM}$r6hJL$7$F9M$($kI,MW$,$"$j$^$9!#$^$?!"MxMQ<T$H$NBPOCE*$J:F@8=hM}$,
\e(B
74 \e$B$3$N$?$a!"
\e(BMIME-View
\e$B$O#1$D$N=qLL$KBP$7$F!">pJs8r49MQI=8=$r3JG<$9$k
\e(B
75 mime-raw-buffer
\e$B$HI=<(MQI=8=$r3JG<$9$k
\e(B mime-preview-buffer
\e$B$N#2$D$N
\e(B
76 buffer
\e$B$rMQ$$$^$9!#
\e(B
78 MIME-View
\e$B$O
\e(B mime-preview-buffer
\e$B$KBP$7$F
\e(B mime-view-mode
\e$B$H$$$&
\e(B MIME
79 message
\e$B$r1\Mw$9$k$?$a$N
\e(B mode
\e$B$rDs6!$7$^$9!#MxMQ<T$O$3$3$G3F
\e(B entity
\e$B$K
\e(B
80 \e$BBP$7$FA`:n$r9T$&$3$H$,$G$-$^$9!#
\e(B
83 <h2> Presentation of mime-preview-buffer
86 mime-view-mode displays information about each entity as
97 You can change their design or inhibit showing some of them, according
100 See following example
104 From: morioka@jaist.ac.jp (MORIOKA Tomohiko)
105 Subject: Re: question?
106 Newsgroups: zxr.message.mime
107 Date: 22 Oct 93 11:02:44
109 Organization: Japan Advanced Institute of Science and Technology,
113 How to compose MIME message in MIME-Edit mode.
115 C-c C-x ? shows its help.
117 C-c C-x C-t insert a text message.
118 C-c C-x TAB insert a (binary) file.
119 C-c C-x C-e insert a reference to external body.
120 C-c C-x C-v insert a voice message.
121 C-c C-x C-y insert a mail or news message.
122 C-c C-x RET insert a mail message.
123 C-c C-x C-s insert a signature file at end.
124 C-c C-x t insert a new MIME tag.
125 C-c C-x a enclose as multipart/alternative.
126 C-c C-x p enclose as multipart/parallel.
127 C-c C-x m enclose as multipart/mixed.
128 C-c C-x d enclose as multipart/digest.
129 C-c C-x s enclose as PGP signed.
130 C-c C-x e enclose as PGP encrypted.
131 C-c C-x C-k insert PGP public key.
132 C-c C-x C-p preview editing MIME message.
135 therefore, you should type C-c C-x C-i and specify the binary file
136 which you want to insert.
138 You should select Base64 as MIME encoding for binary file.
144 Like above, you can compose the message with image.
146 \e$B".".".".".".".".".".".
\e(B
\e$B%m%7%"%s!&%F%#!<$r0lGU!#
\e(B
\e$B".".".".".".".".".".".
\e(B
147 \e$B".".".".".
\e(B
\e$B!y
\e(B
\e$B%8%c%`$G$O$J$/%^!<%^%l!<%I$G$b$J$/K*L*$G
\e(B
\e$B!y
\e(B
\e$B".".".".".
\e(B
148 \e$B".".".".".
\e(B
\e$B'.'0'2$$'0','!
\e(B
\e$B'4'0'.'0'7'*','0
\e(B
\e$B".".".".".
\e(B
149 \e$B".".".".".".".
\e(B Internet E-mail: <morioka@jaist.ac.jp>
\e$B".".".".".".".
\e(B
156 <concept>entity-button</concept> is a tag on the top of the entity
157 which shows brief information of the part.
159 Normally, it appears as
162 [1.3 test (text/plain)]
166 The number on the head describes the place of the entity in the
167 message (like the section number) and it is called as
168 <concept>entity-number</concept>.
170 The string in the next describes its title. This information is
174 <li>Title described in Content-Description field or Subject field
175 <li>File name specified by filename parameter in Content-Disposition field
176 <li>File name specified by name parameter in Content-Type field
177 <li>File name for uuencode'ing
181 If none of them are specified, displays a blank.
183 The 3rd item in the parenthesis describes media-type/subtype of
184 the entity. If it is is not MIME entity, it displays <code>nil</code>.
186 This entity-button plays a role like icon that symbolically
187 shows the content of the entity. For example, push <kbd>v</kbd> on
194 shows up the image contained there.
196 If the mouse operation is possible, you can display the image
197 by pushing 2nd button (the middle button for 3 button mouse) too.
203 <concept>entity-header</concept> is the header of the entity.
204 \e$B!J!V$=$N$^$^$d$s$1!W$C$FE\$i$J$$$G!#$=$&$$$&$b$s$J$s$G$9!K!#
\e(B
210 <concept>entity-body</concept> is the content of the part.
212 \e$B$3$l$b$R$M$j$,B-$j$J$$$G$9$,!"$^$"!"$=$&$$$&$b$s$G$9!#
\e(B
214 \e$B$H$O$$$(!"<B:]$K$O>/$7$R$M$C$F$^$9!#
\e(B
216 text entity
\e$B$N>l9g$O
\e(B charset
\e$B$K1~$8$F
\e(B code
\e$BJQ49$7$?$j$7$^$9$7!"
\e(BXEmacs
217 \e$B$G$O
\e(B image entity
\e$B$rJQ49$7$J$$$H$$$1$J$$$7!#
\e(B
219 Details will be described later.
222 <h2> Operation in mime-preview-buffer
223 <node> mime-view-mode
225 mime-preview-buffer
\e$B$K$O0J2<$N5!G=$,$"$j$^$9!#
\e(B
230 \e$B>e$N
\e(B part
\e$B$KLa$k!J
\e(Bmessage
\e$B$N0lHV>e$N
\e(B part
\e$B$G$3$l$r9T$J$&$H
\e(B Summary
231 mode
\e$B$KLa$k
\e(B (*1)
\e$B!K
\e(B
233 <kt>p<kd>
\e$BA0$N
\e(B part
\e$B$K0\F0$9$k
\e(B
235 <kt>M-TAB<kd>
\e$BA0$N
\e(B part
\e$B$K0\F0$9$k
\e(B
237 <kt>n<kd>
\e$B<!$N
\e(B part
\e$B$K0\F0$9$k
\e(B
239 <kt>TAB<kd>
\e$B<!$N
\e(B part
\e$B$K0\F0$9$k
\e(B
241 <kt>SPC<kd>scroll up
\e$B$9$k
\e(B
243 <kt>M-SPC<kd>scroll down
\e$B$9$k
\e(B
245 <kt>DEL<kd>scroll down
\e$B$9$k
\e(B
247 <kt>RET<kd>
\e$B<!$N9T$K0\F0$9$k
\e(B
249 <kt>M-RET<kd>
\e$BA0$N9T$K0\F0$9$k
\e(B
251 <kt>v<kd>part
\e$B$r:F@8$9$k
\e(B (*2)
253 <kt>e<kd>part
\e$B$+$i
\e(B file
\e$B$r<h$j=P$9
\e(B (*2)
255 <kt>C-c C-p<kd>part
\e$B$r0u:~$9$k
\e(B (*2)
259 preview-buffer
\e$BCf$N
\e(B mouse button
\e$B$r5/F0$9$k
\e(B
261 content-button
\e$B$r2!$;$P!"$=$N
\e(B part
\e$B$,:F@8$5$l$k
\e(B(*2)
263 URL-button
\e$B$r2!$;$P!"$=$N
\e(B WWW browser
\e$B$,5/F0$5$l$k
\e(B
267 <memo title="
\e$BCm0U
\e(B">
269 (*1) MUA
\e$B$G
\e(B mime-view
\e$B$N@_Dj$r$7$F$$$J$$>l9g!"
\e(BSummary mode
\e$B$K$OLa$j$^
\e(B
272 (*2)
\e$B<B:]$NF0:n$OBP1~$9$k
\e(B method
\e$B$K0M$j$^$9!#
\e(B
276 <h1> MIME message editing
279 <concept>MIME-Edit</concept> is a general MIME composer for GNU Emacs.
282 <h2> Minor-mode to edit MIME message
283 <node> mime-edit-mode
285 <concept>mime-edit-mode</concept> is a minor mode to compose MIME
286 message. In this mode, <concept>tag</concept> represents various
287 kinds of data, so you can edit multi part message consists of various
288 kinds of data, such as text, image, audio, etc.
290 There are 2 kinds of tags:
297 single-part tag represents single part, this form is following:
300 --[[TYPE/SUBTYPE;PARAMETERS][ENCODING]
304 TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of
305 <dref file="mime-en">Content-Type</dref> field. TYPE/SUBTYPE is
306 required, PARAMETERS is optional.
308 ENCODING indicates <dref
309 file="mime-ja">Content-Transfer-Encoding</dref> field. It is optional
312 OPTIONAL-FIELDS is to represent another fields except Content-Type
313 field and Content-Transfer-Encoding field.
315 multi-part tags represent <a file="mime-en" node="multipart">multi
316 part</a>. They consist of a pair of <concept>multi-part beginning
317 tag</concept> and <concept>multi-part ending tag</concept>.
319 multi-part beginning tag's form is following:
325 multi-part ending tag's form is following:
331 A region from multi-part beginning tag to multi-part ending tag is
332 called as <concept>enclosure</concept>.
335 <h2> Operations for single-part
336 <node> single-part tags
338 Operations to make single-part are following:
343 Insert single-part tag indicates text part.
347 Insert file as a MIME attachment. If <kbd>C-u</kbd> is followed by
348 it, it asks media-type, subtype or encoding even if their default
349 values are specified. <cf node="tag specification for inserted file">
353 Insert external part.
357 Record audio input until <kbd>C-g</kbd> is pressed, and insert as a
358 audio part. (It requires /dev/audio in default.)
362 Insert current (mail or news) message. (It is MUA depended.)
366 Insert mail message. (It is MUA depended.)
368 <dt><key>C-c C-x C-w</key>, <key>C-c C-x C-s</key>
374 Insert <dref>PGP</dref> public key.
378 Insert any single-part tag.
382 <h2> Operations for enclosure
383 <node> enclosure tags
385 Operations to make enclosure are following:
390 Enclose specified region as multipart/alternative.
394 Enclose specified region as multipart/parallel.
398 Enclose specified region as multipart/mixed.
402 Enclose specified region as multipart/digest.
406 Digital-sign to specified region. <cf node="PGP">
410 Encrypt to specified region. <cf node="PGP">
414 avoid to encode tags in specified region. In other words, tags is
415 interpreted as such string. (In current version, it may be
416 incomplete. Maybe PGP-signature does not work for this enclosure.)
420 <h2> Other operations
421 <node> other MIME-Edit operations
423 There are another operations in mime-edit-mode.
428 Send current editing message.
432 Preview current editing message. <cf node="MIME-View">
436 Exit mime-edit-mode without sending.
440 Set current editing message to enable automatic splitting or not.
441 Form of automatic split messages is message/partial.
445 Set <dref file="mime-en">7bit</dref> to <dref>transfer level</dref>.
449 Set <dref file="mime-en">8bit</dref> to <dref>transfer level</dref>.
453 Set current editing message to digital-sign or not. <cf node="PGP">
457 Set current editing message to encrypt or not. <cf node="PGP">
460 Display help message.
464 <h2> How to detect tag for inserted file
465 <node> file-type specification
467 When <kbd>C-c C-x C-i</kbd> (<code>mime-edit-insert-file</code>) is
468 pressed, tag parameters for inserted file, such as media-type or
469 encoding, are detected by variable <code>mime-file-types</code>.
471 When <kbd>C-u</kbd> is followed by it or parameter is not found from
472 the variable, it asks from user. (When <kbd>C-u</kbd> is followed by
473 it, detected value is used as default value)
475 If you want to change default value for file names, please change
476 variable <code>mime-file-types</code>.
478 <defvar name="mime-file-types">
480 Specification of default value of tag for file name of inserted file.
482 It is a list of following list:
485 (FILE_PAT TYPE SUBTYPE PARAMS ENCODING
486 DISPOSITION_TYPE DISPOSITION_PARAMS)
489 Each element of the list is following:
493 <dd>regular expression of file name
495 <dd>primary-type of media-type
497 <dd>subtype of media-type
499 <dd>parameters of Content-Type field
501 <dd>Content-Transfer-Encoding
504 <dt>DISPOSITION_PARAMS
505 <dd>parameters of Content-Disposition field
509 Example: Specify application/rtf as default media type for
515 '(set-alist 'mime-file-types
517 '("application" "rtf" nil nil
518 "attachment" (("filename" . file)))
525 <node> transfer level
527 Each content inserted in a message is represented by <dref
528 file="mime-en">7bit</dref>, <dref file="mime-en">8bit</dref> or <dref
529 file="mime-en">binary</dref>.
531 If a message is translated by 7bit-through <dref
532 file="mime-en">MTA</dref>, there is no need to encode 7bit data, but
533 8bit and binary data must be encoded to 7bit data.
535 Similarly, if a message is translated by 8bit-through MTA, there is no
536 need to encode 7bit or 8bit data, but binary data must be encoded to
540 EBCDIC MTA breaks 7bit data, so in this case, 7bit data must be
541 encoded by base64. But I don't know EBCDIC. (^_^;
543 Similarly, I wish ASCII-printable only MTA and code-conversion MTA
546 Maybe there are binary-through MTA, but I think it is not major.
549 <concept>transfer level</concept> represents how range data are
550 available. mime-edit has a variable <code>mime-transfer-level</code>
551 to represent transfer level.
554 <defvar name="mime-transfer-level">
558 If transfer level of a data is over it, a data is encoded to 7bit.
560 Currently, 7 or 8 is available. Default value is 7.
562 In extension plan, EBCDIC will be 5, ASCII printable only will be 6,
563 binary will be 9. But it will not be implemented.
568 transfer level is only for body, not for <a node="header">message
569 header</a>. MIME extends <dref file="mime-en">RFC 822</dref> to use
570 8bit data in body, but it requires to use <dref
571 file="mime-en">us-ascii</dref> in header.
576 <node> message/partial sending
578 <defvar name="mime-edit-split-message">
580 Split large message if it is non-nil.
583 <defvar name="mime-edit-message-default-max-lines">
585 Default maximum lines of a message.
588 <defvar name="mime-edit-message-max-lines-alist">
590 Alist of major-mode vs maximum lines of a message.
592 If it is not specified for a major-mode,
593 <code>mime-edit-message-default-max-lines</code> is used.
596 <defvar name="mime-edit-split-blind-field-regexp">
598 Regular expression to match field-name to be ignored when split
609 mime-edit provides PGP encryption, signature and inserting public-key
610 features based on <concept>PGP/MIME</concept> (RFC 2015) or
611 <concept>PGP-kazu</concept> (draft-kazu-pgp-mime-00.txt).
613 This feature requires your pgp command.
615 <defvar name="pgg-default-scheme">
617 Version of PGP or GnuPG command to be used for encryption or sign.
618 The value should be a symbol. Allowed versions are <code>gpg</code>,
619 <code>pgp</code> or <code>pgp5</code>.
622 <defvar name="pgg-scheme">
624 Version of PGP or GnuPG command to be used for decryption or verification.
625 The value should be a symbol. Allowed versions are <code>gpg</code>,
626 <code>pgp</code> or <code>pgp5</code>.
633 <defvar name="mime-button-face">
635 Face used for content-button or URL-button of MIME-Preview buffer.
638 <defvar name="mime-button-mouse-face">
640 Face used for MIME-preview buffer mouse highlighting.
643 <defvar name="mime-browse-url-function">
645 Function to browse URL.
649 <h2> Utility for configuration
650 <node> Acting-condition configuration
652 <defun name="mime-add-condition">
653 <args> target-type condition <opts> mode file
655 Add <var>condition</var> to database specified by
656 <var>target-type</var>.
658 <var>target-type</var> must be <code>preview</code> or
661 If optional argument <var>mode</var> is <code>strict</code> or
662 <code>nil</code> (omitted), <var>condition</var> is added strictly.
664 If optional argument <var>mode</var> is <code>with-default</code>,
665 <var>condition</var> is added with default rule.
667 If optional argument <var>file</var> is specified, it is loaded when
668 <var>condition</var> is activate.
679 <node> Function Index
685 <node> Variable Index