[Top][All Lists]

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

Re: merging functions from octave-forge

From: Paul Kienzle
Subject: Re: merging functions from octave-forge
Date: Sun, 12 Jun 2005 18:29:20 -0400

On Jun 7, 2005, at 10:09 AM, Bill Denney wrote:

On Mon, 6 Jun 2005, Keith Goodman wrote:

Wow. Dreams do come true.

I'm glad that you like it.

I found a couple of problems.

If "savefile"  doesn't exist  (e.g., I use your hard-coded path to
your octaverc file, or make one up) savepath crashes. That's because
there is a "if (exist(savefile) == 2)" but not an else.

I fixed that (without an else, just by initializing a variable to empty).

Also I am unable to pass in a name of a file to save the path to.
That's because in

(iscellstr(varargin)) && (size(varargin{1}) == prod(size(varargin{1})))

size varargin{1} is [1 19] for something like "/home/kwg/.octaverc"
which is not equal to prod(size).

I was tired last night. I was trying to test to make sure that the string was just one row. This is fixed now.

[from other message]
I'd also put the save paths at the end of octaverc instead of at the beginning. If you save a path and then later delete a directory in the saved path, addpath will produce an error the next time you start Octave and exit octaverc before executing the other commands in the startup file.

I did that, but apparently (perhaps another bug in addpath) addpath only prints out an error, it doesn't actually error out.

Maybe be double safe (since you're changing someone's octaverc file) by adding try catch.

I added the try catch, too, but it doesn't really have an effect (though it does seem to be the correct thing to do).

I modified savepath to just save the LOADPATH and posted it to octave-forge.

This will not automatically purge directories which have been deleted.

Some changes I made were to support older versions of octave which do not allow concatenation of cell arrays.

- Paul

reply via email to

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