From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jpkotta Newsgroups: gmane.emacs.help Subject: Re: smarter isearch (was: Re: does emacs support incremental searching for partial matches?) Date: Mon, 28 Feb 2011 15:41:39 -0800 (PST) Organization: http://groups.google.com Message-ID: <088e0c93-3793-4d27-b1b4-3983e17ccd97@n16g2000prc.googlegroups.com> References: 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 1298940072 8863 80.91.229.12 (1 Mar 2011 00:41:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Mar 2011 00:41:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 01 01:41:08 2011 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 1PuDeB-0002zE-LQ for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Mar 2011 01:41:03 +0100 Original-Received: from localhost ([127.0.0.1]:51678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuDeB-0005o9-4E for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Feb 2011 19:41:03 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!n16g2000prc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: 64.122.73.112 Original-X-Trace: posting.google.com 1298936499 28490 127.0.0.1 (28 Feb 2011 23:41:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 28 Feb 2011 23:41:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n16g2000prc.googlegroups.com; posting-host=64.122.73.112; posting-account=EwI0QQoAAADdqmqX_mVfawBNtwyks2YE User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 Version/11.01,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:185438 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:79592 Archived-At: On Feb 26, 4:31=A0am, Le Wang wrote: > On Sat, Feb 26, 2011 at 11:22 AM, jpkotta wrote: > > On Feb 24, 8:43 am, Stefan Monnier wrote: > > > >> (defconst my-isearch-re "[^\n\s\t]*?") > > > > or (defconst my-isearch-re "\\S *?") > > > > I'm not sure which is clearer. > > > > Many languages set \n to have syntax "close comment" rather than > > > "space", in which case \S- does not exclude \n. > > > > =A0 =A0 =A0 =A0 Stefan > > > I just addedhttp://www.emacswiki.org/emacs/FlexIsearchto the wiki. > > It's something that I've been thinking about for a while, but I didn't > > know how to hook into isearch. =A0I think it's very close to what the O= P > > wanted. > > This looks interesting. =A0Maybe you can add an additional level of searc= h > between word and flex - treat the search string as regexp. =A0This way I = can > map C-s to flex search (right now it's mapped to isearch-forward-regexp). > > That is: > > start searching for input as string, when not found, search for input as > regexp, when not found, search for input as flex term > > -- > Le I don't quite understand. As in, you do C-s to search for "^a[ ] +regexp", it doesn't match, so then it works as if you did C-M-s (or M- r in isearch-mode) so it interprets the string as a regexp? Why wouldn't you just use C-M-s (or M-r from isearch-mode)? I guess what I was going for with flex-isearch is to find similar strings if I mistyped the search string, or make it a bit more forgiving if I didn't know the exact string. If I'm searching for a regexp, then I know I'm searching for a regexp, and in my mind it's a different operation than a simple string search.