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

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

Re: New feature idea: isearch with autocorrection


From: Tom
Subject: Re: New feature idea: isearch with autocorrection
Date: Sat, 25 Aug 2012 18:55:33 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Vagn Johansen <gonz808 <at> hotmail.com> writes:
> 
> Something close this behaviour can be found in fuzzy.el
> 
>   https://github.com/m2ym/fuzzy-el/blob/master/fuzzy.el
> 
> It has support for isearch (use turn-on-fuzzy-isearch).
> 

Thanks, I'll take a look.

In the meantime I came up with a quick and dirty solution to see
how useful a similar feature could be in standard isearch.

It is a simple advice which automatically deletes non matching characters
immediately, so it does not allow building up bad characters
in the search string:


(defadvice isearch-search-and-update
   (after isearch-search-and-update-ignore-bad-chars activate)
  (unless isearch-success
    (push 127 unread-command-events)))


I tried a few searches and it seems useful. Why is the default
implementation leaves bad characters in the search string at all? It is not
very useful, because then you must delete them manually.




reply via email to

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