all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Ryniker <ryniker@alum.mit.edu>
To: martin rudalics <rudalics@gmx.at>
Cc: 20211@debbugs.gnu.org
Subject: bug#20211: 24.4; sendmail.el
Date: Mon, 30 Mar 2015 11:04:14 -0400	[thread overview]
Message-ID: <E1YcbEc-0005b6-9o@ryniker.ods.org> (raw)
In-Reply-To: <5517DFEE.9010408@gmx.at> (rudalics@gmx.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  <ryniker@alum.mit.edu>

	* 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.





  reply	other threads:[~2015-03-30 15:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27  1:08 bug#20211: 24.4; sendmail.el Richard Ryniker
2015-03-28  9:59 ` martin rudalics
2015-03-28 13:51   ` Richard Ryniker
2015-03-28 15:26     ` martin rudalics
2015-03-28 20:49       ` Richard Ryniker
2015-03-29 11:20         ` martin rudalics
2015-03-30 15:04           ` Richard Ryniker [this message]
2015-03-30 16:02             ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1YcbEc-0005b6-9o@ryniker.ods.org \
    --to=ryniker@alum.mit.edu \
    --cc=20211@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.