At 01:45 PM 10/10/00 -0500, Ray Butte wrote:
>
>This is slightly off-topic, but may be of interest and value to JDE users.
>
>The emacs manual reads:
>-------------------------------------------------
>You can save the window configuration of the selected frame in a register,
>or even the configuration of all windows in all frames, and restore the
>configuration later.
>
>C-x r w r 
>      Save the state of the selected frame's windows in register r
(window-configuration-to-register). 
>C-x r f r 
>      Save the state of all frames, including all their windows, in
register r (frame-configuration-to-register). 
>
>Use C-x r j r to restore a window or frame configuration. This is the
>same command used to restore a cursor position. When you restore a frame
>configuration, any existing frames not included in the configuration
>become invisible. If you wish to delete these frames instead, use C-u C-x
r j r.
>-------------------------------------------------
>
>I use desktop.el to save my various JDE project configurations, (very
handy) but
>I can't figure out how to save the above-mentioned registers between
sessions.
>Anyone out there know how this is done?
>
>desktop.el says:
>--------------------------------------------------
>;;  (load "desktop")
>;;  (desktop-load-default)
>;;  (desktop-read)
>;;
>;; Between the second and the third line you may wish to add something that
>;; updates the variables `desktop-globals-to-save' and/or
>;; `desktop-locals-to-save'.  If for instance you want to save the local
>;; variable `foobar' for every buffer in which it is local, you could add
>;; the line
>;;
>;;  (setq desktop-locals-to-save (cons 'foobar desktop-locals-to-save))
>--------------------------------------------------
>
>but how do we get window registers saved?  
>

Hi Ray,

AFAIK, there is no quick-and-dirty way to do what you want. The Emacs
window configuration functions save windows configurations as opaque lisp
objects. There is no direct way to write opaque Lisp objects to a file and
recover them. To do what you want is, I believe, possible in Lisp, but
would require a Lisp program that cycles through all the frames open in
your session, gets and saves their screen locations and sizes to a file
and, for each frame, the windows open in each frame, their heights, and the
files displayed in each frame. I don't know of any existing Lisp program
that does this.

- Paul

Reply via email to