help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave not finding updated edited files


From: Ben Abbott
Subject: Re: Octave not finding updated edited files
Date: Wed, 18 Mar 2009 18:07:28 +0800


On Mar 18, 2009, at 5:52 PM, Jim Maas wrote:

Thanks, questions answered within text below.

Ben Abbott wrote:
On Tuesday, March 17, 2009, at 02:02PM, "Jim Maas" <address@hidden > wrote:

This is a new one for me. I've been running octave 3.01 from the command line on a Linux pc. Usually when debugging most programmes I run them, then go and edit the file, and try running it again. I discovered that octave was not finding the newly edited file after I made some changes using Emacs. I had to exit octave and restart it again for it to find the newly edited version of the .m file that I gave it a command to execute.

Is this as it is supposed to be? Is there a way I can tell octave to reload the most recently edited file before attempting to run the script again from within octave?

Thanks

Jim


What files did you edit?

Two files, mmjam0.m script file and mmjam.m which is ode specification file, listed at bottom of this post
Where did you save them?

Was just working in a specific linux directory.

Are they in your path?

I doubt it but Octave found them. I start octave from the same directory the files are in and then type "mmjam0.m" and it executed, giving some errors. Without exiting octave, I stared emacs in another terminal and edited and saved this same .m file, then went back to octave and issued same mmjam0.m command and got same errors. Only figured out later that octave was not finding/loading the newly edited version but seemed to have one in storage somewhere and ran the same one again.

Ok. The pwd is in your path, so If you type "ls" or "dir" and see the files, everything is ok.

To run the file, you shouldn't include the ".m". Just type "mmjam0".

If the file you edited was foo.m, what do you get when you type "which foo"?

Does Octave find the file edited and saved or the unedited version?

If I quit octave and start it again it finds the newly edit file.

Ok. To can force Octave to reload the new file by typing "clear mmjam0", or just "clear all" and then run it again.

Typing "rehash" should also work.

In any event, there may be a bug present. After editing the file, please type "ls -l mmjam0.m; mmjam0" and let us know if the edited version is run or if the old version is run. If the old version does the date/time listed by "ls -l" match the new or old file?

Ben

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]