Chapters: 1: Introduction 2: Simple example 3: Invocation 4: Finer Control 5: X-Y Plots 6: Contour Plots 7: Image Plots 8: Examples 9: Gri Commands 10: Programming 11: Environment 12: Emacs Mode 13: History 14: Installation 15: Gri Bugs 16: Test Suite 17: Gri in Press 18: Acknowledgments 19: License Indices: Concepts Commands Variables |
12.3: Installing gri-mode.el, the nuts and bolts.The Emacs `gri-mode.el' file is now bundled with gri, so odds are you already have it. If not, you will find it at gri's web site http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gri/gri/gri-mode.elThe following installation steps appear a bit complicated. That's only because gri has changed how it gets installed a few times, and gri-mode.el works with all of these various methods. If you use gri from a Linux package (Debian or Red Hat) or if you compiled it yourself using the default configuration, you won't need to do much. To install `gri-mode.el', follow these 4 steps. If gri-mode is already installed, you can skip the first two steps and move on to the last two, in which you tell Emacs that you'd like to use Gri mode when you edit files that end in `.gri', the Gri suffix. (Actually, if you're using Debian linux, you can skip all of these steps since the system will assume that you want gri-mode if you're editing a Gri file.)
12.3.1: Placing gri-mode.el where Emacs can find it.(Those using gri from gri's RPM package, a Debian package or a Red Hat package users can skip this, as it is done for them)Extra `.el' files like `gri-mode.el' that are not part of Emacs should be stored in a directory where Emacs will find them when you ask it to load them. The files should therefore be found in Emacs' load-path. To see the directory list currently in the load-path, do this in Emacs:
If you have access to system directories, put gri-mode.el in a site-lisp directory, such as `/usr/local/share/emacs/site-lisp/' That way all users will have access to the files. If you don't have access to a site-lisp directory (e.g. you have only a user account), then create a directory where your extra `.el' files will be stored and add it to Emacs' load-path. For example, say you created the directory `~/emacs' and stored gri-mode.el there, you would then put this near the top of your `~/.emacs' file:
12.3.2: Telling gri-mode where gri resides(Those using gri from gri's RPM package, a Debian package or a Red Hat package users can skip this, as it is done for them)
You may skip this section if gri is installed on your system as
`/usr/local/bin/gri-2.12.26' and
`/usr/local/share/gri/2.12.26/gri.cmd' (the default
when compiling gri yourself). If not, then you may need to set the Emacs
variable `
The Emacs variable ` If you have only one version of gri installed on your system, gri-mode will also look to find `gri.cmd' and the gri executable like so:
However, gri-mode was designed to support, and ease the use of,
multiple installed versions of gri. To use this feature, you
must use the gri version number as a directory name under the
`
(e.g. `/opt/gri/2.040/bin/gri' and
`/opt/gri/2.040/lib/gri.cmd' with `
or without the lib and bin subdirectories if the executable is
found in the PATH named like `gri-VERSION' (This is the way Debian
packages are set up):
the file `gri*directory-tree/VERSION/gri.cmd'
and the `gri-VERSION' executable in the PATH
(e.g. `/usr/share/gri/2.1.18/gri.cmd' and
`/usr/bin/gri-2.1.18' with ` Important note: You may have more than one tree and make a list of them:
Examples:
12.3.3: Telling emacs to load gri-mode(Those using a Debian package can skip this, as it is done for them)To tell emacs to use this mode with `.gri' files, you can load gri-mode whenever a new emacs session is starting by adding the following line to your `~/.emacs' file:
This is a good method when you only start emacs once a week and use it for every file you edit (as you should).
If you startup a fresh emacs every time you edit then you probably only
want to load gri-mode into emacs when you need it. In that case,
instead of the `
The first line tells Emacs that it will find out what it needs to know
about running the command ` 12.3.4: Extra user configuration of gri-modeAll users should do this at some time.At this point, gri-mode should start up when you edit a gri file. You may optionally customize gri-mode by:
|