Subject: Re: bug#39967: 27.0.90; how to debug point moving erratically?

From: Eli Zaretskii <[email-masked]>
Date: Sat, 07 Mar 2020 15:06:37 +0200

> From: William Rankin <[email-masked]>
> Date: Sat, 7 Mar 2020 22:16:56 +1000
> Cc: [email-masked]
> 
> I've only observed this after Emacs has been open for more than a few
> hours or overnight.
> 
> It will only happen after Emacs is idle for a few seconds, i.e. no user
> input.
> 
> The point will start jumping to different positions in the buffer, and 
> this will then repeat at regular intervals of ~0.5 seconds per jump. 
> These positions do not appear totally random, but seem like jumps of a 
> similar sized chunk of text, like they are being calculated.

If this happens when Emacs is idle, the first suspect is some idle
timer you have running.  The variable timer-idle-list holds the list
of the active idle timers, so look there for some hints.

> There is this in my init:
> 
> (advice-add 'mark-word :before
>             (lambda (&rest args)
>               (unless (looking-at-p "\\b")
>                 (backward-word))))
> 
> Could this be causing such havoc??

Unlikely, since this only runs when you invoke mark-word.