writefile does not write



Oliver Kullmann <O.Kullmann at swansea.ac.uk> writes:

> Hello,
>
> with Maxima 5.25.1 under Ecl 11.1.1 writefile creates an empty file
> upon being called, but then nothing happens, the file stays empty
> whatever happens (also after closefile).
>
> The facility of writefile would actually be very desired.
> Is there another command which achieves the effect? Perhaps
> something Ecl-specific could be written?
>
> (The motivation is the following: Again and again we are losing
> computations which already run for hours/days because of for
> example a laptop-crash when running remotely. The (Linux-)program
> screen unfortunately doesn't help --- again and again the connection
> is completely lost, no possibility to reconnect, while actually Maxima
> is still running. These computations most of the time emerge in an interactive
> session, so batchmode would be very inconvenient. If writefile would work,
> then this would solve the problem (and it could be automated, always on
> startup logging to a file with the timestamp in the name).)

To be honest, your description seems odd. Do you mean that you are
unable to re-attach to your screen session? Do you try screen -R -D? If
your screen session has died, all its children should be dead, too. It
would be helpful to know exactly what you are doing to try to reattach
to screen.

Anyhow, here are a few suggestions:

1. Start emacs in server mode (emacs --daemon), use emacsclient to
attach to the emacs session, and run maxima inside emacs.
2. Start a swank server in maxima (as Michel Talon suggested),
run your code, and you can re-attach to the maxima process through
slime.
3. Run maxima inside emacs inside screen.
4. do some combination of 1--3.

Personally, I do 1 + 3 on a day-to-day basis and I can't recall when I
last had a problem reattaching to screen.

Leo