aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-02-15 23:11:41 +0000
committerKatsumi Yamaoka2015-02-15 23:11:41 +0000
commit0d38b2f403fa873159138b194c0d45bc4c7e61cc (patch)
tree7507eeed00b327bf79f40307c19cf454e40f53fb
parent6090b8f68dfc37bfe8bee539fc43149f9dd5d6bb (diff)
downloademacs-0d38b2f403fa873159138b194c0d45bc4c7e61cc.tar.gz
emacs-0d38b2f403fa873159138b194c0d45bc4c7e61cc.zip
Don't mark nnimap articles as read on a server hangup
* lisp/gnus/nnimap.el (nnimap-retrieve-headers): If the server closes connection during header retrieval, error out instead of interpreting the data in the buffer as the only messages there. This way, we don't mark articles as read on a server hangup (bug#19035).
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/nnimap.el2
2 files changed, 7 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index b9ae796782d..7910d74fb15 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,10 @@
12015-02-14 Lars Ingebrigtsen <larsi@gnus.org> 12015-02-14 Lars Ingebrigtsen <larsi@gnus.org>
2 2
3 * nnimap.el (nnimap-retrieve-headers): If the server closes connection
4 during header retrieval, error out instead of interpreting the data in
5 the buffer as the only messages there. This way, we don't mark
6 articles as read on a server hangup (bug#19035).
7
3 * mm-decode.el (mm-head-p): New function. 8 * mm-decode.el (mm-head-p): New function.
4 (mm-display-part): Go to a blank line when inserting parts internally. 9 (mm-display-part): Go to a blank line when inserting parts internally.
5 10
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index e7f91b7cc33..4a9ca744b9f 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -196,6 +196,8 @@ textual parts.")
196 (nnimap-article-ranges (gnus-compress-sequence articles)) 196 (nnimap-article-ranges (gnus-compress-sequence articles))
197 (nnimap-header-parameters)) 197 (nnimap-header-parameters))
198 t) 198 t)
199 (unless (process-live-p (get-buffer-process (current-buffer)))
200 (error "Server closed connection"))
199 (nnimap-transform-headers) 201 (nnimap-transform-headers)
200 (nnheader-remove-cr-followed-by-lf)) 202 (nnheader-remove-cr-followed-by-lf))
201 (insert-buffer-substring 203 (insert-buffer-substring