This is tm-edit-en.info, produced by makeinfo version 4.6 from
tm-edit-en.texi.

START-INFO-DIR-ENTRY
* Tm-Edit-En::         MIME composer for GNU Emacs
END-INFO-DIR-ENTRY


File: tm-edit-en.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)

tm-edit 7.100 Reference Manual (English Version)
************************************************

This file documents tm-edit, a MIME composer for GNU Emacs.

* Menu:

* Introduction::                What is tm-edit?
* mime/editor-mode::
* single-part operations::
* enclosure operation::
* other operations of mime/editor-mode::
* tag specification for inserted file::  Default media-type or encoding for inserted file
* transfer level::
* header::                      Using non-ASCII characters in header
* PGP::
* Acknowledgments::
* Concept Index::
* Function Index::
* Variable Index::


File: tm-edit-en.info,  Node: Introduction,  Next: mime/editor-mode,  Prev: Top,  Up: Top

What is tm-edit?
****************

*tm-edit* is a general MIME composer for GNU Emacs.

   tm-edit is based on mime.el by UMEDA Masanobu
<umerin@mse.kyutech.ac.jp>, who is famous as the author of GNUS.
tm-edit expands following points from `mime.el':

   * based on RFC 1521/1522

   * Content-Disposition field (*Note (tm-en)Content-Disposition::)
     (RFC 1806) supports

   * nested multi-part message (*Note (tm-en)multipart::)

   * PGP (*Note PGP::) (PGP/MIME (RFC 2015) based on security multipart
     (RFC 1847) and application/pgp based on traditional PGP)

   * strength automatic specification for parameter of file type

   In tm-MUA (*Note (tm-en)tm-MUA::), you can edit MIME message easily
to use tm-edit.


File: tm-edit-en.info,  Node: mime/editor-mode,  Next: single-part operations,  Prev: Introduction,  Up: Top

mime/editor-mode
****************

*mime/editor-mode* is a minor mode to compose MIME message.  In this
mode, *tag* represents various kinds of data, you can edit multi part
(*Note (tm-en)multipart::) message.

   There are 2 kinds of tags:

   *  single-part tag

   *  multi-part tag

   single-part tag represents single part, this form is following:

             --[[TYPE/SUBTYPE;PARAMETERS][ENCODING]
             OPTIONAL-FIELDS]

   TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of
Content-Type field (*Note (tm-en)Content-Type field::).  TYPE/SUBTYPE is
required, PARAMETERS is optional.

   ENCODING indicates Content-Transfer-Encoding field.  It is optional
too.

   OPTIONAL-FIELDS is to represent another fields except Content-Type
field and Content-Transfer-Encoding field.

   multi-part tags represent multi part (*Note (tm-en)multipart::).
They consist of a pair of *multi-part beginning tag* and *multi-part
ending tag*.

   multi-part beginning tag's form is following:

             --<<TYPE>>-{

   multi-part ending tag's form is following:

             --}-<<TYPE>>

   A region from multi-part beginning tag to multi-part ending tag is
called as *enclosure*.


File: tm-edit-en.info,  Node: single-part operations,  Next: enclosure operation,  Prev: mime/editor-mode,  Up: Top

single-part operations
**********************

Operations to make single-part are following:

`<C-c C-x C-t>'
     Insert single-part tag indicates text part.

`<C-c C-x C-i>'
     Insert file as a MIME attachment.  If `C-u' is followed by it, it
     asks media-type, subtype or encoding even if their default values
     are specified. (cf. *Note tag specification for inserted file::)

`<C-c C-x C-e>'
     Insert external part.

`<C-c C-x C-v>'
     Record audio input until `C-g' is pressed, and insert as a audio
     part. (It requires /dev/audio in default.)

`<C-c C-x C-y>'
     Insert current (mail or news) message. (It is MUA depended.)

`<C-c C-x C-m>'
     Insert mail message. (It is MUA depended.)

`<C-c C-x C-w>, <C-c C-x C-s>'
     Insert signature.

`<C-c C-x C-k>'
     Insert PGP (*Note PGP::) public key. (It requires Mailcrypt
     package.)

`<C-c C-x t>'
     Insert any single-part tag.



File: tm-edit-en.info,  Node: enclosure operation,  Next: other operations of mime/editor-mode,  Prev: single-part operations,  Up: Top

enclosure operation
*******************

Operations to make enclosure are following:

`<C-c C-x a>'
     Enclose specified region as multipart/alternative.

`<C-c C-x p>'
     Enclose specified region as multipart/parallel.

`<C-c C-x m>'
     Enclose specified region as multipart/mixed.

`<C-c C-x d>'
     Enclose specified region as multipart/digest.

`<C-c C-x s>'
     Digital-sign to specified region. (cf. *Note PGP::)

`<C-c C-x e>'
     Encrypt to specified region. (cf. *Note PGP::)

`<C-c C-x q>'
     avoid to encode tags in specified region.  In other words, tags is
     interpreted as such string.  (In current version, it may be
     incomplete.  Maybe PGP-signature does not work for this enclosure.)



File: tm-edit-en.info,  Node: other operations of mime/editor-mode,  Next: tag specification for inserted file,  Prev: enclosure operation,  Up: Top

other operations of mime/editor-mode
************************************

There are another operations in mime/editor-mode.

`<C-c C-c>'
     Send current editing message.

`<C-c C-x C-p>'
     Preview current editing message. (*Note
     (tm-view-en)mime/viewer-mode::)

`<C-c C-x C-z>'
     Exit mime/editor-mode. (<M-x mime/edit-again> is available to
     reedit.)

`<C-c C-x ?>'
     Display help message.

`<C-c C-x />'
     Set current editing message to enable automatic splitting or not.
     Form of automatic split messages is message/partial.

`<C-c C-x 7>'
     Set 7bit (*Note (tm-en)7bit::) to transfer level (*Note transfer
     level::).

`<C-c C-x 8>'
     Set 8bit (*Note (tm-en)8bit::) to transfer level (*Note transfer
     level::).

`<C-c C-x v>'
     Set current editing message to digital-sign or not. (cf. *Note
     PGP::)

`<C-c C-x h>'
     Set current editing message to encrypt or not. (cf. *Note PGP::)



File: tm-edit-en.info,  Node: tag specification for inserted file,  Next: transfer level,  Prev: other operations of mime/editor-mode,  Up: Top

Default media-type or encoding for inserted file
************************************************

When `C-c C-x C-i' (`mime-editor/insert-file') is pressed, tag
parameters for inserted file, such as media-type or encoding, are
detected by variable `mime-file-types'.

   When `C-u' is followed by it or parameter is not found from the
variable, it asks from user.  (When `C-u' is followed by it, detected
value is used as default value)

   If you want to change default value for file names, please change
variable `mime-file-types'.

 - Variable: mime-file-types
     Specification of default value of tag for file name of inserted
     file.

     It is a list of following list:

          	(FILE_PAT TYPE SUBTYPE PARAMS ENCODING
          	 DISPOSITION_TYPE DISPOSITION_PARAMS)

     Each elements of the list are following:

    `FILE_PAT'
          regular expression of file name

    `TYPE'
          media type

    `SUBTYPE'
          media subtype

    `PARAMS'
          parameters of Content-Type field

    `ENCODING'
          Content-Transfer-Encoding

    `DISPOSITION_TYPE'
          disposition-type

    `DISPOSITION_PARAMS'
          parameters of Content-Disposition field


     Example: Specify application/rtf as default media type for `*.rtf'

          (call-after-loaded
           'tm-edit
           (lambda ()
             (set-alist 'mime-file-types
          	      "\\.rtf$"
          	      '("application" "rtf" nil nil
          		"attachment" (("filename" . file)))
          	      )))


File: tm-edit-en.info,  Node: transfer level,  Next: header,  Prev: tag specification for inserted file,  Up: Top

transfer level
**************

Contents inserted in a message are represented by 7bit (*Note
(tm-en)7bit::), 8bit (*Note (tm-en)8bit::) or binary (*Note
(tm-en)binary::).

   If a message is translated by 7bit-through MTA (*Note (tm-en)MTA::),
there is no need to encode 7bit data, but 8bit and binary data must be
encoded to 7bit data.

   Similarly, if a message is translated by 8bit-through MTA, there is
no need to encode 7bit or 8bit data, but binary data must be encoded to
7bit or 8bit data.

*[Memo]*

     EBCDIC MTA breaks 7bit data, so in this case, 7bit data must be
     encoded by base64.  But I don't know EBCDIC. (^_^;

     Similarly, I wish ASCII-printable only MTA and code-conversion MTA
     disappeared. (^_^;

     Maybe there are binary-through MTA, but I think it is not major.

   *transfer level* represents how range data is available.  tm-edit
has a variable `mime-editor/transfer-level' to represent transfer level.

 - Variable: mime-editor/transfer-level
     transfer level.

     If transfer level of a data is over it, a data is encoded to 7bit.

     Currently, 7 or 8 is available.  Default value is 7.

     In extension plan, EBCDIC will be 5, ASCII printable only will be
     6, binary will be 9.  But it will not be implemented.

*[Memo]*

     transfer level is only for body, not for header (*Note header::).
     RFC 1521 extends RFC 822 (*Note (tm-en)RFC 822::) to use 8bit data
     in body, but it requires to use us-ascii (*Note (tm-en)us-ascii::)
     in header.


File: tm-edit-en.info,  Node: header,  Next: PGP,  Prev: transfer level,  Up: Top

Using non-ASCII characters in header
************************************

RFC 1522 (*Note (tm-en)RFC 1522::) defines representation of non-ASCII
characters in header.

   It is a format called as *encoded-word* (*Note
(tm-en)encoded-word::), it is available to represent every non-ASCII
characters by 7bit (*Note (tm-en)7bit::) to declare MIME charset (*Note
(tm-en)MIME charset::).

* Menu:

* evil setting in header::      If you can not allow encoded-word
* API about header::            Functions and variables about header


File: tm-edit-en.info,  Node: evil setting in header,  Next: API about header,  Prev: header,  Up: header

If you can not allow encoded-word
=================================

It is wrong to use "raw" non-ASCII characters in header not to use
encoded-word.  Because there are various kinds of coded character set
(*Note (tm-en)Coded character set::) in the Internet, so we can not
distinguish them if MIME charset (*Note (tm-en)MIME charset::) is not
declared.

   For example, we can not distinguish iso-8859-1 (*Note
(tm-en)iso-8859-1::) and iso-8859-2 (*Note (tm-en)iso-8859-2::) if MIME
charset is not declared.

   However you can not permit to use encoded-word, please set to
following variables:

 - Variable: mime/field-encoding-method-alist
     Association-list to specify field encoding method.  Its key is
     field-name, value is encoding method.

     field-name allows string or `t' meaning any fields.

     Encoding method allows following: `nil' means no-conversion,
     `mime' means to convert as encoded-word, symbol represent MIME
     charset means to convert as the coded character set instead of to
     convert as encoded-word.

     field-name is searched from string.  If it is not found, `t' is
     used.

     Default value of `mime/field-encoding-method-alist' is following:

          (("X-Nsubject" . iso-2022-jp-2)
           ("Newsgroups" . nil)
           (t            . mime)
           ))

   In addition, if you want to specify by coded character set instead of
field, please use `mime-eword/charset-encoding-alist'.  (cf. *Note API
about header::)


File: tm-edit-en.info,  Node: API about header,  Prev: evil setting in header,  Up: header

Functions and variables about header
====================================

 - Command: mime/encode-message-header &optional code-conversion
     It translate non-ASCII characters in message header of current
     buffer into network representation, such as encoded-words.

     If CODE-CONVERSION is non-`nil', field not encoded by encoded-word
     is converted by `mime/field-encoding-method-alist'.

 - Function: mime/encode-field string
     It encodes STRING into encoded-words as a field.

     Long lines are folded.

 - Function: mime-eword/encode-string string &optional column mode
     It encodes STRING into encoded-words.

     Long lines are folded.

     COLUMN specifies start column.  If it is omitted, 0 is used.

     MODE specifies where STRING is in.  Available values are `text',
     `comment', `phrase'.  If it is omitted, `phrase' is used.

 - Variable: mime-eword/charset-encoding-alist
     Association-list of symbol represent MIME charset vs. nil, `"B"' or
     `"Q"'.

     `nil' means not to encode as encoded-word.  `"B"' means to use
     B-encoding.  `"Q"' means to use Q-encoding.


File: tm-edit-en.info,  Node: PGP,  Next: Acknowledgments,  Prev: header,  Up: Top

PGP
***

tm-edit provides PGP encryption, signature and inserting public-key
features based on *PGP/MIME* (*Note (tm-en)PGP/MIME::) (RFC 2015) or
*PGP-kazu* (*Note (tm-en)PGP-kazu::) (draft-kazu-pgp-mime-00.txt).

   This feature requires pgp command and Mailcrypt package (*Note
(mailcrypt)::).

   If you want to use this feature, please set `pgp-elkins' or
`pgp-kazu' to variable `mimed-editor/signing-type' and variable
`mime-editor/encrypting-type'.

   If `pgp-elkins' is specified, PGP/MIME is used.  If `pgp-kazu' is
specified, PGP-kazu is used.

 - Variable: mime-editor/signing-type
     Format of PGP signature.

     It allows `pgp-elkins' or `pgp-kazu'.

     Default value is `nil'.

 - Variable: mime-editor/encrypting-type
     Format of PGP encryption.

     It allows `pgp-elkins' or `pgp-kazu'.

     Default value is `nil'.


File: tm-edit-en.info,  Node: Acknowledgments,  Next: Concept Index,  Prev: PGP,  Up: Top

Acknowledgments
***************

First of all, I thank UMEDA Masanobu for his work of `mime.el', which
is the origin of tm-edit, and permission to rewrite his work as tm-edit.

   I thank members of two tm mailing lists, Japanese and English
version.


File: tm-edit-en.info,  Node: Concept Index,  Next: Function Index,  Prev: Acknowledgments,  Up: Top

Concept Index
*************

* Menu:

* enclosure:                             mime/editor-mode.
* encoded-word:                          header.
* mime/editor-mode:                      mime/editor-mode.
* multi-part beginning tag:              mime/editor-mode.
* multi-part ending tag:                 mime/editor-mode.
* PGP-kazu:                              PGP.
* PGP/MIME:                              PGP.
* tag:                                   mime/editor-mode.
* tm-edit:                               Introduction.
* transfer level:                        transfer level.


File: tm-edit-en.info,  Node: Function Index,  Next: Variable Index,  Prev: Concept Index,  Up: Top

Function Index
**************

* Menu:

* mime-eword/encode-string:              API about header.
* mime/encode-field:                     API about header.
* mime/encode-message-header:            API about header.


File: tm-edit-en.info,  Node: Variable Index,  Prev: Function Index,  Up: Top

Variable Index
**************

* Menu:

* mime-editor/encrypting-type:           PGP.
* mime-editor/signing-type:              PGP.
* mime-editor/transfer-level:            transfer level.
* mime-eword/charset-encoding-alist:     API about header.
* mime-file-types:                       tag specification for inserted file.
* mime/field-encoding-method-alist:      evil setting in header.



Tag Table:
Node: Top173
Node: Introduction851
Node: mime/editor-mode1667
Node: single-part operations2984
Node: enclosure operation4020
Node: other operations of mime/editor-mode4880
Node: tag specification for inserted file5970
Node: transfer level7645
Node: header9277
Node: evil setting in header9892
Node: API about header11486
Node: PGP12697
Node: Acknowledgments13628
Node: Concept Index13973
Node: Function Index14664
Node: Variable Index14985

End Tag Table
