From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mIiFO8AKOF+DRAAA0tVLHw (envelope-from ) for ; Sat, 15 Aug 2020 16:18:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kCZ2N8AKOF8kCgAA1q6Kng (envelope-from ) for ; Sat, 15 Aug 2020 16:18:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 886E79400C7 for ; Sat, 15 Aug 2020 16:18:08 +0000 (UTC) Received: from localhost ([::1]:48372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6ysh-0003EI-A4 for larch@yhetil.org; Sat, 15 Aug 2020 12:18:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6yqb-00013h-1f for emacs-orgmode@gnu.org; Sat, 15 Aug 2020 12:15:57 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:41198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6yqZ-0003RT-C2 for emacs-orgmode@gnu.org; Sat, 15 Aug 2020 12:15:56 -0400 Received: by mail-qk1-x735.google.com with SMTP id l64so11167396qkb.8 for ; Sat, 15 Aug 2020 09:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=hsnZ6cPEjPtobKYNq1+Yn2+CXzMb8g96YXy22Qo7jUU=; b=EXd1Qw/IB5NgxvuDVJRNrMrOStQyXYO53UR/LYbXw2tf8LxeI44MWBJDfRlk1HKFAy D84B7eCHAsEH/VBRVmYdz0pGNsTW7yBtrm8bTsGwe6VII4NNfLlXqlbTx4zuRG5mVay+ pYegchHky5JbEk+IJ4doBEjMARqcs3J2roWZX/f4q0fdDeZ4H20A+rSAWEw/T38Fs/Da WfCOLkBMg0UAzW6SAuMnJ4XonxrK6Z+sOcD30ucH/a3WmjT2EpHAVOIbyrW9czm4o7sM uug4MXdikbtsXUZNflfN7PdyG89+4k7kijLsB9KtFCCDniAFafyBJ3HimiRfFURAMy1B r4HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=hsnZ6cPEjPtobKYNq1+Yn2+CXzMb8g96YXy22Qo7jUU=; b=LXu39eNDdvwuDF1cGPBR39X0X/Hyh/4gRg+cV/itpX+coOYLf8+igk527wqdAPQ4Fv rOMSigg4kw2geC8gM132dCHWmOM6ZO9Z873MFrf3qj6RXhfDJn6rGCbFJ+0nxOt0VvfJ /6uSfvcY1da3GNhJiZT/n+NuSiGD/wROFdFpzaWJ7WiyHZtKTu1029Bt9adfNHP2xeIe 9L/FB4kYes07T/HvKqjWPwhdVU2Tfe0ikf/fgnrRopcwIPB30ZQlknbtrd8ZTfptabyp PPXIlHvgyLy5ydUlJqOxR7pnAnM5FpYqjyHmeTblzLUPbqCLkw6xCzknAL2BJkshZ0jd uxuw== X-Gm-Message-State: AOAM531yfZs0brB4oOMFnhE+PZI91TJCFeVI8Xj4jxEJQ7GRZ6nUjhFt OL1uhsL3zeSvjM2SHf1Y4D2O2RjX3c7p5Q== X-Google-Smtp-Source: ABdhPJydTOBlrabKfLKiqhLtGj+WAociYYDHGlYLIC7jaYn3/nL9loh+ECnq28vlBu20VUryZQzoPA== X-Received: by 2002:aed:24f2:: with SMTP id u47mr4999575qtc.137.1597465168398; Fri, 14 Aug 2020 21:19:28 -0700 (PDT) Received: from localhost ([208.167.241.222]) by smtp.gmail.com with ESMTPSA id s184sm10759247qkf.50.2020.08.14.21.19.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 21:19:26 -0700 (PDT) From: Ihor Radchenko To: emacs-orgmode@gnu.org 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 Message-ID: <87y2mgtucj.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::735; envelope-from=yantar92@gmail.com; helo=mail-qk1-x735.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=EXd1Qw/I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 2.79 X-TUID: XwC6SrAmhKtj --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-clock-inlinetask.diff 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))) --=-=-= Content-Type: text/plain 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/) --=-=-=--