Function: spam-report-process-queue

spam-report-process-queue is an autoloaded, interactive and byte-compiled function defined in spam-report.el.gz.

Signature

(spam-report-process-queue &optional FILE KEEP)

Documentation

Report all queued requests from spam-report-requests-file.

If FILE is given, use it instead of spam-report-requests-file. If KEEP is t, leave old requests in the file. If KEEP is the symbol ask, query before flushing the queue file.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/spam-report.el.gz
;;;###autoload
(defun spam-report-process-queue (&optional file keep)
  "Report all queued requests from `spam-report-requests-file'.

If FILE is given, use it instead of `spam-report-requests-file'.
If KEEP is t, leave old requests in the file.  If KEEP is the
symbol `ask', query before flushing the queue file."
  (interactive
   (list (read-file-name
	  "File: "
	  (file-name-directory spam-report-requests-file)
	  spam-report-requests-file
	  nil
	  (file-name-nondirectory spam-report-requests-file))
	 current-prefix-arg))
  (if (eq spam-report-url-ping-function 'spam-report-url-to-file)
      (error (concat "Cannot process requests when "
		     "`spam-report-url-ping-function' is "
		     "`spam-report-url-to-file'."))
    (gnus-message 7 "Processing requests using `%s'."
		  spam-report-url-ping-function))
  (or file (setq file spam-report-requests-file))
  (with-current-buffer (find-file-noselect file)
    (goto-char (point-min))
    (while (and (not (eobp))
		(re-search-forward
                 "http://\\([^/]+\\)\\(/.*\\) *$" (line-end-position) t))
      (let ((spam-report-gmane-wait
	     (zerop (% (line-number-at-pos) spam-report-gmane-max-requests))))
	(gnus-message 6 "Reporting %s%s..."
		      (match-string 1) (match-string 2))
	(funcall spam-report-url-ping-function
		 (match-string 1) (match-string 2)))
      (forward-line 1))
    (if (or (eq keep nil)
	    (and (eq keep 'ask)
		 (y-or-n-p
		  (format-message
		   "Flush requests from `%s'? " (current-buffer)))))
	(progn
	  (gnus-message 7 "Flushing request file `%s'"
			spam-report-requests-file)
	  (erase-buffer)
	  (save-buffer)
	  (kill-buffer (current-buffer)))
      (gnus-message 7 "Keeping requests in `%s'" spam-report-requests-file))))