GNU bug report logs - #25040
24.5; setting mail-interactive to nil causes error while sending

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Sun, 27 Nov 2016 00:23:02 UTC

Severity: normal

Merged with 20211, 21388

Found in versions 24.4, 24.4.50, 24.5

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Francesco Potortì <pot <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 25040 <at> debbugs.gnu.org, Francesco Potortì <pot <at> gnu.org>
Subject: bug#25040: 24.5; setting mail-interactive to nil causes error while sending
Date: Sun, 27 Nov 2016 16:00:27 +0100
>> In sendmail.el I find this:
>>
>> ================
>> (defun sendmail-send-it ()
>>   "Send the current mail buffer using the Sendmail package.
>> This is a suitable value for `send-mail-function'.  It sends using the
>> external program defined by `sendmail-program'."
>>   (require 'mail-utils)
>>   (let ((errbuf (if mail-interactive
>>                     (generate-new-buffer " sendmail errors")
>>                   0))
>> ================
>>
>> However, the final 0 makes no sense to me, and in fact it generates an
>> error when sending mail if mail-interactive is set to nil.
>>
>> Changing the 0 to nil apparently corrects the problem.
>
>Can you show the error backtrace? It looks like errbuf is unused when
>mail-interactive is nil except for the call to call-process-region
>where it acts as the BUFFER argument
>
>    Insert output in BUFFER before point; t means current buffer; nil for
>     BUFFER means discard it; 0 means discard and don’t wait

I was too hasty, sorry about that.  Anyway, the problem exists, but it
is different from what I have told.  0 can be put back there.

Apparently this change at the end of the functions fixes the bug:

1302,1305c1302,1305
<       (if (and (bufferp errbuf)
<                (not error))
<           (kill-buffer errbuf)
<         (switch-to-buffer-other-window errbuf)))))
---
>       (when (bufferp errbuf)
> 	(if (not error)
> 	    (kill-buffer errbuf)
> 	  (switch-to-buffer-other-window errbuf))))))




This bug report was last modified 8 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.