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: Mon, 25 Feb 2008 15:07:50 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>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.
>
> I was thining of passing it implicitly as the selected-window, just as
> the selected-frame is passed implicitly for global
> window-configuration-change-hooks.

This would make it impossible for the function to guess which window is
selected after the configuration change and/or set the selected window.
BTW `window-size-change-functions' also passes only the frame as
argument.  `window-scroll-functions' appears more intelligent.

>>BTW, shall I run it for the buffers of deleted windows too?
>
> I don't think it can be done (i.e. it would be a different hook).

Not doing it would obscure the semantics considerably - the global hook
gets run when a window is deleted, the local one not.  To do it one
would obviously have to compare the configurations before and after the
operation.

> They currently (incorrectly) use a buffer-local setting which needs to
> be run whenever set-window-buffer is set to display those buffers (so
> as to reset the [vh]scroll settings among other things).
> Making the hook global would make the code work right, but with the
> disadvantage that ...well... it would be global even though it's only
> needed when/where those buffers are displayed.

We should carefully reevaluate these hooks and how they are used.  Maybe
it's better to provide a new hook then.





reply via email to

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