Page 1 of 1
emacs auto-completion
Posted: Wed Mar 26, 2008 7:38 pm
by Jonathan
Posted: Wed Mar 26, 2008 10:13 pm
by VLSmooth
Interesting, I might take a look at that sometime, but for the past few months (perhaps years now) I've been using a friend's xemacs configuration with uses hippie-expand.
http://www.xemacs.org/Documentation/pac ... ls_23.html
It works like a charm.
Posted: Wed Mar 26, 2008 10:31 pm
by Jonathan
Not that I've ever used it, but hippie-expand doesn't seem to apply to code. Does it?
Posted: Wed Mar 26, 2008 11:10 pm
by VLSmooth
It doesn't understand code, which is actually a benefit!
hippie-expand searches for "matches" based on proximity. For example, if I have long_annoying_variable_name in the file, and type long_ followed by ctrl+enter (current keybinding), it will look through the buffer for the first word that starts with long_. If I hit ctrl+enter again, it'll go to the next matching word, etc, until it loops. Of course if nothing matches it'll display "No expansion found" in the status bar.
All in all, this simple feature has been incredibly useful, and has kept me firmly planted in the xemacs faction.
Posted: Wed Mar 26, 2008 11:13 pm
by VLSmooth
Quickly re-skimming the predictive code documentation isn't turning up examples. Perhaps it might serves a different purpose, like brace insertion, logical block creation, etc? (which I find horribly annoying at times).
Posted: Thu Mar 27, 2008 6:11 pm
by Jonathan
http://www.dr-qubit.org/predictive/user ... l#Overview
No, it's basically the same thing. You can do C-RET exactly like hippie-expand. You can also do auto dynamic with accept by default, in which case you strike
L O N G _ SPC and you get
long_annoying_variable_name. There's also hotkeys for picking from a list of possible completions without having to cycle through them, and autocomplete behavior like TAB in the shell, where it fills in the characters until it gets to the first bifurcation.
Posted: Thu Mar 27, 2008 7:20 pm
by VLSmooth
Cool then. Feel free to count me as a happy actual user of hippie-expand.
Posted: Thu Mar 27, 2008 7:35 pm
by quantus
Posted: Thu Mar 27, 2008 9:15 pm
by Jonathan
Bah, Xemacs is so 90s.
At work I'm running GNU Emacs 21.3.50.1. When run under X on my site, it has both mouse-accessible menus and toolbars, neither of which I use any more because it tells you the keyboard shortcut for a button or menu selection when you click it.
So there.
Posted: Fri Mar 28, 2008 12:09 am
by quantus
ok, then how do I get this to compile? Running make dies:
While compiling toplevel forms in file /homes/josephb/lib/emacs/predictive/predictive.el:
!! Symbol's function definition is void ((completion-bind-self-insert))
Posted: Fri Mar 28, 2008 12:30 am
by Jonathan
Posted: Fri Mar 28, 2008 12:39 am
by quantus
I stumbled across that through the bunch of reading of help files and docs, but opening the list in another window is annoying. I think I like hippie-expand in xemacs better. If you find anything else, lemme know.