;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
;; Keywords: mail, news, MIME, offline
;; This file is part of GNU Emacs.
(interactive)
(let ((article (gnus-summary-article-number)))
(gnus-summary-mark-as-read article gnus-canceled-mark)
- (gnus-draft-setup article gnus-newsgroup-name)
+ (gnus-draft-setup-for-editing article gnus-newsgroup-name)
(set-buffer-modified-p t)
(save-buffer)
(push
(defun gnus-draft-send (article &optional group)
"Send message ARTICLE."
- (gnus-draft-setup article (or group "nndraft:queue"))
+ (gnus-draft-setup-for-sending article (or group "nndraft:queue"))
(let ((message-syntax-checks 'dont-check-for-anything-just-trust-me)
message-send-hook type method)
;; We read the meta-information that says how and where
(message-remove-header gnus-agent-meta-information-header)))
;; Then we send it. If we have no meta-information, we just send
;; it and let Message figure out how.
- (when (if type
- (let ((message-this-is-news (eq type 'news))
- (message-this-is-mail (eq type 'mail))
- (gnus-post-method method)
- (message-post-method method))
- (message-send-and-exit))
- (message-send-and-exit))
+ (when (let ((mail-header-separator ""))
+ (cond ((eq type 'news)
+ (mime-edit-maybe-split-and-send
+ (function
+ (lambda ()
+ (interactive)
+ (funcall message-send-news-function method)
+ )))
+ (funcall message-send-news-function method)
+ )
+ ((eq type 'mail)
+ (mime-edit-maybe-split-and-send
+ (function
+ (lambda ()
+ (interactive)
+ (funcall message-send-mail-function)
+ )))
+ (funcall message-send-mail-function)
+ t)))
(let ((gnus-verbose-backends nil))
(gnus-request-expire-articles
(list article) (or group "nndraft:queue") t)))))
;;;!!!but for the time being, we'll just run this tiny function uncompiled.
(progn
-(defun gnus-draft-setup (narticle group)
+(defun gnus-draft-setup-for-editing (narticle group)
(gnus-setup-message 'forward
(let ((article narticle))
(message-mail)
(insert mail-header-separator)
(forward-line 1)
(message-set-auto-save-file-name))))))
+;;
+(defvar gnus-draft-send-draft-buffer " *send draft*")
+(progn
+(defun gnus-draft-setup-for-sending (narticle group)
+ (let ((article narticle))
+ (if (not (get-buffer gnus-draft-send-draft-buffer))
+ (get-buffer-create gnus-draft-send-draft-buffer))
+ (set-buffer gnus-draft-send-draft-buffer)
+ (erase-buffer)
+ (if (not (gnus-request-restore-buffer article group))
+ (error "Couldn't restore the article")
+ ))))
+;; For draft TEST
(defun gnus-draft-article-sendable-p (article)
"Say whether ARTICLE is sendable."