[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: customizing emacs windows

From: Lennart Borgman (gmail)
Subject: Re: customizing emacs windows
Date: Thu, 24 May 2007 21:29:00 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070326 Thunderbird/ Mnenhy/

Eli Zaretskii wrote:
Date: Thu, 24 May 2007 15:55:24 +0200
From: "Lennart Borgman (gmail)" <address@hidden>
CC:  address@hidden

However I do not know if there is a way to save it. It contains the information needed in something that looks like #<window-configuration> when trying to print it. Is there a way to print this so that it can be saved?

winner.el uses functions from ring.el to maintain its info.  The
various print functions are your friends.  Reading those hashed
objects might be a little tricky, but you could perhaps use the
technique similar to desktop.el to output, instead of the objects,
function calls that create the objects.

I think it is only you get back from (current-window-configuration) that holds the information that winner.el uses to restore the windows. Everything is there so winner.el does not have to do very much.

Unfortunately you can not investigate the value of this and it prints just as #<window-configuration>. I think I remember now that we (I do not know if you were involved) discussed this on the devel list.

Because of this I use (window-tree) instead which gives the necessary window structure information.

For now I can not see any other way to save the window configuration than something similar to what I have done in winsav.el.

It is however complicated to do this on the lisp level (as in winsav.el), the window layout is probably more easier handled on the C level, like in set-window-configuration. So for a long term solution I would think it is much better to enhance the printed representation of the value of (current-window-configuration) so that it could be used together with (set-window-configuration) for save/restore from file. A bit more than the printed representation must be added of course, but I guess that is clear.

Eli, I would be glad if you put this in etc/TODO. I think that at the splitting of the top level in window tree is also a matter to consider there. (That this can not be done was the main reason for writing winsav.el.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]