2 @setfilename tm-edit-en.info
3 @settitle tm-edit 7.100 Reference Manual (English Version)
5 * Tm-Edit-En:: MIME composer for GNU Emacs
8 @title tm-edit 7.100 Reference Manual (English Version)
9 @author MORIOKA Tomohiko <morioka@@jaist.ac.jp>
12 @node Top, Introduction, (dir), (dir)
13 @top tm-edit 7.100 Reference Manual (English Version)
17 This file documents tm-edit, a MIME composer for GNU Emacs.
21 * Introduction:: What is tm-edit?
23 * single-part operations::
24 * enclosure operation::
25 * other operations of mime/editor-mode::
26 * tag specification for inserted file:: Default media-type or encoding for inserted file
28 * header:: Using non-ASCII characters in header
36 @node Introduction, mime/editor-mode, Top, Top
37 @chapter What is tm-edit?
40 @strong{tm-edit} is a general MIME composer for GNU Emacs.@refill
42 tm-edit is based on mime.el by UMEDA Masanobu
43 <umerin@@mse.kyutech.ac.jp>, who is famous as the author of
44 GNUS. tm-edit expands following points from @file{mime.el}:
48 based on RFC 1521/1522
50 Content-Disposition field (@ref{(tm-en)Content-Disposition}) (RFC 1806)
53 nested multi-part message (@ref{(tm-en)multipart})
55 PGP (@ref{PGP}) (PGP/MIME (RFC 2015) based on security multipart (RFC
56 1847) and application/pgp based on traditional PGP)
58 strength automatic specification for parameter of file type
62 In tm-MUA (@ref{(tm-en)tm-MUA}), you can edit MIME message easily to use
66 @node mime/editor-mode, single-part operations, Introduction, Top
67 @chapter mime/editor-mode
69 @cindex multi-part ending tag
70 @cindex multi-part beginning tag
72 @cindex mime/editor-mode
74 @strong{mime/editor-mode} is a minor mode to compose MIME message. In
75 this mode, @strong{tag} represents various kinds of data, you can edit
76 multi part (@ref{(tm-en)multipart}) message.@refill
78 There are 2 kinds of tags:
87 single-part tag represents single part, this form is following:
90 --[[TYPE/SUBTYPE;PARAMETERS][ENCODING]
94 TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of
95 Content-Type field (@ref{(tm-en)Content-Type field}). TYPE/SUBTYPE is
96 required, PARAMETERS is optional.@refill
98 ENCODING indicates Content-Transfer-Encoding field. It is optional
101 OPTIONAL-FIELDS is to represent another fields except Content-Type field
102 and Content-Transfer-Encoding field.@refill
104 multi-part tags represent multi part (@ref{(tm-en)multipart}). They
105 consist of a pair of @strong{multi-part beginning tag} and
106 @strong{multi-part ending tag}.@refill
108 multi-part beginning tag's form is following:@refill
114 multi-part ending tag's form is following:@refill
120 A region from multi-part beginning tag to multi-part ending tag is
121 called as @strong{enclosure}.
124 @node single-part operations, enclosure operation, mime/editor-mode, Top
125 @chapter single-part operations
127 Operations to make single-part are following:
130 @item @key{C-c C-x C-t}
131 Insert single-part tag indicates text part.
133 @item @key{C-c C-x C-i}
134 Insert file as a MIME attachment. If @kbd{C-u} is followed by it, it
135 asks media-type, subtype or encoding even if their default values are
136 specified. (cf. @ref{tag specification for inserted file})
138 @item @key{C-c C-x C-e}
139 Insert external part.
141 @item @key{C-c C-x C-v}
142 Record audio input until @kbd{C-g} is pressed, and insert as a
143 audio part. (It requires /dev/audio in default.)
145 @item @key{C-c C-x C-y}
146 Insert current (mail or news) message. (It is MUA depended.)
148 @item @key{C-c C-x C-m}
149 Insert mail message. (It is MUA depended.)
151 @item @key{C-c C-x C-w}, @key{C-c C-x C-s}
154 @item @key{C-c C-x C-k}
155 Insert PGP (@ref{PGP}) public key. (It requires Mailcrypt package.)
157 @item @key{C-c C-x t}
158 Insert any single-part tag.
164 @node enclosure operation, other operations of mime/editor-mode, single-part operations, Top
165 @chapter enclosure operation
167 Operations to make enclosure are following:
170 @item @key{C-c C-x a}
171 Enclose specified region as multipart/alternative.
173 @item @key{C-c C-x p}
174 Enclose specified region as multipart/parallel.
176 @item @key{C-c C-x m}
177 Enclose specified region as multipart/mixed.
179 @item @key{C-c C-x d}
180 Enclose specified region as multipart/digest.
182 @item @key{C-c C-x s}
183 Digital-sign to specified region. (cf. @ref{PGP})
185 @item @key{C-c C-x e}
186 Encrypt to specified region. (cf. @ref{PGP})
188 @item @key{C-c C-x q}
189 avoid to encode tags in specified region. In other words, tags is
190 interpreted as such string. (In current version, it may be
191 incomplete. Maybe PGP-signature does not work for this enclosure.)
197 @node other operations of mime/editor-mode, tag specification for inserted file, enclosure operation, Top
198 @chapter other operations of mime/editor-mode
200 There are another operations in mime/editor-mode.
204 Send current editing message.
206 @item @key{C-c C-x C-p}
207 Preview current editing message. (@ref{(tm-view-en)mime/viewer-mode})
209 @item @key{C-c C-x C-z}
210 Exit mime/editor-mode. (@key{M-x mime/edit-again} is available to
213 @item @key{C-c C-x ?}
214 Display help message.
216 @item @key{C-c C-x /}
217 Set current editing message to enable automatic splitting or not.
218 Form of automatic split messages is message/partial.
220 @item @key{C-c C-x 7}
221 Set 7bit (@ref{(tm-en)7bit}) to transfer level (@ref{transfer level}).
223 @item @key{C-c C-x 8}
224 Set 8bit (@ref{(tm-en)8bit}) to transfer level (@ref{transfer level}).
226 @item @key{C-c C-x v}
227 Set current editing message to digital-sign or not. (cf. @ref{PGP})
229 @item @key{C-c C-x h}
230 Set current editing message to encrypt or not. (cf. @ref{PGP})
236 @node tag specification for inserted file, transfer level, other operations of mime/editor-mode, Top
237 @chapter Default media-type or encoding for inserted file
239 When @kbd{C-c C-x C-i} (@code{mime-editor/insert-file}) is pressed, tag
240 parameters for inserted file, such as media-type or encoding, are
241 detected by variable @code{mime-file-types}.@refill
243 When @kbd{C-u} is followed by it or parameter is not found from the
244 variable, it asks from user. (When @kbd{C-u} is followed by it,
245 detected value is used as default value)@refill
247 If you want to change default value for file names, please change
248 variable @code{mime-file-types}.
251 @defvar mime-file-types
253 Specification of default value of tag for file name of inserted
256 It is a list of following list:
259 (FILE_PAT TYPE SUBTYPE PARAMS ENCODING
260 DISPOSITION_TYPE DISPOSITION_PARAMS)
264 Each elements of the list are following:
268 regular expression of file name
277 parameters of Content-Type field
280 Content-Transfer-Encoding
282 @item DISPOSITION_TYPE
285 @item DISPOSITION_PARAMS
286 parameters of Content-Disposition field
291 Example: Specify application/rtf as default media type for
298 (set-alist 'mime-file-types
300 '("application" "rtf" nil nil
301 "attachment" (("filename" . file)))
308 @node transfer level, header, tag specification for inserted file, Top
309 @chapter transfer level
310 @cindex transfer level
312 Contents inserted in a message are represented by 7bit
313 (@ref{(tm-en)7bit}), 8bit (@ref{(tm-en)8bit}) or binary
314 (@ref{(tm-en)binary}).@refill
316 If a message is translated by 7bit-through MTA (@ref{(tm-en)MTA}), there
317 is no need to encode 7bit data, but 8bit and binary data must be encoded
320 Similarly, if a message is translated by 8bit-through MTA, there is no
321 need to encode 7bit or 8bit data, but binary data must be encoded to
322 7bit or 8bit data.@refill
327 EBCDIC MTA breaks 7bit data, so in this case, 7bit data must be
328 encoded by base64. But I don't know EBCDIC. (^_^;
330 Similarly, I wish ASCII-printable only MTA and code-conversion MTA
331 disappeared. (^_^;@refill
333 Maybe there are binary-through MTA, but I think it is not major.
336 @strong{transfer level} represents how range data is
337 available. tm-edit has a variable
338 @code{mime-editor/transfer-level} to represent transfer level.
341 @defvar mime-editor/transfer-level
343 transfer level.@refill
345 If transfer level of a data is over it, a data is encoded to
348 Currently, 7 or 8 is available. Default value is 7.@refill
350 In extension plan, EBCDIC will be 5, ASCII printable only will be 6,
351 binary will be 9. But it will not be implemented.
359 transfer level is only for body, not for header (@ref{header}). RFC
360 1521 extends RFC 822 (@ref{(tm-en)RFC 822}) to use 8bit data in body,
361 but it requires to use us-ascii (@ref{(tm-en)us-ascii}) in header.
366 @node header, PGP, transfer level, Top
367 @chapter Using non-ASCII characters in header
370 RFC 1522 (@ref{(tm-en)RFC 1522}) defines representation of non-ASCII
371 characters in header.@refill
373 It is a format called as @strong{encoded-word}
374 (@ref{(tm-en)encoded-word}), it is available to represent every
375 non-ASCII characters by 7bit (@ref{(tm-en)7bit}) to declare MIME charset
376 (@ref{(tm-en)MIME charset}).
380 * evil setting in header:: If you can not allow encoded-word
381 * API about header:: Functions and variables about header
384 @node evil setting in header, API about header, header, header
385 @section If you can not allow encoded-word
387 It is wrong to use ``raw'' non-ASCII characters in header not to use
388 encoded-word. Because there are various kinds of coded character set
389 (@ref{(tm-en)Coded character set}) in the Internet, so we can not
390 distinguish them if MIME charset (@ref{(tm-en)MIME charset}) is not
393 For example, we can not distinguish iso-8859-1 (@ref{(tm-en)iso-8859-1})
394 and iso-8859-2 (@ref{(tm-en)iso-8859-2}) if MIME charset is not
397 However you can not permit to use encoded-word, please set to
401 @defvar mime/field-encoding-method-alist
403 Association-list to specify field encoding method. Its key is
404 field-name, value is encoding method.@refill
406 field-name allows string or @code{t} meaning any fields.@refill
408 Encoding method allows following: @code{nil} means no-conversion,
409 @code{mime} means to convert as encoded-word, symbol represent MIME
410 charset means to convert as the coded character set instead of to
411 convert as encoded-word.@refill
413 field-name is searched from string. If it is not found, @code{t} is
416 Default value of @code{mime/field-encoding-method-alist} is
420 (("X-Nsubject" . iso-2022-jp-2)
428 In addition, if you want to specify by coded character set instead of
429 field, please use @code{mime-eword/charset-encoding-alist}.
430 (cf. @ref{API about header})
434 @node API about header, , evil setting in header, header
435 @section Functions and variables about header
437 @deffn{Command} mime/encode-message-header &optional code-conversion
439 It translate non-ASCII characters in message header of current buffer
440 into network representation, such as encoded-words.@refill
442 If @var{code-conversion} is non-@code{nil}, field not encoded by
443 encoded-word is converted by @code{mime/field-encoding-method-alist}.
447 @defun mime/encode-field string
449 It encodes @var{string} into encoded-words as a field.@refill
451 Long lines are folded.
455 @defun mime-eword/encode-string string &optional column mode
457 It encodes @var{string} into encoded-words.@refill
459 Long lines are folded.@refill
461 @var{column} specifies start column. If it is omitted, 0 is
464 @var{mode} specifies where @var{string} is in. Available values are
465 @code{text}, @code{comment}, @code{phrase}. If it is omitted,
466 @code{phrase} is used.
470 @defvar mime-eword/charset-encoding-alist
472 Association-list of symbol represent MIME charset vs. nil, @code{"B"} or
475 @code{nil} means not to encode as encoded-word. @code{"B"} means to use
476 B-encoding. @code{"Q"} means to use Q-encoding.
481 @node PGP, Acknowledgments, header, Top
486 tm-edit provides PGP encryption, signature and inserting public-key
487 features based on @strong{PGP/MIME} (@ref{(tm-en)PGP/MIME}) (RFC 2015)
488 or @strong{PGP-kazu} (@ref{(tm-en)PGP-kazu})
489 (draft-kazu-pgp-mime-00.txt).@refill
491 This feature requires pgp command and Mailcrypt package
492 (@ref{(mailcrypt)}).@refill
494 If you want to use this feature, please set @code{pgp-elkins} or
495 @code{pgp-kazu} to variable @code{mimed-editor/signing-type} and
496 variable @code{mime-editor/encrypting-type}.@refill
498 If @code{pgp-elkins} is specified, PGP/MIME is used. If
499 @code{pgp-kazu} is specified, PGP-kazu is used.
502 @defvar mime-editor/signing-type
504 Format of PGP signature.@refill
506 It allows @code{pgp-elkins} or @code{pgp-kazu}.@refill
508 Default value is @code{nil}.
512 @defvar mime-editor/encrypting-type
514 Format of PGP encryption.@refill
516 It allows @code{pgp-elkins} or @code{pgp-kazu}.@refill
518 Default value is @code{nil}.
523 @node Acknowledgments, Concept Index, PGP, Top
524 @chapter Acknowledgments
526 First of all, I thank UMEDA Masanobu for his work of @file{mime.el},
527 which is the origin of tm-edit, and permission to rewrite his work as
530 I thank members of two tm mailing lists, Japanese and English version.
533 @node Concept Index, Function Index, Acknowledgments, Top
534 @chapter Concept Index
538 @node Function Index, Variable Index, Concept Index, Top
539 @chapter Function Index
543 @node Variable Index, , Function Index, Top
544 @chapter Variable Index