Subject: Re: bug#77224: [PATCH] New minor mode 'cursor-indicators-mode'

From: Eli Zaretskii <[email-masked]>
Date: Sat, 29 Mar 2025 10:52:12 +0300

> Date: Fri, 28 Mar 2025 21:03:10 -0400
> From: Daniel Colascione <[email-masked]>
> CC: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked],
>  [email-masked]
> 
> >Can your proposal also handle whether user moves cursor?
> >
> >Another reason why post-command-hook is used is mostly for run code
> >when user moves cursor position.
> 
> I don't see why not? You could put (point) on your change list or something. I'm imagining that we just recognize forms in this list specially and add the appropriate low level hooks internally.
> 
> >post-command-hook would run code even if user/cursor is idle and even
> >for every /(unrelated)/ function in background, which can lead to high
> >resource consumption.
> 
> Yeah. Tragedy of the commons. Too many sheep grazing on the communal Emacs event loop.

Yes, for this kind of feature to work in Emacs, there should be some
mechanism that would scan all the important changes (whose name is a
legion), and signal the relevant changes to potential clients.  That
sounds like one giant end probably quite expensive post-command-hook,
doesn't it?