Function: gnus-summary-respool-article

gnus-summary-respool-article is an interactive and byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-respool-article &optional N METHOD)

Documentation

Respool the current article.

The article will be squeezed through the mail spooling process again, which means that it will be put in some mail newsgroup or other depending on nnmail-split-methods. If N is a positive number, respool the N next articles. If N is a negative number, respool the N previous articles. If N is nil and any articles have been marked with the process mark, respool those articles instead.

Respooling can be done both from mail groups and "real" newsgroups. In the former case, the articles in question will be moved from the current group into whatever groups they are destined to. In the latter case, they will be copied into the relevant groups.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-respool-article (&optional n method)
  "Respool the current article.
The article will be squeezed through the mail spooling process again,
which means that it will be put in some mail newsgroup or other
depending on `nnmail-split-methods'.
If N is a positive number, respool the N next articles.
If N is a negative number, respool the N previous articles.
If N is nil and any articles have been marked with the process mark,
respool those articles instead.

Respooling can be done both from mail groups and \"real\" newsgroups.
In the former case, the articles in question will be moved from the
current group into whatever groups they are destined to.  In the
latter case, they will be copied into the relevant groups."
  (interactive
   (list current-prefix-arg
	 (let* ((methods (mapcar #'car (gnus-methods-using 'respool)))
		(methname
		 (symbol-name (or gnus-summary-respool-default-method
				  (car (gnus-find-method-for-group
					gnus-newsgroup-name)))))
		(method
		 (gnus-completing-read
		  "Backend to use when respooling"
		  methods t nil 'gnus-mail-method-history methname))
		ms)
	   (cond
	    ((zerop (length (setq ms (gnus-servers-using-backend
				      (intern method)))))
	     (list (intern method) ""))
	    ((= 1 (length ms))
	     (car ms))
	    (t
	     (let ((ms-alist (mapcar (lambda (m) (cons (cadr m) m)) ms)))
	       (cdr (assoc (gnus-completing-read "Server name" ms-alist t)
			   ms-alist)))))))
   gnus-summary-mode)
  (unless method
    (error "No method given for respooling"))
  (if (assoc (symbol-name
	      (car (gnus-find-method-for-group gnus-newsgroup-name)))
	     (gnus-methods-using 'respool))
      (gnus-summary-move-article n nil method)
    (gnus-summary-copy-article n nil method)))