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 16:49:18 -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 1271018974 28846 80.91.229.12 (11 Apr 2010 20:49:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Apr 2010 20:49:34 +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 22:49:32 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 1O145z-0008Jy-4r for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 22:49:31 +0200 Original-Received: from localhost ([127.0.0.1]:36908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O145y-0005hf-Lv for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 16:49:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O145r-0005gV-Du for emacs-devel@gnu.org; Sun, 11 Apr 2010 16:49:23 -0400 Original-Received: from [140.186.70.92] (port=54275 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O145p-0005fS-U3 for emacs-devel@gnu.org; Sun, 11 Apr 2010 16:49:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O145o-0005PG-9G for emacs-devel@gnu.org; Sun, 11 Apr 2010 16:49:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:41264 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O145o-0005PA-71 for emacs-devel@gnu.org; Sun, 11 Apr 2010 16:49:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEACLSwUtMCqWu/2dsb2JhbACbRXK1ZYUMBItG X-IronPort-AV: E=Sophos;i="4.52,185,1270440000"; d="scan'208";a="60633601" 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 16:49:18 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 10A49660BF; Sun, 11 Apr 2010 16:49:18 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Sun, 11 Apr 2010 12:56:15 -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:123502 Archived-At: > The question is whether matching like this should be the default. IMO, no. It's not even a question. Stefan PS: 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. Note that the current default setting already does (a very limited form of) this kind of "quality sorting" since it only considers partial-completion matches if there aren't any prefix completions.