From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Infinite loop in pop3-retr Date: Fri, 27 May 2011 09:55:40 -0300 Message-ID: References: <4dde12c597bf00.88976681@wp.pl> <87d3j4lc7u.fsf@vitiris.tt.com.pl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306500964 28268 80.91.229.12 (27 May 2011 12:56:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 May 2011 12:56:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tomasz Gajewski Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 14:55:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QPwZy-000140-8N for ged-emacs-devel@m.gmane.org; Fri, 27 May 2011 14:55:50 +0200 Original-Received: from localhost ([::1]:37834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPwZx-000327-Uh for ged-emacs-devel@m.gmane.org; Fri, 27 May 2011 08:55:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPwZv-00031z-Cm for emacs-devel@gnu.org; Fri, 27 May 2011 08:55:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPwZu-00051n-Iq for emacs-devel@gnu.org; Fri, 27 May 2011 08:55:47 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:43777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPwZu-00051j-HJ for emacs-devel@gnu.org; Fri, 27 May 2011 08:55:46 -0400 Original-Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:9749 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QPwZt-0003ru-2X; Fri, 27 May 2011 08:55:45 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 107A16610E; Fri, 27 May 2011 09:55:40 -0300 (ART) In-Reply-To: <87d3j4lc7u.fsf@vitiris.tt.com.pl> (Tomasz Gajewski's message of "Fri, 27 May 2011 11:33:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139762 Archived-At: > (set-buffer (process-buffer process)) > (while (and (not (re-search-forward "^\\.\r\n" nil t)) > (member (process-status process) > (list 'run 'stop 'open > 'listen 'connect))) > (pop3-accept-process-output process) > (goto-char start)) Sounds about right (your `list' can be simplified to '(run stop open listen connect) and `memq' can be used instead of `member' tho it won't make much of a difference). But I'd expect the code after the `while' loop would need to be checked to see if it handles the case where we stopped before finding "^\\.\r\n". > Firstly, I think that probably there is a simpler way to check if > process is active than by testing process status but I don't know that. Actually, no, this is the way to do it. > Can someone with more experience update this code (or maybe say that it > is not required)? > Should I sent a bug report with those informations somewhere (gnus bugs > list, emacs bugs list) or is it sufficient leave it here? Gnus's bugs list is probably the best place, yes. Stefan