2001-11-02 Simon Josefsson <jas@extundo.com>
+ * gnus-int.el (gnus-check-server): Message "...done" when done.
+
+ * imap.el (imap-close): Don't message (imap-send-command-wait
+ returns if the connection is dropped).
+ (imap-wait-for-tag): Nix out message only when necessary.
+
* gnus-sieve.el (gnus-sieve-script): Use "stop" instead of "elsif"
for non-crossposting.
(gnus-sieve-crosspost): Default to t to be consistent with other
"Check whether the connection to METHOD is down.
If METHOD is nil, use `gnus-select-method'.
If it is down, start it up (again)."
- (let ((method (or method gnus-select-method)))
+ (let ((method (or method gnus-select-method))
+ result)
;; Transform virtual server names into select methods.
(when (stringp method)
(setq method (gnus-server-to-method method)))
(gnus-run-hooks 'gnus-open-server-hook)
(prog1
(condition-case ()
- (gnus-open-server method)
+ (setq result (gnus-open-server method))
(quit (message "Quit gnus-check-server")
nil))
(unless silent
- (message ""))))))
+ (gnus-message 5 "Opening %s server%s...%s" (car method)
+ (if (equal (nth 1 method) "") ""
+ (format " on %s" (nth 1 method)))
+ (if result "done" "failed")))))))
(defun gnus-get-function (method function &optional noerror)
"Return a function symbol based on METHOD and FUNCTION."
"Close connection to server in BUFFER.
If BUFFER is nil, the current buffer is used."
(with-current-buffer (or buffer (current-buffer))
- (and (imap-opened)
- (not (imap-ok-p (imap-send-command-wait "LOGOUT")))
- (message "Server %s didn't let me log out" imap-server))
+ (when (imap-opened)
+ (imap-send-command-wait "LOGOUT"))
(when (and imap-process
(memq (process-status imap-process) '(open run)))
(delete-process imap-process))
(defun imap-wait-for-tag (tag &optional buffer)
(with-current-buffer (or buffer (current-buffer))
- (while (and (null imap-continuation)
- (memq (process-status imap-process) '(open run))
- (< imap-reached-tag tag))
- (let ((len (/ (point-max) 1024))
- message-log-max)
- (unless (< len 10)
- (message "imap read: %dk" len))
- (accept-process-output imap-process 1)))
- (message "")
- (and (memq (process-status imap-process) '(open run))
- (or (assq tag imap-failed-tags)
- (if imap-continuation
- 'INCOMPLETE
- 'OK)))))
+ (let (imap-have-messaged)
+ (while (and (null imap-continuation)
+ (memq (process-status imap-process) '(open run))
+ (< imap-reached-tag tag))
+ (let ((len (/ (point-max) 1024))
+ message-log-max)
+ (unless (< len 10)
+ (setq imap-have-messaged t)
+ (message "imap read: %dk" len))
+ (accept-process-output imap-process 1)))
+ (when imap-have-messaged
+ (message ""))
+ (and (memq (process-status imap-process) '(open run))
+ (or (assq tag imap-failed-tags)
+ (if imap-continuation
+ 'INCOMPLETE
+ 'OK))))))
(defun imap-sentinel (process string)
(delete-process process))