[changeset] ~/.octaverc overwrites OCTAVE_PATH!!
Ben Abbott
bpabbott at mac.com
Sat Jan 24 14:17:50 CST 2009
On Dec 25, 2008, at 5:28 PM, Ben Abbott wrote:
>
> 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
I've pushed this changeset as well.
Ben
More information about the Octave-maintainers
mailing list