[gnus git] branch master updated: m0-1-116-gd0ae8ea =1= Have nnimap keep track of unexisting articles
Lars Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via d0ae8eae7ea91ca2d0b832c70bb2e938d107558a (commit)
from 258b3f878a173a243201bb290401956d9cc35276 (commit)
- Log -----------------------------------------------------------------
commit d0ae8eae7ea91ca2d0b832c70bb2e938d107558a
Author: Lars Ingebrigtsen <[email protected]>
Date: Sat Feb 11 18:35:57 2012 +0100
Have nnimap keep track of unexisting articles
* nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting
articles.
(nnimap-update-info): Keep track of unexisting articles.
(nnimap-update-qresync-info): Ditto.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eee510e..95e561e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-11 Lars Ingebrigtsen <[email protected]>
+
+ * nnimap.el (nnimap-retrieve-group-data-early): Query for unexisting
+ articles.
+ (nnimap-update-info): Keep track of unexisting articles.
+ (nnimap-update-qresync-info): Ditto.
+
2012-02-10 Lars Ingebrigtsen <[email protected]>
* message.el (message-default-send-mail-function): Made into own
diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el
index cfedeb1..f7d7d88 100644
--- a/lisp/gnus-start.el
+++ b/lisp/gnus-start.el
@@ -2312,7 +2312,7 @@ If FORCE is non-nil, the .newsrc file is read."
(gnus-continuum-version "Ma Gnus v0.02"))
;; Remove old `exist' marks from old nnimap groups.
(dolist (info (cdr gnus-newsrc-alist))
- (let ((exist (assoc 'exist (gnus-info-marks info))))
+ (let ((exist (assoc 'unexist (gnus-info-marks info))))
(when exist
(gnus-info-set-marks
info (delete exist (gnus-info-marks info)))))))))
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index de4d248..4423860 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -1238,13 +1238,15 @@ textual parts.")
group (nnimap-decode-gnus-group
(gnus-group-real-name (gnus-info-group info)))
active (cdr (assq 'active params))
+ unexist (assq 'unexist (gnus-info-marks info))
uidvalidity (cdr (assq 'uidvalidity params))
modseq (cdr (assq 'modseq params)))
(setf (nnimap-examined nnimap-object) group)
(if (and qresyncp
uidvalidity
active
- modseq)
+ modseq
+ unexist)
(push
(list (nnimap-send-command "EXAMINE %S (%s (%s %s))"
(utf7-encode group t)
@@ -1263,11 +1265,10 @@ textual parts.")
;; is read-only or not.
"SELECT"))
start)
- (if (and active uidvalidity)
+ (if (and active uidvalidity unexist)
;; Fetch the last 100 flags.
(setq start (max 1 (- (cdr active) 100)))
- (setf (nnimap-initial-resync nnimap-object)
- (1+ (nnimap-initial-resync nnimap-object)))
+ (incf (nnimap-initial-resync nnimap-object))
(setq start 1))
(push (list (nnimap-send-command "%s %S" command
(utf7-encode group t))
@@ -1444,6 +1445,20 @@ textual parts.")
(setq new-marks (gnus-range-nconcat old-marks new-marks)))
(when new-marks
(push (cons (car type) new-marks) marks)))))
+ ;; Keep track of non-existing articles.
+ (let* ((old-unexists (assq 'unexist marks))
+ (unexists
+ (if completep
+ (gnus-range-difference
+ (gnus-active group)
+ (gnus-compress-sequence existing))
+ (gnus-add-to-range
+ (cdr old-unexists)
+ (gnus-list-range-difference
+ existing (gnus-active group))))))
+ (if old-unexists
+ (setcdr old-unexists unexists)
+ (push (cons 'unexist unexists) marks)))
(gnus-info-set-marks info marks t))))
;; Tell Gnus whether there are any \Recent messages in any of
;; the groups.
@@ -1487,6 +1502,14 @@ textual parts.")
(gnus-sorted-complement existing new-marks))))
(when ticks
(push (cons (car type) ticks) marks)))
+ (gnus-info-set-marks info marks t))
+ ;; Add vanished to the list of unexisting articles.
+ (when vanished
+ (let* ((old-unexists (assq 'unexist marks))
+ (unexists (gnus-range-add (cdr old-unexists) vanished)))
+ (if old-unexists
+ (setcdr old-unexists unexists)
+ (push (cons 'unexist unexists) marks)))
(gnus-info-set-marks info marks t))))
(defun nnimap-imap-ranges-to-gnus-ranges (irange)
@@ -1539,7 +1562,8 @@ textual parts.")
(defun nnimap-parse-flags (sequences)
(goto-char (point-min))
- ;; Change \Delete etc to %Delete, so that the reader can read it.
+ ;; Change \Delete etc to %Delete, so that the Emacs Lisp reader can
+ ;; read it.
(subst-char-in-region (point-min) (point-max)
?\\ ?% t)
;; Remove any MODSEQ entries in the buffer, because they may contain
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 7 +++++++
lisp/gnus-start.el | 2 +-
lisp/nnimap.el | 34 +++++++++++++++++++++++++++++-----
3 files changed, 37 insertions(+), 6 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project