#
-# $Id: Makefile,v 3.0 1995/04/17 19:06:08 morioka Exp morioka $
+# $Id: Makefile,v 4.0 1995/04/18 12:35:44 morioka Exp morioka $
#
# Please specify emacs executables:
tm/mh-e/Makefile tm/mh-e/Makefile.bc tm/mh-e/*.el \
tl/README.eng tl/Makefile tl/Makefile.bc tl/*.el tl/doc/*.texi
-TARFILE = tm6.14.tar
+TARFILE = tm6.15.tar
nemacs:
orig19:
make -f Makefile.bc all \
EMACS=$(ORIG19) EMACS_TYPE=orig TLSRCDIR=$(TLSRCDIR)
- (cd gnus; make orig19)
- (cd mh-e; make orig19)
+ (cd gnus; make orig19 ORIG19=$(ORIG19))
+ (cd mh-e; make orig19 ORIG19=$(ORIG19))
-install-orig19: orig19
+install-orig19: orig19 install-gnus4-mh-e4
make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=orig
- (cd gnus; make install-19)
- (cd mh-e; make install-19)
mule2:
make -f Makefile.bc all \
EMACS=$(MULE2) EMACS_TYPE=mule TLSRCDIR=$(TLSRCDIR)
- (cd gnus; make mule2)
- (cd mh-e; make mule2)
+ (cd gnus; make mule2 MULE2=$(MULE2))
+ (cd mh-e; make mule2 MULE2=$(MULE2))
-install-mule2: mule2
+install-mule2: mule2 install-gnus4-mh-e4
make -f Makefile.bc install TMDIR=$(TMDIR19) EMACS_TYPE=mule
- (cd gnus; make install-19)
- (cd mh-e; make install-19)
+
+
+install-gnus4-mh-e4:
+ (cd gnus; make install-19 TMDIR19=$(TMDIR19))
+ (cd mh-e; make install-19 TMDIR19=$(TMDIR19))
all: $(UTILS) $(DVI)
[README for tm (English Version)]
by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-$Id: README.eng,v 1.2 1995/02/09 15:47:58 morioka Exp $
+$Id: README.eng,v 1.2 1995/02/09 15:47:58 morioka Exp morioka $
1 What's tm?
- tm-gnus : tm-MUA for GNUS
- tm-rmail : tm-MUA for RMAIL
- tm-vm : tm-MUA for vm
+ - extender for tm-view
+ - tm-partial : automatic assembler for message/partial
+ - tm-ftp : for anonymous ftp
+ - tm-rich : for text/enriched and text/richtext
+ - tm-comp : extender for mime.el (big message automatic
+ splitter, previewer using tm-view, uuencode
+ supporter)
- tm-setup: set up module for tm-MUAs
- mime-setup: set up module for MIME
#
-# $Id: Makefile,v 1.1 1995/01/10 12:28:01 morioka Exp $
+# $Id: Makefile,v 1.1 1995/01/10 12:28:01 morioka Exp morioka $
#
# Please specify emacs executables:
;;; modified by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
;;;
-(provide 'tm-mh-e)
-
;;; @ require modules
;;;
;;; @ version
;;;
(defconst tm-mh-e/RCS-ID
- "$Id: tm-mh-e.el,v 6.0 1995/04/12 11:46:08 morioka Exp $")
+ "$Id: tm-mh-e.el,v 6.1 1995/04/18 16:49:45 morioka Exp $")
(defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
(mh-invalidate-show-buffer)
(mh-show-msg (mh-get-msg-num t))
(pop-to-buffer mh-show-buffer t)
-
;; patch for mh-narrow.el
;; by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
(if (featurep 'mh-narrow)
(widen)
)
;; end of patch
-
(mime/viewer-mode)
)
+;;; @ for tm-comp
+;;;
+(defun tm-mh-e::make-message (folder number)
+ (vector folder number)
+ )
+
+(defun tm-mh-e::message/folder (message)
+ (elt message 0)
+ )
+
+(defun tm-mh-e::message/number (message)
+ (elt message 1)
+ )
+
+(defun tm-mh-e::message/file-name (message)
+ (expand-file-name
+ (tm-mh-e::message/number message)
+ (mh-expand-file-name (tm-mh-e::message/folder message))
+ ))
+
+(defun tm-mh-e::prompt-for-message (prompt folder &optional default)
+ (let ((files
+ (directory-files (mh-expand-file-name folder) nil "^[0-9]+$")
+ ))
+ (completing-read prompt
+ (let ((i 0))
+ (mapcar (function
+ (lambda (file)
+ (setq i (+ i 1))
+ (list file i)
+ ))
+ files)
+ ))
+ ))
+
+(defun tm-mh-e::query-message ()
+ (let* ((folder (mh-prompt-for-folder "Visit" "+inbox" nil))
+ (number (tm-mh-e::prompt-for-message "Number?" folder))
+ )
+ (tm-mh-e::make-message folder number)
+ ))
+
+(defun tm-mh-e::insert-message (&optional message)
+ (if (null message)
+ (setq message (tm-mh-e::query-message))
+ )
+ (insert-file (tm-mh-e::message/file-name message))
+ )
+
+(if (featurep 'tm-comp)
+ (set-alist 'tm-comp/message-inserter-alist
+ 'mh-letter-mode (function tm-mh-e::insert-message))
+ (add-hook 'tm-comp-load-hook
+ (function
+ (lambda ()
+ (set-alist
+ 'tm-comp/message-inserter-alist
+ 'mh-letter-mode (function tm-mh-e::insert-message))
+ )))
+ )
+
+
;;; @ set up
;;;
(interactive)
(scroll-other-window -1)
)))
+
+
+(provide 'tm-mh-e)
+* tm/Makefile
+
+ Not only do `make mule2' or `make orig19' compile normal tm modules
+but also tm-mh-e and tm-gnus.
+
+ Similarly, not only do `make install-mule2' or `make install-orig19'
+install normal tm modules but also tm-mh-e and tm-gnus.
+
+
+* tm-comp
+
+** message/rfc822
+
+ We add a message/rfc822 style message inserting command. Its
+function name is `tm-comp/insert-message', standard key bind is `C-c
+C-x m'.
+
+ Function `tm-comp/insert-message' requires message-inserter function
+for your MUA. message-inserter functions are registerd at variable
+`tm-comp/message-inserter-alist' which is a assoc-list whose element
+is a pair that major-mode is key and message-inserter function is value.
+
+ Now, tm-mh-e is a only implementation for this function.
+
+
* changed points of tm-view
Internal structure of tm-view 6.* is changed from tm-view 5.21, such
+* tm/Makefile
+
+ Emacs 19.* (Mule 2.*) \e$B$G$O!"\e(Btm \e$B$N\e(B {byte-compile | install} \e$B$r9T$&:]\e(B
+\e$B$K!"\e(Btm-mh-e, tm-gnus \e$B$N\e(B {byte-compile | install} \e$B$b9T$$$^$9!#\e(B
+
+
+* tm-comp
+
+** message/rfc822
+
+ MUA \e$B$,J]B8$7$F$$$k\e(B message \e$B$r\e(B message/rfc822 \e$B7A<0$G<h$j9~$`$b$N$rDI\e(B
+\e$B2C$7$^$7$?!#4X?tL>$O\e(B tm-comp/insert-message \e$B$G!"I8=`$N\e(B key bind \e$B$O\e(B C-c
+C-x m \e$B$G$9!#\e(B
+
+ \e$B4X?t\e(B tm-comp/insert-message \e$B$O\e(B MUA \e$BKh$N\e(B message-inserter \e$B4X?t$rI,MW\e(B
+\e$B$H$7$^$9!#\e(Bmessage-inserter \e$B$OJQ?t\e(B tm-comp/message-inserter-alist \e$B$KEP\e(B
+\e$BO?$5$l$^$9!#$3$NJQ?t$O!"\e(Bmajor-mode \e$B$,\e(B key \e$B$G!"$=$l$KBP$9$kCM$,\e(B
+message-inserter \e$B4X?t$G$"$kO"A[%j%9%H9=B$$r$7$F$$$^$9!#\e(B
+
+ \e$B8=:_$N$H$3$m!"\e(Btm-mh-e \e$B$N$_!"$3$N5!G=$r<BAu$7$F$$$^$9!#\e(B
+
+
* tm-view \e$B$NJQ99E@$K$D$$$F\e(B
tm-view 6.* \e$B$G$OFbIt9=B$$,JQ99$5$l!"%G!<%?9=B$$d\e(B symbol \e$BL>$J$I$,JQ99\e(B
;;; @ version
;;;
(defconst mime/RCS-ID
- "$Id: tiny-mime.el,v 5.10 1995/01/09 18:56:42 morioka Exp $")
+ "$Id: tiny-mime.el,v 5.11 1995/04/18 12:28:22 morioka Exp $")
(defconst mime/tiny-mime-version (get-version-string mime/RCS-ID))
(defun mime/rest-of-string (str)
(if (stringp str)
(substring str (match-end 0))
- (buffer-substring (match-end 0))))
+ (buffer-substring (match-end 0)(point-max))
+ ))
+
;;; @ variables
;;;
;;; MORIOKA Tomohiko,
;;; Kazushi (Jam) MARUKAWA <kazusi-m@is.aist-nara.ac.jp>,
;;; OKABE Yasuo,
-;;; and Shuhei KOBAYASHI <shuhei@cmpt01.phys.tohoku.ac.jp>
+;;; KOBAYASHI Shuhei <shuhei@cmpt01.phys.tohoku.ac.jp>,
+;;; and YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
+;;;
-(provide 'tm-comp)
(require 'tm-misc)
+(require 'tm-view)
(require 'tl-header)
+(require 'tl-list)
(require 'mail-utils)
;;;
(defconst mime/composer-RCS-ID
- "$Id: tm-comp.el,v 5.1 1995/04/17 18:52:07 morioka Exp $")
+ "$Id: tm-comp.el,v 6.3 1995/04/18 16:38:42 morioka Exp $")
(defconst mime/composer-version (get-version-string mime/composer-RCS-ID))
(and (fboundp 'bury-buffer) (bury-buffer))))
))
+(defvar tm-comp/message-inserter-alist nil)
+
;;; @ edit
;;;
))
+(defun tm-comp/insert-message (&optional message)
+ (interactive)
+ (let ((inserter (assoc-value major-mode tm-comp/message-inserter-alist)))
+ (if (and inserter (fboundp inserter))
+ (progn
+ (mime-insert-tag "message" "rfc822")
+ (funcall inserter message)
+ )
+ (message "Sorry, I don't have message inserter for your MUA.")
+ )))
+
+
;;; @ split
;;;
(fset 'mime-mode-exit-and-run
'tm-comp::mime-mode-exit-and-run)
))
+ (define-key (lookup-key (current-local-map) mime-prefix)
+ "m" 'tm-comp/insert-message)
)))
-(autoload 'mime/viewer-mode "tm-view" nil t)
+
+;;; @ draft preview
+;;;
+;; by "OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp>
+;; Mon, 10 Apr 1995 20:03:07 +0900
+
+(defvar mime/draft-header-separator-alist
+ '((news-reply-mode . mail-header-separator)
+ (mh-letter-mode . mail-header-separator)
+ ))
+
+(defvar mime::article/draft-header-separator nil)
(defun mime/draft-preview ()
(interactive)
- (goto-char (point-min))
- (mime/viewer-mode)
- (pop-to-buffer (current-buffer)))
+ (let ((sep (assoc-value major-mode mime/draft-header-separator-alist)))
+ (or (stringp sep) (setq sep (eval sep)))
+ (make-variable-buffer-local 'mime::article/draft-header-separator)
+ (goto-char (point-min))
+ (re-search-forward
+ (concat "^\\(" (regexp-quote sep) "\\)?$"))
+ (setq mime::article/draft-header-separator
+ (buffer-substring (match-beginning 0) (match-end 0)))
+ (replace-match "")
+ (mime/viewer-mode (current-buffer))
+ (pop-to-buffer (current-buffer))
+ ))
+
+(defun mime-viewer::quitting-method/draft-preview ()
+ (let ((mother mime/mother-buffer))
+ (save-excursion
+ (switch-to-buffer mother)
+ (goto-char (point-min))
+ (if (and
+ (re-search-forward
+ (concat "^\\("
+ (regexp-quote mime::article/draft-header-separator)
+ "\\)?$") nil t)
+ (bolp))
+ (progn
+ (insert mime::article/draft-header-separator)
+ (set-buffer-modified-p (buffer-modified-p))
+ )))
+ (mime-viewer/kill-buffer)
+ (pop-to-buffer mother)
+ ))
+
+(set-alist 'mime-viewer/quitting-method-alist
+ 'mh-letter-mode
+ (function mime-viewer::quitting-method/draft-preview)
+ )
+
+(set-alist 'mime-viewer/quitting-method-alist
+ 'news-reply-mode
+ (function mime-viewer::quitting-method/draft-preview)
+ )
+
+
+;;; @ etc
+;;;
(defun message/get-header-string-except (pat boundary)
(save-excursion
?_
arg)))) str "")
)
+
+
+(run-hooks 'tm-comp-load-hook)
+
+(provide 'tm-comp)
;;;
-;;; $Id: tm-setup.el,v 5.1 1995/01/10 02:02:51 morioka Exp $
+;;; $Id: tm-setup.el,v 6.0 1995/04/18 19:40:11 morioka Exp $
;;;
(provide 'tm-setup)
(add-hook 'tm-view-load-hook
(function
(lambda ()
+ ;; for message/partial
+ (require 'tm-partial)
+
+ ;; for LaTeX
(set-atype 'mime/content-decoding-condition
'((type . "text/x-latex")
(method . mime/decode-text/latex)
;;;
(defconst mime-viewer/RCS-ID
- "$Id: tm-view.el,v 6.14 1995/04/12 11:52:34 morioka Exp morioka $")
+ "$Id: tm-view.el,v 6.15 1995/04/18 16:48:08 morioka Exp $")
(defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
(defconst mime/viewer-version mime-viewer/version)
"text/x-latex" "application/x-latex"
"application/octet-stream" nil))
+(defvar mime-viewer/decoding-mode "play" "MIME body decoding mode")
+
+
+;;; @@ quitting
+;;;
+
+(defun mime::viewer/quitting-method-for-gnus4 ()
+ (mime-viewer/kill-buffer)
+ (delete-other-windows)
+ (gnus-article-show-summary)
+ )
+
+(defun mime::viewer/quitting-method-for-rmail ()
+ (mime-viewer/kill-buffer)
+ (rmail-summary)
+ (delete-other-windows)
+ )
+
+(defun mime::viewer/quitting-method-for-mh-e ()
+ (let ((win (get-buffer-window
+ mime/output-buffer-name))
+ (buf
+ (mime::preview-content-info/buffer
+ (car mime::preview/content-list)))
+ )
+ (if win
+ (delete-window win)
+ )
+ (mime-viewer/kill-buffer)
+ (pop-to-buffer
+ (let ((name (buffer-name buf)))
+ (string-match "show-" name)
+ (substring name (match-end 0))
+ ))
+ ;; patch for mh-narrow.el
+ ;; by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
+ (if (and (featurep 'mh-narrow)
+ (fboundp 'mh-narrow-to-page))
+ (save-excursion
+ (set-buffer mh-show-buffer)
+ (mh-narrow-to-page)))
+ ;; end of patch
+ ))
+
(defvar mime-viewer/quitting-method-alist
- '((gnus-article-mode
- . (lambda ()
- (mime-viewer/kill-buffer)
- (delete-other-windows)
- (gnus-article-show-summary)
- ))
- (rmail-mode
- . (lambda ()
- (mime-viewer/kill-buffer)
- (rmail-summary)
- (delete-other-windows)
- ))
- (mh-show-mode
- . (lambda ()
- (let ((win (get-buffer-window
- mime/output-buffer-name))
- (buf
- (mime::preview-content-info/buffer
- (car mime::preview/content-list)))
- )
- (if win
- (delete-window win)
- )
- (mime-viewer/kill-buffer)
- (pop-to-buffer
- (let ((name (buffer-name buf)))
- (string-match "show-" name)
- (substring name (match-end 0))
- ))
- ;; patch for mh-narrow.el
- ;; by YAMAOKA Katsumi <yamaoka@ga.sony.co.jp>
- (if (and (featurep 'mh-narrow)
- (fboundp 'mh-narrow-to-page))
- (save-excursion
- (set-buffer mh-show-buffer)
- (mh-narrow-to-page)))
- ;; end of patch
- )))
+ '((gnus-article-mode . mime::viewer/quitting-method-for-gnus4)
+ (rmail-mode . mime::viewer/quitting-method-for-rmail)
+ (mh-show-mode . mime::viewer/quitting-method-for-mh-e)
(mime/show-message-mode
. (lambda ()
(set-window-configuration
)))
))
-(defvar mime-viewer/decoding-mode "play" "MIME body decoding mode")
-
;;; @ data structure
;;;