Commit d607b17d authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(rmail-output-body): New command.

parent 78d7cf68
......@@ -319,4 +319,25 @@ The optional fourth argument FROM-GNUS is set when called from GNUS."
(setq count 0))))))
(kill-buffer tembuf))))
(defun rmail-output-body (file-name)
"Write this message body to the file FILE-NAME.
FILE-NAME defaults, interactively, from the Subject field of the message."
(let ((default-file
(mail-fetch-field "Subject")))
(list (read-file-name
"Output message body to file: "
(file-name-directory default-file)
nil default-file))))
(goto-char (point-min))
(search-forward "\n\n")
(write-region (point) (point-max) file-name)
(if (equal major-mode 'rmail-mode)
(rmail-set-attribute "stored" t)))
(if rmail-delete-after-output
;;; rmailout.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment