Subject: bug#21388: 24.4.50; Wrong type argument in sendmail-send-it w/o mail-interactive

From: Ken Olum <[email-masked]>
Date: Mon, 31 Aug 2015 16:13:04 -0400

emacs -Q
M-x set-variable
mail-interactive
nil
C-x m
... compose message ...
C-c C-c
Answer "transport" to "Send mail via:"
Get error "Wrong type argument: stringp, 0"

The problem is that at the beginning of sendmail.el, errbuf is bound to
0 intead of NIL when mail-interactive is not set, so at the end it tries
to switch to buffer 0.

In GNU Emacs 24.4.50.6 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2014-09-05 on cosmos
Repository revision: 115765 [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Ubuntu 12.04.5 LTS

Configured features:
XPM JPEG TIFF GIF PNG SOUND NOTIFY LIBXML2 FREETYPE XFT ZLIB

Important settings:
  value of $LC_ALL: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: nil

Major mode: Shell

Minor modes in effect:
  t: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
- i C-a C-x b <return> C-x b s e n d <tab> <return> 
C-n C-n C-s e r r b C-s C-s C-s C-n C-p C-n C-n C-e 
C-M-b C-M-f C-n C-u C-v C-p C-p C-n C-n M-. <return> 
C-x b <return> C-M-a C-x 1 C-s e r r b C-s C-s C-s 
C-a M-: C-g <down-mouse-1> <mouse-1> <down-mouse-3> 
<mouse-3> M-: <down-mouse-2> <mouse-2> SPC n i l ) 
<return> M-f M-f C-h v <return> C-h f <return> C-x 
o C-x b <return> <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <mouse-1> C-M-a C-s e r r b u f C-s 
C-x b m a i n <return> e <backspace> C-S-q C-z <return> 
b g <return> e a m c s SPC <backspace> <backspace> 
<backspace> <backspace> <backspace> m a c s SPC - Q 
<return> C-x r . p n C-x 1 p SPC SPC SPC . p M-< p 
n q C-c C-c M-C C-x b * D e <tab> <backspace> <backspace> 
d <tab> e <tab> b <tab> <backspace> <backspace> <backspace> 
<backspace> d e b u g <return> <backspace> <backspace> 
<backspace> <backspace> <backspace> b a c k <tab> C-g 
C-x C-b C-x o C-s * C-s C-s C-s C-s C-s <return> C-x 
b B a <tab> <return> c C-x 1 . n n n d t t d C-e d 
C-e d C-e d C-e d C-e d d d p p p q C-x b <return> 
C-x k <return> M-x c l e a r <backspace> <backspace> 
<backspace> <backspace> a n c e l - d e <return> <return> 
M-p M-p M-n <return> M-x r e p o r t - e m a c s - 
b u g <return> C-g M-p <return> M-x r e p o r t - e 
m a c s - b u g <return>

Recent messages:
Making completion list... [3 times]
Quit
Mark saved where search started
Continuing.
Wrong type argument: stringp, 0
No following nondeleted message
Expunging deleted messages...done
Saving file /home/kdo/mail/inbox...
Wrote /home/kdo/mail/inbox [2 times]
Canceling debug-on-entry for all functions
Quit

Load-path shadows:
None found.

Features:
(shadow emacsbug pp find-func mailalias debug fortran cus-edit cus-start
cus-load log-view pcmpl-cvs vc-dir ewoc vc-bzr rect conf-mode doc-view
ps-mode vc-rcs compare-w find-dired python json view diff novice
log-edit pcvs-util add-log tmm unrmail image-mode cc-langs cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs nroff-mode vc vc-dispatcher edmacro lpr ispell dired-aux grep
sh-script smie executable rmailkwd parse-time vc-cvs apropos mule-util
etags rmailsum rmailedit undigest bibtex rmailout sgml-mode pcmpl-gnu
dabbrev pcmpl-unix two-column kmacro iso-transl help-mode tabify imenu
man qp mailman rmail-render-highlight rmail-query-reply-to
rmail-physics-list rmail-bapc rmail-highlight-body rmail-hack-message
rmail-order-headers nnmail gnus-int gnus-range mail-source gnus gnus-ems
nnheader wid-edit sendmail mail-extr sort mailcap gnus-util jka-compr
ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init
ediff-util ediff info misearch multi-isearch tex-mode compile latexenc
rmailmm message dired format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail
rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils shell
pcomplete diff-mode easy-mmode thingatpt browse-url math derived
inf-lisp easymenu comint ansi-color ring warnings cl-macs cl gv
cl-loaddefs cl-lib 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 inotify
dynamic-setting font-render-setting x-toolkit x multi-tty emacs)

Memory information:
((conses 16 1217849 131757)
 (symbols 48 35427 0)
 (miscs 40 24361 19221)
 (strings 32 83955 18686)
 (string-bytes 1 2338170)
 (vectors 16 36555)
 (vector-slots 8 1615309 208850)
 (floats 8 166 846)
 (intervals 56 217923 10812)
 (buffers 976 337)
 (heap 1024 199738 93899))