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

From: Daniel Colascione <[email-masked]>
Date: Sun, 30 Mar 2025 14:04:40 -0400

Juri Linkov <[email-masked]> writes:

>>> Please note that this is insufficient for 'repeat-mode'.
>>> Currently it requires adding an advice to update the cursor
>>> on the repeat timer events:
>>
>> I solved this problem by wrapping the `repeat-echo-function' and `after-focus-change-function'.
>>
>> https://gist.github.com/jdtsmith/a169362879388bc1bdf2bbb977782d4f￼
>
> Interesting to see that you switched from `post-command-hook'
> to `repeat-echo-function' and `after-focus-change-function'.
>
> So we could have an option that allows switching between 1) idle timers,
> 2) 'post-command-hook', 3) a list of more specific hooks.
>
> In any case we still need to add such a condition:
>
>   (if (memq 'repeat-in-progress cursor-indicators-conditions)
>       (add-function :after repeat-echo-function #'cursor-indicators--update-indications)
>    (remove-function :after repeat-echo-function #'cursor-indicators--update-indications))
>
> that have to be added only when the customized value contains 'repeat-in-progress'.

This is exactly the sort of complexity that nobody but those on this
thread will care about and that we need to abstract behind some
stupid-easy DWIM interface.