Lisp HUG Maillist Archive

Fuzzy Completion (originally from SLIME) for LW Editor

      Hello lispworkers,


I've taken the liberty (with code author Brian Downing permission)
to copy out SLIME/swank fuzzy completion code in a independant file,
in order to use it from within LW Editor, and built a quick interface 
over it.

The completion code and its LW Editor interface you can find in the
attached tgz file. The screenshot shows the graphical dialog, with the
different possibilities after `defcon' has been typed and fc invoked

What does it ?
----------------

It allows you to type only abbreviations in place of
long symbols, press a keychord, and have
it fully expanded. In case the supplied abbreviation is not sufficiently
discriminating, you are presented a little CAPI dialog, where you can 
select the
symbol you had in mind.

Examples
------------

you type :
(mvb     <magic keychord> -> (multiple-value-bind
(wifs    <magic keychord> -> (with-input-from-string
(vpe    <magic keychord> -> (vector-push-extend

but when you type :
(defcon, -- meaning define-condition -- <magic keychord>,
defcon is ambiguous, so you get a dialog where you have to select it.

How to use it ?
-----------------
1) compile fuzzy-completion.lisp
2) Adjust the path in the require statement at the beginning of 
fc-editor-interface.lisp
  and the editor keybinding at the end (default Super-Tab) to your liking
3) Load fc-editor-interface.lisp


Made and tested in LW Linux Personal v. 4.3.7
Any comments/suggestions appreciated...


Happy completion :-)

Stéphane Perrot



Re: Fuzzy Completion (originally from SLIME) for LW Editor

Hello PERROT,

| I've taken the liberty (with code author Brian Downing permission)
| to copy out SLIME/swank fuzzy completion code in a independant file,
| in order to use it from within LW Editor, and built a quick interface
| over it.
| ...snip...|

Sounds interesting. Tnanks.

| but when you type :
| (defcon, -- meaning define-condition -- <magic keychord>,
| defcon is ambiguous, so you get a dialog where you have to select it.

At the first glance, it looks strange that DEFCONstant (43.2) gets lower
score than DEFine-CONdition (47.4) and DEFine-method-CombiNAtion (47.0).
What is the rationale?
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Re: Fuzzy Completion (originally from SLIME) for LW Editor

PERROT Stephane wrote:

> How to use it ?
> -----------------
> 1) compile fuzzy-completion.lisp

Oops.. I managed to remove a eval-when just before sending,
when it was actually needed.. I guess I have to reread the eval-when
section in PCL...

Attached is a corrected version

Sorry for the inconvenience...


Stephane Perrot


Updated at: 2020-12-10 08:52 UTC