From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Ryniker Newsgroups: gmane.emacs.bugs Subject: bug#20211: 24.4; sendmail.el Date: Mon, 30 Mar 2015 11:04:14 -0400 Message-ID: References: <55167B8B.6030203@gmx.at> <5516C81B.3040400@gmx.at> <5517DFEE.9010408@gmx.at> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1427727940 20429 80.91.229.3 (30 Mar 2015 15:05:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Mar 2015 15:05:40 +0000 (UTC) Cc: 20211@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 30 17:05:22 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YcbFZ-00025D-Cp for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Mar 2015 17:05:13 +0200 Original-Received: from localhost ([::1]:34508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcbFY-00012N-R6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Mar 2015 11:05:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcbFV-00010A-5G for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2015 11:05:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcbFP-0002yj-EY for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2015 11:05:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcbFP-0002yL-BA for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2015 11:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YcbFP-0002OU-0X for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2015 11:05:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Ryniker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Mar 2015 15:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20211 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20211-submit@debbugs.gnu.org id=B20211.14277278639137 (code B ref 20211); Mon, 30 Mar 2015 15:05:02 +0000 Original-Received: (at 20211) by debbugs.gnu.org; 30 Mar 2015 15:04:23 +0000 Original-Received: from localhost ([127.0.0.1]:40598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcbEk-0002NI-PG for submit@debbugs.gnu.org; Mon, 30 Mar 2015 11:04:23 -0400 Original-Received: from ryniker.ods.org ([71.83.60.62]:47232) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcbEi-0002N1-43 for 20211@debbugs.gnu.org; Mon, 30 Mar 2015 11:04:20 -0400 Original-Received: from ryniker by ryniker.ods.org with local (Exim 4.80.1) (envelope-from ) id 1YcbEc-0005b6-9o; Mon, 30 Mar 2015 11:04:14 -0400 In-reply-to: <5517DFEE.9010408@gmx.at> (rudalics@gmx.at) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101049 Archived-At: *** emacs-24.4/lisp/mail/sendmail.el Fri Mar 21 01:34:40 2014 --- /home/ryniker/sendmail.el Sun Mar 29 17:14:53 2015 *************** *** 1299,1308 **** (error "Sending...failed to %s" (buffer-substring (point-min) (point-max))))))) (kill-buffer tembuf) ! (if (and (bufferp errbuf) ! (not error)) ! (kill-buffer errbuf) ! (switch-to-buffer-other-window errbuf))))) (autoload 'rmail-output-to-rmail-buffer "rmailout") --- 1299,1308 ---- (error "Sending...failed to %s" (buffer-substring (point-min) (point-max))))))) (kill-buffer tembuf) ! (when (buffer-live-p errbuf) ! (if error ! (switch-to-buffer-other-window errbuf) ! (kill-buffer errbuf)))))) (autoload 'rmail-output-to-rmail-buffer "rmailout") Proposed emacs-24.4/lisp/Changelog entry: 2015-03-29 Richard Ryniker * mail/sendmail.el (sendmail-send-it): Do not attempt to switch to non-existent buffer. (errbuf is not created when customization variable mail-interactive is nil.) >IIUC "when mail-interactive is true and the sendmail program fails" we >show the error. Don't we? I do not know. I believe this patch only changes the sendmail.el logic in the mail-interactive true case to use buffer-live-p instead of bufferp. The error I encountered occurs only when mail-interactive is nil: in this case, errbuf is never created and the attempt to switch to the non-existant buffer causes a fault. What errors a Mail User Agent reports synchronously, and what errors are reported asynchronously via mail from the Mail Transfer Agent, must depend on the programs actually used. In my case (using exim) all errors I have encountered (unknown recipient, malformed address, etc.) seem to be reported asynchronously by the MTA. To directly test mail-intereactive true, I should have to concoct some test sendmail program that delivers errors as desired. Not difficult; I can do this if you think it useful.