Index: nnmairix.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnmairix.el,v retrieving revision 7.13 diff -u -r7.13 nnmairix.el --- nnmairix.el 22 Jan 2009 07:02:16 -0000 7.13 +++ nnmairix.el 29 Apr 2009 10:54:13 -0000 @@ -522,7 +522,7 @@ (when (eq nnmairix-backend 'nnml) (when nnmairix-rename-files-for-nnml (nnmairix-rename-files-consecutively mfolder)) - (nnml-generate-nov-databases-directory mfolder)) + (nnml-generate-nov-databases-directory mfolder nil t)) (nnmairix-call-backend "request-scan" folder nnmairix-backend-server) (if (and fast allowfast) @@ -936,7 +936,8 @@ If PROPMARKS is a positive number, set parameter to t. If PROPMARKS is a negative number, set it to nil." (interactive) - (unless (nnmairix-check-mairix-version "maildirpatch") + (unless (or (eq nnmairix-backend 'nnml) + (nnmairix-check-mairix-version "maildirpatch")) (error "You need a mairix binary with maildir patch to use this feature. See docs for details")) (let ((group (gnus-group-group-name))) (when (or (not (string= (gnus-group-short-name group) @@ -1154,12 +1155,18 @@ (if nnmairix-marks-cache (let (number ogroup number-cache method mid-marks temp) ;; first we get the article numbers - (catch 'problem - (while (setq ogroup (pop nnmairix-marks-cache)) + (while (setq ogroup (pop nnmairix-marks-cache)) + (catch 'problem (while (setq mid-marks (pop (cdr ogroup))) (setq number - (cdr - (gnus-request-head (car mid-marks) (car ogroup)))) + (if (eq nnmairix-backend 'nnml) + (with-temp-buffer + (nnml-find-id (gnus-group-short-name (car ogroup)) + (car mid-marks) + (gnus-group-server (car ogroup)))) + (cdr + (nnmairix-call-backend 'request-head + (gnus-request-head (car mid-marks) (car ogroup)))))) (unless number (nnheader-message 3 "Unable to set mark: couldn't determine article number for %s in %s" @@ -1187,6 +1194,13 @@ (gnus-group-short-name (car cur)) (cdr cur) (list (nth 1 method))) + ;; This a hack to enforce a reread of the .marks file + (when (and (eq nnmairix-backend 'nnml) + (not (cdr-safe (assoc 'nnml-marks-is-evil method)))) + (let ((file (nnml-group-pathname (gnus-group-short-name (car cur)) + nnml-marks-file-name + (gnus-group-server (car cur))))) + (gnus-sethash file nil nnml-marks-modtime))) (gnus-group-jump-to-group (car cur)) (gnus-group-get-new-news-this-group))) (nnheader-message 5 "nnmairix: Propagating marks... done"))