update.
[elisp/flim.git] / FLIM-1.14-API.en
1 * MIME entity
2
3 ** How to use
4
5 (require 'mime)
6
7
8 ** Level 1 features
9
10 [Function] mime-open-entity (type location)
11   Open an entity and return it.
12
13 TYPE is representation-type.
14
15 LOCATION is location of entity.  Specification of it is depended on
16 representation-type.
17
18
19 [Function] mime-entity-children (entity)
20   Return list of entities included in the ENTITY.
21
22
23 [Function] mime-entity-node-id (entity)
24   Return node-id of ENTITY.
25
26
27 [Function] mime-find-entity-from-node-id (entity-node-id message)
28   Return entity from ENTITY-NODE-ID in MESSAGE.
29   (mime-find-entity-from-number (reverse entity-node-id) message))
30
31
32 [Function] mime-find-entity-from-content-id (cid message)
33   Return entity from CID in MESSAGE.
34
35
36 [Function] mime-insert-entity (entity)
37   Insert header and body of ENTITY at point.
38
39
40 [Function] mime-write-entity (entity filename)
41   Write header and body of ENTITY into FILENAME.
42
43
44 [Function] mime-entity-body (entity)
45   Return network representation of ENTITY body.
46
47
48 [Function] mime-insert-entity-body (entity)
49   Insert network representation of ENTITY body at point.
50
51
52 [Function] mime-write-entity-body (entity filename)
53   Write body of ENTITY into FILENAME.
54
55
56 [Function] mime-entity-content (entity)
57   Return content of ENTITY as byte sequence (string).
58
59
60 [Function] mime-insert-entity-content (entity)
61   Insert content of ENTITY at point.
62
63
64 [Function] mime-write-entity-content (entity filename)
65   Write content of ENTITY into FILENAME.
66
67
68 [Function] mime-insert-text-content (entity)
69   Insert decoded text body of ENTITY.
70
71
72 [Function] mime-entity-fetch-field (entity field-name)
73   Return the value of the ENTITY's header field whose type is
74 FIELD-NAME.
75
76
77 ** Level 2 features
78
79 [Function] mime-entity-content-type (entity)
80   Return content-type of ENTITY.
81
82
83 [Function] mime-entity-content-disposition (entity)
84   Return content-disposition of ENTITY.
85
86
87 [Function] mime-entity-encoding (entity &optional default-encoding)
88   Return content-transfer-encoding of ENTITY.
89
90 If the ENTITY does not have Content-Transfer-Encoding field, this
91 function returns DEFAULT-ENCODING.  If it is nil, "7bit" is used as
92 default value.
93
94
95 [Function] mime-entity-number (entity)
96   Return entity-number of ENTITY.
97   (reverse (mime-entity-node-id-internal entity)))
98
99
100 [Function] mime-entity-parent (entity &optional message)
101   Return mother entity of ENTITY.
102
103 If MESSAGE is specified, it is regarded as root entity.
104
105
106 [Function] mime-root-entity-p (entity &optional message)
107   Return t if ENTITY is root-entity (message).
108
109 If MESSAGE is specified, it is regarded as root entity.
110
111
112 [Function] mime-find-root-entity (entity)
113   Return root entity of ENTITY.
114
115
116 [Function] mime-entity-read-field (entity field-name)
117   Parse FIELD-NAME field in header of ENTITY, and return the result.
118
119 Format of result is depended on kind of field.  For non-structured
120 field, this function returns string.  For structured field, it returns
121 list corresponding with structure of the field.
122
123 Strings in the result will be converted to internal representation of
124 Emacs.
125
126 If FIELD-NAME field is not found, this function returns nil.
127
128
129 [Function] mime-insert-header (entity &optional invisible-fields
130                                                 visible-fields)
131   Insert before point a decoded header of ENTITY.
132
133
134 [Function] mime-entity-name (entity)
135   Return name of the ENTITY.
136
137
138 [Function] mime-entity-filename (entity)
139   Return filename of ENTITY.
140
141
142 ** Level 3 features
143
144 [Function] mime-entity-cooked-p (entity)
145   Return non-nil if contents of ENTITY has been already
146   code-converted.
147
148 [Function] mime-entity-set-content-type (entity content-type)
149   Set ENTITY's content-type to CONTENT-TYPE.
150
151
152 [Function] mime-entity-set-encoding (entity encoding)
153   Set ENTITY's content-transfer-encoding to ENCODING.
154
155
156 * encoded-word decoder
157
158 ** How to use
159
160 (require 'mime)
161
162
163 ** Level 1 features
164
165 [Function] mime-decode-header-in-buffer (&optional code-conversion separator)
166   Decode MIME encoded-words in header fields.
167
168 If CODE-CONVERSION is nil, it decodes only encoded-words.  If it is
169 mime-charset, it decodes non-ASCII bit patterns as the mime-charset.
170 Otherwise it decodes non-ASCII bit patterns as the
171 default-mime-charset.
172
173 If SEPARATOR is not nil, it is used as header separator.
174
175
176 [Function] mime-decode-header-in-region (start end
177                                          &optional code-conversion)
178   Decode MIME encoded-words in region between START and END.
179
180 If CODE-CONVERSION is nil, it decodes only encoded-words.  If it is
181 mime-charset, it decodes non-ASCII bit patterns as the mime-charset.
182 Otherwise it decodes non-ASCII bit patterns as the
183 default-mime-charset.
184
185
186 [Function] mime-decode-field-body (field-body field-name
187                                    &optional mode max-column)
188   Decode FIELD-BODY as FIELD-NAME in MODE, and return the result.
189
190 Optional argument MODE must be `plain', `wide', `summary' or `nov'.
191 Default mode is `summary'.
192
193 If MODE is `wide' and MAX-COLUMN is non-nil, the result is folded with
194 MAX-COLUMN.
195
196 Non MIME encoded-word part in FILED-BODY is decoded with
197 `default-mime-charset'.
198
199
200 ** Level 2 features
201
202 [Function] mime-set-field-decoder (field &rest specs)
203   Set decoder of FIELD.
204
205 SPECS must be like `MODE1 DECODER1 MODE2 DECODER2 ...'.
206
207 Each mode must be `nil', `plain', `wide', `summary' or `nov'.
208 If mode is `nil', corresponding decoder is set up for every modes.
209
210
211 [Macro] mime-find-field-presentation-method (name)
212   Return field-presentation-method from NAME.
213
214 NAME must be `plain', `wide', `summary' or `nov'.
215
216
217 [Function] mime-find-field-decoder (field &optional mode)
218   Return function to decode field-body of FIELD in MODE.
219
220 Optional argument MODE must be object or name of
221 field-presentation-method.  Name of field-presentation-method must be
222 `plain', `wide', `summary' or `nov'.
223 Default value of MODE is `summary'.
224
225
226 [Function] mime-update-field-decoder-cache (field mode &optional function)
227   Update field decoder cache `mime-field-decoder-cache'.
228
229
230 * encoded-word encoder
231
232 ** How to use
233
234 (require 'mime)
235
236
237 ** Level 1 features
238
239 [Function] mime-encode-header-in-buffer (&optional code-conversion)
240   Encode header fields to network representation, such as MIME encoded-word.
241
242 It refer variable `mime-field-encoding-method-alist'.
243
244
245 [Function] mime-encode-field-body (field-body field-name)
246   Encode FIELD-BODY as FIELD-NAME, and return the result.
247
248 A lexical token includes non-ASCII character is encoded as MIME
249 encoded-word.  ASCII token is not encoded.
250
251
252 * Content-Transfer-Encoding
253
254 ** How to use
255
256 (require 'mel)
257
258
259 ** Level 1 features
260
261 [Function] mime-encode-region (start end encoding)
262   Encode region START to END of current buffer using ENCODING.
263
264 ENCODING must be string.
265
266
267 [Function] mime-decode-region (start end encoding)
268   Decode region START to END of current buffer using ENCODING.
269
270 ENCODING must be string.
271
272
273 [Function] mime-decode-string (string encoding)
274   Decode STRING using ENCODING.
275
276 ENCODING must be string.  If ENCODING is found in
277 `mime-string-decoding-method-alist' as its key, this function decodes
278 the STRING by its value.
279
280
281 [Function] mime-insert-encoded-file (filename encoding)
282   Insert file FILENAME encoded by ENCODING format.
283
284
285 [Function] mime-write-decoded-region (start end filename encoding)
286   Decode and write current region encoded by ENCODING into FILENAME.
287
288 START and END are buffer positions.
289
290
291 * Mailcap
292
293 ** How to use
294
295 (require 'mime-conf)
296
297
298 ** Level 1 features
299
300 [Function] mime-parse-mailcap-buffer (&optional buffer order)
301   Parse BUFFER as a mailcap, and return the result.
302
303 If optional argument ORDER is a function, result is sorted by it.
304 If optional argument ORDER is not specified, result is sorted original
305 order.  Otherwise result is not sorted.
306
307
308 [Variable] mime-mailcap-file (default value is "~/.mailcap")
309   File name of user's mailcap file.
310
311
312 [Function] mime-parse-mailcap-file (&optional filename order)
313   Parse FILENAME as a mailcap, and return the result.
314
315 If optional argument ORDER is a function, result is sorted by it.
316 If optional argument ORDER is not specified, result is sorted original
317 order.  Otherwise result is not sorted.
318
319
320 [Function] mime-format-mailcap-command (mtext situation)
321   Return formated command string from MTEXT and SITUATION.
322
323 MTEXT is a command text of mailcap specification, such as
324 view-command.
325
326 SITUATION is an association-list about information of entity.  Its key
327 may be:
328
329         'type           primary media-type
330         'subtype        media-subtype
331         'filename       filename
332         STRING          parameter of Content-Type field
333
334
335 * MIME Field parsing
336
337 ** How to use
338
339 (require 'mime)
340
341
342 ** Level 2 features
343
344 [Variable] mime-field-parser-alist
345   Alist to specify field parser.
346
347
348 [Function] mime-parse-Content-Type (string)
349   Parse STRING as field-body of Content-Type field.
350
351 Return value is
352     (PRIMARY-TYPE SUBTYPE (NAME1 . VALUE1)(NAME2 . VALUE2) ...)
353 or nil.  PRIMARY-TYPE and SUBTYPE are symbol and NAME_n and VALUE_n
354 are string.
355
356
357 [Function] mime-read-Content-Type ()
358   Read field-body of Content-Type field from current-buffer,
359 and return parsed it.  Format of return value is as same as
360 `mime-parse-Content-Type'.
361
362
363 [Function] mime-parse-Content-Disposition (string)
364   Parse STRING as field-body of Content-Disposition field.
365
366
367 [Function] mime-read-Content-Disposition ()
368   Read field-body of Content-Disposition field from current-buffer,
369 and return parsed it.
370
371
372 [Function] mime-parse-Content-Transfer-Encoding (string)
373   Parse STRING as field-body of Content-Transfer-Encoding field.
374
375
376 [Function] mime-read-Content-Transfer-Encoding (&optional default-encoding)
377   Read field-body of Content-Transfer-Encoding field from
378 current-buffer, and return it.
379
380 If is is not found, return DEFAULT-ENCODING.
381
382
383 [Function] mime-parse-msg-id (tokens)
384   Parse TOKENS as msg-id of Content-Id or Message-Id field.
385
386
387 [Function] mime-uri-parse-cid (string)
388   Parse STRING as cid URI.
389
390
391 * MIME message parsing
392
393 ** How to use
394
395 (require 'mime)
396
397
398 ** Level 3 features
399
400 [Function] mime-parse-buffer (&optional buffer representation-type)
401   Parse BUFFER as a MIME message.
402
403 If buffer is omitted, it parses current-buffer.
404
405
406 * STD 11 parsing
407
408 ** How to use
409
410 (require 'std11)
411
412
413 ** Level 1 features
414
415 [Function] std11-fetch-field (name)
416   Return the value of the header field NAME.
417
418 The buffer is expected to be narrowed to just the headers of the message.
419
420
421 [Function] std11-narrow-to-header (&optional boundary)
422   Narrow to the message header.
423
424 If BOUNDARY is not nil, it is used as message header separator.
425
426
427 [Function] std11-field-body (name &optional boundary)
428   Return the value of the header field NAME.
429
430 If BOUNDARY is not nil, it is used as message header separator.
431
432
433 [Function] std11-unfold-string (string)
434   Unfold STRING as message header field.
435
436
437 ** Level 2 features
438
439 [Function] std11-lexical-analyze (string &optional analyzer start)
440   Analyze STRING as lexical tokens of STD 11.
441
442
443 [Function] std11-address-string (address)
444   Return string of address part from parsed ADDRESS of RFC 822.
445
446
447 [Function] std11-full-name-string (address)
448   Return string of full-name part from parsed ADDRESS of RFC 822.
449
450
451 [Function] std11-msg-id-string (msg-id)
452   Return string from parsed MSG-ID of RFC 822.
453
454
455 [Function] std11-fill-msg-id-list-string (string &optional column)
456   Fill list of msg-id in STRING, and return the result.
457
458
459 [Function] std11-parse-address-string (string)
460   Parse STRING as mail address.
461
462
463 [Function] std11-parse-addresses-string (string)
464   Parse STRING as mail address list.
465
466
467 [Function] std11-parse-msg-id-string (string)
468   Parse STRING as msg-id.
469
470
471 [Function] std11-parse-msg-ids-string (string)
472   Parse STRING as `*(phrase / msg-id)'.
473
474
475 [Function] std11-extract-address-components (string)
476   Extract full name and canonical address from STRING.
477
478 Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
479 If no name can be extracted, FULL-NAME will be nil.
480
481
482 * SMTP
483
484 ** How to use
485
486 (require 'smtp)
487
488
489 ** Level 1 features
490
491 [Function] smtp-send-buffer (sender recipients buffer)
492
493
494 * QMTP
495
496 ** How to use
497
498 (require 'qmtp)
499
500
501 ** Level 1 features
502
503 [Function] qmtp-send-buffer (sender recipients buffer)