(How to get the latest version): Deleted.
[elisp/tm.git] / README.en
1 [README for tm (English Version)]
2 by MORIOKA Tomohiko <tomo@m17n.org>
3 and KOBAYASHI Shuhei <shuhei@aqua.ocn.ne.jp>
4
5 1 What's tm?
6
7   tm is a MIME package for GNU Emacs. tm has following functions:
8
9         - MIME style multilingual header
10         - MIME message viewer (mime/viewer-mode)
11         - MIME message composer (mime/editor-mode)
12         - MIME extenders for mh-e, GNUS, Gnus, RMAIL and VM
13
14
15 2 Documents
16
17   This package includes the following documents.
18
19 (1) English edition
20
21 - SGML (sinfo)
22   - tm/doc/tm-en.sgml           : tm Reference Manual
23   - tm/doc/tm-view-en.sgml      : tm-view Reference Manual
24   - tm/doc/tm-edit-en.sgml      : tm-edit Reference Manual
25   - tm-mh-e/tm-mh-e-en.sgml     : tm-mh-e Reference Manual
26   - gnus-mime/gnus-mime-en.sgml : gnus-mime Reference Manual
27
28 - Texinfo
29   - tm/doc/tm-en.texi           : tm Reference Manual
30   - tm/doc/tm-view-en.texi      : tm-view Reference Manual
31   - tm/doc/tm-edit-en.texi      : tm-edit Reference Manual
32   - tm-mh-e/tm-mh-e-en.texi     : tm-mh-e Reference Manual
33   - gnus-mime/gnus-mime-en.texi : gnus-mime Reference Manual
34   - tm-vm/tm-vm-en.texi         : tm-vm Reference Manual
35
36 - info
37   - tm/doc/tm-en.info           : tm Reference Manual
38   - tm/doc/tm-view-en.info      : tm-view Reference Manual
39   - tm/doc/tm-edit-en.info      : tm-edit Reference Manual
40   - tm-mh-e/tm-mh-e-en.info     : tm-mh-e Reference Manual
41   - gnus-mime/gnus-mime-en.info : gnus-mime Reference Manual
42   - tm-vm/tm-vm-en.info         : tm-vm Reference Manual
43
44 (2) Japanese edition
45
46 - SGML (sinfo)
47   - tm/doc/tm-ja.sgml           : tm Reference Manual
48   - tm/doc/tm-view-ja.sgml      : tm-view Reference Manual
49   - tm/doc/tm-edit-ja.sgml      : tm-edit Reference Manual
50   - tm-mh-e/tm-mh-e-ja.sgml     : tm-mh-e Reference Manual
51   - gnus-mime/gnus-mime-ja.sgml : gnus-mime Reference Manual
52
53 - Texinfo
54   - tm/doc/tm-ja.texi           : tm Reference Manual
55   - tm/doc/tm-view-ja.texi      : tm-view Reference Manual
56   - tm/doc/tm-edit-ja.texi      : tm-edit Reference Manual
57   - tm-mh-e/tm-mh-e-ja.texi     : tm-mh-e Reference Manual
58   - gnus-mime/gnus-mime-ja.texi : gnus-mime Reference Manual
59
60 - info
61   - tm/doc/tm-ja.info           : tm Reference Manual
62   - tm/doc/tm-view-ja.info      : tm-view Reference Manual
63   - tm/doc/tm-edit-ja.info      : tm-edit Reference Manual
64   - tm-mh-e/tm-mh-e-ja.info     : tm-mh-e Reference Manual
65   - gnus-mime/gnus-mime-ja.info : gnus-mime Reference Manual
66
67 - other format
68   - tm/doc/signature-jp.ol : signature.el Reference Manual (Emacs Outline)
69   - tm/doc/signature-jp.tex: signature.el Reference Manual (LaTeX)
70   - tm/doc/tm-charset_ja.ol: How to use character codes in tm (Emacs Outline)
71   - tm/doc/tm-charset_ja.tex: How to use character codes in tm (LaTeX)
72
73
74 3 Modules
75
76   tm has following modules:
77
78         - tm-view : MIME viewer
79                 - tm-parse.el : MIME message parser
80                 - tm-play.el  : MIME content player
81         - preview filter for tm-view
82                 - tm-text    : for text/*
83                 - tm-image   : for image/* and X-Face
84         - internal methods for tm-view
85                 - tm-partial : automatic assembler for message/partial
86                 - tm-ftp     : for anonymous ftp
87                 - tm-file    : for file extraction
88                 - tm-tar     : for tar content
89                 - tm-latex   : for LaTeX
90                 - tm-html    : for text/html
91                 - tm-pgp     : for PGP
92         - tm-edit : MIME composer (mime.el and tm-comp.el were merged)
93                 - tm-edit-mc.el : tm-edit interface for Mailcrypt
94                 - tm-edit-tipgp.el : tm-edit interface for TinyPgp.el
95         - tm-def  : definition module for tm
96         - tm-MUAs : MIME extender for MUAs
97                 - tm-mh-e   : tm-MUA for mh-e
98                 - gnus-mime : tm-MUA for Gnus
99                 - tm-gnus   : tm-MUA for GNUS
100                 - tm-rmail  : tm-MUA for RMAIL
101                 - tm-vm     : tm-MUA for vm
102                 - tm-mail   : tm-MUA library module for mail-mode
103         - mime-setup: set up module for MIME
104                 - tm-setup: set up only reading
105
106
107 4 Install
108
109 4.1 edit tm/TM-CFG (optional)
110
111   You can edit tm/TM-CFG file.
112
113   By default, tm is installed into /usr/local/. If you want to change this,
114 please modify the variables `PREFIX' and `EXEC_PREFIX'.
115
116
117 4.2 edit external methods (optional)
118
119   You can edit external methods in `tm/methods/' directory for your
120 environment.
121
122         tm/methods/tm-au        for audio
123         tm/methods/tm-file      for file extraction
124         tm/methods/tm-image     for image
125         tm/methods/tm-mpeg      for MPEG
126         tm/methods/tm-plain     for plain text
127         tm/methods/tm-html      for HTML
128         tm/methods/tmdecode     decoder
129
130   By default, tmdecode uses the `mmencode' command, which is part of
131 the metamail package (available by anonymous ftp from
132 ftp://thumper.bellcore.com/pub/nsb).  If you don't have the metamail
133 package, please modify tmdecode to use decode-b instead of mmencode.
134
135
136 4.3 make
137
138   Run `make all'.
139
140   You can specify the Emacs command name, for example if you want to use
141 `mule' as the Emacs command:
142
143         % make all EMACS=mule
144
145
146 4.4 install
147
148   Run `make install'.
149
150   You can specify the Emacs command name, for example if you want to use
151 `xemacs' as the Emacs command:
152
153         % make install EMACS=xemacs
154
155
156 6 .emacs
157
158   Please insert `(load "mime-setup")' in ~/.emacs.
159
160
161 6.1 gnus-mime
162
163   gnus-mime provides automatic MIME preview feature for Gnus.
164
165   If you don't want to use automatic MIME preview feature, please
166 insert in ~/.emacs:
167
168         (setq gnus-show-mime nil)
169
170   In addition, Gnus 5.2 is designed to support automatic MIME preview
171 feature.  Of course, gnus-mime provides this feature for Gnus 5.0.*
172 and Gnus 5.1.*, but it is unnatural.
173
174   When automatic MIME preview mode, Gnus do MIME processing if a
175 message has a Mime-Version field.  If it does not have one, Gnus does
176 not do MIME processing, in default.
177
178   Gnus 5.0.*, 5.1 and Gnus 5.2 have a variable `gnus-strict-mime'.  If
179 you insert
180
181         (setq gnus-strict-mime nil)
182
183 Gnus does MIME processing even if a message does not have a
184 Mime-Version field.
185
186   In Gnus 5.2, if `gnus-strict-mime' is not nil, variable
187 `gnus-decode-encoded-word-method' is called.  gnus-mime uses it to
188 decode RFC 2047 encoded-words.  So it is not necessary to reset
189 `gnus-strict-mime'.
190
191
192 6.2 tm-gnus
193
194   tm-gnus provides automatic MIME preview feature for GNUS 3.15 or
195 later.
196
197   If you don't want to use automatic MIME preview feature, please
198 insert in ~/.emacs:
199
200         (setq tm-gnus/automatic-mime-preview nil)
201
202
203 6.3 VM
204
205   If you use vm, please insert `(require 'tm-vm)' in ~/.vm.
206
207   tm works well with BBDB: If you use VM, please insert
208 (require 'tm-vm) *after* (bbdb-insinuate-vm).
209
210   Important changes have been made to the VM interface in TM v7.102,
211 users upgrading from an earlier version should read the documentation
212 of tm-vm (`News' section) for details.
213
214
215 6.4 PGP
216
217   If you have the PGP and Mailcrypt packages, you can use PGP with
218 MIME. Currently, PGP/MIME (RFC 2015) and draft-kazu-pgp-mime-00.txt
219 are proposed, so tm provides both ways.
220
221   For decoding, please insert the following into ~/.emacs:
222
223 ======================================================================
224 (call-after-loaded
225  'tm-view
226  (function
227   (lambda ()
228     (require 'tm-pgp)
229     )))
230 ======================================================================
231
232 tm-pgp.el is an internal method module to support PGP.
233
234   For encoding, tm-edit provides 2 mechanisms. One is for signing or
235 encrypting for message as application/pgp. There are two commands,
236 `mime-editor/set-sign' and `mime-editor/set-encrypt'. They set a
237 message as signed, encrypted or not.
238
239   Another one is for content. There are 2 kinds of enclosures for PGP:
240 ``signed'' and ``encrypted''. Their enclosure are bound to key and
241 menu. If you use this mechanism, please specify 2 variables:
242 `mime-editor/signing-type' and `mime-editor/encrypting-type'. They
243 requires following values:
244
245         pgp-elkins      processed as PGP/MIME (RFC 2015)
246         pgp-kazu        processed as draft-kazu-pgp-mime-00.txt
247         nil             not processed
248
249 If you use ``signed'' and ``encrypted'' as PGP/MIME, please insert
250 into ~/.emacs:
251
252 ======================================================================
253 (setq mime-editor/signing-type    'pgp-elkins)
254 (setq mime-editor/encrypting-type 'pgp-elkins)
255 ======================================================================
256
257 If you use ``signed'' and ``encrypted'' as draft-kazu-pgp-mime-00.txt,
258 please insert into ~/.emacs:
259
260 ======================================================================
261 (setq mime-editor/signing-type    'pgp-kazu)
262 (setq mime-editor/encrypting-type 'pgp-kazu)
263 ======================================================================
264
265
266 6.5 code sample for hilit19
267
268 ======================================================================
269 (cond (window-system
270        (require 'hilit19)
271        (let* ((csubject-patterns '(("^\\[.+\\]$" nil msg-subject)))
272               (header-patterns '(("^Subject:.*$" nil msg-subject)
273                                  ("^From:.*$" nil msg-from)
274                                  ("^--text follows this line--$"
275                                   nil msg-separator)
276                                  ("^[A-Za-z][A-Za-z0-9-]+:" nil msg-header)
277                                  ))
278               (body-patterns '(("^\\(In article\\|[ \t]*\\w*[]<>}|]\\).*$"
279                                 nil msg-quote)))
280               (message-patterns (append ;;csubject-patterns
281                                  header-patterns
282                                  body-patterns))
283               )
284          (hilit-set-mode-patterns 'msg-header header-patterns)
285          (hilit-set-mode-patterns 'msg-body body-patterns)
286          (hilit-set-mode-patterns 'mime/viewer-mode
287                                   message-patterns
288                                   'hilit-rehighlight-message)
289          )
290        (add-hook 'mime-viewer/content-header-filter-hook
291                  (lambda ()
292                    (if (not (eq mime::preview/original-major-mode
293                                 'gnus-original-article-mode))
294                        (hilit-rehighlight-buffer-quietly)
295                      )))
296        (add-hook 'mime-viewer/plain-text-preview-hook
297                  (lambda ()
298                    (if (not (eq mime::preview/original-major-mode
299                                 'gnus-original-article-mode))
300                        (hilit-rehighlight-buffer-quietly)
301                      )))
302        ))
303 ======================================================================
304
305
306 6.6 code sample for browse-url
307
308   If you have browse-url.el (included in Gnus 5.*, September Gnus and
309 Emacs 19.30 or later), you can use URL button in
310 mime/viewer-mode. Sample code follows:
311
312 ======================================================================
313 (setq browse-url-browser-function
314       (if (eq window-system 'x)
315           'browse-url-netscape
316         'browse-url-w3))
317 (autoload browse-url-browser-function "browse-url"
318   "Ask a WWW browser to show a URL." t)
319 ======================================================================
320
321
322 7 How to use mime/viewer-mode
323
324 In tm-MUAs, you can use mime/viewer-mode if you press the `v' key (in
325 VM, `Z' key) in Summary mode. Or automatic MIME previewed buffer's
326 major-mode is mime/viewer-mode. mime/viewer-mode has following
327 functions (these key bindings are prefixed with C-c in VM):
328
329         q               quit from mime/viewer-mode
330         u               move to upper content
331         p or M-TAB      move to previous content
332         n or TAB        move to next content
333         SPC             scroll up or move to next content
334         M-SPC or DEL    scroll down or move to previous content
335         RET             move to next line
336         M-RET           move to previous line
337         <               move to beginning of message
338         >               move to end of message
339         v               play current content
340         e               extract as file current content
341         C-c C-p         print current content
342         f               display X-Face in current message
343         button-2        play current content or browse URL
344
345
346 8 Bug report
347
348 If you write bug-reports and/or propositions for improvement, please
349 send to the EMACS-MIME Mailing List:
350
351         emacs-mime-en@m17n.org  (English)
352         emacs-mime-ja@m17n.org  (Japanese)
353
354 Via the EMACS-MIME ML, you can report tm bugs, obtain the latest
355 release of tm package, and discuss the future enhancements to tm.  To
356 join the EMACS-MIME ML, send an empty e-mail to
357
358         emacs-mime-ja-ctl@m17n.org      (Japanese)
359         emacs-mime-en-ctl@m17n.org      (English)
360
361
362 10 PROBLEMS
363
364 - Automatic combining method for message/partial is not implemented
365   for RMAIL.
366 - answer method is not implemented for RMAIL, Gnus and GNUS.
367
368
369 11 TODO
370
371 - better method selecting system as successor of atype system
372 - development of internal method for message/external-body based on
373   tm-ftp
374 - better automatic MIME preview support
375 - etc.