Previous Next Top

Unpacking the archive

The package is distributed as tar.gz file. You unpack it using:

      gzip -dc dictionary-1.10.tar.gz | tar xf -


      tar -xzf dictionary-1.10.tar.gz

(with the version number subject to change) depending on whether you are using GNU tar which support the z flag for compression. After unpacking the archive a directory dictionary-1.10 has been created containing the distributed files.


There are several ways of installing this package. If you are a Debian user you can create a Debian Package for installation using the dpkg command. XEmacs users can create a XEmacs package which can easily installed too. Other users have to compile the package using the supplied Makefile and manually install the files. All these installation methods are described in the following sections.


This package is now available as official Debian package. It is named dictionary-el and maintained by Aaron M. Ucko. At the time of writing it is part of both testing and unstable. Please use this package.

If you want to build your own package you can use this command:

      make debian

This will create a package named dictionary-1.10-1_all.deb in the parent directory of dictionary-1.10. You can now install this package as root, it will automatically byte-compile itself for all installed emacs versions and provide a startup-file which autoloads this package. In the configuration example given below you can omit the autoload lines.

XEmacs 21

This dictionary client is part of the XEmacs 21.4 packages (named dictionary) and can be installed and updated using the regular packages tools.

The XEmacs version 21 support so called xemacs packages. These packages are also supported, you can create them using:

      make EMACS=xemacs package

The created package will be named dictionary-1.10-pkg.tar.gz and stored within the current directory. If you don't want to install this package manually, you can use the following command, provided you have sufficient privileges (if unsure, login as super user):

      make EMACS=xemacs package-install

If you have more than one XEmacs versions installed make sure the EMACS argument to make points to the current binary.


Byte compiling

For faster loading and executing of the package I strongly suggest that you byte-compile the files. Emacs user please call make within the create subdirectory, XEmacs user has to specify their favorite tool using make EMACS=xemacs. If your custom package is not up-to-date expect some warnings about free variables.

Installing the files

To install the files into your GNU Emacs/XEmacs installation please copy the *.elc files into a directory being in your load-path variable. On most installations /usr/lib/emacs/site-lisp or /usr/local/lib/emacs/site-lisp are suitable locations.

Loading the package

You have to insert some instructions into your .emacs file to load the dictionary package whenever needed. If you installed this dictionary package as Debian package or XEmacs package you don't need the autoloads, they are already supplied. Other users I suggest using the following lines:

      (autoload 'dictionary-search "dictionary" 
        "Ask for a word and search it in all dictionaries" t)
      (autoload 'dictionary-match-words "dictionary"
        "Ask for a word and search all matching words in the dictionaries" t)
      (autoload 'dictionary-lookup-definition "dictionary" 
        "Unconditionally lookup the word at point." t)
      (autoload 'dictionary "dictionary"
        "Create a new dictionary buffer" t)
      (autoload 'dictionary-mouse-popup-matching-words "dictionary"
        "Display entries matching the word at the cursor" t)
      (autoload 'dictionary-popup-matching-words "dictionary"
        "Display entries matching the word at the point" t)
      (autoload 'dictionary-tooltip-mode "dictionary"
        "Display tooltips for the current word" t)
      (unless (boundp 'running-xemacs)
	  (autoload 'global-dictionary-tooltip-mode "dictionary"
	    "Enable/disable dictionary-tooltip-mode for all buffers" t))

These lines are also stored in a file dictionary-init.el which can be included in your .emacs file by using the following command.

      (load "dictionary-init")

For this command to work copy dictionary-init.el to the same location where you have copied the other dictionary lisp files.

Key bindings

In addition, some key bindings for faster access can be useful. I use the following ones in my installation:

      ;; key bindings
      (global-set-key "\C-cs" 'dictionary-search)
      (global-set-key "\C-cm" 'dictionary-match-words)

I will describe the user-callable functions and the key bindings within dictionary in the next section of this document.

Previous Next Top