[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0d38b2f 4/4: Don't mark nnimap articles as read on
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] master 0d38b2f 4/4: Don't mark nnimap articles as read on a server hangup |
Date: |
Sun, 15 Feb 2015 23:13:01 +0000 |
branch: master
commit 0d38b2f403fa873159138b194c0d45bc4c7e61cc
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>
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).
---
lisp/gnus/ChangeLog | 5 +++++
lisp/gnus/nnimap.el | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index b9ae796..7910d74 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,10 @@
2015-02-14 Lars Ingebrigtsen <address@hidden>
+ * 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).
+
* mm-decode.el (mm-head-p): New function.
(mm-display-part): Go to a blank line when inserting parts internally.
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index e7f91b7..4a9ca74 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -196,6 +196,8 @@ textual parts.")
(nnimap-article-ranges (gnus-compress-sequence articles))
(nnimap-header-parameters))
t)
+ (unless (process-live-p (get-buffer-process (current-buffer)))
+ (error "Server closed connection"))
(nnimap-transform-headers)
(nnheader-remove-cr-followed-by-lf))
(insert-buffer-substring