Morgan Smith <[email protected]> writes:

> I decided to clean up org-clock slightly by putting all the modeline stuff in
> one place.  While the initial goal was simply cleanup, this does include some
> improvements.
>
> Tests pass after each patch on emacs 30.2.
> Tests pass after final patch on emacs 28 and 29.
> Tests pass after final patch with TZ set to UTC, Europe/Istanbul, and
> America/New_York.
>
>
> In the existing code, `org-clock-cancel' didn't cancel the timers so they 
> would
> run regularly for no reason.  This is fixed in the first patch.
>
> I've always been a little annoyed that the time in the modeline will update 
> out
> of sync with the clock information.  The second patch synchronizes everything
> nicely.
>
> The third patch is totally optional.  Feel free to exclude it if you don't 
> like
> it.  Users already have control over repeated timer activations with the
> variable `timer-max-repeats'.  I'm currently in the middle of diagnosing a 
> hang
> I get when resuming from suspend.  I don't believe this is a major 
> contributor.

Please take a look at
https://git.sr.ht/~yantar92/org-mode/tree/feature/refactor-deps-v2/item/lisp/org-clock-core.el
and other org-clock* files there. I believe that most of the issues you
tried to address should be fixed there.
If you want, you can try to port the changes on that branch to main and
we can apply them separately.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to