Function: gnus-agent-store-article

gnus-agent-store-article is an autoloaded and byte-compiled function defined in gnus-agent.el.gz.

Signature

(gnus-agent-store-article ARTICLE GROUP)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-agent.el.gz
(defun gnus-agent-store-article (article group)
  (let* ((gnus-command-method (gnus-find-method-for-group group))
	 (file (gnus-agent-article-name (number-to-string article) group))
	 (file-name-coding-system nnmail-pathname-coding-system)
	 (coding-system-for-write gnus-cache-coding-system))
    (when (not (file-exists-p file))
      (gnus-make-directory (file-name-directory file))
      (write-region (point-min) (point-max) file nil 'silent)
      ;; Tell the Agent when the article was fetched, so that it can
      ;; be expired later.
      (gnus-agent-load-alist group)
      (gnus-agent-save-alist group (list article)
			     (time-to-days nil)))))