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: martin rudalics
Subject: Re: moving window handling into lisp
Date: Thu, 20 Aug 2009 20:15:08 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> Thanks. I did not know adjust-window-trailing-edge could delete
> windows.

It resurrects them via `set-window-configuration'.  But size_window can
delete them temporarily.  Most of this discussion was triggered by
Stefan's being unhappy with that.

> The doc string does not tell about that. I thought it was
> correct. Could you please try to get the doc string corrected to
> reflect the functions current state?

Every resize operation may delete windows.  But some like the minibuffer
resize operations and `adjust-window-trailing-edge' save the
window-configuration around resize calls to avoid that windows get
deleted.  I'm not sure whether that's of any help for you, though.

> The algorithm computes level by level in the second pass (ie on its
> way down) how the windows should be sized. So you have the sizes for
> all windows on that level at once.

I still don't understand what a "level" is.

> You can of course use
> adjust-window-trailing-edge (setting restcrictions temporary to be
> able to do that), but it seems much easier to be able to set them all
> at once. The routines we have now for setting window sizes does
> checking that has already been done by my functions then.

But that's what the functions `set-new-window-height' and
`set-new-window-width' I proposed earlier should do.

>> I can't call Elisp code in an invalid configuration.  Suppose your
>> algorithm decides that it cannot resize.  What shall the display engine
>> display then?  The invalid configuration?
>
> I am trying to understand what you mean here. You can call my routines
> before deletion.

I can't because at that time the window still exists and you don't
delete windows.  I need a resize function that's executed _as part of_
the Emacs command `delete-window'.

> It does not depend on the actuall configuration, just
> the fictive configuration you tell about.

How do I tell it about a "fictive configuration"?  You want all those
links to the next, previous, parent windows be valid, I suppose.

> Not really. I suggested:
>
> - showing an alternate single window with information that the windows
> does not fit
> - and also keep the other configuration so you can put it back when
> the window gets large enough again.
> - this should be kept by just swapping a pointer between that single
> window with information and the "real" configuration.

The canonical way to handle this is keeping "the other configuration" in
a window-configuration, something Stefan wants to avoid.  I don't get at
what you mean by "pointer swapping".  If such pointer swapping were as
easy as you believe, we could have used that all the time instead of
saving window-configurations.

> What do you find not practical about this? (The alternate single
> window should just say something like "your windows does not fit,
> please make the frame larger".)

Do you know any application proposing to enlarge its window?

> - undeleting seems terribly confusing from a users point of view.

You do undelete all the time.  It's completely transparent.

> - size-0 windows in a case like this would be the same.

Many applications do that.  But they don't have a built-in tiling window
manager like Emacs.

> - we probably can't prevetn resizing with all window managers.

martin




reply via email to

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