From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kai Tetzlaff Subject: Re: Org-mode version 6.31trans; Problem with new 'away time' feature Date: Fri, 23 Oct 2009 10:20:44 +0200 Message-ID: References: <825D1FA3-229B-4F36-B12D-C5CADFA3ABCB@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1FOx-0000I6-34 for emacs-orgmode@gnu.org; Fri, 23 Oct 2009 04:21:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1FOs-0000HP-MZ for emacs-orgmode@gnu.org; Fri, 23 Oct 2009 04:21:34 -0400 Received: from [199.232.76.173] (port=51297 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1FOs-0000HM-HQ for emacs-orgmode@gnu.org; Fri, 23 Oct 2009 04:21:30 -0400 Received: from lo.gmane.org ([80.91.229.12]:44256) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N1FOs-0000EV-7R for emacs-orgmode@gnu.org; Fri, 23 Oct 2009 04:21:30 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N1FOi-0003GO-Ek for emacs-orgmode@gnu.org; Fri, 23 Oct 2009 10:21:20 +0200 Received: from ppp-88-217-20-136.dynamic.mnet-online.de ([88.217.20.136]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Oct 2009 10:21:20 +0200 Received: from kai.tetzlaff by ppp-88-217-20-136.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Oct 2009 10:21:20 +0200 In-Reply-To: <825D1FA3-229B-4F36-B12D-C5CADFA3ABCB@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 John Wiegley wrote: > On Oct 22, 2009, at 6:32 PM, Kai Tetzlaff wrote: > >> 'Cannot restart clock because task does not contain unfinished clock' >> >> When i look at the corresponding clock line the previously running clock >> has now indeed been stopped (with a time stamp corresponding to the >> current time). > > This is an interesting bug. It sounds like the point is not being moved > to the correct location to perform the clock-in. I'll take a look. I did some additional investigation and found that if i'm clocking into an item with an unresolved inactive clock from the agenda (created by deleting the end time in its most recent CLOCK: line) a similar thing happens. I'm actually getting clocked out of the current clock and a new CLOCK line gets added which is then the running clock. Don't know if this helps but stepping through the code in the debugger i get to the following code in org-clock-resolve-clock: ((eq resolve-to 'now) (if restart-p (error "RESTART-P is not valid here")) (if (or close-p org-clock-clocking-in) <-- org-close: nil, org-clock-clocking-in: t (org-clock-clock-out clock fail-quietly) <-- clock-out done here (unless (org-is-active-clock clock) (org-clock-clock-in clock t))))