From bug-request at octave dot org Wed Apr 5 20:26:20 2006 Subject: Re: addpath, rmpath, savepath From: Paul Kienzle To: "John W. Eaton" Cc: "Robert S. Weigel" , bug@octave.org Date: Wed, 5 Apr 2006 21:24:38 -0400 On Apr 5, 2006, at 2:44 PM, John W. Eaton wrote: > On 5-Apr-2006, Robert S. Weigel wrote: > > | 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. Compatibility is not a compelling concern here. While you could construct a perverse script that changed your working directory within itself to pick up the correct function then changed back, I doubt there is any code in the wild which relies on this feature. From a usability point of view, '.:' should be the default loadpath so that people can run octave without having to know about ~/.octaverc. I think addpath would most closely match users expectations if it defaulted to adding the path after '.' if '.' is on the path, or at the front. So long as there is a way to force the precise behaviour desired (e.g., by setting LOADPATH appropriately) then addpath should be free to act in the most reasonable manner. > | 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. Octave packages should use the octave packaging system, in which case we won't be writing code that adds path//, so this isn't an important issue. Hopefully system functions are implicitly interpreted with warn_matlab_incompatible off. - Paul ------------------------------------------------------------- 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 -------------------------------------------------------------