Automatic Lookup From Emacs

Xah Lee has released an interesting package called lookup-word-on-internet.el, which he describes on his Web site here. It will take the word at point or a phrase in an active region and look it up in Google, Wikipedia, Dict.org, Answers.com, Wiktionary, or PHP.net.

Lee doesn’t really describe how to use the package on his site so you have to look at lookup-word-on-internet.el to get the details. Basically, there is a little service-specific routine you can call for each service and they1, in turn, call a worker function to do the real work. The service-specific routines are

Function Site Called
lookup-google Google
lookup-wikipedia Wikipedia
lookup-word-dict-org Dict.org
lookup-word-definition Answers.com
lookup-wiktionary Wiktionary.org
lookup-php-ref PHP.net

Of course, for these to be useful, you should bind them to convenient key sequences.

I have a couple of functions like these in my init.el file but this package gives you a fairly comprehensive set in one convenient package and also provides a framework that makes it easy to add your own service-specific functions for sites not in the list.

Footnotes:

1 Except for lookup-php-ref, which does all the work itself.

This entry was posted in General and tagged . Bookmark the permalink.