unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: extending icomplete -- help?
       [not found] <87sn6acv7h.fsf@confusibombus.i-did-not-set--mail-host-address--so-tickle-me>
@ 2002-04-05 14:47 ` Stefan Monnier
  2002-04-05 15:36   ` Alex Schroeder
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2002-04-05 14:47 UTC (permalink / raw)
  Cc: emacs-devel

> 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 ?

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).

More specifically, if you type

	foo*bar-baz<TAB>

it will first try to see if "foo*bar?baz" is a prefix of one of the
completions (i.e. it first tries the current completion system,
as opposed to partial-completion-mode which immediately would try
too look for something that matches "\\`foo.*bar[^-]*-baz") if
that fails, it tries to see if something matches "\\`foo.*bar.*-baz",
if that still fails, it tries "foo.*bar.*-baz".

The intention is to replace the current basic completion
functions with this new code (just like I did for newcomment.el).

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...


	Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: extending icomplete -- help?
  2002-04-05 14:47 ` extending icomplete -- help? Stefan Monnier
@ 2002-04-05 15:36   ` Alex Schroeder
  2002-04-05 17:18     ` Kai Großjohann
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Schroeder @ 2002-04-05 15:36 UTC (permalink / raw)
  Cc: emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu> 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: extending icomplete -- help?
  2002-04-05 15:36   ` Alex Schroeder
@ 2002-04-05 17:18     ` Kai Großjohann
  2002-04-06 11:51       ` Alex Schroeder
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2002-04-05 17:18 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel

Alex Schroeder <alex@emacswiki.org> writes:

> What I want is a mode which, when switched on, makes all completions
> behave as iswitch-buffer does now.  Does that make sense?

There is the ido.el package which might do this.  At least it claims
to be like iswitchb, but for things other than C-x b.

kai
-- 
Silence is foo!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: extending icomplete -- help?
  2002-04-05 17:18     ` Kai Großjohann
@ 2002-04-06 11:51       ` Alex Schroeder
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Schroeder @ 2002-04-06 11:51 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Alex Schroeder <alex@emacswiki.org> writes:
>
>> What I want is a mode which, when switched on, makes all completions
>> behave as iswitch-buffer does now.  Does that make sense?
>
> There is the ido.el package which might do this.  At least it claims
> to be like iswitchb, but for things other than C-x b.

Well, ido does this for certain definitions of "things" -- as far as I
know it only does it for buffers and files.  But it seems that Stefan
already has the generic solution I was looking for.

Alex.
-- 
http://www.emacswiki.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-06 11:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87sn6acv7h.fsf@confusibombus.i-did-not-set--mail-host-address--so-tickle-me>
2002-04-05 14:47 ` extending icomplete -- help? Stefan Monnier
2002-04-05 15:36   ` Alex Schroeder
2002-04-05 17:18     ` Kai Großjohann
2002-04-06 11:51       ` Alex Schroeder

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).