diff options
| author | Grégoire Jadi | 2013-08-12 19:25:22 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2013-08-12 19:25:22 +0200 |
| commit | 7997a2f181ae0dc36726af0c8afbaf86595a8290 (patch) | |
| tree | 4a686de0b66aa20b9ef6609a0d1123f0fbe3de98 | |
| parent | 7699d09ec6f13ec0b864e82a8c59e56037628539 (diff) | |
| download | emacs-7997a2f181ae0dc36726af0c8afbaf86595a8290.tar.gz emacs-7997a2f181ae0dc36726af0c8afbaf86595a8290.zip | |
* mail/sendmail.el (sendmail-send-it): Don't kill the error buffer on error
This makes debugging easier.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 17 |
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa4d0289ee5..290af08f765 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-08-12 Grégoire Jadi <daimrod@gmail.com> | ||
| 2 | |||
| 3 | * mail/sendmail.el (sendmail-send-it): Don't kill the error buffer | ||
| 4 | if sending fails. This makes debugging easier. | ||
| 5 | |||
| 1 | 2013-08-12 Juanma Barranquero <lekktu@gmail.com> | 6 | 2013-08-12 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * xml.el (xml-parse-tag-1): Use looking-at (this reverts change in | 8 | * xml.el (xml-parse-tag-1): Use looking-at (this reverts change in |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index e1dee3295f2..4fdd75c68a6 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -1114,6 +1114,7 @@ external program defined by `sendmail-program'." | |||
| 1114 | (let ((errbuf (if mail-interactive | 1114 | (let ((errbuf (if mail-interactive |
| 1115 | (generate-new-buffer " sendmail errors") | 1115 | (generate-new-buffer " sendmail errors") |
| 1116 | 0)) | 1116 | 0)) |
| 1117 | (error nil) | ||
| 1117 | (tembuf (generate-new-buffer " sendmail temp")) | 1118 | (tembuf (generate-new-buffer " sendmail temp")) |
| 1118 | (multibyte enable-multibyte-characters) | 1119 | (multibyte enable-multibyte-characters) |
| 1119 | (case-fold-search nil) | 1120 | (case-fold-search nil) |
| @@ -1278,10 +1279,13 @@ external program defined by `sendmail-program'." | |||
| 1278 | (exit-value (apply 'call-process-region args))) | 1279 | (exit-value (apply 'call-process-region args))) |
| 1279 | (cond ((or (null exit-value) (eq 0 exit-value))) | 1280 | (cond ((or (null exit-value) (eq 0 exit-value))) |
| 1280 | ((numberp exit-value) | 1281 | ((numberp exit-value) |
| 1282 | (setq error t) | ||
| 1281 | (error "Sending...failed with exit value %d" exit-value)) | 1283 | (error "Sending...failed with exit value %d" exit-value)) |
| 1282 | ((stringp exit-value) | 1284 | ((stringp exit-value) |
| 1285 | (setq error t) | ||
| 1283 | (error "Sending...terminated by signal: %s" exit-value)) | 1286 | (error "Sending...terminated by signal: %s" exit-value)) |
| 1284 | (t | 1287 | (t |
| 1288 | (setq error t) | ||
| 1285 | (error "SENDMAIL-SEND-IT -- fall through: %S" exit-value)))) | 1289 | (error "SENDMAIL-SEND-IT -- fall through: %S" exit-value)))) |
| 1286 | (or fcc-was-found | 1290 | (or fcc-was-found |
| 1287 | (error "No recipients"))) | 1291 | (error "No recipients"))) |
| @@ -1290,12 +1294,15 @@ external program defined by `sendmail-program'." | |||
| 1290 | (goto-char (point-min)) | 1294 | (goto-char (point-min)) |
| 1291 | (while (re-search-forward "\n\n* *" nil t) | 1295 | (while (re-search-forward "\n\n* *" nil t) |
| 1292 | (replace-match "; ")) | 1296 | (replace-match "; ")) |
| 1293 | (if (not (zerop (buffer-size))) | 1297 | (unless (zerop (buffer-size)) |
| 1294 | (error "Sending...failed to %s" | 1298 | (setq error t) |
| 1295 | (buffer-substring (point-min) (point-max))))))) | 1299 | (error "Sending...failed to %s" |
| 1300 | (buffer-substring (point-min) (point-max))))))) | ||
| 1296 | (kill-buffer tembuf) | 1301 | (kill-buffer tembuf) |
| 1297 | (if (bufferp errbuf) | 1302 | (if (and (bufferp errbuf) |
| 1298 | (kill-buffer errbuf))))) | 1303 | (not error)) |
| 1304 | (kill-buffer errbuf) | ||
| 1305 | (switch-to-buffer-other-window errbuf))))) | ||
| 1299 | 1306 | ||
| 1300 | (autoload 'rmail-output-to-rmail-buffer "rmailout") | 1307 | (autoload 'rmail-output-to-rmail-buffer "rmailout") |
| 1301 | 1308 | ||