Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 8b2b1fb157760a0d31e072e140388824 > files > 93

gri-2.8.0-1mdk.i586.rpm

<html>
<head>
<title>Gri Mode: Installation</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000EE" vlink="#551A8B" alink="FF0000">
<!-- newfile InstallingGriMode.html "Gri Mode: Installation" "Gri Mode: Installation" --> 
<!-- @node   Installing gri-mode.el, Step 1, Gri-mode screenshots, Emacs Mode -->
<a name="Installinggri-mode.el" ></a>

<img src="./resources/top_banner.gif" usemap="#navigate_top" border="0">
<table summary="top banner" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" valign="top">
<font size=-1>
<br>
Chapters:
</br>
&nbsp;&nbsp;<a href="Introduction.html">1: Introduction</a><br>
&nbsp;&nbsp;<a href="SimpleExample.html">2: Simple example</a><br>
&nbsp;&nbsp;<a href="InvokingGri.html">3: Invocation</a><br>
&nbsp;&nbsp;<a href="GettingMoreControl.html">4: Finer Control</a><br>
&nbsp;&nbsp;<a href="X-Y.html">5: X-Y Plots</a><br>
&nbsp;&nbsp;<a href="ContourPlots.html">6: Contour Plots</a><br>
&nbsp;&nbsp;<a href="Images.html">7: Image Plots</a><br>
&nbsp;&nbsp;<a href="Examples.html">8: Examples</a><br>
&nbsp;&nbsp;<a href="Commands.html">9: Gri Commands</a><br>
&nbsp;&nbsp;<a href="Programming.html">10: Programming</a><br>
&nbsp;&nbsp;<a href="Environment.html">11: Environment</a><br>
&nbsp;&nbsp;<a href="Emacs.html">12: Emacs Mode</a><br>
&nbsp;&nbsp;<a href="History.html">13: History</a><br>
&nbsp;&nbsp;<a href="Installation.html">14: Installation</a><br>
&nbsp;&nbsp;<a href="Bugs.html">15: Gri Bugs</a><br>
&nbsp;&nbsp;<a href="TestSuite.html">16: Test Suite</a><br>
&nbsp;&nbsp;<a href="Acknowledgments.html">17: Acknowledgments</a><br>
&nbsp;&nbsp;<a href="License.html">18: License</a><br>
<br>
Indices:</br>
&nbsp;&nbsp;<a href="ConceptIndex.html"><i>Concepts</i></a><br>
&nbsp;&nbsp;<a href="CommandIndex.html"><i>Commands</i></a><br>
&nbsp;&nbsp;<a href="BuiltinIndex.html"><i>Variables</i></a><br>
</font>
<td width="500" valign="top">
<map name="navigate_top">
<area alt="index.html#Top" shape="rect" coords="5,2,218,24" href="index.html#Top">
<area alt="Emacs.html#EmacsMode" shape="rect" coords="516,2,532,24" href="Emacs.html#EmacsMode">
<area alt="Gri: Screenshot 4" shape="rect" coords="557,2,573,24" href="ScreenShot4.html">
<area alt="Gri Mode: Major Commands" shape="rect" coords="581,2,599,24" href="MajorGriModeCommands.html">
</map>
<map name="navigate_bottom">
<area alt="index.html#Top" shape="rect" coords="5,2,218,24" href="index.html#Top">
<area alt="Gri Mode: Major Commands" shape="rect" coords="581,2,599,24" href="MajorGriModeCommands.html"></map>
<h2>12.3: Installing gri-mode.el, the nuts and bolts.</h2>


The Emacs `<font color="#82140F"><samp>gri-mode.el</samp></font>' file is now bundled with gri, so odds are
you already have it.  If not, you will find it at gri's web site
<A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gri/gri/gri-mode.el"> 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gri/gri/gri-mode.el
</A> 
<p>
The following installation steps appear a <b>bit</b> 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.
<p>
To install `<font color="#82140F"><samp>gri-mode.el</samp></font>', 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 `<font color="#82140F"><samp>.gri</samp></font>', 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.)
<p>
<UL>
<LI><a href="InstallingGriMode.html#Step1">Step 1</a>: Placing gri-mode.el where Emacs can find it.
<LI><a href="InstallingGriMode.html#Step2">Step 2</a>: Configuring gri-mode to where gri lives on your system.
<LI><a href="InstallingGriMode.html#Step3">Step 3</a>: Telling emacs to load gri-mode
<LI><a href="InstallingGriMode.html#Step4">Step 4</a>: Extra user configuration of gri-mode.
</UL>

<!-- @node   Step 1, Step 2, Installing gri-mode.el, Installing gri-mode.el -->
<a name="Step1" ></a>
<h3>12.3.1: Placing gri-mode.el where Emacs can find it.</h3>


(Those using gri from gri's <b>RPM</b> package, a <b>Debian</b> package
or a <b>Red Hat</b> package users can skip this, as it is done
for them)
<p>
Extra `<font color="#82140F"><samp>.el</samp></font>' files like `<font color="#82140F"><samp>gri-mode.el</samp></font>' 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'
<b>load-path</b>.  To see the directory list currently in the load-path,
do this in Emacs:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
C-h v load-path
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
If you have access to system directories, put gri-mode.el in a
<b>site-lisp</b> directory, such as
`<font color="#82140F"><samp>/usr/local/share/emacs/site-lisp/</samp></font>' That way all users will have
access to the files.
<p>
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 `<font color="#82140F"><samp>.el</samp></font>' files
will be stored and add it to Emacs' load-path.  For example, say you
created the directory `<font color="#82140F"><samp>~/emacs</samp></font>' and stored gri-mode.el there, you would
then put this near the top of your `<font color="#82140F"><samp>~/.emacs</samp></font>' file:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(setq load-path (cons "~/emacs" load-path))
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
<!-- @node   Step 2, Step 3, Step 1, Installing gri-mode.el -->
<a name="Step2" ></a>
<h3>12.3.2: Telling gri-mode where gri resides</h3>


(Those using gri from gri's <b>RPM</b> package, a <b>Debian</b> package
or a <b>Red Hat</b> package users can skip this, as it is done
for them)
<p>
You may skip this section if gri is installed on your system as
`<font color="#82140F"><samp>/usr/local/bin/gri-2.8.0</samp></font>' and
`<font color="#82140F"><samp>/usr/local/share/gri/2.8.0/gri.cmd</samp></font>' (the default
when compiling gri yourself).  If not, then you may need to set the Emacs
variable `<font color="#82140F"><code>gri*directory-tree</code></font>' in a startup file such as in your
`<font color="#82140F"><samp>~/.emacs</samp></font>' file.
<p>
The Emacs variable `<font color="#82140F"><code>gri*directory-tree</code></font>' is used to configure
gri-mode to tell it where Gri is installed on your system. For the
default gri installation paths used in this gri release, gri-mode
expects to find the gri executable and the file gri.cmd as:
`<font color="#82140F"><code>gri*directory-tree/2.8.0/gri.cmd</code></font>'
and `<font color="#82140F"><code>/usr/local/bin/gri-</code></font>'2.8.0
where `<font color="#82140F"><code>gri*directory-tree</code></font>' is by default set to
`<font color="#82140F"><samp>/usr/local/share/gri/</samp></font>'.
<p>
If you have only one version of gri installed on your system, gri-mode
will also look to find `<font color="#82140F"><samp>gri.cmd</samp></font>' and the gri executable like so:
<ol>
<li>
Gri executable in the PATH, with startup file
`<font color="#82140F"><samp>gri*directory-tree/gri.cmd</samp></font>'.
<li>
Gri executable in the PATH, with startup file
`<font color="#82140F"><samp>gri*directory-tree/lib/gri.cmd</samp></font>'.
<li>
Gri executable `<font color="#82140F"><code>gri*directory-tree/bin/gri</code></font>', with startup file
`<font color="#82140F"><code>gri*directory-tree/lib/gri.cmd</code></font>'.
</ol>
<p>
However, gri-mode was designed to support, and ease the use of,
<b>multiple installed versions</b> of gri.  To use this feature, you
must use the gri version number as a directory name under the
`<font color="#82140F"><code>gri*directory-tree</code></font>' path, like this:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
gri*directory-tree/VERSION/bin/gri
gri*directory-tree/VERSION/lib/gri.cmd
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
(e.g. `<font color="#82140F"><samp>/opt/gri/2.040/bin/gri</samp></font>' and
`<font color="#82140F"><samp>/opt/gri/2.040/lib/gri.cmd</samp></font>' with `<font color="#82140F"><code>gri*directory-tree</code></font>' set to
`<font color="#82140F"><code>"/opt/gri"</code></font>')
<p>
or without the <b>lib</b> and <b>bin</b> subdirectories if the executable is
found in the PATH named like `<font color="#82140F"><samp>gri-VERSION</samp></font>' (This is the way Debian
packages are set up):
the file `<font color="#82140F"><samp>gri*directory-tree/VERSION/gri.cmd</samp></font>'
and the `<font color="#82140F"><samp>gri-VERSION</samp></font>' executable in the PATH
(e.g. `<font color="#82140F"><samp>/usr/share/gri/2.1.17/gri.cmd</samp></font>' and
`<font color="#82140F"><samp>/usr/bin/gri-2.1.17</samp></font>' with `<font color="#82140F"><code>gri*directory-tree</code></font>' set to
`<font color="#82140F"><code>"/usr/share/gri"</code></font>')
<p>
<b>Important note:</b> You may have more than one tree and make a list
of them:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(setq gri*directory-tree '("/opt/gri/" "/usr/share/gri/"))
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
<b>Examples:</b>
<p>
<ol>
<li>
 If you use a RedHat package
 installed like:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
/usr/bin/gri
/usr/share/gri/gri.cmd
</font></PRE>
</TD>
</TR>
</TABLE>
<p>

then you'd also use:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(setq gri*directory-tree "/usr/share/gri/")
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
 but gri-mode would know of only one installed version of gri.
<p>
<li>
 If you use a Debian GNU/Linux installation like:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
/usr/bin/gri -&gt; /usr/bin/gri-2.1.17
/usr/share/gri/2.1.17/gri.cmd
</font></PRE>
</TD>
</TR>
</TABLE>
<p>

then you'd use:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(setq gri*directory-tree "/usr/share/gri/")
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
 Note that all gri binaries must exist in the path with version number
 suffixes (e.g. `<font color="#82140F"><samp>gri-2.1.17</samp></font>') since there is no
 `<font color="#82140F"><samp>/usr/share/gri/2.1.17/bin/</samp></font>' directory (using a similar structure
 to `<font color="#82140F"><samp>opt/gri</samp></font>' below) where gri-mode can find the binary
 corresponding to a given version number.
<p>
<li>
 If you had multiple versions of Gri installed like so (this reflects
 the installation paths used in older gri releases): 
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
/opt/gri/2.040/bin/gri
/opt/gri/2.040/lib/gri.cmd
/opt/gri/2.041/bin/gri
/opt/gri/2.041/lib/gri.cmd
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
then you'd use:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(setq gri*directory-tree "/opt/gri/")
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
</ol>
<p>
<!-- @node   Step 3, Step 4, Step 2, Installing gri-mode.el -->
<a name="Step3" ></a>
<h3>12.3.3: Telling emacs to load gri-mode</h3>


(Those using a <b>Debian</b> package can skip this, as it is done
for them)
<p>
To tell emacs to use this mode with `<font color="#82140F"><samp>.gri</samp></font>' files, you can load
gri-mode whenever a new emacs session is starting by adding the
following line to your `<font color="#82140F"><samp>~/.emacs</samp></font>' file:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(require 'gri-mode)
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
This is a good method when you only start emacs once a week and
use it for every file you edit (as you should).  
<p>
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 `<font color="#82140F"><code>require</code></font>' statement above, add the following lines
to your `<font color="#82140F"><samp>~/.emacs</samp></font>' file:
<p>
<TABLE SUMMARY="Example" BORDER="0" BGCOLOR="#efefef" WIDTH="100%">
<TR>
<TD>
<PRE>
<font color="#82140F">
(autoload 'gri-mode "gri-mode" "Enter Gri-mode." t)
(setq auto-mode-alist (cons '("\\.gri$" . gri-mode) auto-mode-alist))
</font></PRE>
</TD>
</TR>
</TABLE>
<p>
The first line tells Emacs that it will find out what it needs to know
about running the command `<font color="#82140F"><code>M-x gri-mode</code></font>' by loading the file
`<font color="#82140F"><samp>gri-mode.el</samp></font>'.  The second line tells it to run the command
`<font color="#82140F"><code>M-x gri-mode</code></font>' when a file with extension `<font color="#82140F"><samp>.gri</samp></font>' is visited
(thus using gri-mode with all those files).
<p>
<!-- @node   Step 4, Major Gri-mode commands, Step 3, Installing gri-mode.el -->
<a name="Step4" ></a>
<h3>12.3.4: Extra user configuration of gri-mode</h3>


<b>All users should do this at some time.</b>
<p>
At this point, gri-mode should start up when you edit a gri file.  You
may optionally customize gri-mode by:
<p>
<ol>
<li> 
 using the Custom interface (see the Help or Gri-Help menu or run the
 command `<font color="#82140F"><code>M-x gri-customize</code></font>'), or
<li> 
 manually setting variables in your `<font color="#82140F"><samp>~/.emacs</samp></font>' file.  These are
 briefly described by typing `<font color="#82140F"><kbd>C-h m</kbd></font>' while in gri-mode.  Then, for
 further infomation, use emacs' `<font color="#82140F"><code>describe-variable</code></font>' command, bound
 to `<font color="#82140F"><kbd>C-h v</kbd></font>'.  For example, for more information about the
 `<font color="#82140F"><code>gri*WWW-program</code></font>' variable, you'd type `<font color="#82140F"><code>C-h v gri*WWW-program</code></font>'
 (note that emacs does `<font color="#82140F"><kbd>Tab</kbd></font>' completion, so pressing the
 `<font color="#82140F"><kbd>Tab</kbd></font>' key after typing-in gri will display all gri related
 variables.)
</ol>
<p>
</table>
<img src="./resources/bottom_banner.gif" usemap="#navigate_bottom" border="0">

</body>
</html>