From: teranisi Date: Mon, 11 Sep 2000 06:14:23 +0000 (+0000) Subject: * mmelmo-imap4-2.el (mmelmo-imap4-get-mime-entity): X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6cfd713685e1a9e55784c4f9a590b0d3980f876;p=elisp%2Fwanderlust.git * mmelmo-imap4-2.el (mmelmo-imap4-get-mime-entity): Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'. * elmo-imap4.el (elmo-network-initialize-session): Skip garbage output before greeting. (elmo-imap4-read-part): Use "body.peek" to fetch part. Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a9f651b..b6cf352 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,13 @@ +2000-09-11 Yuuichi Teranishi + + * mmelmo-imap4-2.el (mmelmo-imap4-get-mime-entity): + Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'. + + * elmo-imap4.el (elmo-network-initialize-session): Skip garbage output + before greeting. + (elmo-imap4-read-part): Use "body.peek" to fetch part. + Clear `elmo-imap4-fetch-callback' and `elmo-imap4-fetch-callback-data'. + 2000-09-06 Yuuichi Teranishi * mmelmo-imap4-2.el (mime-entity-children): Defined. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 50f34bf..7df6de7 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1139,13 +1139,19 @@ If optional argument UNMARK is non-nil, unmark." (let ((process (elmo-network-session-process-internal session)) capability) (with-current-buffer (process-buffer process) - (set-process-filter process 'elmo-imap4-arrival-filter) - (set-process-sentinel process 'elmo-imap4-sentinel) + ;; Skip garbage output from process before greeting. (while (and (memq (process-status process) '(open run)) - (eq elmo-imap4-status 'initial)) - ;;(message "Waiting for server response...") + (goto-char (point-max)) + (forward-line -1) + (not (elmo-imap4-parse-greeting))) (accept-process-output process 1)) - ;(message "") + (set-process-filter process 'elmo-imap4-arrival-filter) + (set-process-sentinel process 'elmo-imap4-sentinel) +;; (while (and (memq (process-status process) '(open run)) +;; (eq elmo-imap4-status 'initial)) +;; (message "Waiting for server response...") +;; (accept-process-output process 1)) +;; (message "") (unless (memq elmo-imap4-status '(nonauth auth)) (signal 'elmo-open-error (list 'elmo-network-initialize-session))) @@ -1225,14 +1231,17 @@ If optional argument UNMARK is non-nil, unmark." (session (elmo-imap4-get-session spec))) (elmo-imap4-session-select-mailbox session (elmo-imap4-spec-mailbox spec)) + (with-current-buffer (elmo-network-session-buffer session) + (setq elmo-imap4-fetch-callback nil) + (setq elmo-imap4-fetch-callback-data nil)) (elmo-delete-cr (elmo-imap4-response-bodydetail-text (elmo-imap4-response-value-all (elmo-imap4-send-command-wait session (format (if elmo-imap4-use-uid - "uid fetch %s body[%s]" - "fetch %s body[%s]") + "uid fetch %s body.peek[%s]" + "fetch %s body.peek[%s]") msg part)) 'fetch))))) diff --git a/elmo/mmelmo-imap4-2.el b/elmo/mmelmo-imap4-2.el index dc25503..ff926d7 100644 --- a/elmo/mmelmo-imap4-2.el +++ b/elmo/mmelmo-imap4-2.el @@ -139,6 +139,9 @@ (let* ((spec (elmo-folder-get-spec folder)) (session (elmo-imap4-get-session spec))) (elmo-imap4-session-select-mailbox session (elmo-imap4-spec-mailbox spec)) + (with-current-buffer (elmo-network-session-buffer session) + (setq elmo-imap4-fetch-callback nil) + (setq elmo-imap4-fetch-callback-data nil)) (mmelmo-imap4-parse-bodystructure-object folder number