emacs-devel
[Top][All Lists]
Advanced

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

Re: Wrong window end reported after splitting window


From: martin rudalics
Subject: Re: Wrong window end reported after splitting window
Date: Sun, 24 Feb 2008 23:33:46 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>I suppose what you want is to investigate all affected windows when the
>>corresponding configuration changes.  This means we'd have to change
>>`delete-window', `enlarge-window', `shrink-window',
>>`adjust-window-trailing-edge' and `set-window-configuration' as to walk
>>all windows on the frame, check whether one of the associated buffers
>>has a non-nil local value for `window-configuration-change-hook', and
>>run that hook (in addition to a global hook).

> Indeed, it may be "too much work" but might be worth the trouble.
> Otherwise buffer-local settings for window-configuration-change-hook
> simply don't make any sense.

I'm not sure whether buffer-local settings make sense at all.  You have
to walk windows anyway to find out which window is affected.  IMHO a
buffer-local hook makes sense here iff the affected window is passed as
argument.

>>The question here is what
>>to do when the same buffer is shown in two or more windows on the
>>affected frame - should we call the hook twice in that case?
>
> The behavior of window-configuration-change-hook is clearly documented
> as being run "once per frame", so the hook function are currently
> responsible for cycling through  the windows  of the frame
> if/when needded.

You mean they "should" be responsible?

> [ This doesn't rule out running the hook twice or more, tho, since we
>   don't specifically say how careful Emacs should be in avoiding to run
>   it redundantly. ]

When I show the same buffer twice in the frame and run the hook twice
for the buffer how do I convey the feedback for _which_ window the hook
is run?  BTW, shall I run it for the buffers of deleted windows too?

> Looking at it again, maybe the right thing to do is to make the
> window-configuration-change-hook be treated differently for buffer-local
> vs global settings: the global settings are run like now, but we also
> cycle through the windows looking for buffer-local settings and we run
> each one of them "once per window".

That's what I meant.
>
> At least for image-mode and doc-view-mode's use of
> window-configuration-change-hook, this would do the right thing.

Please elaborate.





reply via email to

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