[Maxima] (re) open and save maxima-sessions
villate at fe.up.pt
Tue Sep 25 02:24:58 CDT 2007
On Mon, 2007-09-24 at 23:08 -0600, Robert Dodier wrote:
> On 9/24/07, J. Simons <simons17 at xs4all.nl> wrote:
> > How can I (re-) open an existing Maxima in such a way that I can see the
> > whole session on my screen
> > (not only the path of the saved file).
> Not sure what you mean exactly, but perhaps the function
> "writefile" is useful to you. writefile copies stuff from the console
> to a file, so all the input and output is stored. The content of the
> file created by writefile cannot be restored.
Perhaps what J. Simons is looking for is stringout. Example:
(%i1) 3 + 5*%pi, numer;
(%i2) stringout("maxima_session.txt", input);
When I start a new Maxima session, I can then use batch to recover the
(%i2) ev(5 %pi + 3, numer)
A few things to keep in mind:
1- The %i and %o numbering will not be the same, because of the extra
batch command needed to recover the session.
2- If you use kill(all), stringout(...,input) will only save the
commands after kill was used, because the previous input
strings will be deleted from "input".
3- The abbreviated forms you use, such as "3 + 5*%pi, numer" in the
example, will be saved in its extended form, not in the abbreviated
way you wrote them.
I hope that helps J Simons.
More information about the Maxima