From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: `completion-in-region' Date: Sun, 11 Apr 2010 15:44:57 -0400 Message-ID: References: <493575A8A83B43BCB1AF49E239599A77@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271015125 17153 80.91.229.12 (11 Apr 2010 19:45:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Apr 2010 19:45:25 +0000 (UTC) Cc: 'Leo' , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 11 21:45:23 2010 Return-path: Envelope-to: ged-emacs-devel@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 1O135q-0004NT-L2 for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 21:45:18 +0200 Original-Received: from localhost ([127.0.0.1]:56361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O135q-0003eg-56 for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 15:45:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O135b-0003ao-3J for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:45:03 -0400 Original-Received: from [140.186.70.92] (port=47496 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O135Y-0003ZS-W7 for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:45:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O135X-0007Xu-IC for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:45:00 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:15787 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O135X-0007Xp-E3 for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:44:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEABLEwUtMCqWu/2dsb2JhbACbRXK1XoUMBItG X-IronPort-AV: E=Sophos;i="4.52,185,1270440000"; d="scan'208";a="60632054" Original-Received: from 76-10-165-174.dsl.teksavvy.com (HELO ceviche.home) ([76.10.165.174]) by ironport2-out.pppoe.ca with ESMTP; 11 Apr 2010 15:44:57 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2E3B0660BF; Sun, 11 Apr 2010 15:44:57 -0400 (EDT) In-Reply-To: <493575A8A83B43BCB1AF49E239599A77@us.oracle.com> (Drew Adams's message of "Sun, 11 Apr 2010 11:05:01 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123496 Archived-At: > TextMate's default matching (it has no name AFAIK) is the same as > Ido's "flex" matching and Icicles's "scatter" matching. It is > a poor-man's fuzzy matching (not fuzzy matching in the more usual > sense). (TextMate uses this matching only for file names, I believe.) I see that ido implements it by turning "abc" into the regexp ".*a.*b.*c". But matching this regexp against a string like "abababababab" takes time O(N^3) where N is the length of the completion candidate, which makes me a bit uneasy (and in general matching "flex"ibly an input string of size M against a completion candidate of size N can take time O(N^M)). But I guess experience shows it's not a real problem. It should be pretty easy to add it as a new completion-style (after all you can already get the same result with partial completion by typing "*a*b*c"). Stefan