[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extending icomplete -- help?

From: Alex Schroeder
Subject: Re: extending icomplete -- help?
Date: Fri, 05 Apr 2002 17:36:54 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i686-pc-linux-gnu)

"Stefan Monnier" <monnier+gnu/address@hidden> 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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]