Morgan Smith <[email protected]> writes: > I've been running this patch for quite a while now. However, I just > realized it doesn't handle narrowing. I have added a new patch in the > series that adds a test for when the :scope is "subtree" which my > previous patch failed. The current iteration now has a > "org-with-wide-buffer" around the "org-element-lineage-map" which fixes > the issue. > > I look forward to hearing your thoughts.
Thanks, and sorry for the late reply. I looked into the patch and it mostly looks good. However, I found two cases, when the patch behaves differently from the original `org-clock-sum'. Consider * This is test CLOCK: [2025-10-18 Sat 09:00]--[2025-10-18 Sat 10:00] => 1:00 *************** Here :LOGBOOK: CLOCK: [2025-10-18 Sat 10:00]--[2025-10-18 Sat 11:00] => 1:00 CLOCK: [2025-10-18 Sat 12:00] CLOCK: [2025-10-18 Sat 14:43] :END: The last incomplete clock is actual running clock. The previous is fake open clock. *************** END I notice two problems with the above example: 1. Inline task will not be assigned with :org-clock-minutes property As a result, after running (org-clock-sum), (org-entry-properties nil "CLOCKSUM") will return nil after your patch, which it would not on main. 2. Open clocks will be counted twice in your patch, each time adding the duration of currently running clock. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
