Mercurial > emacs
diff lisp/gnus/nnimap.el @ 110596:415e87a42437
mail-source.el (mail-source-value): Revert previous patch.
gnus-picon.el: Inhibit showing picons for top level domains.
gnus-art.el (gnus-article-treat-body-boundary): Fix length computing.
gnus-news.texi: Mention nnimap-inbox.
nnimap.el (nnimap-request-expire-articles): Compress ranges before deletion.
nnimap.el (nnimap-retrieve-headers): Don't select the group, because that's already done by nnimap-possibly-change-group.
gnus-html.el (gnus-html-show-images): Fix gnus-html-display-image arguments.
gnus-html.el (gnus-html-wash-images): Fix spec computing to include start/end.
nnimap.el: Store the IMAP greeting, so that we can tell what kind of server we're talking to.
gnus.el (gnus): Give a final warning after startup.
gnus-ems.el (gnus-create-image): Ignore all image-creation errors.
nndraft.el (nndraft-request-expire-articles): Fetch the expiry target for the correct group.
nnmh.el (nnmh-request-expire-articles): Don't try to fetch the expiry target here, because we don't know the Gnus name of the group.
nnimap.el (nnimap-get-whole-article): Remove the data that may have arrived before the FETCH data.
gnus-agent.el (gnus-agent-retrieve-headers): Don't propagate `fetch-old'.
gnus-agent.el (gnus-agent-read-servers-validate): Change the level for the "Ignoring disappeared server" to something low.
nndoc.el (nndoc-request-list): Return success always.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 26 Sep 2010 23:01:31 +0000 |
parents | e474d7d76259 |
children | 71a0913fcc8c |
line wrap: on
line diff
--- a/lisp/gnus/nnimap.el Mon Sep 27 00:42:53 2010 +0200 +++ b/lisp/gnus/nnimap.el Sun Sep 26 23:01:31 2010 +0000 @@ -96,7 +96,7 @@ (defstruct nnimap group process commands capabilities select-result newlinep server - last-command-time) + last-command-time greeting) (defvar nnimap-object nil) @@ -119,7 +119,6 @@ (erase-buffer) (when (nnimap-possibly-change-group group server) (with-current-buffer (nnimap-buffer) - (nnimap-send-command "SELECT %S" (utf7-encode group t)) (erase-buffer) (nnimap-wait-for-response (nnimap-send-command @@ -318,6 +317,9 @@ (nnheader-report 'nnimap "%s" (buffer-substring (point) (line-end-position))) + (setf (nnimap-greeting nnimap-object) + (buffer-substring (line-beginning-position) + (line-end-position))) (when (eq nnimap-stream 'starttls) (nnimap-command "STARTTLS") (starttls-negotiate (nnimap-process nnimap-object))) @@ -419,10 +421,13 @@ article))) ;; Check that we really got an article. (goto-char (point-min)) - (unless (looking-at "\\* [0-9]+ FETCH") + (unless (re-search-forward "\\* [0-9]+ FETCH" nil t) (setq result nil)) (when result - (goto-char (point-min)) + ;; Remove any data that may have arrived before the FETCH data. + (beginning-of-line) + (unless (bobp) + (delete-region (point-min) (point))) (let ((bytes (nnimap-get-length))) (delete-region (line-beginning-position) (progn (forward-line 1) (point))) @@ -626,7 +631,7 @@ articles) ((and force (eq nnmail-expiry-target 'delete)) - (unless (nnimap-delete-article articles) + (unless (nnimap-delete-article (gnus-compress-sequence articles)) (message "Article marked for deletion, but not expunged.")) nil) (t @@ -640,7 +645,7 @@ (if (null deletable-articles) articles (if (eq nnmail-expiry-target 'delete) - (nnimap-delete-article deletable-articles) + (nnimap-delete-article (gnus-compress-sequence deletable-articles)) (setq deletable-articles (nnimap-process-expiry-targets deletable-articles group server))) @@ -667,7 +672,7 @@ ;; Change back to the current group again. (nnimap-possibly-change-group group server) (setq deleted-articles (nreverse deleted-articles)) - (nnimap-delete-article deleted-articles) + (nnimap-delete-article (gnus-compress-sequence deleted-articles)) deleted-articles)) (defun nnimap-find-expired-articles (group)