Hi,
Although I'm not a big emacs guru, so things might be implemented simpler, but I did what I could with a resonable effort. Still you may or may not find this useful.
This is not a final patch for two reasons: first I'm not even sure it's worth it and if nobody is interested I will just keep it in my local repo. Second, it breaks current functionality: the one which continuously replaces text in the target buffer while you move up and down in the completion window with the current completion (selection). Personally I found that superfluous.
So this is a somewhat different end user experience for fuzzy completion. It is a little bit closer to the other non fuzzy completion in that it does not take the focus away from the buffer you are editing and there are some other minor differences.
I introduced a new minor mode called slime-fuzzy-target-buffer-completions-mode for the target buffer during fuzzy completion. You may find it usefull to bind your paredit open and close keys to (the ones bound to insert-parentheses and move-past-close-and-reindent) slime-fuzzy-select-and-process-event-in-target-buffer in the keymaps called slime-target-buffer-fuzzy-completions-map and slime-fuzzy-completions-map.
Here is how it works (- means not yet implemented):
When focus is in the target window (replace tab with your favorite key binding): + tab shows completion window if it was not open + tab updates completion window if there was editing since last time tab was pressed + tab implicitly completes if there's only one match + tab selects current completion if there were no editing since last tab (double tab) even if there are multiple matches + tab closes completion window if there are no matches at all - tab distinguishes between function and other symbols and puts an extra space before caret if mandatory parameters exists - tab puts the caret after the list in the target for unary function symbols + left/right moves caret in target window + up/down moves caret in completion window even though the focus is in the target window (changes current completion) + space/enter/(/) implicitly selects current completion and processes event in target window (paredit takes care about the rest) + normal editing operations allowed in target window - editing implicitly updates completion window in the background during editing (by a timer) + C-q closes completion window
When focus is in the completion window: + cursor keys navigate + tab/mouse2 selects current completion and closes completion window + space/enter/(/) selects current completion, closes completion window and processes event in the target window + q closes completion window
Cheers, levy
Although I'm not a big emacs guru, so things might be implemented simpler, but I did what I could with a resonable effort. Still you may or may not find this useful.
there was no feedback on this, but i'm using this patch for some time now and i like it a lot! it's much better then the non-fuzzy version, and the gui of this fuzzy version is finally non-interruptive to the editing process.
most of the time i just write some nearly random chars press tab then space and keep on typing without any interruption. and in the 10% it misses i press undo, tab again, up/down arrows to select the correct completion (rarely edit the text a bit more) and then space, which is goto 10... :)
what kind of completion are people using?
- attila
(alias 101 on irc &no 'its not lisp code :)
On Wed, May 17, 2006 at 04:06:23PM +0200, Attila Lendvai wrote:
Although I'm not a big emacs guru, so things might be implemented simpler, but I did what I could with a resonable effort. Still you may or may not find this useful.
there was no feedback on this, but i'm using this patch for some time now and i like it a lot! it's much better then the non-fuzzy version, and the gui of this fuzzy version is finally non-interruptive to the editing process.
most of the time i just write some nearly random chars press tab then space and keep on typing without any interruption. and in the 10% it misses i press undo, tab again, up/down arrows to select the correct completion (rarely edit the text a bit more) and then space, which is goto 10... :)
Okay, I'm going to be having some free time coming up shortly, so I'll probably be looking at what it would take to merge this in alongside the current interface (on the "choices are good" theory), along with trying to speed up the actual algorithm.
what kind of completion are people using?
I use both the normal complete* function (bound to C-M-i) and the existing fuzzy completor (bound to C-c C-i). Which one I hit just depends on what I'm doing at the time. In "interactive" situations I do tend to use the normal completion, when I use fuzzy is when I know I want a long annoying name, so I purposefully type some abbreviation for it, hit C-c C-i, select from menu, and hit enter. As this was my use case when I was designing it, it is why the current interface is optimized for it. :)
-bcd
* levente.meszaros@gmail.com [Sat May 13 17:30:02 2006]:
When focus is in the target window (replace tab with your favorite key binding):
- tab shows completion window if it was not open
- tab updates completion window if there was editing since last time
tab was pressed
Hi,
I just got a recent version of the completion patch from Attila Lendvai. My GNU/Emacs 22.0.50.1 complains at (kbd "<TAB>") which yields [TAB]. Changing all occurences to (kbd "TAB") results in "\t" works.
I haven't use the modification for long, but so far, it seems less obtrusive than the vanilla version.
Cheers, Michael
After seeing Marco Baringer's slime movie, I am trying to connect from Emacs (v. 21.3.1) running on my Windows machine to cmucl running on my Linux machine using the instructions provided by Andy Sloane (http://a1k0n.net/blah/archives/2005/11/04/T18_00_44/index.html). All of the intermediate steps seem to be working, but when I try to "M-x my-box-slime" I get the following error.
error in process filter: byte-code: net-read error: (cl-assertion-failed (plusp length)) error in process filter: net-read error: (cl-assertion-failed (plusp length))
Any ideas? Thanks.
-bruce