From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: `completion-in-region' Date: Sun, 11 Apr 2010 14:13:29 -0700 Message-ID: <913F8B3D3E9C4288B051202B2E7F8522@us.oracle.com> References: <493575A8A83B43BCB1AF49E239599A77@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1271020433 829 80.91.229.12 (11 Apr 2010 21:13:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Apr 2010 21:13:53 +0000 (UTC) Cc: 'Leo' , emacs-devel@gnu.org To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 11 23:13:51 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 1O14TX-0007i5-Da for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 23:13:51 +0200 Original-Received: from localhost ([127.0.0.1]:37465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O14TW-0007VW-Qq for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 17:13:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O14TS-0007VA-27 for emacs-devel@gnu.org; Sun, 11 Apr 2010 17:13:46 -0400 Original-Received: from [140.186.70.92] (port=42501 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O14TP-0007Uu-Gk for emacs-devel@gnu.org; Sun, 11 Apr 2010 17:13:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O14TN-0007fL-QA for emacs-devel@gnu.org; Sun, 11 Apr 2010 17:13:43 -0400 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:23171) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O14TN-0007f6-8u for emacs-devel@gnu.org; Sun, 11 Apr 2010 17:13:41 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o3BLDbSe005330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 Apr 2010 21:13:39 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3BLDb0u029739; Sun, 11 Apr 2010 21:13:37 GMT Original-Received: from abhmt017.oracle.com by acsmt354.oracle.com with ESMTP id 151931111271020399; Sun, 11 Apr 2010 14:13:19 -0700 Original-Received: from dradamslap1 (/141.144.72.51) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 11 Apr 2010 14:13:19 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrZuHaStx3ErPhXToaLg+GiAvmyBQAALAHg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4BC23B81.00C6:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:123506 Archived-At: > > The question is whether matching like this should be the > > default. IMO, no. > > It's not even a question. Good. It seemed to be an implied question from Leo: Leo> BTW, some modern text editors (such as textmate) have Leo> started offering fuzzy completion as default. > I could imagine using such a matching scheme by default at some > point in the future, but it would need to be significantly refined. > The main problem is that by turning "abc" into a global like > "*a*b*c" we tend to get many matches of variable quality. So we'd > need some way to compare the quality and only keep the ones that > have the best quality. > > At least that's what I try to do in my "forgive" completion-style > (don't look for it, I don't think I've sent it out anywhere yet) > which allows "abc" to match not only "albacore" but also "yacc" > (i.e. it can insert&delete chars): the ability to delete chars > means that fundamentally any input string can match any > completion candidate, so there it's pretty obvious that you need > to sort the candidates by "how close" they are to the input > string. Take a look at the URL I posted before: http://www.emacswiki.org/emacs/Icicles_-_Fuzzy_Completion You'll see several fuzzy-matching techniques described there. All except the one we're talking about here (scatter aka TextMate matching) have some _measure of fit_ such as you describe. And all have their uses and their drawbacks. I would not recommend using any of them as the default matching method.