emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Properties don't work in clocktable [9.0.5 (release_9.0.5-3


From: Nicolas Goaziou
Subject: Re: [O] 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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

Dale <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]