FLIM-LB 1.14 Reference Manual about MIME Features

This file documents MIME features of FLIM-LB, a fundamental library to process Internet Messages for GNU Emacsen.


1 What is FLIM-LB?

FLIM is a library to provide basic features about message representation or encoding. FLIM-LB is a variant of FLIM, which features supports to latest Emacs.


2 How to use MIME features

Please eval following to use MIME features provided by FLIM:

(require 'mime)

3 Message and Entity

According to RFC 2045 (RFC 2045), ‘The term “entity”, refers specifically to the MIME-defined header fields and contents of either a message or one of the parts in the body of a multipart entity.’ In this document, the term entity indicates all of header fields and body.

The definition of RFC 2045 indicates that a MIME message is a tree, and each node of the tree is an entity. Namely MIME extends message to tree structure.

FLIM uses mime-entity structure to represent information of entity. In this document, it is called simply ‘mime-entity’.


3.1 Functions to create mime-entity

Function: mime-open-entity &optional type location

Open an entity and return it.

type is representation-type. (cf. Entity representations and implementations)

location is location of entity. Specification of it is depended on representation-type.

Function: mime-parse-buffer &optional buffer type

Parse buffer as message, and set the result to buffer local variable mime-message-structure of buffer as mime-entity.

If buffer is omitted, current buffer is used.

type is representation-type of created mime-entity. (cf. Entity representations and implementations) Default value is buffer.


3.2 Features about message tree

Structure of a MIME message is tree.

In the tree, root node is the entity indicates all of the message. In this document, it is called root-entity or message. In FLIM, it is indicated by buffer local variable mime-message-structure.

Each entity except root-entity has a parent. An entity may have children. We can indicate an entity by relative position from a base entity, based on the parent-child relationship.

In addition, we can indicate an entity by absolute position of the message.

Each entity, which is a node of the tree, can be numbered by depth and left-to-right order of the depth.


                              +-------+
                              |  nil  |
                              +---+---+
              +-------------------+-------------------+
            +-+-+               +-+-+               +-+-+
            | 0 |               | 1 |               | 2 |
            +-+-+               +-+-+               +-+-+
              |         +---------+---------+         |
           +--+--+   +--+--+   +--+--+   +--+--+   +--+--+
           | 0.0 |   | 1.0 |   | 1.1 |   | 1.2 |   | 2.0 |
           +-----+   +-----+   +-----+   +-----+   +-----+

Namely, if depth of a node is n, the node has a node-number, which is consists of n integers. In this document, it is called entity-number. An entity-number is represented by list of integer, like (1 2 3).

mime-entity has also node-id. A node-id is represented by reversed list of entity-number. For example, node-id corresponding with 1.2.3 is (3 2 1).

Each entity can be indicated by entity-number or node-id in mime-message-structure.

Variable: mime-message-structure

Buffer local variable to store mime-entity structure of message.

Function: mime-entity-children entity

Return list of entities included in the entity.

Function: mime-entity-parent entity &optional message

Return parent entity of the entity.

If message is specified, it is regarded as root instead of mime-message-structure.

Function: mime-root-entity-p entity

Return non-nil if entity is root entity (message).

Function: mime-entity-node-id entity

Return node-id of entity.

Function: mime-entity-number entity

Return entity-number of entity.


3.4 Functions about attributes of mime-entity

Function: mime-entity-content-type entity

Return content-type of entity. (cf. mime-content-type structure)

Function: mime-entity-content-disposition entity

Return content-disposition of entity. (cf. mime-content-disposition structure)

Function: mime-entity-filename entity

Return file name of entity.

Function: mime-entity-encoding entity &optional default-encoding

Return content-transfer-encoding of entity. (cf. Encoding Method)

If the entity does not have Content-Transfer-Encoding field, this function returns default-encoding. If it is nil, "7bit" is used as default value.

Function: mime-entity-cooked-p entity

Return non-nil if contents of entity has been already code-converted.


3.5 Information of entity header

Function: mime-fetch-field field-name &optional entity

Return field-body of field-name field in header of entity.

The results is network representation.

If entity is omitted, mime-message-structure is used as default value.

If field-name field is not found, this function returns nil.

Function: mime-read-field field-name &optional entity

Parse field-name field in header of entity, and return the result.

Format of result is depended on kind of field. For non-structured field, this function returns string. For structured field, it returns list corresponding with structure of the field.

Strings in the result will be converted to internal representation of Emacs.

If entity is omitted, mime-message-structure is used as default value.

If field-name field is not found, this function returns nil.


3.6 Text presentation of entity

Function: mime-insert-header entity &optional invisible-fields visible-fields

Insert before point a decoded contents of header of entity.

invisible-fields is list of regexps to match field-name to hide. visible-fields is list of regexps to match field-name to hide.

If a field-name is matched with some elements of invisible-fields and matched with none of visible-fields, this function don’t insert the field.

Each encoded-word (Network representation of header) in the header is decoded. “Raw non us-ascii characters” are also decoded as default-mime-charset.

Function: mime-insert-text-content entity

Insert before point a contents of entity as text entity.

Contents of the entity are decoded as MIME charset (MIME charset). If the entity does not have charset parameter of Content-Type field, default-mime-charset is used as default value.

Variable: default-mime-charset

Symbol to indicate default value of MIME charset (MIME charset).

It is used when MIME charset is not specified.

It is originally variable of APEL.


3.7 Contents of Entity

Function: mime-entity-content entity

Return content of entity as byte sequence.

Function: mime-insert-entity-content entity

Insert content of entity at point.

Function: mime-write-entity-content entity filename

Write content of entity into filename.


3.8 Network representation of Entity

Function: mime-insert-entity entity

Insert header and body of entity at point.

Function: mime-write-entity entity filename

Write representation of entity into filename.

Function: mime-write-entity-body entity filename

Write body of entity into filename.


3.9 Entity as buffer representation

Function: mime-entity-buffer entity

Return buffer, which contains entity.

Function: mime-entity-point-min entity

Return the start point of entity in the buffer which contains entity.

Function: mime-entity-point-max entity

Return the end point of entity in the buffer which contains entity.

Function: mime-entity-header-start entity

Return the start point of header of entity in the buffer which contains entity.

Function: mime-entity-header-end entity

Return the end point of header of entity in the buffer which contains entity.

Function: mime-entity-body-start entity

Return the start point of body of entity in the buffer which contains entity.

Function: mime-entity-body-end entity

Return the end point of body of entity in the buffer which contains entity.


3.10 Entity representations and implementations

Entity is an abstraction. It is designed to use various data representations for their purposes.

Each entity has representation-type. It must be specified when an entity is created. (cf. Functions to create mime-entity)

Functions about entity are implemented by request processing to the entity. Each entity knows its representation-type. Each entity calls processing function corresponding with the representation-type. Such kind of function is called entity processing method. A module, consists of them corresponding with a representation-type, is called mm-backend.

Module name of each mm-backend consists of the prefix mm and its representation-type. The module is required automatically when its entity is created at first.


3.10.1 Message-passing for entity

Function: mime-entity-send entity message &rest args

Send message to entity with args, and return the result.

args is arguments of the message.


3.10.2 Definition of mm-backend

Macro: mm-define-backend type &optional parents

Define type as a mm-backend.

If PARENTS is specified, type inherits parents. Each parent must be representation-type.

Example:

(mm-define-backend chao (generic))
Macro: mm-define-method name args &rest body

Define name as a method function of (nth 1 (car args)) backend.

args is like an argument list of lambda, but (car args) must be specialized parameter. (car (car args)) is name of variable and (nth 1 (car args)) is name of backend (representation-type).

Example:

(mm-define-method entity-cooked-p ((entity chao)) nil)

4 Information of Content-Type field

Content-Type field is a field to indicate kind of contents or data format, such as media-type (media-type) and MIME charset. It is defined in RFC 2045 (RFC 2045).

[Memo]

Historically, Content-Type field was proposed in RFC 1049. In it, Content-Type did not distinguish type and subtype, and there are no mechanism to represent kind of character code like MIME charset.

FLIM provides parser for Content-Type field and structure mime-content-type to store information of Content-Type field.


4.1 Format of Content-Type field

Format of Content-Type field is defined as follows:

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

For example:

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

‘type’ and ‘subtype’ indicate format of an entity. In this document, pair of them is called ‘media-type’. ‘image/jpeg’ or ‘text/plain’ is a media-type.

[Memo]

If an entity does not have Content-Type field, it is regarded as following:

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

(cf. us-ascii)


4.2 mime-content-type structure

Structure: mime-content-type

Structure to store information of a Content-Type field.

Applications should use reference functions mime-content-type-SLOT to refer information of the structure.

Slots of the structure are following:

primary-type

primary type of media-type (symbol).

subtype

subtype of media-type (symbol).

parameters

parameters of Content-Type field (association-list).

Function: make-mime-content-type type subtype

&optional parameters

Constructor of content-type.

Function: mime-content-type-parameter content-type parameter

Return value of parameter of content-type.


4.3 Parser

Function: mime-parse-Content-Type string

Parse string as a field-body of Content-Type field, and return the result as mime-content-type (mime-content-type structure) structure.

Function: mime-read-Content-Type

Parse Content-Type field of the current buffer, and return the result as mime-content-type (mime-content-type structure) structure.

Return nil if Content-Type field is not found.


4.4 Utility functions

Function: mime-type/subtype-string type &optional subtype

Return type/subtype string from type and subtype.


5 Information of Content-Disposition field

Content-Disposition field is an optional field to specify presentation of an entity or attributes of an entity, such as file name.

[RFC 2183]

S. Dorner, K. Moore and R. Troost, “Communicating Presentation Information in Internet Messages: The Content-Disposition Header”, August 1997, Standards Track.

FLIM provides parser for Content-Disposition field and structure mime-content-disposition to store information of Content-Disposition field.


5.1 mime-content-disposition structure

Structure: mime-content-disposition

Structure to store information of a Content-Disposition field.

Applications should use reference functions mime-content-disposition-SLOT to refer information of the structure.

Slots of the structure are following:

disposition-type

disposition-type (symbol).

parameters

parameters of Content-Disposition field (association-list).

Function: mime-content-disposition-parameter content-disposition parameter

Return value of parameter of content-disposition.

Function: mime-content-disposition-filename content-disposition

Return filename of content-disposition.


5.2 Parser for Content-Disposition field

Function: mime-parse-Content-Disposition string

Parse string as field-body of Content-Disposition field, and return the result as mime-content-disposition (mime-content-disposition structure) structure.

Function: mime-read-Content-Disposition

Parse Content-Disposition field of the current buffer, and return the result as mime-content-disposition (mime-content-disposition structure) structure.

Return nil if Content-Disposition field is not found.


6 Encoding Method

Content-Transfer-Encoding field is a header field to indicate body encoding of a entity.

FLIM provides parser functions for Content-Transfer-Encoding field. They represent information of Content-Transfer-Encoding field as string.

In addition, FLIM provides encoder/decoder functions by Content-Transfer-Encoding.


6.1 Parser

Function: mime-parse-Content-Transfer-Encoding string

Parse string as a field-body of Content-Transfer-Encoding field, and return the result.

Function: mime-read-Content-Transfer-Encoding &optional default-encoding

Parse Content-Transfer-Encoding field of the current buffer, and return the result.

Return default-encoding if Content-Transfer-Encoding field is not found. If it is not specified, nil is used as the default value.


6.2 Encoder/decoder

Function: mime-encode-region start end encoding

Encode region start to end of current buffer using encoding.

Function: mime-decode-region start end encoding

Decode region start to end of current buffer using encoding.

Function: mime-decode-string string encoding

Decode string which is encoded in encoding, and return the result.

Function: mime-insert-encoded-file filename encoding

Insert file FILENAME encoded by ENCODING format.

Function: mime-write-decoded-region start end filename encoding

Decode and write current region encoded by encoding into filename.

start and end are buffer positions.


6.3 Other utilities

Function: mime-encoding-list &optional SERVICE

Return list of Content-Transfer-Encoding.

If service is specified, it returns available list of Content-Transfer-Encoding for it.

Function: mime-encoding-alist &optional SERVICE

Return table of Content-Transfer-Encoding for completion.

If service is specified, it returns available list of Content-Transfer-Encoding for it.


6.4 How to write encoder/decoder module

Macro: mel-define-method name args &rest body

Define name as a method function of (nth 1 (car (last args))) backend.

args is like an argument list of lambda, but (car (last args)) must be specialized parameter. (car (car (last args))) is name of variable and (nth 1 (car (last args))) is name of backend (encoding).

Example:

(mel-define-method mime-write-decoded-region (start end filename
						    (nil "base64"))
  "Decode and write current region encoded by base64 into FILENAME.
START and END are buffer positions."
  (interactive
   (list (region-beginning) (region-end)
	 (read-file-name "Write decoded region to file: ")))
  (let ((str (buffer-substring start end)))
    (with-temp-buffer
      (insert (decode-base64-string str))
      (write-region-as-binary (point-min) (point-max) filename)
      )))
Macro: mel-define-method-function spec function

Set spec’s function definition to function.

First element of spec is service.

Rest of args is like an argument list of lambda, but (car (last args)) must be specialized parameter. (car (car (last args))) is name of variable and (nth 1 (car (last args))) is name of backend (encoding).

Example:

(mel-define-method-function (mime-encode-string string (nil "base64"))
			    'encode-base64-string)

6.5 How to add encoding/decoding service

Macro: mel-define-service name &optional args doc-string

Define name as a service for Content-Transfer-Encodings.

If args is specified, name is defined as a generic function for the service.

Example:

(mel-define-service encoded-text-encode-string (string encoding)
  "Encode STRING as encoded-text using ENCODING.
ENCODING must be string.")

7 Network representation of header

RFC 2047 defines the encoded-word which is a format to represent non-ASCII (ASCII) characters in a header.

[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).

The encoded-word is the only valid format to represent non-ASCII (ASCII) characters in a header, but there are also invalid styles. Such kinds of evil messages represent non-ASCII (ASCII) characters in headers without encoded-words (it is called "raw" non-ASCII (ASCII) characters).

FLIM provides encoding/decoding features of both encoded-word and invalid "raw" non-ASCII (ASCII) characters.


7.1 Header encoding/decoding

Function: eword-decode-header &optional code-conversion separator

Decode MIME encoded-words in header fields.

If code-conversion is nil, only encoded-words are decoded. If code-conversion is a MIME charset (MIME charset), non-ASCII bit patterns are decoded as the MIME charset. Otherwise non-ASCII bit patterns are decoded as the default-mime-charset. (cf. Text presentation of entity)

If separator is not nil, it is used as header separator.

Function: eword-encode-header &optional code-conversion

Encode header fields to network representation, such as MIME encoded-word.

Each field is encoded as corresponding method specified by variable mime-field-encoding-method-alist.

Variable: mime-field-encoding-method-alist

Association list to specify field encoding method. Each element looks like (FIELD . METHOD).

If METHOD is mime, the FIELD will be encoded into MIME format (encoded-word).

If METHOD is nil, the FIELD will not be encoded.

If METHOD is a MIME charset, the FIELD will be encoded as the charset when it must be convert into network-code.

Otherwise the FIELD will be encoded as variable default-mime-charset when it must be convert into network-code.


8 Various Customization

group: mime

The group associated with functions related to MIME.

It belongs to mail and news.


9 Appendix


9.1 Glossary


9.1.1 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.

Conventional Internet MTA (MTA) can translate 7bit data, so it is no need to translate by Quoted-Printable (Quoted-Printable) or Base64 (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 822 (RFC 822) and RFC 2045 (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 (binary). For example, Postscript file should be encoded by Quoted-Printable.


9.1.2 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 or euc-kr are coded-character-set represented by 8bit textual string.

Traditional Internet MTA (MTA) can translate only 7bit (7bit) data, so if a 8bit data will be translated such MTA, it must be encoded by Quoted-Printable (Quoted-Printable) or Base64 (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 (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 (binary), so it must be encoded by Base64 or Quoted-Printable.


9.1.3 ASCII

ASCII is a 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.

[ASCII]

“Coded Character Set – 7-Bit American Standard Code for Information Interchange”, ANSI X3.4:1986.


9.1.4 Base64

Base64 is a transfer encoding method of MIME (MIME) defined in RFC 2045 (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.


9.1.5 binary

Any byte stream is called binary.

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

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


9.1.6 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.


9.1.7 media-type

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

Currently there are following standard primary-types:

  • text
  • image
  • audio
  • video
  • application
  • multipart
  • message

And there are various subtypes, for example, application/octet-stream, audio/basic, image/jpeg, multipart/mixed, 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. Format of Content-Type field)


9.1.8 message

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


9.1.9 MIME

MIME stands for Multipurpose Internet Mail Extensions, it is an extension for RFC 822 (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 (RFC 2045), RFC 2046 (RFC 2046), RFC 2047 (Network representation of header), RFC 2048 (RFC 2048) and RFC 2049 (RFC 2049).


9.1.10 MIME charset

Coded character set (Coded character set, Character code) used in Content-Type field (Format of Content-Type field) or charset parameter of encoded-word (Network representation of header).

It is defined in RFC 2045 (RFC 2045).

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


9.1.11 MTA

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

(cf. MUA)


9.1.12 MUA

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

(cf. MTA)


9.1.13 Quoted-Printable

Quoted-Printable is a transfer encoding method of MIME (MIME) defined in RFC 2045 (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)


9.1.14 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.


9.1.15 RFC 1036

A RFC defines format of USENET message. It is a subset of RFC 822 (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).


9.1.16 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).


9.1.17 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).


9.1.18 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).


9.1.19 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).


9.1.20 plain text

A textual data represented by only coded character set (Coded character set, Character code). It does not have information about font or typesetting.


9.1.21 us-ascii

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

It is a 7bit coded character set (Coded character set, Character code) based on ISO 2022, it contains only ASCII (ASCII) and 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 (RFC 822) should be interpreted as us-ascii.


9.2 How to report bugs

Topics related to FLIM-LB are discussed in following mailing lists. The latest version is also announced there.

Wanderlust Mailing List <wl@ml.gentei.org>

In this list Japanese is mainly used for discussion. We also have a list for discussion in English:

Wanderlust List in English <wl-en@ml.gentei.org>

(Messages posted to this list are also forwarded to the former one.)

A guide can be obtained automatically by sending mail to wl-ctl@ml.gentei.org (or to wl-en-ctl@ml.gentei.org for the English one) with the body

# guide

Please send bug reports or patches to one of those lists. You have to subscribe the mailing list to post a message.

Notice that, we do 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 “FLIM does not work”, we can not find such situations. At least, you should write name, type, variants and version of OS, emacs, APEL, FLIM, SEMI and MUA, and setting. In addition, if error occurs, to send backtrace is very important. (cf. Reporting Bugs in GNU Emacs Manual)

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 EMACS-MIME Mailing List instead of author.


9.3 GitHub based development

FLIM-LB’s repository is published in GitHub.

If you send a pull request, please embed unindented ChangeLog entries in commit message like Emacs’s. See Commit messages section of Emacs’s CONTRIBUTE file 1.

If you send a bug report, please attach Backtrace with it. 2


9.4 History of FLIM

FLIM の code の最古の部分は 榎並 嗣智 氏が書いた mime.el に起源し ます。この小さな program は Nemacs で動作する iso-2022-jp の B-encoding 専用の encoded-word の復号化プログラムでした。

その後、守岡 知彦 は mime.el を元にtiny-mime.el というプロ グラムを書きます。これは、Nemacs と Mule で動作する encoded-word の符号 化・復号化プログラムでした。tiny-mime.el は B-encoding だけでなく Q-encoding もsupport し、また、MULE で扱うことができるさまざまな MIME charset (MIME charset) を同時に使うことができました。この時、 Nemacs と Mule の双方を support するために用いられたテクニックは後に emu package にまとめられます。

この頃、守岡 知彦 は tiny-mime.el をさまざまな MUA で使うための設 定集も配布していましたが、それらは後にtiny-mime.el とともに1つの package にまとめられ、tm という名前で配布されます。

守岡 知彦 はやがて、MIME message を閲覧するためのプログラムである tm-body.el を書きます。これは、すぐにtm-view.el という名前 に変わりましたが、やがて、これがtiny-mime.el に代わって、tm の中 核となります。

tm-view.el は当然、Content-Transfer-Encoding を扱う必要があります。 この目的のために、MEL が整備されはじめました。Base64 に関しては tiny-mime.el の code が移され、また、新たにQuoted-Printable の code が追加されました。これらがmel-b.elmel-q.el になり ました。

また、後に、守岡 知彦 によって uuencode 用の mel-u.el が追加され、 その後に、小林 修平 氏によって x-gzip64 用のmel-g.el が追加されま した。

tm では後に、守岡 知彦 によって tiny-mime.el の再実装が行われ、こ の過程で、STD 11 の parser が書かれました。これは、現在の std11.el に当たります。また、この過程で tiny-mime.el は復 号化を行う tm-ew-d.el と符号化を行う tm-ew-e.el に分けられ ました。この両者が現在の eword-decode.eleword-encode.el の先祖に当たります。

後に、守岡 知彦 らによって tm の全面書き換え作業が行われ、この過程で、tm は APEL, MEL, SEMI, EMH, RMAIL-MIME, Gnus-MIME などに分けられました。こ のうちの MEL が FLIM の直接の先祖に当たります。

後に、APEL から std11.el が移され、また、mailcap.el, eword-decode.el および eword-encode.el が SEMI から移され、 package の名前が FLIM となります。

この直前から田中 哲 氏がより RFC に忠実な実装を書き始め、これは、現在、 FLIM の枝である “FLIM-FLAM” となっています。


10 Concept Index

Jump to:   7   8  
A   B   C   E   G   I   M   N   P   Q   R   S   T   U   V   X  
Index Entry  Section

7
7bit: 7bit
7bit (textual) string: 7bit
7bit data: 7bit

8
8bit: 8bit
8bit (textual) string: 8bit
8bit data: 8bit

A
ANSI X3.4:1986: ASCII
application: media-type
ASCII: ASCII
ASCII: ASCII
ASCII: us-ascii
audio: media-type

B
Base64: Base64
binary: binary

C
Content-Disposition field: Content-Disposition
Content-Transfer-Encoding field: Content-Transfer-Encoding
Content-Type field: Content-Type

E
encoded-word: encoded-word
entity: Entity
entity processing method: mm-backend
entity-number: Entity hierarchy

G
good bug report: Bug report

I
image: media-type
Internet mail: RFC 822
Internet message: RFC 822

M
media-type: media-type
message: Entity hierarchy
message: media-type
message header: RFC 822
Message Transfer Agent: MTA
Message User Agent: MUA
mime-content-disposition: Content-Disposition
mime-content-type: Content-Type
mime-entity: Entity
mm-backend: mm-backend
multipart: media-type
Multipurpose Internet Mail Extensions: MIME

N
node-id: Entity hierarchy

P
pad: Base64
parameter: Content-Type field

Q
Quoted-Printable: Quoted-Printable

R
representation-type: mm-backend
RFC 1036: RFC 1036
RFC 2045: RFC 2045
RFC 2046: RFC 2046
RFC 2047: encoded-word
RFC 2047: encoded-word
RFC 2048: RFC 2048
RFC 2049: RFC 2049
RFC 2183: Content-Disposition
RFC 822: RFC 822
root-entity: Entity hierarchy

S
Standards Track: Content-Disposition
Standards Track: encoded-word
Standards Track: RFC 2045
Standards Track: RFC 2046
Standards Track: RFC 2048
Standards Track: RFC 2049
STD 11: RFC 822
subtype: Content-Type field
subtype: media-type

T
text: media-type
type: Content-Type field
type: media-type

U
us-ascii: us-ascii
USENET: RFC 1036

V
video: media-type

X
x-token: media-type


11 Function Index

Jump to:   E   M  
Index Entry  Section

E
eword-decode-header: Header encoder/decoder
eword-encode-header: Header encoder/decoder

M
make-mime-content-type: mime-content-type
mel-define-method: mel-backend
mel-define-method-function: mel-backend
mel-define-service: generic function for mel-backend
mime: custom
mime-content-disposition: mime-content-disposition
mime-content-disposition-filename: mime-content-disposition
mime-content-disposition-parameter: mime-content-disposition
mime-content-type: mime-content-type
mime-content-type-parameter: mime-content-type
mime-decode-region: encoder/decoder
mime-decode-string: encoder/decoder
mime-encode-region: encoder/decoder
mime-encoding-alist: Encoding information
mime-encoding-list: Encoding information
mime-entity-body-end: Entity buffer
mime-entity-body-start: Entity buffer
mime-entity-buffer: Entity buffer
mime-entity-children: Entity hierarchy
mime-entity-content: Entity-content
mime-entity-content-disposition: Entity Attributes
mime-entity-content-type: Entity Attributes
mime-entity-cooked-p: Entity Attributes
mime-entity-encoding: Entity Attributes
mime-entity-filename: Entity Attributes
mime-entity-header-end: Entity buffer
mime-entity-header-start: Entity buffer
mime-entity-node-id: Entity hierarchy
mime-entity-number: Entity hierarchy
mime-entity-parent: Entity hierarchy
mime-entity-point-max: Entity buffer
mime-entity-point-min: Entity buffer
mime-entity-send: Request for entity
mime-fetch-field: Entity-header
mime-find-entity-from-content-id: Entity Search
mime-find-entity-from-node-id: Entity Search
mime-find-entity-from-number: Entity Search
mime-insert-encoded-file: encoder/decoder
mime-insert-entity: Entity-network-representation
mime-insert-entity-content: Entity-content
mime-insert-header: entity formatting
mime-insert-text-content: entity formatting
mime-open-entity: Entity creation
mime-parse-buffer: Entity creation
mime-parse-Content-Disposition: Content-Disposition parser
mime-parse-Content-Transfer-Encoding: Content-Transfer-Encoding parser
mime-parse-Content-Type: Content-Type parser
mime-read-Content-Disposition: Content-Disposition parser
mime-read-Content-Transfer-Encoding: Content-Transfer-Encoding parser
mime-read-Content-Type: Content-Type parser
mime-read-field: Entity-header
mime-root-entity-p: Entity hierarchy
mime-type/subtype-string: Content-Type utility
mime-write-decoded-region: encoder/decoder
mime-write-entity: Entity-network-representation
mime-write-entity-body: Entity-network-representation
mime-write-entity-content: Entity-content
mm-define-backend: mm-backend module
mm-define-method: mm-backend module


12 Variable Index


Footnotes

(1)

https://git.savannah.gnu.org/cgit/emacs.git/plain/CONTRIBUTE

(2)

http://www.jpl.org/elips/BUGS-ja.html describes how to in Japanese.