--- /dev/null
+* tl
+
+ Attached version 6.6.5.
+
+
+tl/tl-header.el
+----------------------------
+revision 5.9
+date: 1995/09/20 12:11:33; author: morioka; state: Exp; lines: +12 -3
+(1) Function `message/field-end' was created.
+(2) Function `message/get-field-body' was modified to use function
+ `message/field-end'.
+----------------------------
+
+
+* tm
+
+tm/tiny-mime.el
+----------------------------
+revision 6.7
+date: 1995/09/20 12:17:28; author: morioka; state: Exp; lines: +2 -10
+Function `mime/unfolding' was modified to use function
+`message/field-end'.
+----------------------------
+
+tm/tinyrich.el
+----------------------------
+revision 5.0
+date: 1995/09/20 14:45:56; author: morioka; state: Exp; lines: +12 -41
+It was modified to use function `tm:set-face-region'.
+----------------------------
+
+tm/tm-def.el
+----------------------------
+revision 6.1
+date: 1995/09/20 14:44:49; author: morioka; state: Exp; lines: +30 -2
+function `tm:set-face-region' was defined for each emacs variants.
+----------------------------
+revision 6.0
+date: 1995/09/19 16:09:04; author: morioka; state: Exp; lines: +2 -2
+UENO Hiroshi <zodiac@ibm.net> said:
+======================================================================
+tm-def gets `mime/tmp-dir' from environment variable `TM_TMPDIR', on
+the other hand external methods get from `TM_TMP_DIR'. External
+methods for OS/2 is using `TM_TMP_DIR', because csh version external
+methods, which are model of OS/2 methods, were using `TM_TMP_DIR'. So
+I think TM_TMP_DIR may be correct. Anyway, I think they should be
+unified.
+======================================================================
+So I fixed to use `TM_TMP_DIR'.
+----------------------------
+revision 5.0
+date: 1995/09/14 15:48:25; author: morioka; state: Exp; lines: +13 -1
+Variable `mime/use-multi-frame' and variable `mime/find-file-function'
+are defined.
+----------------------------
+
+tm/tm-ftp.el
+----------------------------
+revision 6.1
+date: 1995/09/14 15:49:43; author: morioka; state: Exp; lines: +11 -4
+When variable `mime/use-multi-frame' is non-nil, dired is displayed as
+another frame.
+----------------------------
+
+tm/tm-latex.el
+----------------------------
+revision 3.0
+date: 1995/09/14 15:51:35; author: morioka; state: Exp; lines: +6 -4
+Variable `mime/find-file-function' was defined as a function to find
+file.
+----------------------------
+
+tm/tm-partial.el
+----------------------------
+revision 6.0
+date: 1995/09/20 14:39:23; author: morioka; state: Exp; lines: +12 -7
+Fixed a problem of function `mime/decode-message/grab-partials'.
+----------------------------
+
+tm/tm-tar.el
+----------------------------
+By UENO Hiroshi <zodiac@ibm.net>.
+It is a internal method of tm-view to view files included in tar or
+tar.gz content.
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 6.83
+date: 1995/09/20 14:19:42; author: morioka; state: Exp; lines: +5 -1
+Function `mime-viewer/make-preview-buffer' was fixed about
+message/partial announcement. If body is empty, empty line is inserted.
+----------------------------
+revision 6.82
+date: 1995/09/20 12:16:14; author: morioka; state: Exp; lines: +26 -3
+(1) Display X-Face.
+(2) X-Face field does not display in default.
+----------------------------
+revision 6.81
+date: 1995/09/14 15:46:45; author: morioka; state: Exp; lines: +10 -3
+2 announcements of message/partial, mouse is available or not, was
+defined.
+----------------------------
+
+tm/tm-w3.el
+----------------------------
+revision 1.1
+date: 1995/09/14 15:51:57; author: morioka; state: Exp;
+Internal method to view HTML content.
+----------------------------
+
+
+* tm/mh-e
+
+ Attached version 6.27.
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 6.27
+date: 1995/09/20 12:34:39; author: morioka; state: Exp; lines: +4 -2
+
+ (if (featurep 'hilit19)
+ (hilit-rehighlight-buffer-quietly)
+ )
+
+was inserted in function `tm-mh-e/content-header-filter'.
+----------------------------
+revision 6.26
+date: 1995/09/20 12:19:28; author: morioka; state: Exp; lines: +2 -1
+Function `tm-mh-e/content-header-filter' was modified to call function
+`mime-viewer/x-face-function'.
+----------------------------
+revision 6.25
+date: 1995/09/15 06:58:00; author: morioka; state: Exp; lines: +24 -1
+Function `tm-mh-e/toggle-showing' was defined to fix a problem of `t'
+key in summary mode.
+----------------------------
--- /dev/null
+* tl
+
+ Version 6.6.5 \e$B$rE:IU$7$?!#\e(B
+
+
+tl/tl-header.el
+----------------------------
+revision 5.9
+date: 1995/09/20 12:11:33; author: morioka; state: Exp; lines: +12 -3
+(1) \e$B4X?t\e(B message/field-end \e$B$rDI2C$7$?!#\e(B
+(2) \e$B4X?t\e(B message/field-end \e$B$r;H$&$h$&$K4X?t\e(B message/get-field-body \e$B$r\e(B
+ \e$B=$@5$7$?!#\e(B
+----------------------------
+
+
+* tm
+
+tm/tiny-mime.el
+----------------------------
+revision 6.7
+date: 1995/09/20 12:17:28; author: morioka; state: Exp; lines: +2 -10
+\e$B4X?t\e(B mime/unfolding \e$B$G4X?t\e(B message/field-end \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/tinyrich.el
+----------------------------
+revision 5.0
+date: 1995/09/20 14:45:56; author: morioka; state: Exp; lines: +12 -41
+\e$B4X?t\e(B tm:set-face-region \e$B$r;H$&$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/tm-def.el
+----------------------------
+revision 6.1
+date: 1995/09/20 14:44:49; author: morioka; state: Exp; lines: +30 -2
+\e$B3F\e(B Emacs \e$B$N\e(B variant \e$B$KBP$7$F!"4X?t\e(B tm:set-face-region \e$B$rDj5A$7$?!#\e(B
+----------------------------
+revision 6.0
+date: 1995/09/19 16:09:04; author: morioka; state: Exp; lines: +2 -2
+\e$B>eLn\e(B \e$BGn\e(B <zodiac@ibm.net> \e$B$5$s[)$/!'\e(B
+======================================================================
+\e$B$^$:\e(B tm-def \e$B$G\e(B mime/tmp-dir \e$B$r4D6-JQ?t\e(B TM_TMPDIR \e$B$+$i<h$k$h$&$K$J$C$F\e(B
+\e$B$$$k$N$G$9$,!"30It\e(B method \e$B$NJ}$O\e(B TM_TMP_DIR \e$B$K$J$C$F$$$^$9!#\e(B OS/2 \e$BMQ$N\e(B
+\e$B30It\e(B method \e$B$b\e(B TM_TMP_DIR \e$B$r;H$C$F$$$k$N$G$9$,!"3N$+$3$l$O\e(B csh \e$BMQ$K=q\e(B
+\e$B$+$l$F$$$?\e(B method \e$B$r$^$M$F=q$$$?$N$G\e(B TM_TMP_DIR \e$B$,@5$7$$$h$&$J5$$,$7$^\e(B
+\e$B$9!#$^$!$I$C$A$,@5$7$$$H$$$&$3$H$b$J$$$N$G!"$I$A$i$+$KE}0l$9$l$P$h$$$N\e(B
+\e$B$G$7$g$&!#\e(B
+======================================================================
+\e$B$H$$$&Lu$G!"\e(BTM_TMP_DIR \e$B$K=$@5$7$?!#\e(B
+----------------------------
+revision 5.0
+date: 1995/09/14 15:48:25; author: morioka; state: Exp; lines: +13 -1
+\e$BJQ?t\e(B mime/use-multi-frame \e$B$HJQ?t\e(B mime/find-file-function \e$B$rDj5A$7$?!#\e(B
+----------------------------
+
+tm/tm-ftp.el
+----------------------------
+revision 6.1
+date: 1995/09/14 15:49:43; author: morioka; state: Exp; lines: +11 -4
+\e$BJQ?t\e(B mime/dired-function \e$B$,\e(B non-nil \e$B$N;~!"\e(Bdired \e$B$rJL\e(B frame \e$B$KI=<($9$k\e(B
+\e$B$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/tm-latex.el
+----------------------------
+revision 3.0
+date: 1995/09/14 15:51:35; author: morioka; state: Exp; lines: +6 -4
+file \e$B$N;2>H$KMQ$$$k4X?t$H$7$F!"JQ?t\e(B mime/find-file-function \e$B$NCM$rMQ$$\e(B
+\e$B$k$h$&$K$7$?!#\e(B
+----------------------------
+
+tm/tm-partial.el
+----------------------------
+revision 6.0
+date: 1995/09/20 14:39:23; author: morioka; state: Exp; lines: +12 -7
+\e$B4X?t\e(B mime/decode-message/grab-partials \e$B$NIT6q9g$r=$@5$7$?!#\e(B
+----------------------------
+
+tm/tm-tar.el
+----------------------------
+\e$B>eLn\e(B \e$BGn\e(B <zodiac@ibm.net> \e$B$5$s:n!#\e(B
+tar \e$B$d\e(B tar.gz file \e$B$r1\Mw$9$k$?$a$NFbIt\e(B method.
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 6.83
+date: 1995/09/20 14:19:42; author: morioka; state: Exp; lines: +5 -1
+\e$B4X?t\e(B mime-viewer/make-preview-buffer \e$B$r!"\e(Bmessage/partial \e$B$N;~$K\e(B
+preview buffer \e$B$KI=<($9$k\e(B message \e$B$NA0$KI,$:6u9T$,F~$k$h$&$K=$@5$7$?!#\e(B
+----------------------------
+revision 6.82
+date: 1995/09/20 12:16:14; author: morioka; state: Exp; lines: +26 -3
+(1) X-Face \e$B$rI=<($9$k$h$&$K$7$?!#\e(B
+(2) X-Face field \e$B$rI=<($7$J$$$h$&$K$7$?!#\e(B
+----------------------------
+revision 6.81
+date: 1995/09/14 15:46:45; author: morioka; state: Exp; lines: +10 -3
+message/partial \e$BMQ$N\e(B message \e$B$r\e(B mouse \e$B$,;H$($k>l9g$H;H$($J$$>l9g$N#2DL\e(B
+\e$B$jMQ0U$7$?!#\e(B
+----------------------------
+
+tm/tm-w3.el
+----------------------------
+revision 1.1
+date: 1995/09/14 15:51:57; author: morioka; state: Exp;
+HTML \e$B$r1\Mw$9$k$?$a$NFbIt\e(B method.
+----------------------------
+
+
+* tm/mh-e
+
+ Version 6.27 \e$B$rE:IU$7$?!#\e(B
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 6.27
+date: 1995/09/20 12:34:39; author: morioka; state: Exp; lines: +4 -2
+\e$B4X?t\e(B tm-mh-e/content-header-filter \e$B$K\e(B
+
+ (if (featurep 'hilit19)
+ (hilit-rehighlight-buffer-quietly)
+ )
+
+\e$B$rF~$l$?!#\e(B
+----------------------------
+revision 6.26
+date: 1995/09/20 12:19:28; author: morioka; state: Exp; lines: +2 -1
+\e$B4X?t\e(B tm-mh-e/content-header-filter \e$B$r4X?t\e(B mime-viewer/x-face-function
+\e$B$r8F$V$h$&$K=$@5$7$?!#\e(B
+----------------------------
+revision 6.25
+date: 1995/09/15 06:58:00; author: morioka; state: Exp; lines: +24 -1
+\e$B4X?t\e(B tm-mh-e/toggle-showing \e$B$rDj5A$7!"\e(Bsummary mode \e$B$G\e(B `t' key \e$B$,$&$^$/\e(B
+\e$BF/$/$h$&$K=$@5$7$?!#\e(B
+----------------------------
tm/config.tm tm/Makefile tm/mk-tm \
tm/tm-view.el tm/tiny-mime.el \
tm/tm-mule.el tm/tm-nemacs.el tm/tm-orig.el tm/tm-def.el \
- tm/tm-ftp.el tm/tm-latex.el tm/tm-partial.el \
+ tm/tm-ftp.el tm/tm-latex.el tm/tm-w3.el tm/tm-partial.el \
+ tm/tm-tar.el \
tm/tm-rich.el tm/richtext.el tm/tinyrich.el \
tm/tm-comp.el \
tm/tm-setup.el tm/mime-setup.el \
FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
-TARFILE = tm6.80.1.tar
+TARFILE = tm6.83.tar
nemacs:
[README for tm (English Version)]
by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-$Id: README.eng,v 6.10 1995/09/09 05:56:08 morioka Exp $
+$Id: README.eng,v 6.11 1995/09/20 17:16:09 morioka Exp $
1 What's tm?
Run `make install-19', if you use Emacs 19.*.
-5.1.1 (ding) GNUS or GNUS 5.*
+5.1.1 Gnus 5.*
If you want to use automatic MIME preview support, please apply a
-patch to (ding) GNUS or GNUS 5.*. This patch is called `with tm
-patch'. It is available from
-ftp.jaist.ac.jp:/pub/GNU/elisp/dgnus/. Current version is
-dgnus-0.99.23-tm.diff.
+patch to Gnus 5.*. This patch is called `with tm patch'. It is
+available from ftp.jaist.ac.jp:/pub/GNU/elisp/dgnus/. Current version
+is gnus-5.0.4-tm.diff.
-5.1 tm-mh-e
+5.2 tm-mh-e
(1) Please edit mh-e/Makefile
Please insert (load "mime-setup") or (load "tm-setup") in .emacs. If
you use mime-setup, you should prepare mime.el.
+mime.el is included in emacs-mime-tools.shar written by UMEDA
+Masanobu. It is available by anonymous ftp:
+
+ ftp.kyutech.ac.jp /pub/MultiMedia/mime/
+ ftp.jaist.ac.jp /pub/GNU/elisp/mime/
+
+or a lot of anonymous ftp sites. Please try archie.
+
6.1 VM
If you want use vm, please insert following in .vm or .emacs:
FILES = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol
-TARFILE = tm-mh-e6.24.1.tar
+TARFILE = tm-mh-e6.27.tar
elc:
;;; A MIME extender for mh-e
;;;
;;; by Morioka Tomohiko, 1993/11/21
-;;; modified by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
;;;
;;;
(defconst tm-mh-e/RCS-ID
- "$Id: tm-mh-e.el,v 6.24 1995/09/02 06:02:20 morioka Exp $")
+ "$Id: tm-mh-e.el,v 6.27 1995/09/20 12:34:39 morioka Exp $")
(defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
(mh-yank-cur-msg)
))
+(defun tm-mh-e/toggle-showing ()
+ "Toggle the scanning mode/showing mode of displaying messages."
+ (interactive)
+ (if mh-showing
+ (if tm-mh-e/decode-all
+ (let ((pbuf
+ (save-window-excursion
+ (set-buffer mh-show-buffer)
+ mime::article/preview-buffer)))
+ (if (get-buffer pbuf)
+ (delete-windows-on pbuf)
+ )
+ (setq mh-showing nil)
+ (set-buffer-modified-p (buffer-modified-p)) ;force mode line update
+ (if mh-recenter-summary-p
+ (mh-recenter nil)
+ ))
+ (mh-set-scan-mode)
+ )
+ (mh-show)
+ ))
+
;;; @ for tm-view
;;;
(symbol-function 'mime/code-convert-region-to-emacs))
(defun tm-mh-e/content-header-filter ()
+ (mime-viewer/x-face-function)
(goto-char (point-min))
(while (and (re-search-forward
(concat "^" mime-viewer/ignored-field-regexp ":")
(tm-mh-e/code-convert-region-to-emacs (point-min)(point-max)
mime/default-coding-system)
(mime/decode-message-header)
+ (if (featurep 'hilit19)
+ (hilit-rehighlight-buffer-quietly)
+ )
)
(defun tm-mh-e/quitting-method ()
(define-key mh-folder-mode-map "v" (function tm-mh-e/view-message))
(define-key mh-folder-mode-map "\et" (function tm-mh-e/toggle-decoding-mode))
+(define-key mh-folder-mode-map "t" (function tm-mh-e/toggle-showing))
(define-key mh-folder-mode-map "\r"
(function (lambda ()
(interactive)
)
))
-(setq tm-uncompile-el-files '("tm-partial.el"))
+(setq tm-uncompile-el-files '("tm-partial.el" "tm-w3.el"))
(if (catch 'tag
(let ((paths load-path) path)
;;;
(defconst mime/RCS-ID
- "$Id: tiny-mime.el,v 6.6 1995/09/04 10:33:27 morioka Exp $")
+ "$Id: tiny-mime.el,v 6.7 1995/09/20 12:17:28 morioka Exp $")
(defconst mime/tiny-mime-version (get-version-string mime/RCS-ID))
(let (field beg end)
(while (re-search-forward message/field-name-regexp nil t)
(setq beg (match-beginning 0))
- (setq end (progn
- (if (re-search-forward "\n[!-9;-~]+:" nil t)
- (goto-char (match-beginning 0))
- (if (re-search-forward "^$" nil t)
- (goto-char (1- (match-beginning 0)))
- (end-of-line)
- ))
- (point)
- ))
+ (setq end (message/field-end))
(setq field (buffer-substring beg end))
(if (string-match mime/encoded-word-regexp field)
(save-restriction
;;;
-;;; $Id: tinyrich.el,v 4.0 1995/09/10 13:35:41 morioka Exp $
+;;; $Id: tinyrich.el,v 5.0 1995/09/20 14:45:56 morioka Exp $
;;;
;;; by MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; modified by YAMATE Keiichirou <ics9118@sem1.info.osaka-cu.ac.jp>
;;;
-(defvar mime/text/enriched-face-list
- '("bold" "italic" "fixed" "underline"))
-
-(cond ((string-match "XEmacs\\|Lucid" emacs-version)
- (defun mime/set-face-region (b e face)
- (let ((sym (intern face)))
- (if (member sym (face-list))
- (let ((overlay (make-extent b e)))
- (set-extent-property overlay 'face sym)
- ))))
- )
- ((and (>= emacs-major-version 19) window-system)
- (defun mime/set-face-region (b e face)
- (let ((sym (intern face)))
- (if (member sym (face-list))
- (let ((overlay (make-overlay b e)))
- (overlay-put overlay 'face sym)
- ))))
- )
- ((and (boundp 'NEMACS) NEMACS)
- (setq mime/available-face-list
- '("bold" "italic" "underline"))
- (setq mime/available-face-attribute-alist
- '(("bold" . inversed-region)
- ("italic" . underlined-region)
- ("underline" . underlined-region)
- ))
- (defun mime/set-face-region (beg end sym)
- (attribute-add-narrow-attribute
- (cdr (assoc sym mime/available-face-attribute-alist))
- beg end))
- )
- (t
- (setq mime/text/richtext-face-list nil)
- (defun mime/set-face-region (beg end sym)
+(defvar mime-viewer/face-list-for-text/enriched
+ (cond ((and (>= emacs-major-version 19) window-system)
+ '(bold italic fixed underline)
)
- ))
+ ((and (boundp 'NEMACS) NEMACS)
+ '("bold" "italic" "underline")
+ )))
(defun enriched-decode (beg end)
(interactive "*r")
(replace-match (substring str 1))
)))
(goto-char beg)
- (let (cmd str (fb (point)) fe b e)
+ (let (cmd sym str (fb (point)) fe b e)
(while (re-search-forward "<\\(<\\|[^<>\n\r \t]+>\\)" nil t)
(setq b (match-beginning 0))
(setq cmd (buffer-substring b (match-end 0)))
(replace-match "")
(setq cmd (downcase (substring cmd 1 (- (length cmd) 1))))
)
- (cond ((string= cmd "param")
+ (setq sym (intern cmd))
+ (cond ((eq sym 'param)
(setq b (point))
(save-excursion
(save-restriction
)))
(delete-region b e)
)
- ((member cmd mime/text/enriched-face-list)
+ ((memq sym mime-viewer/face-list-for-text/enriched)
(setq b (point))
(save-excursion
(save-restriction
)
(setq e end)
)))
- (mime/set-face-region b e cmd)
+ (tm:set-face-region b e sym)
)))
(goto-char (point-max))
(if (not (eq (preceding-char) ?\n))
;;;
-;;; $Id: tm-def.el,v 4.1 1995/09/04 10:17:02 morioka Exp $
+;;; $Id: tm-def.el,v 6.1 1995/09/20 14:44:49 morioka Exp $
;;;
+(require 'emu)
+
+
;;; @ variables
;;;
-(defvar mime/tmp-dir (or (getenv "TM_TMPDIR") "/tmp/"))
+(defvar mime/tmp-dir (or (getenv "TM_TMP_DIR") "/tmp/"))
+
+(defvar mime/use-multi-frame
+ (and (>= emacs-major-version 19) window-system))
+(defvar mime/find-file-function
+ (if mime/use-multi-frame
+ (function find-file-other-frame)
+ (function find-file)
+ ))
-;;; @ compatible module among Mule, NEmacs and NEpoch
+
+;;; @ for various Emacs variants
;;;
(cond ((boundp 'MULE) (require 'tm-mule))
(t (require 'tm-orig))
)
+(cond ((string-match "XEmacs\\|Lucid" emacs-version)
+ (defun tm:set-face-region (b e face)
+ (let ((overlay (make-extent b e)))
+ (set-extent-property overlay 'face face)
+ ))
+ )
+ ((and (>= emacs-major-version 19) window-system)
+ (defun tm:set-face-region (b e face)
+ (let ((overlay (make-overlay b e)))
+ (overlay-put overlay 'face face)
+ ))
+ )
+ ((and (boundp 'NEMACS) NEMACS)
+ (setq tm:available-face-attribute-alist
+ '((bold . inversed-region)
+ (italic . underlined-region)
+ (underline . underlined-region)
+ ))
+ (defun tm:set-face-region (beg end face)
+ (attribute-add-narrow-attribute
+ (cdr (assq face mime/available-face-attribute-alist))
+ beg end))
+ )
+ (t
+ (defun tm:set-face-region (beg end sym)
+ )
+ ))
+
;;; @ definitions about MIME
;;;
;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp> (1994/11/ 8)
;;; and OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> (1994/11/11)
;;;
-;;; $Id: tm-ftp.el,v 6.0 1995/03/13 16:49:24 morioka Exp $
+;;; $Id: tm-ftp.el,v 6.1 1995/09/14 15:49:43 morioka Exp $
;;;
-(provide 'tm-ftp)
-
+(require 'tm-view)
(require 'ange-ftp)
+(defvar mime/dired-function
+ (if mime/use-multi-frame
+ (function dired-other-frame)
+ (function dired)
+ ))
+
(defun mime/decode-message/external-ftp (beg end cal)
(let ((access-type (cdr (assoc "access-type" cal)))
(site (cdr (assoc "site" cal)))
(concat "/anonymous@" site ":" directory))
(message (concat "Accessing " pathname "/" name "..."))
(switch-to-buffer mime::article/preview-buffer)
- (dired pathname)
+ (funcall mime/dired-function pathname)
(goto-char (point-min))
(search-forward name)
))
("access-type" . "anon-ftp")
(method . mime/decode-message/external-ftp)
))
+
+(provide 'tm-ftp)
;;;
-;;; tm-latex: tm-view internal decoder for tm-view
+;;; tm-latex: tm-view internal decoder for LaTeX
;;;
;;; by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> (1994/11/11)
;;;
;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;;
-;;; $Id: tm-latex.el,v 2.0 1995/04/07 12:05:33 morioka Exp $
+;;; $Id: tm-latex.el,v 3.0 1995/09/14 15:51:35 morioka Exp $
;;;
-(provide 'tm-latex)
+(require 'tm-view)
(defun mime/decode-text/latex (beg end cal)
(let* ((cur-buf (current-buffer))
(cdr (assoc "x-name" cal))
(concat (make-temp-name "tm") ".tex"))))
(switch-to-buffer mime::article/preview-buffer)
- (find-file (expand-file-name name mime/tmp-dir))
+ (funcall mime/find-file-function (expand-file-name name mime/tmp-dir))
(if (or (<= (buffer-size) 0)
(y-or-n-p "Replace the existing buffer?"))
(progn
; ("type" . "latex")
; (method . mime/decode-text/latex)
; ))
+
+(provide 'tm-latex)
;;; by Yasuo OKABE @ Kyoto University 1994
;;; modified by MORIOKA Tomohiko
;;; and Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
-
-;; original file is
-;; gif.el written by Art Mellor @ Cayman Systems, Inc. 1991
-
-;;; $Id: tm-partial.el,v 5.0 1995/05/22 17:06:31 morioka Exp $
+;;;
+;;; original file is
+;;; gif.el written by Art Mellor @ Cayman Systems, Inc. 1991
+;;;
+;;; This file is a part of tm (Tools for MIME).
+;;;
+;;; $Id: tm-partial.el,v 6.0 1995/09/20 14:39:23 morioka Exp $
+;;;
(require 'tm-view)
(set-buffer article-buf)
(goto-char (point-min))
(re-search-forward "^$")
- (let ((delimit (point)))
+ (let ((delimit (1+ (point))))
(goto-char (point-min))
(if (not
(let ((params (cdr (mime/Content-Type))))
(progn
(kill-buffer buffer)
(error "Couldn't find part %d" part-num)))
- (append-to-buffer buffer (+ delimit 1) (point-max))))
+ (if (< delimit (point-max))
+ (append-to-buffer buffer delimit (point-max))
+ )))
(setq part-num (+ part-num 1))))
(mime/gp:display-article)
(save-excursion
--- /dev/null
+;;;
+;;; $Id: tm-tar.el,v 1.1 1995/09/18 17:09:19 H.Ueno Exp $
+;;;
+;;; tm-tar.el
+;;;
+;;; Internal viewer for
+;;; - application/x-tar
+;;; - application/x-gzip, type="tar"
+;;; - aplication/octet-stream, type="tar"
+;;; - aplication/octet-stream, type="tar+gzip"
+;;;
+;;; by Hiroshi Ueno <zodiac@ibm.net>
+;;;
+
+;;; @ required modules
+;;;
+
+(require 'emu)
+(require 'tm-view)
+
+;;; @ constants
+;;;
+
+(defconst tm-tar/list-buffer "*tm-tar/List*")
+(defconst tm-tar/view-buffer "*tm-tar/View*")
+(defconst tm-tar/file-search-regexp "[0-9]+\:[0-9\:]+[ ]+[0-9]+[ ]+")
+
+;;; @ variables
+;;;
+
+(defvar tm-tar/tar-program "gtar")
+(defvar tm-tar/tar-compress-arg '("-z"))
+(defvar tm-tar/gzip-program "gzip")
+(defvar tm-tar/mmencode-program "mmencode")
+(defvar tm-tar/uudecode-program "uudecode")
+
+(defvar mime/tm-tar-mode-map nil)
+(if mime/tm-tar-mode-map
+ nil
+ (setq mime/tm-tar-mode-map (make-keymap))
+ (suppress-keymap mime/tm-tar-mode-map)
+ (define-key mime/tm-tar-mode-map "\C-c" 'exit-recursive-edit)
+ (define-key mime/tm-tar-mode-map "q" 'exit-recursive-edit)
+ (define-key mime/tm-tar-mode-map "n" 'mime/tm-tar/next-line)
+ (define-key mime/tm-tar-mode-map " " 'mime/tm-tar/next-line)
+ (define-key mime/tm-tar-mode-map "\C-m" 'mime/tm-tar/next-line)
+ (define-key mime/tm-tar-mode-map "p" 'mime/tm-tar/previous-line)
+ (define-key mime/tm-tar-mode-map "\177" 'mime/tm-tar/previous-line)
+ (define-key mime/tm-tar-mode-map "\C-\M-m" 'mime/tm-tar/previous-line)
+ (define-key mime/tm-tar-mode-map "v" 'mime/tm-tar/view-file)
+ (define-key mime/tm-tar-mode-map "\C-h" 'Helper-help)
+ (define-key mime/tm-tar-mode-map "?" 'mime/tm-tar/helpful-message)
+ (cond ((string-match "XEmacs\\|Lucid" emacs-version)
+ (define-key mime/tm-tar-mode-map
+ 'button2 'mime/tm-tar/view-file-mouse)
+ )
+ ((> emacs-major-version 18)
+ (define-key mime/tm-tar-mode-map
+ [mouse-2] 'mime/tm-tar/view-file-mouse)
+ ))
+ )
+
+;;; @@ tm-tar mode functions
+;;;
+
+(defun mime/tm-tar-mode (&optional prev-buf)
+ "Major mode for listing the contents of a tar archive file."
+ (unwind-protect
+ (let ((buffer-read-only t)
+ (mode-name "tm-tar")
+ (mode-line-buffer-identification '("%17b"))
+ )
+ (goto-char (point-min))
+ (mime/tm-tar/move-to-filename)
+ (catch 'mime/tm-tar-mode (mime/tm-tar-mode/command-loop))
+ )
+ (if prev-buf
+ (switch-to-buffer prev-buf)
+ )
+ ))
+
+(defun mime/tm-tar-mode/command-loop ()
+ (let ((old-local-map (current-local-map))
+ )
+ (unwind-protect
+ (progn
+ (use-local-map mime/tm-tar-mode-map)
+ (mime/tm-tar/helpful-message)
+ (recursive-edit)
+ )
+ (save-excursion
+ (use-local-map old-local-map)
+ ))
+ ))
+
+(defun mime/tm-tar/next-line ()
+ (interactive)
+ (next-line 1)
+ (mime/tm-tar/move-to-filename)
+ )
+
+(defun mime/tm-tar/previous-line ()
+ (interactive)
+ (previous-line 1)
+ (mime/tm-tar/move-to-filename)
+ )
+
+(defun mime/tm-tar/view-file ()
+ (interactive)
+ (let ((name (mime/tm-tar/get-filename))
+ )
+ (save-excursion
+ (switch-to-buffer tm-tar/view-buffer)
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (message "Reading a file from the archive. Please wait...")
+ (apply 'call-process tm-tar/tar-program
+ nil t nil (append tm-tar/view-args (list name)))
+ (goto-char (point-min))
+ )
+ (view-buffer tm-tar/view-buffer)
+ ))
+
+(defun mime/tm-tar/view-file-mouse (e)
+ (interactive "e")
+ (mouse-set-point e)
+ (mime/tm-tar/view-file)
+ )
+
+(defun mime/tm-tar/get-filename ()
+ (let (eol)
+ (save-excursion
+ (end-of-line)
+ (setq eol (point))
+ (beginning-of-line)
+ (save-excursion
+ (if (re-search-forward "^d" eol t)
+ (error "Cannot view a directory"))
+ )
+ (if (re-search-forward tm-tar/file-search-regexp eol t)
+ (progn (let ((beg (point))
+ )
+ (skip-chars-forward "^ \n")
+ (buffer-substring beg (point))
+ ))
+ (error "No file on this line")
+ ))
+ ))
+
+(defun mime/tm-tar/move-to-filename ()
+ (let ((eol (progn (end-of-line) (point)))
+ )
+ (beginning-of-line)
+ (re-search-forward tm-tar/file-search-regexp eol t)
+ ))
+
+(defun mime/tm-tar/set-properties ()
+ (if (> emacs-major-version 18)
+ (let ((beg (point-min))
+ (end (point-max))
+ )
+ (goto-char beg)
+ (save-excursion
+ (while (re-search-forward tm-tar/file-search-regexp end t)
+ (put-text-property (point)
+ (progn
+ (end-of-line)
+ (point))
+ 'mouse-face 'highlight)
+ ))
+ )))
+
+(defun mime/tm-tar/helpful-message ()
+ (interactive)
+ (message "Type %s, %s, %s, %s, %s, %s."
+ (substitute-command-keys "\\[Helper-help] for help")
+ (substitute-command-keys "\\[mime/tm-tar/helpful-message] for key")
+ (substitute-command-keys "\\[mime/tm-tar/next-line] to next")
+ (substitute-command-keys "\\[mime/tm-tar/previous-line] to prev")
+ (substitute-command-keys "\\[mime/tm-tar/view-file] to view")
+ (substitute-command-keys "\\[exit-recursive-edit] to quit")
+ ))
+
+;;; @@ tar message decoder
+;;
+
+(defun mime/decode-message/tar (beg end cal)
+ (let ((coding (cdr (assoc 'encoding cal)))
+ (cur-buf (current-buffer))
+ (tm-tar/tar-file-name (expand-file-name (concat (make-temp-name
+ (expand-file-name "tm" mime/tmp-dir)) ".tar")))
+ (tm-tar/tmp-file-name (expand-file-name (make-temp-name
+ (expand-file-name "tm" mime/tmp-dir))))
+ new-buf
+ )
+ (find-file tm-tar/tmp-file-name)
+ (setq new-buf (current-buffer))
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (save-excursion
+ (set-buffer cur-buf)
+ (goto-char beg)
+ (re-search-forward "^$")
+ (append-to-buffer new-buf (+ (match-end 0) 1) end)
+ )
+ (if (member coding mime-viewer/uuencode-encoding-name-list)
+ (progn
+ (goto-char (point-min))
+ (if (re-search-forward "^begin [0-9]+ " nil t)
+ (progn
+ (kill-line)
+ (insert tm-tar/tar-file-name)
+ )
+ (progn
+ (set-buffer-modified-p nil)
+ (kill-buffer new-buf)
+ (error "uuencode file signature was not found")
+ ))))
+ (save-buffer)
+ (kill-buffer new-buf)
+ (message "Listing the contents of archive. Please wait...")
+ (cond ((string-equal coding "base64")
+ (call-process tm-tar/mmencode-program nil nil nil "-u"
+ "-o" tm-tar/tar-file-name tm-tar/tmp-file-name)
+ )
+ ((string-equal coding "quoted-printable")
+ (call-process tm-tar/mmencode-program nil nil nil "-u" "-q"
+ "-o" tm-tar/tar-file-name tm-tar/tmp-file-name)
+ )
+ ((member coding mime-viewer/uuencode-encoding-name-list)
+ (call-process tm-tar/uudecode-program nil nil nil
+ tm-tar/tmp-file-name)
+ )
+ (t
+ (copy-file tm-tar/tmp-file-name tm-tar/tar-file-name t)
+ ))
+ (delete-file tm-tar/tmp-file-name)
+ (setq tm-tar/list-args (list "-tvf" tm-tar/tar-file-name))
+ (setq tm-tar/view-args (list "-xOf" tm-tar/tar-file-name))
+ (if (eq 0 (call-process tm-tar/gzip-program
+ nil nil nil "-t" tm-tar/tar-file-name))
+ (progn
+ (setq tm-tar/list-args
+ (append tm-tar/tar-compress-arg tm-tar/list-args))
+ (setq tm-tar/view-args
+ (append tm-tar/tar-compress-arg tm-tar/view-args))
+ ))
+ (switch-to-buffer tm-tar/view-buffer)
+ (switch-to-buffer tm-tar/list-buffer)
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (apply 'call-process tm-tar/tar-program
+ nil t nil tm-tar/list-args)
+ (mime/tm-tar/set-properties)
+ (mime/tm-tar-mode cur-buf)
+ (kill-buffer tm-tar/view-buffer)
+ (kill-buffer tm-tar/list-buffer)
+ (delete-file tm-tar/tar-file-name)
+ ))
+
+;;; @@ program/buffer coding system
+;;;
+
+(cond ((boundp 'MULE)
+ (define-program-coding-system tm-tar/view-buffer nil *autoconv*)
+ )
+ ((boundp 'NEMACS)
+ (define-program-kanji-code tm-tar/view-buffer nil 1)
+ ))
+
+;;; @@ message types to use tm-tar
+;;;
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "application/octet-stream")
+ (method . mime/decode-message/tar)
+ (mode . "play") ("type" . "tar")
+ ))
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "application/octet-stream")
+ (method . mime/decode-message/tar)
+ (mode . "play") ("type" . "tar+gzip")
+ ))
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "application/x-gzip")
+ (method . mime/decode-message/tar)
+ (mode . "play") ("type" . "tar")
+ ))
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "application/x-tar")
+ (method . mime/decode-message/tar)
+ (mode . "play")
+ ))
+
+;;; @ end
+;;;
+
+(provide 'tm-tar)
+
;;;
(defconst mime-viewer/RCS-ID
- "$Id: tm-view.el,v 6.80 1995/09/09 08:54:54 morioka Exp $")
+ "$Id: tm-view.el,v 6.83 1995/09/20 14:19:42 morioka Exp $")
(defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
(defconst mime/viewer-version mime-viewer/version)
(defvar mime-viewer/ignored-field-list
'("Received" "Return-Path" "Replied" "Errors-To"
"Lines" "Sender" "Path" "Nntp-Posting-Host"
- "Content-Type" "Precedence"))
+ "Content-Type" "Precedence" "X-Face"))
(defvar mime-viewer/ignored-field-regexp)
"\\(\\." mime-viewer/file-name-char-regexp "+\\)*"))
(defvar mime-viewer/announcement-for-message/partial
- "[[ This is message/partial style split message. ]]
-[[ Please press `v' key in this buffer. ]]")
+ (if (and (>= emacs-major-version 19) window-system)
+ "\
+\[[ This is message/partial style split message. ]]
+\[[ Please press `v' key in this buffer ]]
+\[[ or click here by mouse button-2. ]]"
+ "\
+\[[ This is message/partial style split message. ]]
+\[[ Please press `v' key in this buffer. ]]"
+ ))
;;; @@ predicate functions
(function mime-viewer/default-content-subject-function))
-;;; @ content header filter
+;;; @@ content header filter
+;;;
+
+;;; @@@ X-Face
;;;
+;; hack from Gnus 5.0.4.
+
+(defvar mime-viewer/x-face-command
+ "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -"
+ "String to be executed to display an X-Face field.
+The command will be executed in a sub-shell asynchronously.
+The compressed face will be piped to this command.")
+
+(defun mime-viewer/x-face-function ()
+ "Function to display X-Face field. You can redefine to customize."
+ (goto-char (point-min))
+ (if (re-search-forward "^X-Face:[ \t]*" nil t)
+ (let ((beg (match-end 0))
+ (end (message/field-end))
+ )
+ (call-process-region beg end "sh" nil 0 nil
+ "-c" mime-viewer/x-face-command)
+ )))
+
(defun mime-viewer/default-content-header-filter ()
+ (mime-viewer/x-face-function)
(goto-char (point-min))
(while (and (re-search-forward
(concat "^" mime-viewer/ignored-field-regexp ":")
(let (be)
(switch-to-buffer obuf)
(save-restriction
+ (goto-char (point-max))
+ (if (not (search-backward "\n\n" nil t))
+ (insert "\n")
+ )
(setq be (point-max))
(narrow-to-region be be)
(insert
--- /dev/null
+;;;
+;;; tm-w3.el: a tm-view internal decoder for HTML
+;;;
+;;; by MORIOKA Tomohiko <morioka@jaist.ac.jp> (1995/09/14)
+;;;
+;;; based on tm-latex.el by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;;;
+;;; $Id: tm-w3.el,v 1.1 1995/09/14 15:51:57 morioka Exp $
+;;;
+
+(require 'tm-view)
+
+(autoload 'w3-mode "w3" "HTML viewer" t)
+
+(defvar mime-viewer/html-default-mode (function w3-mode))
+
+(defun mime-viewer/decode-html (beg end cal)
+ (let* ((cur-buf (current-buffer))
+ new-buf
+ (name (or (cdr (assoc "name" cal))
+ (cdr (assoc "x-name" cal))
+ (concat (make-temp-name "tm") ".html"))))
+ (switch-to-buffer mime::article/preview-buffer)
+ (funcall mime/find-file-function (expand-file-name name mime/tmp-dir))
+ (if (or (<= (buffer-size) 0)
+ (y-or-n-p "Replace the existing buffer?"))
+ (progn
+ (erase-buffer)
+ (setq new-buf (current-buffer))
+ (save-excursion
+ (set-buffer cur-buf)
+ (goto-char beg)
+ (re-search-forward "^$")
+ (append-to-buffer new-buf (+ (match-end 0) 1) end)
+ )))
+ (call-interactively mime-viewer/html-default-mode)
+ ))
+
+(set-atype 'mime/content-decoding-condition
+ '((type . "text/html")
+ (method . mime-viewer/decode-html)
+ ))
+
+(provide 'tm-w3)