GNU bug report logs -
#77224
[PATCH] New minor mode 'cursor-indicators-mode'
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Daniel Mendler <mail <at> daniel-mendler.de>
>> Cc: eg642616 <at> gmail.com, 77224 <at> debbugs.gnu.org, juri <at> linkov.net
>> Date: Fri, 28 Mar 2025 17:49:44 +0100
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> >> From: Daniel Mendler <mail <at> daniel-mendler.de>
>> >> Cc: eg642616 <at> gmail.com, 77224 <at> debbugs.gnu.org, juri <at> linkov.net
>> >> Date: Fri, 28 Mar 2025 16:40:29 +0100
>> >>
>> >> Eli Zaretskii <eliz <at> gnu.org> writes:
>> >>
>> >> My `post-command-hook' list looks like this:
>> >>
>> >> Buffer-local:
>> >> (jit-lock--antiblink-post-command eldoc-schedule-timer
>> >> corfu--auto-post-command jinx--reschedule
>> >> whitespace-post-command-hook hl-line-highlight t)
>> >
>> > And in Org buffers?
>>
>> The first list was from the *scratch* buffer. This one is from an Org
>> buffer:
>>
>> (eldoc-schedule-timer corfu--auto-post-command jinx--reschedule
>> whitespace-post-command-hook hl-line-highlight t)
>
> That's already problematic, IMO. And then some people might enable
> flyspell-mode on top of all that.
In my experience, there is no problem, neither in Org nor in Elisp
buffers. I wrote in my other mail:
>> I don't have any problems with these hooks, since they are either
>> cheap or only schedule some timers for more expensive operations. At
>> least I don't notice any sluggishness and the PCHs don't appear in
>> profiles.
Enabling Flyspell on top is not a realistic scenario since
`jinx--reschedule' comes from the Jinx spell checker, which is an
alternative to Flyspell. The spell checking takes place later when Emacs
is idle. The functions `jinx--reschedule', `eldoc-schedule-timer' and
`corfu--auto-post-command' only schedule timers.
The `hl-line-highlight' moves the line highlight overlay, such that it
moves immediately with the cursor and does not lag behind. This is a
similar scenario to changing the `cursor-type', where the cursor type
should immediately reflect the editing state. Yes, we will check the
cursor conditions too often, and often unnecessarily, but this does not
cause slowdown as long as the check is sufficiently fast in comparison
to the executed command.
The only seemingly problematic hook is `whitespace-post-command'. I
haven't checked it in detail. It looks complex but it mostly seems to
modify some overlays and trigger fontification. Potentially some of the
work there could be deferred.
Daniel
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.