--- /dev/null
+* tm
+
+tm/tm-parse.el
+----------------------------
+revision 4.0
+date: 1995/10/12 06:08:12; author: morioka; state: Exp; lines: +12 -11
+rcnum (reversed content number) slot was added to `mime::content-info'
+structure.
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.13
+date: 1995/10/12 06:10:04; author: morioka; state: Exp; lines: +6 -2
+In function `mime-viewer/display-content', `cnum' was made from
+`rcnum' slot value of argument `content'.
+----------------------------
+
+
+* tm/mh-e
+
+ Attached version 7.02.
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 7.2
+date: 1995/10/12 05:43:34; author: morioka; state: Exp; lines: +33 -106
+When it is automatic MIME preview mode, buffer name of preview buffer is
+``show-+FOLDER'' and it is indicated from mh-show-buffer. Then article
+buffer is created as ``article-+FOLDER''.
+----------------------------
--- /dev/null
+* tm
+
+tm/tm-parse.el
+----------------------------
+revision 4.0
+date: 1995/10/12 06:08:12; author: morioka; state: Exp; lines: +12 -11
+mime::content-info \e$B9=B$BN$K\e(B rcnum (reversed content number) slot \e$B$r@_\e(B
+\e$B$1$?!#\e(B
+----------------------------
+
+tm/tm-view.el
+----------------------------
+revision 7.13
+date: 1995/10/12 06:10:04; author: morioka; state: Exp; lines: +6 -2
+\e$B4X?t\e(B mime-viewer/display-content \e$B$K$*$$$F!"\e(Bcnum \e$B$r0z?t\e(B content \e$B$N\e(B
+rcnum slot \e$B$N>pJs$+$i:n$k$h$&$K$7$?!#\e(B
+----------------------------
+
+
+* tm/mh-e
+
+ Version 7.02 \e$B$rE:IU$7$?!#\e(B
+
+tm/mh-e/tm-mh-e.el
+----------------------------
+revision 7.2
+date: 1995/10/12 05:43:34; author: morioka; state: Exp; lines: +33 -106
+automatic MIME preview mode \e$B$N;~!"\e(Bpreview buffer \e$B$N\e(B buffer \e$BL>$r\e(B
+show-+FOLDER \e$B$H$7!"\e(Bmh-show-buffer \e$B$+$i;X$5$l$k$h$&$K$7$?!#$^$?!"$3$N;~!"\e(B
+article-+FOLDER \e$B$H$$$&L>A0$N\e(B article buffer \e$B$r:n$k$h$&$K$7$?!#\e(B
+----------------------------
FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES)
-TARFILE = tm7.12.tar
+TARFILE = tm7.13.tar
nemacs:
FILES = tm/mh-e/*.el tm/mh-e/Makefile tm/mh-e/mk-tmh tm/mh-e/*.ol
-TARFILE = tm-mh-e7.01.tar
+TARFILE = tm-mh-e7.02.tar
elc:
;;;
(defconst tm-mh-e/RCS-ID
- "$Id: tm-mh-e.el,v 7.1 1995/10/07 08:26:47 morioka Exp $")
+ "$Id: tm-mh-e.el,v 7.2 1995/10/12 05:43:34 morioka Exp $")
(defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID))
(setq buffer-read-only nil)
(erase-buffer)
(if mode
- (progn
+ (let* ((aname (concat "article-" folder))
+ (abuf (get-buffer aname))
+ )
+ (if abuf
+ (progn
+ (set-buffer abuf)
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ )
+ (setq abuf (get-buffer-create aname))
+ (set-buffer abuf)
+ )
(let ((file-coding-system-for-read
(if (boundp 'MULE) *noconv*))
kanji-fileio-code)
(set-buffer-modified-p nil)
(setq buffer-read-only t)
(mh-show-mode)
- (mime/viewer-mode)
+ (mime/viewer-mode nil nil nil
+ aname (concat "show-" folder))
(goto-char (point-min))
)
(let ((clean-message-header mh-clean-message-header)
(defun tm-mh-e/view-message (&optional msg)
"MIME decode and play this message."
(interactive)
- (mh-invalidate-show-buffer)
- (let ((tm-mh-e/decode-all t))
- (mh-show-msg msg)
- )
- (pop-to-buffer (save-window-excursion
- (switch-to-buffer mh-show-buffer)
- mime::article/preview-buffer))
+ (if (null tm-mh-e/decode-all)
+ (let ((tm-mh-e/decode-all t))
+ (mh-invalidate-show-buffer)
+ (mh-show-msg msg)
+ ))
+ (pop-to-buffer mh-show-buffer)
)
(defun tm-mh-e/toggle-decoding-mode (arg)
(if (null arg)
(not tm-mh-e/decode-all)
arg))
- (save-window-excursion
- (switch-to-buffer mh-show-buffer)
+ (save-excursion
+ (set-buffer mh-show-buffer)
(if (null tm-mh-e/decode-all)
- (if (and mime::article/preview-buffer
- (get-buffer mime::article/preview-buffer))
- (kill-buffer mime::article/preview-buffer)
+ (if (and mime::preview/article-buffer
+ (get-buffer mime::preview/article-buffer))
+ (kill-buffer mime::preview/article-buffer)
)))
+ (mh-invalidate-show-buffer)
(mh-show (mh-get-msg-num t))
- (if tm-mh-e/decode-all
- (let ((the-buf (current-buffer)))
- (if mime::article/preview-buffer
- (pop-to-buffer (save-excursion
- (switch-to-buffer mh-show-buffer)
- mime::article/preview-buffer))
- (tm-mh-e/view-message (mh-get-msg-num t)))
- (pop-to-buffer the-buf)
- )))
-
-(defun tm-mh-e/page-msg ()
- (interactive)
- (if tm-mh-e/decode-all
- (scroll-other-window)
- (mh-page-msg)
- ))
-
-(defun tm-mh-e/previous-page ()
- (interactive)
- (if tm-mh-e/decode-all
- (scroll-other-window (- (save-window-excursion
- (other-window 1)
- (window-height))))
- (mh-previous-page)
- ))
-
-(defun tm-mh-e/cite ()
- (interactive)
- (if tm-mh-e/decode-all
- (progn
- (if mh-delete-yanked-msg-window
- (save-excursion
- (set-buffer mh-sent-from-folder)
- (set-buffer mh-show-buffer)
- (delete-windows-on mime::article/preview-buffer)
- ))
- (save-excursion
- (save-restriction
- (insert-buffer
- (save-excursion
- ;; 1995/9/21,
- ;; modified by Eric Ding <ericding@San-Jose.ate.slb.com>
- ;; (c.f. tm-eng:104)
- (set-buffer mh-sent-from-folder)
- (set-buffer mh-show-buffer)
- (or mime::article/preview-buffer (current-buffer))
- ;; end
- ))
- (if (looking-at "^\\[.+\\(\n[ \t].+\\)*\\]\n")
- (replace-match ""))
- (narrow-to-region (point)(point-max))
- (mh-insert-prefix-string mh-ins-buf-prefix)
- )))
- (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
(defun tm-mh-e/quitting-method ()
(let ((win (get-buffer-window
mime/output-buffer-name))
- (buf mime::preview/article-buffer)
+ (buf (current-buffer))
)
(if win
(delete-window win)
(substring name 5)
))
(if (not tm-mh-e/decode-all)
- (mh-show (mh-get-msg-num t))
- )))
+ (mh-invalidate-show-buffer)
+ )
+ (mh-show (mh-get-msg-num t))
+ ))
;;; @ for tm-comp
;;; @ set up
;;;
-;;(add-hook 'mh-show-mode-hook (function mime/viewer-mode))
-
(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)
(interactive)
(scroll-other-window -1)
)))
-(define-key mh-folder-mode-map " " (function tm-mh-e/page-msg))
-(define-key mh-folder-mode-map "\177" (function tm-mh-e/previous-page))
-
-(add-hook 'mh-letter-mode-hook
- (function
- (lambda ()
- (define-key mh-letter-mode-map "\C-c\C-y" (function tm-mh-e/cite))
- )))
(defun tm-mh-e/summary-before-quit ()
(let ((buf (get-buffer mh-show-buffer)))
;;;
;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; Version:
-;;; $Id: tm-parse.el,v 3.0 1995/10/05 11:28:40 morioka Exp $
+;;; $Id: tm-parse.el,v 4.0 1995/10/12 06:08:12 morioka Exp $
;;; Keywords: mail, news, MIME, multimedia
;;;
;;; This file is part of tm (Tools for MIME).
;;;
(define-structure mime::content-info
- point-min point-max type parameters encoding children)
+ rcnum point-min point-max type parameters encoding children)
-(defun mime/parse-multipart (boundary ctype params encoding)
+(defun mime/parse-multipart (boundary ctype params encoding rcnum)
(goto-char (point-min))
(let ((beg (point-min))
(end (if (re-search-forward
(dc-ctl
(cond ((string= ctype "multipart/digest") '("message/rfc822"))
(t '("text/plain"))))
- cb ce ct ret ncb children)
+ cb ce ct ret ncb children (i 0))
(save-restriction
(narrow-to-region beg end)
(goto-char beg)
(setq ncb (match-end 0))
(save-restriction
(narrow-to-region cb ce)
- (setq ret (mime/parse-message dc-ctl "7bit"))
+ (setq ret (mime/parse-message dc-ctl "7bit" (cons i rcnum)))
)
(setq children (cons ret children))
(goto-char (mime::content-info/point-max ret))
(goto-char (setq cb ncb))
+ (setq i (1+ i))
)
(setq ce (point-max))
(save-restriction
(narrow-to-region cb ce)
- (setq ret (mime/parse-message dc-ctl "7bit"))
+ (setq ret (mime/parse-message dc-ctl "7bit" (cons i rcnum)))
)
(setq children (cons ret children))
)
- (mime::content-info/create beg end ctype params encoding
+ (mime::content-info/create rcnum beg end ctype params encoding
(reverse children))
))
-(defun mime/parse-message (&optional ctl encoding)
+(defun mime/parse-message (&optional ctl encoding rcnum)
"Parse current-buffer as a MIME message. [tm-parse.el]"
(setq ctl (or (mime/Content-Type) ctl))
(setq encoding (or (mime/Content-Transfer-Encoding) encoding))
(let ((boundary (assoc "boundary" params)))
(cond (boundary
(setq boundary (rfc822/strip-quoted-string (cdr boundary)))
- (mime/parse-multipart boundary ctype params encoding)
+ (mime/parse-multipart boundary ctype params encoding rcnum)
)
((string= ctype "message/rfc822")
(goto-char (point-min))
- (mime::content-info/create (point-min) (point-max)
+ (mime::content-info/create rcnum (point-min) (point-max)
ctype params encoding
(save-restriction
(narrow-to-region
)
)
(t
- (mime::content-info/create (point-min) (point-max)
+ (mime::content-info/create rcnum (point-min) (point-max)
ctype params encoding nil)
))
)))
;;;
(defconst mime-viewer/RCS-ID
- "$Id: tm-view.el,v 7.12 1995/10/11 12:12:06 morioka Exp $")
+ "$Id: tm-view.el,v 7.13 1995/10/12 06:10:04 morioka Exp $")
(defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
(defconst mime/viewer-version mime-viewer/version)
(ctype (mime::content-info/type content))
(params (mime::content-info/parameters content))
(encoding (mime::content-info/encoding content))
- (cnum (mime-article/point-content-number beg cinfo))
+ (cnum (mime::content-info/rcnum content))
he e nb ne subj)
+ (setq cnum
+ (if cnum
+ (reverse cnum)
+ t))
(set-buffer ibuf)
(goto-char beg)
(setq he (if (re-search-forward "^$" nil t)