octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: path handling


From: John W. Eaton
Subject: Re: path handling
Date: Thu, 11 May 2006 18:02:52 -0400

On 11-May-2006, John W. Eaton wrote:

| On 11-May-2006, Søren Hauberg wrote:
| 
| | In R, you have to load you packages manually in a similar way. 
| 
| | Is it? I'm probably misunderstanding things, as I don't really see the mess.
| 
| The mess is that I would like for some things to happen automatically.
| I don't think that users should not have to explicitly load packages
| that are installed in a system directory.
| 
| Perhaps the simplest solution is to just use genpath on the system
| directories when Octave starts and then leave everything else to the
| user.  This approximates what we had before, but explicitly lists the
| directories in the default path.

OK, I've checked in another largeish change that implements this.
Here is what I added to the NEWS file:

 ** The way Octave handles search paths has changed.  Instead of
    setting the built-in variable LOADPATH, you must use addpath,
    rmpath, or path to manipulate the function search path.  These
    functions will maintain "." at the head of the path, for
    compatibility with Matlab.

    Leading, trailing or doubled colons are no longer special.
    Now, all elements of the search path are explicitly included in
    the path when Octave starts.  To display the path, use the path
    function.

    Path elements that end in // are no longer searched recursively.
    Instead, you may use addpath and the genpath function to add an
    entire directory tree to the path.  For example,

      addpath (genpath ("~/octave"));

    will add ~/octave and all directories below it to the head of the
    path.


I think path, addpath, rmpath, and genpath should be mostly
compatible.  If not, I'm sure I'll find out fairly soon...

Now I guess it's time to move on the the guts of the pathsearching
code and clean that up in preparation for private directories, etc.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]