emacs-devel
[Top][All Lists]
Advanced

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

Re: Window configurations


From: martin rudalics
Subject: Re: Window configurations
Date: Thu, 17 Jun 2010 12:20:43 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> If frame-local buffer-lists are flawed, they should be fixed.
> But I think window-local buffer-lists should be modelled after
> frame-local buffer-lists.  A frame-local buffer-list is a frame
> parameter,

... implemented within the frame structure ...

> so a window-local buffer-list could be a window parameter,
> with more information associated with every element (window-start,
> window-point, quit-restore function).
>
>> I suppose that for the moment I'll abandon the idea of window local
>> buffer lists and return to them after I have solved some other issues.
>
> You will need window-local buffer-lists anyway to correctly restore
> previous places when quitting the window.  IOW, instead of
> `quit-restore-window' parameter (that saves only 1 previous place),
> you can add a window parameter `buffer-list' (and use it to restore
> previous places when quitting) that later could combine its values
> with frame-local `buffer-list' and global `buffer-list' for the
> function `(buffer-list)'.

Yes.  But my `quit-restore-window' parameter was a very simple start.
It doesn't use markers and doesn't do much when a window's buffer no
longer equals that specified in the parameter.  OTOH, `view-mode' has
other pitfalls like the need for copying the parameter when splitting
the window.

>> The problem is that the information contained there might be already
>> stale (the user might have done a lot of things in between).  For help
>> windows it makes sense to check whether the window still displays the
>> help buffer and only if it does I proceed according to the information
>> stored in the window parameter.  For arbitrary buffers in non-dedicated
>> windows I might just violate the principle of least surprise.
>
> I see no such problems for `view-return-to-alist', so maybe it won't
> a problem for other buffers too.

It does not have problems because you do it via `View-quit', hence the
window is probably still the same window showing the same buffer.  If
you switch to another buffer in an earlier popped up help window, then
having a later `unbury-buffer' delete that window might be surprising.

martin



reply via email to

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