Bug fix for clock history.
Now it is possible to select also the current clocking task after pressing C-u C-c C-x C-i. What will happen then is that this entry will be clocked out, and then clocked in again.
This commit is contained in:
parent
619e082d83
commit
c490fe784a
|
@ -209,16 +209,16 @@ the clocking selection, associated with the letter `d'."
|
||||||
ts selected-task)
|
ts selected-task)
|
||||||
(when (equal select '(4))
|
(when (equal select '(4))
|
||||||
(setq selected-task (org-clock-select-task "Clock-in on task: "))
|
(setq selected-task (org-clock-select-task "Clock-in on task: "))
|
||||||
(or selected-task
|
(if selected-task
|
||||||
(error "Abort")))
|
(setq selected-task (copy-marker selected-task))
|
||||||
|
(error "Abort")))
|
||||||
;; Are we interrupting the clocking of a differnt task?
|
;; Are we interrupting the clocking of a differnt task?
|
||||||
(if interrupting
|
(if interrupting
|
||||||
(progn
|
(progn
|
||||||
(move-marker org-clock-interrupted-task
|
(move-marker org-clock-interrupted-task
|
||||||
(marker-position org-clock-marker)
|
(marker-position org-clock-marker)
|
||||||
(marker-buffer org-clock-marker))
|
(marker-buffer org-clock-marker))
|
||||||
(let ((org-clock-inhibit-clock-restart t))
|
(org-clock-out t)))
|
||||||
(org-clock-out t))))
|
|
||||||
|
|
||||||
(when (equal select '(16))
|
(when (equal select '(16))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
@ -229,7 +229,8 @@ the clocking selection, associated with the letter `d'."
|
||||||
(org-back-to-heading t)
|
(org-back-to-heading t)
|
||||||
(when (and selected-task (marker-buffer selected-task))
|
(when (and selected-task (marker-buffer selected-task))
|
||||||
(set-buffer (marker-buffer selected-task))
|
(set-buffer (marker-buffer selected-task))
|
||||||
(goto-char selected-task))
|
(goto-char selected-task)
|
||||||
|
(move-marker selected-task nil))
|
||||||
(or interrupting (move-marker org-clock-interrupted-task nil))
|
(or interrupting (move-marker org-clock-interrupted-task nil))
|
||||||
(org-clock-history-push)
|
(org-clock-history-push)
|
||||||
(when (and org-clock-in-switch-to-state
|
(when (and org-clock-in-switch-to-state
|
||||||
|
|
Loading…
Reference in New Issue