Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!talos!kjones From: kjones@talos.pm.com (Kyle Jones) Newsgroups: comp.emacs Subject: Re: Saving/Restoring state in GNU Emacs 18.55 Summary: save-context + interval timers should do the job Message-ID: <1990Jul16.182327.9731@talos.pm.com> Date: 16 Jul 90 18:23:27 GMT References: <9474@uswat.UUCP> <668@venice.SEDD.TRW.COM> Lines: 38 Naim Abdullah: > I am currently using a machine that sometimes crashes and destroys > my carefully built state in GNU emacs (all the files and buffer > that I am editing). Steven L. Baur writes: > What you definitely want to use is saveconf.el, but that is not much > help against system crashes (your state information doesn't get written > out). Your best hope is to use saveconf, exit emacs periodically, and > restart it. As someone recently posted, you needn't exit, just "M-x save-context". > [...] Maybe someone wants to add code to saveconf.el to periodically > write out window state? No need. Get a copy of my timer package, which consists of: timer.el: a library of Lisp functions that implement and support general purpose interval timers for GNU Emacs; timer.c : a small C program that accesses the system clock. It's probably in the OSU archives and I can send it directly to those without access. With the timer package installed you can say (start-timer "context-auto-save" 'save-context 300 300) in your .emacs file to cause window contexts to be saved every five minutes. Put: (setq save-buffer-context t) in your .emacs also if you want the contexts of all buffers saved, otherwise you will just get only those buffers that have a window.