Function: gnus-summary-edit-article
gnus-summary-edit-article is an interactive and byte-compiled function
defined in gnus-sum.el.gz.
Signature
(gnus-summary-edit-article &optional ARG)
Documentation
Edit the current article.
This will have permanent effect only in mail groups. If ARG is nil, edit the decoded articles. If ARG is 1, edit the raw articles. If ARG is 2, edit the raw articles even in read-only groups. If ARG is 3, edit the articles with the current handles. Otherwise, allow editing of articles even in read-only groups.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-edit-article (&optional arg)
"Edit the current article.
This will have permanent effect only in mail groups.
If ARG is nil, edit the decoded articles.
If ARG is 1, edit the raw articles.
If ARG is 2, edit the raw articles even in read-only groups.
If ARG is 3, edit the articles with the current handles.
Otherwise, allow editing of articles even in read-only
groups."
(interactive "P" gnus-summary-mode)
(let (force raw current-handles)
(cond
((null arg))
((eq arg 1)
(setq raw t))
((eq arg 2)
(setq raw t
force t))
((eq arg 3)
(setq current-handles
(and (gnus-buffer-live-p gnus-article-buffer)
(with-current-buffer gnus-article-buffer
(prog1
gnus-article-mime-handles
(setq gnus-article-mime-handles nil))))))
(t
(setq force t)))
(when (and raw (not force)
(member gnus-newsgroup-name '("nndraft:delayed"
"nndraft:drafts"
"nndraft:queue")))
(error "Can't edit the raw article in group %s"
gnus-newsgroup-name))
(with-current-buffer gnus-summary-buffer
(let ((mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
(gnus-set-global-variables)
(when (and (not force)
(gnus-group-read-only-p))
(error "The current newsgroup does not support article editing"))
(gnus-summary-show-article t)
(when (and (not raw) (gnus-buffer-live-p gnus-article-buffer))
(with-current-buffer gnus-article-buffer
(mm-enable-multibyte)))
(if (member gnus-newsgroup-name '("nndraft:delayed" "nndraft:drafts"))
(setq raw t))
(gnus-article-edit-article
(if raw 'ignore
(lambda ()
(let ((mbl mml-buffer-list))
(setq mml-buffer-list nil)
(let ((rfc2047-quote-decoded-words-containing-tspecials t))
(mime-to-mml current-handles))
(let ((mbl1 mml-buffer-list))
(setq mml-buffer-list mbl)
(setq-local mml-buffer-list mbl1))
(add-hook 'kill-buffer-hook #'mml-destroy-buffers t t))))
(let ((charset gnus-newsgroup-charset)
(ign-cs gnus-newsgroup-ignored-charsets)
(hea (let ((charset (gnus-group-name-charset
(gnus-find-method-for-group
gnus-newsgroup-name)
gnus-newsgroup-name)))
(append (list (cons "Newsgroups" charset)
(cons "Followup-To" charset)
(cons "Xref" charset))
rfc2047-header-encoding-alist)))
(gch (or (mail-header-references gnus-current-headers) ""))
(ro (gnus-group-read-only-p))
(buf gnus-summary-buffer))
(lambda (no-highlight)
(let ((mail-parse-charset charset)
(message-options message-options)
(message-options-set-recipient)
(mail-parse-ignored-charsets ign-cs)
(rfc2047-header-encoding-alist hea))
(unless raw
(mml-to-mime)
(mml-destroy-buffers)
(remove-hook 'kill-buffer-hook
#'mml-destroy-buffers t)
(kill-local-variable 'mml-buffer-list))
(gnus-summary-edit-article-done gch ro buf no-highlight)))))))))