From bug-request at octave dot org Thu Apr 6 11:25:39 2006 Subject: Re: addpath, rmpath, savepath From: "John W. Eaton" To: "Robert S. Weigel" Cc: bug at octave dot org Date: Thu, 6 Apr 2006 12:25:25 -0400 On 6-Apr-2006, Robert S. Weigel wrote: | It looks like we can satisfy all of the opinions voiced with a | | traditional_path_mode | | variable. | | If this new variable is acceptable, the plan is | | traditional_path_mode: | '.' always on top and stripped from anywhere in LOADPATH and DEFAULT_LOADPATH | on first call of addpath/rmpath. | Calls to addpath/rmpath with '/path//' give warning that syntax is not allowed | with traditional_path_mode=1; '/path' is added to the path. | | warn_matlab_incompatible: | Warning when '.' is removed and when '//' is passed. Existing '//'s in path | do not generate warning. | | all modes: | Treat path with single trailing slash as identical to path with no trailing | slash. No other changes to current behavior. | | I will submit a protototype of the above-defined addpath and rmpath on the | weekend. OK. Please submit a patch relative to the current CVS sources. | Moreover, | because making Octave relocatable involves tinkering with DEFAULT_LOADPATH, I Moving an Octave installation should only require setting OCTAVE_HOME in the environment before running the Octave binary. The default for OCTAVE_HOME is whatever was used for --prefix when running configure (default == /usr/local). | Should warn_matlab_incompatible only return warning if the called .m file | (and its callees) is not in the Octave directory tree? For example, try | | warn_matlab_incompatible=1 | rmpath('./') | | on Octave-2.9.5. Seems like only user-created functions should have a | warning. Yes, Paul mentioned this, and I replied: This is not currently true, as warn_matlab_incompatible is applied globally. I agree that it would be good for it to not apply to system functions, but I'm not motivated enough to make the necessary changes myself. Patches, anyone? 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 -------------------------------------------------------------