From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: [PATCH] Revert "Update modeline with effort and task name on re-clock-in" Date: Sun, 3 Oct 2010 11:21:59 -0400 Message-ID: <1286119319-28485-1-git-send-email-bernt@norang.ca> Return-path: Received: from [140.186.70.92] (port=57051 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2QOQ-00021Q-LN for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 11:22:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2QOI-0003ps-Q6 for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 11:22:26 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:49784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2QOI-0003lR-Np for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 11:22:18 -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 1P2QO8-000Bp0-Ug for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 15:22:09 +0000 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 reverts commit 4a4fbf1b8caa338a3a59f7b6f3f89b279615725d. Clocking in the currently clocking task was leaving open clock entries which is incorrect. Updating the modeline is less important than keeping correct clocking data. --- This reverts a commit I made back in December. I ran into this bug this morning clocking in the same task quickly. This was leaving open clocks which the dangling clock code tried to fix. Regards, Bernt lisp/org-clock.el | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 8979396..5b4b39c 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -959,7 +959,7 @@ the clocking selection, associated with the letter `d'." ;; We are interrupting the clocking of a different task. ;; Save a marker to this task, so that we can go back. ;; First check if we are trying to clock into the same task! - (if (save-excursion + (when (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) @@ -970,13 +970,12 @@ the clocking selection, associated with the letter `d'." (if selected-task (marker-position selected-task) (point))))) - (message "Clock continues in \"%s\"" org-clock-heading) - (progn - (move-marker org-clock-interrupted-task - (marker-position org-clock-marker) - (org-clocking-buffer)) - (let ((org-clock-clocking-in t)) - (org-clock-out t))))) + (message "Clock continues in \"%s\"" org-clock-heading) + (throw 'abort nil)) + (move-marker org-clock-interrupted-task + (marker-position org-clock-marker) + (marker-buffer org-clock-marker)) + (org-clock-out t)) (when (equal select '(16)) ;; Mark as default clocking task -- 1.7.3.1.50.g1e633