emacs-devel
[Top][All Lists]
Advanced

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

Re: moving window handling into lisp


From: Lennart Borgman
Subject: Re: moving window handling into lisp
Date: Sat, 22 Aug 2009 15:45:18 +0200

On Sat, Aug 22, 2009 at 1:00 PM, martin rudalics<address@hidden> wrote:

>> So what I need is still a way to apply the new sizes without
>> restriction checks during that phase. Am I clear enough when I try to
>> explain this? How should I do to avoid the restrictions in this phase?
>
> What problems do you have doing your calculations using copies of the
> original sizes?  We can initialize these with the current values and
> retrieve via `window-new-height' and `window-new-width'.


The problem is maybe my broken English... ;-)

There is no problem doing calculations on copies. With "apply" I mean
applying the calculated sizes to Emacs windows.


>> Yes, I know that this is lacking. I have been wondering about this
>> part. It is not clear to me how resizing and deletion/creation of
>> windows are tighed together in the current code. I think those parts
>> should be broken up.
>
> It's not entirely trivial to do that.  Resizing during window deletion
> must succeed, at least in a second attempt.  So if we want to do this in
> Elisp we must be able to resize fixed-size windows and never issue a
> failure.


Yes. I expect we may have to change/override the rules in such cases.
This should be built into the routines doing the calculations.


>> Then I assume that window configurations must be used to get my
>> suggestion to work. The drawback I see then is that window pointers
>> migh gets lost. Are there any way around that?
>
> Which window pointers get lost?


I thought that using window configurations you create new windows
instead of the old ones when restoring the configuration into the
frame. Is not that how it works?

If it is then some elisp code might have pointers to the windows.


> Like "you can restore the previous configuration within a suitable
> frame-size" by hitting ...  Maybe.  Let's add it to the set of possible
> solutions.


Fine.


>>>>> You do undelete all the time.  It's completely transparent.
>>>> How can it be transparent if windows disappears and reappears? I must
>>>> be misunderstanding you somehow...
>>> There might be no redisplay in between.
>>
>> How can you avoid that when the frame gets too small?
>
> `adjust-window-trailing-edge' can temporarily delete a window and
> resurrect it without the user noticing because there's no redisplay in
> between.  When you program in Elisp you can try to inhibit redisplay but
> I would not recommend that.  In any case, I don't understand how this
> should relate to frames getting to small.


There must be some misunderstanding here. Let us skip it for the moment.


>>> In many applications (Thunderbird is one of them) I can make subwindows
>>> disappear completely by dragging one of their borders and make them
>>> reappear later by dragging on the border where they disappeared.
>>
>> Are there no sign at all that there are 0-size windows there?
>
> Thunderbird leaves a horizontal divider behind.


Thanks. What would be the corresponing divider in Emacs? I mean a mode
line for example takes one screen line and would take some space ... -
and then perhaps it will not fit...




reply via email to

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