[Top][All Lists]

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

Re: 27.0.50: How can I test a buffer-local window-configuration-change-h

From: martin rudalics
Subject: Re: 27.0.50: How can I test a buffer-local window-configuration-change-hook in batch mode?
Date: Mon, 28 Oct 2019 10:39:52 +0100

> Emulating the hook would largely defeat the purpose of the test: you end
> up testing your emulation instead.

IIUC Phil is aware of that and only wanted to test whether the logic
of ‘window-configuration-change-hook’ permits to call his function in
all possible settings and whether doing so DTRT.  For that purpose, he
may have to run that hook much more often than needed in practice.

>> and (2) a buffer might never get displayed, so the function will
>> remain on the hook
> Right.  Just like it would remain on your new hook.
> I don't see this as a problem.

It goes without saying that parts of the bookkeeping overhead of
'window-configuration-change-hook' remain unaffected by whether the
hook has been set or not (due to the buffer-local settings).  But the
more often you run it manually, the more expensive it gets.

Anyway, since apart from Phil's hypothetical use case nobody else will
probably profit from the hook I proposed, let's forget about it.


reply via email to

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