From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.devel Subject: Re: extending icomplete -- help? Date: Fri, 05 Apr 2002 17:36:54 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <87zo0i17jd.fsf@emacswiki.org> References: <87sn6acv7h.fsf@confusibombus.i-did-not-set--mail-host-address--so-tickle-me> <200204051447.g35EllJ23003@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1018020980 28416 127.0.0.1 (5 Apr 2002 15:36:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 5 Apr 2002 15:36:20 +0000 (UTC) Cc: emacs-devel@gnu.org Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16tVlE-0007OD-00 for ; Fri, 05 Apr 2002 17:36:20 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16tVyI-0001x5-00 for ; Fri, 05 Apr 2002 17:49:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16tVky-0004Im-00; Fri, 05 Apr 2002 10:36:04 -0500 Original-Received: from relay01.cablecom.net ([62.2.33.101]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16tViw-0004AD-00 for ; Fri, 05 Apr 2002 10:33:58 -0500 Original-Received: from smtp.swissonline.ch (mail-4.swissonline.ch [62.2.32.85]) by relay01.cablecom.net (8.11.6/8.11.4/SOL/AWF/MXRELAY/06072001) with ESMTP id g35FXn220776; Fri, 5 Apr 2002 17:33:53 +0200 (CEST) Original-Received: from confusibombus (dclient217-162-233-80.hispeed.ch [217.162.233.80]) by smtp.swissonline.ch (8.11.6/8.11.6/SMTPSOL/AWF/2002040101) with ESMTP id g35FXmr02375; Fri, 5 Apr 2002 17:33:48 +0200 (MEST) Original-Received: from alex by confusibombus with local (Exim 3.12 #1 (Debian)) id 16tVlm-00007I-00; Fri, 05 Apr 2002 17:36:54 +0200 Original-To: "Stefan Monnier" In-Reply-To: <200204051447.g35EllJ23003@rum.cs.yale.edu> ("Stefan Monnier"'s message of "Fri, 05 Apr 2002 09:47:47 -0500") Original-Lines: 49 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2392 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2392 "Stefan Monnier" writes: >> I'm trying to modify icomplete such as to allow the typing of >> arbitrary substrings for completion, not just beginnings of words. At >> the current stage I need some more help from people that understand >> minibuffers better than I do. > > I don't understand. icomplete does not change the way completion works. > It only displays extra info about what completion would do if it was invoked. > You code doesn't seem to change this (since it doesn't change any of the > bindings in minibuffer-local-completion-map). What am I missing ? Well, you are missing what my code is missing. :) What I want is a mode which, when switched on, makes all completions behave as iswitch-buffer does now. Does that make sense? partial-completion-mode is not really what I want. icomplete-mode looks kind of what I want, but since it uses all-completions and try-completions, it only works for beginning-of-completions instead of substrings-of-completions, ie. typing "foo" will show all completions starting with "foo" instead of showing all completions containing "foo". What my code does, when the completions are foo, bar, and baz, and the user types b, is show only bar and baz. When the user then types TAB, the b is extended to ba. The rest is missing. And clearly minibuffer-local-completion-map needs to be changed. I didn't even know where to start looking so your message already pointed me in the right direction. > For what it's worth, I wrote a complete replacement for the current > completion functions (replacing the C functions with elisp ones) > which includes partial-completion-mode functionality plus substring-matching > as well (and I updated icomplete to know about it). It seems that you already wrote what I am trying to write. :) As I said, I am not interested in the partial-completion stuff, but substring-matching seems to be what I want. > The code has been working fine for me for a while, but it needs cleaning > up and discussion of how exactly to integrate it. If anybody is > interested in helping out... I would like to give it a try. Alex. -- http://www.emacswiki.org/