unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* are there hooks for text becoming visible or hidden in a given window?
@ 2022-02-24 22:25 Thomas Lord
  2022-02-25  0:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thomas Lord @ 2022-02-24 22:25 UTC (permalink / raw)
  To: help-gnu-emacs


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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-27  0:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-24 22:25 are there hooks for text becoming visible or hidden in a given window? Thomas Lord
2022-02-25  0:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-25  7:07   ` Eli Zaretskii
2022-02-25 20:51     ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-25  2:42 ` Michael Heerdegen
2022-02-25  7:04 ` Eli Zaretskii
2022-02-26 21:42 ` Thomas Lord
2022-02-27  0:19   ` Emanuel Berg via Users list for the GNU Emacs text editor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).