GNU bug report logs -
#77224
[PATCH] New minor mode 'cursor-indicators-mode'
Previous Next
Full log
View this message in rfc822 format
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Cc: eg642616 <at> gmail.com, 77224 <at> debbugs.gnu.org, juri <at> linkov.net
> Date: Thu, 27 Mar 2025 10:42:21 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> The problem with the idle timer is that it might not run immediately.
> >
> > That depends on the value of the SECS argument to run-with-idle-timer,
> > doesn't it.
>
> No, there is no guarantee that the idle timer will run soon enough after
> the given time if Emacs stays busy.
If Emacs is busy, the post-command-hook will not run, either. When a
command exits, it return to the main loop, and unless the user types
something before that, Emacs then becomes "idle".
> > Sorry, I object to adding stuff to post-command-hook in these cases.
> > Emacs becomes very sluggish, and we should avoid that as much as we
> > can.
>
> I see your point about sluggishness and I am very careful myself to not
> enable modes which add expensive computations to the
> `post-command-hook'. Nevertheless in this case using the
> `post-command-hook' is the right thing, such that the `cursor-type' is
> changed effective immediately, as had been done before in CUA, see
> `cua--post-command-handler-1'. The computation in this case is not
> expensive.
I disagree that the cursor must change "immediately", in the rigorous
sense of that word. I think if it changes after 10 or 20 or 50
milliseconds, that's "immediately" for any practical purpose.
This bug report was last modified 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.