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: Sat, 12 Oct 2019 12:25:52 -0400

> If I'm not mistaken, there are occasions where window.el is the only
> place to handle them.  Think of a state saved somewhere during a
> session that contains references to dead temporary buffers.  To
> resurrect such a state it might be nice to have a function that
> restores these buffers from information stored by 'window-state-get'
> or at least do something reasonable (whatever that is).

Restoring buffer could probably done by the caller of window-state-set. And the 
caller of window-state-get can save information into window-parameters for 
later restoration. Restoring buffers outside window-state-put also gives more 
flexibility, albeit less straightforward. I claim the caller is more flexible 
when restoring buffers is because it knows more and can keep track of things: 
what buffer has been displayed, what other windows are displaying, etc. 

> I suppose that, as a rule, placeholder buffers never get killed.  Right?

It is killed (only one placeholder buffer) after calls to window-state-get and 
window-state-put.

> Fine.  But, I still think that a solution built into the window state
> functions would be more profitable.  And if it's an empty buffer name
> advising 'window-state-put' to look up the associated window's
> parameter list for instrcutions on how to populate that window.

It certainly is nice to have such a feature. Although questioning the 
necessity, I have no objection to it. 

Yuan


reply via email to

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