[slime-devel] slime-fuzzy-complete-symbol

Brian Downing bdowning at lavos.net
Mon May 8 17:25:17 UTC 2006

On Mon, May 08, 2006 at 04:08:12PM +0100, Antonio Menezes Leitao wrote:
> (defvar slime-fuzzy-completions-map  
>   (let* ((map (make-sparse-keymap)))
>     ...
>     (define-key map " " 'slime-fuzzy-select-and-space)
>     ...)
>   "Keymap for slime-fuzzy-completions-mode.")
> This takes advantage of the fact that, in most cases, fuzzy completion
> places the cursor on the correct completion so I don't really look at
> the completions window because the correct completion was also placed
> on my buffer.  Then, I press a space and (because the focus was on the
> completion window, the command confirms the choice, and I keep
> writing.
> This small change is, IMHO, a good improvement for fuzzy completion
> usability.

I had made space be "next page" to comply with the seemingly standard
emacs read-only buffer metaphor of space being page down, backspace
being page up, and q being quit.  But I agree for using the fuzzy
completor for normal everyday completion this could be a really useful

While we're talking about this, would it be helpful for it to try and
"learn" your prefered completions?  i.e. if one completes "mvl" and
picks "multiple-values-limit", that would get a higher score next time.
While this would promote trying to have the right completion at the top,
it would also mean the list is always shuffling around a bit, which
could be distracting.  (I put a fuzzy-completion-selected hook in Swank
with the expectation of doing something like this, but never used it.)


More information about the slime-devel mailing list