Elijah Gabe Pérez writes:
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Elijah Gabe Pérez <eg642616@gmail.com>
>> Cc: 77224@debbugs.gnu.org, dancol@dancol.org, mail@daniel-mendler.de,
>> juri@linkov.net
>> Date: Mon, 31 Mar 2025 17:41:15 -0600
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> Let's please discuss your ideas before you implement them, to make
>> sure you don't work on some ideas that we might object to.
>>
>> Sure.
>>
>> The code needs to run each time the cursor moves, (is there
>> a function/code that do this?) and each time user changes window
>> (because cursor color is not buffer-local).
>
> I understand the general idea, but did you have more detailed ideas
> for how to implement that?
Maybe in a kind of loop?
I'm still thinking.
Another idea is to make the cursor color buffer local.
I got an idea, what about add an advice-add to setq as a kind of variable watcher? setq is the standard for changing the value to a variable, and compared to post-command-hook, it wouldn't run on every function calls, ofc the advice will be removed after disabling the minor mode.
Maybe it sounds hacky and could already been talked about in this thread that I've missed, but there are built-in packages in emacs that use advice-add.