|
From: | Paul Kienzle |
Subject: | Re: Octave package for Cygwin |
Date: | Thu, 12 Jun 2003 23:43:53 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3) Gecko/20030312 |
Andy Adler wrote:
On Wed, 11 Jun 2003, Doug Stewart wrote:I tried this on a w2k machine, and all worked OK. I would like to setup the edit command to point to notepad. What file should I modify? Doug stewartYou should be able to set the EDITOR environment variable export EDITOR=notepad.exe octave Unfortunately, the edit.m script in octave-force is very Unix centred. I've attached the modified edit.m that I use on windows. I'm not sure which (if any) of these changes should be checked into octave-forge.
Most of the changes could be handled by setting the appropriate variables in your .octaverc, but it would be nicer with system dependent defaults. Maybe we could query the registry on startup? I don't know how to get reasonable values for AUTHOR or EMAIL, but for HOME we could use MYDOCS/octave. WinME seems to store the My Documents key at HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Explorer -> Shell Folders -> Personal Any idea how to query the registry? In reviewing edit, I've addressed a long-standing problem. It used to require global variables, but now I've made them all static. The reason this was a problem is that all global variables known to the scope seem to be saved whenever you do something like global myvar='hello'; save x This is perhaps a bug in octave --- I certainly don't expect variables I don't mention to be saved along with the ones that I do. Instead of setting the variables using global, you will now have to use edit('variable','state') to set the state. I don't have anything to query the state. I've removed the word FUNCTION_ from all the variables since edit effectively qualifies the name. Another issue was that I was using EDITOR rather than sprintf(FUNCTION_EDITOR,"") when there is no file. I now also change to the HOME directory before starting the editor. Changing the directory before starting the editor as you have done is okay since it will work for both windows and unix. I haven't updated my copy though. Paul Kienzle address@hidden ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |