> < ^ Date: Mon, 12 Sep 1994 11:44:00 +0100 (WET)
> < ^ From: Werner Nickel <nickel@mathematik.tu-darmstadt.de >
< ^ Subject: Re: a suggestion and a question

Dear GAP forum,

David Sibley writes:
> But there is a nice way to
> organize gap usage into projects. Keep different projects in different
> directories, each such directory containing its own .gaprc. When you
> want to work on a particular project, change to the appropriate
> directory and start gap. That runs the .gaprc in the current directory
> and makes the files in that directory easily available -- no path
> prefix is needed to Read them.

Frank already posted one way to implement the suggestion above. Here
is another solution. Change the .gaprc file in your home directory
(the `global' .gaprc file) to the following.

## Beginning of .gaprc
## We have to be careful not to run into an infinite recursion if
## GAP is started in the home directory. That is the reason why
## the whole (global) .gaprc file has to be enclosed in the
## following if-statement.
if not IsBound( HomeDirReadAlready ) then
HomeDirReadAlready := true;

## Put the contents of your .gaprc here

  ##  Read local .gaprc.
  if READ( ".gaprc" ) then
        Print( "#I  Read local .gaprc\n" );  # Just a reminder

When GAP (after the change has been made) is started, it first
executes the code that used to be in your global .gaprc file and then
reads the `local' .gaprc file in the current directory (if it exists).
This allows you to put everything specific to your project into the
local .gaprc file and to overwrite settings in the global .gaprc file.
Settings that you want to use regardless where you start GAP should go
into your global .gaprc file.

All the best, Werner Nickel.

> < [top]