+2002-02-11 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * gnus-agent.el (gnus-summary-set-agent-mark): Added call to
+ gnus-summary-goto-subject as gnus-summary-update-mark operates on
+ the current LINE.
+ (gnus-agent-summary-fetch-group): Minimized the number of times
+ that the article is updated in the buffer.
+
+2003-02-11 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-ham-move-routine): use the process-mark instead of
+ gnus-current-article when moving articles
+ (spam-mark-spam-as-expired-and-move-routine): ditto, use the process-mark
+
2003-02-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-topic.el (gnus-topic-expire-articles): Recursive.
(defcustom gnus-agent-expire-days 7
"Read articles older than this will be expired.
This can also be a list of regexp/day pairs. The regexps will be
-matched against group names. If nil, articles in the agent cache are
-never expired."
+matched against group names."
:group 'gnus-agent
:type '(choice (number :tag "days")
(sexp :tag "List" nil)))
t)
(t
(memq article gnus-newsgroup-downloadable)))))
- (gnus-summary-update-mark
- (if unmark
- (progn
- (setq gnus-newsgroup-downloadable
- (delq article gnus-newsgroup-downloadable))
- (gnus-article-mark article))
- (progn
- (setq gnus-newsgroup-downloadable
- (gnus-add-to-sorted-list gnus-newsgroup-downloadable article))
- gnus-downloadable-mark)
- )
- 'unread)))
+ (when (gnus-summary-goto-subject article nil t)
+ (gnus-summary-update-mark
+ (if unmark
+ (progn
+ (setq gnus-newsgroup-downloadable
+ (delq article gnus-newsgroup-downloadable))
+ (gnus-article-mark article))
+ (progn
+ (setq gnus-newsgroup-downloadable
+ (gnus-add-to-sorted-list gnus-newsgroup-downloadable article))
+ gnus-downloadable-mark)
+ )
+ 'unread))))
(defun gnus-agent-get-undownloaded-list ()
"Construct list of articles that have not been downloaded."
(gnus-agent-fetch-articles
gnus-newsgroup-name articles)))))
(save-excursion
-
(dolist (article articles)
- (setq gnus-newsgroup-downloadable
- (delq article gnus-newsgroup-downloadable))
- (if gnus-agent-mark-unread-after-downloaded
- (gnus-summary-mark-article article gnus-unread-mark))
- (when (gnus-summary-goto-subject article nil t)
- (gnus-summary-update-download-mark article)))))
+ (let ((was-marked-downloadable
+ (memq article gnus-newsgroup-downloadable)))
+ (when
+ (cond
+ (gnus-agent-mark-unread-after-downloaded
+ (setq gnus-newsgroup-downloadable
+ (delq article gnus-newsgroup-downloadable))
+
+ ;; The downloadable mark is implemented as a
+ ;; type of read mark. Therefore, marking the
+ ;; article as unread is sufficient to clear
+ ;; its downloadable flag.
+ (gnus-summary-mark-article article gnus-unread-mark)
+ ;; I just redrew the entire article so
+ ;; there's no need to update the download
+ ;; mark below.
+ nil)
+ (was-marked-downloadable
+ (gnus-summary-set-agent-mark article t)
+ t)
+ (t t))
+ (when (gnus-summary-goto-subject article nil t)
+ (gnus-summary-update-download-mark article)))))))
(when (and (not state)
gnus-plugged)
(gnus-agent-toggle-plugged nil)))
(when (eq (gnus-summary-article-mark article) gnus-spam-mark)
(gnus-summary-mark-article article gnus-expirable-mark)
(when (stringp group)
- (let ((gnus-current-article article))
- (gnus-summary-move-article nil group)))))))
+ (gnus-summary-set-process-mark article)
+ (gnus-summary-move-article nil group))))))
(defun spam-ham-move-routine (&optional group)
(let ((articles gnus-newsgroup-articles)
(dolist (mark spam-ham-marks)
(push (symbol-value mark) ham-mark-values))
-
- (dolist (article articles)
+ (dolist (article articles)
(when (and (memq (gnus-summary-article-mark article) ham-mark-values)
(stringp group))
- (let ((gnus-current-article article))
- (gnus-summary-move-article nil group))))))
+ (gnus-summary-set-process-mark article)
+ (gnus-summary-move-article nil group)))))
(defun spam-generic-register-routine (spam-func ham-func)
(let ((articles gnus-newsgroup-articles)