From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: [PATCH] Fix dangling clocks created by org-clock-out-hook clocking in again Date: Sun, 03 Oct 2010 17:53:01 -0400 Message-ID: <87zkuvj64i.fsf@gollum.intra.norang.ca> References: <6D4243EC-B56A-49C8-9032-A1B0FDE5A435@gmail.com> <1286121133-29921-1-git-send-email-bernt@norang.ca> <7A156256-30D5-4E51-8E7E-DBEE9A760BCF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=34102 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2WUW-0001Zn-3F for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 17:53:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2WUU-0004cp-QL for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 17:53:07 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:53478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2WUU-0004cP-N0 for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 17:53:06 -0400 In-Reply-To: <7A156256-30D5-4E51-8E7E-DBEE9A760BCF@gmail.com> (Carsten Dominik's message of "Sun, 3 Oct 2010 23:23:12 +0200") 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Hi Carsten, Sure - although I think my patch is already against origin/master that is up to date. It's available at git://git.norang.ca/org-mode.git fixup-dangling-clock Let me know if you want the patch reposted to the mailing list. Regards, Bernt Carsten Dominik writes: > Hi Bernt, > > I am having some problem here with the patches - could you please make > me a new patch against the current master? > > Thanks! > > - Carsten > > On Oct 3, 2010, at 5:52 PM, Bernt Hansen wrote: > >> 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 >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode