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