From: yamaoka Date: Fri, 14 Mar 2003 00:05:18 +0000 (+0000) Subject: Synch to Oort Gnus 200303131947. X-Git-Tag: t-gnus-6_15_17-00-quimby~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=95cb0a227119bdff4aa95c9a64858e78a123e7eb;p=elisp%2Fgnus.git- Synch to Oort Gnus 200303131947. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bcf8528..a1c51ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-03-12 Paul Jarc + + * nnmaildir.el (nnmaildir-request-update-info): Pretend missing + articles are marked 'read, so we get correct article counts. + 2003-03-13 Katsumi Yamaoka * gnus-art.el (gnus-insert-mime-button): Exclude a newline from diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index 129097b..e74bc81 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -41,8 +41,6 @@ ;; copying, restoring, etc. ;; ;; Todo: -;; * Artificially add nonexistent article to the 'read range, to fix the -;; wrong-count problem. ;; * Replace create-directory with target-prefix, so the maildirs can be in ;; the same directory as the symlinks, starting with, e.g., ".". ;; * Add a hook for when moving messages from new/ to cur/, to support @@ -851,9 +849,9 @@ by nnmaildir-request-article.") (defun nnmaildir-request-update-info (gname info &optional server) (let ((group (nnmaildir--prepare server gname)) - pgname flist all always-marks never-marks old-marks dotfile num dir + pgname flist always-marks never-marks old-marks dotfile num dir markdirs marks mark ranges markdir article read end new-marks ls - old-mmth new-mmth mtime mark-sym deactivate-mark) + old-mmth new-mmth mtime mark-sym existing missing deactivate-mark) (catch 'return (unless group (setf (nnmaildir--srv-error nnmaildir--cur-server) @@ -870,6 +868,13 @@ by nnmaildir-request-article.") old-marks (cons old-marks (gnus-info-marks info)) always-marks (nnmaildir--param pgname 'always-marks) never-marks (nnmaildir--param pgname 'never-marks) + existing (nnmaildir--grp-nlist group) + existing (mapcar 'car existing) + existing (nreverse existing) + existing (gnus-compress-sequence existing 'always-list) + missing (list (cons 1 (nnmaildir--group-maxnum + nnmaildir--cur-server group))) + missing (gnus-range-difference missing existing) dir (nnmaildir--srv-dir nnmaildir--cur-server) dir (nnmaildir--srvgrp-dir dir gname) dir (nnmaildir--nndir dir) @@ -887,13 +892,7 @@ by nnmaildir-request-article.") (catch 'got-ranges (if (memq mark-sym never-marks) (throw 'got-ranges nil)) (when (memq mark-sym always-marks) - (unless all - (setq all (nnmaildir--grp-nlist group) - all (mapcar 'car all) - all (nreverse all) - all (gnus-compress-sequence all 'always-list) - all (cons 'dummy-mark-symbol all))) - (setq ranges (cdr all)) + (setq ranges existing) (throw 'got-ranges nil)) (setq mtime (nth 5 (file-attributes markdir))) (set (intern mark new-mmth) mtime) @@ -912,7 +911,7 @@ by nnmaildir-request-article.") (if (eq mark-sym 'read) (setq read ranges) (if ranges (setq marks (cons (cons mark-sym ranges) marks))))) markdirs) - (gnus-info-set-read info read) + (gnus-info-set-read info (gnus-range-add read missing)) (gnus-info-set-marks info marks 'extend) (setf (nnmaildir--grp-mmth group) new-mmth) info)))