Use (x)emacs.
(A) It auto-saves; (trivially) you won't lose work.
(B) After you eval
gnuserv, you can (in an X session) execute
gnuclient to attach to the running emacs, where you'll find all the buffers open and in the state you last touched them. I use this to continue across network glitches, which terminate my ssh session and the X11 forwarding across it. I start the main xemacs process as follows,
Code:
DISPLAY= screen -d -m xemacs -unmapped -f gnuserv-start
The first is sh/bash syntax to unsetenv DISPLAY, so that the xemacs will survive loss of the X server. I run an unmapped xemacs inside screen (also unmapped) to make it immune to hangups.
Well, that's just an individual app, but highly useful to me. A more generic approach might be
vncserver, which starts
Xvnc. "
It is based on a
standard X server, but it has a "virtual" screen rather than a physical
one. X applications display themselves on it as if it were a normal X
display, but they can only be accessed via a VNC viewer".