From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: Why does this happen in regexp isearch? Date: Sun, 4 Jul 2010 02:40:09 +0200 Message-ID: References: <87sk40g10s.fsf@rimspace.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1278204072 19856 80.91.229.12 (4 Jul 2010 00:41:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Jul 2010 00:41:12 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Daniel Pittman Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 04 02:41:10 2010 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.69) (envelope-from ) id 1OVDGd-0006oI-Qn for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Jul 2010 02:41:08 +0200 Original-Received: from localhost ([127.0.0.1]:47665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVDGd-0003wa-7D for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Jul 2010 20:41:07 -0400 Original-Received: from [140.186.70.92] (port=47028 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVDGE-0003wL-CT for help-gnu-emacs@gnu.org; Sat, 03 Jul 2010 20:40:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVDGC-0000cg-9y for help-gnu-emacs@gnu.org; Sat, 03 Jul 2010 20:40:42 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:51079) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVDGC-0000cW-5t for help-gnu-emacs@gnu.org; Sat, 03 Jul 2010 20:40:40 -0400 Original-Received: by wwi14 with SMTP id 14so3962000wwi.30 for ; Sat, 03 Jul 2010 17:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=8i42BrBnhXSDVF3lip/NFaHf45BP5DNlV8QlVh/LxIc=; b=AJ/90fRtoxEJYWiV1rgHvzeMfK54P3iHY1GJLTMVRvkwUi/0/B6l/7HMSzvNZUEY0Z ezidYzE4gJhmvKgJJjhh8gDkJycTjtP8e9rss7aUXCNh99kS4ge4Te3pi7HQjkWujnI1 Li2C4iUn1a7zL8rw/dEnxAcmeONVrCLK46Qpo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=SPdUCUF44ehy3Ja4wXmdVRRMK2OFkLNZ1RBFkJfQoMYDQ2PJ6rDlBnmUIu34QZTC3p NaCVcuofJqGxYTN4UDJ+Mxf5cQIsrW/213RipWGkkU/uPjZaVk13UIz8EeM+2tMxybEc zU4tKur3qOncMYNx68KZ8Ydnwj96o6v6yvURI= Original-Received: by 10.227.142.15 with SMTP id o15mr1038658wbu.78.1278204039252; Sat, 03 Jul 2010 17:40:39 -0700 (PDT) Original-Received: by 10.216.184.196 with HTTP; Sat, 3 Jul 2010 17:40:09 -0700 (PDT) In-Reply-To: <87sk40g10s.fsf@rimspace.net> X-detected-operating-system: by eggs.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:74064 Archived-At: 2010/7/3 Daniel Pittman : > Deniz Dogan writes: > >> I open cus-edit.el.gz in Emacs and do a regexp isearch for: >> >> ^ =A0;; >> >> (Beginning of line, then two spaces, then two semicolons.) >> >> For some reason that I don't understand, it seems to match "beginning >> of line, any number of spaces OR tabs, then two semicolons". When I >> search for: >> >> ^ \{2\};; >> >> ...it finds what I'm looking for. Why is this? > > (defcustom search-whitespace-regexp (purecopy "\\s-+") > =A0"If non-nil, regular expression to match a sequence of whitespace char= s. > This applies to regular expression incremental search. > When you put a space or spaces in the incremental regexp, it stands for > this, unless it is inside of a regexp construct such as [...] or *, + or = ?. > You might want to use something like \"[ \\t\\r\\n]+\" instead. > In the Customization buffer, that is `[' followed by a space, > a tab, a carriage return (control-M), a newline, and `]+'. > > When this is nil, each space you type matches literally, against one spac= e." > =A0:type '(choice (const :tag "Find Spaces Literally" nil) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 regexp) > =A0:group 'isearch) > Thank you. --=20 Deniz Dogan