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