GNU bug report logs - #77224
[PATCH] New minor mode 'cursor-indicators-mode'

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Sun, 23 Mar 2025 22:59:03 UTC

Severity: normal

Tags: patch

Full log


Message #47 received at 77224 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Mendler <mail <at> daniel-mendler.de>
Cc: 77224 <at> debbugs.gnu.org, eg642616 <at> gmail.com, juri <at> linkov.net
Subject: Re: bug#77224: [PATCH] New minor mode 'cursor-indicators-mode'
Date: Thu, 27 Mar 2025 10:38:02 +0200
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  77224 <at> debbugs.gnu.org,  Juri Linkov
>  <juri <at> linkov.net>
> Date: Thu, 27 Mar 2025 06:48:15 +0100
> 
> Elijah Gabe Pérez <eg642616 <at> gmail.com> writes:
> 
> >> Would it be better to use an idle timer instead?  post-command-hook
> >> tends to make Emacs sluggish.
> >
> > Yeah, that is that what worried me when i decided to use that hook.
> >
> > I've fixed the patch to use only idle-timer instead.
> 
> 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.

> However when the user changes the input method, overwrite mode or
> similar, the users expects that the cursor reflects the change
> immediately after the last key press and does not lag behind. Therefore
> I think there is no alternative to the `post-command-hook'. It seems to
> me that only a bunch of mode variables are checked and then
> `cursor-type' is set. In CUA the cursor indicator is also updated in the
> `post-command-hook'. So this should not be too costly?

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.




This bug report was last modified 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.