Function: gnus-cache-possibly-remove-article
gnus-cache-possibly-remove-article is a byte-compiled function defined
in gnus-cache.el.gz.
Signature
(gnus-cache-possibly-remove-article ARTICLE TICKED DORMANT UNREAD &optional FORCE)
Documentation
Possibly remove ARTICLE from the cache.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-cache.el.gz
(defun gnus-cache-possibly-remove-article (article ticked dormant unread
&optional force)
"Possibly remove ARTICLE from the cache."
(let ((group gnus-newsgroup-name)
(number article)
file
(file-name-coding-system nnmail-pathname-coding-system))
;; If this is a virtual group, we find the real group.
(when (gnus-virtual-group-p group)
(let ((result (if (gnus-nnselect-group-p group)
(with-current-buffer gnus-summary-buffer
(cons (nnselect-article-group article)
(nnselect-article-number article)))
(nnvirtual-find-group-art
(gnus-group-real-name group) article))))
(setq group (car result)
number (cdr result))))
(setq file (gnus-cache-file-name group number))
(when (and (file-exists-p file)
(or force
(gnus-cache-member-of-class
gnus-cache-remove-articles ticked dormant unread)))
(save-excursion
(gnus-cache-update-file-total-fetched-for group file t)
(delete-file file)
(set-buffer (cdr gnus-cache-buffer))
(goto-char (point-min))
(when (or (looking-at (concat (int-to-string number) "\t"))
(search-forward (concat "\n" (int-to-string number) "\t")
(point-max) t))
(gnus-delete-line)))
(unless (setq gnus-newsgroup-cached
(delq article gnus-newsgroup-cached))
(remhash gnus-newsgroup-name gnus-cache-active-hashtb)
(setq gnus-cache-active-altered t))
(gnus-summary-update-secondary-mark article)
t)))