From 0f663f5faac543d553b1e7c18f0e86073d04dd03 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 1 Feb 2012 15:46:25 +0100 Subject: [PATCH] Remove `exist' marks that come from old Gnusae. This makes it possible to switch back and forth without losing track of nnimap `exist' information. * gnus-start.el (gnus-clean-old-newsrc): New function. (gnus-read-newsrc-file): Use it. --- lisp/ChangeLog | 3 +++ lisp/gnus-start.el | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1a3ecb85..17fe812c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-02-01 Lars Ingebrigtsen + * gnus-start.el (gnus-clean-old-newsrc): New function. + (gnus-read-newsrc-file): Use it. + * mm-archive.el (mm-dissect-archive): Use it to get all file names. Use recursive deletion. (mm-dissect-archive): Add support for zip files. diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 801f7723a..cfedeb16a 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2303,7 +2303,19 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-message 5 "Reading %s...done" newsrc-file))) ;; Convert old to new. - (gnus-convert-old-newsrc)))) + (gnus-convert-old-newsrc) + (gnus-clean-old-newsrc)))) + +(defun gnus-clean-old-newsrc () + (when gnus-newsrc-file-version + (when (< (gnus-continuum-version gnus-newsrc-file-version) + (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)))) + (when exist + (gnus-info-set-marks + info (delete exist (gnus-info-marks info))))))))) (defun gnus-convert-old-newsrc () "Convert old newsrc formats into the current format, if needed." -- 2.25.1