From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Properties don't work in clocktable [9.0.5 (release_9.0.5-305-g21797c @ /Users/dale/.emacs.d/el-get/org-mode/lisp/)] Date: Sat, 18 Feb 2017 21:02:02 +0100 Message-ID: <878tp31d51.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfBCp-0001oV-LO for emacs-orgmode@gnu.org; Sat, 18 Feb 2017 15:02:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfBCo-0007EX-3W for emacs-orgmode@gnu.org; Sat, 18 Feb 2017 15:02:07 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:43761) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cfBCn-0007E1-U9 for emacs-orgmode@gnu.org; Sat, 18 Feb 2017 15:02:06 -0500 In-Reply-To: (dale@codefu.org's message of "Sat, 18 Feb 2017 11:06:06 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Dale Cc: emacs-orgmode@gnu.org Hello, Dale writes: > For me, clocktable's :properties option is including columns for the > properties, but is never including the actual values for those properties. > This *may* be a bug, specifically in org-clock.el line 2590: > > (pcase-dolist (`(,level ,headline ,ts ,time . ,props) entries) > ...) > > I believe the ". ,props" should be just ",props", since I think the list > of properties here is its own list, and not the cdr of entries: > > (pcase-dolist (`(,level ,headline ,ts ,time ,props) entries) > ...) > > To reproduce this problem using org-mode HEAD, evaluate the following: > > (switch-to-buffer (generate-new-buffer "*org mode test*")) > (org-mode) > (insert "* Time > :PROPERTIES: > :FOO: bar > :END: > :LOGBOOK: > CLOCK: [2017-02-18 Sat 10:50]--[2017-02-18 Sat 10:51] => 0:01 > :END: > > #+BEGIN: clocktable :compact t :properties (\"FOO\") :maxlevel 2 > :scope subtree > > #+END: > ") > (goto-char (point-max)) > (forward-line -1) > (org-dblock-update) > > Expected result which includes the property value: > > #+BEGIN: clocktable :compact t :properties ("FOO") :maxlevel 2 :scope subtree > #+CAPTION: Clock summary at [2017-02-18 Sat 10:59] > > | FOO | Headline | Time | > |-----+--------------+---------| > | | *Total time* | *0.02h* | > |-----+--------------+---------| > | bar | Time | 0.02h | > #+END: > > Observed result from HEAD, note no property value: > > #+BEGIN: clocktable :compact t :properties ("FOO") :maxlevel 2 :scope subtree > #+CAPTION: Clock summary at [2017-02-18 Sat 10:54] > > | FOO | Headline | Time | > |-----+--------------+---------| > | | *Total time* | *0.02h* | > |-----+--------------+---------| > | | Time | 0.02h | > #+END: You're right. Fixed. Thank you. For my own redemption, I added regression tests. Regards, -- Nicolas Goaziou