Synch with Oort Gnus.
authoryamaoka <yamaoka>
Sun, 29 Jul 2001 23:00:11 +0000 (23:00 +0000)
committeryamaoka <yamaoka>
Sun, 29 Jul 2001 23:00:11 +0000 (23:00 +0000)
18 files changed:
lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/gnus.el
lisp/lpath.el
lisp/mail-source.el
lisp/message.el
lisp/mm-decode.el
lisp/mm-view.el
lisp/mml.el
lisp/nnfolder.el
lisp/nnmail.el
lisp/nntp.el
lisp/smime.el
texi/ChangeLog
texi/gnus-ja.texi
texi/gnus.texi

index 11106eb..77c80c9 100644 (file)
@@ -1,3 +1,107 @@
+2001-07-29  Simon Josefsson  <jas@extundo.com>
+
+       * mail-source.el (top-level): Require message for message-directory.
+       (mail-source-directory): Change default to message-directory.
+
+       * smime.el (smime-keys, smime-CA-directory, smime-CA-file) 
+       (smime-certificate-directory, smime-openssl-program) 
+       (smime-encrypt-cipher, smime-dns-server): Fix doc (leading "*").
+       (smime-extra-arguments): New variable.
+       (smime-dns-server): Fix customize group.
+       (smime-call-openssl-region): Use `smime-extra-arguments'.
+
+2001-07-29  Simon Josefsson  <jas@extundo.com>
+       From Vladimir Volovich <vvv@vsu.ru>
+
+       * smime.el (smime-call-openssl-region): Ignore stderr.
+
+2001-07-29  Simon Josefsson  <jas@extundo.com>
+       From Christoph Conrad <christoph.conrad@gmx.de>
+
+       * gnus-agent.el (gnus-agent-save-group-info): Don't destroy active
+       file.
+
+2001-07-29  Simon Josefsson  <jas@extundo.com>
+
+       * mm-view.el (mm-view-pkcs7-decrypt): Adhere to `mm-decrypt-option'.
+
+       Support S/MIME decryption.
+
+       * mm-decode.el (mm-inline-media-tests): 
+       (mm-inlined-types):
+       (mm-automatic-display):
+       (mm-attachment-override-types): Add application/{x-,}pkcs7-mime.
+
+       * mm-view.el (mm-pkcs7-signed-magic): 
+       (mm-pkcs7-enveloped-magic): New variables.
+       (mm-view-pkcs7-get-type): New function; identify PKCS#7 type.
+       (mm-view-pkcs7): New function; mm viewer for PKCS#7 blobs.
+       (mm-view-pkcs7-decrypt): New function; mm viewer for encrypted
+       PKCS#7 blobs.
+
+       * smime.el (smime-decrypt-region): Expand keyfile.
+
+2001-07-29  Simon Josefsson  <jas@extundo.com>
+
+       * nntp.el (nntp-open-ssl-stream): Don't mess with internal
+       `ssl.el' variables.
+
+       * gnus-agent.el (gnus-agent-save-group-info): Delete everything
+       but line instead of narrowing to it, because `nnmail-parse-active'
+       calls widen.  Thanks to Christoph Conrad
+       <christoph.conrad@gmx.de>.
+
+2001-07-29  Kai Gro\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+       * gnus.el (gnus-summary-line-format): Mention `gnus-sum-thread-*'
+       for %B spec.
+
+       * gnus-sum.el (gnus-summary-prepare-threads): If
+       gnus-sum-thread-tree-root is nil, use subject instead.
+       (gnus-sum-thread-tree-root, gnus-sum-thread-tree-single-indent) 
+       (gnus-sum-thread-tree-vertical, gnus-sum-thread-tree-indent) 
+       (gnus-sum-thread-tree-leaf-with-other) 
+       (gnus-sum-thread-tree-single-leaf): Documentation.
+       (gnus-sum-thread-tree-single-indent): Allow nil.
+
+2001-07-28 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * message.el (message-fill-paragraph): Do nothing if the user
+       wants filladapt-mode.
+
+2001-07-27 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-decode.el (mm-image-type-from-buffer): New.
+       (mm-get-image): Use it.
+
+2001-07-27 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus.el (gnus-large-newsgroup): If it is nil, ...
+
+       * gnus-art.el (gnus-mime-view-all-parts): buffer-read-only covers
+       mm-display-parts too.
+
+2001-07-27 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnfolder.el (nnfolder-request-accept-article): Bind
+       nntp-server-buffer.
+
+       * nnmail.el (nnmail-parse-active): Read from buffer instead of
+       nntp-server-buffer.
+
+2001-07-27 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * message.el (message-check-news-header-syntax): Use
+       message-post-method.
+       (message-send-news): Bind message-post-method.
+
+2001-07-27 07:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mml.el (mml-tweak-type-alist): New.
+       (mml-tweak-function-alist): New.
+       (mml-tweak-part): New.
+       (mml-generate-mime-1): Use it.
+
 2001-07-26 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnfolder.el (nnfolder-request-accept-article): Replace
 2001-07-26 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnfolder.el (nnfolder-request-accept-article): Replace
 
 2001-06-03  Dale Hagglund  <rdh@best.com>
 
 
 2001-06-03  Dale Hagglund  <rdh@best.com>
 
-       * gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split
+       * gnus-mlspl.el (gnus-group-split-fancy): Fix generation of split
        restrict clauses.
 
 2001-06-07 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        restrict clauses.
 
 2001-06-07 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
index d33b214..9c75819 100644 (file)
@@ -730,7 +730,7 @@ the actual number of articles toggled is returned."
           (file-name-coding-system nnmail-pathname-coding-system)
           (pathname-coding-system nnmail-pathname-coding-system)
           (file (gnus-agent-lib-file "active"))
           (file-name-coding-system nnmail-pathname-coding-system)
           (pathname-coding-system nnmail-pathname-coding-system)
           (file (gnus-agent-lib-file "active"))
-          oactive)
+          oactive-min)
       (gnus-make-directory (file-name-directory file))
       (with-temp-file file
        (when (file-exists-p file)
       (gnus-make-directory (file-name-directory file))
       (with-temp-file file
        (when (file-exists-p file)
@@ -739,16 +739,12 @@ the actual number of articles toggled is returned."
        (when (re-search-forward
               (concat "^" (regexp-quote group) " ") nil t)
          (save-excursion
        (when (re-search-forward
               (concat "^" (regexp-quote group) " ") nil t)
          (save-excursion
-           (save-restriction
-             (narrow-to-region (match-beginning 0)
-                               (progn
-                                 (forward-line 1)
-                                 (point)))
-             (setq oactive (car (nnmail-parse-active)))))
+           (read (current-buffer))                      ;; max
+           (setq oactive-min (read (current-buffer))))  ;; min
          (gnus-delete-line))
        (insert (format "%S %d %d y\n" (intern group)
                        (cdr active)
          (gnus-delete-line))
        (insert (format "%S %d %d y\n" (intern group)
                        (cdr active)
-                       (or (car oactive) (car active))))
+                       (or oactive-min (car active))))
        (goto-char (point-max))
        (while (search-backward "\\." nil t)
          (delete-char 1))))))
        (goto-char (point-max))
        (while (search-backward "\\." nil t)
          (delete-char 1))))))
index 6ae7638..df62935 100644 (file)
@@ -3689,8 +3689,8 @@ value of the variable `gnus-show-mime' is non-nil."
        (goto-char (point-min))
        (or (search-forward "\n\n") (goto-char (point-max)))
        (let (buffer-read-only)
        (goto-char (point-min))
        (or (search-forward "\n\n") (goto-char (point-max)))
        (let (buffer-read-only)
-         (delete-region (point) (point-max)))
-       (mm-display-parts handles)))))
+         (delete-region (point) (point-max))
+         (mm-display-parts handles))))))
 
 (defun gnus-mime-save-part-and-strip ()
   "Save the MIME part under point then replace it with an external body."
 
 (defun gnus-mime-save-part-and-strip ()
   "Save the MIME part under point then replace it with an external body."
index b4ce5cf..7e27301 100644 (file)
@@ -4118,12 +4118,20 @@ Unscored articles will be counted as having a score of zero."
 
 (defvar gnus-tmp-thread-tree-header-string "")
 
 
 (defvar gnus-tmp-thread-tree-header-string "")
 
-(defvar gnus-sum-thread-tree-root "> ")
-(defvar gnus-sum-thread-tree-single-indent "")
-(defvar gnus-sum-thread-tree-vertical "| ")
-(defvar gnus-sum-thread-tree-indent "  ")
-(defvar gnus-sum-thread-tree-leaf-with-other "+-> ")
-(defvar gnus-sum-thread-tree-single-leaf "\\-> ")
+(defvar gnus-sum-thread-tree-root "> "
+  "With %B spec, used for the root of a thread.
+If nil, use subject instead.")
+(defvar gnus-sum-thread-tree-single-indent ""
+  "With %B spec, used for a thread with just one message.
+If nil, use subject instead.")
+(defvar gnus-sum-thread-tree-vertical "| "
+  "With %B spec, used for drawing a vertical line.")
+(defvar gnus-sum-thread-tree-indent "  "
+  "With %B spec, used for indenting.")
+(defvar gnus-sum-thread-tree-leaf-with-other "+-> "
+  "With %B spec, used for a leaf with brothers.")
+(defvar gnus-sum-thread-tree-single-leaf "\\-> "
+  "With %B spec, used for a leaf without brothers.")
 
 (defun gnus-summary-prepare-threads (threads)
   "Prepare summary buffer from THREADS and indentation LEVEL.
 
 (defun gnus-summary-prepare-threads (threads)
   "Prepare summary buffer from THREADS and indentation LEVEL.
@@ -4356,8 +4364,8 @@ or a straight list of headers."
              ((not gnus-show-threads) "")
              ((zerop gnus-tmp-level)
               (if (cdar thread)
              ((not gnus-show-threads) "")
              ((zerop gnus-tmp-level)
               (if (cdar thread)
-                  gnus-sum-thread-tree-root
-                gnus-sum-thread-tree-single-indent))
+                  (or gnus-sum-thread-tree-root subject)
+                (or gnus-sum-thread-tree-single-indent subject)))
              (t
               (concat (apply 'concat
                              (mapcar (lambda (item)
              (t
               (concat (apply 'concat
                              (mapcar (lambda (item)
index f9ba146..293e16f 100644 (file)
@@ -1264,7 +1264,8 @@ newsgroups."
 (defcustom gnus-large-newsgroup 200
   "*The number of articles which indicates a large newsgroup.
 If the number of articles in a newsgroup is greater than this value,
 (defcustom gnus-large-newsgroup 200
   "*The number of articles which indicates a large newsgroup.
 If the number of articles in a newsgroup is greater than this value,
-confirmation is required for selecting the newsgroup."
+confirmation is required for selecting the newsgroup.
+If it is `nil', no confirmation is required."
   :group 'gnus-group-select
   :type 'integer)
 
   :group 'gnus-group-select
   :type 'integer)
 
@@ -2166,6 +2167,7 @@ with some simple extensions.
 %L   Number of lines in the article (integer)
 %I   Indentation based on thread level (a string of spaces)
 %B   A complex trn-style thread tree (string)
 %L   Number of lines in the article (integer)
 %I   Indentation based on thread level (a string of spaces)
 %B   A complex trn-style thread tree (string)
+     The variables `gnus-sum-thread-*' can be used for customization.
 %T   A string with two possible values: 80 spaces if the article
      is on thread level two or larger and 0 spaces on level one
 %R   \"A\" if this article has been replied to, \" \" otherwise (character)
 %T   A string with two possible values: 80 spaces if the article
      is on thread level two or larger and 0 spaces on level one
 %R   \"A\" if this article has been replied to, \" \" otherwise (character)
index c56f4bb..49c4b54 100644 (file)
@@ -35,6 +35,7 @@
              adaptive-fill-regexp babel-history babel-translations
              default-enable-multibyte-characters
              display-time-mail-function imap-password mail-mode-hook
              adaptive-fill-regexp babel-history babel-translations
              default-enable-multibyte-characters
              display-time-mail-function imap-password mail-mode-hook
+             filladapt-mode
              mc-pgp-always-sign
              nnoo-definition-alist
              url-current-callback-func url-be-asynchronous
              mc-pgp-always-sign
              nnoo-definition-alist
              url-current-callback-func url-be-asynchronous
index 18adf81..aac3007 100644 (file)
@@ -36,6 +36,7 @@
   (autoload 'nnheader-cancel-timer "nnheader")
   (autoload 'nnheader-run-at-time "nnheader"))
 (require 'format-spec)
   (autoload 'nnheader-cancel-timer "nnheader")
   (autoload 'nnheader-run-at-time "nnheader"))
 (require 'format-spec)
+(require 'message) ;; for `message-directory'
 
 (defgroup mail-source nil
   "The mail-fetching library."
 
 (defgroup mail-source nil
   "The mail-fetching library."
@@ -228,7 +229,7 @@ If non-nil, this maildrop will be checked periodically for new mail."
   :group 'mail-source
   :type 'file)
 
   :group 'mail-source
   :type 'file)
 
-(defcustom mail-source-directory "~/Mail/"
+(defcustom mail-source-directory message-directory
   "Directory where files (if any) will be stored."
   :group 'mail-source
   :type 'directory)
   "Directory where files (if any) will be stored."
   :group 'mail-source
   :type 'directory)
index 03d07e2..5464daa 100644 (file)
@@ -2174,8 +2174,10 @@ Prefix arg means justify as well."
 (defun message-fill-paragraph (&optional arg)
   "Like `fill-paragraph'."
   (interactive (list (if current-prefix-arg 'full)))
 (defun message-fill-paragraph (&optional arg)
   "Like `fill-paragraph'."
   (interactive (list (if current-prefix-arg 'full)))
-  (message-newline-and-reformat arg t)
-  t)
+  (if (and (boundp 'filladapt-mode) filladapt-mode)
+      nil
+    (message-newline-and-reformat arg t)
+    t))
 
 (defun message-insert-signature (&optional force)
   "Insert a signature.  See documentation for variable `message-signature'."
 
 (defun message-insert-signature (&optional force)
   "Insert a signature.  See documentation for variable `message-signature'."
@@ -3267,7 +3269,8 @@ This sub function is for exclusive use of `message-send-news'."
            (cons '(valid-newsgroups . disabled)
                  message-syntax-checks)))
     (message-cleanup-headers)
            (cons '(valid-newsgroups . disabled)
                  message-syntax-checks)))
     (message-cleanup-headers)
-    (if (not (message-check-news-syntax))
+    (if (not (let ((message-post-method method))
+              (message-check-news-syntax)))
        nil
       (unwind-protect
          (save-excursion
        nil
       (unwind-protect
          (save-excursion
@@ -3451,10 +3454,9 @@ This sub function is for exclusive use of `message-send-news'."
            (known-groups
             (mapcar (lambda (n) (gnus-group-real-name n))
                     (gnus-groups-from-server
            (known-groups
             (mapcar (lambda (n) (gnus-group-real-name n))
                     (gnus-groups-from-server
-                     (cond ((equal gnus-post-method 'current)
-                            gnus-current-select-method)
-                           (gnus-post-method gnus-post-method)
-                           (t gnus-select-method)))))
+                     (if (message-functionp message-post-method)
+                         (funcall message-post-method)
+                       message-post-method))))
            errors)
        (while groups
         (unless (or (equal (car groups) "poster")
            errors)
        (while groups
         (unless (or (equal (car groups) "poster")
index fd09498..1a1363f 100644 (file)
     ("application/pgp-signature" ignore identity)
     ("application/x-pkcs7-signature" ignore identity)
     ("application/pkcs7-signature" ignore identity)
     ("application/pgp-signature" ignore identity)
     ("application/x-pkcs7-signature" ignore identity)
     ("application/pkcs7-signature" ignore identity)
+    ("application/x-pkcs7-mime" mm-view-pkcs7 identity)
+    ("application/pkcs7-mime" mm-view-pkcs7 identity)
     ("multipart/alternative" ignore identity)
     ("multipart/mixed" ignore identity)
     ("multipart/related" ignore identity)
     ("multipart/alternative" ignore identity)
     ("multipart/mixed" ignore identity)
     ("multipart/related" ignore identity)
   '("image/.*" "text/.*" "message/delivery-status" "message/rfc822"
     "message/partial" "message/external-body" "application/emacs-lisp"
     "application/pgp-signature" "application/x-pkcs7-signature"
   '("image/.*" "text/.*" "message/delivery-status" "message/rfc822"
     "message/partial" "message/external-body" "application/emacs-lisp"
     "application/pgp-signature" "application/x-pkcs7-signature"
-    "application/pkcs7-signature")
+    "application/pkcs7-signature" "application/x-pkcs7-mime"
+    "application/pkcs7-mime")
   "List of media types that are to be displayed inline.
 See also `mm-inline-media-tests', which says how to display a media
 type inline."
   "List of media types that are to be displayed inline.
 See also `mm-inline-media-tests', which says how to display a media
 type inline."
@@ -215,12 +218,15 @@ when selecting a different article."
     "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
     "message/rfc822" "text/x-patch" "application/pgp-signature"
     "application/emacs-lisp" "application/x-pkcs7-signature"
     "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
     "message/rfc822" "text/x-patch" "application/pgp-signature"
     "application/emacs-lisp" "application/x-pkcs7-signature"
-    "application/pkcs7-signature")
+    "application/pkcs7-signature" "application/x-pkcs7-mime"
+    "application/pkcs7-mime")
   "A list of MIME types to be displayed automatically."
   :type '(repeat string)
   :group 'mime-display)
 
   "A list of MIME types to be displayed automatically."
   :type '(repeat string)
   :group 'mime-display)
 
-(defcustom mm-attachment-override-types '("text/x-vcard")
+(defcustom mm-attachment-override-types '("text/x-vcard"
+                                         "application/pkcs7-mime"
+                                         "application/x-pkcs7-mime")
   "Types to have \"attachment\" ignored if they can be displayed inline."
   :type '(repeat string)
   :group 'mime-display)
   "Types to have \"attachment\" ignored if they can be displayed inline."
   :type '(repeat string)
   :group 'mime-display)
@@ -1028,6 +1034,35 @@ like underscores."
   "Return the handle(s) referred to by ID."
   (cdr (assoc id mm-content-id-alist)))
 
   "Return the handle(s) referred to by ID."
   (cdr (assoc id mm-content-id-alist)))
 
+(defconst mm-image-type-regexps
+  '(("/\\*.*XPM.\\*/" . xpm)
+    ("P[1-6]" . pbm)
+    ("GIF8" . gif)
+    ("\377\330" . jpeg)
+    ("\211PNG\r\n" . png)
+    ("#define" . xbm)
+    ("\\(MM\0\\*\\)\\|\\(II\\*\0\\)" . tiff)
+    ("%!PS" . postscript))
+  "Alist of (REGEXP . IMAGE-TYPE) pairs used to auto-detect image types.
+When the first bytes of an image file match REGEXP, it is assumed to
+be of image type IMAGE-TYPE.")
+
+;; Steal from image.el. image-type-from-data suffers multi-line matching bug.
+(defun mm-image-type-from-buffer ()
+  "Determine the image type from data in the current buffer.
+Value is a symbol specifying the image type or nil if type cannot
+be determined."
+  (let ((types mm-image-type-regexps)
+       type)
+    (goto-char (point-min))
+    (while (and types (null type))
+      (let ((regexp (car (car types)))
+           (image-type (cdr (car types))))
+       (when (looking-at regexp)
+         (setq type image-type))
+       (setq types (cdr types))))
+    type))
+
 (defun mm-get-image (handle)
   "Return an image instance based on HANDLE."
   (let ((type (mm-handle-media-subtype handle))
 (defun mm-get-image (handle)
   "Return an image instance based on HANDLE."
   (let ((type (mm-handle-media-subtype handle))
@@ -1051,10 +1086,10 @@ like underscores."
                      ;; Avoid testing `make-glyph' since W3 may define
                      ;; a bogus version of it.
                      (if (fboundp 'create-image)
                      ;; Avoid testing `make-glyph' since W3 may define
                      ;; a bogus version of it.
                      (if (fboundp 'create-image)
-                         (or
-                          (create-image (buffer-string) nil 'data-p)
-                          (create-image (buffer-string) (intern type)
-                                        'data-p))
+                         (create-image (buffer-string)
+                                       (or (mm-image-type-from-buffer)
+                                           (intern type))
+                                       'data-p)
                        (cond
                         ((equal type "xbm")
                          ;; xbm images require special handling, since
                        (cond
                         ((equal type "xbm")
                          ;; xbm images require special handling, since
@@ -1073,7 +1108,10 @@ like underscores."
                                (delete-file file)))))
                         (t
                          (make-glyph
                                (delete-file file)))))
                         (t
                          (make-glyph
-                          (vector (intern type) :data (buffer-string))))))))
+                          (vector
+                           (or (mm-image-type-from-buffer)
+                               (intern type))
+                           :data (buffer-string))))))))
            (mm-handle-set-cache handle spec))))))
 
 (defun mm-image-fit-p (handle)
            (mm-handle-set-cache handle spec))))))
 
 (defun mm-image-fit-p (handle)
index 524b815..9ff7036 100644 (file)
 (defun mm-display-elisp-inline (handle)
   (mm-display-inline-fontify handle 'emacs-lisp-mode))
 
 (defun mm-display-elisp-inline (handle)
   (mm-display-inline-fontify handle 'emacs-lisp-mode))
 
+;;      id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+;;          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
+(defvar mm-pkcs7-signed-magic
+  (mm-string-as-unibyte
+   (apply 'concat
+         (mapcar 'char-to-string
+                 (list ?\x30 ?\x82 ?\x01 ?\x91 ?\x06 ?\x09 ?\x2a ?\x86 ?\x48
+                       ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02)))))
+
+;;      id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+;;          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
+(defvar mm-pkcs7-enveloped-magic
+  (mm-string-as-unibyte
+   (apply 'concat
+         (mapcar 'char-to-string
+                 (list ?\x30 ?\x82 ?\x01 ?\x91 ?\x06 ?\x09 ?\x2a ?\x86 ?\x48
+                       ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03)))))
+
+(defun mm-view-pkcs7-get-type (handle)
+  (with-temp-buffer
+    (mm-insert-part handle)
+    (cond ((looking-at (regexp-quote mm-pkcs7-enveloped-magic))
+          'enveloped)
+         ((looking-at (regexp-quote mm-pkcs7-signed-magic))
+          'signed)
+         (t
+          (error "Could not identify PKCS#7 type")))))
+
+(defun mm-view-pkcs7 (handle)
+  (case (mm-view-pkcs7-get-type handle)
+    (enveloped (mm-view-pkcs7-decrypt handle))
+    (otherwise (error "Unknown or unimplemented PKCS#7 type"))))
+
+(defun mm-view-pkcs7-decrypt (handle)
+  (if (cond
+       ((eq mm-decrypt-option 'never) nil)
+       ((eq mm-decrypt-option 'always) t)
+       ((eq mm-decrypt-option 'known) t)
+       (t (y-or-n-p
+          (format "Decrypt (S/MIME) part? "))))
+      (let (res)
+       (with-temp-buffer
+         (insert-buffer (mm-handle-buffer handle))
+         (goto-char (point-min))
+         (insert "MIME-Version: 1.0\n")
+         (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m")
+         (smime-decrypt-region
+          (point-min) (point-max)
+          (if (= (length smime-keys) 1)
+              (cadar smime-keys)
+            (smime-get-key-by-email
+             (completing-read "Decrypt this part with which key? "
+                              smime-keys nil nil
+                              (and (listp (car-safe smime-keys))
+                                   (caar smime-keys))))))
+         (setq res (buffer-string)))
+       (mm-insert-inline handle res))))
+
 (provide 'mm-view)
 
 ;;; mm-view.el ends here
 (provide 'mm-view)
 
 ;;; mm-view.el ends here
index c56d4b2..89cc6f4 100644 (file)
@@ -51,6 +51,19 @@ These parameters are generated in Content-Disposition header if exists."
   :type '(repeat (symbol :tag "Parameter"))
   :group 'message)
 
   :type '(repeat (symbol :tag "Parameter"))
   :group 'message)
 
+(defvar mml-tweak-type-alist nil
+  "A list of (TYPE . FUNCTION) for tweaking MML parts.
+TYPE is a string containing a regexp to match the MIME type.  FUNCTION
+is a Lisp function which is called with the MML handle to tweak the
+part.  This variable is used only when no TWEAK parameter exists in
+the MML handle.")
+
+(defvar mml-tweak-function-alist nil
+  "A list of (NAME . FUNCTION) for tweaking MML parts.
+NAME is a string containing the name of the TWEAK parameter in the MML
+handle.  FUNCTION is a Lisp function which is called with the MML
+handle to tweak the part.")
+
 (defvar mml-generate-multipart-alist nil
   "*Alist of multipart generation functions.
 Each entry has the form (NAME . FUNCTION), where
 (defvar mml-generate-multipart-alist nil
   "*Alist of multipart generation functions.
 Each entry has the form (NAME . FUNCTION), where
@@ -312,6 +325,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
         (or mm-use-ultra-safe-encoding (assq 'sign cont))))
     (save-restriction
       (narrow-to-region (point) (point))
         (or mm-use-ultra-safe-encoding (assq 'sign cont))))
     (save-restriction
       (narrow-to-region (point) (point))
+      (mml-tweak-part cont)
       (cond
        ((or (eq (car cont) 'part) (eq (car cont) 'mml))
        (let ((raw (cdr (assq 'raw cont)))
       (cond
        ((or (eq (car cont) 'part) (eq (car cont) 'mml))
        (let ((raw (cdr (assq 'raw cont)))
@@ -917,6 +931,27 @@ If RAW, don't highlight the article."
   (interactive)
   (mml-parse))
 
   (interactive)
   (mml-parse))
 
+(defun mml-tweak-part (cont)
+  "Tweak a MML part."
+  (let ((tweak (cdr (assq 'tweak cont)))
+       func)
+    (cond
+     (tweak
+      (setq func
+           (or (cdr (assoc tweak mml-tweak-function-alist))
+               (intern tweak))))
+     (mml-tweak-type-alist
+      (let ((alist mml-tweak-type-alist)
+           (type (or (cdr (assq 'type cont)) "text/plain")))
+       (while alist
+         (if (string-match (caar alist) type)
+             (setq func (cdar alist)
+                   alist nil)
+           (setq alist (cdr alist)))))))
+    (if func
+       (funcall func cont)
+      cont)))
+
 (provide 'mml)
 
 ;;; mml.el ends here
 (provide 'mml)
 
 ;;; mml.el ends here
index b53ad33..d55b37b 100644 (file)
@@ -449,8 +449,9 @@ all.  This may very well take some time.")
       (goto-char (point-min))
       (when (looking-at "X-From-Line: ")
        (replace-match "From "))
       (goto-char (point-min))
       (when (looking-at "X-From-Line: ")
        (replace-match "From "))
-      (let ((nnmail-file-coding-system nnfolder-active-file-coding-system))
-       (with-temp-buffer
+      (with-temp-buffer
+       (let ((nnmail-file-coding-system nnfolder-active-file-coding-system)
+             (nntp-server-buffer (current-buffer)))
          (nnmail-find-file nnfolder-active-file)
          (setq nnfolder-group-alist (nnmail-parse-active))))
       (save-excursion
          (nnmail-find-file nnfolder-active-file)
          (setq nnfolder-group-alist (nnmail-parse-active))))
       (save-excursion
index e09ae5d..9a6af66 100644 (file)
@@ -541,8 +541,8 @@ nn*-request-list should have been called before calling this function."
            (setq group (read buffer))
            (unless (stringp group)
              (setq group (symbol-name group)))
            (setq group (read buffer))
            (unless (stringp group)
              (setq group (symbol-name group)))
-           (if (and (numberp (setq max (read nntp-server-buffer)))
-                    (numberp (setq min (read nntp-server-buffer))))
+           (if (and (numberp (setq max (read buffer)))
+                    (numberp (setq min (read buffer))))
                (push (list group (cons min max))
                      group-assoc)))
        (error nil))
                (push (list group (cons min max))
                      group-assoc)))
        (error nil))
index 24516ab..215750f 100644 (file)
@@ -1072,8 +1072,7 @@ password contained in '~/.nntp-authinfo'."
    "nntpd" buffer nntp-address nntp-port-number))
 
 (defun nntp-open-ssl-stream (buffer)
    "nntpd" buffer nntp-address nntp-port-number))
 
 (defun nntp-open-ssl-stream (buffer)
-  (let* ((ssl-program-arguments '("-connect" (concat host ":" service)))
-        (proc (open-ssl-stream "nntpd" buffer nntp-address nntp-port-number)))
+  (let ((proc (open-ssl-stream "nntpd" buffer nntp-address nntp-port-number)))
     (save-excursion
       (set-buffer buffer)
       (nntp-wait-for-string "^\r*20[01]")
     (save-excursion
       (set-buffer buffer)
       (nntp-wait-for-string "^\r*20[01]")
index d9d3722..a1b44a3 100644 (file)
   "S/MIME configuration.")
 
 (defcustom smime-keys nil
   "S/MIME configuration.")
 
 (defcustom smime-keys nil
-  "Map mail addresses to a file containing Certificate (and private key).
+  "*Map mail addresses to a file containing Certificate (and private key).
 The file is assumed to be in PEM format. You can also associate additional
 certificates to be sent with every message to each address."
   :type '(repeat (list (string :tag "Mail address")
 The file is assumed to be in PEM format. You can also associate additional
 certificates to be sent with every message to each address."
   :type '(repeat (list (string :tag "Mail address")
@@ -129,7 +129,7 @@ certificates to be sent with every message to each address."
   :group 'smime)
 
 (defcustom smime-CA-directory nil
   :group 'smime)
 
 (defcustom smime-CA-directory nil
-  "Directory containing certificates for CAs you trust.
+  "*Directory containing certificates for CAs you trust.
 Directory should contain files (in PEM format) named to the X.509
 hash of the certificate.  This can be done using OpenSSL such as:
 
 Directory should contain files (in PEM format) named to the X.509
 hash of the certificate.  This can be done using OpenSSL such as:
 
@@ -142,14 +142,14 @@ certificate."
   :group 'smime)
 
 (defcustom smime-CA-file nil
   :group 'smime)
 
 (defcustom smime-CA-file nil
-  "Files containing certificates for CAs you trust.
+  "*Files containing certificates for CAs you trust.
 File should contain certificates in PEM format."
   :type '(choice (const :tag "none" nil)
                 file)
   :group 'smime)
 
 (defcustom smime-certificate-directory "~/Mail/certs/"
 File should contain certificates in PEM format."
   :type '(choice (const :tag "none" nil)
                 file)
   :group 'smime)
 
 (defcustom smime-certificate-directory "~/Mail/certs/"
-  "Directory containing other people's certificates.
+  "*Directory containing other people's certificates.
 It should contain files named to the X.509 hash of the certificate,
 and the files themself should be in PEM format."
 ;The S/MIME library provide simple functionality for fetching
 It should contain files named to the X.509 hash of the certificate,
 and the files themself should be in PEM format."
 ;The S/MIME library provide simple functionality for fetching
@@ -163,14 +163,14 @@ and the files themself should be in PEM format."
           (eq 0 (call-process "openssl" nil nil nil "version"))
         (error nil))
        "openssl")
           (eq 0 (call-process "openssl" nil nil nil "version"))
         (error nil))
        "openssl")
-  "Name of OpenSSL binary."
+  "*Name of OpenSSL binary."
   :type 'string
   :group 'smime)
 
 ;; OpenSSL option to select the encryption cipher
 
 (defcustom smime-encrypt-cipher "-des3"
   :type 'string
   :group 'smime)
 
 ;; OpenSSL option to select the encryption cipher
 
 (defcustom smime-encrypt-cipher "-des3"
-  "Cipher algorithm used for encryption."
+  "*Cipher algorithm used for encryption."
   :type '(choice (const :tag "Triple DES" "-des3")
                 (const :tag "DES"  "-des")
                 (const :tag "RC2 40 bits" "-rc2-40")
   :type '(choice (const :tag "Triple DES" "-des3")
                 (const :tag "DES"  "-des")
                 (const :tag "RC2 40 bits" "-rc2-40")
@@ -179,11 +179,18 @@ and the files themself should be in PEM format."
   :group 'smime)
 
 (defcustom smime-dns-server nil
   :group 'smime)
 
 (defcustom smime-dns-server nil
-  "DNS server to query certificates from.
+  "*DNS server to query certificates from.
 If nil, use system defaults."
   :type '(choice (const :tag "System defaults")
                 string)
 If nil, use system defaults."
   :type '(choice (const :tag "System defaults")
                 string)
-  :group 'dig)
+  :group 'smime)
+
+(defcustom smime-extra-arguments nil
+  "*List of additional arguments passed to OpenSSL.
+For instance, if you don't have a /dev/random you might be forced
+to set this to e.g. `(\"-rand\" \"/etc/entropy\")'."
+  :type '(repeat string)
+  :group 'smime)
 
 (defvar smime-details-buffer "*OpenSSL output*")
 
 
 (defvar smime-details-buffer "*OpenSSL output*")
 
@@ -201,7 +208,8 @@ If nil, use system defaults."
 ;; OpenSSL wrappers.
 
 (defun smime-call-openssl-region (b e buf &rest args)
 ;; OpenSSL wrappers.
 
 (defun smime-call-openssl-region (b e buf &rest args)
-  (case (apply 'call-process-region b e smime-openssl-program nil buf nil args)
+  (case (apply 'call-process-region b e smime-openssl-program nil
+              (list buf nil) nil (append smime-extra-arguments args))
     (0 t)
     (1 (message "OpenSSL: An error occurred parsing the command options.") nil)
     (2 (message "OpenSSL: One of the input files could not be read.") nil)
     (0 t)
     (1 (message "OpenSSL: An error occurred parsing the command options.") nil)
     (2 (message "OpenSSL: One of the input files could not be read.") nil)
@@ -339,7 +347,7 @@ nil."
        (setenv "GNUS_SMIME_PASSPHRASE" passphrase))
     (when (apply 'smime-call-openssl-region
                 b e buffer "smime" "-decrypt"
        (setenv "GNUS_SMIME_PASSPHRASE" passphrase))
     (when (apply 'smime-call-openssl-region
                 b e buffer "smime" "-decrypt"
-                "-recip" keyfile
+                "-recip" (expand-file-name keyfile)
                 (if passphrase
                     (list "-passin" "env:GNUS_SMIME_PASSPHRASE" )))
       (delete-region b e)
                 (if passphrase
                     (list "-passin" "env:GNUS_SMIME_PASSPHRASE" )))
       (delete-region b e)
index 39052e3..2de0172 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-28 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+       From Janne Rinta-Manty <rintaman@cs.helsinki.fi>
+
+       * gnus.texi (Read Articles): Typo.
+
 2001-07-25 22:22:22  Raymond Scholz  <rscholz@zonix.de>
 
        * gnus.texi (Fancy Mail Splitting): New variable
 2001-07-25 22:22:22  Raymond Scholz  <rscholz@zonix.de>
 
        * gnus.texi (Fancy Mail Splitting): New variable
index c042f01..effa653 100644 (file)
@@ -4953,7 +4953,7 @@ gnus \e$B<+BN$O2D;k5-;v$r4|8B@Z$l>C5n$7$^$;$s\e(B) \e$B$N$G!"1J1s$K5-;v$rJ]B8$7$F$*
 
 @item M
 @vindex gnus-duplicate-mark
 
 @item M
 @vindex gnus-duplicate-mark
-\e$B=EJ#M^@)$K$h$j4{FI$N0u$N$D$$$?5-;v\e(B (@code{gnus-duplicated-mark})\e$B!#\e(B
+\e$B=EJ#M^@)$K$h$j4{FI$N0u$N$D$$$?5-;v\e(B (@code{gnus-duplicate-mark})\e$B!#\e(B
 @xref{Duplicate Suppression}.
 @end table
 
 @xref{Duplicate Suppression}.
 @end table
 
index 3c17ac3..7e9e79c 100644 (file)
@@ -5032,7 +5032,7 @@ Threading}.
 @item M
 @vindex gnus-duplicate-mark
 Article marked as read by duplicate suppression
 @item M
 @vindex gnus-duplicate-mark
 Article marked as read by duplicate suppression
-(@code{gnus-duplicated-mark}).  @xref{Duplicate Suppression}.
+(@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
 
 @end table
 
 
 @end table