Synch with Oort Gnus.
authoryamaoka <yamaoka>
Thu, 10 Oct 2002 09:16:02 +0000 (09:16 +0000)
committeryamaoka <yamaoka>
Thu, 10 Oct 2002 09:16:02 +0000 (09:16 +0000)
lisp/ChangeLog
lisp/mml2015.el
lisp/nnimap.el

index 005e8f5..d4f7498 100644 (file)
@@ -1,5 +1,19 @@
 2002-10-10  Simon Josefsson  <jas@extundo.com>
 
+       * nnimap.el (nnimap-open-server): Re-open server if it isn't in
+       auth, selected or examine state.
+
+       * pgg-gpg.el (pgg-gpg-verify-region): Filter out stuff into output
+       buffer and error buffer depending on type of information.
+
+       * mml2015.el (mml2015-gpg-extract-signature-details): Parse
+       --status-fd stuff even if gpg.el is not used (revert earlier
+       change).
+       (mml2015-pgg-{clear-,}verify): Store both output and errors as
+       gnus details.
+       (mml2015-pgg-{clear-,}verify): Extract signature info from errors
+       buffer.
+
        * pgg.el (pgg-verify-region): Use it.
 
        * pgg-def.el (pgg-query-keyserver): New variable.
index 5c8b035..f51aaba 100644 (file)
@@ -428,8 +428,7 @@ by you.")
 
 (defun mml2015-gpg-extract-signature-details ()
   (goto-char (point-min))
-  (if (and (eq mml2015-use 'gpg)
-          (boundp 'gpg-unabbrev-trust-alist))
+  (if (boundp 'gpg-unabbrev-trust-alist)
       (let* ((expired (re-search-forward
                       "^\\[GNUPG:\\] SIGEXPIRED$"
                       nil t))
@@ -736,11 +735,14 @@ by you.")
          (mm-insert-part signature))
        (if (condition-case err
                (prog1
-                   (pgg-verify-region (point-min) (point-max) signature-file t)
+                   (pgg-verify-region (point-min) (point-max) 
+                                      signature-file t)
                  (mm-set-handle-multipart-parameter
                   mm-security-handle 'gnus-details
-                  (with-current-buffer pgg-output-buffer
-                    (buffer-string))))
+                  (concat (with-current-buffer pgg-output-buffer
+                            (buffer-string))
+                          (with-current-buffer pgg-errors-buffer
+                            (buffer-string)))))
              (error
               (mm-set-handle-multipart-parameter
                mm-security-handle 'gnus-details (mml2015-format-error err))
@@ -753,7 +755,7 @@ by you.")
              (delete-file signature-file)
              (mm-set-handle-multipart-parameter
               mm-security-handle 'gnus-info
-              (with-current-buffer pgg-output-buffer
+              (with-current-buffer pgg-errors-buffer
                 (mml2015-gpg-extract-signature-details))))
          (delete-file signature-file)
          (mm-set-handle-multipart-parameter
@@ -770,8 +772,10 @@ by you.")
                  (pgg-verify-region (point-min) (point-max) nil t))
              (mm-set-handle-multipart-parameter
               mm-security-handle 'gnus-details
-              (with-current-buffer mml2015-result-buffer
-                (buffer-string))))
+              (concat (with-current-buffer pgg-output-buffer
+                        (buffer-string))
+                      (with-current-buffer pgg-errors-buffer
+                        (buffer-string)))))
          (error
           (mm-set-handle-multipart-parameter
            mm-security-handle 'gnus-details (mml2015-format-error err))
@@ -782,7 +786,7 @@ by you.")
           nil))
        (mm-set-handle-multipart-parameter
         mm-security-handle 'gnus-info
-        (with-current-buffer pgg-output-buffer
+        (with-current-buffer pgg-errors-buffer
           (mml2015-gpg-extract-signature-details)))
       (mm-set-handle-multipart-parameter
        mm-security-handle 'gnus-info "Failed"))))
index 91537c6..e7098ce 100644 (file)
@@ -738,7 +738,11 @@ If EXAMINE is non-nil the group is selected read-only."
     (with-current-buffer (get-buffer-create nnimap-server-buffer)
       (nnoo-change-server 'nnimap server defs))
     (or (and nnimap-server-buffer
-            (imap-opened nnimap-server-buffer))
+            (imap-opened nnimap-server-buffer)
+            (if (memq imap-state '(auth select examine))
+                t
+              (imap-close nnimap-server-buffer)
+              (nnimap-open-connection server)))
        (nnimap-open-connection server))))
 
 (deffoo nnimap-server-opened (&optional server)