Node:Installation, Next:Usage, Previous:Top, Up:Top
The dictionary client is distributes as tar.gz file. You can
found the latest version at
http://www.myrkr.in-berlin.de/dictionary/dictionary-1.7.2.tar.gz.
Please download this file now before continue reading.
To unpack the archive use the following command:
gzip -dc dictionary-1.7.2.tar.gz | tar -xf -
If you have a GNU tar installed, you can also the following
command:
tar -xzf dictionary-1.7.2.tar.gz
A directory named dictionary-1.7.2 will have been created by
these commands.
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 be 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.
If you are using a current Debian distribution (one that support the
emacsen package system) and have the dpkg-dev package installed
(for running dpkg-buildpackage) you can use the supplied
debian support:
make debian
This will create a package named dictionary-1.7.2-1_all.deb or
similiar in the parent directory of dictionary-1.7.2. 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.
If you no longer want to use this package, you can remove it using:
dpkg -r dictionary
XEmacs starting with version 21 has support for 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.7-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 correct binary.
Please note, dictionary is now part of the official XEmacs package distribution. This means you can install this package using the integrated package management.
The first step in the manual installation is the byte compilation of
the lisp file for quicker loading and execution. Using the supplied
Makefile this is quite easy, just invoke:
make
in the dictionary-1.7.2 sub directory. This will use emacs as
the name of the Emacs executable. If you want to use a different
location or a different program (for example, XEmacs) for byte
compilation, use the EMACS argument to the Makefile like
in the following example for XEmacs:
make EMACS=xemacs
If your custom package is not up-to-date expect some warnings about free variables.
The next step is the installation of the files. At the moment there
is no support for this step, you have to copy the compiled lisp files
(named *.elc) to a directory within your load-path by
yourself. Usually the directories /usr/lib/emacs/site-lisp or
/usr/local/lib/emacs/site-lisp are suitable locations for this.
XEmacs users please use the according xemacs/site-lisp
directory.
The final step is to inform your Emacs of the newly installed package.
I added a dictionary-init.el file to the distribution which
contains some autoload instructions to let Emacs know of the
new functions. You can now insert the contents of this file in your
.emacs or .xemacs file or install
dictionary-init.el into the site-lisp directory and load
it using:
(load "dictionary-init")
You probably want to define some key combinations to invoke the
dictionary-search or dictionary-match functions.
The following example shows the key bindings I'm using myself for this
package. These are not supplied by this package because the
C-c prefix key together with a letter suffix are reserved for
the user itself. To activate these bindings insert them into your
.emacs or .xemacs file:
;; key bindings for the dictionary package (global-set-key "\C-cs" 'dictionary-search) (global-set-key "\C-cm" 'dictionary-match-words)