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;
(%o1) 18.70796326794897
(%i2) stringout("maxima_session.txt", input);
(%o2) /home/villate/maxima_session.txt
When I start a new Maxima session, I can then use batch to recover the
previous session:
(%i1) batch("maxima_session.txt")$
batching /home/villate/maxima_session.txt
(%i2) ev(5 %pi + 3, numer)
(%o2) 18.70796326794897
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.
Regards,
Jaime Villate