From b32afecb7e1e90d59062b878a2ebd4591a756bce Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 9 Mar 1998 12:33:16 +0000 Subject: [PATCH] tm 7.38. --- Changes-7.38.en | 54 ++++++++++++++++++ Makefile | 78 ++++++++++++------------- config.tm | 3 + doc/tm-gnus_en.texi | 6 +- doc/tm-mh-e_en.texi | 8 +-- doc/tm-util=en.texi | 6 +- doc/tm_en.texi | 6 +- gnus/ChangeLog-7.27-7.28.en | 12 ++++ gnus/Makefile | 2 +- gnus/s-path | 2 +- gnus/tm-sgnus.el | 10 +++- tm-def.el | 4 +- tm-edit.el | 132 ++++++++++++++++++++++++++----------------- tm-file.el | 11 ++-- tm-parse.el | 30 +++++++++- tm-pgp.el | 13 ++++- tm-play.el | 38 +++++++++---- tm-setup.el | 6 +- tm-view.el | 46 +++++++-------- 19 files changed, 309 insertions(+), 158 deletions(-) create mode 100644 Changes-7.38.en create mode 100644 gnus/ChangeLog-7.27-7.28.en diff --git a/Changes-7.38.en b/Changes-7.38.en new file mode 100644 index 0000000..4acb113 --- /dev/null +++ b/Changes-7.38.en @@ -0,0 +1,54 @@ +Fri Dec 22 09:00:20 1995 Morioka Tomohiko + + * tm: Version 7.38 was released. + * tm/gnus: Version 7.28 was released. + +Thu Dec 21 18:27:09 1995 Morioka Tomohiko + + * tm-edit.el (mime-file-types): format was changed. + (0) filename pattern + (1) primary type + (2) sub type + (3) parameters of Content-Type field + (4) Content-Transfer-Encoding + (5) disposition-type + (6) parameters of Content-Disposition field + + * tm-edit.el (mime-editor/insert-file): + modified for new `mime-file-types' format. + +Thu Dec 21 18:17:03 1995 Morioka Tomohiko + + * tm-def.el (mime/disposition-type-regexp): New constant + + * tm-parse.el (mime/parse-Content-Disposition): New function + + * tm-parse.el (mime/Content-Disposition): New function + + * tm-view.el (mime-article/get-subject): + function `mime-viewer/get-subject' was renamed to it. + + * tm-view.el (mime-article/get-uu-filename): New function: + it was separated from function `mime-article/get-subject'. + + * tm-play.el (mime-article/get-original-filename): New function + + * tm-play.el (mime-article/get-filename): + Function `mime-article/get-name' was renamed to it. + It was modified to use `mime-article/get-original-filename' + instead of `mime-article/get-subject'. + + * tm-file.el (mime-article/extract-file): + modified to use `mime-article/get-filename' + +Wed Dec 20 15:27:35 1995 Morioka Tomohiko + + * tm-setup.el: + According to Shuhei KOBAYASHI , + `(require 'tm-gnus)' is add-hooked as append mode. + (cf. [tm-ja:1391]) + +Thu Dec 20 05:48:56 1995 UENO Hiroshi + + * tm-pgp.el: (mime-article/check-pgp-signature): + fixed to treat signed part as binary. (to fix problem in OS/2) diff --git a/Makefile b/Makefile index 57912af..ab7ac2f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 7.10 1995/12/19 17:50:09 morioka Exp morioka $ +# $Id: Makefile,v 7.11 1995/12/21 11:06:40 morioka Exp morioka $ # include config.tm @@ -38,71 +38,71 @@ TL_FILES = tl/README.en tl/Makefile tl/mk-tl tl/*.el tl/doc/*.texi \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm7.37.tar.gz +TARFILE = tm7.38.tar.gz 18: - cd ../tl; PWD=`pwd` make elc EMACS=$(EMACS18) - cd ../mel; PWD=`pwd` make elc EMACS=$(EMACS18) + cd ../tl; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS18) + cd ../mel; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS18) $(EMACS18) -batch -l mk-tm -f compile-tm - cd gnus; PWD=`pwd` make gnus3 EMACS=$(EMACS18) + cd gnus; PWD=`pwd` $(MAKE) gnus3 EMACS=$(EMACS18) # If you use GNUS 4.*, please use following comment: -# cd gnus; PWD=`pwd` make gnus4 EMACS=$(EMACS18) - cd mh-e; PWD=`pwd` make elc EMACS=$(EMACS18) +# cd gnus; PWD=`pwd` $(MAKE) gnus4 EMACS=$(EMACS18) + cd mh-e; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS18) install-18: 18 cd ../tl; PWD=`pwd` \ - make install-18 EMACS=$(EMACS18) TLDIR18=$(TLDIR18) + $(MAKE) install-18 EMACS=$(EMACS18) TLDIR18=$(TLDIR18) cd ../mel; PWD=`pwd` \ - make install-18 EMACS=$(EMACS18) MELDIR18=$(MELDIR18) + $(MAKE) install-18 EMACS=$(EMACS18) MELDIR18=$(MELDIR18) $(EMACS18) -batch -l mk-tm -f install-tm $(TMDIR18) cd gnus; PWD=`pwd` \ - make install-18 EMACS=$(EMACS18) TMDIR18=$(TM_GNUS_DIR18) + $(MAKE) install-18 EMACS=$(EMACS18) TMDIR18=$(TM_GNUS_DIR18) cd mh-e; PWD=`pwd` \ - make install-18 EMACS=$(EMACS18) TMDIR18=$(TMH_DIR18) + $(MAKE) install-18 EMACS=$(EMACS18) TMDIR18=$(TMH_DIR18) xemacs: - cd ../tl; PWD=`pwd` make elc EMACS=$(XEMACS) - cd ../mel; PWD=`pwd` make elc EMACS=$(XEMACS) + cd ../tl; PWD=`pwd` $(MAKE) elc EMACS=$(XEMACS) + cd ../mel; PWD=`pwd` $(MAKE) elc EMACS=$(XEMACS) $(XEMACS) -batch -l mk-tm -f compile-tm - cd gnus; PWD=`pwd` make gnus EMACS=$(XEMACS) - cd gnus; PWD=`pwd` make gnus5 EMACS=$(XEMACS) - cd gnus; PWD=`pwd` make sgnus EMACS=$(XEMACS) - cd mh-e; PWD=`pwd` make elc EMACS=$(XEMACS) + cd gnus; PWD=`pwd` $(MAKE) gnus EMACS=$(XEMACS) + cd gnus; PWD=`pwd` $(MAKE) gnus5 EMACS=$(XEMACS) + cd gnus; PWD=`pwd` $(MAKE) sgnus EMACS=$(XEMACS) + cd mh-e; PWD=`pwd` $(MAKE) elc EMACS=$(XEMACS) install-xemacs: xemacs cd ../tl; PWD=`pwd` \ - make install-19 EMACS=$(XEMACS) TLDIR19=$(TLDIR19) + $(MAKE) install-19 EMACS=$(XEMACS) TLDIR19=$(TLDIR19) cd ../mel; PWD=`pwd` \ - make install-19 EMACS=$(XEMACS) MELDIR19=$(MELDIR19) + $(MAKE) install-19 EMACS=$(XEMACS) MELDIR19=$(MELDIR19) $(XEMACS) -batch -l mk-tm -f install-tm $(TMDIR19) cd gnus; PWD=`pwd` \ - make install-19 EMACS=$(XEMACS) TMDIR19=$(TM_GNUS_DIR19) + $(MAKE) install-19 EMACS=$(XEMACS) TMDIR19=$(TM_GNUS_DIR19) cd mh-e; PWD=`pwd` \ - make install-19 EMACS=$(XEMACS) TMDIR19=$(TMH_DIR19) + $(MAKE) install-19 EMACS=$(XEMACS) TMDIR19=$(TMH_DIR19) 19_29: - cd ../tl; PWD=`pwd` make elc EMACS=$(EMACS19_29) - cd ../mel; PWD=`pwd` make elc EMACS=$(EMACS19_29) + cd ../tl; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS19_29) + cd ../mel; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS19_29) $(EMACS19_29) -batch -l mk-tm -f compile-tm - cd gnus; PWD=`pwd` make gnus EMACS=$(EMACS19_29) - cd gnus; PWD=`pwd` make gnus5 EMACS=$(EMACS19_29) - cd gnus; PWD=`pwd` make sgnus EMACS=$(EMACS19_29) - cd mh-e; PWD=`pwd` make elc EMACS=$(EMACS19_29) + cd gnus; PWD=`pwd` $(MAKE) gnus EMACS=$(EMACS19_29) + cd gnus; PWD=`pwd` $(MAKE) gnus5 EMACS=$(EMACS19_29) + cd gnus; PWD=`pwd` $(MAKE) sgnus EMACS=$(EMACS19_29) + cd mh-e; PWD=`pwd` $(MAKE) elc EMACS=$(EMACS19_29) install-19_29: 19_29 cd ../tl; PWD=`pwd` \ - make install-19 EMACS=$(EMACS19_29) TLDIR19=$(TLDIR19_29) + $(MAKE) install-19 EMACS=$(EMACS19_29) TLDIR19=$(TLDIR19_29) cd ../mel; PWD=`pwd` \ - make install-19 EMACS=$(EMACS19_29) MELDIR19=$(MELDIR19_29) + $(MAKE) install-19 EMACS=$(EMACS19_29) MELDIR19=$(MELDIR19_29) $(EMACS19_29) -batch -l mk-tm -f install-tm $(TMDIR19_29) cd gnus; PWD=`pwd` \ - make install-19_29 EMACS=$(EMACS19_29) \ + $(MAKE) install-19_29 EMACS=$(EMACS19_29) \ TMDIR19_29=$(TM_GNUS_DIR19_29) cd mh-e; PWD=`pwd` \ - make install-19 EMACS=$(EMACS19_29) TMDIR19=$(TMH_DIR19_29) + $(MAKE) install-19 EMACS=$(EMACS19_29) TMDIR19=$(TMH_DIR19_29) all: $(UTILS) $(DVI) @@ -115,13 +115,13 @@ src/decode-b: src/decode-b.c tex: ol2 - cd doc; make tex + cd doc; $(MAKE) tex dvi: ol2 - cd doc; make dvi + cd doc; $(MAKE) dvi ps: ol2 - cd doc; make ps + cd doc; $(MAKE) ps install: $(UTILS) methods @@ -131,12 +131,12 @@ install: $(UTILS) methods clean: -$(RM) $(GOMI) - -cd doc; make clean - -cd gnus; make clean - -cd mh-e; make clean - cd ../mel; PWD=`pwd` make clean + -cd doc; $(MAKE) clean + -cd gnus; $(MAKE) clean + -cd mh-e; $(MAKE) clean + cd ../mel; PWD=`pwd` $(MAKE) clean tar: - cd doc; make tex + cd doc; $(MAKE) tex cd ..; gtar cvzf $(TARFILE) $(FILES) diff --git a/config.tm b/config.tm index a07bfbf..0b0d925 100644 --- a/config.tm +++ b/config.tm @@ -2,6 +2,9 @@ # tm/config.tm: configuration file for tm # +MAKE = make + + # Please specify emacs executables: # EMACS18 = for EMACS 18.* (NEmacs, NEpoch and Mule 1.*) # XEMACS = for Emacs .. 19.28 (Mule 2.0 .. 2.3) or XEmacs diff --git a/doc/tm-gnus_en.texi b/doc/tm-gnus_en.texi index 42a6814..2aa5b33 100644 --- a/doc/tm-gnus_en.texi +++ b/doc/tm-gnus_en.texi @@ -6,7 +6,7 @@ @titlepage @title{tm-gnus} @author{MORIOKA Tomohiko} -@code{$Id: tm-gnus_en.texi,v 4.0 1995/12/18 12:04:00 morioka Exp morioka $} +@code{$Id: tm-gnus_en.texi,v 5.1 1995/12/21 10:39:45 morioka Exp morioka $} @end titlepage @@ -112,8 +112,8 @@ and Gnus. If this feature is available, when reading an article in summary mode, tm-gnus displays preview buffer processed by tm-view instead of raw article buffer. -Therefore if an article is encoded by Quoted-Printable or Base64, -decoded article is displays. In addition, if using tm-rich, rich text +Therefore if an article is encoded by Quoted-Printable or Base64, a +decoded article is displayed. In addition, if using tm-rich, rich text article is automatic formated. Of course, multipart article is dealt with correctly. diff --git a/doc/tm-mh-e_en.texi b/doc/tm-mh-e_en.texi index fab0dd0..26f973c 100644 --- a/doc/tm-mh-e_en.texi +++ b/doc/tm-mh-e_en.texi @@ -6,11 +6,11 @@ @titlepage @title{tm-mh-e} @author{MORIOKA Tomohiko} -@code{$Id: $} +@code{$Id: tm-mh-e_en.texi,v 3.1 1995/12/21 10:40:49 morioka Exp morioka $} @end titlepage -@node Top, Introduction, (tm_ja.info)tm-MUA, (tm_ja.info)tm-MUA +@node Top, Introduction, (tm_en.info)tm-MUA, (tm_en.info)tm-MUA @comment node-name, next, previous, up @ifinfo @top tm-mh-e 7.44 Reference manual @@ -80,8 +80,8 @@ automatic MIME preview mode, when reading an article in summary mode, tm-mh-e displays preview buffer processed by tm-view instead of raw show buffer. -Therefore if an article is encoded by Quoted-Printable or Base64, -decoded article is displays. In addition, if using tm-rich, rich text +Therefore if an article is encoded by Quoted-Printable or Base64, a +decoded article is displayed. In addition, if using tm-rich, rich text article is automatic formated. Of course, multipart article is dealt with correctly. diff --git a/doc/tm-util=en.texi b/doc/tm-util=en.texi index c033309..d3373d1 100644 --- a/doc/tm-util=en.texi +++ b/doc/tm-util=en.texi @@ -1,4 +1,4 @@ -@c $Id: tm-util_en.texi,v 1.1 1995/12/13 09:27:55 morioka Exp $ +@c $Id: tm-util=en.texi,v 2.0 1995/12/21 10:43:15 morioka Exp $ @node customize, Bug report, encoded-word, Top @comment node-name, next, previous, up @@ -72,8 +72,8 @@ Default value of @var{hook-name} is @code{MODULE-load-hook}. @subsection message header display (1) -If you want not to display "Mail-From", "Expires", "Xref", "Approved", -"Sender" and "X-.*", please specify: +If you would like to hide "Mail-From", "Expires", "Xref", "Approved", +"Sender" and "X-.*" headers, please specify: @lisp (call-after-loaded diff --git a/doc/tm_en.texi b/doc/tm_en.texi index 4109592..1e0a451 100644 --- a/doc/tm_en.texi +++ b/doc/tm_en.texi @@ -6,7 +6,7 @@ @titlepage @title tm Manual (English Version) @author by MORIOKA Tomohiko -@code{$Id: tm_en.texi,v 7.6 1995/12/17 16:16:53 morioka Exp morioka $} +@code{$Id: tm_en.texi,v 7.8 1995/12/21 10:42:14 morioka Exp morioka $} @end titlepage @@ -106,7 +106,7 @@ messages. @section Mule -Mule can handle the multi-lingual text. With Mule, tiny-mime supports +Mule can handle the multi-lingual text. With Mule, tm supports ISO-2022-JP, ISO-2022-JP-2, US-ASCII, ISO-8859-1..9, ISO-2022-CN, ISO-2022-KR, EUC-KR, etc. You can also add or change encoding/decoding for character sets by mime/set-charset-and-encoding @@ -315,7 +315,7 @@ enters @code{mime/viewer-mode} to view a message Notice: In tm-vm, key to enter @code{mime/viewer-mode} is @key{Z} instead of @key{v}. In tm-mh-e, tm-vm and tm-gnus in Gnus 3.15 or -later, preview buffer of @code{mime/viewer-mode} is displays +later, preview buffer of @code{mime/viewer-mode} displays automatically in default setting. @menu diff --git a/gnus/ChangeLog-7.27-7.28.en b/gnus/ChangeLog-7.27-7.28.en new file mode 100644 index 0000000..7fa0063 --- /dev/null +++ b/gnus/ChangeLog-7.27-7.28.en @@ -0,0 +1,12 @@ +Fri Dec 22 08:57:48 1995 Morioka Tomohiko + + * tm/gnus: Version 7.28 was released. + +Fri Dec 22 07:08:15 1995 MURATA Masahiro + + * tm-sgnus.el: + `(eval-when-compile (require 'cl))' was inserted. + (cf. [tm-ja:1414]) + + * tm-sgnus.el (tm-gnus/preview-cut-header): 'gnus-type and + 'headers are added to text property. (cf. [tm-ja:1414]) diff --git a/gnus/Makefile b/gnus/Makefile index 8afe897..971de46 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -27,7 +27,7 @@ TMDIR19_29 = $(DATADIR19_29)/$(EMACS_PREFIX)/site-lisp FILES = tm/gnus/*.el tm/doc/tm-gnus*.texi -TARFILE = tm-gnus7.26.tar +TARFILE = tm-gnus7.28.tar gnus: diff --git a/gnus/s-path b/gnus/s-path index 1500eb5..3087552 100644 --- a/gnus/s-path +++ b/gnus/s-path @@ -7,4 +7,4 @@ ;;; ;; please edit -(add-path "sgnus-0.25/lisp" 'all-paths) +(add-path "sgnus-0.26/lisp" 'all-paths) diff --git a/gnus/tm-sgnus.el b/gnus/tm-sgnus.el index 6870be6..ed7c0b6 100644 --- a/gnus/tm-sgnus.el +++ b/gnus/tm-sgnus.el @@ -5,9 +5,10 @@ ;;; Copyright (C) 1995 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko +;;; MURATA Masahiro ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/09/24 -;;; Version: $Revision: 7.26 $ +;;; Version: $Revision: 7.28 $ ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;;; ;;; This file is part of tm (Tools for MIME). @@ -35,12 +36,14 @@ (require 'gnus) (require 'tm-gd5) +(eval-when-compile (require 'cl)) + ;;; @ version ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-sgnus.el,v 7.26 1995/12/20 12:49:27 morioka Exp $") + "$Id: tm-sgnus.el,v 7.28 1995/12/22 07:50:17 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " for September")) @@ -237,7 +240,8 @@ This variable is set to `gnus-show-mime'.") (while want-list (insert (pop want-list))) (add-text-properties - (point) (point-max) gnus-hidden-properties) + (point) (point-max) + (nconc (list 'gnus-type 'headers) gnus-hidden-properties)) ))) (defun tm-gnus/content-header-filter () diff --git a/tm-def.el b/tm-def.el index 62d69a3..d672cbe 100644 --- a/tm-def.el +++ b/tm-def.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-def.el,v 7.6 1995/12/15 12:55:53 morioka Exp $ +;;; $Id: tm-def.el,v 7.7 1995/12/21 18:17:03 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, definition ;;; ;;; This file is part of tm (Tools for MIME). @@ -118,6 +118,8 @@ rfc822/quoted-string-regexp "\\|[^; \t\n]*\\)")) +(defconst mime/disposition-type-regexp mime/token-regexp) + ;;; @@ Base64 ;;; diff --git a/tm-edit.el b/tm-edit.el index aac9c17..2d931ce 100644 --- a/tm-edit.el +++ b/tm-edit.el @@ -7,7 +7,7 @@ ;; Author: UMEDA Masanobu ;; MORIOKA Tomohiko -;; Version: $Revision: 7.37 $ +;; Version: $Revision: 7.38 $ ;; Keywords: mail, news, MIME, multimedia, multilingual ;; This file is not part of GNU Emacs. @@ -108,7 +108,7 @@ ;; LCD Archive Entry: ;; mime|Masanobu UMEDA|umerin@mse.kyutech.ac.jp| ;; Simple MIME Composer| -;; $Date: 1995/12/19 17:47:16 $|$Revision: 7.37 $|~/misc/mime.el.Z| +;; $Date: 1995/12/21 18:27:09 $|$Revision: 7.38 $|~/misc/mime.el.Z| ;;; Code: @@ -126,7 +126,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 7.37 1995/12/19 17:47:16 morioka Exp $") + "$Id: tm-edit.el,v 7.38 1995/12/21 18:27:09 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -236,10 +236,7 @@ To insert a signature file specified by mime-signature-file ("rfc822") ) ("application" - ("octet-stream" - ("name") - ("type" "" "tar" "shar") - ("conversions")) + ("octet-stream" ("type" "" "tar" "shar")) ("postscript") ("x-kiss" ("x-cnf"))) ("image" @@ -258,59 +255,83 @@ To insert a signature file specified by mime-signature-file (defvar mime-file-types '(("\\.rtf$" - "text" "richtext" nil nil) + "text" "richtext" nil + nil + nil nil) ("\\.html$" - "text" "html" nil nil) + "text" "html" nil + nil + nil nil) ("\\.ps$" - "application" "postscript" nil "quoted-printable" - (("Content-Description" . file)) + "application" "postscript" nil + "quoted-printable" + "attachment" (("filename" . file)) ) ("\\.jpg$" - "image" "jpeg" nil "base64" - (("Content-Description" . file)) + "image" "jpeg" nil + "base64" + "inline" (("filename" . file)) ) ("\\.gif$" - "image" "gif" nil "base64" - (("Content-Description" . file)) + "image" "gif" nil + "base64" + "inline" (("filename" . file)) ) ("\\.tiff$" - "image" "tiff" nil "base64" - (("Content-Description" . file)) + "image" "tiff" nil + "base64" + "inline" (("filename" . file)) ) ("\\.pic$" - "image" "x-pic" nil "base64" - (("Content-Description" . file))) + "image" "x-pic" nil + "base64" + "inline" (("filename" . file)) + ) ("\\.mag$" - "image" "x-mag" nil "base64" - (("Content-Description" . file)) + "image" "x-mag" nil + "base64" + "inline" (("filename" . file)) ) ("\\.xbm$" - "image" "x-xbm" nil "base64" - (("Content-Description" . file)) + "image" "x-xbm" nil + "base64" + "inline" (("filename" . file)) ) ("\\.xwd$" - "image" "x-xwd" nil "base64" - (("Content-Description" . file)) + "image" "x-xwd" nil + "base64" + "inline" (("filename" . file)) ) ("\\.au$" - "audio" "basic" nil "base64") + "audio" "basic" nil + "base64" + "attachment" (("filename" . file)) + ) ("\\.mpg$" - "video" "mpeg" nil "base64" - (("Content-Description" . file)) + "video" "mpeg" nil + "base64" + "attachment" (("filename" . file)) ) ("\\.el$" - "application" "octet-stream" (("name" . file) - ("type" . "emacs-lisp")) "7bit") + "application" "octet-stream" (("type" . "emacs-lisp")) + "7bit" + "attachment" (("filename" . file)) + ) ("\\.lsp$" - "application" "octet-stream" (("name" . file) - ("type" . "common-lisp")) "7bit") + "application" "octet-stream" (("type" . "common-lisp")) + "7bit" + "attachment" (("filename" . file)) + ) ("\\.tar.gz$" - "application" "octet-stream" (("name" . file) - ("type" . "tar") - ("conversions" . "gzip")) nil) + "application" "octet-stream" (("type" . "tar+gzip")) + nil + "attachment" (("filename" . file)) + ) ("\\.diff$" - "application" "octet-stream" (("name" . file) - ("type" . "patch")) nil) + "application" "octet-stream" (("type" . "patch")) + nil + "attachment" (("filename" . file)) + ) ("\\.signature" "text" "plain" nil nil) (".*" nil nil nil nil) @@ -827,7 +848,8 @@ Charset is automatically obtained from the mime-body-charset-chooser." (subtype (nth 1 guess)) (parameters (nth 2 guess)) (default (nth 3 guess)) ;Guess encoding from its file name. - (fields (nth 4 guess)) + (disposition-type (nth 4 guess)) + (disposition-params (nth 5 guess)) (encoding (if (not (interactive-p)) default @@ -844,7 +866,7 @@ Charset is automatically obtained from the mime-body-charset-chooser." mime-encoding-method-alist nil t nil)))) (if (string-equal encoding "") (setq encoding default)) - (if (or (consp parameters) (consp fields)) + (if (or (consp parameters) (stringp disposition-type)) (let ((rest parameters) cell attribute value) (setq parameters "") (while rest @@ -857,17 +879,24 @@ Charset is automatically obtained from the mime-body-charset-chooser." (setq parameters (concat parameters "; " attribute "=" value)) (setq rest (cdr rest)) ) - (setq rest fields) - (while rest - (setq cell (car rest)) - (setq attribute (car cell)) - (setq value (cdr cell)) - (if (eq value 'file) - (setq value (file-name-nondirectory file)) - ) - (setq parameters (concat parameters "\n" attribute ": " value)) - (setq rest (cdr rest)) - ) + (if disposition-type + (progn + (setq parameters + (concat parameters "\n" + "Content-Disposition: " disposition-type)) + (setq rest disposition-params) + (while rest + (setq cell (car rest)) + (setq attribute (car cell)) + (setq value (cdr cell)) + (if (eq value 'file) + (setq value (file-name-nondirectory file)) + ) + (setq parameters + (concat parameters "; " attribute "=" value)) + (setq rest (cdr rest)) + ) + )) )) (mime-editor/insert-tag pritype subtype parameters) (mime-editor/insert-binary-file file encoding) @@ -1706,7 +1735,8 @@ Content-Transfer-Encoding: 7bit ) (goto-char beg) (insert (format "--[[multipart/encrypted; - boundary=\"%s\"; protocol=\"application/pgp-encrypted\"][7bit]] + boundary=\"%s\"; + protocol=\"application/pgp-encrypted\"][7bit]] --%s Content-Type: application/pgp-encrypted diff --git a/tm-file.el b/tm-file.el index 07a2280..ff565ca 100644 --- a/tm-file.el +++ b/tm-file.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-file.el,v 7.1 1995/12/15 11:58:29 morioka Exp $ +;;; $Id: tm-file.el,v 7.2 1995/12/21 18:08:22 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -30,8 +30,12 @@ (require 'tm-view) (defun mime-article/extract-file (beg end cal) - (let* ((name (or (cdr (assoc "name" cal)) - (cdr (assoc "x-name" cal)))) + (goto-char beg) + (let* ((name + (save-restriction + (narrow-to-region beg end) + (mime-article/get-filename cal) + )) (encoding (cdr (assq 'encoding cal))) (filename (if name @@ -49,7 +53,6 @@ (the-buf (current-buffer)) (tmp-buf (generate-new-buffer (file-name-nondirectory filename))) ) - (goto-char beg) (re-search-forward "\n\n") (append-to-buffer tmp-buf (match-end 0) end) (save-excursion diff --git a/tm-parse.el b/tm-parse.el index f4fc429..1401f17 100644 --- a/tm-parse.el +++ b/tm-parse.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: tm-parse.el,v 7.0 1995/12/09 01:56:28 morioka Exp $ +;;; $Id: tm-parse.el,v 7.1 1995/12/21 18:13:54 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -50,8 +50,7 @@ (substring str e) )))) -(defconst mime::ctype-regexp - (concat "^" mime/content-type-subtype-regexp)) +(defconst mime::ctype-regexp (concat "^" mime/content-type-subtype-regexp)) (defun mime/parse-Content-Type (str) "Parse STR as field-body of Content-Type field. [tm-parse.el]" @@ -68,6 +67,23 @@ (cons ctype (reverse dest)) ))) +(defconst mime::dtype-regexp (concat "^" mime/disposition-type-regexp)) + +(defun mime/parse-Content-Disposition (str) + "Parse STR as field-body of Content-Disposition field. [tm-parse.el]" + (setq str (rfc822/unfolding-string str)) + (if (string-match mime::dtype-regexp str) + (let* ((e (match-end 0)) + (ctype (downcase (substring str 0 e))) + ret dest) + (setq str (substring str e)) + (while (setq ret (mime/parse-parameter str)) + (setq dest (cons (car ret) dest)) + (setq str (cdr ret)) + ) + (cons ctype (reverse dest)) + ))) + ;;; @ field reader ;;; @@ -90,6 +106,14 @@ If is is not found, return DEFAULT-ENCODING. [tm-parse.el]" default-encoding) )) +(defun mime/Content-Disposition () + "Read field-body of Content-Disposition field from current-buffer, +and return parsed it. [tm-parse.el]" + (let ((str (rfc822/get-field-body "Content-Disposition"))) + (if str + (mime/parse-Content-Disposition str) + ))) + ;;; @ message parser ;;; diff --git a/tm-pgp.el b/tm-pgp.el index 33cdda5..f59e852 100644 --- a/tm-pgp.el +++ b/tm-pgp.el @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/12/7 ;;; Version: -;;; $Id: tm-pgp.el,v 7.4 1995/12/19 18:06:49 morioka Exp $ +;;; $Id: tm-pgp.el,v 7.5 1995/12/21 18:45:26 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia, PGP, security ;;; ;;; This file is part of tm (Tools for MIME). @@ -141,7 +141,16 @@ (while (re-search-forward "\n" nil t) (replace-match "\r\n") ) - (write-file orig-file) + (let ((mc-flag nil) ; for Mule + (file-coding-system + (if (featurep 'mule) *noconv*)) + kanji-flag ; for NEmacs + (emx-binary-mode t) ; for OS/2 + jka-compr-compression-info-list ; for jka-compr + jam-zcat-filename-list ; for jam-zcat + require-final-newline) + (write-file orig-file) + ) (kill-buffer (current-buffer)) ) (save-excursion diff --git a/tm-play.el b/tm-play.el index 1df7786..175a66b 100644 --- a/tm-play.el +++ b/tm-play.el @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1995/9/26 (separated from tm-view.el) ;;; Version: -;;; $Id: tm-play.el,v 7.10 1995/12/14 15:37:13 morioka Exp $ +;;; $Id: tm-play.el,v 7.11 1995/12/21 18:11:03 morioka Exp $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -104,7 +104,7 @@ (narrow-to-region beg end) (goto-char beg) (let ((method (cdr (assoc 'method cal))) - (name (mime-article/get-name cal)) + (name (mime-article/get-filename cal)) ) (if method (let ((file (make-temp-name @@ -180,15 +180,31 @@ (concat (regexp-* mime-viewer/file-name-char-regexp) "\\(\\." mime-viewer/file-name-char-regexp "+\\)*")) -(defun mime-article/get-name (param) - (let ((str (mime-viewer/get-subject param))) - (if (string-match " " str) - (if (or (string-match mime-viewer/file-name-regexp-1 str) - (string-match mime-viewer/file-name-regexp-2 str)) - (substring str (match-beginning 0)(match-end 0)) - ) - (replace-as-filename str) - ))) +(defun mime-article/get-original-filename (param &optional encoding) + (or (mime-article/get-uu-filename param encoding) + (let (ret) + (or (if (or (and (setq ret (mime/Content-Disposition)) + (setq ret (assoc "filename" (cdr ret))) + ) + (setq ret (assoc "name" param)) + (setq ret (assoc "x-name" param)) + ) + (rfc822/strip-quoted-string (cdr ret)) + ) + (if (setq ret + (or (rfc822/get-field-body "Content-Description") + (rfc822/get-field-body "Subject") + )) + (if (or (string-match mime-viewer/file-name-regexp-1 ret) + (string-match mime-viewer/file-name-regexp-2 ret)) + (substring ret (match-beginning 0)(match-end 0)) + )) + )) + "")) + +(defun mime-article/get-filename (param) + (replace-as-filename (mime-article/get-original-filename param)) + ) ;;; @ mail/news message diff --git a/tm-setup.el b/tm-setup.el index 1e1ec65..36c98ad 100644 --- a/tm-setup.el +++ b/tm-setup.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tm-setup.el,v 7.0 1995/12/17 13:02:30 morioka Exp $ +;;; $Id: tm-setup.el,v 7.1 1995/12/20 15:27:35 morioka Exp $ ;;; (require 'tl-misc) @@ -100,8 +100,8 @@ (add-hook 'gnusutil-initialize-hook le) ) (progn - (add-hook 'gnus-Startup-hook le) - (add-hook 'gnus-startup-hook le) + (add-hook 'gnus-Startup-hook le 'append) + (add-hook 'gnus-startup-hook le 'append) ))) diff --git a/tm-view.el b/tm-view.el index 7acb55a..f10508b 100644 --- a/tm-view.el +++ b/tm-view.el @@ -8,7 +8,7 @@ ;;; modified by Steven L. Baur ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;;; Version: $Revision: 7.37 $ +;;; Version: $Revision: 7.38 $ ;;; Keywords: mail, news, MIME, multimedia ;;; ;;; This file is part of tm (Tools for MIME). @@ -44,7 +44,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 7.37 1995/12/19 15:40:46 morioka Exp $") + "$Id: tm-view.el,v 7.38 1995/12/21 18:03:47 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -435,7 +435,7 @@ The compressed face will be piped to this command.") (narrow-to-region beg end) (setq subj (mime-eword/decode-string - (mime-viewer/get-subject params encoding))) + (mime-article/get-subject params encoding))) ) (set-buffer obuf) (setq nb (point)) @@ -526,7 +526,7 @@ The compressed face will be piped to this command.") (function mime-viewer/play-content)) ))) -(defun mime-viewer/get-subject (param &optional encoding) +(defun mime-article/get-uu-filename (param &optional encoding) (if (member (or encoding (cdr (assq 'encoding param)) ) @@ -537,30 +537,24 @@ The compressed face will be piped to this command.") (buffer-substring (match-beginning 0)(match-end 0)) )) "")) - (let (ret) - (or (and (setq ret (assoc "name" param)) - (rfc822/strip-quoted-string (cdr ret)) - ) - (and (setq ret (assoc "x-name" param)) - (rfc822/strip-quoted-string (cdr ret)) - ) - - (save-excursion - (save-restriction - (goto-char (point-min)) - (narrow-to-region (point-min) - (or (and (search-forward "\n\n" nil t) - (match-beginning 0) - ) - (point-max))) - (or - (rfc822/get-field-body "Content-Description") - (rfc822/get-field-body "Subject") - ))) - "")) )) - +(defun mime-article/get-subject (param &optional encoding) + (or (rfc822/get-field-body "Content-Description") + (rfc822/get-field-body "Subject") + (let (ret) + (if (or (and (setq ret (mime/Content-Disposition)) + (setq ret (assoc "filename" (cdr ret))) + ) + (setq ret (assoc "name" param)) + (setq ret (assoc "x-name" param)) + ) + (rfc822/strip-quoted-string (cdr ret)) + )) + (mime-article/get-uu-filename param encoding) + "")) + + ;;; @ content information ;;; -- 1.7.10.4