From bug-request at octave dot org Tue Mar 21 09:33:53 2006 Subject: Re: Problems with MingW From: "John W. Eaton" To: Bill Denney Cc: David dot Bateman at motorola dot com, bugs@octave.org Date: Tue, 21 Mar 2006 10:33:42 -0500 On 21-Mar-2006, Bill Denney wrote: | David Bateman wrote: | > I'm not sure what Sebastien did but for me it should be under | > "C:\Documents and Settings\". It should be easy enough to | > adapt where this and the .octave_hist file are found, though it might | > need a patch to octave itself.. I'll try to do something after the 2.9.5 | > release to put it in Application\Data\Octave.. | > | Actually, after further consideration, what I think would be more | helpful would be for octave to use an environmental variable (I'd think | OCTAVERC): | | * If the variable didn't exist, then use some default location | (~/.octaverc in a unix-y OS, or %APPDATA%\Octave\.octaverc in windows). There are three rc files that Octave looks for. Two are system-wide and the other is per-user. The system-wide files are located in the directories specified by octave_config_info ("startupfiledir") octave_config_info ("localstartupfiledir") The prefix for these may be modified by the $OCTAVE_HOME environment variable (useful if you decide to move your installation of Octave to a directory tree other than the one specified by --prefix at configure time). The other is supposed to go in $HOME/.octaverc, so I think it belongs in the home directory of the user, even on a Windows system. I don't think we need another environment variable for this. | * If the variable is a file (or I suppose if whatever the variable | references doesn't exist), then use that file. | * If the variable is a directory, then read each file in the directory | in lexicographic order (i.e. sort(readdir(getenv('OCTAVERC')))) and | execute them in that order. If you want to implement something like this for a particular package on a particular syste, you may, as it can all be implemented in one of the system-wide rc files. But I don't think this extra complexity belongs in Octave itself. 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 -------------------------------------------------------------