1 FLIM (Faithful Library about Internet Message) API
7 Each function is described by following notation:
9 [Function] NAME-OF-FUNCTION (SIGNATURE)
13 Each inline function is described by following notation:
15 [Inline function] NAME-OF-FUNCTION (SIGNATURE)
19 Each macro is described by following notation:
21 [Macro] NAME-OF-MACRO (SIGNATURE)
25 Each variable is described by following notation:
27 [Variable] NAME-OF-VARIABLE
31 ILEVEL specifies implementation level:
33 Required: Must implement
34 Suggest: Should implement
37 ULEVEL specifies implementation level:
40 Not Suggest: Should not use
41 Obsolete: Should not use (historical)
51 ** MIME-Entity Creation
53 [Function] mime-open-entity (type location)
54 Open an entity and return it.
56 TYPE is representation-type.
58 LOCATION is location of entity. Specification of it is depended on
62 (Usage: SEMI 1.14 MIME-View)
65 [Function] mime-parse-buffer (&optional buffer representation-type)
66 Parse BUFFER as a MIME message.
68 If buffer is omitted, it parses current-buffer.
70 [Optional]<Not Suggest>
73 ** MIME-Entity Hierarchy
75 [Function] mime-entity-children (entity)
76 Return list of entities included in the ENTITY.
79 (Usage: SEMI 1.14 MIME-View, MIME-PGP)
82 [Function] mime-entity-parent (entity &optional message)
83 Return mother entity of ENTITY.
85 If MESSAGE is specified, it is regarded as root entity.
88 (Usage: SEMI 1.14 MIME-View, MIME-PGP)
91 [Function] mime-find-root-entity (entity)
92 Return root entity of ENTITY.
97 [Function] mime-root-entity-p (entity &optional message)
98 Return t if ENTITY is root-entity (message).
100 If MESSAGE is specified, it is regarded as root entity.
105 [Function] mime-entity-node-id (entity)
106 Return node-id of ENTITY.
109 (Usage: SEMI 1.14 MIME-View, MIME-PGP)
112 [Function] mime-entity-number (entity)
113 Return entity-number of ENTITY.
116 (Usage: SEMI 1.14 MIME-View, MIME-PGP)
119 ** MIME-Entity Search
121 [Function] mime-find-entity-from-node-id (entity-node-id message)
122 Return entity from ENTITY-NODE-ID in MESSAGE.
127 [Function] mime-find-entity-from-number (entity-number message)
128 Return entity from ENTITY-NUMBER in MESSAGE.
133 [Function] mime-find-entity-from-content-id (cid message)
134 Return entity from CID in MESSAGE.
139 ** MIME-Entity Attributes
141 [Function] mime-entity-content-type (entity)
142 Return content-type of ENTITY.
144 (cf. <** Content-Type>)
147 (Usage: SEMI 1.14 MIME-View)
150 [Inline function] mime-entity-media-type (entity)
151 Return primary media-type of ENTITY.
153 [Suggest]<Not Suggest>
154 (Usage: SEMI 1.14 MIME-View)
157 [Inline function] mime-entity-media-subtype (entity)
158 Return media-subtype of ENTITY.
160 [Suggest]<Not Suggest>
161 (Usage: SEMI 1.14 MIME-View)
164 [Inline function] mime-entity-type/subtype (entity)
165 Return media-type/subtype of ENTITY.
168 (Usage: SEMI 1.14 MIME-W3)
171 [Inline function] mime-entity-parameters (entity)
172 Return parameters of Content-Type of ENTITY.
174 [Suggest]<Not Suggest>
175 (Usage: SEMI 1.14 MIME-View)
178 [Function] mime-entity-set-content-type (entity content-type)
179 Set ENTITY's content-type to CONTENT-TYPE.
181 (cf. <** Content-Type>)
184 (Usage: SEMI 1.14 MIME-View)
187 [Function] mime-entity-content-disposition (entity)
188 Return content-disposition of ENTITY.
190 (cf. <** Content-Disposition>)
193 (Usage: SEMI 1.14 MIME-View)
196 [Function] mime-entity-filename (entity)
197 Return filename of ENTITY.
200 (Usage: SEMI 1.14 MIME-View)
203 [Function] mime-entity-encoding (entity &optional default-encoding)
204 Return content-transfer-encoding of ENTITY.
206 If the ENTITY does not have Content-Transfer-Encoding field, this
207 function returns DEFAULT-ENCODING. If it is nil, "7bit" is used as
211 (Usage: SEMI 1.14 MIME-View)
214 [Function] mime-entity-set-encoding (entity encoding)
215 Set ENTITY's content-transfer-encoding to ENCODING.
218 (Usage: SEMI 1.14 MIME-View)
221 [Function] mime-entity-cooked-p (entity)
222 Return non-nil if contents of ENTITY has been already
226 (Usage: SEMI 1.14 MIME-PGP)
229 [Function] mime-entity-name (entity)
230 Return unique name of the ENTITY.
233 (Usage: SEMI 1.14 MIME-View)
236 ** MIME-Entity Header
238 [Function] mime-entity-fetch-field (entity field-name)
239 Return the value of the ENTITY's header field whose type is
242 The results is network representation.
244 If FIELD-NAME field is not found, this function returns nil.
247 (Usage: SEMI 1.14 MIME-View, MIME-BBDB)
250 [Function] mime-entity-read-field (entity field-name)
251 Parse FIELD-NAME field in header of ENTITY, and return the result.
253 Format of result is depended on kind of field. For non-structured
254 field, this function returns string. For structured field, it
255 returns list corresponding with structure of the field.
257 Strings in the result will be converted to internal representation
260 If FIELD-NAME field is not found, this function returns nil.
263 (Usage: SEMI 1.14 MIME-View, MIME-BBDB)
266 ** Text Presentation of MIME-Entity Content
268 [Function] mime-insert-header (entity &optional invisible-fields
270 Insert before point a decoded header of ENTITY.
272 INVISIBLE-FIELDS is list of regexps to match field-name to hide.
273 VISIBLE-FIELDS is list of regexps to match field-name to hide.
275 If a field-name is matched with some elements of INVISIBLE-FIELDS
276 and matched with none of VISIBLE-FIELDS, this function don't insert
279 Each encoded-word in the header is decoded. ``Raw non us-ascii
280 characters'' are also decoded as `default-mime-charset'.
285 [Function] mime-insert-text-content (entity)
286 Insert before point a contents of ENTITY as text entity.
288 Contents of the ENTITY are decoded as MIME charset. If the ENTITY
289 does not have charset parameter of Content-Type field,
290 `default-mime-charset' is used as default value.
295 [Variable] default-mime-charset
296 Symbol to indicate default value of MIME charset.
298 It is used when MIME charset is not specified.
300 It is originally variable of APEL.
305 ** Bytes Representation of MIME-Entity Content
307 [Function] mime-entity-content (entity)
308 Return content of ENTITY as byte sequence (string).
311 (Usage: SEMI 1.14 MIME-View, Postpet)
314 [Function] mime-insert-entity-content (entity)
315 Insert content of ENTITY (byte sequence) at point.
320 [Function] mime-write-entity-content (entity filename)
321 Write content of ENTITY (byte sequence) into FILENAME.
326 ** Network Representation of MIME-Entity
328 [Function] mime-entity-string (entity)
329 Return header and body of ENTITY (string).
331 [Optional]<Not Suggest>
334 [Function] mime-insert-entity (entity)
335 Insert header and body of ENTITY at point.
340 [Function] mime-write-entity (entity filename)
341 Write header and body of ENTITY into FILENAME.
346 [Function] mime-entity-header (entity)
347 Return network representation of ENTITY header (string).
349 [Optional]<Not Suggest>
352 [Function] mime-insert-entity-header (entity)
353 Insert network representation of ENTITY header at point.
355 [Optional]<Not Suggest>
358 [Function] mime-write-entity-header (entity filename)
359 Write network representation of ENTITY header FILENAME.
361 [Optional]<Not Suggest>
364 [Function] mime-entity-body (entity)
365 Return network representation of ENTITY body (string).
367 [Optional]<Not Suggest>
370 [Function] mime-insert-entity-body (entity)
371 Insert network representation of ENTITY body at point.
376 [Function] mime-write-entity-body (entity filename)
377 Write body of ENTITY into FILENAME.
382 * MIME content information
391 [Function] mime-parse-Content-Type (string)
392 Parse STRING as field-body of Content-Type field, and
393 return the result as `mime-content-type' structure.
398 [Function] mime-read-Content-Type ()
399 Read field-body of Content-Type field from current-buffer,
400 and return the parsed result.
402 Format of return value is as same as `mime-parse-Content-Type'.
404 Return `nil' if Content-Type field is not found.
409 [Inline function] mime-content-type-primary-type (content-type)
410 Return primary-type of CONTENT-TYPE.
415 [Inline function] mime-content-type-subtype (content-type)
416 Return subtype of CONTENT-TYPE.
421 [Inline function] mime-content-type-parameter (content-type parameter)
422 Return PARAMETER value of CONTENT-TYPE.
427 [Inline function] mime-content-type-parameters (content-type)
428 Return parameters of CONTENT-TYPE.
433 [Inline function] mime-type/subtype-string (type &optional subtype)
434 Return type/subtype string from TYPE and SUBTYPE.
439 ** Content-Disposition
441 [Function] mime-parse-Content-Disposition (string)
442 Parse STRING as field-body of Content-Disposition field.
447 [Function] mime-read-Content-Disposition ()
448 Read field-body of Content-Disposition field from current-buffer,
449 and return parsed it.
454 [Inline function] mime-content-disposition-type (content-disposition)
455 Return disposition-type of CONTENT-DISPOSITION.
460 [Inline function] mime-content-disposition-parameter
461 (content-disposition parameter)
462 Return PARAMETER value of CONTENT-DISPOSITION.
467 [Inline function] mime-content-disposition-filename (content-disposition)
468 Return filename of CONTENT-DISPOSITION.
473 [Inline function] mime-content-disposition-parameters (content-disposition)
474 Return disposition-parameters of CONTENT-DISPOSITION.
488 [Function] mime-decode-header-in-buffer (&optional code-conversion
490 Decode MIME encoded-words in header fields.
492 If CODE-CONVERSION is nil, it decodes only encoded-words. If it is
493 mime-charset, it decodes non-ASCII bit patterns as the mime-charset.
494 Otherwise it decodes non-ASCII bit patterns as the
495 default-mime-charset.
497 If SEPARATOR is not nil, it is used as header separator.
502 [Function] eword-decode-header (&optional code-conversion separator)
503 As same as `mime-decode-header-in-buffer', q.v.
507 (require 'eword-decode)
509 is necessary to use this function.
511 [Optional]<Obsolete> (Usage: cmail 2.61)
514 [Function] mime-decode-header-in-region (start end
515 &optional code-conversion)
516 Decode MIME encoded-words in region between START and END.
518 If CODE-CONVERSION is nil, it decodes only encoded-words. If it is
519 mime-charset, it decodes non-ASCII bit patterns as the mime-charset.
520 Otherwise it decodes non-ASCII bit patterns as the
521 default-mime-charset.
526 [Function] mime-decode-field-body (field-body field-name
527 &optional mode max-column)
528 Decode FIELD-BODY as FIELD-NAME in MODE, and return the result.
530 Optional argument MODE must be `plain', `wide', `summary' or `nov'.
531 Default mode is `summary'.
533 If MODE is `wide' and MAX-COLUMN is non-nil, the result is folded
536 Non MIME encoded-word part in FILED-BODY is decoded with
537 `default-mime-charset'.
542 [Function] mime-set-field-decoder (field &rest specs)
543 Set decoder of FIELD.
545 SPECS must be like `MODE1 DECODER1 MODE2 DECODER2 ...'.
547 Each mode must be `nil', `plain', `wide', `summary' or `nov'. If
548 mode is `nil', corresponding decoder is set up for every modes.
553 [Macro] mime-find-field-presentation-method (name)
554 Return field-presentation-method from NAME.
556 NAME must be `plain', `wide', `summary' or `nov'.
561 [Function] mime-find-field-decoder (field &optional mode)
562 Return function to decode field-body of FIELD in MODE.
564 Optional argument MODE must be object or name of
565 field-presentation-method. Name of field-presentation-method must
566 be `plain', `wide', `summary' or `nov'. Default value of MODE is
572 [Function] mime-update-field-decoder-cache (field mode &optional function)
573 Update field decoder cache `mime-field-decoder-cache'.
580 [Function] mime-encode-header-in-buffer (&optional code-conversion)
581 Encode header fields to network representation, such as MIME
584 It refer variable `mime-field-encoding-method-alist'.
589 [Function] mime-encode-field-body (field-body field-name)
590 Encode FIELD-BODY as FIELD-NAME, and return the result.
592 A lexical token includes non-ASCII character is encoded as MIME
593 encoded-word. ASCII token is not encoded.
598 * Content-Transfer-Encoding
607 [Variable] mime-encoding-list
608 List of Content-Transfer-Encoding. Each encoding must be string.
613 [Function] mime-encoding-list (&optional service)
614 Return list of Content-Transfer-Encoding.
616 If SERVICE is specified, it returns available list of
617 Content-Transfer-Encoding for it.
622 [Function] mime-encoding-alist (&optional service)
623 Return table of Content-Transfer-Encoding for completion.
630 [Function] mime-decode-string (string encoding)
631 Decode STRING using ENCODING.
633 ENCODING must be string. If ENCODING is found in
634 `mime-encoding-list', this function decodes the STRING by its value.
639 [Function] mime-encode-string (string encoding)
640 Encode STRING using ENCODING.
642 ENCODING must be string.
647 [Function] base64-decode-string (STRING)
648 Base64-decode STRING and return the result.
653 [Function] base64-encode-string (STRING &optional NO-LINE-BREAK)
654 Base64-encode STRING and return the result.
656 Optional second argument NO-LINE-BREAK means do not break long lines
664 [Command] mime-write-decoded-region (start end filename encoding)
665 Decode and write current region encoded by ENCODING into FILENAME.
667 START and END are buffer positions.
672 [Command] mime-insert-encoded-file (filename encoding)
673 Insert file FILENAME encoded by ENCODING format.
678 [Command] 7bit-write-decoded-region (start end filename)
679 Decode and write current region encoded by "7bit" into FILENAME.
681 START and END are buffer positions.
686 [Command] 7bit-insert-encoded-file (filename)
687 Insert file FILENAME encoded by "7bit" format.
692 [Command] 8bit-write-decoded-region (start end filename)
693 Decode and write current region encoded by "8bit" into FILENAME.
695 START and END are buffer positions.
700 [Command] 8bit-insert-encoded-file (filename)
701 Insert file FILENAME encoded by "8bit" format.
706 [Command] binary-write-decoded-region (start end filename)
707 Decode and write current region encoded by "binary" into FILENAME.
709 START and END are buffer positions.
714 [Command] binary-insert-encoded-file (filename)
715 Insert file FILENAME encoded by "binary" format.
720 [Command] base64-write-decoded-region (start end filename)
721 Decode and write current region encoded by "base64" into FILENAME.
723 START and END are buffer positions.
728 [Command] base64-insert-encoded-file (filename)
729 Insert file FILENAME encoded by "base64" format.
734 [Command] quoted-printable-write-decoded-region (start end filename)
735 Decode and write current region encoded by "quoted-printable" into
738 START and END are buffer positions.
743 [Command] quoted-printable-insert-encoded-file (filename)
744 Insert file FILENAME encoded by "quoted-printable" format.
751 [Command] mime-decode-region (start end encoding)
752 Decode region START to END of current buffer using ENCODING.
754 ENCODING must be string.
756 [Suggest]<Not Suggest>
759 [Command] mime-encode-region (start end encoding)
760 Encode region START to END of current buffer using ENCODING.
762 ENCODING must be string.
764 [Suggest]<Not Suggest>
767 [Command] base64-decode-region (BEG END)
768 Base64-decode the region between BEG and END.
770 Return the length of the decoded text.
772 If the region can't be decoded, return nil and don't modify the
775 [Suggest]<Not Suggest>
778 [Command] base64-encode-region (BEG END &optional NO-LINE-BREAK)
779 Base64-encode the region between BEG and END.
781 Return the length of the encoded text.
783 Optional third argument NO-LINE-BREAK means do not break long lines
786 [Suggest]<Not Suggest>
791 [Function] encoded-text-decode-string (string encoding)
792 Decode STRING as encoded-text using ENCODING.
794 ENCODING must be string.
799 [Function] encoded-text-encode-string (string encoding &optional mode)
800 Encode STRING as encoded-text using ENCODING.
802 ENCODING must be string.
804 MODE allows `text', `comment', `phrase' or nil. Default value is
810 [Function] base64-encoded-length (string)
811 Return length of B-encoded STRING.
816 [Function] Q-encoded-text-length (string &optional mode)
817 Return length of Q-encoded STRING.
819 MODE allows `text', `comment', `phrase' or nil. Default value is
834 [Function] mime-parse-mailcap-buffer (&optional buffer order)
835 Parse BUFFER as a mailcap, and return the result.
837 If optional argument ORDER is a function, result is sorted by it.
838 If optional argument ORDER is not specified, result is sorted
839 original order. Otherwise result is not sorted.
844 [Variable] mime-mailcap-file
845 File name of user's mailcap file.
847 [Required]<Suggest> (default value may be "~/.mailcap")
850 [Function] mime-parse-mailcap-file (&optional filename order)
851 Parse FILENAME as a mailcap, and return the result.
853 If optional argument ORDER is a function, result is sorted by it.
854 If optional argument ORDER is not specified, result is sorted
855 original order. Otherwise result is not sorted.
862 [Function] mime-format-mailcap-command (mtext situation)
863 Return formated command string from MTEXT and SITUATION.
865 MTEXT is a command text of mailcap specification, such as
868 SITUATION is an association-list about information of entity. Its
871 'type primary media-type
872 'subtype media-subtype
874 STRING parameter of Content-Type field
888 [Variable] mime-field-parser-alist
889 Alist to specify field parser.
894 [Function] mime-parse-msg-id (tokens)
895 Parse TOKENS as msg-id of Content-Id or Message-Id field.
900 [Function] mime-uri-parse-cid (string)
901 Parse STRING as cid URI.
906 [Function] mime-parse-Content-Transfer-Encoding (string)
907 Parse STRING as field-body of Content-Transfer-Encoding field.
912 [Function] mime-read-Content-Transfer-Encoding (&optional default-encoding)
913 Read field-body of Content-Transfer-Encoding field from
914 current-buffer, and return it.
916 If is is not found, return DEFAULT-ENCODING.
930 [Function] std11-narrow-to-header (&optional boundary)
931 Narrow to the message header.
933 If BOUNDARY is not nil, it is used as message header separator.
940 [Function] std11-fetch-field (name)
941 Return the value of the header field NAME.
943 The buffer is expected to be narrowed to just the headers of the
949 [Function] std11-field-body (name &optional boundary)
950 Return the value of the header field NAME.
952 If BOUNDARY is not nil, it is used as message header separator.
957 [Function] std11-unfold-string (string)
958 Unfold STRING as message header field.
965 [Function] std11-lexical-analyze (string &optional analyzer start)
966 Analyze STRING as lexical tokens of STD 11.
973 [Function] std11-address-string (address)
974 Return string of address part from parsed ADDRESS of RFC 822.
979 [Function] std11-full-name-string (address)
980 Return string of full-name part from parsed ADDRESS of RFC 822.
985 [Function] std11-parse-address-string (string)
986 Parse STRING as mail address.
991 [Function] std11-parse-addresses-string (string)
992 Parse STRING as mail address list.
997 [Function] std11-extract-address-components (string)
998 Extract full name and canonical address from STRING.
1000 Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). If no
1001 name can be extracted, FULL-NAME will be nil.
1008 [Function] std11-msg-id-string (msg-id)
1009 Return string from parsed MSG-ID of RFC 822.
1014 [Function] std11-parse-msg-id-string (string)
1015 Parse STRING as msg-id.
1020 [Function] std11-parse-msg-ids-string (string)
1021 Parse STRING as `*(phrase / msg-id)'.
1026 [Function] std11-fill-msg-id-list-string (string &optional column)
1027 Fill list of msg-id in STRING, and return the result.
1041 [Function] smtp-send-buffer (sender recipients buffer)
1044 SENDER is an envelope sender address.
1045 RECIPIENTS is a list of envelope recipient addresses.
1046 BUFFER may be a buffer or a buffer name which contains mail message.
1051 [Function] smtp-via-smtp (sender recipients buffer)
1052 Like `smtp-send-buffer', but sucks in any errors.
1054 [Optional]<Not Suggest>