/oed-org

Primary LanguageEmacs Lisp

OED into ORG

Active development has moved to GitLab

Emacs Oxford English Dictionary Lookup

This package allows the user to send the word at the cursor (“point” in Emacs-speak) to the OED on-line API. If the word (or its root) is found then the dictionary entry is formatted and inserted into a temporary ORG-mode buffer for perusing. This includes a link which will (on Linux) play the pronunciation sample from the OED for that word.

The user will need to obtain a key and id from the OED’s developer site. The free key and id allow for up to 3000 lookups per month.

The key and id should be put into the “oed-org” customization group.

Things to do

  • [X] Allow selection of a region to define compound phrases like “personal pronoun”.
  • [X] Show synonyms and antonyms
  • [ ] Handle things like superlatives better so that the linkage and grammatical relationship is clearer
  • [ ] Some sort of history function for when following a thread of word definitions (maybe undo?)
  • [ ] Try to do something with cross-references
  • [-] Make the code not stink.
    • [X] Fix global cache usage to at least “oed-cache”
    • [ ] Work out how to mark dependencies in packages
    • [X] De-factorise the two request calls into one fn
    • [ ] Add proper comments to everything
  • [X] Remove the “Raw” section from output, or at least make it minimised by default.
    • [X] Take a universal argument and only show raw data if it is not nil

Notes

This is my first major (i.e., not concerned just with editing in Emacs itself) application using Elisp and if you read the code you can actually see the learning curve happen.

It relies on the request package and currently that seems to mean that it has to use a global (called ‘cache’ at the moment). I’m sure there’s a way around this somehow.

Dependencies

The package requires Emacs 25, json.el and request.el.