From: morioka Date: Tue, 10 Mar 1998 11:40:15 +0000 (+0000) Subject: tm 7.103.1. X-Git-Tag: tm-7_103_1~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=503573e80034a61901e52c89688168e09e8abec8;p=elisp%2Ftm.git tm 7.103.1. --- diff --git a/ChangeLog b/ChangeLog index 44b8a72..0152aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,83 @@ +1997-02-03 MORIOKA Tomohiko + + * MU: Version 0.39.3 was released. + * tm: Version 7.103.1 was released. + +Mon Feb 3 06:53:15 1997 MORIOKA Tomohiko + + * README.en (PROBLEMS): delete problem of message/partial. + +Sat Feb 1 19:32:36 1997 MORIOKA Tomohiko + + * tm-ftp.el (mime-article/decode-message/external-ftp): + Use `expand-file-name'. + +Sat Feb 1 19:17:38 1997 MORIOKA Tomohiko + + * tm-setup.el: Function `mime/decode-message/external-ftp' was + renamed to `mime-article/decode-message/external-ftp'. + +Sat Feb 1 19:06:12 1997 MORIOKA Tomohiko + + * tm-ftp.el (mime-article/dired-function-for-one-frame): New + function. + + * tm-ftp.el (mime-article/decode-message/external-ftp): Renamed + from `mime/decode-message/external-ftp'. + + * tm-ftp.el (mime-article/dired-function): Renamed from + `mime/dired-function'. + + * tm-ftp.el (mime/decode-message/external-ftp): fixed problem of + window-configuration. + +Sat Feb 1 18:01:25 1997 MORIOKA Tomohiko + + * tm-partial.el (mime-article/grab-message/partials): Unused + temporal buffer `buffer' was abolished. + + * tm-play.el (mime-article/decode-message/partial): delete + temporary files after FULL file is generated. + +Sat Feb 1 17:35:31 1997 MORIOKA Tomohiko + + * tm-play.el (mime-article/decode-message/partial): fixed problem + when total parameter is not exist. + +Sat Feb 1 16:46:29 1997 MORIOKA Tomohiko + + * tm-partial.el (tm-partial/preview-article): Use + `save-window-excursion'. + (mime-article/grab-message/partials): fixed problem of + window-configuration with Gnus. + +Sat Feb 1 16:33:26 1997 MORIOKA Tomohiko + + * tm-play.el (mime-article/decode-message/partial): fixed problem + of window-configuration with Gnus. + + * tm-play.el (mime-article/decode-message/partial): Use macro + `as-binary-input-file'. + +Sat Feb 1 14:51:55 1997 MORIOKA Tomohiko + + * tm-play.el (mime-article/coding-system-alist): Use it for every + emacsen; refer `default-mime-charset'. + (mime-article::write-region): New function. + (mime-article/decode-message/partial): Use function + `mime-article::write-region'. + +Fri Jan 31 15:45:30 1997 MORIOKA Tomohiko + + * README.en: modified for tm-view 7.80. + + * README.en: tm-vm/tm-vm_en.* was renamed to tm-vm/tm-vm-en.*. + +1997-01-31 Oscar Figueiredo + + * README.en: modified for tm-vm 8. + + 1997-01-31 MORIOKA Tomohiko * emu: Version 7.37.6 was released. diff --git a/Makefile b/Makefile index c3e07fb..f8cc96d 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # $Id: Makefile,v 7.45 1997/01/10 15:42:29 morioka Exp morioka $ # -VERSION = 7.103 +VERSION = 7.103.1 SHELL = /bin/sh MAKE = make diff --git a/README.en b/README.en index 0cd7fa5..ae6e779 100644 --- a/README.en +++ b/README.en @@ -1,7 +1,7 @@ [README for tm (English Version)] by MORIOKA Tomohiko and KOBAYASHI Shuhei -$Id: README.en,v 7.28 1997/01/30 11:40:09 morioka Exp $ +$Id: README.en,v 7.32 1997/02/03 06:53:15 morioka Exp $ 1 What's tm? @@ -32,7 +32,7 @@ $Id: README.en,v 7.28 1997/01/30 11:40:09 morioka Exp $ - tm/doc/tm-edit-en.texi : tm-edit Reference Manual - tm-mh-e/tm-mh-e-en.texi : tm-mh-e Reference Manual - gnus-mime/gnus-mime-en.texi : gnus-mime Reference Manual - - tm-vm/tm-vm_en.texi : tm-vm Reference Manual + - tm-vm/tm-vm-en.texi : tm-vm Reference Manual - info - tm/doc/tm-en.info : tm Reference Manual @@ -40,7 +40,7 @@ $Id: README.en,v 7.28 1997/01/30 11:40:09 morioka Exp $ - tm/doc/tm-edit-en.info : tm-edit Reference Manual - tm-mh-e/tm-mh-e-en.info : tm-mh-e Reference Manual - gnus-mime/gnus-mime-en.info : gnus-mime Reference Manual - - tm-vm/tm-vm_en.info : tm-vm Reference Manual + - tm-vm/tm-vm-en.info : tm-vm Reference Manual (2) Japanese edition @@ -210,6 +210,10 @@ insert in ~/.emacs: tm works well with BBDB: If you use VM, please insert (require 'tm-vm) *after* (bbdb-insinuate-vm). + Important changes have been made to the VM interface in TM v7.102, +users upgrading from an earlier version should read the documentation +of tm-vm (`News' section) for details. + 6.4 PGP @@ -323,25 +327,23 @@ mime/viewer-mode. Sample code follows: In tm-MUAs, you can use mime/viewer-mode if you press the `v' key (in VM, `Z' key) in Summary mode. Or automatic MIME previewed buffer's major-mode is mime/viewer-mode. mime/viewer-mode has following -functions: - - q quit from mime/viewer-mode - u move to upper content - p move to previous content - n move to next content - SPC scroll up or move to next content - M-SPC scroll down or move to previous content - DEL scroll down or move to previous content - RET move to next line - M-RET move to previous line - < move to beginning of message - > move to end of message - v play current content - e extract as file current content - C-c C-p print current content - f display X-Face in current message - button-2 move to point under the mouse cursor and play - current content or browse URL +functions (these key bindings are prefixed with C-c in VM): + + q quit from mime/viewer-mode + u move to upper content + p or M-TAB move to previous content + n or TAB move to next content + SPC scroll up or move to next content + M-SPC or DEL scroll down or move to previous content + RET move to next line + M-RET move to previous line + < move to beginning of message + > move to end of message + v play current content + e extract as file current content + C-c C-p print current content + f display X-Face in current message + button-2 play current content or browse URL 8 Bug report @@ -377,10 +379,9 @@ and its mirrors: 10 PROBLEMS -- Window configuration is broken after combining partial messages or - playing other internal methods. - Automatic combining method for message/partial is not implemented for RMAIL. +- answer method is not implemented for RMAIL, Gnus and GNUS. 11 TODO diff --git a/tm-ftp.el b/tm-ftp.el index c8faf07..b8db6cf 100644 --- a/tm-ftp.el +++ b/tm-ftp.el @@ -1,35 +1,58 @@ -;;; -;;; tm-ftp: anonymous ftp processor for tm-view -;;; -;;; by MASUTANI Yasuhiro (1994/11/ 5) -;;; -;;; modified by MORIOKA Tomohiko (1994/11/ 8) -;;; and OKABE Yasuo (1994/11/11) -;;; -;;; $Id: tm-ftp.el,v 6.1 1995/09/14 15:49:43 morioka Exp $ -;;; +;;; tm-ftp.el --- tm-view internal method for anonymous ftp + +;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc. + +;; Author: MASUTANI Yasuhiro +;; MORIOKA Tomohiko +;; Created: 1994/11/5 +;; Version: $Id: tm-ftp.el,v 7.4 1997/02/01 19:32:36 morioka Exp $ +;; Keywords: anonymous ftp, MIME, multimedia, mail, news + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Code: (require 'tm-view) (require 'ange-ftp) -(defvar mime/dired-function +(defvar mime-article/dired-function (if mime/use-multi-frame (function dired-other-frame) - (function dired) + (function mime-article/dired-function-for-one-frame) + )) + +(defun mime-article/dired-function-for-one-frame (dir) + (let ((win (or (get-buffer-window mime::article/preview-buffer) + (get-largest-window)))) + (select-window win) + (dired dir) )) -(defun mime/decode-message/external-ftp (beg end cal) - (let ((access-type (cdr (assoc "access-type" cal))) - (site (cdr (assoc "site" cal))) - (directory (cdr (assoc "directory" cal))) - (name (cdr (assoc "name" cal))) - (mode (cdr (assoc "mode" cal))) - (pathname)) - (setq pathname - (concat "/anonymous@" site ":" directory)) - (message (concat "Accessing " pathname "/" name "...")) - (switch-to-buffer mime::article/preview-buffer) - (funcall mime/dired-function pathname) +(defun mime-article/decode-message/external-ftp (beg end cal) + (let* ((access-type (cdr (assoc "access-type" cal))) + (site (cdr (assoc "site" cal))) + (directory (cdr (assoc "directory" cal))) + (name (cdr (assoc "name" cal))) + (mode (cdr (assoc "mode" cal))) + (pathname (concat "/anonymous@" site ":" directory)) + ) + (message (concat "Accessing " (expand-file-name name pathname) "...")) + (funcall mime-article/dired-function pathname) (goto-char (point-min)) (search-forward name) )) @@ -37,7 +60,13 @@ (set-atype 'mime/content-decoding-condition '((type . "message/external-body") ("access-type" . "anon-ftp") - (method . mime/decode-message/external-ftp) + (method . mime-article/decode-message/external-ftp) )) + +;;; @ end +;;; + (provide 'tm-ftp) + +;;; tm-ftp.el ends here diff --git a/tm-partial.el b/tm-partial.el index 7ef93a5..c2dfcbc 100644 --- a/tm-partial.el +++ b/tm-partial.el @@ -1,11 +1,11 @@ ;;; tm-partial.el --- Grabbing all MIME "message/partial"s. -;; Copyright (C) 1995,1996 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: OKABE Yasuo @ Kyoto University ;; MORIOKA Tomohiko ;; Version: -;; $Id: tm-partial.el,v 7.13 1996/08/30 04:27:52 morioka Exp $ +;; $Id: tm-partial.el,v 7.15 1997/02/01 18:01:25 morioka Exp $ ;; Keywords: mail, news, MIME, multimedia, message/partial ;; This file is a part of tm (Tools for MIME). @@ -21,8 +21,8 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Code: @@ -34,16 +34,16 @@ ;; display Article at the cursor in Subject buffer. (defun tm-partial/preview-article (target) - (let ((f (assq target tm-partial/preview-article-method-alist))) - (if f - (funcall (cdr f)) - (error "Fatal. Unsupported mode") - ))) + (save-window-excursion + (let ((f (assq target tm-partial/preview-article-method-alist))) + (if f + (funcall (cdr f)) + (error "Fatal. Unsupported mode") + )))) (defun mime-article/grab-message/partials (beg end cal) (interactive) (let* ((id (cdr (assoc "id" cal))) - (buffer (generate-new-buffer id)) (mother mime::article/preview-buffer) (target (cdr (assq 'major-mode cal))) (article-buffer (buffer-name (current-buffer))) @@ -63,43 +63,41 @@ (if (or (file-exists-p full-file) (not (y-or-n-p "Merge partials?")) ) - (progn - (kill-buffer buffer) - (mime-article/decode-message/partial beg end cal) - ) + (mime-article/decode-message/partial beg end cal) (let (cinfo the-id parameters) (setq subject-id (std11-field-body "Subject")) (if (string-match "[0-9\n]+" subject-id) (setq subject-id (substring subject-id 0 (match-beginning 0))) ) - (pop-to-buffer subject-buf) - (while (search-backward subject-id nil t) - ) - (catch 'tag - (while t - (tm-partial/preview-article target) - (pop-to-buffer article-buffer) - (switch-to-buffer mime::article/preview-buffer) - (setq cinfo - (mime::preview-content-info/content-info - (car mime::preview/content-list))) - (setq parameters (mime::content-info/parameters cinfo)) - (setq the-id (assoc-value "id" parameters)) - (if (equal the-id id) - (progn - (switch-to-buffer article-buffer) - (mime-article/decode-message/partial - (point-min)(point-max) parameters) - (if (file-exists-p full-file) - (throw 'tag nil) - ) - )) - (if (not (progn - (pop-to-buffer subject-buf) - (end-of-line) - (search-forward subject-id nil t) - )) - (error "not found") + (save-excursion + (set-buffer subject-buf) + (while (search-backward subject-id nil t)) + (catch 'tag + (while t + (tm-partial/preview-article target) + (set-buffer article-buffer) + (set-buffer mime::article/preview-buffer) + (setq cinfo + (mime::preview-content-info/content-info + (car mime::preview/content-list))) + (setq parameters (mime::content-info/parameters cinfo)) + (setq the-id (assoc-value "id" parameters)) + (if (equal the-id id) + (progn + (set-buffer article-buffer) + (mime-article/decode-message/partial + (point-min)(point-max) parameters) + (if (file-exists-p full-file) + (throw 'tag nil) + ) + )) + (if (not (progn + (set-buffer subject-buf) + (end-of-line) + (search-forward subject-id nil t) + )) + (error "not found") + ) ) )))))) diff --git a/tm-play.el b/tm-play.el index 53b7172..d901e00 100644 --- a/tm-play.el +++ b/tm-play.el @@ -1,10 +1,10 @@ ;;; tm-play.el --- decoder for tm-view.el -;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. +;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Created: 1995/9/26 (separated from tm-view.el) -;; Version: $Id: tm-play.el,v 7.33 1996/12/07 08:26:26 morioka Exp $ +;; Version: $Id: tm-play.el,v 7.39 1997/02/01 17:54:51 morioka Exp $ ;; Keywords: mail, news, MIME, multimedia ;; This file is part of tm (Tools for MIME). @@ -269,16 +269,44 @@ ;;; (defvar mime-article/coding-system-alist - (and (boundp 'MULE) - '((mh-show-mode . *noconv*) - (t . *ctext*) - ))) + (list (cons 'mh-show-mode *noconv*) + (cons t (mime-charset-to-coding-system default-mime-charset)) + )) -(defvar mime-article/kanji-code-alist - (and (boundp 'NEMACS) - '((mh-show-mode . nil) - (t . 2) - ))) +(cond (running-mule-merged-emacs + (defun mime-article::write-region (start end file) + (let ((coding-system-for-write + (cdr + (or (assq major-mode mime-article/coding-system-alist) + (assq t mime-article/coding-system-alist) + )))) + (write-region start end file) + )) + ) + ((or (boundp 'MULE) + running-xemacs-with-mule) + (defun mime-article::write-region (start end file) + (let ((file-coding-system + (cdr + (or (assq major-mode mime-article/coding-system-alist) + (assq t mime-article/coding-system-alist) + )))) + (write-region start end file) + )) + ) + ((boundp 'NEMACS) + (defun mime-article::write-region (start end file) + (let ((kanji-fileio-code + (cdr + (or (assq major-mode mime-article/kanji-code-alist) + (assq t mime-article/kanji-code-alist) + )))) + (write-region start end file) + )) + ) + (t + (defalias 'mime-article::write-region 'write-region) + )) (defun mime-article/decode-message/partial (beg end cal) (goto-char beg) @@ -287,96 +315,108 @@ (id (cdr (assoc "id" cal))) (number (cdr (assoc "number" cal))) (total (cdr (assoc "total" cal))) - (the-buf (current-buffer)) file (mother mime::article/preview-buffer) - (win-conf (save-excursion - (set-buffer mother) - mime::preview/original-window-configuration)) - ) - (if (not (file-exists-p root-dir)) + ) + (or (file-exists-p root-dir) (make-directory root-dir) - ) + ) (setq id (replace-as-filename id)) (setq root-dir (concat root-dir "/" id)) - (if (not (file-exists-p root-dir)) + (or (file-exists-p root-dir) (make-directory root-dir) - ) + ) (setq file (concat root-dir "/FULL")) - (if (not (file-exists-p file)) - (progn - (re-search-forward "^$") - (goto-char (1+ (match-end 0))) - (setq file (concat root-dir "/" number)) - (let ((file-coding-system - (cdr - (or (assq major-mode mime-article/coding-system-alist) - (assq t mime-article/coding-system-alist) - ))) - (kanji-fileio-code - (cdr - (or (assq major-mode mime-article/kanji-code-alist) - (assq t mime-article/kanji-code-alist) - ))) - ) - (write-region (point) (point-max) file) - ) - (if (get-buffer mime/temp-buffer-name) - (kill-buffer mime/temp-buffer-name) + (if (file-exists-p file) + (let ((full-buf (get-buffer-create "FULL")) + (pwin (or (get-buffer-window mother) + (get-largest-window))) + ) + (save-window-excursion + (set-buffer full-buf) + (erase-buffer) + (as-binary-input-file (insert-file-contents file)) + (setq major-mode 'mime/show-message-mode) + (mime/viewer-mode mother) ) - (switch-to-buffer mime/temp-buffer-name) - (let ((i 1) - (max (string-to-int total)) - (file-coding-system-for-read (if (boundp 'MULE) - *noconv*)) - kanji-fileio-code) - (catch 'tag - (while (<= i max) - (setq file (concat root-dir "/" (int-to-string i))) - (if (not (file-exists-p file)) - (progn - (switch-to-buffer the-buf) - (throw 'tag nil) - )) - (insert-file-contents file) - (goto-char (point-max)) - (setq i (1+ i)) - ) - ;;(delete-other-windows) - (let ((buf (current-buffer))) - (write-file (concat root-dir "/FULL")) - (set-window-configuration win-conf) - (let ((win (get-buffer-window mother))) - (if win - (select-window win) - )) - (set-window-buffer (selected-window) buf) - ;;(set-window-buffer buf) - (setq major-mode 'mime/show-message-mode) - ) - (mime/viewer-mode mother) - (pop-to-buffer (current-buffer)) - )) + (set-window-buffer pwin + (save-excursion + (set-buffer full-buf) + mime::article/preview-buffer)) + (select-window pwin) ) - (progn - ;;(delete-other-windows) - (set-window-configuration win-conf) - (select-window (or (get-buffer-window mother) - (get-buffer-window - (save-excursion - (set-buffer mother) - mime::preview/article-buffer)) - (get-largest-window) + (re-search-forward "^$") + (goto-char (1+ (match-end 0))) + (setq file (concat root-dir "/" number)) + (mime-article::write-region (point) (point-max) file) + (let ((total-file (concat root-dir "/CT"))) + (setq total + (if total + (progn + (or (file-exists-p total-file) + (save-excursion + (set-buffer (find-file-noselect total-file)) + (erase-buffer) + (insert total) + (save-buffer) + (kill-buffer (current-buffer)) + )) + (string-to-number total) + ) + (and (file-exists-p total-file) + (save-excursion + (set-buffer (find-file-noselect total-file)) + (and (re-search-forward "[0-9]+" nil t) + (string-to-number + (buffer-substring (match-beginning 0) + (match-end 0))) + ) + (kill-buffer (current-buffer)) + )) + ))) + (if (and total (> total 0)) + (catch 'tag + (save-excursion + (set-buffer (get-buffer-create mime/temp-buffer-name)) + (let ((full-buf (current-buffer))) + (erase-buffer) + (let ((i 1)) + (while (<= i total) + (setq file (concat root-dir "/" (int-to-string i))) + (if (not (file-exists-p file)) + (throw 'tag nil) + ) + (as-binary-input-file (insert-file-contents file)) + (goto-char (point-max)) + (setq i (1+ i)) + )) + (as-binary-output-file (write-file (concat root-dir "/FULL"))) + (let ((i 1)) + (while (<= i total) + (let ((file (format "%s/%d" root-dir i))) + (and (file-exists-p file) + (delete-file file) )) - (as-binary-input-file - (set-buffer (get-buffer-create "FULL")) - (insert-file-contents file) - ) - (setq major-mode 'mime/show-message-mode) - (mime/viewer-mode mother) - ;;(pop-to-buffer (current-buffer)) - )) - )) + (setq i (1+ i)) + )) + (let ((file (expand-file-name "CT" root-dir))) + (and (file-exists-p file) + (delete-file file) + )) + (save-window-excursion + (setq major-mode 'mime/show-message-mode) + (mime/viewer-mode mother) + ) + (let ((pwin (or (get-buffer-window mother) + (get-largest-window) + )) + (pbuf (save-excursion + (set-buffer full-buf) + mime::article/preview-buffer))) + (set-window-buffer pwin pbuf) + (select-window pwin) + ))))) + ))) ;;; @ rot13-47 diff --git a/tm-setup.el b/tm-setup.el index ae2450d..b230b47 100644 --- a/tm-setup.el +++ b/tm-setup.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: tm-setup.el,v 7.9 1997/01/31 13:25:50 morioka Exp $ +;; Version: $Id: tm-setup.el,v 7.10 1997/02/01 19:17:38 morioka Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;; This file is part of tm (Tools for MIME). @@ -19,8 +19,8 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with This program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Code: @@ -42,10 +42,10 @@ (set-atype 'mime/content-decoding-condition '((type . "message/external-body") ("access-type" . "anon-ftp") - (method . mime/decode-message/external-ftp) + (method . mime-article/decode-message/external-ftp) )) - (autoload 'mime/decode-message/external-ftp "tm-ftp") - + (autoload 'mime-article/decode-message/external-ftp "tm-ftp") + ;; for LaTeX (set-atype 'mime/content-decoding-condition '((type . "text/x-latex")