Function: gnus-agent-flush-group

gnus-agent-flush-group is an interactive and byte-compiled function defined in gnus-agent.el.gz.

Signature

(gnus-agent-flush-group GROUP)

Documentation

Flush the agent's index files such that the GROUP no longer appears to have any local content. The actual content, the article files, may then be deleted using gnus-agent-expire-group. If flushing was a mistake, the gnus-agent-regenerate-group method provides an undo mechanism by reconstructing the index files from the article files.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-agent.el.gz
(defun gnus-agent-flush-group (group)
  "Flush the agent's index files such that the GROUP no longer
appears to have any local content.  The actual content, the
article files, may then be deleted using gnus-agent-expire-group.
If flushing was a mistake, the gnus-agent-regenerate-group method
provides an undo mechanism by reconstructing the index files from
the article files."
  (interactive (list (gnus-agent-read-group)))

  (let* ((gnus-command-method (or gnus-command-method
				  (gnus-find-method-for-group group)))
	 (overview (gnus-agent-article-name ".overview" group))
	 (agentview (gnus-agent-article-name ".agentview" group))
	 (file-name-coding-system nnmail-pathname-coding-system))

    (if (file-exists-p overview)
	(delete-file overview))
    (if (file-exists-p agentview)
	(delete-file agentview))

    (gnus-agent-update-view-total-fetched-for group nil gnus-command-method)
    (gnus-agent-update-view-total-fetched-for group t   gnus-command-method)

    ;(gnus-agent-set-local group nil nil)
    ;(gnus-agent-save-local t)
    (gnus-agent-save-group-info nil group nil)))