From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: smtpmail.el and 1msg Date: 11 Mar 2004 14:11:16 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <16455.40870.198614.821339@freezer.sbum.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079157784 29900 80.91.224.253 (13 Mar 2004 06:03:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Mar 2004 06:03:04 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Mar 13 07:02:56 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B22Ea-00021H-00 for ; Sat, 13 Mar 2004 07:02:56 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B22Ea-0002Cm-00 for ; Sat, 13 Mar 2004 07:02:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B21Sr-0004mz-0r for emacs-devel@quimby.gnus.org; Sat, 13 Mar 2004 00:13:37 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B21Gj-0002rt-Do for emacs-devel@gnu.org; Sat, 13 Mar 2004 00:01:05 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B1dsG-0004ax-Da for emacs-devel@gnu.org; Thu, 11 Mar 2004 23:02:47 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1Vac-0005QA-FV for emacs-devel@gnu.org; Thu, 11 Mar 2004 14:11:30 -0500 Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 6AA17204EC; Thu, 11 Mar 2004 14:11:16 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 5624A8C8E4; Thu, 11 Mar 2004 14:11:16 -0500 (EST) Original-To: Simon Josefsson In-Reply-To: Original-Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-1.524, requis 5, BAYES_01 -1.52) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20376 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20376 >> While I think it's good to add support for 1msg, I also think it would be >> worthwhile to fix the spinning problem. After all, if the other end closes >> the connection, we should detect it. Do we? If `no' why not and if `yes' >> why does it spin? > Detecting closed connections, during the spin loop, was the intention > of my patch. They weren't detected before. What do you think? Yes, I've now seen your patch, looks fine. > (while (not (search-forward "\r\n" nil t)) > (unless (memq (process-status process) '(open run)) > (throw 'done nil)) > (accept-process-output process) > (goto-char smtpmail-read-point)) Isn't it possible to just check the return value of accept-process-output? Something like (while (not (search-forward "\r\n" nil t) (unless (accept-process-output process) (throw 'done nil)) (goto-char smtpmail-read-point)) -- Stefan