Kai.Grossjohann(a)CS.Uni-Dortmund.DE (Kai Großjohann) writes:
Simon Josefsson <jas(a)extundo.com> writes:
> I found the patch, but does it work? I think it needs the same patch as
> sendmail.el as well, otherwise call-process-region will never return
> anything useful. Of course, that message.el duplicates code from
> sendmail.el so we need to fix both can probably be considered a bug in
> itself. Sigh. I'll commit the same patch to sendmail.el in mail-lib and
> Emacs.
>
> --- message.el.~6.230.~ Wed Jun 5 12:06:29 2002
> +++ message.el Wed Jun 5 13:11:40 2002
> @@ -2968,7 +2968,7 @@
> (let ((errbuf (if message-interactive
> (message-generate-new-buffer-clone-locals
> " sendmail errors")
> - 0))
> + nil))
> resend-to-addresses delimline)
> (let ((case-fold-search t))
> (save-restriction
I also think this might be needed. But this kind of defeats the
variable message-interactive. With your change, setting the variable
to nil still means the user has to wait. Presumably, the idea behind
message-interactive was to make things faster?
Oops. So this ignoring of errors are actually a feature. I think the
default of `message-interactive' should be non-nil, making Gnus wait
for errors.
The complete patch now is (against Oort Gnus). Does it work?
message.el in (X)Emacs need to be patched, as does sendmail.el in
(X)Emacs.
Index: message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.228
diff -u -p -u -w -r6.228 message.el
--- message.el 2002/04/21 02:42:45 6.228
+++ message.el 2002/06/05 17:12:39
@@ -258,7 +258,7 @@ any confusion."
:type 'string
:group 'message-various)
-(defcustom message-interactive nil
+(defcustom message-interactive t
"Non-nil means when sending a message wait for and display errors.
nil means let mailer mail back a message to report errors."
:group 'message-sending
@@ -2993,6 +2993,7 @@ If you always want Gnus to send messages
(erase-buffer))))
(let ((default-directory "/")
(coding-system-for-write message-send-coding-system))
+ (let ((cpr
(apply 'call-process-region
(append (list (point-min) (point-max)
(if (boundp 'sendmail-program)
@@ -3015,7 +3016,9 @@ If you always want Gnus to send messages
;; For a resend, include the specific addresses.
(if resend-to-addresses
(list resend-to-addresses)
- '("-t")))))
+ '("-t"))))))
+ (unless (or (null cpr) (zerop cpr))
+ (error "Sending...failed: %s" cpr))))
(when message-interactive
(save-excursion
(set-buffer errbuf)