Function: gnus-summary-cancel-article

gnus-summary-cancel-article is an autoloaded, interactive and byte-compiled function defined in gnus-msg.el.gz.

Signature

(gnus-summary-cancel-article &optional N SYMP)

Documentation

Cancel an article you posted.

Uses the process-prefix convention. If given the symbolic prefix a, cancel using the standard posting method; if not post using the current select method.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-msg.el.gz
(defun gnus-summary-cancel-article (&optional n symp)
  "Cancel an article you posted.
Uses the process-prefix convention.  If given the symbolic
prefix `a', cancel using the standard posting method; if not
post using the current select method."
  (interactive (gnus-interactive "P\ny") gnus-summary-mode)
  (let ((message-post-method
	 (let ((gn gnus-newsgroup-name))
	   (lambda (_arg) (gnus-post-method (eq symp 'a) gn))))
	(custom-address user-mail-address))
    (dolist (article (gnus-summary-work-articles n))
      (when (gnus-summary-select-article t nil nil article)
	;; Pretend that we're doing a followup so that we can see what
	;; the From header would have ended up being.
	(save-window-excursion
	  (save-excursion
	    (gnus-summary-followup nil)
	    (let ((from (message-fetch-field "from")))
	      (when from
		(setq custom-address
		      (car (mail-header-parse-address from)))))
	    (kill-buffer (current-buffer))))
	;; Now cancel the article using the From header we got.
	(when (gnus-eval-in-buffer-window gnus-original-article-buffer
		(let ((user-mail-address (or custom-address user-mail-address)))
		  (message-cancel-news)))
	  (gnus-summary-mark-as-read article gnus-canceled-mark)
	  (gnus-cache-remove-article 1))
	(gnus-article-hide-headers-if-wanted))
      (gnus-summary-remove-process-mark article))))