help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smarter isearch (was: Re: does emacs support incremental searching f


From: jpkotta
Subject: Re: smarter isearch (was: Re: does emacs support incremental searching for partial matches?)
Date: Mon, 28 Feb 2011 15:41:39 -0800 (PST)
User-agent: G2/1.0

On Feb 26, 4:31 am, Le Wang <l26w...@gmail.com> wrote:
> On Sat, Feb 26, 2011 at 11:22 AM, jpkotta <jpko...@gmail.com> wrote:
> > On Feb 24, 8:43 am, Stefan Monnier <monn...@iro.umontreal.ca> 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.
>
> > >         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.  I think it's very close to what the OP
> > wanted.
>
> This looks interesting.  Maybe you can add an additional level of search
> between word and flex - treat the search string as regexp.  This 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]