[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: are there hooks for text becoming visible or hidden in a given windo
From: |
Michael Heerdegen |
Subject: |
Re: are there hooks for text becoming visible or hidden in a given window? |
Date: |
Fri, 25 Feb 2022 03:42:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Thomas Lord <lord@basiscraft.com> writes:
> I couldn't find anything like this and I don't see a clean
> alternative.
Reminds me of the task I had to solve when implementing "on-screen.el" -
a package that indicates the formerly visible region after scrolling a
window. What you want is nearly the same: observe the visible region of
a window, do something (involving redisplay) when it changes.
It was surprisingly tricky to do. I didn't use jit-lock, I used hooks.
Dunno if the solution I implemented is a good one, aesthetically, but it
worked reliably over the years, so that approach is somewhat tested.
Michael.