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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 04 Apr 2025 13:49:34 +0300

> From: Elijah Gabe Pérez <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked],
>   [email-masked]
> Date: Thu, 03 Apr 2025 17:08:41 -0600
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> 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.

The place where Emacs sets the cursor is well-defined, but calling
display-related functions from there could be tricky, because we are
in the middle of redisplay at that point.

I would first suggest to try using window-scroll-functions for this
purpose, maybe they are all you need.

> > And I'm not sure I understand why cursor movement needs this to run,
> > since the cursor appearance doesn't depend on its position, it depends
> > on state of overwrite-mode, buffer-read-only, and other similar state
> > variables, which don't change with buffer or cursor position.  So what
> > am I missing?
> 
> Because I had planned to implement this part of the TODO for this
> package (since I think it fits for this):
> 
>   (L848) ** Optionally make the cursor a little thinner at EOL and EOB

That could be a separate feature, implemented differently.

> Honestly, I'm getting a little tired, so I'm going to put this on pause
> until I come up with an idea or someone wants to work on it.

Understood.  Apologies if I added to your tiredness.