[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug: Total shown clocked time of inlinetask includes the clocking of the
From: |
Ihor Radchenko |
Subject: |
Bug: Total shown clocked time of inlinetask includes the clocking of the parent task [9.3.7 (release_9.3.7-783-gd307b6 @ /home/yantar92/.emacs.d/straight/build/org/)] |
Date: |
Sat, 15 Aug 2020 12:18:36 +0800 |
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
I have noticed that total clocked time shown while clocked-in into
inlinetask includes the clocked time of its parent task.
Expected behaviour: only the clocking time for the inline task itself
should be shown.
This can be fixed if org-clock-sum-current-item consider the case when
point is at inlinetask. The proposed fix is attached.
Best,
Ihor
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 291b634af..6c08142c7 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1956,7 +1956,12 @@ PROPNAME lets you set a custom text property instead of
:org-clock-minutes."
"Return time, clocked on current item in total."
(save-excursion
(save-restriction
- (org-narrow-to-subtree)
+ (if (and (featurep 'org-inlinetask)
+ (or (org-inlinetask-at-task-p)
+ (org-inlinetask-in-task-p)))
+ (narrow-to-region (save-excursion (org-inlinetask-goto-beginning)
(point))
+ (save-excursion (org-inlinetask-goto-end) (point)))
+ (org-narrow-to-subtree))
(org-clock-sum tstart)
org-clock-file-total-minutes)))
Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
cairo version 1.16.0)
of 2020-08-08
Package: Org mode version 9.3.7 (release_9.3.7-783-gd307b6 @
/home/yantar92/.emacs.d/straight/build/org/)
- Bug: Total shown clocked time of inlinetask includes the clocking of the parent task [9.3.7 (release_9.3.7-783-gd307b6 @ /home/yantar92/.emacs.d/straight/build/org/)],
Ihor Radchenko <=