emacs auto-completion

Just the urls, ma'am.
Post Reply
Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

emacs auto-completion

Post by Jonathan »


VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

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

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »

Not that I've ever used it, but hippie-expand doesn't seem to apply to code. Does it?

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

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

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

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

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

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

VLSmooth
Tenth Dan Procrastinator
Posts: 3055
Joined: Fri Jul 18, 2003 3:02 am
Location: Varies
Contact:

Post by VLSmooth »

Cool then. Feel free to count me as a happy actual user of hippie-expand.

quantus
Tenth Dan Procrastinator
Posts: 4891
Joined: Fri Jul 18, 2003 3:09 am
Location: San Jose, CA

Post by quantus »

http://www.dr-qubit.org/emacs.php wrote:Currently, it doesn't work under XEmacs
:(
Have you clicked today? Check status, then: People, Jobs or Roads

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

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

quantus
Tenth Dan Procrastinator
Posts: 4891
Joined: Fri Jul 18, 2003 3:09 am
Location: San Jose, CA

Post 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))
Have you clicked today? Check status, then: People, Jobs or Roads

Jonathan
Grand Pooh-Bah
Posts: 6722
Joined: Tue Sep 19, 2006 8:45 pm
Location: Portland, OR
Contact:

Post by Jonathan »


quantus
Tenth Dan Procrastinator
Posts: 4891
Joined: Fri Jul 18, 2003 3:09 am
Location: San Jose, CA

Post 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.
Have you clicked today? Check status, then: People, Jobs or Roads

Post Reply