octave-maintainers
[Top][All Lists]
Advanced

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

Re: [changeset] ~/.octaverc overwrites OCTAVE_PATH!!


From: Ben Abbott
Subject: Re: [changeset] ~/.octaverc overwrites OCTAVE_PATH!!
Date: Thu, 25 Dec 2008 17:28:21 -0500


On Dec 24, 2008, at 6:04 PM, Ben Abbott wrote:

On Dec 24, 2008, at 1:17 PM, John W. Eaton wrote:

Instead of making this public, which will allow users to modify it,
please create a static function that returns the value instead.  Then
the value will still be protected from having users change it.

Regarding the load-path.cc/h portions, please review the attached changeset and comment.

This solution works for me, but only because I've basically mimicked some exiting code (I lack the expertise needed to be confident I've done this correctly).

Ben

I've completed another attempt at a changeset. The changes to load- path.h/cc should be reviewed before checking them in (btw, my apologies for neglecting to attached these files on my prior email).

With the changes in place savepath should not include path elements respecting (1) octave's core, (2) system packages, (3) user packages, (4) command line, or (5) the environment (OCTAVE_PATH) when saving the path to octaverc.

I'm uncertain as to whether or not it is proper to include the path elements respecting the user and/or system pkgs, but as these should be included during the initialization process, I decided to remove them as well (to avoid redundancy).

There are two addpath statements written by savepath() to octaverc. One adds path elements to the beginning of the path, and another adds them to the end of the path. In normal operation, the middle is representative of pathdef(). When Octave is launched via run-octave, the middle is representative of the path specified on the command line.

Ben

Attachment: changeset-octave_path.patch
Description: Binary data



reply via email to

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