tm 7.100 Manual (English Version)
*********************************

This file documents tm, a MIME package for GNU Emacs.

What is tm?
***********

The tm package is a set of modules to enjoy MIME on GNU Emacs.  Using
tm, you can

   *  playback or view the MIME messages using tm-view
   *  compose MIME message using tm-edit
   *  use the enhanced MIME features with mh-e, GNUS, Gnus, RMAIL and VM

and more.

Please read following about each topics:

   * tm-MUA for Gnus (see (gnus-mime-en))
   * tm-MUA for GNUS (see (tm-gnus-en))
   * tm-MUA for mh-e (see (tm-mh-e-en))
   * tm-MUA for VM (see (tm-vm-en))
   * mime/viewer-mode (see (tm-view-en))
   * mime/editor-mode (see (tm-edit-en))

Glossary
========

7bit
----

*7bit* means any integer between 0 .. 127.

Any data represented by 7bit integers is called *7bit data*.

Textual string consisted of Control characters between 0 .. 31 and
127, and space represented by 32, and graphic characters between 33
.. 236 are called *7bit (textual) string*.

Traditional Internet MTA (see MTA) can translate 7bit data, so it
is no need to translate by Quoted-Printable (see Quoted-Printable)
or Base64 (see Base64) for 7bit data.

However if there are too long lines, it can not translate by 7bit MTA
even if it is 7bit data.  RFC 821 (see RFC 821) and RFC 2045
(see RFC 2045) require lines in 7bit data must be less than 998
bytes.  So if a "7bit data" has a line more than 999 bytes, it is
regarded as binary (see binary).  For example, Postscript file
should be encoded by Quoted-Printable.

8bit
----

*8bit* means any integer between 0 .. 255.

Any data represented by 8bit integers is called *8bit data*.

Textual string consisted of Control characters between 0 .. 31, 127,
and 128 .. 159, and space represented by 32, and graphic characters
between 33 .. 236 and 160 .. 255 are called *8bit (textual) string*.

For example, iso-8859-1 (see iso-8859-1) or euc-kr (see
euc-kr) are coded-character-set represented by 8bit textual string.

Traditional Internet MTA (see MTA) can translate only 7bit (see
7bit) data, so if a 8bit data will be translated such MTA, it must
be encoded by Quoted-Printable (see Quoted-Printable) or Base64
(see Base64).

However 8bit MTA are increasing today.

However if there are too long lines, it can not translate by 8bit MTA
even if it is 8bit data.  RFC 2045 (see RFC 2045) require lines in
8bit data must be less than 998 bytes.  So if a "8bit data" has a line
more than 999 bytes, it is regarded as binary (see binary), so it
must be encoded by Base64 or Quoted-Printable.

94-character set
----------------

*94-character set* is a kind of 1 byte graphic character set (see
graphic character set), each characters are in positions 02/01 (33)
to 07/14 (126) or 10/01 (161) to 15/14 (254).  (ex. ASCII (see
ASCII), JIS X0201-Latin)

96-character set
----------------

*96-character set* is a kind of 1 byte graphic character set (see
graphic character set), each characters are in positions 02/00 (32)
to 07/15 (126) or 10/00 (160) to 15/15 (255). (ex. ISO 8859)

94x94-character set
-------------------

*94x94-character set* is a kind of 2 byte graphic character set (see
graphic character set), each bytes are in positions 02/01 (33) to
07/14 (126) or 10/01 (161) to 15/14 (254).  (ex. JIS X0208 (see JIS X0208),
GB 2312 (see GB 2312))

ASCII
-----

*ASCII* is a 94-character set (see 94-character set) contains
primary latin characters (A-Z, a-z), numbers and some characters.  It
is a standard of the United States of America.  It is a variant of ISO
646 (see ISO 646).

[ASCII] "Coded Character Set -- 7-Bit American Standard Code for
     Information Interchange", ANSI X3.4:1986.

Base64
------

*Base64* is a transfer encoding method of MIME (see MIME) defined
in RFC 2045 (see RFC 2045).

The encoding process represents 24-bit groups of input bits as output
strings of 4 encoded characters.  Encoded characters represent integer 0
.. 63 or *pad*.  Base64 data must be 4 * n bytes, so pad is used
to adjust size.

These 65 characters are subset of all versions of ISO 646, including
US-ASCII, and all versions of EBCDIC.  So it is safe even if it is
translated by non-Internet gateways.

binary
------

Any byte stream is called *binary*.

It does not require structureof lines.  It differs from from 8bit
(see 8bit).

In addition, if line structured data contain too long line (more than
998 bytes), it is regarded as binary.

cn-gb, gb2312
-------------

A MIME charset (see MIME charset) for simplified Chinese mainly
used in the Chinese mainland.

It is a 8bit (see 8bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine GB 2312 (see GB 2312).

It is defined in RFC 1922 (see RFC 1922).

cn-big5, big5
-------------

A MIME charset (see MIME charset) for traditional Chinese mainly
used in Taiwan and Hon Kong.

It is a 8bit (see 8bit) coded character set (see coded character set)
not based on ISO 2022 (see ISO 2022).  It is a de-fact
standard.

It is defined in RFC 1922 (see RFC 1922).

cf.  [BIG5] Institute for Information Industry, "Chinese Coded
     Character Set in Computer", March 1984.

It corresponds to CNS 11643 (see CNS 11643).

CNS 11643-1992
--------------

Graphic character sets (see graphic character set) for Chinese
mainly written by traditional Chinese mainly used in Taiwan and Hong
Kong.  It is a standard of Taiwan.  Currently there are seven
94x94-character set (see 94x94-character set).

Final byte of ISO 2022 (see ISO 2022) are following:

`plane 1'
     04/07 (`G')

`plane 2'
     04/08 (`H')

`plane 3'
     04/09 (`I')

`plane 4'
     04/10 (`J')

`plane 5'
     04/11 (`K')

`plane 6'
     04/12 (`L')

`plane 7'
     04/13 (`M')

[CNS 11643-1992] "Standard Interchange Code for Generally-Used
     Chinese Characters", CNS 11643:1992.

Coded character set, Character code
-----------------------------------

A set of unambiguous rules that establishes a character set and the
one-to-one relationship between the characters of the set and their
bit combinations.

Code extension
--------------

The techniques for the encoding of characters that are not included in
the character set of a given code. (ex. ISO 2022 (see ISO 2022))

Content-Disposition field
-------------------------

A field to specify presentation of entity or file name.  It is an
extension for MIME (see MIME).

[RFC 1806] E R. Troost and S. Dorner, "Communicating Presentation
     Information in Internet Messages: The Content-Disposition
     Header", June 1995, Experimental.

Content-Type field
------------------

Header field to represent information about body, such as media type
(see media type), MIME charset (see MIME charset).  It is
defined in RFC 2045 (see RFC 2045).

*[Memo]*

     Historically, Content-Type field was proposed in RFC 1049.  In
     it, Content-Type did not distinguish type and subtype.  However
     MIME parser may be able to accept RFC 1049 based Content-Type as
     unknown type.

Content-Type field is defined as following:

     "Content-Type" ":" *type* "/"
     *subtype* *( ";" *parameter* )

For example:

          Content-Type: image/jpeg

          Content-Type: text/plain; charset=iso-2022-jp

*[Memo]*

     A part does not have content-type field is regarded as

               Content-Type: text/plain; charset=us-ascii

     (cf. us-ascii)

     And a part has unknown type/subtype is regarded as

               Content-Type: application/octet-stream

Emacs
-----

In this document, `Emacs' means GNU Emacs released by FSF, and `emacs'
means any variants of GNU Emacs.

encoded-word
------------

Representation non ASCII (see ASCII) characters in header.  It is
defined in *RFC 2047*.

[RFC 2047] K. Moore, "MIME (Multipurpose Internet Mail
     Extensions) Part Three: Message Header Extensions for Non-ASCII
     Text", November 1996, Standards Track (obsolete RFC
     1521,1522,1590).

encapsulation
-------------

Method to insert whole Internet message (see RFC 822) into another
Internet message.

For example, it is used to forward a message.

(cf. message/rfc822)

Entity
------

Header fields and contents of a message or one of the parts in the
body of a multipart (see multipart) entity.

*[Memo]*

     In this document, `entity' might be called "part".

euc-kr
------

A MIME charset (see MIME charset) for Korean.

It is a 8bit (see 8bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine KS C5601 (see KS C5601).

It is defined in RFC 1557 (see RFC 1557).

cf.  [euc-kr] Korea Industrial Standards Association, "Hangul
     Unix Environment", KS C 5861:1992.

FTP
---

[FTP: RFC 959] Postel, J. and J. Reynolds, "File Transfer
     Protocol", October 1985, STD 9.

GB 2312-1980
------------

A 94x94-character set (see 94x94-character set) for Chinese mainly
written by simplified Chinese mainly used in the Chinese mainland.  It
is a standard of China.

Final byte of ISO 2022 (see ISO 2022) is 04/01 (`A').

[GB 2312] "Code of Chinese Graphic Character Set for Information
     Interchange - Primary Set", GB 2312:1980.

GB 8565.2-1988
--------------

A 94x94-character set (see 94x94-character set) for Chinese as
supplement to GB 2312 (see GB 2312).  It is a standard of China.

[GB 8565.2] "Information Processing - Coded Character Sets for
     Text Communication - Part 2: Graphic Characters used with Primary
     Set", GB 8565.2:1988.

Graphic Character Set
---------------------

Coded character set (see coded character set) for graphic
characters.

hz-gb2312
---------

A MIME charset (see MIME charset) for simplified Chinese mainly
used in the Chinese mainland.

It extends ASCII (see ASCII) to combine GB 2312 (see GB 2312),
its technique is like iso-2022-jp (see iso-2022-jp), but it is
designed to be ASCII printable to use special form for ESC sequence to
designate GB 2312 to G0.

It is defined in RFC 1842 and 1843.

[RFC 1842] Y. Wei, Y. Zhang, J. Li, J. Ding and Y. Jiang, "ASCII
     Printable Characters-Based Chinese Character Encoding for
     Internet Messages", August 1995, Informational.

[RFC 1843] F. Lee, "HZ - A Data Format for Exchanging Files of
     Arbitrarily Mixed Chinese and ASCII characters", August 1995,
     Informational.

ISO 2022
--------

It is a standard for character code structure and code extension
(see code extension) technique.

[ISO 2022] International Organization for Standardization (ISO),
     "Information Processing: ISO 7-bit and 8-bit coded character
     sets: Code extension techniques", ISO/IEC 2022:1994.

iso-2022-cn
-----------

A MIME charset (see MIME charset) for Chinese.

It is a 7bit (see 7bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine GB 2312 (see GB 2312) and/or CNS 11643 plain
1, plain 2 (see CNS 11643).

It is defined in RFC 1922 (see RFC 1922).

iso-2022-cn-ext
---------------

A MIME charset (see MIME charset) for Chinese.

It is a 7bit (see 7bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine GB 2312 (see GB 2312), CNS 11643 plain 1 .. 7
(see CNS 11643), ISO-IR-165 (see ISO-IR-165) and other Chinese
graphic character sets.

It is defined in RFC 1922 (see RFC 1922).

*[Memo]* MULE 2.3 and current XEmacs/mule can not use it
     correctly.

     Emacs/mule can use it.

iso-2022-jp
-----------

A MIME charset (see MIME charset) for Japanese.

It is a 7bit (see 7bit) coded character set (see coded character set)
based on old ISO 2022 (see ISO 2022).  It switches ASCII
(see ASCII), JIS X0201-Latin, JIS X0208-1978 (see JIS C6226)
and JIS X0208-1983 (see JIS X0208).

It is defined in RFC 1468.

*[Memo]* JIS X0208-1997? will define it in annex as non-ISO 2022
     (see ISO 2022) encoding.

[iso-2022-jp: RFC 1468] Murai J., M. Crispin, and E. van der
     Poel, "Japanese Character Encoding for Internet Messages", June
     1993.

iso-2022-jp-2
-------------

A MIME charset (see MIME charset), which is a multilingual
extension of iso-2022-jp (see iso-2022-jp).

It is defined in RFC 1554.

[iso-2022-jp-2: RFC 1554] Ohta M. and Handa K., "ISO-2022-JP-2:
     Multilingual Extension of ISO-2022-JP", December 1993,
     Informational.

iso-2022-kr
-----------

A MIME charset (see MIME charset) for Korean language (Hangul
script).

It is based on ISO 2022 (see ISO 2022) code extension (see code extension)
technique to extend ASCII (see ASCII) to use KS C5601
(see KS C5601) as 7bit (see 7bit) text.

It is defined in RFC 1557 (see RFC 1557).

ISO 646
-------

[ISO 646] International Organization for Standardization (ISO),
     "Information technology: ISO 7-bit coded character set for
     information interchange", ISO/IEC 646:1991.

ISO 8859-1
----------

[ISO 8859-1] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 1: Latin Alphabet No.1", ISO 8859-1:1987.

iso-8859-1
----------

*iso-8859-1* is a MIME charset (see MIME charset) for
west-European languages written by Latin script.

It is a 8bit (see 8bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine ISO 8859-1 (see ISO 8859-1).

It is defined in RFC 2046 (see RFC 2046).

ISO 8859-2
----------

[ISO 8859-2] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 2: Latin alphabet No.2", ISO 8859-2:1987.

iso-8859-2
----------

*iso-8859-2* is a MIME charset (see MIME charset) for
east-European languages written by Latin script.

It is a 8bit (see 8bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine ISO 8859-2 (see ISO 8859-2).

It is defined in RFC 2046 (see RFC 2046).

ISO 8859-3
----------

[ISO 8859-3] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 3: Latin alphabet No.3", ISO 8859-3:1988.

ISO 8859-4
----------

[ISO 8859-4] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 4: Latin alphabet No.4", ISO 8859-4:1988.

ISO 8859-5
----------

[ISO 8859-5] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 5: Latin/Cyrillic alphabet", ISO
     8859-5:1988.

iso-8859-5
----------

*iso-8859-5* is a MIME charset (see MIME charset) for Cyrillic
script.

It is a 8bit (see 8bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine ISO 8859-5 (see ISO 8859-5).

It is defined in RFC 2046 (see RFC 2046).

ISO 8859-6
----------

[ISO 8859-6] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 6: Latin/Arabic alphabet", ISO
     8859-6:1987.

ISO 8859-7
----------

[ISO 8859-7] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 7: Latin/Greek alphabet", ISO 8859-7:1987.

iso-8859-7
----------

*iso-8859-7* is a MIME charset (see MIME charset) for Greek
script.

It is a 8bit (see 8bit) coded character set (see coded character set)
based on ISO 2022 (see ISO 2022).  It extends ASCII (see
ASCII) to combine ISO 8859-7 (see ISO 8859-7).

It is defined in RFC 1947.

[iso-8859-7: RFC 1947] D. Spinellis, "Greek Character Encoding
     for Electronic Mail Messages", May 1996, Informational.

ISO 8859-8
----------

[ISO 8859-8] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 8: Latin/Hebrew alphabet", ISO
     8859-8:1988.

ISO 8859-9
----------

[ISO 8859-9] International Organization for Standardization
     (ISO), "Information Processing -- 8-bit Single-Byte Coded Graphic
     Character Sets -- Part 9: Latin alphabet No.5", ISO 8859-9:1990.

ISO-IR-165, CCITT Extended GB
-----------------------------

A 94x94-character set (see 94x94-character set) for Chinese mainly
written by simplified Chinese mainly used in the Chinese mainland
registered by CCITT.

It consists of GB 2312 (see GB 2312), GB 8565.2 (see GB 8565.2)
and additional 150 characters.

Final byte of ISO 2022 (see ISO 2022) is 04/05 (`E').

JIS X0201
---------

It defines two 94-character set (see 94-character set), for Latin
script (a variant of ISO 646 (see ISO 646)) and Katakana script,
and 7bit and 8bit coded character set (see coded character set)s.

It was renamed from *JIS C6220-1976*.

[JIS X0201-1976] Japanese Standards Association, "Code for
     Information Interchange", JIS X 0201-1976:.

In addition, revised version will be published in 1997.

[JIS X0201-1997?]  Japanese Standards Association, "7-bit and
     8-bit coded character sets for information interchange", JIS X
     0201:1997?  draft.

JIS C6226-1978
--------------

A 94x94-character set (see 94x94-character set) for Japanese.  It
was renamed to JIS X0208-1978.

(cf. JIS X0208)

JIS X0208
---------

A 94x94-character set (see 94x94-character set) for Japanese.
Japanese standard.  It was published in 1978, and revised in 1983 and
1990.  In the Internet message, 1983 edition is major.

JIS X0208 contains some symbols, numbers, primary Latin script,
Hiragana script, Katakana script, Greek script, Cyrillic script, box
drawing parts, Kanji (Ideographic characters used in Japanese).
Notice that some symbols and box drawing parts were added in 1983 and
some Kanjis were changed or swapped code points.  So 1978 edition and
1983 edition are regarded as different graphic character set.

1990 edition added some characters, so designation of 1990 edition
requires `identify revised registration' sequence, ESC 02/06 4/0 as
prefix of designation sequence.

[JIS X0208-1978] Japanese Standards Association, "Code of the
     Japanese graphic character set for information interchange", JIS
     C6226:1978.

[JIS X0208-1983,1990] Japanese Standards Association, "Code of
     the Japanese graphic character set for information interchange",
     JIS X0208:1983,1990.

In addition, revised version will be published in 1997. (It does not
change graphic character set)

[JIS X0208-1997?]  Japanese Standards Association, "7-bit and
     8-bit double byte coded Kanji sets for information interchange",
     JIS X 0208:1997? draft.

JIS X0212-1990
--------------

A 94x94-character set (see 94x94-character set) for Japanese as
supplement to JIS X0208 (see JIS X0208).  It is a standard of
Japan.

Final byte of ISO 2022 (see ISO 2022) is 04/04 (`D').

koi8-r
------

A MIME charset (see MIME charset) for Cyrillic script for Russian
or other languages.

It is a 1 byte 8bit (see 8bit) coded character set (see coded character set),
not based on ISO 2022 (see ISO 2022).  It is a
de-fact standard.

It is defined in RFC 1489.

[RFC 1489] A. Chernov, "Registration of a Cyrillic Character
     Set", July 1993.

KS C5601-1987
-------------

A 94x94-character set (see 94x94-character set) for Korean
language (Hangul script).  Korean Standard.  Final byte of ISO 2022
(see ISO 2022) is 04/03 (`C').

[KS C5601] Korea Industrial Standards Association, "Code for
     Information Interchange (Hangul and Hanja)", KS C 5601:1987.

media type
----------

*media type* specifies the nature of the data in the body of MIME
(see MIME) entity (see entity).  It consists of *type* and
*subtype*.  It is defined in RFC 2046 (see RFC 2046).

Currently there are following types:

   * *text*
   * *image*
   * *audio*
   * *video*
   * *application*
   * *multipart* (see multipart)
   * *message*

And there are various subtypes, for example, application/octet-stream,
audio/basic, image/jpeg, multipart/mixed (see multipart/mixed),
text/plain (see text/plain), video/mpeg...

You can refer registered media types at MEDIA TYPES
(ftp://ftp.isi.edu/in-notes/iana/assignments/media-types).

In addition, you can use private type or subtype using *x-token*,
which as the prefix `x-'.  However you can not use them in public.

(cf. Content-Type field)

message
-------

In this document, it means mail defined in RFC 822 (see RFC 822)
and news message defined in RFC 1036 (see RFC 1036).

message/rfc822
--------------

*message/rfc822* indicates that the body contains an encapsulated
message, with the syntax of an RFC 822 (see RFC 822) message.  It
is the replacement of traditional RFC 934 (see RFC 934)
encapsulation.  It is defined in RFC 2046 (see RFC 2046).

method
------

Application program of tm-view to process for specified media type
(see media type) when user plays an entity.

There are two kinds of methods, *internal method* and *external
method*.  Internal method is written by Emacs Lisp.  External method
is written by C or script languages and called by asynchronous process
call.

(cf. method (tm-view-en))

MIME
----

MIME stands for *Multipurpose Internet Mail Extensions*, it is an
extension for RFC 822 (see RFC 822).

According to RFC 2045:

STD 11, RFC 822, defines a message representation protocol specifying
considerable detail about US-ASCII message headers, and leaves the
message content, or message body, as flat US-ASCII text.  This set of
documents, collectively called the Multipurpose Internet Mail
Extensions, or MIME, redefines the format of messages to allow for

  1. textual message bodies in character sets other than US-ASCII,
  2. an extensible set of different formats for non-textual message
     bodies,
  3. multi-part message bodies, and
  4. textual header information in character sets other than US-ASCII.

It is defined in RFC 2045 (see RFC 2045), RFC 2046 (see RFC 2046),
RFC 2047 (see encoded-word), RFC 2048 (see RFC 2048)
and RFC 2049 (see RFC 2049).

MIME charset
------------

Coded character set (see coded character set) used in Content-Type
field (see Content-Type field) or charset parameter of
encoded-word (see encoded-word).

It is defined in RFC 2045 (see RFC 2045).

iso-2022-jp (see iso-2022-jp) or euc-kr (see euc-kr) are kinds
of it.  (In this document, MIME charsets are written by small letters
to distinguish graphic character set (see graphic character set).
For example, ISO 8859-1 is a graphic character set, and iso-8859-1 is
a MIME charset)

MTA
---

*Message Transfer Agent*.  It means mail transfer programs
(ex. sendmail) and news servers.

(cf. MUA)

MUA
---

*Message User Agent*.  It means mail readers and news readers.

(cf. MTA)

MULE
----

Multilingual extension of GNU Emacs (see Emacs) by HANDA Ken'ichi
et al.

[MULE] Nishikimi M., Handa K. and Tomura S., "Mule: MULtilingual
     Enhancement to GNU Emacs", Proc. of INET'93, August, 1993.

Now, FSF and HANDA Ken'ichi et al. are working to merge MULE feature
into Emacs, there is alpha version of mule merged emacs
(ftp://etlport.etl.go.jp/pub/mule/mule-19.33-delta.taz).

In addition, there is XEmacs with mule feature.

So now, there are 3 kinds of mule variants.

In this document, *mule* means any mule variants,
*MULE* means original MULE (..2.3),
*Emacs/mule* means mule merged Emacs,
*XEmacs/mule* means XEmacs with mule feature.

Multipart
---------

*multipart* means media type (see media type) to insert multiple
entities (see entity) in a single body.  Or it also indicates a
message consists of multiple entities.

There are following subtypes registered in RFC 2046 (see RFC 2046):

   * multipart/mixed (see multipart/mixed)
   * multipart/alternative (see multipart/alternative)
   * multipart/digest (see multipart/digest)
   * multipart/parallel (see multipart/parallel)

and registered in RFC 1847 (see Security multipart):

   * multipart/signed (see multipart/signed)
   * multipart/encrypted (see multipart/encrypted)

multipart/alternative
---------------------

*multipart/digest* is one of multipart (see multipart) media
types.  This type is syntactically identical to multipart/mixed (see
multipart/mixed), but the semantics are different.  In particular,
each of the body parts is an "alternative" version of the same
information.

(cf. RFC 2046)

multipart/digest
----------------

*multipart/digest* is one of multipart (see multipart) media
types.  This type is syntactically identical to multipart/mixed (see
multipart/mixed), but the semantics are different.  In particular,
in a digest, the default Content-Type value for a body part is changed
from text/plain (see text/plain) to message/rfc822 (see
message/rfc822).

This is the replacement of traditional RFC 1153 (see RFC 1153)
based encapsulation (see encapsulation).

(cf. RFC 2046)

multipart/encrypted
-------------------

It is a Security multipart (see Security multipart) defined in RFC
1847, used to represent encrypted message.

(cf. PGP/MIME)

multipart/mixed
---------------

Primary and default subtype of multipart (see multipart), it is
used when the body parts are independent and need to be bundled in a
particular order.

(cf. RFC 2046)

multipart/parallel
------------------

*multipart/parallel* is a subtype of multipart (see multipart).
This type is syntactically identical to multipart/mixed (see
multipart/mixed), but the semantics are different.  In particular,
in a parallel entity, the order of body parts is not significant.

(cf. RFC 2046)

multipart/signed
----------------

It is a Security multipart (see Security multipart) defined in RFC
1847, used to represent signed message.

(cf. PGP/MIME)

PGP
---

A public key encryption program by Phil Zimmermann.  It provides
encryption and signature for message (see message).  PGP stands
for *Pretty Good Privacy*.

Traditional PGP uses RFC 934 (see RFC 934) encapsulation (see
encapsulation).  It is conflict with MIME (see MIME).  So
PGP/MIME (see PGP/MIME) is defined.  On the other hand, PGP-kazu
(see PGP-kazu) was proposed to use PGP encapsulation in MIME.  But
it is obsoleted.

[PGP: RFC 1991] D. Atkins, W. Stallings and P. Zimmermann, "PGP
     Message Exchange Formats", August 1996, Informational.

PGP-kazu
--------

In this document, *PGP-kazu* means a method to use traditional PGP
encapsulation in MIME (see MIME), proposed by YAMAMOTO Kazuhiko.

PGP-kazu defines a media type (see media type), *application/pgp*.

In application/pgp entity, PGP encapsulation (see encapsulation)
is used.  PGP encapsulation conflicts with MIME, so it requires
PGP-processing to read as MIME message.

It was obsoleted, so you should use PGP/MIME (see PGP/MIME).
However if you want to use traditional PGP message, it might be
available.

PGP/MIME
--------

PGP (see PGP) and MIME (see MIME) integration proposed by
Michael Elkins.

It is based on RFC 1847 (see Security multipart), so it is
harmonious with MIME, but it is not compatible with traditional PGP
encapsulation.  However MIME MUA can read PGP/MIME signed message even
if it does not support PGP/MIME.

PGP/MIME (see PGP/MIME) will be standard of PGP message.

[PGP/MIME: RFC 2015] M. Elkins, "MIME Security with Pretty Good
     Privacy (PGP)", October 1996, Standards Track.

Quoted-Printable
----------------

*Quoted-Printable* is a transfer encoding method of MIME (see
MIME) defined in RFC 2045 (see RFC 2045).

If the data being encoded are mostly US-ASCII text, the encoded form
of the data remains largely recognizable by humans.

(cf. Base64)

RFC 821
-------

[SMTP: RFC 821] J. Postel, "Simple Mail Transfer Protocol",
     August 1982, STD 10.

RFC 822
-------

A RFC defines format of Internet mail message, mainly *message
header*.

*[Memo]*

     news message is based on RFC 822, so *Internet message* may be
     more suitable than *Internet mail* .

[RFC 822] D. Crocker, "Standard for the Format of ARPA Internet
     Text Messages", August 1982, STD 11.

RFC 934
-------

A RFC defines an *encapsulation* (see encapsulation) method for
Internet mail (see RFC 822).

It conflicts with MIME (see MIME), so you should use
message/rfc822 (see message/rfc822).

[RFC 934] Marshall T. Rose and Einar A. Stefferud, "Proposed
     Standard for Message Encapsulation", January 1985.

RFC 1036
--------

A RFC defines format of USENET message.  It is a subset of RFC 822
(see RFC 822).  It is not Internet standard, but a lot of netnews
excepting Usenet uses it.

[USENET: RFC 1036] M. Horton and R. Adams, "Standard for
     Interchange of USENET Messages", December 1987, (obsolete RFC
     850).

RFC 1153
--------

[RFC 1153] F. Wancho, "Digest Message Format", April 1990.

RFC 1557
--------

A RFC defines MIME charset (see MIME charset)s for Korean, euc-kr
(see euc-kr) and iso-2022-kr (see iso-2022-kr).

[RFC 1557] U. Choi, K. Chon and H. Park, "Korean Character
     Encoding for Internet Messages", December 1993, Informational.

RFC 1922
--------

A RFC defines MIME charset (see MIME charset)s for Chinese,
iso-2022-cn (see iso-2022-cn), iso-2022-cn-ext (see
iso-2022-cn-ext), cn-gb (see cn-gb), cn-big5 (see cn-big5),
etc.

In addition, it defines additional parameters of Content-Type field
(see Content-Type field) field, *charset-edition* and
*charset-extension*.

[RFC 1922] Zhu, HF., Hu, DY., Wang, ZG., Kao, TC., Chang,
     WCH. and Crispin, M., "Chinese Character Encoding for Internet
     Messages", March 1996, Informational.

RFC 2045
--------

[RFC 2045] N. Freed and N. Borenstein, "Multipurpose Internet
     Mail Extensions (MIME) Part One: Format of Internet Message
     Bodies", November 1996, Standards Track (obsolete RFC 1521, 1522,
     1590).

RFC 2046
--------

[RFC 2046] N. Freed and N. Borenstein, "Multipurpose Internet
     Mail Extensions (MIME) Part Two: Media Types", November 1996,
     Standards Track (obsolete RFC 1521, 1522, 1590).

RFC 2048
--------

[RFC 2048] N. Freed, J. Klensin and J. Postel, "Multipurpose
     Internet Mail Extensions (MIME) Part Four: Registration
     Procedures", November 1996, Standards Track (obsolete RFC 1521,
     1522, 1590).

RFC 2049
--------

[RFC 2049] N. Freed and N. Borenstein, "Multipurpose Internet
     Mail Extensions (MIME) Part Five: Conformance Criteria and
     Examples", November 1996, Standards Track (obsolete RFC 1521,
     1522, 1590).

plain text
----------

A textual data represented by only coded character set (see coded character set).
It does not have information about font or
typesetting.  (cf. text/plain)

Security multipart
------------------

A format to represent signed/encrypted message in MIME (see MIME).

It defines two multipart media types, *multipart/signed* (see
multipart/signed) and *multipart/encrypted* (see
multipart/encrypted).

MOSS and PGP/MIME (see PGP/MIME) are based on it.

[Security multipart: RFC 1847] James Galvin, Gale Murphy, Steve
     Crocker and Ned Freed, "Security Multiparts for MIME:
     Multipart/Signed and Multipart/Encrypted", October 1995,
     Standards Track.

text/enriched
-------------

[text/enriched: RFC 1896] P. Resnick and A. Walker, "The
     text/enriched MIME Content-type", February 1996, (obsolete RFC
     1563).

text/plain
----------

*text/plain* is a media type (see media type) for plain text
(see plain text), defined in RFC 2046 (see RFC 2046).

The default media type of "text/plain; charset=us-ascii" for Internet
mail describes existing Internet practice.  That is, it is the type of
body defined by RFC 822 (see RFC 822).

(cf. MIME charset) (cf. us-ascii)

tm-kernel, tm
-------------

A libraries to provide user interface about MIME (see MIME) for
emacs.  tm stands for `tools for MIME'.

*[Unimportant notice(^-^;]*

        *  tm may not stand for "tiny-mime"(^-^;

        *  tm may not stand for initial of an author (^-^;

        *  "Tools for MIME" may be strained (^-^;

tm-MUA
------

MUA (see MUA) or MUA extender using tm (see tm-kernel).

*tm oomori package* has following extenders:

   * *tm-mh-e* (see (tm-mh-e-en))
      for mh-e (see (mh-e))
   * *tm-gnus* (see (tm-gnus_en)) for GNUS
   * *gnus-mime* (see (gnus-mime-en)) for Gnus
   * *tm-vm* (see (tm-vm-en)) for VM
   * *tm-rmail* for RMAIL

us-ascii
--------

A MIME charset (see MIME charset) for primary Latin script mainly
written by English or other languages.

It is a 7bit coded character set (see coded character set) based
on ISO 2022 (see ISO 2022), it contains only ASCII (see ASCII)
and code extension (see code extension) is not allowed.

It is standard coded character set of Internet mail.  If MIME charset
is not specified, *us-ascii* is used as default.

In addition, *ASCII* of RFC 822 (see RFC 822) should be
interpreted as us-ascii.

Setting
*******

In the tm package, two files, `mime-setup.el' and `tm-setup.el', are
provided to ease the setup.

The `mime-setup.el' is used for the whole MIME related
setup including MIME encoding using `tm-edit.el', while
`tm-setup.el' is used to set up tm-MUA only.

Normal setting
==============

If you want normal setting, please use *mime-setup*.  For example,
please insert following into `~/.emacs':

     (load "mime-setup")

As `mime-setup.el' loads `tm-setup.el', you don't need to load
`tm-setup.el' when you use `mime-setup.el' (Description of old version
of Gnus FAQ is wrong!)

signature
---------

You can set up the *automatic signature selection tool* using
`mime-setup'. If you want to automatically select the signature file
depending on how the message headers show, add lines like shown below
to your .emacs (Refer to the reference manual of `signature.el' for
more details).

     (setq signature-file-alist
           '((("Newsgroups" . "jokes")       . "~/.signature-jokes")
             (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun")
             (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun")
             (("To" . "tea")                 . "~/.signature-jokes")
             (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal")
             ))

 -- Variable: mime-setup-use-signature

     If it is not `nil', `mime-setup.el' sets up for
     `signature.el'.  Its default value is `t'.

 -- Variable: mime-setup-signature-key-alist

     It defines key to bind signature inserting command for each
     major-mode.  Its default value is following:

          	((mail-mode . "\C-c\C-w"))

     If you want to change, please rewrite it.  For example:

          (set-alist 'mime-setup-signature-key-alist
          	   'news-reply-mode "\C-c\C-w")

 -- Variable: mime-setup-default-signature-key

     If key to bind signature inserting command for a major-mode is
     not found from `mime-setup-signature-key-alist', its value is
     used as key.  Its default value is `"\C-c\C-s"'.

Notices for GNUS
----------------

When `mime-setup.el' sets up for `signature.el', it sets variable
`gnus-signature-file' to `nil'.  Therefore GNUS does not insert
signature automatically when it is sending a message.  Reason of this
setting is following:

GNUS inserts signature after `tm-edit.el' composed as MIME message.
Therefore signature inserted by GNUS is not processed as a valid MIME
part.  In particular, for multipart message, signature places in
outside of MIME part.  So MIME MUA might not display it.

Other notice is key bind.  In historical reason, key bind to insert
signature is `C-c C-s' (like mh-e (see (mh-e))) instead of
`C-c C-w'. If you change to GNUS's default, please set following:

     (set-alist 'mime-setup-signature-key-alist 'news-reply-mode "\C-c\C-w")

Setting not to use tm-edit
==========================

*tm-setup* only sets up tm-MUA (see tm-MUA)s.  In other words, it
is a setting to avoid to use tm-edit.  If you don't want to compose
MIME message or want to use other MIME composer, please use it instead
of `mime-setup.el'.

For example, please insert following into `~/.emacs':

     (load "tm-setup")

*[Memo]*

     If you use `mime-setup.el', you don't need to load
     `tm-setup.el'.

Setting for VM
==============

If you use *vm*, please insert following in
`~/.vm':

     (require 'tm-vm)

*[Notice]*

     If you use *BBDB*, please insert `(require 'tm-vm)'
     *after* `(bbdb-insinuate-vm)'.

Setting up without loading provided setup files
===============================================

You may find the valuable hints in `mime-setup.el' or `tm-setup.el' if
you want to set up MIME environment without loading the tm-provided
setup files.

*[Memo]*

     Current tm provides some convenient features to expect tm-edit,
     and they can not use if `mime-setup.el' is not used.  If you want
     to set up original setting to use tm-edit, please declare
     following setting:

          (provide 'mime-setup)

How to report bug and about mailing list of tm
**********************************************

If you write bug-reports and/or suggestions for improvement, please
send them to the tm Mailing List:

   *  Japanese <bug-tm-ja@chamonix.jaist.ac.jp>
   *  English <bug-tm-en@chamonix.jaist.ac.jp>

Notice that, we does not welcome bug reports about too old version.
Bugs in old version might be fixed.  So please try latest version at
first.

You should write *good bug report*.  If you write only "tm does not
work", we can not find such situations.  At least, you should write
name, type, variants and version of OS, emacs, tm and MUA, and
setting.  In addition, if error occurs, to send backtrace is very
important. (cf. Bugs (emacs))

Bug may not appear only your environment, but also in a lot of
environment (otherwise it might not bug).  Therefor if you send mail
to author directly, we must write a lot of mails.  So please send mail
to address for tm bugs instead of author.

Via the tm ML, you can report tm bugs, obtain the latest release of
tm, and discuss future enhancements to tm.  To join the tm ML, send
e-mail to:

   *  Japanese <tm-ja-admin@chamonix.jaist.ac.jp>
   *  English  <tm-en-admin@chamonix.jaist.ac.jp>

Since the user registration is done manually, please write the mail
body in human-recognizable language (^_^).

Acknowledgments
***************

I thank MASUTANI Yasuhiro.  He requested me a lot of important
features and gave me a lot of suggestions when tm-view was born.
tm-view is based on his influence.

I thank ENAMI Tsugutomo for work of `mime.el', which is an origin of
`tm-ew-d.el' and `mel-b.el', and permission to rewrite for tm.

I thank OKABE Yasuo for work of internal method for LaTeX and
automatic assembling method for message/partial.  I thank UENO Hiroshi
for work of internal method for tar archive.

I thank UMEDA Masanobu for his work of `mime.el', which is the origin
of tm-edit, and permission to rewrite his work as tm-edit.

I thank KOBAYASHI Shuhei for his work as a tm maintainer.  In
addition, he often points out or suggests about conformity with RFCs.

I thank Oscar Figueiredo for his work as the maintainer of tm-vm.  He
improves tm-vm and wrote a good manual of tm-vm.

Last of all, I thank members of two tm mailing lists, Japanese and
English version.

Concept Index
*************

stty: stdin isn't a terminal

Variable Index
**************

stty: stdin isn't a terminal