From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: [PATCH] Fix dangling clocks created by org-clock-out-hook clocking in again Date: Sun, 3 Oct 2010 11:52:13 -0400 Message-ID: <1286121133-29921-1-git-send-email-bernt@norang.ca> References: <6D4243EC-B56A-49C8-9032-A1B0FDE5A435@gmail.com> Return-path: Received: from [140.186.70.92] (port=57046 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2QrO-0001u0-BT for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 11:52:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2QrM-0002dc-QL for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 11:52:21 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:50327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2QrM-0002dU-N7 for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 11:52:20 -0400 Received: from cpe000102d0fe75-cm0012256ecbde.cpe.net.cable.rogers.com ([99.239.148.180] helo=mail.norang.ca) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1P2QrL-000KVF-Pc for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 15:52:20 +0000 In-Reply-To: <6D4243EC-B56A-49C8-9032-A1B0FDE5A435@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Bernt Hansen This is a fixup patch to commit 17c71a40c6d07baae2e9cac606668683ddb3759c. The org-clock-clocking-in variable needs to be set when we are clocking out - in case the clock out hook clocks-in again. This fixes a bug that creates dangling clock entries. --- lisp/org-clock.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 5b4b39c..c6f05fc 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -975,7 +975,8 @@ the clocking selection, associated with the letter `d'." (move-marker org-clock-interrupted-task (marker-position org-clock-marker) (marker-buffer org-clock-marker)) - (org-clock-out t)) + (let ((org-clock-clocking-in t)) + (org-clock-out t))) (when (equal select '(16)) ;; Mark as default clocking task -- 1.7.3.1.50.g1e633