bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Elijah Gabe Pérez
Subject: bug#77224: [PATCH] New minor mode 'cursor-indicators-mode'
Date: Sun, 13 Apr 2025 22:34:47 -0600

Elijah Gabe Pérez writes:
Eli Zaretskii <eliz@gnu.org> writes:

>> From: Elijah Gabe Pérez <eg642616@gmail.com>
>> Cc: 77224@debbugs.gnu.orgdancol@dancol.orgmail@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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]