This file documents SEMI, a MIME user interface for GNU Emacs.
SEMI is a package for GNU Emacs to provide features related with MIME user interface.
SEMI provides two user interfaces: MIME-View and MIME-Edit.
MIME-View is a kernel of user interface to display or operate MIME messages, STD 11 messages or ``localized RFC 822'' messages.
MIME-Edit is a user interface to compose MIME messages.
Each MUA can use powerful MIME features to combine these features.
MIME-View は GNU Emacs で動作する汎用的な MIME viewer です。
MIME-View は MIME message を閲覧するための利用者界面 (user interface) の核であり、この上で presentation-method と呼ばれる表示を作るプログラム を動かしたり、acting-method と呼ばれる entity の処理プログラムを動かす ことが可能で、さまざまな種類の entity を扱う事ができるようになっています。
Internet の電子書簡・ネットニュースなどの書面 (message) の表現形式は STD 11 に基づいています。STD 11 の書面本体 (message body) は行を唯一の 構造とする簡易文面 (plain text) であり、文字符号も us-ascii と定められ ています。実際には、文字符号を us-ascii の代わりにその言語圏で用いられ る文字符号とした『地域化された STD 11』書面も用いられてきましたが、こ の場合も書面の文字符号は1つです。このため、利用者界面 (Message User Agent) は、しばしば、byte 列 = us-ascii 文字列、ないしは、byte 列 = そ の言語圏で用いる文字符号の文字列のように見倣してきました。
しかしながら、MIME では書面は entity を単位とする木構造になり、また、 1つの書面で複数の文字符号を用いることができます。また、entity の内容 は文面や絵のような単純に表示可能なものだけでなく、音声や動画などの一定 時間再生されるようなものや特定のアプリケーションのデータやプログラムの ソース、あるいは、ftp や mail service の利用法や URL といった形で表さ れた外部参照などのさまざまなものが考えらます。このため、表示だけを考え ていた STD 11 における利用者界面の単純な延長では MIME の全ての機能を扱 うことはできません。つまり、MIME の形式に合わせて復号するだけでは不十 分であり、利用者との対話的な再生処理を考慮する必要があります。MIME 書 面の形式は自動処理がしやすく設計されていますが、MIME 書面に含まれる内 容の中にはセキュリティー上の問題から自動処理をするべきでないものがあり、 こういったものの再生に関しては利用者の判断を仰ぐように設計されるべきで しょう。結局、MIME 書面を扱うためには STD 11 および MIME の構文で記述 されたメッセージの情報交換用表現とその解釈結果である表示画面や再生等の 処理を区別して考える必要があります。また、利用者との対話的な再生処理が 必要です。
このため、MIME-View は1つの書面に対して、情報交換用表現を格納する mime-raw-buffer と表示用表現を格納する mime-preview-buffer の2つの buffer を用います。
MIME-View は mime-preview-buffer に対して mime-view-mode という MIME message を閲覧するための mode を提供します。利用者はここで各 entity に 対して操作を行うことができます。
mime-view-mode では各 entity に対して
以下に、表示例を示します。
標準では
最初の数字は message 中のこの entity の位置を節番号のように表したもの
で、
2番目の文字列は表題を表します。この情報は、
3番目の括弧の中の情報はその entity の media-type/subtype を表します。
非 MIME entity の場合、
この entity-button は entity の内容を象徴する icon のような役割を果た
します。例えば、
また、mouse 操作が可能な場合、entity-button を第2ボタン(3 button
mouse の場合、中央のボタン)で押せば、同様にその絵が表示されます。
これもひねりが足りないですが、まあ、そういうもんです。
とはいえ、実際には少しひねってます。
text entity の場合は charset に応じて code 変換したりしますし、XEmacs
では image entity を変換しないといけないし。
詳しくはまた後で。
mime-preview-buffer には以下の機能があります。
content-button を押せば、その part が再生される(*2)
URL-button を押せば、その WWW browser が起動される
(*1) MUA で mime-view の設定をしていない場合、Summary mode には戻りま
せん。
(*2) 実際の動作は対応する method に依ります。
There are 2 kinds of tags:
single-part tag represents single part, this form is following:
TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of
ENCODING indicates
OPTIONAL-FIELDS is to represent another fields except Content-Type
field and Content-Transfer-Encoding field.
multi-part tags represent multi
part. They consist of a pair of
multi-part beginning tag's form is following:
multi-part ending tag's form is following:
A region from multi-part beginning tag to multi-part ending tag is
called as
Operations to make single-part are following:
Operations to make enclosure are following:
There are another operations in mime-edit-mode.
When C-c C-x C-i (
When C-u is followed by it or parameter is not found from
the variable, it asks from user. (When C-u is followed by
it, detected value is used as default value)
If you want to change default value for file names, please change
variable
Specification of default value of tag for file name of inserted file.
It is a list of following list:
Each content inserted in a message is represented by
If a message is translated by 7bit-through
Similarly, if a message is translated by 8bit-through MTA, there is no
need to encode 7bit or 8bit data, but binary data must be encoded to
7bit or 8bit data.
Similarly, I wish ASCII-printable only MTA and code-conversion MTA
disappeared. (^_^;
Maybe there are binary-through MTA, but I think it is not major.
transfer level.
If transfer level of a data is over it, a data is encoded to 7bit.
Currently, 7 or 8 is available. Default value is 7.
In extension plan, EBCDIC will be 5, ASCII printable only will be 6,
binary will be 9. But it will not be implemented.
Split large message if it is non-nil.
Default maximum lines of a message.
Alist of major-mode vs maximum lines of a message.
If it is not specified for a major-mode,
Regular expression to match field-name to be ignored when split
sending.
mime-edit provides PGP encryption, signature and inserting public-key
features based on
This feature requires pgp command and pgp interface package, such as
Mailcrypt package.
Alist of service names vs. corresponding functions and its filenames.
Each element looks like
SERVICE is a symbol of PGP processing. It allows `verify', `decrypt',
`fetch-key', `snarf-keys', `mime-sign', `traditional-sign', `encrypt'
or `insert-key'.
Function is a symbol of function to do specified SERVICE.
FILE is string of filename which has definition of corresponding
FUNCTION.
Return function to do service method.
Face used for content-button or URL-button of MIME-Preview buffer.
Face used for MIME-preview buffer mouse highlighting.
Function to browse URL.
Add condition to database specified by
target-type.
target-type must be
If optional argument mode is
If optional argument mode is
If optional argument file is specified, it is loaded when
condition is activate.
entity-button
nil
が表示されます。
entity-header
entity-body
Operation in mime-preview-buffer
MIME message editing
Minor-mode to edit MIME message
Operations for single-part
Operations for enclosure
Other operations
How to detect tag for inserted file
mime-edit-insert-file
) is
pressed, tag parameters for inserted file, such as media-type or
encoding, are detected by variable mime-file-types
.
mime-file-types
.
transfer level
mime-transfer-level
to represent transfer level.
Splitting
mime-edit-message-default-max-lines
is used.
Miscellaneous
PGP
(SERVICE FUNCTION FILE)
.
Mouse button
Utility for configuration
preview
or
action
.
strict
or
nil
(omitted), condition is added strictly.
with-default
,
condition is added with default rule.
Concept Index
Function Index
Variable Index