emacs-devel
[Top][All Lists]
Advanced

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

Re: Customize ‘window-state-get/put’


From: Yuan Fu
Subject: Re: Customize ‘window-state-get/put’
Date: Sun, 13 Oct 2019 23:39:06 -0400

> 2. before calling window-state-put create these buffers with the
>   saved buffer names, so window-state-put will restore windows with the
>   same buffer names.

What I did is restore these buffer /after/ window-state-put. Because the 
information I needed is stored in window parameters.

> 
>> I go through each window and replace the buffers in them with
>> placeholder buffers and store the buffer type (breakpoint, register,
>> etc) in a window parameter.
> 
> By placeholder do you mean some default text contents to show when
> tmp buffer is not restored?  Something like “tmp buffer was here”.

I mean a dummy buffer for window-state-get to save. This buffer is not visible 
to the user in theory: I create it and put it in every window and call 
window-state-get, then swap back buffers and remove this placeholder. Then 
before window-state-put create this buffer, and window-state-put will put it in 
every window. Once I restored every windows’ buffer from their window 
parameter, I can kill the placeholder. The sole purpose of the placeholder is 
for window-state-get/put to have /something/ to save/display.

Yuan


reply via email to

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