annotate man/tm/tm-view-m=en.texi @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 @c $Id: tm-view-m=en.texi,v 1.1.1.1 1996/12/18 22:43:52 steve Exp $
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3 @node method, Mechanism of tm-view, mime/viewer-mode, tm-view
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4 @comment node-name, next, previous, up
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 @section method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6 @cindex method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8 In @code{mime/viewer-mode}, you can do play (@key{v}), extract
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 (@key{e}), or print (@key{C-c C-p}) for each content. These operations
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 are called ``decoding operation(s) (for a content)''. And kind of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11 decoding operations are called @strong{decoding-mode}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13 When decoding operation is driven, tm-view calls a procedure matched
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14 for the condition, such as content-type. This procedure is called
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 @strong{method}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 There are two kinds of method. One is Emacs Lisp function, called
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18 @strong{internal method}. Another one is external program, called
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19 @strong{external method}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21 Internal method operates in Emacs, so it can do carefully.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23 External method is called as asynchronous process, so Emacs does not
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 wait while method is running. So it is good for big data, such as
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25 audio, image or video.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 @menu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28 * decoding-condition:: Setting of content decoding condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29 * Format of method value::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30 * Example of decoding-condition::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
31 * environment variables::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
32 @end menu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
33
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
34
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
35 @node decoding-condition, Format of method value, method, method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
36 @comment node-name, next, previous, up
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
37 @subsection Setting of content decoding condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38 @cindex content decoding condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 When decoding operation is driven, tm-view calls a method matched for
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 the condition searched from the variable
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 @code{mime/content-decoding-condition}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 Variable @code{mime/content-decoding-condition} is defined as a list
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 with the following syntax:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 (condition1 condition2 ...)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51 Each condition are association-list with the following syntax:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 ((field-type_1 . value_1)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 (field-type_2 . value_2)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56 ...)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59 For example, if you want to call the external method named tm-plain to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60 decode every text/plain type content, you can define the condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 like
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64 ((type . "text/plain")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 (method "tm-plain" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 As you notice, now you can define the arguments to pass to a external
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69 method. Refer to @xref{Format of method value} section for more
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70 explanation.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 This condition definition will match all contents whose types are
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73 text/plain. Here is an another example:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76 ((type . "text/plain")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78 (mode . "play"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 This will match the content whose type is text/plain and the mode is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82 play.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
84 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 (mode . "play"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
87 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89 This will match all contents which have a mode of play.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 The conditions defined in a mime/content-decoding-condition variable
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92 are examined from top to bottom. The first matching condition becomes
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 valid and the method specified in that condition definition will be
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 executed.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97 @node Format of method value, Example of decoding-condition, decoding-condition, method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 @comment node-name, next, previous, up
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99 @subsection Format of method value part
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100 @cindex Format of method value part
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102 You can specify the method field of the decoding-condition definition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103 in two different ways,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
106 (method . SYMBOL)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
107 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
108
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
109 or
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
110
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112 (method STRING FLAG ARGUMENT1 ARGUMENT2 ...)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 can be accepted.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
116
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
117 When a symbol is specified in the method field, a function whose name
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
118 is SYMBOL will be called as an internal method.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
119
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
120 When a list is specified in the method field, it will be called as an
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
121 external method.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
122
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123 The list below shows the meaning of the parameters when the external
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124 method is specified in the method field.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
125
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
126 @table @samp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
127 @item STRING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
128 name of an external method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
129 @item FLAG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
130 If @code{t}, both the content header and the content body are
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131 passed to an external method. if nil, only the content body is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 passed to an external method.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133 @item ARGUMENTs
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134 list of arguments passed to an external method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135 @end table
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 An argument passed to an external method can be in one of the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 following formats:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140 @table @samp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141 @item STRING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 string itself
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
143 @item 'SYMBOL
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 value gotten using SYMBOL as a key (see below)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 @item 'STRING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146 value gotten using STRING as a key (see below)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147 @end table
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149 'SYMBOL can be one of the following:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151 @table @samp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152 @item 'file
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
153 name of a file holding the original content
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154 @item 'type
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155 content-type/sub-type of Content-Type field
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 @item 'encoding
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157 field body of Content-Transfer-Encoding field
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158 @item 'mode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 decoding-mode
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 @item 'name
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161 name of a file created by decode operation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 @end table
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
164 'STRING is used to search a parameter of the Content-Type field whose
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 name matches with it, and pass the value of that parameter to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166 external method.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169 @node Example of decoding-condition, environment variables, Format of method value, method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170 @comment node-name, next, previous, up
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171 @subsection Examples of decoding-condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 @cindex Examples of decoding-condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
174 The default definition of a mime/content-decoding-condition variable
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
175 is shown below.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
176
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
177 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
178 (defvar mime/content-decoding-condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
179 '(((type . "text/plain")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
180 (method "tm-plain" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
181 ((type . "text/x-latex")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
182 (method "tm-latex" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
183 ((type . "audio/basic")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
184 (method "tm-au" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
185 ((type . "image/gif")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
186 (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
187 ((type . "image/jpeg")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
188 (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
189 ((type . "image/tiff")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
190 (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
191 ((type . "image/x-tiff")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
192 (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
193 ((type . "image/x-xbm")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
194 (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
195 ((type . "image/x-pic")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
196 (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
197 ((type . "video/mpeg")`
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
198 (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
199 ((type . "application/octet-stream")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
200 (method "tm-file" nil 'file 'type 'encoding 'mode 'name))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
201 ((type . "message/partial")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
202 (method . mime/decode-message/partial-region))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
203 ((method "metamail" t
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
204 "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
205 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
206 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
207
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
208 For example, if you want to use metamail to decode any contents,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
209
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
210 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
211 (setq mime/content-decoding-condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
212 '(
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
213 ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
214 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
215 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
216
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
217 will work.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
218
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
219 A mime/content-decoding-condition variable provides you of very flexible
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
220 way to define the conditions of decoding. It can be simple if you only
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
221 need the a few decoding methods, while it can be very complicated if you
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
222 want to use the separate decoding method for each type/mode combination.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
223
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
224 Following function may be useful to set decoding-condition. It is a
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
225 function of tl-atype.el.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
226
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
227
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
228 @deffn{Function} set-atype symbol alist
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
229
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
230 Add condition @var{alist} to symbol @var{symbol}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
231
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
232 Example:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
233
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
234 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
235 (set-atype 'mime/content-decoding-condition
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
236 '((type . "message/external-body")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
237 ("access-type" . "anon-ftp")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
238 (method . mime/decode-message/external-ftp)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
239 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
240 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
241 @end deffn
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
242
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
243
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
244 @node environment variables, , Example of decoding-condition, method
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
245 @comment node-name, next, previous, up
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
246 @subsection environment variables
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
247 @cindex environment variables
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
248
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
249 Standard methods of tm-view reference some environment variables. You
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
250 can specify them to customize.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
251
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
252 @table @var
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
253 @item TM_TMP_DIR
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
254 Directory for temporary files or extracted files. Default value is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
255 `/tmp/'.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
256
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
257 @item VIDEO_DITHER
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
258 Dither for mpeg_play. Default value is `gray'.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
259
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
260 @item TM_WWW_BROWSER
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
261 WWW browser name. Default value is `netscape'.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
262 @end table