comparison man/tm/tm-edit-en.texi @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 49a24b4fd526
children 54cc21c15cbb
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
1 \input texinfo.tex 1 @c $Id: tm-edit-en.texi,v 1.1.1.1 1996/12/18 22:43:52 steve Exp $
2 @setfilename tm-edit-en.info 2
3 @settitle{tm-edit 7.100 Reference Manual (English Version)} 3 @node tm-edit, encoded-word, tm-view, Top
4 @titlepage 4 @comment node-name, next, previous, up
5 @title tm-edit 7.100 Reference Manual (English Version) 5 @chapter tm-edit
6 @author MORIOKA Tomohiko <morioka@@jaist.ac.jp> 6 @cindex tm-edit
7 @subtitle 1996/12/25 7
8 @end titlepage 8 tm-edit is a general MIME viewer for GNU Emacs.
9 @node Top, Introduction, (dir), (dir) 9
10 @top tm-edit 7.100 Reference Manual (English Version) 10 tm-edit is based on mime.el by UMEDA Masanobu
11 11 <umerin@@mse.kyutech.ac.jp>, who is famous as the author of GNUS.
12 @ifinfo 12 tm-edit expands following points from mime.el:
13 13
14 This file documents tm-edit, a MIME composer for GNU Emacs. 14 @itemize @bullet
15 @end ifinfo 15 @item based on RFC 1521/1522
16 @item Content-Disposition field (RFC 1806) supports
17 @item multi-part in multi-part
18 @item PGP
19 @item strength automatic specification for parameter of file type
20 @end itemize
21
16 22
17 @menu 23 @menu
18 * Introduction:: What is tm-edit? 24 * mime/editor-mode::
19 * mime/editor-mode:: 25 * single-part operations::
20 * single-part operations:: 26 * enclosure operation::
21 * enclosure operation:: 27 * other operations of mime/editor-mode::
22 * other operations of mime/editor-mode::
23 * tag specification for inserted file:: Default media-type or encoding for inserted file
24 * transfer level::
25 * header:: Using non-ASCII characters in header
26 * PGP::
27 * Acknowledgments::
28 * Concept Index::
29 * Function Index::
30 * Variable Index::
31 @end menu 28 @end menu
32 29
33 @node Introduction, mime/editor-mode, Top, Top 30
34 @chapter What is tm-edit? 31 @node mime/editor-mode, single-part operations, tm-edit, tm-edit
35 @cindex tm-edit 32 @comment node-name, next, previous, up
36 33 @section mime/editor-mode
37 @strong{tm-edit} is a general MIME composer for GNU Emacs.@refill 34 @cindex mime/editor-mode
38 35
39 tm-edit is based on mime.el by UMEDA Masanobu 36 @emph{mime/editor-mode} is a minor mode to compose MIME message.
40 <umerin@@mse.kyutech.ac.jp>, who is famous as the author of 37 In this mode, @emph{tag} represents various kinds of data, you can
41 GNUS. tm-edit expands following points from @file{mime.el}: 38 edit multi-part message.
39
40 There are 2 kinds of @emph{tag}s:
42 41
43 @itemize @bullet 42 @itemize @bullet
44 @item 43 @item single-part tag
45 based on RFC 1521/1522 44 @item multi-part tag
46 @item
47 Content-Disposition field (@ref{(tm-en)Content-Disposition}) (RFC 1806)
48 supports
49 @item
50 nested multi-part message (@ref{(tm-en)multipart})
51 @item
52 PGP (@ref{PGP}) (PGP/MIME (RFC 2015) based on security multipart (RFC
53 1847) and application/pgp based on traditional PGP)
54 @item
55 strength automatic specification for parameter of file type
56 @end itemize
57
58
59 In tm-MUA (@ref{(tm-en)tm-MUA}), you can edit MIME message easily to use
60 tm-edit.
61
62
63 @node mime/editor-mode, single-part operations, Introduction, Top
64 @chapter mime/editor-mode
65 @cindex enclosure
66 @cindex multi-part ending tag
67 @cindex multi-part beginning tag
68 @cindex tag
69 @cindex mime/editor-mode
70
71 @strong{mime/editor-mode} is a minor mode to compose MIME message. In
72 this mode, @strong{tag} represents various kinds of data, you can edit
73 multi part (@ref{(tm-en)multipart}) message.@refill
74
75 There are 2 kinds of tags:
76
77 @itemize @bullet
78 @item
79 single-part tag
80 @item
81 multi-part tag
82 @end itemize 45 @end itemize
83 46
84 single-part tag represents single part, this form is following: 47 single-part tag represents single part, this form is following:
85 48
86 @example 49 @example
87 --[[TYPE/SUBTYPE;PARAMETERS][ENCODING] 50 --[[TYPE/SUBTYPE;PARAMETERS][ENCODING]
88 OPTIONAL-FIELDS] 51 OPTIONAL-FIELDS]
89 @end example 52 @end example
90 53
91 TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of 54 TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of
92 Content-Type field (@ref{(tm-en)Content-Type field}). TYPE/SUBTYPE is 55 Content-Type field. TYPE/SUBTYPE is required, PARAMETERS is optional.
93 required, PARAMETERS is optional.@refill 56
94 57 ENCODING indicates Content-Transfer-Encoding field. It is optional too.
95 ENCODING indicates Content-Transfer-Encoding field. It is optional 58
96 too.@refill 59 OPTIONAL-FIELDS is to represent another fields except Content-Type
97 60 field and Content-Transfer-Encoding field.
98 OPTIONAL-FIELDS is to represent another fields except Content-Type field 61
99 and Content-Transfer-Encoding field.@refill 62 multi-part tags represent multi part. They consist of a pair of
100 63 @emph{multi-part beginning tag} and @emph{multi-part ending tag}.
101 multi-part tags represent multi part (@ref{(tm-en)multipart}). They 64
102 consist of a pair of @strong{multi-part beginning tag} and 65 @emph{multi-part beginning tag}'s form is following:
103 @strong{multi-part ending tag}.@refill
104
105 multi-part beginning tag's form is following:@refill
106 66
107 @example 67 @example
108 --<<TYPE>>-@{ 68 --<<TYPE>>-@{
109 @end example 69 @end example
110 70
111 multi-part ending tag's form is following:@refill 71 @emph{multi-part ending tag}'s form is following:
112 72
113 @example 73 @example
114 --@}-<<TYPE>> 74 --@}-<<TYPE>>
115 @end example 75 @end example
116 76
117 A region from multi-part beginning tag to multi-part ending tag is 77 A region from multi-part beginning tag to multi-part ending tag is
118 called as @strong{enclosure}. 78 called as @emph{enclosure}.
119 79
120 80
121 @node single-part operations, enclosure operation, mime/editor-mode, Top 81 @node single-part operations, enclosure operation, mime/editor-mode, tm-edit
122 @chapter single-part operations 82 @comment node-name, next, previous, up
83 @section single-part operations
84 @cindex single-part
123 85
124 Operations to make single-part are following: 86 Operations to make single-part are following:
125 87
126 @table @kbd 88 @table @kbd
127 @item @key{C-c C-x C-t} 89 @item @key{C-c C-x C-t}
128 Insert single-part tag indicates text part. 90 Insert single-part tag indicates text part.
129 91
130 @item @key{C-c C-x C-i} 92 @item @key{C-c C-x C-i}
131 Insert file as a MIME attachment. If @kbd{C-u} is followed by it, it 93 Insert file as a MIME attachment.
132 asks media-type, subtype or encoding even if their default values are
133 specified. (cf. @ref{tag specification for inserted file})
134 94
135 @item @key{C-c C-x C-e} 95 @item @key{C-c C-x C-e}
136 Insert external part. 96 Insert external part.
137 97
138 @item @key{C-c C-x C-v} 98 @item @key{C-c C-x C-v}
139 Record audio input until @kbd{C-g} is pressed, and insert as a 99 Record audio input until @key{C-g} is pressed, and insert as a audio
140 audio part. (It requires /dev/audio in default.) 100 part. (It requires /dev/audio in default.)
141 101
142 @item @key{C-c C-x C-y} 102 @item @key{C-c C-x C-y}
143 Insert current (mail or news) message. (It is MUA depended.) 103 Insert current (mail or news) message. (It is MUA depended.)
144 104
145 @item @key{C-c C-x C-m} 105 @item @key{C-c C-x C-m}
146 Insert mail message. (It is MUA depended.) 106 Insert mail message. (It is MUA depended.)
147 107
148 @item @key{C-c C-x C-w}, @key{C-c C-x C-s} 108 @item @key{C-c C-x C-w, C-c C-x C-s}
149 Insert signature. 109 Insert signature.
150 110
151 @item @key{C-c C-x C-k} 111 @item @key{C-c C-x C-k}
152 Insert PGP (@ref{PGP}) public key. (It requires Mailcrypt package.) 112 Insert PGP public key. (It requires Mailcrypt package.)
153 113
154 @item @key{C-c C-x t} 114 @item @key{C-c C-x t}
155 Insert any single-part tag. 115 Insert any single-part tag.
156
157 @end table 116 @end table
158 117
159 118
160 119 @node enclosure operation, other operations of mime/editor-mode, single-part operations, tm-edit
161 @node enclosure operation, other operations of mime/editor-mode, single-part operations, Top 120 @comment node-name, next, previous, up
162 @chapter enclosure operation 121 @section enclosure operations
122 @cindex multi-part
123 @cindex enclosure
163 124
164 Operations to make enclosure are following: 125 Operations to make enclosure are following:
165 126
166 @table @kbd 127 @table @kbd
167 @item @key{C-c C-x a} 128 @item @key{C-c C-x a}
175 136
176 @item @key{C-c C-x d} 137 @item @key{C-c C-x d}
177 Enclose specified region as multipart/digest. 138 Enclose specified region as multipart/digest.
178 139
179 @item @key{C-c C-x s} 140 @item @key{C-c C-x s}
180 Digital-sign to specified region. (cf. @ref{PGP}) 141 Digital-sign to specified region. (*1)
181 142
182 @item @key{C-c C-x e} 143 @item @key{C-c C-x e}
183 Encrypt to specified region. (cf. @ref{PGP}) 144 Encrypt to specified region. (*1)
184
185 @item @key{C-c C-x q}
186 avoid to encode tags in specified region. In other words, tags is
187 interpreted as such string. (In current version, it may be
188 incomplete. Maybe PGP-signature does not work for this enclosure.)
189
190 @end table 145 @end table
191 146
192 147 @b{[Notice]}
193 148 @enumerate
194 @node other operations of mime/editor-mode, tag specification for inserted file, enclosure operation, Top 149 @item
195 @chapter other operations of mime/editor-mode 150 It requires Mailcrypt package and pgp package. In addition, please set
151 symbol @code{pgp-elkins} or @code{pgp-kazu} to
152 variable @code{mime-editor/signing-type} and
153 @code{mime-editor/encrypting-type}.
154
155 @code{pgp-elkins} indicates draft-elkins-pem-pgp-02.txt,
156 @code{pgp-kazu} indicates draft-kazu-pgp-mime-00.txt.
157 @end enumerate
158
159
160 @node other operations of mime/editor-mode, , enclosure operation, tm-edit
161 @comment node-name, next, previous, up
162 @section Another operation in mime/editor-mode.
196 163
197 There are another operations in mime/editor-mode. 164 There are another operations in mime/editor-mode.
198 165
199 @table @kbd 166 @table @kbd
200 @item @key{C-c C-c} 167 @item @key{C-c C-c}
201 Send current editing message. 168 Send current editing message.
202 169
203 @item @key{C-c C-x C-p} 170 @item @key{C-c C-x C-p}
204 Preview current editing message. (@ref{(tm-view-en)mime/viewer-mode}) 171 Preview current editing message.
205 172
206 @item @key{C-c C-x C-z} 173 @item @key{C-c C-x C-z}
207 Exit mime/editor-mode. (@key{M-x mime/edit-again} is available to 174 Exit mime/editor-mode. (@key{M-x mime/edit-again} is available to
208 reedit.) 175 reedit.)
209 176
210 @item @key{C-c C-x ?} 177 @item @key{C-c C-x ?}
211 Display help message. 178 Display help message.
212 179
213 @item @key{C-c C-x /} 180 @item @key{M-x mime-editor/set-split}
214 Set current editing message to enable automatic splitting or not. 181 Set current editing message to enable automatic splitting or not.
215 Form of automatic split messages is message/partial. 182 Form of automatic split messages is message/partial.
216 183
217 @item @key{C-c C-x 7} 184 @item @key{M-x mime-editor/set-sign}
218 Set 7bit (@ref{(tm-en)7bit}) to transfer level (@ref{transfer level}). 185 Set current editing message to digital-sign or not. (*1)
219 186
220 @item @key{C-c C-x 8} 187 @item @key{M-x mime-editor/set-encrypt}
221 Set 8bit (@ref{(tm-en)8bit}) to transfer level (@ref{transfer level}). 188 Set current editing message to encrypt or not. (*1)
222
223 @item @key{C-c C-x v}
224 Set current editing message to digital-sign or not. (cf. @ref{PGP})
225
226 @item @key{C-c C-x h}
227 Set current editing message to encrypt or not. (cf. @ref{PGP})
228
229 @end table 189 @end table
230 190
231 191 @b{[Notice]}
232 192 @enumerate
233 @node tag specification for inserted file, transfer level, other operations of mime/editor-mode, Top 193 @item
234 @chapter Default media-type or encoding for inserted file 194 It requires Mailcrypt package and pgp package. In addition, please set
235 195 symbol @code{pgp-elkins} or @code{pgp-kazu} to
236 When @kbd{C-c C-x C-i} (@code{mime-editor/insert-file}) is pressed, tag 196 variable @code{mime-editor/signing-type} and
237 parameters for inserted file, such as media-type or encoding, are 197 @code{mime-editor/encrypting-type}.
238 detected by variable @code{mime-file-types}.@refill 198
239 199 @code{pgp-elkins} indicates draft-elkins-pem-pgp-02.txt,
240 When @kbd{C-u} is followed by it or parameter is not found from the 200 @code{pgp-kazu} indicates draft-kazu-pgp-mime-00.txt.
241 variable, it asks from user. (When @kbd{C-u} is followed by it, 201 @end enumerate
242 detected value is used as default value)@refill
243
244 If you want to change default value for file names, please change
245 variable @code{mime-file-types}.
246
247
248 @defvar mime-file-types
249
250 Specification of default value of tag for file name of inserted
251 file.@refill
252
253 It is a list of following list:
254
255 @lisp
256 (FILE_PAT TYPE SUBTYPE PARAMS ENCODING
257 DISPOSITION_TYPE DISPOSITION_PARAMS)
258 @end lisp
259
260
261 Each elements of the list are following:
262
263 @table @samp
264 @item FILE_PAT
265 regular expression of file name
266
267 @item TYPE
268 media type
269
270 @item SUBTYPE
271 media subtype
272
273 @item PARAMS
274 parameters of Content-Type field
275
276 @item ENCODING
277 Content-Transfer-Encoding
278
279 @item DISPOSITION_TYPE
280 disposition-type
281
282 @item DISPOSITION_PARAMS
283 parameters of Content-Disposition field
284
285 @end table
286
287 @noindent
288 Example: Specify application/rtf as default media type for
289 @file{*.rtf}
290
291 @lisp
292 (call-after-loaded
293 'tm-edit
294 (lambda ()
295 (set-alist 'mime-file-types
296 "\\.rtf$"
297 '("application" "rtf" nil nil
298 "attachment" (("filename" . file)))
299 )))
300 @end lisp
301 @end defvar
302
303
304
305 @node transfer level, header, tag specification for inserted file, Top
306 @chapter transfer level
307 @cindex transfer level
308
309 Contents inserted in a message are represented by 7bit
310 (@ref{(tm-en)7bit}), 8bit (@ref{(tm-en)8bit}) or binary
311 (@ref{(tm-en)binary}).@refill
312
313 If a message is translated by 7bit-through MTA (@ref{(tm-en)MTA}), there
314 is no need to encode 7bit data, but 8bit and binary data must be encoded
315 to 7bit data.@refill
316
317 Similarly, if a message is translated by 8bit-through MTA, there is no
318 need to encode 7bit or 8bit data, but binary data must be encoded to
319 7bit or 8bit data.@refill
320
321 @noindent
322 @strong{[Memo]}
323 @quotation
324 EBCDIC MTA breaks 7bit data, so in this case, 7bit data must be
325 encoded by base64. But I don't know EBCDIC. (^_^;
326
327 Similarly, I wish ASCII-printable only MTA and code-conversion MTA
328 disappeared. (^_^;@refill
329
330 Maybe there are binary-through MTA, but I think it is not major.
331 @end quotation
332
333 @strong{transfer level} represents how range data is
334 available. tm-edit has a variable
335 @code{mime-editor/transfer-level} to represent transfer level.
336
337
338 @defvar mime-editor/transfer-level
339
340 transfer level.@refill
341
342 If transfer level of a data is over it, a data is encoded to
343 7bit.@refill
344
345 Currently, 7 or 8 is available. Default value is 7.@refill
346
347 In extension plan, EBCDIC will be 5, ASCII printable only will be 6,
348 binary will be 9. But it will not be implemented.
349 @end defvar
350
351
352
353 @noindent
354 @strong{[Memo]}
355 @quotation
356 transfer level is only for body, not for header (@ref{header}). RFC
357 1521 extends RFC 822 (@ref{(tm-en)RFC 822}) to use 8bit data in body,
358 but it requires to use us-ascii (@ref{(tm-en)us-ascii}) in header.
359 @end quotation
360
361
362
363 @node header, PGP, transfer level, Top
364 @chapter Using non-ASCII characters in header
365 @cindex encoded-word
366
367 RFC 1522 (@ref{(tm-en)RFC 1522}) defines representation of non-ASCII
368 characters in header.@refill
369
370 It is a format called as @strong{encoded-word}
371 (@ref{(tm-en)encoded-word}), it is available to represent every
372 non-ASCII characters by 7bit (@ref{(tm-en)7bit}) to declare MIME charset
373 (@ref{(tm-en)MIME charset}).
374
375
376 @menu
377 * evil setting in header:: If you can not allow encoded-word
378 * API about header:: Functions and variables about header
379 @end menu
380
381 @node evil setting in header, API about header, header, header
382 @section If you can not allow encoded-word
383
384 It is wrong to use ``raw'' non-ASCII characters in header not to use
385 encoded-word. Because there are various kinds of coded character set
386 (@ref{(tm-en)Coded character set}) in the Internet, so we can not
387 distinguish them if MIME charset (@ref{(tm-en)MIME charset}) is not
388 declared.@refill
389
390 For example, we can not distinguish iso-8859-1 (@ref{(tm-en)iso-8859-1})
391 and iso-8859-2 (@ref{(tm-en)iso-8859-2}) if MIME charset is not
392 declared.@refill
393
394 However you can not permit to use encoded-word, please set to
395 following variables:
396
397
398 @defvar mime/field-encoding-method-alist
399
400 Association-list to specify field encoding method. Its key is
401 field-name, value is encoding method.@refill
402
403 field-name allows string or @code{t} meaning any fields.@refill
404
405 Encoding method allows following: @code{nil} means no-conversion,
406 @code{mime} means to convert as encoded-word, symbol represent MIME
407 charset means to convert as the coded character set instead of to
408 convert as encoded-word.@refill
409
410 field-name is searched from string. If it is not found, @code{t} is
411 used.@refill
412
413 Default value of @code{mime/field-encoding-method-alist} is
414 following:
415
416 @lisp
417 (("X-Nsubject" . iso-2022-jp-2)
418 ("Newsgroups" . nil)
419 (t . mime)
420 ))
421 @end lisp
422 @end defvar
423
424
425 In addition, if you want to specify by coded character set instead of
426 field, please use @code{mime-eword/charset-encoding-alist}.
427 (cf. @ref{API about header})
428
429
430
431 @node API about header, , evil setting in header, header
432 @section Functions and variables about header
433
434 @deffn{Command} mime/encode-message-header &optional code-conversion
435
436 It translate non-ASCII characters in message header of current buffer
437 into network representation, such as encoded-words.@refill
438
439 If @var{code-conversion} is non-@code{nil}, field not encoded by
440 encoded-word is converted by @code{mime/field-encoding-method-alist}.
441 @end deffn
442
443
444 @defun mime/encode-field string
445
446 It encodes @var{string} into encoded-words as a field.@refill
447
448 Long lines are folded.
449 @end defun
450
451
452 @defun mime-eword/encode-string string &optional column mode
453
454 It encodes @var{string} into encoded-words.@refill
455
456 Long lines are folded.@refill
457
458 @var{column} specifies start column. If it is omitted, 0 is
459 used.@refill
460
461 @var{mode} specifies where @var{string} is in. Available values are
462 @code{text}, @code{comment}, @code{phrase}. If it is omitted,
463 @code{phrase} is used.
464 @end defun
465
466
467 @defvar mime-eword/charset-encoding-alist
468
469 Association-list of symbol represent MIME charset vs. nil, @code{"B"} or
470 @code{"Q"}.@refill
471
472 @code{nil} means not to encode as encoded-word. @code{"B"} means to use
473 B-encoding. @code{"Q"} means to use Q-encoding.
474 @end defvar
475
476
477
478 @node PGP, Acknowledgments, header, Top
479 @chapter PGP
480 @cindex PGP-kazu
481 @cindex PGP/MIME
482
483 tm-edit provides PGP encryption, signature and inserting public-key
484 features based on @strong{PGP/MIME} (@ref{(tm-en)PGP/MIME}) (RFC 2015)
485 or @strong{PGP-kazu} (@ref{(tm-en)PGP-kazu})
486 (draft-kazu-pgp-mime-00.txt).@refill
487
488 This feature requires pgp command and Mailcrypt package
489 (@ref{(mailcrypt)}).@refill
490
491 If you want to use this feature, please set @code{pgp-elkins} or
492 @code{pgp-kazu} to variable @code{mimed-editor/signing-type} and
493 variable @code{mime-editor/encrypting-type}.@refill
494
495 If @code{pgp-elkins} is specified, PGP/MIME is used. If
496 @code{pgp-kazu} is specified, PGP-kazu is used.
497
498
499 @defvar mime-editor/signing-type
500
501 Format of PGP signature.@refill
502
503 It allows @code{pgp-elkins} or @code{pgp-kazu}.@refill
504
505 Default value is @code{nil}.
506 @end defvar
507
508
509 @defvar mime-editor/encrypting-type
510
511 Format of PGP encryption.@refill
512
513 It allows @code{pgp-elkins} or @code{pgp-kazu}.@refill
514
515 Default value is @code{nil}.
516 @end defvar
517
518
519
520 @node Acknowledgments, Concept Index, PGP, Top
521 @chapter Acknowledgments
522
523 First of all, I thank UMEDA Masanobu for his work of @file{mime.el},
524 which is the origin of tm-edit, and permission to rewrite his work as
525 tm-edit.@refill
526
527 I thank members of two tm mailing lists, Japanese and English version.
528
529
530 @node Concept Index, Function Index, Acknowledgments, Top
531 @chapter Concept Index
532
533 @printindex cp
534
535 @node Function Index, Variable Index, Concept Index, Top
536 @chapter Function Index
537
538 @printindex fn
539
540 @node Variable Index, , Function Index, Top
541 @chapter Variable Index
542
543 @printindex vr
544 @bye