From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Maus Newsgroups: gmane.emacs.help Subject: Re: Question on re-search-forward and infinite loop Date: Mon, 30 Nov 2009 09:24:34 +0100 Message-ID: <87zl64mnct.wl%maus.david@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1259569555 29518 80.91.229.12 (30 Nov 2009 08:25:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 08:25:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 30 09:25:48 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NF1Zo-0000gZ-31 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 09:25:44 +0100 Original-Received: from localhost ([127.0.0.1]:41974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF1Zn-0006WB-Ev for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 03:25:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NF1ZR-0006W6-BH for help-gnu-emacs@gnu.org; Mon, 30 Nov 2009 03:25:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NF1ZP-0006Vm-E5 for help-gnu-emacs@gnu.org; Mon, 30 Nov 2009 03:25:19 -0500 Original-Received: from [199.232.76.173] (port=58310 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF1ZP-0006Vj-4E for help-gnu-emacs@gnu.org; Mon, 30 Nov 2009 03:25:19 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.155]:40693) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NF1ZP-0006Rm-2x for help-gnu-emacs@gnu.org; Mon, 30 Nov 2009 03:25:19 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so1029580fgb.12 for ; Mon, 30 Nov 2009 00:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:from:to :newsgroups:subject:in-reply-to:references:user-agent:mime-version :content-type; bh=EuMgWGtiEXDZ7spgreZTKTBnH+SghCm2cj74H+YbvZQ=; b=stMgzPtRt4ik3EUDNYF09lRljhNAL86So7p7ih0EObXYEvJpZfARomu0BoOPC4P8iE vMPotlucxE2NOuMpeoccXXiTp8Ir/z6kyghSegXTdMnSN2x4htNRY8u2lH6X3Ko7yJW2 Dcu5VDMDZHWNvrbEi/hvHAQP8Iw3gpFcyfJKo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:newsgroups:subject:in-reply-to:references :user-agent:mime-version:content-type; b=IGs/eKNFy/j/iVKo+hpv73CbCcGBSUmyGWSjMV6MXmc9HNs0TE89M1yjqLTs3IZjvv ZD9j7+MFsBzDPjrAwFEWA3JDrbT9u/F1Qb1c+62gyDVyEwMSanOgEi1VT62klgN2PMub Fro1CsFDPTc7oTglMLlVvz5l3A5SmRKipoRTA= Original-Received: by 10.86.88.20 with SMTP id l20mr3834599fgb.14.1259569517539; Mon, 30 Nov 2009 00:25:17 -0800 (PST) Original-Received: from thinkpad.gmail.com ([89.246.181.82]) by mx.google.com with ESMTPS id 12sm9800736fgg.17.2009.11.30.00.25.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Nov 2009 00:25:16 -0800 (PST) Original-Newsgroups: gnu.emacs.help In-Reply-To: User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1.50 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70245 Archived-At: Hi there, At Thu, 26 Nov 2009 18:17:16 -0500, Barry Margolin wrote: > > Your regexp matches zero or more whitespace characters at the beginning > of a line. If there's an empty line at the end of the buffer, it will > match that. But since it's a zero-length match, point is left at that > position, and the next time around it again matches it. > > In general, whenever a regexp can match a zero-length string, I think > that type of loop will go infinitely. Thanks, this makes perfect sense to me. Regards, -- David -- OpenPGP... 0x316F4BE4670716FD Jabber.... dmjena@jabber.org Email..... maus.david@gmail.com ICQ....... 241051416