Rename FLIM-1.14-API.en to FLIM-API.en.
[elisp/flim.git] / FLIM-API.en
1 * Notation
2
3 Each function is described by following notation:
4
5 [Function] NAME-OF-FUNCTION (SIGNATURE)
6   DESCRIPTIONS
7   [ILEVEL]<ULEVEL>
8
9 Each inline function is described by following notation:
10
11 [Inline function] NAME-OF-FUNCTION (SIGNATURE)
12   DESCRIPTIONS
13   [ILEVEL]<ULEVEL>
14
15 Each macro is described by following notation:
16
17 [Macro] NAME-OF-MACRO (SIGNATURE)
18   DESCRIPTIONS
19   [ILEVEL]<ULEVEL>
20
21 Each variable is described by following notation:
22
23 [Variable] NAME-OF-VARIABLE
24   DESCRIPTIONS
25   [ILEVEL]<ULEVEL>
26
27 ILEVEL specifies implementation level:
28
29   Required: Must implement
30   Suggest:  Should implement
31   Optional: Optional
32
33 ULEVEL specifies implementation level:
34
35   Suggest:  Should use
36   Not Suggest: Should not use
37   Obsolete: Should not use (historical)
38
39
40 * MIME entity
41
42 ** How to use
43
44 (require 'mime)
45
46
47 ** MIME-Entity Creation
48
49 [Function] mime-open-entity (type location)
50   Open an entity and return it.
51
52   TYPE is representation-type.
53
54   LOCATION is location of entity.  Specification of it is depended on
55   representation-type.
56
57   [Required]<Suggest>
58
59
60 [Function] mime-parse-buffer (&optional buffer representation-type)
61   Parse BUFFER as a MIME message.
62
63   If buffer is omitted, it parses current-buffer.
64
65   [Optional]<Not Suggest>
66
67
68 ** MIME-Entity Hierarchy
69
70 [Function] mime-entity-children (entity)
71   Return list of entities included in the ENTITY.
72
73   [Required]<Suggest>
74
75
76 [Function] mime-entity-parent (entity &optional message)
77   Return mother entity of ENTITY.
78
79   If MESSAGE is specified, it is regarded as root entity.
80
81   [Suggest]
82
83
84 [Function] mime-root-entity-p (entity &optional message)
85   Return t if ENTITY is root-entity (message).
86
87   If MESSAGE is specified, it is regarded as root entity.
88
89   [Suggest]
90
91
92 [Function] mime-entity-node-id (entity)
93   Return node-id of ENTITY.
94
95   [Suggest]
96
97
98 [Function] mime-entity-number (entity)
99   Return entity-number of ENTITY.
100
101   [Optional]
102
103
104 ** MIME-Entity Search
105
106 [Function] mime-find-entity-from-node-id (entity-node-id message)
107   Return entity from ENTITY-NODE-ID in MESSAGE.
108
109   [Suggest]
110
111
112 [Function] mime-find-entity-from-number (entity-number message)
113   Return entity from ENTITY-NUMBER in MESSAGE.
114
115   [Optional]
116
117
118 [Function] mime-find-entity-from-content-id (cid message)
119   Return entity from CID in MESSAGE.
120
121   [Suggest]<Suggest>
122
123
124 [Function] mime-find-root-entity (entity)
125   Return root entity of ENTITY.
126
127   [Suggest]
128
129
130 ** MIME-Entity Attributes
131
132 [Function] mime-entity-content-type (entity)
133   Return content-type of ENTITY.
134
135   [Suggest]
136
137
138 [Function] mime-entity-set-content-type (entity content-type)
139   Set ENTITY's content-type to CONTENT-TYPE.
140
141   [Suggest]
142
143
144 [Function] mime-entity-content-disposition (entity)
145   Return content-disposition of ENTITY.
146
147   [Suggest]
148
149
150 [Function] mime-entity-filename (entity)
151   Return filename of ENTITY.
152
153   [Suggest]
154
155
156 [Function] mime-entity-encoding (entity &optional default-encoding)
157   Return content-transfer-encoding of ENTITY.
158
159 If the ENTITY does not have Content-Transfer-Encoding field, this
160 function returns DEFAULT-ENCODING.  If it is nil, "7bit" is used as
161 default value.
162
163   [Suggest]
164
165
166 [Function] mime-entity-set-encoding (entity encoding)
167   Set ENTITY's content-transfer-encoding to ENCODING.
168
169   [Suggest]
170
171
172 [Function] mime-entity-cooked-p (entity)
173   Return non-nil if contents of ENTITY has been already
174   code-converted.
175
176   [Suggest]
177
178
179 [Function] mime-entity-name (entity)
180   Return unique name of the ENTITY.
181
182   [Suggest]
183
184
185 ** MIME-Entity Header
186
187 [Function] mime-entity-fetch-field (entity field-name)
188   Return the value of the ENTITY's header field whose type is
189   FIELD-NAME.
190
191   The results is network representation.
192
193   If FIELD-NAME field is not found, this function returns nil.
194
195   [Required]<Suggest>
196
197
198 [Function] mime-entity-read-field (entity field-name)
199   Parse FIELD-NAME field in header of ENTITY, and return the result.
200
201   Format of result is depended on kind of field.  For non-structured
202   field, this function returns string.  For structured field, it
203   returns list corresponding with structure of the field.
204
205   Strings in the result will be converted to internal representation
206   of Emacs.
207
208   If FIELD-NAME field is not found, this function returns nil.
209
210   [Suggest]
211
212
213 ** Text Presentation of MIME-Entity Content
214
215 [Function] mime-insert-header (entity &optional invisible-fields
216                                                 visible-fields)
217   Insert before point a decoded header of ENTITY.
218
219   INVISIBLE-FIELDS is list of regexps to match field-name to hide.
220   VISIBLE-FIELDS is list of regexps to match field-name to hide.
221
222   If a field-name is matched with some elements of INVISIBLE-FIELDS
223   and matched with none of VISIBLE-FIELDS, this function don't insert
224   the field.
225
226   Each encoded-word in the header is decoded.  ``Raw non us-ascii
227   characters'' are also decoded as `default-mime-charset'.
228
229   [Suggest]
230
231
232 [Function] mime-insert-text-content (entity)
233   Insert before point a contents of ENTITY as text entity.
234
235   Contents of the ENTITY are decoded as MIME charset.  If the ENTITY
236   does not have charset parameter of Content-Type field,
237   `default-mime-charset' is used as default value.
238
239   [Required]
240
241
242 [Variable] default-mime-charset
243   Symbol to indicate default value of MIME charset.
244
245   It is used when MIME charset is not specified.
246
247   It is originally variable of APEL.
248
249   [Required]
250
251
252 ** Bytes Representation of MIME-Entity Content
253
254 [Function] mime-entity-content (entity)
255   Return content of ENTITY as byte sequence (string).
256
257   [Required]
258
259
260 [Function] mime-insert-entity-content (entity)
261   Insert content of ENTITY (byte sequence) at point.
262
263   [Suggest]
264
265
266 [Function] mime-write-entity-content (entity filename)
267   Write content of ENTITY (byte sequence) into FILENAME.
268
269   [Required]
270
271
272 ** Network Representation of MIME-Entity
273
274 [Function] mime-entity-string (entity)
275   Return header and body of ENTITY (string).
276
277   [Optional]<Not Suggest>
278
279
280 [Function] mime-insert-entity (entity)
281   Insert header and body of ENTITY at point.
282
283   [Required]
284
285
286 [Function] mime-write-entity (entity filename)
287   Write header and body of ENTITY into FILENAME.
288
289   [Required]
290
291
292 [Function] mime-entity-header (entity)
293   Return network representation of ENTITY header (string).
294
295   [Optional]<Not Suggest>
296
297
298 [Function] mime-insert-entity-header (entity)
299   Insert network representation of ENTITY header at point.
300
301   [Optional]<Not Suggest>
302
303
304 [Function] mime-write-entity-header (entity filename)
305   Write network representation of ENTITY header FILENAME.
306
307   [Optional]<Not Suggest>
308
309
310 [Function] mime-entity-body (entity)
311   Return network representation of ENTITY body (string).
312
313   [Optional]<Not Suggest>
314
315
316 [Function] mime-insert-entity-body (entity)
317   Insert network representation of ENTITY body at point.
318
319   [Required]
320
321
322 [Function] mime-write-entity-body (entity filename)
323   Write body of ENTITY into FILENAME.
324
325   [Required]
326
327
328 * MIME content information
329
330 ** How to use
331
332 (require 'mime)
333
334
335 ** Content-Type
336
337 [Function] mime-parse-Content-Type (string)
338   Parse STRING as field-body of Content-Type field, and
339   return the result as `mime-content-type' structure.
340
341   [Suggest]
342
343
344 [Function] mime-read-Content-Type ()
345   Read field-body of Content-Type field from current-buffer,
346   and return the parsed result.
347
348   Format of return value is as same as `mime-parse-Content-Type'."
349
350   Return `nil' if Content-Type field is not found.
351
352   [Suggest]
353
354
355 [Inline function] mime-content-type-primary-type (content-type)
356   Return primary-type of CONTENT-TYPE.
357
358   [Required]
359
360
361 [Inline function] mime-content-type-subtype (content-type)
362   Return subtype of CONTENT-TYPE.
363
364   [Required]
365
366
367 [Inline function] mime-content-type-parameter (content-type parameter)
368   Return PARAMETER value of CONTENT-TYPE.
369
370   [Required]
371
372
373 [Inline function] mime-content-type-parameters (content-type)
374   Return parameters of CONTENT-TYPE.
375
376   [Suggest]
377
378
379 [Inline function] mime-type/subtype-string (type &optional subtype)
380   Return type/subtype string from TYPE and SUBTYPE.
381
382   [Suggest]
383
384
385 ** Content-Disposition
386
387 [Inline function] mime-content-disposition-type (content-disposition)
388   Return disposition-type of CONTENT-DISPOSITION.
389
390
391 [Inline function] mime-content-disposition-parameter
392                                 (content-disposition parameter)
393   Return PARAMETER value of CONTENT-DISPOSITION.
394
395
396 [Inline function] mime-content-disposition-filename (content-disposition)
397   Return filename of CONTENT-DISPOSITION.
398
399
400 [Inline function] mime-content-disposition-parameters (content-disposition)
401   Return disposition-parameters of CONTENT-DISPOSITION.
402
403
404 [Function] mime-parse-Content-Disposition (string)
405   Parse STRING as field-body of Content-Disposition field.
406
407
408 [Function] mime-read-Content-Disposition ()
409   Read field-body of Content-Disposition field from current-buffer,
410 and return parsed it.
411
412
413 * encoded-word
414
415 ** How to use
416
417 (require 'mime)
418
419
420 ** decoder
421
422 [Function] mime-decode-header-in-buffer (&optional code-conversion separator)
423   Decode MIME encoded-words in header fields.
424
425   If CODE-CONVERSION is nil, it decodes only encoded-words.  If it is
426   mime-charset, it decodes non-ASCII bit patterns as the mime-charset.
427   Otherwise it decodes non-ASCII bit patterns as the
428   default-mime-charset.
429
430   If SEPARATOR is not nil, it is used as header separator.
431
432   [Suggest]
433
434
435 [Function] mime-decode-header-in-region (start end
436                                          &optional code-conversion)
437   Decode MIME encoded-words in region between START and END.
438
439   If CODE-CONVERSION is nil, it decodes only encoded-words.  If it is
440   mime-charset, it decodes non-ASCII bit patterns as the mime-charset.
441   Otherwise it decodes non-ASCII bit patterns as the
442   default-mime-charset.
443
444   [Suggest]
445
446
447 [Function] mime-decode-field-body (field-body field-name
448                                    &optional mode max-column)
449   Decode FIELD-BODY as FIELD-NAME in MODE, and return the result.
450
451   Optional argument MODE must be `plain', `wide', `summary' or `nov'.
452   Default mode is `summary'.
453
454   If MODE is `wide' and MAX-COLUMN is non-nil, the result is folded
455   with MAX-COLUMN.
456
457   Non MIME encoded-word part in FILED-BODY is decoded with
458   `default-mime-charset'.
459
460   [Required]<Suggest>
461
462
463 [Function] mime-set-field-decoder (field &rest specs)
464   Set decoder of FIELD.
465
466   SPECS must be like `MODE1 DECODER1 MODE2 DECODER2 ...'.
467
468   Each mode must be `nil', `plain', `wide', `summary' or `nov'.  If
469   mode is `nil', corresponding decoder is set up for every modes.
470
471   [Suggest]
472
473
474 [Macro] mime-find-field-presentation-method (name)
475   Return field-presentation-method from NAME.
476
477   NAME must be `plain', `wide', `summary' or `nov'.
478
479   [Suggest]
480
481
482 [Function] mime-find-field-decoder (field &optional mode)
483   Return function to decode field-body of FIELD in MODE.
484
485   Optional argument MODE must be object or name of
486   field-presentation-method.  Name of field-presentation-method must
487   be `plain', `wide', `summary' or `nov'.  Default value of MODE is
488   `summary'.
489
490   [Suggest]
491
492
493 [Function] mime-update-field-decoder-cache (field mode &optional function)
494   Update field decoder cache `mime-field-decoder-cache'.
495
496   [Suggest]
497
498
499 ** encoder
500
501 [Function] mime-encode-header-in-buffer (&optional code-conversion)
502   Encode header fields to network representation, such as MIME
503   encoded-word.
504
505   It refer variable `mime-field-encoding-method-alist'.
506
507   [Suggest]
508
509
510 [Function] mime-encode-field-body (field-body field-name)
511   Encode FIELD-BODY as FIELD-NAME, and return the result.
512
513   A lexical token includes non-ASCII character is encoded as MIME
514   encoded-word.  ASCII token is not encoded.
515
516   [Required]<Suggest>
517
518
519 * Content-Transfer-Encoding
520
521 ** How to use
522
523 (require 'mel)
524
525
526 ** Encoding Name
527
528 [Variable] mime-encoding-list
529   List of Content-Transfer-Encoding.  Each encoding must be string.
530
531   [Suggest]
532
533
534 [Function] mime-encoding-list (&optional service)
535   Return list of Content-Transfer-Encoding.
536
537   If SERVICE is specified, it returns available list of
538   Content-Transfer-Encoding for it.
539
540   [Required]<Suggest>
541
542
543 [Function] mime-encoding-alist (&optional service)
544   Return table of Content-Transfer-Encoding for completion.
545
546   [Suggest]
547
548
549 ** Decoder
550
551 [Function] mime-decode-string (string encoding)
552   Decode STRING using ENCODING.
553
554   ENCODING must be string.  If ENCODING is found in
555   `mime-encoding-list', this function decodes the STRING by its value.
556
557   [Required]<Suggest>
558
559
560 [Function] mime-decode-region (start end encoding)
561   Decode region START to END of current buffer using ENCODING.
562
563   ENCODING must be string.
564
565   [Suggest]<Not Suggest>
566
567
568 [Function] mime-write-decoded-region (start end filename encoding)
569   Decode and write current region encoded by ENCODING into FILENAME.
570
571   START and END are buffer positions.
572
573   [Required]<Suggest>
574
575
576 ** Encoder
577
578 [Function] mime-encode-string (string encoding)
579   Encode STRING using ENCODING.
580
581   ENCODING must be string.
582
583   [Optional]<Not Suggest>
584
585
586 [Function] mime-encode-region (start end encoding)
587   Encode region START to END of current buffer using ENCODING.
588
589   ENCODING must be string.
590
591   [Suggest]<Not Suggest>
592
593
594 [Function] mime-insert-encoded-file (filename encoding)
595   Insert file FILENAME encoded by ENCODING format.
596
597   [Required]<Suggest>
598
599
600 ** encoded-text
601
602 [Function] encoded-text-decode-string (string encoding)
603   Decode STRING as encoded-text using ENCODING.
604
605   ENCODING must be string.
606
607   [Suggest]
608
609
610 [Function] encoded-text-encode-string (string encoding &optional mode)
611   Encode STRING as encoded-text using ENCODING.
612
613   ENCODING must be string.
614
615   MODE allows `text', `comment', `phrase' or nil.  Default value is
616   `phrase'.
617
618   [Suggest]
619
620
621 [Function] base64-encoded-length (string)
622   Return length of B-encoded STRING.
623
624   [Suggest]
625
626
627 [Function] Q-encoded-text-length (string &optional mode)
628   Return length of Q-encoded STRING.
629
630   MODE allows `text', `comment', `phrase' or nil.  Default value is
631   `phrase'.
632
633   [Suggest]
634
635
636 * Mailcap
637
638 ** How to use
639
640 (require 'mime-conf)
641
642
643 ** Parsing
644
645 [Function] mime-parse-mailcap-buffer (&optional buffer order)
646   Parse BUFFER as a mailcap, and return the result.
647
648   If optional argument ORDER is a function, result is sorted by it.
649   If optional argument ORDER is not specified, result is sorted
650   original order.  Otherwise result is not sorted.
651
652   [Required]<Suggest>
653
654
655 [Variable] mime-mailcap-file
656   File name of user's mailcap file.
657
658   [Required]<Suggest> (default value may be "~/.mailcap")
659
660
661 [Function] mime-parse-mailcap-file (&optional filename order)
662   Parse FILENAME as a mailcap, and return the result.
663
664   If optional argument ORDER is a function, result is sorted by it.
665   If optional argument ORDER is not specified, result is sorted
666   original order.  Otherwise result is not sorted.
667
668   [Required]<Suggest>
669
670
671 ** Apply
672
673 [Function] mime-format-mailcap-command (mtext situation)
674   Return formated command string from MTEXT and SITUATION.
675
676   MTEXT is a command text of mailcap specification, such as
677   view-command.
678
679   SITUATION is an association-list about information of entity.  Its
680   key may be:
681
682         'type           primary media-type
683         'subtype        media-subtype
684         'filename       filename
685         STRING          parameter of Content-Type field
686
687   [Required]<Suggest>
688
689
690 * MIME Field parsing
691
692 ** How to use
693
694 (require 'mime)
695
696
697 ** Level 2 features
698
699 [Variable] mime-field-parser-alist
700   Alist to specify field parser.
701
702
703 [Function] mime-parse-Content-Type (string)
704   Parse STRING as field-body of Content-Type field.
705
706 Return value is
707     (PRIMARY-TYPE SUBTYPE (NAME1 . VALUE1)(NAME2 . VALUE2) ...)
708 or nil.  PRIMARY-TYPE and SUBTYPE are symbol and NAME_n and VALUE_n
709 are string.
710
711
712 [Function] mime-read-Content-Type ()
713   Read field-body of Content-Type field from current-buffer,
714 and return parsed it.  Format of return value is as same as
715 `mime-parse-Content-Type'.
716
717
718 [Function] mime-parse-Content-Disposition (string)
719   Parse STRING as field-body of Content-Disposition field.
720
721
722 [Function] mime-read-Content-Disposition ()
723   Read field-body of Content-Disposition field from current-buffer,
724 and return parsed it.
725
726
727 [Function] mime-parse-Content-Transfer-Encoding (string)
728   Parse STRING as field-body of Content-Transfer-Encoding field.
729
730
731 [Function] mime-read-Content-Transfer-Encoding (&optional default-encoding)
732   Read field-body of Content-Transfer-Encoding field from
733 current-buffer, and return it.
734
735 If is is not found, return DEFAULT-ENCODING.
736
737
738 [Function] mime-parse-msg-id (tokens)
739   Parse TOKENS as msg-id of Content-Id or Message-Id field.
740
741
742 [Function] mime-uri-parse-cid (string)
743   Parse STRING as cid URI.
744
745
746 * STD 11 parsing
747
748 ** How to use
749
750 (require 'std11)
751
752
753 ** Level 1 features
754
755 [Function] std11-fetch-field (name)
756   Return the value of the header field NAME.
757
758 The buffer is expected to be narrowed to just the headers of the message.
759
760
761 [Function] std11-narrow-to-header (&optional boundary)
762   Narrow to the message header.
763
764 If BOUNDARY is not nil, it is used as message header separator.
765
766
767 [Function] std11-field-body (name &optional boundary)
768   Return the value of the header field NAME.
769
770 If BOUNDARY is not nil, it is used as message header separator.
771
772
773 [Function] std11-unfold-string (string)
774   Unfold STRING as message header field.
775
776
777 ** Level 2 features
778
779 [Function] std11-lexical-analyze (string &optional analyzer start)
780   Analyze STRING as lexical tokens of STD 11.
781
782
783 [Function] std11-address-string (address)
784   Return string of address part from parsed ADDRESS of RFC 822.
785
786
787 [Function] std11-full-name-string (address)
788   Return string of full-name part from parsed ADDRESS of RFC 822.
789
790
791 [Function] std11-msg-id-string (msg-id)
792   Return string from parsed MSG-ID of RFC 822.
793
794
795 [Function] std11-fill-msg-id-list-string (string &optional column)
796   Fill list of msg-id in STRING, and return the result.
797
798
799 [Function] std11-parse-address-string (string)
800   Parse STRING as mail address.
801
802
803 [Function] std11-parse-addresses-string (string)
804   Parse STRING as mail address list.
805
806
807 [Function] std11-parse-msg-id-string (string)
808   Parse STRING as msg-id.
809
810
811 [Function] std11-parse-msg-ids-string (string)
812   Parse STRING as `*(phrase / msg-id)'.
813
814
815 [Function] std11-extract-address-components (string)
816   Extract full name and canonical address from STRING.
817
818 Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
819 If no name can be extracted, FULL-NAME will be nil.
820
821
822 * SMTP
823
824 ** How to use
825
826 (require 'smtp)
827
828
829 ** Level 1 features
830
831 [Function] smtp-send-buffer (sender recipients buffer)
832
833
834 * QMTP
835
836 ** How to use
837
838 (require 'qmtp)
839
840
841 ** Level 1 features
842
843 [Function] qmtp-send-buffer (sender recipients buffer)