emacs-devel
[Top][All Lists]
Advanced

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

RE: How to restore the layout?


From: Drew Adams
Subject: RE: How to restore the layout?
Date: Mon, 1 Jul 2013 07:11:16 -0700 (PDT)

>  > - What to do about minibufferless frames and minibuffer-only frames?
> 
> When saving we will have to establish a relationship between each
> minibuffer-less frame and its associated minibuffer frame.  When
> restoring we first have to create the minibuffer frame(s) and then
> create the minibuffer-less frames and redirect them to their minibuffer
> frame(s).  When at this time a normal frame (with minibuffer window)
> remains, we probably have to delete it - AFAIK there's no function to
> convert an existing minibuffer-equipped frame to a minibuffer-less one.
> 
> I think anyone needing such an arrangement will have to write the
> appropriate code.  Here we only have to make sure that (some sort of)
> frame names can be written by desktop so we can use them later when
> restoring the frame/minibuffer relationships.

Another possibility/suggestion, from little-to-no knowledge of this
stuff: Simply do not record or restore a minibuffer-only frame.
Otherwise, record the `minibuffer' property of a frame, including the
case where it is nil (no minibuffer).

That should at least handle the case of someone who restores a desktop
in an Emacs session that already has a standalone minibuffer.  (But
from your message I now have a doubt: is it necessary to associate the
ordinary restored frames with the existing standalone minibuffer?)

And I think that is the common (only?) standalone minibuffer frame
scenario, I believe.

There are perhaps other use cases, e.g., where the desktop is
invoked/restored before the Emacs session has created its standalone
minibuffer.  Dunno - can't really speak to such scenarios.

But for the usual (?) case, where an Emacs session exists with a
standalone minibuffer and *then* you restore a desktop, I would guess
(naively) that it should work perfectly.

Keep in mind that to use a standalone minibuffer you really need to
set it up at startup time, e.g., from the command line or from your
init file.  You cannot add a (useful) standalone minibuffer after Emacs
has already created its first frame, which has its own minibuffer.

Correction of that last observation welcome.  But it seems to be the
case.  My simple proposal above (do not record/restore minibuffer-only
frames) is, I guess, based on it.



reply via email to

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