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: Question on re-search-forward and infinite loop Date: Thu, 26 Nov 2009 22:01:04 +0100 Message-ID: <874oohxapb.wl%maus.david@gmail.com> 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 1259269456 5276 80.91.229.12 (26 Nov 2009 21:04:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2009 21:04:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 26 22:04:09 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 1NDlVZ-0008Je-0d for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 22:04:09 +0100 Original-Received: from localhost ([127.0.0.1]:38266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDlVY-0004h5-NT for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Nov 2009 16:04:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDlSl-0001yt-Ez for help-gnu-emacs@gnu.org; Thu, 26 Nov 2009 16:01:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDlSg-0001tQ-Lc for help-gnu-emacs@gnu.org; Thu, 26 Nov 2009 16:01:14 -0500 Original-Received: from [199.232.76.173] (port=43636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDlSg-0001tE-7L for help-gnu-emacs@gnu.org; Thu, 26 Nov 2009 16:01:10 -0500 Original-Received: from mail-bw0-f215.google.com ([209.85.218.215]:45426) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDlSf-0003uM-R1 for help-gnu-emacs@gnu.org; Thu, 26 Nov 2009 16:01:10 -0500 Original-Received: by bwz7 with SMTP id 7so21527bwz.26 for ; Thu, 26 Nov 2009 13:01:08 -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 :subject:user-agent:mime-version:content-type; bh=kmJtFfJH9bF7x1wrzDS+KYJPFHWbES/FSpGtNK+Hj38=; b=gI6rzL7h7vz0SVAbi1AN/baZBY1pFPvU6QBXuykuFFWemN8qRAjDCe2J6Kj4KfIMyV on/67Xjmeilx+Bf1MSQe4LPudh+m9F8sGvHk+EStPia3SXGv8r/cl4cvlLiREV1HRkoe l7qvTnYMnU6/j8pwJFGlk35OxEqrlWsFgreRE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:subject:user-agent:mime-version :content-type; b=byme3nUH7jJrkrAt42gppnYsxu90tvart62r4eZ/5q96wjw/VAmgVZp7oZM13LsulA nPFydLY/cxMoj+JUySOdLYz98zw1GDYofjYradXvyoUo3KfolO6ujWyU9/VgOrYbrz3n xAM4Knmh4fglmcM7xV48husFj3hloArMyuzag= Original-Received: by 10.204.23.77 with SMTP id q13mr221089bkb.136.1259269267867; Thu, 26 Nov 2009 13:01:07 -0800 (PST) Original-Received: from thinkpad.gmail.com ([88.130.165.235]) by mx.google.com with ESMTPS id 15sm350644fxm.14.2009.11.26.13.01.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Nov 2009 13:01:07 -0800 (PST) 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:70157 Archived-At: Hi, By accident I stumpled on a way to force Emacs in a infinite loop with `re-search-forward'. If I create a shiny new buffer, insert something like this: ,---- | (while (re-search-forward "^[ \t]*")) | Something else `---- -- go back beyond the while-clause and evaluate it, Emacs enters an infinite loop. As far as I was able to find out `re-search-forward' with this regexp moves point to the beginning of the next line above the "S" of "Something else" and stays there forever so it never reaches end-of-buffer. As I dunno much (or better: anything) on Emacs' interiors my question is: Why does this happen? Regards, -- David -- OpenPGP... 0x316F4BE4670716FD Jabber.... dmjena@jabber.org Email..... maus.david@gmail.com ICQ....... 241051416