unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: emacs-devel@gnu.org
Subject: Re: smtpmail.el and 1msg
Date: Thu, 11 Mar 2004 00:11:56 +0100	[thread overview]
Message-ID: <ilud67ki9fn.fsf@latte.josefsson.org> (raw)
In-Reply-To: <16463.40766.614760.193678@freezer.sbum.org> (Jonathan Glauner's message of "Wed, 10 Mar 2004 17:05:34 -0600")

Jonathan Glauner <jglauner@sbum.org> writes:

>   > Does this patch help?  If not, can you pinpoint exactly
>   > where does smtpmail.el hang, using (setq debug-on-quit t) and
>   > pressing C-g when it spins?
>
> The patch didn't help, and here's the backtrace from C-g:
>
> --SNIP--
>
> Debugger entered--Lisp error: (quit)
>   accept-process-output(#<process SMTP>)
>   smtpmail-read-response(#<process SMTP>)

How about this, then?  It add a timeout to the accept-process-output
call.

I thought accept-process-output was supposed to return if the process
died, though.  Are you using Windows or Macintosh?  I recall some
process related problems on those systems.

--- smtpmail.el.~1.65.~	2004-02-11 13:34:59.000000000 +0100
+++ smtpmail.el	2004-03-11 00:10:33.000000000 +0100
@@ -1,6 +1,6 @@
 ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail
 
-;; Copyright (C) 1995, 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
 ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
 ;; Maintainer: Simon Josefsson <simon@josefsson.org>
@@ -778,11 +778,13 @@
 	(response-continue t)
 	(return-value '(nil ()))
 	match-end)
-
+    (catch 'done
     (while response-continue
       (goto-char smtpmail-read-point)
       (while (not (search-forward "\r\n" nil t))
-	(accept-process-output process)
+	  (unless (memq (process-status process) '(open run))
+	    (throw 'done nil))
+	  (accept-process-output process 1)
 	(goto-char smtpmail-read-point))
 
       (setq match-end (point))
@@ -817,10 +819,8 @@
 	    (setq smtpmail-read-point match-end)
 	    (setq response-continue nil)
 	    (setq return-value
-		  (cons nil (nreverse response-strings)))
-	    )
-	  )))
-    (setq smtpmail-read-point match-end)
+		    (cons nil (nreverse response-strings)))))))
+      (setq smtpmail-read-point match-end))
     return-value))

  reply	other threads:[~2004-03-10 23:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04 21:29 smtpmail.el and 1msg jglauner
2004-03-08 16:51 ` Simon Josefsson
2004-03-09 22:36   ` Simon Josefsson
2004-03-10 18:15     ` jglauner
2004-03-10 22:51       ` Simon Josefsson
2004-03-10 23:05         ` Jonathan Glauner
2004-03-10 23:11           ` Simon Josefsson [this message]
2004-03-10 23:24             ` Jonathan Glauner
2004-03-10 23:38             ` Jonathan Glauner
2004-03-11 10:54               ` Simon Josefsson
2004-03-12 13:42           ` Stefan Monnier
2004-03-11 14:37   ` Stefan Monnier
2004-03-11 18:52     ` Simon Josefsson
2004-03-11 19:11       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ilud67ki9fn.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).