GNU bug report logs -
#20211
24.4; sendmail.el
Previous Next
Reported by: Richard Ryniker <ryniker <at> alum.mit.edu>
Date: Fri, 27 Mar 2015 02:06:02 UTC
Severity: normal
Merged with 21388,
25040
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20211 in the body.
You can then email your comments to 20211 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Fri, 27 Mar 2015 02:06:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Richard Ryniker <ryniker <at> alum.mit.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 27 Mar 2015 02:06:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In file lisp/mail/sendmail.el, in function sendmail-send-it,
if variable mail-interactive has been
changed from its default value t to nil, no errbuf is created.
On the last line of the sendmail-send-it function, errbuf is
used as the argument for switch-to-buffer-other-window, which
faults because errbuf is not a buffer in this case.
Patch to use the appropriate actual buffer when errbuf does not exist:
[ryniker <at> puget ryniker]$ diff -c tmp/sendmail.el sendmail.el
*** tmp/sendmail.el Thu Mar 26 20:42:09 2015
--- sendmail.el Thu Mar 26 20:07:32 2015
***************
*** 1302,1308 ****
(if (and (bufferp errbuf)
(not error))
(kill-buffer errbuf)
! (switch-to-buffer-other-window errbuf)))))
(autoload 'rmail-output-to-rmail-buffer "rmailout")
--- 1302,1308 ----
(if (and (bufferp errbuf)
(not error))
(kill-buffer errbuf)
! (switch-to-buffer-other-window (cond ((bufferp errbuf) errbuf) (t mailbuf)))))))
(autoload 'rmail-output-to-rmail-buffer "rmailout")
In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9)
of 2015-03-25 on puget
Windowing system distributor `Fedora Project', version 11.0.11404000
Important settings:
value of $LC_ALL: C
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
Major mode: Mail
Minor modes in effect:
shell-dirtrack-mode: t
display-time-mode: t
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
auto-fill-function: mail-mode-auto-fill
transient-mark-mode: t
abbrev-mode: t
Recent input:
g u n z i p SPC s e n d m <tab> <return> c p SPC <backspace>
<backspace> <backspace> m k d i <backspace> <backspace>
<backspace> <backspace> c o <backspace> <backspace>
<f7> <down> <down> <down> <up> d <up> <up> d <up> <up>
SPC c p SPC / u s r / l o c a l / s h a r e / e m a
c <tab> ; o <tab> <backspace> <backspace> l i <tab>
<backspace> i s <tab> <backspace> <backspace> <backspace>
<tab> 2 <tab> l i <tab> s e n d m <tab> <backspace>
<backspace> <backspace> <backspace> <backspace> m a
i <tab> s e n d m a i l . <tab> t m p / <return> g
u n z i p SPC t m p / s e n d m <tab> <return> d i
f f SPC - c SPC s e n d m <backspace> <backspace> <backspace>
<backspace> <backspace> t m p / s e n d m <tab> SPC
s e n d m a i <tab> <return> <help-echo> <f12> <f11>
<f6> <prior> M-x r e p o r t - e m a c <tab> <return>
s e n d m a i l . e l <return> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <down> <down>
<end> <backspace> <backspace> <backspace> <backspace>
m a i l / e m a <tab> <backspace> <backspace> <backspace>
<backspace> <f5> m a i l <return> C-s e m a c <return>
<f3> <home> C-k C-k C-c C-f C-f m a i l / e m a c <tab>
<return> <help-echo> <next> C-x k <return> <f7> <down>
<down> SPC m m e - g <down> M-x r e p o r t - e m a
c s - <tab> <return>
Recent messages:
Checking 48 files in /usr/local/share/emacs/24.4/lisp/emulation...
Checking 151 files in /usr/local/share/emacs/24.4/lisp/emacs-lisp...
Checking 24 files in /usr/local/share/emacs/24.4/lisp/cedet...
Checking 57 files in /usr/local/share/emacs/24.4/lisp/calendar...
Checking 87 files in /usr/local/share/emacs/24.4/lisp/calc...
Checking 95 files in /usr/local/share/emacs/24.4/lisp/obsolete...
Checking for load-path shadows...done
Beginning of buffer [6 times]
Mark saved where search started
<<< Type SPC or RET to bury the buffer list >>>
Load-path shadows:
/home/ryniker/sendmail hides /usr/local/share/emacs/24.4/lisp/mail/sendmail
Features:
(dired-aux shadow emacsbug mule-util pp help-mode misearch multi-isearch
qp mailalias rmailmm message format-spec rfc822 mml easymenu mml-sec
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse
rfc2231 shell pcomplete comint ansi-color ring dired time rmail sendmail
derived rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils
jka-compr ebuff-menu time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 100633 18476)
(symbols 48 19099 0)
(miscs 40 103 361)
(strings 32 15687 3595)
(string-bytes 1 442867)
(vectors 16 11317)
(vector-slots 8 407439 14817)
(floats 8 83 832)
(intervals 56 1627 522)
(buffers 960 19)
(heap 1024 48286 931))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Sat, 28 Mar 2015 10:00:06 GMT)
Full text and
rfc822 format available.
Message #8 received at 20211 <at> debbugs.gnu.org (full text, mbox):
> ! (switch-to-buffer-other-window (cond ((bufferp errbuf) errbuf) (t mailbuf)))))))
Do we really want to switch to a buffer when there was no error? I'd
think we should proceed as follows: If `errbuf' exists then if `error'
is non-nil switch to `errbuf' in another window and kill it otherwise.
Do nothing if `errbuf' does not exist. What do you think?
Thanks, martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Sat, 28 Mar 2015 13:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 20211 <at> debbugs.gnu.org (full text, mbox):
Your strategy is better. I focused too closely on simple avoidance of
the fault. In fact, I believe the test you want is already present in
the previous two lines. Tberefore, I think this does what you suggest:
*** 1302,1308 ****
(if (and (bufferp errbuf)
(not error))
(kill-buffer errbuf)
! (switch-to-buffer-other-window errbuf)))))
(autoload 'rmail-output-to-rmail-buffer "rmailout")
--- 1305,1312 ----
(if (and (bufferp errbuf)
(not error))
(kill-buffer errbuf)
! (if (bufferp errbuf)
! (switch-to-buffer-other-window errbuf))))))
(autoload 'rmail-output-to-rmail-buffer "rmailout")
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Sat, 28 Mar 2015 15:27:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 20211 <at> debbugs.gnu.org (full text, mbox):
> (if (and (bufferp errbuf)
> (not error))
> (kill-buffer errbuf)
> ! (if (bufferp errbuf)
> ! (switch-to-buffer-other-window errbuf))))))
Still slightly too complicated. We should be able to use the form
(bufferp errbuf)
once only, preferably starting with
(when (bufferp errbuf)
...
and avoid the "not" ;-)
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Sat, 28 Mar 2015 20:50:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 20211 <at> debbugs.gnu.org (full text, mbox):
> We should be able to use the form (bufferp errbuf) once only
I concur. Does the following look sensible to you? Should we endeavor
to confirm good behavior when mail-interactive is true and the
sendmail program fails?
*** 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")
--- 1302,1310 ----
(error "Sending...failed to %s"
(buffer-substring (point-min) (point-max)))))))
(kill-buffer tembuf)
! (when (bufferp errbuf)
! (if error (switch-to-buffer-other-window errbuf)
! (kill-buffer errbuf))))))
(autoload 'rmail-output-to-rmail-buffer "rmailout")
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Sun, 29 Mar 2015 11:21:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 20211 <at> debbugs.gnu.org (full text, mbox):
> Does the following look sensible to you?
Yes, thanks. Two minor nitpicks: I'd put a newline after
(if error
and use `buffer-live-p' instead of `bufferp'. Though it's not likely
someone might have killed errbuf in between and we want to avoid a
confusing error message in that case. And please provide a suitable
ChangeLog entry.
> Should we endeavor
> to confirm good behavior when mail-interactive is true and the
> sendmail program fails?
I'm not sure I understand you here. IIUC "when mail-interactive is true
and the sendmail program fails" we show the error. Don't we?
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Mon, 30 Mar 2015 15:05:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 20211 <at> debbugs.gnu.org (full text, mbox):
*** 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 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20211
; Package
emacs
.
(Mon, 30 Mar 2015 16:03:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 20211 <at> debbugs.gnu.org (full text, mbox):
> Proposed emacs-24.4/lisp/Changelog entry:
Even Emacs 24.5 is frozen now so I installed it in Emacs 25.1 as
d16fb74..d9eff02 master -> master
Please have a look. If we decide to release 24.6 we can backport it
there.
>> 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.
Yes but due to your patch we can switch to errbuf only if it is live so
the error should not happen any more.
Thanks, martin
bug marked as fixed in version 25.1, send any further explanations to
20211 <at> debbugs.gnu.org and Richard Ryniker <ryniker <at> alum.mit.edu>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 31 Aug 2015 20:21:01 GMT)
Full text and
rfc822 format available.
Forcibly Merged 20211 21388.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 31 Aug 2015 20:23:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 29 Sep 2015 11:24:04 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sun, 27 Nov 2016 15:17:02 GMT)
Full text and
rfc822 format available.
Forcibly Merged 20211 21388 25040.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sun, 27 Nov 2016 15:17:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 26 Dec 2016 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 173 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.