help-octave
[Top][All Lists]
Advanced

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

Re: saving Octave state?


From: Olaf Till
Subject: Re: saving Octave state?
Date: Tue, 30 Nov 2010 21:52:43 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Nov 30, 2010 at 03:14:58PM -0500, John W. Eaton wrote:
> On 30-Nov-2010, Mike Miller wrote:
> 
> | I decided to mimic the R filenames and call the data and history files 
> | .OData and .Ohistory (instead of .RData and .Rhistory).  This is in my 
> | ~/.octaverc file:
> | 
> | 
> | history_file (".Ohistory");
> | if ( exist(".OData", "file") == 2 )
> |     load(".OData") ;
> | endif
> | 
> | 
> | So it automatically loads history and data, if they are present.  I'm not 
> | sure if any aspect of the state of the previous instance of Octave would 
> | be missed when I launch Octave in the same directory if I had done this 
> | just before quitting the previous time:
> | 
> | save .OData
> | 
> | What do you think?
> 
> Use a function to do this with atexit if you want to ensure that this
> happens every time Octave quits.
> 
> The only thing I can think of that you are not saving is the internal
> state managed by functions like more, octave_core_file_name,
> output_precision, etc.  If you have changed any of these from their
> defaults, that info will not be saved and restored automatically.

I think there is another one: If a function returns a handle to its
subfunction, this handle can be saved but not restored to something
useful.

(This would be nice to change, but I can imagine that this is
difficult ...)

Olaf


reply via email to

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