(require 'nnoo)
(eval-when-compile (require 'cl))
+(eval-and-compile
+ (autoload 'gnus-article-unpropagatable-p "gnus-sum"))
+
(nnoo-declare nnml)
(defvoo nnml-directory message-directory
(let (nnml-current-directory
nnml-current-group
nnml-article-file-alist)
- (nnmail-expiry-target-group nnmail-expiry-target group))))
+ (nnmail-expiry-target-group nnmail-expiry-target group)))
+ ;; Maybe directory is changed during nnmail-expiry-target-group.
+ (nnml-possibly-change-directory group server))
(nnheader-message 5 "Deleting article %s in %s"
number group)
(condition-case ()
(nnmail-group-pathname group nnml-directory))))
(if (null (gnus-gethash file nnml-marks-modtime))
t ;; never looked at marks file, assume it has changed
- (not (eq (gnus-gethash file nnml-marks-modtime)
- (nth 5 (file-attributes file)))))))
+ (not (equal (gnus-gethash file nnml-marks-modtime)
+ (nth 5 (file-attributes file)))))))
(defun nnml-save-marks (group server)
(let ((file-name-coding-system nnmail-pathname-coding-system)
(nnml-possibly-create-directory group)
(with-temp-file file
(erase-buffer)
- (princ nnml-marks (current-buffer))
+ (gnus-prin1 nnml-marks (current-buffer))
(insert "\n"))
(gnus-sethash file
(nth 5 (file-attributes file))
nnml-marks-file-name
(nnmail-group-pathname group nnml-directory))))
(if (file-exists-p file)
- (setq nnml-marks (condition-case err
- (with-temp-buffer
- (gnus-sethash file
- (nth 5 (file-attributes file))
- nnml-marks-modtime)
- (nnheader-insert-file-contents file)
- (read (current-buffer)))
- (error (or (gnus-yes-or-no-p
- (format "Error reading nnml marks file %s (%s). Continuing will use marks from .newsrc.eld. Continue? " file err))
- (error "Cannot read nnml marks file %s (%s)" file err)))))
+ (condition-case err
+ (with-temp-buffer
+ (gnus-sethash file (nth 5 (file-attributes file))
+ nnml-marks-modtime)
+ (nnheader-insert-file-contents file)
+ (setq nnml-marks (read (current-buffer)))
+ (dolist (el gnus-article-unpropagated-mark-lists)
+ (setq nnml-marks (gnus-remassoc el nnml-marks))))
+ (error (or (gnus-yes-or-no-p
+ (format "Error reading nnml marks file %s (%s). Continuing will use marks from .newsrc.eld. Continue? " file err))
+ (error "Cannot read nnml marks file %s (%s)" file err))))
;; User didn't have a .marks file. Probably first time
;; user of the .marks stuff. Bootstrap it from .newsrc.eld.
(let ((info (gnus-get-info
(nnheader-message 7 "Bootstrapping marks for %s..." group)
(setq nnml-marks (gnus-info-marks info))
(push (cons 'read (gnus-info-read info)) nnml-marks)
+ (dolist (el gnus-article-unpropagated-mark-lists)
+ (setq nnml-marks (gnus-remassoc el nnml-marks)))
(nnml-save-marks group server)))))
(provide 'nnml)