all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: session management with desktop and window configuration
@ 2009-12-31 11:31 martin rudalics
  2009-12-31 13:21 ` Kiwon Um
  0 siblings, 1 reply; 17+ messages in thread
From: martin rudalics @ 2009-12-31 11:31 UTC (permalink / raw)
  To: um.kiwon; +Cc: help-gnu-emacs

 > I'm now using desktop.el for managing sessions. When I do desktop-
 > read, it restore all files opened before well. Then, I'm wondering if
 > there is any way to restore window configuration as well in easy way.
 > Firstly, I tried to add some functions to the desktop hooks as
 > follows:
 >   (add-hook 'desktop-save-hook '(window-configuration-to-register ?0))
 >   (add-hook 'desktop-after-read-hook '(jump-to-register ?0))
 > However, it didn't work at all.
 >
 > The register-base window configuration save/restore are perfect to
 > what I want. But I don't know how to integrate it with desktop. Please
 > give me help.

You can't do this with desktop at the moment.  The basic problem is that
we currently cannot read window configurations from a file - a window
configuration can only be saved in memory and retrieved from there.
This obviously means that when you exit Emacs your saved window
configurations are lost forever.  In this context note also that you
can't cleanly restore a window configuration in one and the same session
if you have deleted its frame in the meantime.

Basically you should be able to write a configuration to a file as a
sequence of `split-window' functions (and some interspersed window
resizings) and execute these commands when you restart Emacs.  But you
might end up getting only an approximation of the earlier configuration
partly due to the quite unpredictable behavior of the current window
resizing code which can, for example, deliberately delete windows when
they become too small.

I'm currently contemplating functions that write window configurations
to a file and read them from there.  This way I can circumvent the
window splitting mechanism and directly construct a window-tree from the
information on the file.  This should solve the problem for you.

Meanwhile you could try out ECB which does something similar to what you
want.

martin




^ permalink raw reply	[flat|nested] 17+ messages in thread
* session management with desktop and window configuration
@ 2009-12-31 10:08 Kiwon Um
  0 siblings, 0 replies; 17+ messages in thread
From: Kiwon Um @ 2009-12-31 10:08 UTC (permalink / raw)
  To: help-gnu-emacs

Dear Emacs users:

I'm now using desktop.el for managing sessions. When I do desktop-
read, it restore all files opened before well. Then, I'm wondering if
there is any way to restore window configuration as well in easy way.
Firstly, I tried to add some functions to the desktop hooks as
follows:
  (add-hook 'desktop-save-hook '(window-configuration-to-register ?0))
  (add-hook 'desktop-after-read-hook '(jump-to-register ?0))
However, it didn't work at all.

The register-base window configuration save/restore are perfect to
what I want. But I don't know how to integrate it with desktop. Please
give me help.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-01-07  0:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.476.1262259127.18930.help-gnu-emacs@gnu.org>
2010-01-07  0:48 ` session management with desktop and window configuration David Combs
2009-12-31 11:31 martin rudalics
2009-12-31 13:21 ` Kiwon Um
2009-12-31 13:33   ` Lennart Borgman
2009-12-31 16:16     ` Richard Riley
2009-12-31 16:22       ` Lennart Borgman
2009-12-31 16:32         ` Richard Riley
2009-12-31 17:33           ` Vicente Hernando Ara
2010-01-01  1:25             ` Lennart Borgman
2009-12-31 17:32     ` martin rudalics
2010-01-01  1:27       ` Lennart Borgman
2010-01-01 14:55         ` martin rudalics
2010-01-01 15:04           ` Lennart Borgman
2010-01-01 15:18             ` martin rudalics
2009-12-31 17:31   ` martin rudalics
2010-01-01  1:29     ` Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2009-12-31 10:08 Kiwon Um

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.