X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-en.sgml;h=50b57d0e5433fa289cb832ccd48c77ea91f14b46;hb=7bc924305433b4d7da1169e1f3779efdebb87d9d;hp=8d0c86e137a95e8ca864954cb3d52eaaed219f13;hpb=b6377f4fd418f38718c6cdfea81159cda67e289c;p=elisp%2Fflim.git diff --git a/mime-en.sgml b/mime-en.sgml index 8d0c86e..50b57d0 100644 --- a/mime-en.sgml +++ b/mime-en.sgml @@ -1,8 +1,8 @@
--This file documents MIME features of FLIM, a Internet message -parsing/encoding library for GNU Emacs. +This file documents MIME features of FLIM, a fundamental library to +process Internet Messages for GNU Emacsen.
-The definition of RFC 2045 indicates that a MIME message is a tree. -An message is a tree, each node is an entity, like following figure. -Namely MIME extends message to tree structure. +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
-$BA0=R$N$h$&$K!"(Bmessage $BCf$N3F(B entity $B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O(B
-$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B
-
-
-mime-entity $B$G$O!"$3$l$HF1MM$N(B
-$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B
-$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer
-local $BJQ?t(B
-Parse current buffer as message, and return the result as mime-entity.
-
Parse buffer as message, and set the result to buffer local
variable
If buffer is omitted, current buffer is used.
+
+type is representation-type of created mime-entity.
+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
+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.
+
+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
+
+mime-entity has also
+Each entity can be indicated by entity-number or node-id in
+
Buffer local variable to store mime-entity structure of message.
@@ -157,6 +165,10 @@ Return node-id of entity.
Return entity-number of entity.
+
+
@@ -175,6 +187,15 @@ If message is not specified,
+Return entity from cid in message.
+
+If message is not specified,
+
+
Insert before point a decoded contents of header of entity.
@@ -268,8 +293,32 @@ 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
+Insert before point a contents of entity as text entity.
+
+Contents of the entity are decoded as
+Symbol to indicate default value of
+It is used when MIME charset is not specified.
+
+It is originally variable of APEL.
+
+Insert content of entity at point.
+
Write content of entity into filename.
+
+Insert header and body of entity at point.
+
@@ -354,25 +419,22 @@ contains entity.
-Entity $B$OCj>]2=$5$l$?%G!<%?I=8=$G!"
-$BA0@a$^$G$K=R$Y$FMh$?(B entity $B$KBP$9$k=hM}$O!"(Bentity $B$KBP$7$F$=$N=hM}$r0M(B
-$BMj$9$k$3$H$K$h$C$F
-mm-backend $B$O(B representation-type $B$NL>A0$N@hF,$K(B
-entity $B$K(B message $B$rAw$k!#(B
+Send message to entity with args, and
+return the result.
-args $B$O(B message $B$N0z?t$G$"$k!#(B
+args is arguments of the message.
-$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9(B (^_^;$B!K(B
+
+Define type as a mm-backend.
-$B!J$H$j$"$($:!"(Bmm*.el $B$r;29M$K$7$F$/$@$5$$!K(B
+If PARENTS is specified, type inherits parents.
+Each parent must be representation-type.
+
+Example:
+
+
+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:
+
+
-Content-Type $BMs$N7A<0$O0J2<$N$h$&$KDj5A$5$l$F$$$^$9!'(B
+Format of Content-Type field is defined as follows:
-$BNc$($P!"(B
+For example:
-$B$3$3$G!"(B`type' $B$H(B `subtype' $B$O(B entity $B$N7A<0$r<($9$b$N$G!"N>
-Content-Type $BMs$N$J$$(B entity $B$O(B
+If an entity does not have Content-Type field, it is regarded as
+following:
-Content-Type $BMs$N>pJs$r3JG<$9$k$?$a$N9=B$BN!#(B
+Structure to store information of a Content-Type field.
-$B$3$N9=B$BN$r;2>H$9$k$K$O(B
-$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'(B
+Slots of the structure are following:
content-type $B$N@8@.;R!#(B
+ Constructor of content-type.
-content-type $B$N(B parameter $B$NCM$rJV$9!#(B
+Return value of parameter of content-type.
-string $B$r(B content-type $B$H$7$F2r@O$7$?7k2L$rJV$9!#(B
+Parse string as a field-body of Content-Type field, and
+return the result as
-$B8=:_$N(B buffer $B$N(B Content-Type $BMs$rFI$_
-Content-Type $BMs$,B8:_$7$J$$>l9g$O(B nil $B$rJV$9!#(B
+Return
Return type/subtype string from type and
subtype.
@@ -530,18 +621,19 @@ Return type/subtype string from type and
-
-FLIM $B$O(B Content-Disposition $BMs$r9=J82r@O$9$k4X?t$H(B Content-Disposition
-$BMs$N2r@O7k2L$r3JG<$9$k9=B$BN(B
-
-Content-Disposition $BMs$N2r@O7k2L$r<}$a$k$?$a$N9=B$BN!#(B
+Structure to store information of a Content-Disposition field.
-$B$3$N9=B$BN$r;2>H$9$k$K$O(B
-$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'(B
+Slots of the structure are following:
-content-disposition $B$N(B parameter $B$NCM$rJV$9!#(B
+Return value of parameter of
+content-disposition.
-content-disposition $B$N(B filename $B$NCM$rJV$9!#(B
+Return filename of content-disposition.
-string $B$r(B content-disposition $B$H$7$F2r@O$7$?7k2L$rJV$9!#(B
+Parse string as field-body of Content-Disposition field,
+and return the result as
-$B8=:_$N(B buffer $B$N(B Content-Disposition $BMs$rFI$_
-Content-Disposition $BMs$,B8:_$7$J$$>l9g$O(B nil $B$rJV$9!#(B
+Return
-
-FLIM $B$G$O(B Content-Transfer-Encoding $BMs$r9=J82r@O$9$k4X?t$rDs6!$7$^$9!#$3(B
-$B$l$i$N4X?t$O(B Content-Transfer-Encoding $BMs$N>pJs$OJ8;zNs$GI=8=$7$^$9!#(B
+FLIM provides parser functions for Content-Transfer-Encoding field.
+They represent information of Content-Transfer-Encoding field as
+string.
-$B$^$?!"(BContent-Transfer-Encoding $B$K4p$E$$$FId9f2=!&I|9f2=$r9T$&4X?t$bDs(B
-$B6!$5$l$^$9!#(B
+In addition, FLIM provides encoder/decoder functions by
+Content-Transfer-Encoding.
-string $B$r(B content-transfer-encoding $B$H$7$F2r@O$7$?7k2L$rJV$9!#(B
+Parse string as a field-body of Content-Transfer-Encoding
+field, and return the result.
-$B8=:_$N(B buffer $B$N(B Content-Transfer-Encoding $BMs$rFI$_
-Alist of encoding vs. corresponding method to encode region.
-
-Each element looks like
-Alist of encoding vs. corresponding method to decode region.
-
-Each element looks like
-string $B$r(B encoding $B$H$7$FI|9f$7$?7k2L$rJV$7$^$9!#(B
+Decode string which is encoded in encoding, and
+return the result.
-Alist of encoding vs. corresponding method to decode string.
-
-Each element looks like
@@ -702,96 +769,182 @@ Decode and write current region encoded by encoding into
start and end are buffer positions.
-Alist of encoding vs. corresponding method to insert encoded file.
+
-Each element looks like
+If service is specified, it returns available list of
+Content-Transfer-Encoding for it.
+
-Alist of encoding vs. corresponding method to write decoded region to
-file.
+Return table of Content-Transfer-Encoding for completion.
-Each element looks like
+
+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:
+
+
+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:
+
+
+
+Define name as a service for Content-Transfer-Encodings.
+
+If args is specified, name is defined as a
+generic function for the service.
+
+Example:
+
+
-encoded-word $B$O(B header $B$GHs(B
-$B$^$?!"9T57$N0-$$$3$H$@$H8@$($^$9$,!"(Bencoded-word $B$rMQ$$$:$KHs(B
-
-FLIM $B$O$3$l$i$rId9f2=!&I|9f2=$9$k5!G=$rDs6!$7$^$9!#(B
+FLIM provides encoding/decoding features of both encoded-word and
+invalid "raw" non-
-
Decode MIME encoded-words in header fields.
-If code-conversion is
-If separator is not nil, it is used as header separator.
+If separator is not
Encode header fields to network representation, such as MIME
encoded-word.
-It refer variable
-
-MIME $B4XO"5!G=$K4X$9$k(B group.
+If METHOD is
-
-$BE,@Z$J(B
-$BK\Mh$O(B APEL $B$NJQ?t$G$"$k!#(B
+Otherwise the FIELD will be encoded as variable
+
-MIME $B5!G=$K4X$9$k
-$B4D6-JQ?t(B
+It belongs to
If you write bug-reports and/or suggestions for improvement, please
-send them to the tm Mailing List:
+send them to the EMACS-MIME Mailing List:
@@ -1148,50 +1301,52 @@ to send backtrace is very important.
-Via the tm ML, you can report FLIM bugs, obtain the latest release of
-FLIM, and discuss future enhancements to FLIM. To join the tm ML,
-send empty e-mail to:
+Via the EMACS-MIME ML, you can report FLIM bugs, obtain the latest
+release of FLIM, and discuss future enhancements to FLIM. To join the
+EMACS-MIME ML, send an empty e-mail to:
-FLIM $B$N(B file $B$O(B CVS $B$r;H$C$F4IM}$5$l$F$$$^$9!#$3$N$?$a!"0J2<$NJ}K!$G:G(B
-$B?7$N(B FLIM $B$rF~
-CVS $B$rMQ$$$?3+H/$K;22C$7$?$$J}$O(B
+If you would like to join CVS based development, please send mail to
+If you cannot use ssh, you can join development via pserver.
+In this case, please send UNIX /etc/passwd style crypted password.
+Then cvsroot is :pserver:(1 2 3)
$B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B
-(3 2 1)
$B$G$9!#(B
-mime-message-structure
$B$K3JG<$9$k$3$H$K$7$^$9!#(B
-$B$=$7$F!"(Bentity-number $B$d(B node-id $B$rMQ$$$k$3$H$G(B
-mime-message-structure
$B$K$*$1$k(B entity $B$NAjBPE*$J0LCV4X78$r(B
-$B07$&$3$H$,$G$-$^$9!#(B
Functions to create mime-entity
@@ -98,26 +65,67 @@ Open an entity and return it.
depended on representation-type.
-
mime-message-structure
of buffer as
mime-entity.
Features about message tree
mime-message-structure
.
+(1 2 3)
.
+(3 2 1)
.
+mime-message-structure
.
+
Find Entity
+
mime-message-structure
is used.
mime-message-structure
is used.
+ Functions about attributes of mime-entity
nil
.
- Text presentation of entity
+
default-mime-charset
.
default-mime-charset
is
+used as default value.
+ Contents of Entity
Network representation of Entity
+
Entity representations and implementations
mm
$B$H$$$&(B
-$B@\F,<-$rIU$1$?4X?tL>$+$i$J$k(B module $B$G!"$=$N(B module $BL>$OF1MM$K(B
-representation-type $B$NL>A0$N@hF,$K(B mm
$B$rIU$1$?$b$N$K$J$C$F(B
-$B$$$^$9!#$3$N(B module $B$O(B representation-type $B$N(B entity $B$,:G=i$K@8@.$5$l$k(B
-$B;~$K<+F0E*$K(B require $B$5$l$^$9!#(B
+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.
Message-passing for entity
@@ -381,18 +443,49 @@ representation-type $B$NL>A0$N@hF,$K(B
mm
$B$rIU$1$?$b$N$K$J$C$F
How to make mm-backend
+
Definition of mm-backend
Information of Content-Type field
@@ -418,14 +511,14 @@ Content-Type field.
Format of Content-Type field
``Content-Type'' ``:''
-
-
-
mime-content-type-$BMWAGL>(B
$B$H$$$&L>(B
-$BA0$N;2>H4X?t$rMQ$$$k!#(B
+Applications should use reference functions
+mime-content-type-SLOT
to refer information of the
+structure.
nil
if Content-Type field is not found.
Information of Content-Disposition field
mime-content-disposition structure
@@ -549,17 +641,19 @@ FLIM $B$O(B Content-Disposition $BMs$r9=J82r@O$9$k4X?t$H(B Content-Dispositi
mime-content-disposition-$BMWAGL>(B
$B$H(B
-$B$$$&L>A0$N;2>H4X?t$rMQ$$$k!#(B
+Applications should use reference functions
+mime-content-disposition-SLOT
to refer information of the
+structure.
nil
if Content-Disposition field is not found.
Encoding Method
Parser
nil
is used as the
+default value.
Region encoding/decoding
-
Encoder/decoder
+
(STRING . FUNCTION)
or
-(STRING . nil)
. string is
-content-transfer-encoding. function
is region encoder
-and nil
means not to encode.
-(STRING . FUNCTION)
or
-(STRING . nil)
. string is
-content-transfer-encoding. function
is region decoder
-and nil
means not to decode.
- String encoding/decoding
-
(STRING . FUNCTION)
.
-STRING is content-transfer-encoding.
-FUNCTION is string decoder.
- File encoding/decoding
-
Other utilities
+
(STRING . FUNCTION)
. STRING is
-content-transfer-encoding. FUNCTION is function to insert encoded
-file.
-(STRING . FUNCTION)
. STRING is
-content-transfer-encoding. FUNCTION is function to write decoded
-region to file.
- How to write encoder/decoder module
+
How to add encoding/decoding service
+
Network representation of header
Header encoding/decoding
nil
, it decodes only
-encoded-words. If it is mime-charset, it decodes non-ASCII bit
-patterns as the mime-charset. Otherwise it decodes non-ASCII bit
-patterns as the default-mime-charset.
+If code-conversion is nil
, only encoded-words
+are decoded. If code-conversion is a default-mime-charset
. nil
, it is used as header
+separator.
eword-field-encoding-method-alist
.
+Each field is encoded as corresponding method specified by variable
+mime-field-encoding-method-alist
.
Various Customization
-
mime
, the FIELD will be encoded into MIME
+format (encoded-word).
mail
$B$H(B news
$B$KB0$9$k!#(B
-nil
, the FIELD will not be encoded.
default-mime-charset
when it must be convert into
+network-code.
Various Customization
+
MIME_TMP_DIR
, TM_TMP_DIR
,
-TMPDIR
, TMP
$B$b$7$/$O(B TEMP
$B$,@_Dj(B
-$B$5$l$F$$$?>l9g!"$=$l$r=i4|CM$H$7$FMQ$$$k!#2?$b@_Dj$5$l$F$$$J$$>l9g!"(B
-"/tmp/"
$B$rMQ$$$k!#(B
-mail
and news
.
+
Appendix
@@ -1127,11 +1280,11 @@ be interpreted as us-ascii.
-
-
CVS based development
-
History of FLIM