Function: gnus-agent-expire-group
gnus-agent-expire-group is an interactive and byte-compiled function
defined in gnus-agent.el.gz.
Signature
(gnus-agent-expire-group GROUP &optional ARTICLES FORCE)
Documentation
Expire all old articles in GROUP.
If you want to force expiring of certain articles, this function can take ARTICLES, and FORCE parameters as well.
The articles on which the expiration process runs are selected as follows:
if ARTICLES is null, all read and unmarked articles.
if ARTICLES is t, all articles.
if ARTICLES is a list, just those articles.
FORCE is equivalent to setting the expiration predicates to true.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-agent.el.gz
(defun gnus-agent-expire-group (group &optional articles force)
"Expire all old articles in GROUP.
If you want to force expiring of certain articles, this function can
take ARTICLES, and FORCE parameters as well.
The articles on which the expiration process runs are selected as follows:
if ARTICLES is null, all read and unmarked articles.
if ARTICLES is t, all articles.
if ARTICLES is a list, just those articles.
FORCE is equivalent to setting the expiration predicates to true."
(interactive (list (gnus-agent-read-group)))
(if (not group)
(gnus-agent-expire articles group force)
(let (;; Bind gnus-agent-expire-stats to enable tracking of
;; expiration statistics of this single group
(gnus-agent-expire-stats (list 0 0 0.0)))
(if (or (not (eq articles t))
(yes-or-no-p
(concat "Are you sure that you want to "
"expire all articles in " group "? ")))
(let ((gnus-command-method (gnus-find-method-for-group group))
(overview (gnus-get-buffer-create " *expire overview*"))
orig)
(unwind-protect
(let ((active-file (gnus-agent-lib-file "active")))
(when (file-exists-p active-file)
(with-temp-buffer
(nnheader-insert-file-contents active-file)
(gnus-active-to-gnus-format
gnus-command-method
(setq orig (gnus-make-hashtable
(count-lines (point-min) (point-max))))))
(save-excursion
(gnus-agent-expire-group-1
group overview (gethash group orig)
articles force))))
(kill-buffer overview))))
(gnus-message 4 "%s" (gnus-agent-expire-done-message)))))