From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Newsgroups: gmane.emacs.help Subject: Re: New feature idea: isearch with autocorrection Date: Sat, 25 Aug 2012 18:55:33 +0000 (UTC) Message-ID: References: <86bohylvb1.fsf@hotmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345920954 22701 80.91.229.3 (25 Aug 2012 18:55:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2012 18:55:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 25 20:55:55 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T5LWU-0006XX-Ih for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Aug 2012 20:55:54 +0200 Original-Received: from localhost ([::1]:45698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5LWS-0004vA-RY for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Aug 2012 14:55:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5LWN-0004v4-Py for help-gnu-emacs@gnu.org; Sat, 25 Aug 2012 14:55:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T5LWK-0003Hm-U5 for help-gnu-emacs@gnu.org; Sat, 25 Aug 2012 14:55:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5LWK-0003Hi-Hy for help-gnu-emacs@gnu.org; Sat, 25 Aug 2012 14:55:44 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T5LWK-0006PI-Bg for help-gnu-emacs@gnu.org; Sat, 25 Aug 2012 20:55:44 +0200 Original-Received: from 188-143-85-231.pool.digikabel.hu ([188.143.85.231]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Aug 2012 20:55:44 +0200 Original-Received: from adatgyujto by 188-143-85-231.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Aug 2012 20:55:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 188.143.85.231 (Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.289 Version/12.01) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86508 Archived-At: Vagn Johansen 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.