emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Dale <dale@codefu.org>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <878tp31d51.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAEj9N4JViJqQcf-ejEkFaHLfVqsW8RkzxcAFa-pawE40a4QS9A@mail.gmail.com> (dale@codefu.org's message of "Sat, 18 Feb 2017 11:06:06 -0600")

Hello,

Dale <dale@codefu.org> 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	other threads:[~2017-02-18 20:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18 17:06 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/)] Dale
2017-02-18 20:02 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tp31d51.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=dale@codefu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).