[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Resolving idle clocks needs multiple keystrokes [9.5.2 (release_9.

From: Ignacio Casso
Subject: [BUG] Resolving idle clocks needs multiple keystrokes [9.5.2 (release_9.5.2-24-g668205 @ /home/ignacio/repos/emacs/lisp/org/)]
Date: Sat, 12 Mar 2022 12:07:09 +0100
User-agent: mu4e 1.6.10; emacs 29.0.50


> CONTEXT:  When I'm idling with the clock running, Org asks if I want
> to resolve the clock when I come back (this is by setting
> org-clock-idle-time).
> PROBLEM: I'm not sure how recent the change was, but Org started
> asking me _multiple times_ what I want to do when back.

I have this problem, already reported but not solved in these threads
and maybe others:

I have investigated a little and it seems that there is a timer that
calls org-resolve-clocks-if-idle every minute, and if
(org-user-idle-seconds) is greater than 60*org-clock-idle-time, that
function prompts the user to resolve the clock. The problem is that this
prompt blocks Emacs, and if you are idle (org-clock-idle-time + N)
minutes, the other N scheduled calls to org-resolve-clocks-if-idle occur
immediately after answering the prompt. But for some reason (a bug?),
answering the prompt does not affect (org-user-idle-seconds), so the
prompt appears again, and you have to answer it N times (unless your
answer was to cancel the clock or clock out).

So the problem is in (org-user-idle-seconds), which in my window system
boils down to a call to (current-idle-time). It should return 0 after
answering the prompt, but in my system it keeps counting up. At this
point I stopped investigating since that function is defined in C.

Since this bug is already old and I have not found much information
about it, I assume that in most systems answering the prompt does reset
the idle timer and this bug does not occur. As a quick fix for those
systems where this is an issue, we could reset the idle timer ourselves
after the prompt in org-resolve-clocks-if-idle.

What do yo think?

Emacs  : GNU Emacs 29.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2022-03-11
Package: Org mode version 9.5.2 (release_9.5.2-24-g668205 @ 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]