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.
(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))
(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))
(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
(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))
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"))))
(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)