emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the default for `send-mail-function'


From: Lars Magne Ingebrigtsen
Subject: Re: Changing the default for `send-mail-function'
Date: Mon, 27 Jun 2011 00:05:29 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Christoph Scholtes <address@hidden> writes:

> On 6/26/2011 3:29 PM, Lars Magne Ingebrigtsen wrote:
>> (setq debug-on-quit t)
>
> Debugger entered--Lisp error: (quit)
>   accept-process-output(#<process smtpmail> 0 50)
>   network-stream-get-response(#<process smtpmail> 1 "^[0-9]+ .*\n")

Pretty much what I expected, and somewhat bewildering.  It's waiting for
"^[0-9]+ .*\n" in the buffer, and you said that the buffer contained:

220 mx.google.com ESMTP a9sm4719085icy.18

Was there a newline after that line?

This is the loop that's looking for the end of the greeting: 

    (with-current-buffer (process-buffer stream)
      (save-excursion
        (goto-char start)
        (while (and (memq (process-status stream) '(open run))
                    (not (re-search-forward end-of-command nil t)))
          (accept-process-output stream 0 50)
          (goto-char start))

I wonder whether you're hitting the never-chased-down obscure error
where `accept-process-output' changes the current buffer, which I've had
reports about once in a while from some users, but have never
understood.

Does the following hack make smtpmail.el work for you?

=== modified file 'lisp/net/network-stream.el'
*** lisp/net/network-stream.el  2011-06-26 21:05:06 +0000
--- lisp/net/network-stream.el  2011-06-26 22:04:17 +0000
***************
*** 305,310 ****
--- 305,311 ----
        (while (and (memq (process-status stream) '(open run))
                    (not (re-search-forward end-of-command nil t)))
          (accept-process-output stream 0 50)
+         (set-buffer (process-buffer stream))
          (goto-char start))
        ;; Return the data we got back, or nil if the process died.
        (unless (= start (point))

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]