From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: What is the difference between looking-at and an anchored search? Date: Thu, 17 Jul 2008 21:35:44 +0900 Message-ID: References: <487F2985.9080103@gmail.com> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216298237 8467 80.91.229.12 (17 Jul 2008 12:37:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2008 12:37:17 +0000 (UTC) Cc: Emacs Devel To: "Lennart Borgman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 17 14:38:05 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KJSk4-0002Qb-NR for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 14:37:52 +0200 Original-Received: from localhost ([127.0.0.1]:59601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJSjC-00005K-6h for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 08:36:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJSiB-0007Dg-AA for emacs-devel@gnu.org; Thu, 17 Jul 2008 08:35:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJSi9-0007CY-KW for emacs-devel@gnu.org; Thu, 17 Jul 2008 08:35:54 -0400 Original-Received: from [199.232.76.173] (port=34776 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJSi9-0007CJ-Dg for emacs-devel@gnu.org; Thu, 17 Jul 2008 08:35:53 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.193]:45542) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJSi5-0003jH-1x; Thu, 17 Jul 2008 08:35:49 -0400 Original-Received: from relay11.aps.necel.com ([10.29.19.46]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m6HCZieH005249; Thu, 17 Jul 2008 21:35:44 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.24] [10.29.19.24]) by relay11.aps.necel.com with ESMTP; Thu, 17 Jul 2008 21:35:44 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.112.215] [10.114.112.215]) by relay11.aps.necel.com with ESMTP; Thu, 17 Jul 2008 21:35:44 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 33296400; Thu, 17 Jul 2008 21:35:44 +0900 (JST) System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Lennart Borgman's message of "Thu, 17 Jul 2008 14:21:13 +0200") Original-Lines: 19 X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100884 Archived-At: "Lennart Borgman" writes: >> If you want to reject matches that extend past some point, just do >> something like: >> >> (and (looking-at REGEXP) (<= (match-end 0) BOUND)) > > Thanks Miles, > > Yes, that is one possibility. But then perhaps I would assume that > re-search-forward better might optimize that search since it can (in theory) > cut off the searching at BOUND. In the case I am looking at performance is > important. Why don't you time it? -Miles -- Is it true that nothing can be known? If so how do we know this? -Woody Allen