+1998-10-03 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * lisp/gnus-draft.el (gnus-draft-send): Call
+ `message-send-news-function' or `message-send-mail-function'
+ instead of `message-send-and-exit'.
+
+1998-09-17 Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
+
+ * lisp/gnus-draft.el (gnus-draft-edit-message): Use
+ `gnus-draft-setup-for-editing' instead of `gnus-draft-setup'.
+ (gnus-draft-send): Use `gnus-draft-setup-for-sending' instead of
+ `gnus-draft-setup'.
+ (gnus-draft-setup-for-editing): New function (renamed from
+ `gnus-draft-setup').
+ (gnus-draft-setup-for-sending): New function.
+ (gnus-draft-send-draft-buffer): New variable.
+
1998-10-01 Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
* lisp/pop3-fma.el (pop3-fma-movemail): Bug fix.
(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*")
+(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."
(defvar gnus-message-group-art nil)
(defconst gnus-bug-message
- "Sending a bug report to the Gnus Towers.
+ (format "Sending a bug report to the Gnus Towers.
+========================================
+
+This gnus is the %s%s.
+If you think the bug is a Semi-gnus bug, send a bug report to Semi-gnus
+Developers. (the addresses below are mailing list addresses)
+
========================================
The buffer below is a mail buffer. When you press `C-c C-c', it will
Please describe the bug in annoying, painstaking detail.
Thank you for your help in stamping out bugs.
-")
+"
+
+ gnus-product-name
+ (if (string= gnus-product-name "Semi-gnus")
+ ""
+ ", a modified version of Semi-gnus")))
(eval-and-compile
(autoload 'gnus-uu-post-news "gnus-uu" nil t)
(setq message-post-method
`(lambda (arg)
(gnus-post-method arg ,gnus-newsgroup-name)))
- (setq message-newsreader (setq message-mailer (gnus-extended-version)))
+ (setq message-user-agent (gnus-extended-version))
(message-add-action
`(set-window-configuration ,winconf) 'exit 'postpone 'kill)
(message-add-action
(defvar nnspool-rejected-article-hook)
(defvar xemacs-codename)
-;;; Since the X-Newsreader/X-Mailer are ``vanity'' headers, they might
-;;; as well include the Emacs version as well.
-;;; The following function works with later GNU Emacs, and XEmacs.
(defun gnus-extended-version ()
"Stringified gnus version."
(interactive)
- gnus-version)
+ (concat gnus-product-name "/" gnus-version-number))
\f
;;;
(insert gnus-bug-message)
(goto-char (point-min)))
(message-pop-to-buffer "*Gnus Bug*")
- (message-setup `((To . ,gnus-maintainer) (Subject . "")))
+ (message-setup
+ `((To . ,gnus-maintainer) (Cc . ,semi-gnus-developers) (Subject . "")))
(when gnus-bug-create-help-buffer
(push `(gnus-bug-kill-buffer) message-send-actions))
(goto-char (point-min))
(search-forward "\n\n")
(forward-char -1)
(insert mail-header-separator)
- (setq message-newsreader (setq message-mailer
- (gnus-extended-version)))
+ (setq message-user-agent (gnus-extended-version))
(cond
((string= (gnus-soup-reply-kind (car replies)) "news")
(gnus-message 5 "Sending news message to %s..."
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
+(defconst gnus-product-name "Semi-gnus"
+ "Product name of this version of gnus.")
+
(defconst gnus-version-number "6.8.19"
"Version number for this version of gnus.")
(defconst gnus-version
- (format "Semi-gnus %s (based on Gnus 5.6.44; for SEMI 1.8, FLIM 1.8/1.9)"
- gnus-version-number)
+ (format "%s %s (based on Gnus 5.6.44; for SEMI 1.8, FLIM 1.8/1.9)"
+ gnus-product-name gnus-version-number)
"Version string for this version of gnus.")
(defcustom gnus-inhibit-startup-message nil
"bugs@gnus.org (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
+(defconst semi-gnus-developers
+ "Semi-gnus Developers:
+ semi-gnus-en@meadow.scphys.kyoto-u.ac.jp (In English),\
+ semi-gnus-ja@meadow.scphys.kyoto-u.ac.jp (In Japanese);"
+ "The mail address of the Semi-gnus developers.")
+
(defvar gnus-info-nodes
'((gnus-group-mode "(gnus)The Group Buffer")
(gnus-summary-mode "(gnus)The Summary Buffer")
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
;; Keiichi Suzuki <kei-suzu@mail.wbs.ne.jp>
;; Keywords: mail, news, MIME
(defcustom message-required-news-headers
'(From Newsgroups Subject Date Message-ID
(optional . Organization) Lines
- (optional . X-Newsreader))
+ (optional . User-Agent))
"*Headers to be generated or prompted for when posting an article.
RFC977 and RFC1036 require From, Date, Newsgroups, Subject,
Message-ID. Organization, Lines, In-Reply-To, Expires, and
-X-Newsreader are optional. If don't you want message to insert some
+User-Agent are optional. If don't you want message to insert some
header, remove it from this list."
:group 'message-news
:group 'message-headers
(defcustom message-required-mail-headers
'(From Subject Date (optional . In-Reply-To) Message-ID Lines
- (optional . X-Mailer))
+ (optional . User-Agent))
"*Headers to be generated or prompted for when mailing a message.
RFC822 required that From, Date, To, Subject and Message-ID be
-included. Organization, Lines and X-Mailer are optional."
+included. Organization, Lines and User-Agent are optional."
:group 'message-mail
:group 'message-headers
:type '(repeat sexp))
:group 'message-sending
:type 'sexp)
+;;; XXX: This symbol is overloaded! See below.
+(defvar message-user-agent nil
+ "String of the form of PRODUCT/VERSION. Used for User-Agent header field.")
+
;; Ignore errors in case this is used in Emacs 19.
;; Don't use ignore-errors because this is copied into loaddefs.el.
;;;###autoload
(Expires)
(Message-ID)
(References . message-fill-references)
- (X-Mailer)
- (X-Newsreader))
+ (User-Agent))
"Alist used for formatting headers.")
(eval-and-compile
(setq paragraph-separate paragraph-start)
(make-local-variable 'message-reply-headers)
(setq message-reply-headers nil)
- (make-local-variable 'message-newsreader)
- (make-local-variable 'message-mailer)
+ (make-local-variable 'message-user-agent)
(make-local-variable 'message-post-method)
(make-local-variable 'message-sent-message-via)
(setq message-sent-message-via nil)
(or mail-host-address
(message-make-fqdn)))
+(defun message-make-user-agent ()
+ "Return user-agent info."
+ (if message-user-agent
+ (save-excursion
+ (goto-char (point-min))
+ (let ((case-fold-search t)
+ user-agent beg p end)
+ (if (re-search-forward "^User-Agent:[ \t]*" nil t)
+ (progn
+ (setq beg (match-beginning 0)
+ p (match-end 0)
+ end (std11-field-end)
+ user-agent (buffer-substring p end))
+ (delete-region beg (1+ end))
+ (concat message-user-agent " " user-agent)
+ )
+ message-user-agent)))))
+
(defun message-generate-headers (headers)
"Prepare article HEADERS.
Headers already prepared in the buffer are not modified."
(To nil)
(Distribution (message-make-distribution))
(Lines (message-make-lines))
- (X-Newsreader message-newsreader)
- (X-Mailer (and (not (message-fetch-field "X-Newsreader"))
- message-mailer))
+ (User-Agent (message-make-user-agent))
(Expires (message-make-expires))
(case-fold-search t)
header value elem)