e1f5e8578ae11d13b498beaa8d649405567cec33
[elisp/tm.git] / doc / tm-view-en.info
1 Info file: tm-view-en.info,    -*-Text-*-
2 produced by `texinfo-format-buffer'
3 from file `tm-view-en.texi'
4 using `texinfmt.el' version 2.32 of 19 November 1993.
5
6
7 \1f
8 File: tm-view-en.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
9
10 tm-view 7.77 Reference Manual (English Version)
11 ***********************************************
12
13
14 This file documents tm-view, a MIME Viewer for GNU Emacs.
15
16 * Menu:
17
18 * Introduction::                What is tm-view?
19 * MIME display::                Structure of display in mime/viewer-mode
20 * mime/viewer-mode::            Navigation in mime/viewer-mode
21 * method::                      Mechanism of decoding
22 * Two buffers for an article::  raw-article-buffer and preview-buffer
23 * API::                         Functions to decode MIME message
24 * Concept Index::               
25 * Function Index::              
26 * Variable Index::              
27
28
29 \1f
30 File: tm-view-en.info, Node: Introduction, Next: MIME display, Prev: Top, Up: Top
31
32 What is tm-view?
33 ****************
34
35 The tm-view is a general MIME viewer running on GNU Emacs.
36
37 tm-view provides the major-mode called `mime/viewer-mode' (*Note
38 mime/viewer-mode::) to read MIME message for MUA.  MUA (*Note
39 (tm-en)MUA::) implementer can use it to add MIME function.
40
41 tm-view is a user interface kernel to view and navigate MIME message.
42 tm-view drives some programs to navigate each content-type
43 (*Note (tm-en)content-type::)s, they are called
44 *method* (*Note method::).  tm-view calls some
45 programs to display each contents and headers in preview buffer, they
46 are called *filter* (*Note Two buffers for an article::).  Method and
47 filters are tm-view application program.  They expand tm-view to treat
48 various kinds of MIME types.
49
50
51
52 \1f
53 File: tm-view-en.info, Node: MIME display, Next: mime/viewer-mode, Prev: Introduction, Up: Top
54
55 Structure of display in mime/viewer-mode
56 ****************************************
57
58 In mime/viewer-mode (*Note mime/viewer-mode::), following are displayed
59 for each parts:
60
61         [content-button]
62         (content-header)
63         
64         (content-body)
65         (content-separator)
66
67 You can change design or stop to display if you specify for each
68 conditions, such as content-types.
69
70 Example:
71
72      From: morioka@jaist.ac.jp (MORIOKA Tomohiko)
73      Subject: Re: Question
74      Newsgroups: zxr.message.mime
75      Date: 22 Oct 93 11:02:44
76      Mime-Version: 1.0
77      Organization: Japan Advanced Institute of Science and Technology,
78              Ishikawa, Japan
79
80      [1  (text/plain)]
81        How to compose MIME message in MIME-Edit mode.
82
83        Press `C-c C-x ?' then help message will be displayed:
84
85      C-c C-x C-t        insert a text message.
86      C-c C-x TAB        insert a (binary) file.
87      C-c C-x C-e        insert a reference to external body.
88      C-c C-x C-v        insert a voice message.
89      C-c C-x C-y        insert a mail or news message.
90      C-c C-x RET        insert a mail message.
91      C-c C-x C-s        insert a signature file at end.
92      C-c C-x t  insert a new MIME tag.
93      C-c C-x a  enclose as multipart/alternative.
94      C-c C-x p  enclose as multipart/parallel.
95      C-c C-x m  enclose as multipart/mixed.
96      C-c C-x d  enclose as multipart/digest.
97      C-c C-x s  enclose as PGP signed.
98      C-c C-x e  enclose as PGP encrypted.
99      C-c C-x C-k        insert PGP public key.
100      C-c C-x C-p        preview editing MIME message.
101      ...
102
103      So press `C-c C-x C-i' and specify file name you want to include.
104
105        MIME encoding for binary file is normally Base64.
106
107      [2  (image/gif)]
108
109      [3  (text/plain)]
110
111        In this way, it is finish a message attaching a picture.
112
113      ======================== A cup of Russian tea ========================
114      ============  * not by jam, not by marmalade, by honey *  ============
115      ============               MORIOKA Tomohiko               ============
116      =============== Internet E-mail: <morioka@jaist.ac.jp> ===============
117
118
119
120 * Menu:
121
122 * content-button::              
123 * content-header::              
124 * content-body::                
125 * content-separator::           
126
127
128 \1f
129 File: tm-view-en.info, Node: content-button, Next: content-header, Prev: MIME display, Up: MIME display
130
131 content-button
132 ==============
133
134 content-subject displays abstract for the part.  It is placed in top of
135 the part.
136
137 In default, it is displayed following design:
138
139              [1.3 test (text/plain)]
140
141
142 First number field represents position of a content in the part.  It is
143 called *content-number*.  It can be considered as the chapter number in
144 the message.
145
146 Second string part represents title.  It is created by following:
147
148   1. name paramater or x-name parameter in Content-Type field (*Note
149      (tm-en)Content-Type field::)
150   2. Content-Description field (*Note (tm-en)Content-Description
151      field::) or Subject field
152   3.  filename of uuencode
153
154
155 If they are not exists, space is displayed.
156
157 Third parenthesis part represents content-type/subtype of the part.  If
158 it is non-MIME part, `nil' is displayed.
159
160 Content-button is used like icon when content-header (*Note
161 content-header::) and content-body (*Note content-body::) are hidden.
162 For example:
163
164              [2  (image/gif)]
165
166 if you press `v' key, GIF image is displayed.
167
168 If mouse operations are available, you can press content-button by mouse
169 button-2 (center button of 3 button-mouse) to play, similarly to press
170 `v' key. (cf. *Note mime/viewer-mode::)
171
172 By the way, it is annoying to display content-button if content-header
173 is displayed.  So tm-view provides a mechanism to specify conditions to
174 display content-button.
175
176
177  -- Variable: mime-viewer/content-button-ignored-ctype-list
178
179      List of content-types.
180
181      If content-type of a part is a member of this list, its
182      content-button is not displayed.
183
184
185
186
187 \1f
188 File: tm-view-en.info, Node: content-header, Next: content-body, Prev: content-button, Up: MIME display
189
190 content-header
191 ==============
192
193 A content header displays the header portion of a part in the
194 preview-buffer.  However it is annoying to display header for every
195 parts, so tm-view provides a mechanism to specify its condition.
196
197 When the function `mime-viewer/header-visible-p' returns `t' for
198 reversed-content-number of a part, content-header is displayed.
199
200 This judge function returns `t' when a part is root or content-type of
201 its parent is a member of the variable
202 `mime-viewer/childrens-header-showing-Content-Type-list'.
203
204 If you want to change this condition, please redefine it.  Notice that
205 it refers variable
206 `mime-viewer/childrens-header-showing-Content-Type-list', however if you
207 redefine function `mime-viewer/header-visible-p', it may not work.  So
208 if you want to redefine it, it should be refer variable
209 `mime-viewer/childrens-header-showing-Content-Type-list'.
210
211 When content-header is displayed, content-header are formated by the
212 program called by
213 *content-header-filter*.
214 Content-header-filter is searched from variable
215 `mime-viewer/content-header-filter-alist'.  Its key is major-mode of the
216 raw-article-buffer (*Note raw-article-buffer::).  If not found, function
217 `mime-viewer/default-content-header-filter' is called.
218
219
220  -- Variable: mime-viewer/childrens-header-showing-Content-Type-list
221
222      List of content-types.  If content-type of parent of a part is a
223      member of this variable, its content-header is displayed.  Default
224      value is `'("message/rfc822" "message/news")'.
225
226      This variable is referred by the function
227      `mime-viewer/header-visible-p'.
228
229
230
231  -- Function: mime-viewer/header-visible-p RCNUM CINFO &optional CTYPE
232
233      Returns `t' if a part which reversed-content-number is RCNUM in
234      content-info CINFO is displayed.
235
236      If you know content-type, you can specify by CTYPE.
237
238
239
240  -- Variable: mime-viewer/content-header-filter-alist
241
242      Association-list whose key is major-mode of a raw-article-buffer,
243      value is content-header-filter.
244
245
246
247  -- Function: mime-viewer/default-content-header-filter
248
249      It is called when content-header-filter is not found in variable
250      `mime-viewer/content-header-filter-alist'.
251
252      It refers `mime-viewer/ignored-field-regexp'.
253
254
255
256  -- Variable: mime-viewer/ignored-field-list
257
258      List of regular expression to represent invisible fields even if
259      content-header is displayed.
260
261      Variable `mime-viewer/ignored-field-regexp' is created from it.
262
263      Please use function `tm:add-fields' or `tm:delete-fields' to set
264      it.
265
266
267
268
269 \1f
270 File: tm-view-en.info, Node: content-body, Next: content-separator, Prev: content-header, Up: MIME display
271
272 content-body
273 ============
274
275 *content-body* represents content of the
276 part.
277
278 tm-view does not display raw content body.  For example, if a content
279 has binary, it is hidden.  If a content has text/enriched, it is
280 formated.  Namely content body is hidden or formated.
281
282 Function `mime-viewer/body-visible-p' is a judge function whether
283 content-body of a content is displayed.  If it returns `nil',
284 content-body is hidden.  In default, it returns non-`nil' when
285 content-type of a part is a member of variable
286 `mime-viewer/default-showing-Content-Type-list'.
287
288 When content-body of a content is displayed, content-body is formated by
289 *content-filter*.  Content-filter is
290 searched from variable `mime-viewer/content-filter-alist'.  At this
291 time, major-mode of the raw-article-buffer (*Note raw-article-buffer::)
292 is used as the key.
293
294 If it is not found, function `mime-viewer/default-content-filter' is
295 called.
296
297
298  -- Variable: mime-viewer/default-showing-Content-Type-list
299
300      List of content-type.  If content-type of a part is a member of
301      this variable, its body is displayed.
302
303
304
305  -- Function: mime-viewer/body-visible-p RCNUM CINFO &optional CTYPE
306
307      Return non-`nil', if content-type of a part is displayed.  RCNUM is
308      reversed-content-number of a part.  CINFO is content-info of the
309      message.  If you know content-type of a part, you can specify it as
310      argument CTYPE.
311
312
313
314  -- Variable: mime-viewer/content-filter-alist
315
316      Association-list whose key is major-mode of a raw-article-buffer,
317      value is content-filter.
318
319
320
321  -- Function: mime-viewer/default-content-filter RCNUM CINFO CTYPE PARAMS SUBJ
322
323      It is called when content-body of a part should be displayed and
324      content-filter is not found in `mime-viewer/content-filter-alist'.
325
326      In default, it does nothing.
327
328
329
330
331 \1f
332 File: tm-view-en.info, Node: content-separator, Prev: content-body, Up: MIME display
333
334 content-separator
335 =================
336
337 *content-separator* is displayed to
338 represent boundary of contents.
339
340 Content-separator is displayed by function
341 `mime-viewer/default-content-separator'.  In default, it displays
342 line-break when content-header and content-body are not displayed.
343
344 If you want to change this condition, please redefine this function.
345
346
347  -- Function: mime-viewer/default-content-separator RCNUM CINFO CTYPE PARAMS SUBJ
348
349      Display content-separator.  CNUM is content-number of a content.
350      CINFO is content-info of the message.  CTYPE is content-type of a
351      content.  PARAMS is Content-Type field parameters of a content.
352      SUBJ is subject.
353
354      In default, it displays line-break when content-header and
355      content-body are not displayed.
356
357
358
359
360 \1f
361 File: tm-view-en.info, Node: mime/viewer-mode, Next: method, Prev: MIME display, Up: Top
362
363 Navigation in mime/viewer-mode
364 ******************************
365
366 `mime/viewer-mode' has following functions:
367
368 `u'
369      goes to the upper content (returns to the Summary mode if the
370      cursor is sitting on the top content (*1))
371
372 `p'
373      goes to the previous content
374
375 `n'
376      goes to the next content
377
378 `SPC'
379      scrolls up
380
381 `M-SPC'
382      scrolls down
383
384 `DEL'
385      scrolls down
386
387 `RET'
388      goes to the next line
389
390 `M-RET'
391      goes to the previous line
392
393 `<'
394      goes to the beginning of message
395
396 `>'
397      goes to the end of message
398
399 `v'
400      playbacks a part (*2)
401
402 `e'
403      extracts a file from a part (*2)
404
405 `C-c C-p'
406      prints a part (*2)
407
408 `f'
409      displays X-Face in the message
410
411 `mouse-button-2'
412      drives mouse button in preview-buffer.
413
414      For content-button, it playbacks a part (*2)
415
416      For URL-button, it drives WWW browser
417
418
419 *[Notice]*
420
421      (*1) Not return to the Summary mode unless tm-view has been setup
422      using tm-mh-e, tm-vm, gnus-mime, tm-gnus, tm-rmail etc.
423
424      (*2) Actual playback/extract/print will be performed by a method.
425
426
427
428
429 \1f
430 File: tm-view-en.info, Node: method, Next: Two buffers for an article, Prev: mime/viewer-mode, Up: Top
431
432 Mechanism of decoding
433 *********************
434
435 In `mime/viewer-mode', you can do play (`v'), extract
436 (`e'), or print (`C-c C-p') for each parts.  These operations
437 are called *decoding
438 operation(s) (for a part)*.  And kind of decoding operations are called
439 *decoding-mode*.
440
441 When decoding operation is driven, tm-view calls a procedure matched for
442 the condition, such as content-type (*Note (tm-en)content-type::) of the
443 part or its environment.  This procedure is called
444 *method*.
445
446 There are two kinds of methods.  One is Emacs Lisp function, called
447 *internal method*.  Another one is
448 external program, called *external method*.
449
450 Internal method operates in Emacs, so it can do carefully.
451
452 External method is called as asynchronous process, so Emacs does not
453 wait while method is running.  So it is good for big data, such as
454 audio, image or video.
455
456
457 * Menu:
458
459 * decoding-condition::          Setting decoding condition for parts
460 * environment variables::       Environment variables
461
462
463 \1f
464 File: tm-view-en.info, Node: decoding-condition, Next: environment variables, Prev: method, Up: method
465
466 Setting decoding condition for parts
467 ====================================
468
469 When decoding operation is driven, tm-view calls a method matched for
470 the condition searched from the variable
471 `mime/content-decoding-condition'.
472
473 Variable `mime/content-decoding-condition' is defined as a list with the
474 following syntax:
475
476              (condition_1 condition_2 ...)
477
478 Each condition are association-list with the following syntax:
479
480              ((field-type_1 . value_1)
481               (field-type_2 . value_2)
482               ...)
483
484 For example, if you want to call the external method named tm-plain to
485 decode every text/plain (*Note (tm-en)text/plain::) type parts, you can
486 define the condition like:
487
488              ((type . "text/plain")
489               (method "tm-plain" nil 'file 'type 'encoding 'mode 'name))
490
491 This condition definition will match all parts whose content-type (*Note
492 (tm-en)content-type::) are text/plain.  Here is an another example:
493
494              ((type . "text/plain")
495               (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)
496               (mode . "play"))
497
498 This will match the part whose type is text/plain and the mode is play.
499
500 Here is an another example:
501
502              ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)
503               (mode . "play"))
504
505 This will match all parts which have a mode of play.
506
507 The conditions defined in a variable `mime/content-decoding-condition'
508 are examined from top to bottom.  The first matching condition becomes
509 valid and the method specified in that condition definition will be
510 executed.
511
512
513 * Menu:
514
515 * method value::                Format of method value
516 * Example of decoding-condition::  
517
518
519 \1f
520 File: tm-view-en.info, Node: method value, Next: Example of decoding-condition, Prev: decoding-condition, Up: decoding-condition
521
522 Format of method value
523 ----------------------
524
525 You can specify the method field of the decoding-condition definition in
526 two different ways,
527
528              (method . SYMBOL)
529
530 or
531
532              (method  STRING  FLAG  arg1  arg2  ...)
533
534 can be accepted.
535
536 When a symbol is specified in the method field, a function whose name is
537 SYMBOL will be called as an internal method.
538
539 When a list is specified in the method field, it will be called as an
540 external method.
541
542 The list below shows the meaning of the parameters when the external
543 method is specified in the method field.
544
545 `STRING'
546      name of an external method
547
548 `FLAG'
549      If `t', both the content-header and the content-body are passed to
550      an external method.
551
552      If `nil', only the content-body is passed to an external method.
553
554 `ARGUMENTs'
555      list of arguments passed to an external method
556
557
558 An argument passed to an external method can be in one of the following
559 formats:
560
561 `STRING'
562      string itself
563
564 `'SYMBOL'
565      value gotten using SYMBOL as a key from decoding-condition
566
567 `'STRING'
568      value gotten using STRING as a key from decoding-condition
569
570
571 `'SYMBOL' can be one of the following:
572
573 `'file'
574      name of a file holding the original content
575
576 `'type'
577      content-type/sub-type of Content-Type field
578
579 `'encoding'
580      field body of Content-Transfer-Encoding field
581
582 `'mode'
583      decoding-mode
584
585 `'name'
586      name of a file created by decode operation
587
588
589
590 `'STRING' is used to search a parameter of the Content-Type field whose
591 name matches with it, and pass the value of that parameter to the
592 external method.
593
594
595
596 \1f
597 File: tm-view-en.info, Node: Example of decoding-condition, Prev: method value, Up: decoding-condition
598
599 Example of decoding-condition
600 -----------------------------
601
602 Following is an example of decoding-condition:
603
604      (defvar mime/content-decoding-condition
605        '(((type . "text/plain")
606           (method "tm-plain" nil 'file 'type 'encoding 'mode 'name))
607          ((type . "text/x-latex")
608           (method "tm-latex" nil 'file 'type 'encoding 'mode 'name))
609          ((type . "audio/basic")
610           (method "tm-au"    nil 'file 'type 'encoding 'mode 'name))
611          ((type . "image/gif")
612           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
613          ((type . "image/jpeg")
614           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
615          ((type . "image/tiff")
616           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
617          ((type . "image/x-tiff")
618           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
619          ((type . "image/x-xbm")
620           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
621          ((type . "image/x-pic")
622           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
623          ((type . "video/mpeg")`
624           (method "tm-mpeg"  nil 'file 'type 'encoding 'mode 'name))
625          ((type . "application/octet-stream")
626           (method "tm-file"  nil 'file 'type 'encoding 'mode 'name))
627          ((type . "message/partial")
628           (method . mime/decode-message/partial-region))
629          ((method "metamail" t
630                   "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play"))
631          ))
632
633
634 For example, if you want to use metamail to decode any contents,
635
636      (setq mime/content-decoding-condition
637            '(
638              ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file))
639             ))
640
641 will work.
642
643 Variable `mime/content-decoding-condition' provides you of very flexible
644 way to define the conditions of decoding.  It can be simple if you only
645 need the a few decoding methods, while it can be very complicated if you
646 want to use the separate decoding method for each type/mode combination.
647
648 Following function may be useful to set decoding-condition.  It is a
649 function of `tl-atype.el'.
650
651
652  -- Function: set-atype SYMBOL ALIST
653
654      Add condition ALIST to SYMBOL.
655
656      *[Example]*
657
658                (set-atype 'mime/content-decoding-condition
659                    '((type . "message/external-body")
660                      ("access-type" . "anon-ftp")
661                      (method . mime/decode-message/external-ftp)
662                      ))
663
664
665
666
667 \1f
668 File: tm-view-en.info, Node: environment variables, Prev: decoding-condition, Up: method
669
670 Environment variables
671 =====================
672
673 Standard methods of tm-view reference some environment variables.  You
674 can specify them to customize.
675
676 TM_TMP_DIR
677      Directory for temporary files or extracted files.  If it is
678      omitted, `/tmp/' is used.
679
680 VIDEO_DITHER
681      Dither for mpeg_play.  If it is omitted, `gray' is used.
682
683 TM_WWW_BROWSER
684      WWW browser name.  If it is omitted, `netscape' is used.
685
686
687
688
689
690 \1f
691 File: tm-view-en.info, Node: Two buffers for an article, Next: API, Prev: method, Up: Top
692
693 raw-article-buffer and preview-buffer
694 *************************************
695
696 tm-view managements two buffers, one is for raw message called
697 *raw-article-buffer*, another one is
698 to preview for user called
699 *preview-buffer*.  major-mode of
700 raw-article-buffer is same as major-mode for article of original MUA,
701 major-mode of preview-buffer is `mime/viewer-mode' (*Note
702 mime/viewer-mode::).
703
704 When called `mime/viewer-mode', tm-view analyzes raw-article-buffer, and
705 sets its result to the variable `mime::article/content-info'.
706
707 After that, tm-view create a preview-buffer corresponded to the
708 raw-article-buffer.  As this time, tm-view modifies header and body of
709 each parts of the message by specified conditions.  Filter program for
710 header is called *header-filter*
711 (*Note content-header::), filter program for body is called
712 *content-filter* (*Note content-body::), and
713 they are called *filter*.
714
715 When preview-buffer is made, buffer local variable of preview-buffer
716 `mime::preview/content-list' is made to register structure of
717 preview-buffer.  tm-view manages message by `mime::article/content-info'
718 in raw-article-buffer and `mime::preview/content-list' in
719 preview-buffer.
720
721 *[Notice]*
722      In this document, I call "content-type" as content-type/subtype of
723      Content-Type field.
724
725
726
727 * Menu:
728
729 * raw-article-buffer::          buffer local variables of raw-article-buffer
730 * preview-buffer::              Buffer local variables of preview-buffer
731
732
733 \1f
734 File: tm-view-en.info, Node: raw-article-buffer, Next: preview-buffer, Prev: Two buffers for an article, Up: Two buffers for an article
735
736 buffer local variables of raw-article-buffer
737 ============================================
738
739  -- Structure: mime::content-info RCNUM POINT-MIN POINT-MAX TYPE PARAMETERS ENCODING CHILDREN
740
741      structure to represent MIME content in raw-article-buffer.  It is
742      called by *content-info*.
743
744      Please use reference function `mime::content-info/SLOT-NAME' to
745      reference slot of content-info.  Their argument is only
746      content-info.
747
748      Following is a list of slots of the structure:
749
750      RCNUM
751           "reversed content-number" (list)
752
753      POINT-MIN
754           beginning point of region in raw-article-buffer
755
756      POINT-MAX
757           end point of region in raw-article-buffer
758
759      TYPE
760           content-type/sub-type (string or nil)
761
762      PARAMETERS
763           parameter of Content-Type field (association list)
764
765      ENCODING
766           Content-Transfer-Encoding (string or nil)
767
768      CHILDREN
769           parts included in this part (list of content-infos)
770
771
772      If a part includes other parts in its contents, such as multipart
773      or message/rfc822, content-infos of other parts are included in
774      CHILDREN, so content-info become a tree.
775
776
777  -- Variable: mime::article/content-info
778
779      result of MIME parsing of raw-article-buffer (content-info)
780
781
782  -- Variable: mime::article/preview-buffer
783
784      preview-buffer corresponded by this buffer
785
786
787  -- Function: mime-article/point-content-number POINT &optional CINFO
788
789      In a region managed by content-info CINFO, it returns
790      content-number corresponded by POINT.
791
792      If CINFO is omitted, `mime::article/content-info' is used as
793      default value.
794
795
796  -- Function: mime-article/rcnum-to-cinfo RCNUM &optional CINFO
797
798      In a region managed by content-info CINFO, it returns content-info
799      corresponded by reversed-content-number RCNUM.
800
801      If CINFO is omitted, `mime::article/content-info' is used as
802      default value.
803
804
805  -- Function: mime-article/cnum-to-cinfo RCNUM &optional CINFO
806
807      In a region managed by content-info CINFO, it returns content-info
808      corresponded by content-number RCNUM.
809
810      If CINFO is omitted, `mime::article/content-info' is used as
811      default value.
812
813
814  -- Function: mime/flatten-content-info &optional CINFO
815
816      It returns flatten list of content-info from content-info CINFO
817      tree.
818
819      If CINFO is omitted, `mime::article/content-info' is used as
820      default value.
821
822
823
824
825 \1f
826 File: tm-view-en.info, Node: preview-buffer, Prev: raw-article-buffer, Up: Two buffers for an article
827
828 Buffer local variables of preview-buffer
829 ========================================
830
831  -- Variable: mime::preview/mother-buffer
832
833      Mother buffer of this preview-buffer.
834
835
836  -- Structure: mime::preview-content-info POINT-MIN POINT-MAX BUFFER CONTENT-INFO
837
838      structure to represent MIME content in preview-buffer.  It is called by
839      *preview-content-info*.
840
841      Please use reference function
842      `mime::preview-content-info/SLOT-NAME' to reference slot of
843      preview-content-info.  Their argument is only preview-content-info.
844
845      Following is a list of slots of the structure:
846
847      POINT-MIN
848           beginning point of region in preview-buffer
849
850      POINT-MAX
851           end point of region in preview-buffer
852
853      BUFFER
854           raw-article-buffer corresponding a part
855
856      CONTENT-INFO
857           content-info corresponding a part
858
859
860
861
862  -- Variable: mime::preview/content-list
863
864      List of preview-content-info to represent structure of this
865      preview-buffer.
866
867
868
869  -- Variable: mime::preview/article-buffer
870
871      raw-article-buffer corresponded by this preview-buffer.
872
873
874
875  -- Variable: mime::preview/original-major-mode
876
877      major-mode of original buffer.
878
879
880
881  -- Variable: mime::preview/original-window-configuration
882
883      window-configuration just before made this preview-buffer.
884
885
886
887  -- Function: mime-preview/point-pcinfo POINT &optional PCL
888
889      In a region of preview-buffer managed by preview-content-info PCL,
890      it returns preview-content-info corresponded by POINT.
891
892      If CINFO is omitted, `mime::preview/content-list' is used.
893
894
895
896
897 \1f
898 File: tm-view-en.info, Node: API, Next: Concept Index, Prev: Two buffers for an article, Up: Top
899
900 Functions to decode MIME message
901 ********************************
902
903 tm-view provides some available functions to decode and navigate MIME
904 message to each MUA (*Note (tm-en)MUA::)s.
905
906 There are 2 kinds of functions, one is for MIME preview, another one is
907 to decode RFC 1522 encoded-word (*Note (tm-en)encoded-word::).
908
909
910 * Menu:
911
912 * API about MIME preview::      Function to preview MIME message
913 * encoded-word decoding::       encoded-word decoder
914
915
916 \1f
917 File: tm-view-en.info, Node: API about MIME preview, Next: encoded-word decoding, Prev: API, Up: API
918
919 Function to preview MIME message
920 ================================
921
922
923  -- Command: mime/viewer-mode &optional MOTHER CTL ENCODING IBUF OBUF MOTHER-KEYMAP
924
925      Parse IBUF as a MIME message, and create preview-buffer into OBUF
926      to display to user, then enter `mime/viewer-mode' (*Note
927      mime/viewer-mode::).
928
929      If IBUF is omitted, current buffer is used.
930
931      MOTHER is used to specify original raw-article-buffer.  It may be
932      useful when a raw-article-buffer is assembled from message/partial
933      messages.
934
935      CTL is used to specify Content-Type field (*Note
936      (tm-en)Content-Type field::) information.  Its format is output
937      format of `mime/Content-Type'.  When CTL is specified, tm-view uses
938      it instead of Content-Type field of the raw-article-buffer.
939
940      ENCODING is used to specify field-body of Content-Transfer-Encoding
941      field.  When is is specified, tm-view uses it instead of
942      Content-Type field of the raw-article-buffer.
943
944      If MOTHER-KEYMAP is specified, keymap of `mime/viewer-mode'
945      includes it.
946
947
948
949
950 \1f
951 File: tm-view-en.info, Node: encoded-word decoding, Prev: API about MIME preview, Up: API
952
953 encoded-word decoder
954 ====================
955
956 tm-view has functions to decode RFC 1522 encoded-word (*Note
957 (tm-en)encoded-word::).
958
959
960  -- Command: mime/decode-message-header
961
962      It decodes encoded-words in message header of current buffer.
963
964      If an encoded-word is broken or invalid, or it has non supported
965      MIME charset (*Note (tm-en)MIME charset::), it is not decoded.
966
967
968
969  -- Command: mime-eword/decode-region START END &optional UNFOLDING MUST-UNFOLD
970
971      It decodes encoded-words in region START to END.
972
973      If an encoded-word is broken or invalid, or it has non supported
974      MIME charset (*Note (tm-en)MIME charset::), it is not decoded.
975
976      If UNFOLDING is non-nil, it unfolds folded fields.
977
978      If MUST-FOLD is non-nil and decoded result of an encoded-word has
979      folding or raw CR or LF, it unfolds or delete raw CR or LF.
980
981
982
983  -- Function: mime-eword/decode-string STRING &optional MUST-UNFOLD
984
985      It decodes encoded-words in STRING and returns decoded string.
986
987      If an encoded-word is broken or invalid, or it has non supported
988      MIME charset (*Note (tm-en)MIME charset::), it is not decoded.
989
990      If STRING is folded, it unfolds STRING before decoding.
991
992      If MUST-FOLD is non-nil and decoded result of an encoded-word has
993      folding or raw CR or LF, it unfolds or delete raw CR or LF.
994
995
996
997
998 \1f
999 File: tm-view-en.info, Node: Concept Index, Next: Function Index, Prev: API, Up: Top
1000
1001 Concept Index
1002 *************
1003
1004
1005 * Menu:
1006
1007 * content-body:                 content-body.           5.
1008 * content-filter:               content-body.           19.
1009 * content-filter:               Two buffers for an article.  21.
1010 * content-header-filter:        content-header.         25.
1011 * content-info:                 raw-article-buffer.     10.
1012 * content-number:               content-button.         15.
1013 * content-separator:            content-separator.      5.
1014 * decoding operation(s) (for a part): method.           8.
1015 * decoding-mode:                method.                 9.
1016 * external method:              method.                 19.
1017 * filter:                       Introduction.           17.
1018 * filter:                       Two buffers for an article.  23.
1019 * header-filter:                Two buffers for an article.  20.
1020 * internal method:              method.                 17.
1021 * method:                       Introduction.           14.
1022 * method:                       method.                 14.
1023 * preview-buffer:               Two buffers for an article.  8.
1024 * preview-content-info:         preview-buffer.         14.
1025 * raw-article-buffer:           Two buffers for an article.  6.
1026
1027
1028 \1f
1029 File: tm-view-en.info, Node: Function Index, Next: Variable Index, Prev: Concept Index, Up: Top
1030
1031 Function Index
1032 **************
1033
1034
1035 * Menu:
1036
1037 * mime-article/cnum-to-cinfo:   raw-article-buffer.     73.
1038 * mime-article/point-content-number: raw-article-buffer.  55.
1039 * mime-article/rcnum-to-cinfo:  raw-article-buffer.     64.
1040 * mime::content-info:           raw-article-buffer.     7.
1041 * mime/decode-message-header:   encoded-word decoding.  11.
1042 * mime-eword/decode-region:     encoded-word decoding.  20.
1043 * mime-eword/decode-string:     encoded-word decoding.  34.
1044 * mime/flatten-content-info:    raw-article-buffer.     82.
1045 * mime::preview-content-info:   preview-buffer.         12.
1046 * mime-preview/point-pcinfo:    preview-buffer.         63.
1047 * mime-viewer/body-visible-p:   content-body.           37.
1048 * mime-viewer/default-content-filter: content-body.     53.
1049 * mime-viewer/default-content-header-filter: content-header.  61.
1050 * mime-viewer/default-content-separator: content-separator.  17.
1051 * mime-viewer/header-visible-p: content-header.         45.
1052 * mime/viewer-mode:             API about MIME preview.  8.
1053 * set-atype:                    Example of decoding-condition.  57.
1054
1055
1056 \1f
1057 File: tm-view-en.info, Node: Variable Index, Prev: Function Index, Up: Top
1058
1059 Variable Index
1060 **************
1061
1062
1063 * Menu:
1064
1065 * mime::article/content-info:   raw-article-buffer.     45.
1066 * mime::article/preview-buffer: raw-article-buffer.     50.
1067 * mime::preview/article-buffer: preview-buffer.         45.
1068 * mime::preview/content-list:   preview-buffer.         38.
1069 * mime::preview/mother-buffer:  preview-buffer.         7.
1070 * mime::preview/original-major-mode: preview-buffer.    51.
1071 * mime::preview/original-window-configuration: preview-buffer.  57.
1072 * mime-viewer/childrens-header-showing-Content-Type-list: content-header.  34.
1073 * mime-viewer/content-button-ignored-ctype-list: content-button.  50.
1074 * mime-viewer/content-filter-alist: content-body.       46.
1075 * mime-viewer/content-header-filter-alist: content-header.  54.
1076 * mime-viewer/default-showing-Content-Type-list: content-body.  30.
1077 * mime-viewer/ignored-field-list: content-header.       70.
1078 \1f\f
1079 Tag table:
1080 Node: Top\7f162
1081 Node: Introduction\7f883
1082 Node: MIME display\7f1717
1083 Node: content-button\7f4001
1084 Node: content-header\7f5689
1085 Node: content-body\7f8326
1086 Node: content-separator\7f10238
1087 Node: mime/viewer-mode\7f11101
1088 Node: method\7f12253
1089 Node: decoding-condition\7f13342
1090 Node: method value\7f15115
1091 Node: Example of decoding-condition\7f16825
1092 Node: environment variables\7f19390
1093 Node: Two buffers for an article\7f19896
1094 Node: raw-article-buffer\7f21434
1095 Node: preview-buffer\7f23971
1096 Node: API\7f25642
1097 Node: API about MIME preview\7f26189
1098 Node: encoded-word decoding\7f27351
1099 Node: Concept Index\7f28774
1100 Node: Function Index\7f30062
1101 Node: Variable Index\7f31244
1102 \1f
1103 End tag table