From bug-request at octave dot org Wed Apr 5 13:44:47 2006 Subject: Re: addpath, rmpath, savepath From: "John W. Eaton" To: "Robert S. Weigel" Cc: bug at octave dot org Date: Wed, 5 Apr 2006 14:44:35 -0400 On 5-Apr-2006, Robert S. Weigel wrote: | octave:1> addpath('/tmp');addpath('/tmp/');path | | adds /tmp and /tmp/ to the path. This is both a compatability and an | unexpected behavior issue. Probably single trailing slashes should be removed before doing any processing. | However, tcsh allows multiple instances of the same directory in | the path environment variable which neither Octave nor Matlab do.). Not that it is useful, but I don't think there is anything currently preventing you from doing LOADPATH = "/tmp:/tmp" in Octave. | Also, you will notice that '.' gets pushed down in the path list. This is a | problem that caught me a few times. Matlab always has '.' first in the path | list (and it is not listed by when "path" is invoked, but I think it is | better to list it). I'm not sure what to do here. I don't think we should prevent people from placing "." wherever in the path they choose, or prevent them from leaving it out completely. Forcing it to always be present and first seems like a bit of a misfeature to me. | Also, I suggest a warning about incompatable behavior when the (extremely | useful) "//" syntax is used. It might be OK to have a warning, but only if warn_matlab_incompatible is true. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------