From 4a4fbf1b8caa338a3a59f7b6f3f89b279615725d Mon Sep 17 00:00:00 2001 From: Bernt Hansen Date: Wed, 2 Dec 2009 11:40:42 -0500 Subject: [PATCH] Update modeline with effort and task name on re-clock-in Skip clocking out when we are clocking in the same task that is currently clocking but go through the normal clock-in setup so a modified task name or effort property is updated in the modeline. --- lisp/org-clock.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 12f1c99c4..28435d54e 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -855,7 +855,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! - (when (save-excursion + (if (save-excursion (unless selected-task (org-back-to-heading t)) (and (equal (marker-buffer org-clock-hd-marker) @@ -866,12 +866,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) - (throw 'abort nil)) - (move-marker org-clock-interrupted-task - (marker-position org-clock-marker) - (marker-buffer org-clock-marker)) - (org-clock-out t)) + (message "Clock continues in \"%s\"" org-clock-heading) + (progn + (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