* org-clock-resolving-clocks & idle
@ 2019-02-25 17:01 Michaël Cadilhac
2019-02-27 11:30 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Michaël Cadilhac @ 2019-02-25 17:01 UTC (permalink / raw)
To: emacs-orgmode
Hi there;
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.
CAUSE: It seems that the mechanism that prevents multiple such
questions is broken. It boils down to checking whether
org-clock-resolving-clocks is non-nil in org-resolve-clocks-if-idle.
The problem is that org-resolve-clocks-if-idle then calls
org-clock-resolve, which does *not* change org-clock-resolving-clocks
(that's the job of org-resolve-clocks, it seems).
POSSIBLE SOLUTION: (if we agree there is a problem) Check for
org-clock-resolving-clocks-due-to-idleness rather than
org-clock-resolving-clocks in org-resolve-clocks-if-idle. How does
that sound? Maybe org-clock-resolve should also set
org-clock-resolving-clocks; is there a use case where
org-clock-resolve may be called multiple times (with timers probably)
with different clocks, and we'd want all of them to prompt the user?
Cheers;
M.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: org-clock-resolving-clocks & idle
2019-02-25 17:01 org-clock-resolving-clocks & idle Michaël Cadilhac
@ 2019-02-27 11:30 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-02-27 11:30 UTC (permalink / raw)
To: Michaël Cadilhac; +Cc: emacs-orgmode
Hello,
Michaël Cadilhac <michael@cadilhac.name> writes:
> 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.
Could you provide an ECM?
> CAUSE: It seems that the mechanism that prevents multiple such
> questions is broken. It boils down to checking whether
> org-clock-resolving-clocks is non-nil in org-resolve-clocks-if-idle.
> The problem is that org-resolve-clocks-if-idle then calls
> org-clock-resolve, which does *not* change org-clock-resolving-clocks
> (that's the job of org-resolve-clocks, it seems).
>
> POSSIBLE SOLUTION: (if we agree there is a problem) Check for
> org-clock-resolving-clocks-due-to-idleness rather than
> org-clock-resolving-clocks in org-resolve-clocks-if-idle. How does
> that sound?
I don't know well this part of the code base. A cursory look at commit
abfc6babcaf6e20a4c12e5c4754ce107ddc0dc7b didn't help much.
Maybe `org-resolve-clocks-if-idle' could check for
`org-clock-resolving-clocks-due-to-idleness' /in addition/ to
`org-clock-resolving-clocks'.
> Maybe org-clock-resolve should also set
> org-clock-resolving-clocks; is there a use case where
> org-clock-resolve may be called multiple times (with timers probably)
> with different clocks, and we'd want all of them to prompt the user?
I don't understand. `org-clock-resolving-clocks' is meant to prevent
calling low-level function `org-clock-resolve' unnecessarily. I don't
see a need for setting it also in `org-clock-resolve'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-27 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-25 17:01 org-clock-resolving-clocks & idle Michaël Cadilhac
2019-02-27 11:30 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).