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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 27 Mar 2025 18:56:21 +0200

> From: Daniel Mendler <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 27 Mar 2025 17:39:59 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > post-command-hook is run by the same loop that decides that Emacs is
> > idle and runs timers, so the difference in practice should be very
> > small if at all.
> 
> The `post-command-hook' is guaranteed to run after a command while the
> idle timer is delayed until no new events are in the queue.

No, the idle time is run immediately if there's no input.  Emacs
doesn't wait or delay the timer.

> > Anyway, I think making the cursor change from a mode hook is a better
> > solution.
> 
> As has been mentioned, the problem is that not every scenario is covered
> by hooks, while the PCH is a potentially universal solution which can
> check arbitrary conditions. But if hooks work sufficiently well for most
> scenarios, then why not.

If there are cases that this indication supports but there's no mode
hook for them, let's discuss those cases one by one and see how to
solve them.  I see overwrite-mode, read-only-mode, and input-method
activation, all of which have hooks, AFAIR.