From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79789 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: Re: [Workaround/Solved] This bug is killing me! Date: Tue, 30 Aug 2011 20:17:39 +0200 Message-ID: <8739giahmk.fsf@thinkpad.tsdh.de> References: <87pqjnqt5k.fsf@thinkpad.tsdh.de> <87y5ybp5hw.fsf@thinkpad.tsdh.de> <87ty8zp2mr.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1314728293 10646 80.91.229.12 (30 Aug 2011 18:18:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2011 18:18:13 +0000 (UTC) Cc: ding@gnus.org, John Wiegley To: Dave Abrahams Original-X-From: ding-owner+M28083@lists.math.uh.edu Tue Aug 30 20:17:58 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QySsl-00087l-Ig for ding-account@gmane.org; Tue, 30 Aug 2011 20:17:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1QySsg-0001RN-IF; Tue, 30 Aug 2011 13:17:50 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1QySsf-0001RA-BH for ding@lists.math.uh.edu; Tue, 30 Aug 2011 13:17:49 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1QySsb-000779-Tm for ding@lists.math.uh.edu; Tue, 30 Aug 2011 13:17:48 -0500 Original-Received: from out3.smtp.messagingengine.com ([66.111.4.27]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QySsZ-0003Pn-W8 for ding@gnus.org; Tue, 30 Aug 2011 20:17:44 +0200 Original-Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.messagingengine.com (Postfix) with ESMTP id C45F3203B7; Tue, 30 Aug 2011 14:17:42 -0400 (EDT) Original-Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 30 Aug 2011 14:17:42 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=ehekeerh58eMQxNlgOuW7RKU5Ok=; b=Im96fcr/7tUnIR78Ug3WDt3mWCr7 CEFkYiHskUweKtTZajrhHS8FyOXSxDsCpkbiartKnjoKkSLCf8WZJ/J7u5LC9ZpO SI7g5/UN+yQoSssyIY2ePBSKdBlB9totesfuufMhzyCbS9F8GNRWkPqjHgBtxAcj su0FnebhJlO0leY= X-Sasl-enc: lFVeSblEHVrm9elAxfawLtgSswM+6VNMoz6ATA+MS+Hy 1314728262 Original-Received: from thinkpad.tsdh.de (91-67-169-145-dynip.superkabel.de [91.67.169.145]) by mail.messagingengine.com (Postfix) with ESMTPSA id 91EA8AA007D; Tue, 30 Aug 2011 14:17:41 -0400 (EDT) In-Reply-To: (Dave Abrahams's message of "Tue, 30 Aug 2011 10:09:02 -0800") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79789 Archived-At: Dave Abrahams writes: >>> I have this additional change, which avoids pathological regexp >>> behavior: >>> >>> diff --git a/lisp/nnimap.el b/lisp/nnimap.el >>> index 2dbc465..5b7d253 100644 >>> --- a/lisp/nnimap.el >>> +++ b/lisp/nnimap.el >>> @@ -190,7 +190,7 @@ textual parts.") >>> (let (article bytes lines size string) >>> (block nil >>> (while (not (eobp)) >>> - (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)")) >>> + (while (not (looking-at "\\* [0-9]+ FETCH.+?UID \\([0-9]+\\)")) >>> (delete-region (point) (progn (forward-line 1) (point))) >>> (when (eobp) >>> (return))) >> >> Hm, so you use the non-greedy variant of ".+". That should make a >> difference only if there a lines like >> >> * 939393 FETCH something here UID 918823 UID 191929 >> >> i.e. the string UID followed by a number occurs more than once. > > Not necessarily. On a really long line the original has to search to > the end before it can accept the match at the beginning, even if the > string appears only once. I reported this bug 9 days ago; full details > are here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9338 Thanks. In fact, I can reproduce that stack overflow here. Bye, Tassilo