Subject: bug#8595: 24.0.50; cannot send bug report with emacs -nw

From: Andy Moreton <[email-masked]>
Date: Sun, 01 May 2011 18:11:10 +0100

On Sat 30 Apr 2011, Eli Zaretskii wrote:

>> From: "Drew Adams" <[email-masked]>
>> Cc: <[email-masked]>
>> Date: Sat, 30 Apr 2011 10:51:04 -0700
>> 
>> > What is your value of send-mail-function in the session that fails
>> > like that?
>> 
>> send-mail-function is a variable defined in `sendmail.el'.
>> Its value is sendmail-send-it
>
> That's the culprit, it should be mailclient-send-t.  I will try to
> figure out why it doesn't happen in "emacs -nw".

Looking in sendmail.el:
--8<---------------cut here---------------start------------->8---
;; Prevent problems with `window-system' not having the correct value
;; when loaddefs.el is loaded. `custom-reevaluate-setting' needs the
;; standard value.
;;;###autoload
(put 'send-mail-function 'standard-value
     '((if (and window-system (memq system-type '(darwin windows-nt)))
	   'mailclient-send-it
	 'sendmail-send-it)))

;; Useful to set in site-init.el
;;;###autoload
(defcustom send-mail-function
  (if (and window-system (memq system-type '(darwin windows-nt)))
      'mailclient-send-it
    'sendmail-send-it)
--8<---------------cut here---------------end--------------->8---

So the question seems to be why is mailclient-send-it preferred only
when window-system is non-nil ?

    AndyM