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