From bug-request at octave dot org Fri Apr 14 11:37:49 2006 Subject: Re: addpath, rmpath, savepath From: "John W. Eaton" To: "Robert S. Weigel" Cc: octave bug mailing list Date: Fri, 14 Apr 2006 12:37:39 -0400 On 11-Apr-2006, Robert S. Weigel wrote: | I was not able to make simple changes to the existing addpath/rmpath | files because there were other major differences besides the ones I | described in my first email. For example, | | * addpath('/tmp:/usr') will not add /tmp and /usr to LOADPATH whereas | xaddpath will. | | * addpath('/tmp','-end','/usr','-begin') will add /tmp to the end and | /usr to the beginning. xaddpath will try to put the directories /tmp, | -end, and /usr to LOADPATH and warn that directory "-end" was not found. | | As you will see from the demo, the current addpath and rmpath do | unexpected things besides allowing '.' to be removed or not be first. | xaddpath and xrmpath allow strange things too (most are listed in the | help). Note that xaddpath and xrmpath both generate a warning because | they set DEFAULT_LOADPATH to ''. | | If you do want these functions | | (1) In what form (besides mods to the formatting)? If you would like to get changes accepted, then please send context diffs relative to the version you started with. Please do follow the coding conventions that are used in the rest of Octave. It would help if each patch solved a single problem rather than grouping them all together in one patch. That will make it easier to discuss each change separately. | (2) What about the DEFAULT_LOADPATH warning? There is an easy workaround but | I left it out as I am certain that this is not the right way to deal with it. I'm not sure what the best thing is to do with DEFAULT_LOADPATH, but I don't think that you should set it to the empty string. Probably it should not be modified at all. Thanks, 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 -------------------------------------------------------------