From bug-request at octave dot org Tue Apr 4 15:12:11 2006 Subject: Re: addpath, rmpath, savepath From: "John W. Eaton" To: "Keith Goodman" Cc: "octave bug mailing list" Date: Tue, 4 Apr 2006 16:12:00 -0400 On 25-Mar-2006, Keith Goodman wrote: | On 3/21/06, John W. Eaton wrote: | | > instead of | > | > savefile = [ getenv ("HOME"), "/.octaverc" ]; | > error (["savepath: could not open savefile, " savefile ": " msg]); | | I made those changes. But I used filesep instead of "/" | | savefile = fullfile (getenv ("HOME"), strcat (filesep, ".octaverc")); Hmm. I'm not sure why we aren't just using tilde_expand ("~/.octaverc") so I changed it to that. | One line of code is too long (135 characters). But I wasn't sure how | to split it. | | error ("savepath: unable to parse file, %s. There was probably a start | line without an end line or end without start.", savefile); | | Users won't know what the startline and endline are (they mark where | the auto-generated content of savepath starts and ends). So how about | | error ("savepath: unable to parse file, %s.", savefile); OK, I made this change. | Anything left to be done before these functions can go into Octave | (perhaps in a new directory named path?)? I added these functions to scripts/path. I think we should have a "setpath" function and have savepath write setpath ("...") instead of LOADPATH = "..." so that saving and loading the path will continue to work properly after we eliminate built-in variables. I made this change to savepath.m and created a simple setpath.m file. 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 -------------------------------------------------------------