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