From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Micha=C3=ABl_Cadilhac?= Subject: org-clock-resolving-clocks & idle Date: Mon, 25 Feb 2019 17:01:15 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:38261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyJdz-000737-QK for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 12:02:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyJdz-0007ql-1M for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 12:02:19 -0500 Received: from cadilhac.name ([163.172.56.42]:50666 helo=mattermost.cadilhac.name) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyJdx-0007GP-7B for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 12:02:17 -0500 Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) by mattermost.cadilhac.name (OpenSMTPD) with ESMTPSA id 216edc4d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 25 Feb 2019 17:01:52 +0000 (UTC) Received: by mail-ua1-f43.google.com with SMTP id v26so9046025uap.4 for ; Mon, 25 Feb 2019 09:01:52 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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.