tm 7.42.1.
authormorioka <morioka>
Mon, 9 Mar 1998 15:23:59 +0000 (15:23 +0000)
committermorioka <morioka>
Mon, 9 Mar 1998 15:23:59 +0000 (15:23 +0000)
12 files changed:
ChangeLog
Makefile
gnus/ChangeLog
gnus/Makefile
gnus/g5-path
gnus/mk-tgnus
gnus/s-path
gnus/tm-gnus.el
gnus/tm-sgnus.el
tm-def.el
tm-pgp.el
tm-play.el

index 4fae24a..c134d06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,48 @@
-Sat Feb  3 17:29:01 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+Thu Feb  8 06:36:25 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm: Version 7.42.1 was released.
+       * tm/gnus: Version 7.41 was released.
+
+Tue Feb  6 02:43:06 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-def.el (mime/encoding-name): new function.
+       (mime/make-charset-default-encoding-alist): call
+       `mime/encoding-name' if not encoded.
+
+Mon Feb  5 05:00:27 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-play.el (mime-article/get-original-filename): return nil if
+       file name is not exist.
+
+Sat Feb  3 21:28:47 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-def.el (mime/charset-type-list): new variable.
+       (mime/make-charset-default-encoding-alist): new function.
+       (mime/default-transfer-level): new variable.
+       (mime/text-toggle-transfer-level): new function.
+
+Sat Feb  3 00:56:20 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-pgp.el (tm-pgp::good-signature-regexp): new variable
+
+       * tm-pgp.el (tm-pgp::key-expected-regexp): new variable
+
+       * tm-pgp.el (mime::article/call-pgp-to-check-signature): modified
+       to use variable `tm-pgp::good-signature-regexp'
+
+       * tm-pgp.el (mime-article/check-pgp-signature): modified to use
+       variable `tm-pgp::key-expected-regexp'
+
+Fri Feb  2 23:07:13 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-pgp.el (mime::article/call-pgp-to-check-signature):
+       new function
+
+       * tm-pgp.el: (mime-article/check-pgp-signature): fetch public key
+       if it is not found
+
+\f
+Sat Feb  2 17:29:01 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
 
        * tl: Version 7.11 was released.
        * tm: version 7.42 was released
index 0dc277b..afca0af 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ 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.42.tar.gz
+TARFILE = tm7.42.1.tar.gz
 
 
 18:
index f9fd4c0..2cf6d8a 100644 (file)
@@ -1,3 +1,27 @@
+Thu Feb  8 06:17:16 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/gnus: Version 7.41 was released.
+
+       * tm-sgnus.el (tm-gnus/nnheader-find-file-noselect): new function.
+       `nnheader-find-file-noselect' is redefine if Mule is running.
+
+Thu Feb  8 03:35:26 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-sgnus.el (tm-gnus/prepare-save-mail-function): new function;
+       It is inserted into `nnfolder-prepare-save-mail-hook' if Mule is
+       running.
+
+Thu Feb  8 01:30:10 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * mk-tgnus, tm-sgnus.el, tm-gnus.el: tm-gd5.el was deleted.
+       Self code conversion feature for Gnus 5.[01] was deleted.
+
+Tue Feb  6 08:53:27 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm-sgnus.el: use `substitute-key-definition' to define
+       `tm-gnus/summary-toggle-header' key.
+
+\f
 Thu Jan 25 03:21:50 1996  Morioka Tomohiko  <morioka@jaist.ac.jp>
 
        * tm/gnus: Version 7.37 was released.
index 8de3076..f47b352 100644 (file)
@@ -28,7 +28,7 @@ TMDIR19_29 = $(DATADIR19_29)/$(EMACS_PREFIX)/site-lisp
 
 FILES  = tm/gnus/*.el tm/doc/tm-gnus*.texi
 
-TARFILE = tm-gnus7.37.tar
+TARFILE = tm-gnus7.41.tar
 
 
 gnus:
index 0e91ced..89ac1ec 100644 (file)
@@ -7,4 +7,9 @@
 ;;;
 
 ;; please edit
-(add-path "gnus-5.0.13/lisp" 'all-paths)
+
+;; It is relative style. Added path is searched from load-path.
+(add-path "gnus-5.0.15/lisp" 'all-paths)
+
+;; It is absolute style.
+;; (add-path "/usr/local/share/emacs/site-lisp/gnus/lisp/")
index 387a22b..6955794 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Emacs-Lisp-*-
 ;;;
-;;; $Id: mk-tgnus,v 2.0 1995/12/25 05:47:03 morioka Exp morioka $
+;;; $Id: mk-tgnus,v 2.1 1996/02/08 01:30:10 morioka Exp morioka $
 ;;;
 
 (setq load-path
   (cond ((boundp 'gnus-original-article-buffer)
         (require 'tm-gnus)
         (byte-compile-file "tm-sgnus.el")
-        (byte-compile-file "tm-gd5.el")
         )
        ((string-match "Gnus v5\\|September Gnus" gnus-version)
         (require 'tm-gnus)
         (byte-compile-file "tm-gnus4.el")
-        (byte-compile-file "tm-gd5.el")
         )
        ((string-match "GNUS 4" gnus-version)
         (require 'tm-gnus)
           (install-el-files path
                             "tm-gnus.el"
                             "tm-sgnus.el" "tm-gnus4.el"
-                            "tm-gd5.el" "tm-gd3.el")
+                            "tm-gd3.el")
           (install-elc-files path
                              ;;"tm-gnus.elc"
-                             "tm-sgnus.elc" "tm-gnus4.elc"
-                             "tm-gd5.elc")
+                             "tm-sgnus.elc" "tm-gnus4.elc")
           )
          (t
           (install-el-files path
                             "tm-gnus.el"
-                            "tm-sgnus.el" "tm-gnus4.el"
-                            "tm-gd5.el")
+                            "tm-sgnus.el" "tm-gnus4.el")
           (install-elc-files path
                              ;;"tm-gnus.elc"
-                             "tm-sgnus.elc" "tm-gnus4.elc"
-                             "tm-gd5.elc")
+                             "tm-sgnus.elc" "tm-gnus4.elc")
           ))
     (setq command-line-args-left (cdr command-line-args-left))
     ))
index ec13557..dd28a98 100644 (file)
@@ -7,4 +7,9 @@
 ;;;
 
 ;; please edit
-(add-path "sgnus-0.30/lisp" 'all-paths)
+
+;; It is relative style. Added path is searched from load-path.
+(add-path "sgnus-0.36/lisp/" 'all-paths)
+
+;; It is absolute style.
+;; (add-path "/usr/local/share/emacs/site-lisp/sgnus/lisp/")
index 831577f..263e723 100644 (file)
@@ -9,7 +9,7 @@
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1993/11/20 (obsolete mol's gnus-mime.el)
 ;;; Version:
-;;;    $Id: tm-gnus.el,v 7.16 1996/01/25 02:41:11 morioka Exp $
+;;;    $Id: tm-gnus.el,v 7.17 1996/02/08 01:29:27 morioka Exp $
 ;;; Keywords: news, MIME, multimedia, encoded-word, multilingual
 ;;;
 ;;; This file is part of tm (Tools for MIME).
            "^\\((ding) Gnus\\|Gnus v5\\|September Gnus\\)" gnus-version)
           (fboundp 'mail-header-from))
        ;; for Gnus 5.0 .. 5.1.*
-       (require 'tm-gd5)
        (require 'tm-gnus4)
-
-       (set-alist 'mime-viewer/content-header-filter-alist
-                 'gnus-article-mode
-                 (function tm-gnus/content-header-filter))
-       (set-alist 'mime-viewer/code-converter-alist
-                 'gnus-article-mode
-                 (function tm-gnus/code-convert-region-to-emacs))
-
-       (defvar tm-gnus/code-converted nil)
-       (defun tm-gnus/maybe-code-convert ()
-        (or tm-gnus/automatic-mime-preview
-            (let ((mid (rfc822/get-field-body "Message-Id")))
-              (or
-               (and tm-gnus/code-converted
-                    (string-equal tm-gnus/code-converted mid))
-               (progn
-                 (tm-gnus/code-convert-region-to-emacs
-                  (point-min)(point-max)
-                  mime/default-coding-system)
-                 (tm-gnus/decode-encoded-word-if-you-need)
-                 (setq tm-gnus/code-converted mid)
-                 )))))
-       (add-hook 'gnus-article-display-hook 'tm-gnus/maybe-code-convert)
+       (cond ((not (boundp 'nnheader-encoded-words-decoding))
+             (require 'tm-ew-d)
+             (defun tm-gnus/decode-summary-from-and-subjects ()
+               (mapcar (lambda (header)
+                         (let ((from (mail-header-from header))
+                               (subj (mail-header-subject header))
+                               )
+                           (mail-header-set-from
+                            header
+                            (if from
+                                (mime-eword/decode-string from)
+                              ""))
+                           (mail-header-set-subject
+                            header
+                            (if subj
+                                (mime-eword/decode-string subj)
+                              ""))
+                           ))
+                       gnus-newsgroup-headers))
+             (add-hook 'gnus-select-group-hook
+                       (function tm-gnus/decode-summary-from-and-subjects))
+             ))
        )
       ((fboundp 'gnus-article-prepare)
        ;; for GNUS 3.15 .. 4.*
index ff14c17..a9c4968 100644 (file)
@@ -5,10 +5,9 @@
 ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;;         MURATA Masahiro <murata@sol.cs.ritsumei.ac.jp>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1995/09/24
-;;; Version: $Revision: 7.37 $
+;;; Version: $Revision: 7.41 $
 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -34,7 +33,6 @@
 (require 'tl-misc)
 (require 'tm-view)
 (require 'gnus)
-(require 'tm-gd5)
 
 (eval-when-compile (require 'cl))
 
@@ -43,7 +41,7 @@
 ;;;
 
 (defconst tm-gnus/RCS-ID
-  "$Id: tm-sgnus.el,v 7.37 1996/01/25 03:21:50 morioka Exp $")
+  "$Id: tm-sgnus.el,v 7.41 1996/02/08 06:17:16 morioka Exp $")
 
 (defconst tm-gnus/version
   (concat (get-version-string tm-gnus/RCS-ID) " for September"))
@@ -104,17 +102,29 @@ This variable is set to `gnus-show-mime'.")
 (define-key gnus-summary-mode-map "v" (function tm-gnus/view-message))
 (define-key gnus-summary-mode-map
   "\e\r" (function tm-gnus/summary-scroll-down))
-(define-key gnus-summary-mode-map
-  "t" (function tm-gnus/summary-toggle-header))
+(substitute-key-definition
+ 'gnus-summary-toggle-header
+ 'tm-gnus/summary-toggle-header gnus-summary-mode-map)
 
 
 ;;; @ for tm-view
 ;;;
 
+(defun tm-gnus/content-header-filter ()
+  (goto-char (point-min))
+  (mime-preview/cut-header)
+  (tm-gnus/code-convert-region-to-emacs (point-min)(point-max)
+                                       mime/default-coding-system)
+  (mime/decode-message-header)
+  )
+
 (set-alist 'mime-viewer/content-header-filter-alist
           'gnus-original-article-mode
           (function tm-gnus/content-header-filter))
 
+(fset 'tm-gnus/code-convert-region-to-emacs
+      (symbol-function 'mime/code-convert-region-to-emacs))
+
 (set-alist 'mime-viewer/code-converter-alist
           'gnus-original-article-mode
           (function tm-gnus/code-convert-region-to-emacs))
@@ -196,6 +206,73 @@ This variable is set to `gnus-show-mime'.")
 (setq gnus-decode-encoded-word-method
       (function tm-gnus/article-decode-encoded-word))
 
+(if (boundp 'MULE)
+    (progn
+      (define-service-coding-system gnus-nntp-service nil *noconv*)
+      (if (and (boundp 'nntp-server-process)
+              (processp nntp-server-process)
+              )
+         (set-process-coding-system nntp-server-process *noconv* *noconv*)
+       )
+      
+      (or (fboundp 'tm-gnus/original-request-article)
+         (fset 'tm-gnus/original-request-article
+               (symbol-function 'gnus-request-article))
+         )
+      
+      (defun gnus-request-article (article group &optional buffer)
+       (let ((file-coding-system-for-read *noconv*))
+         (tm-gnus/original-request-article article group buffer)
+         ))
+
+      (defun tm-gnus/prepare-save-mail-function ()
+       (setq file-coding-system *noconv*)
+       )
+      (add-hook 'nnfolder-prepare-save-mail-hook
+               'tm-gnus/prepare-save-mail-function)
+
+      (defun tm-gnus/nnheader-find-file-noselect (&rest args)
+       (let ((file-coding-system-for-read *noconv*))
+         (apply (function find-file-noselect) args)
+         ))
+      (eval-after-load
+       "nnheader"
+       '(fset 'nnheader-find-file-noselect
+             'tm-gnus/nnheader-find-file-noselect)
+       )
+      ))
+
+
+;;; @ summary filter
+;;;
+
+(cond ((not (boundp 'nnheader-encoded-words-decoding))
+       (require 'tm-ew-d)
+       
+       (defun tm-gnus/decode-summary-from-and-subjects ()
+        (mapcar (lambda (header)
+                  (let ((from (mail-header-from header))
+                        (subj (mail-header-subject header))
+                        )
+                    (mail-header-set-from
+                     header
+                     (if from
+                         (mime-eword/decode-string from)
+                       ""))
+                    (mail-header-set-subject
+                     header
+                     (if subj
+                         (mime-eword/decode-string
+                          (code-convert-string
+                           subj mime/default-coding-system *internal*))
+                       ""))
+                    ))
+                gnus-newsgroup-headers))
+       
+       (add-hook 'gnus-select-group-hook
+                (function tm-gnus/decode-summary-from-and-subjects))
+       ))
+
 
 ;;; @ for tm-edit
 ;;;
index 821ca71..997ce04 100644 (file)
--- a/tm-def.el
+++ b/tm-def.el
@@ -6,7 +6,7 @@
 ;;;
 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Version:
-;;;    $Id: tm-def.el,v 7.13 1996/01/25 02:31:19 morioka Exp $
+;;;    $Id: tm-def.el,v 7.15 1996/02/06 02:43:06 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia, definition
 ;;;
 ;;; This file is part of tm (Tools for MIME).
   (mime/find-charset (cons lc-ascii (find-charset-region beg end)))
   )
 
-(defvar mime/charset-default-encoding-alist
-  '(("US-ASCII"       . nil)
-    ("ISO-8859-1"     . "quoted-printable")
-    ("ISO-8859-2"     . "quoted-printable")
-    ("ISO-8859-3"     . "quoted-printable")
-    ("ISO-8859-4"     . "quoted-printable")
-;;; ("ISO-8859-5"     . "quoted-printable")
-    ("KOI8-R"         . "quoted-printable")
-    ("ISO-8859-7"     . "quoted-printable")
-    ("ISO-8859-8"     . "quoted-printable")
-    ("ISO-8859-9"     . "quoted-printable")
-    ("ISO-2022-JP"    . nil)
-    ("ISO-2022-KR"    . nil)
-    ("EUC-KR"         . nil)
-    ("ISO-2022-JP-2"  . nil)
-    ("ISO-2022-INT-1" . nil)
+(defvar mime/charset-type-list
+  '(("US-ASCII"       7 nil)
+    ("ISO-8859-1"     8 "quoted-printable")
+    ("ISO-8859-2"     8 "quoted-printable")
+    ("ISO-8859-3"     8 "quoted-printable")
+    ("ISO-8859-4"     8 "quoted-printable")
+    ("ISO-8859-5"     8 "quoted-printable")
+    ("KOI8-R"         8 "quoted-printable")
+    ("ISO-8859-7"     8 "quoted-printable")
+    ("ISO-8859-8"     8 "quoted-printable")
+    ("ISO-8859-9"     8 "quoted-printable")
+    ("ISO-2022-JP"    7 "base64")
+    ("ISO-2022-KR"    7 "base64")
+    ("EUC-KR"         8 "base64")
+    ("ISO-2022-JP-2"  7 "base64")
+    ("ISO-2022-INT-1" 7 "base64")
     ))
 
+(defun mime/encoding-name (transfer-level)
+  (cond ((> transfer-level 8) "binary")
+       ((= transfer-level 8) "8bit")
+       ))
+
+(defun mime/make-charset-default-encoding-alist (transfer-level)
+  (mapcar (function
+          (lambda (charset-type)
+            (let ((charset  (car charset-type))
+                  (type     (nth 1 charset-type))
+                  (encoding (nth 2 charset-type))
+                  )
+              (if (<= type transfer-level)
+                  (cons charset (mime/encoding-name type))
+                (cons charset encoding)
+                ))))
+         mime/charset-type-list))
+
+(defvar mime/default-transfer-level 7
+  "*A number of network transfer level. It should be 7 or 8.")
+
+(defvar mime/charset-default-encoding-alist
+  (mime/make-charset-default-encoding-alist mime/default-transfer-level))
+
+(defun mime/text-toggle-transfer-level (&optional transfer-level)
+  "Toggle transfer-level is 7bit or 8bit through.
+
+Optional TRANSFER-LEVEL is a number of transfer-level, 7 or 8."
+  (interactive)
+  (if (numberp transfer-level)
+      (setq mime/default-transfer-level transfer-level)
+    (if (< mime/default-transfer-level 8)
+       (setq mime/default-transfer-level 8)
+      (setq mime/default-transfer-level 7)
+      ))
+  (setq mime/charset-default-encoding-alist
+       (mime/make-charset-default-encoding-alist
+        mime/default-transfer-level))
+  (message (format "Current transfer-level is %d bit"
+                  mime/default-transfer-level))
+  )
+
 
 ;;; @ coding-system
 ;;;
index a3ad8bd..2822539 100644 (file)
--- a/tm-pgp.el
+++ b/tm-pgp.el
@@ -8,7 +8,7 @@
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1995/12/7
 ;;; Version:
-;;;    $Id: tm-pgp.el,v 7.7 1996/01/23 13:00:44 morioka Exp $
+;;;    $Id: tm-pgp.el,v 7.10 1996/02/03 00:56:20 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia, PGP, security
 ;;;
 ;;; This file is part of tm (Tools for MIME).
 ;;;
 ;;; It is based on draft-elkins-pem-pgp-02.txt
 
+(defvar tm-pgp::good-signature-regexp "Good signature from user.*$")
+
+(defvar tm-pgp::key-expected-regexp
+  "Key matching expected Key ID \\(\\S +\\) not found")
+
+(defun mime::article/call-pgp-to-check-signature (output-buffer orig-file)
+  (save-excursion
+    (set-buffer output-buffer)
+    (erase-buffer)
+    )
+  (let ((status
+        (call-process-region (point-min)(point-max)
+                             "pgp" nil output-buffer nil orig-file)))
+    (if (= status 0)
+       (save-excursion
+         (set-buffer output-buffer)
+         (goto-char (point-min))
+         (message
+          (if (re-search-forward tm-pgp::good-signature-regexp nil t)
+              (buffer-substring (match-beginning 0) (match-end 0))
+            "Bad signature"
+            ))
+         ))))
+
 (defun mime-article/check-pgp-signature (beg end cal)
   (let* ((encoding (cdr (assq 'encoding cal)))
         (cnum (mime-article/point-content-number beg))
        )
       ;;(define-program-coding-system (current-buffer) "pgp" *noconv*)
       (mime-article/show-output-buffer)
-      (setq status
-           (call-process-region (point-min)(point-max)
-                                "pgp"
-                                nil mime/output-buffer-name nil
-                                orig-file))
-      (kill-buffer kbuf)
+      ;;(get-buffer-create mime/output-buffer-name)
+      (or (mime::article/call-pgp-to-check-signature
+          mime/output-buffer-name orig-file)
+         (let (pgp-id)
+           (save-excursion
+             (set-buffer mime/output-buffer-name)
+             (goto-char (point-min))
+             (if (re-search-forward tm-pgp::key-expected-regexp nil t)
+                 (setq pgp-id
+                       (concat "0x" (buffer-substring-no-properties
+                                     (match-beginning 1)
+                                     (match-end 1))))
+               ))
+           (y-or-n-p
+            (format "Key %s not found; attempt to fetch? " pgp-id))
+           (mc-pgp-fetch-key (cons nil pgp-id))
+           (mime::article/call-pgp-to-check-signature
+            mime/output-buffer-name orig-file)
+           ))
       (let ((other-window-scroll-buffer mime/output-buffer-name))
        (scroll-other-window 8)
        )
-      ;; (if (= status 0)
-      ;;     (message "Good signature!")
-      ;;   (message "Bad signature!")
-      ;;   )
+      (kill-buffer kbuf)
       (delete-file orig-file)
       (delete-file sig-file)
       )))
index 941bbb6..9d6e8f5 100644 (file)
@@ -8,7 +8,7 @@
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1995/9/26 (separated from tm-view.el)
 ;;; Version:
-;;;    $Id: tm-play.el,v 7.13 1996/02/02 17:04:16 morioka Exp $
+;;;    $Id: tm-play.el,v 7.14 1996/02/05 05:00:27 morioka Exp $
 ;;; Keywords: mail, news, MIME, multimedia
 ;;;
 ;;; This file is part of tm (Tools for MIME).
                    (substring ret (match-beginning 0)(match-end 0))
                  ))
            ))
-      ""))
+      ))
 
 (defun mime-article/get-filename (param)
   (replace-as-filename (mime-article/get-original-filename param))