help-gnu-emacs
[Top][All Lists]
Advanced

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

are there hooks for text becoming visible or hidden in a given window?


From: Thomas Lord
Subject: are there hooks for text becoming visible or hidden in a given window?
Date: Thu, 24 Feb 2022 14:25:39 -0800
User-agent: Roundcube Webmail/1.3.17


Dear Emacs Lisp hackers,

Is there a way to mark a region of text in a buffer, so that when that text becomes visible in any window, or when it stops being visible, a hook is called and provided the location of the text in the buffer, and the window in which its visibility has changed?

I would like to implement a feature that when certain text changes visibility, the contents of separate buffer are automatically changed. For example, if a markdown image link scrolls into view in one buffer, the image itself would appear in a second window, but disappear from the second window if the link is deleted or scrolled outside of the window.

I couldn't find anything like this and I don't see a clean alternative. Watching scroll events would only cover part of the problem and I'm worried about the interactive performance of having to frequently search the range of visible text for text with a certain property or within a certain overlay.

Thanks,
-t



reply via email to

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