emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] clocktable match doesn't seem to support matching items based on parent property [9.6.15 (release_9.6.15 @ /snap/emacs/current/usr/share/emacs/29.3/lisp/org/)]
@ 2024-05-07 11:12 Felix H. Dahlke
  2024-05-09 11:32 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Felix H. Dahlke @ 2024-05-07 11:12 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: info

I want to create a clocktable report for all items under a specific
heading, using the match keyword and the ITEM property. It appears
that matching items this way won't include any subheadings, therefore
not showing their times in the clocktable.

My guess would be that agenda and clocktable share the same matching
logic, and matching subheadings by the property of their parent does
probably not make sense for the agenda. I'd argue that for
clocktables, it would.

Example:

* Level 1                                                   :level_1:
** Level 2
:PROPERTIES:
:LEVEL:      1
:END:

*** Level 3
:LOGBOOK:
CLOCK: [2024-05-07 Tue 11:00]--[2024-05-07 Tue 12:00] =>  1:00
:END:

* Report matching the ITEM property doesn't work
#+BEGIN: clocktable :scope file :match "ITEM=\"Level 1\""
#+CAPTION: Clock summary at [2024-05-07 Tue 13:00]
| Headline     | Time   |
|--------------+--------|
| *Total time* | *0:00* |
#+END:

* Report matching an arbitrary property doesn't work
#+BEGIN: clocktable :scope file :match "LEVEL=\"1\""
#+CAPTION: Clock summary at [2024-05-07 Tue 13:00]
| Headline     | Time   |
|--------------+--------|
| *Total time* | *0:00* |
#+END:

Note that this _does_ work if ~org-use-property-inheritance~ is not
~nil~.

* Report matching a tag works
#+BEGIN: clocktable :scope file :maxlevel 2 :match "level_1"
#+CAPTION: Clock summary at [2024-05-07 Tue 13:00]
| Headline     | Time   |      |
|--------------+--------+------|
| *Total time* | *1:00* |      |
|--------------+--------+------|
| Level 1      | 1:00   |      |
| \_  Level 2  |        | 1:00 |
#+END:

Workaround:

As shown above, using either a tag or a custom property on the
top-level heading I want to generate the clocktable for works. For the
custom property to work, org-use-property-inheritance needs to be
non-nil.

Emacs  : GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20, cairo version 1.16.0)
  of 2024-03-25
Package: Org mode version 9.6.15 (release_9.6.15 @ 
/snap/emacs/current/usr/share/emacs/29.3/lisp/org/)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-09 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 11:12 [BUG] clocktable match doesn't seem to support matching items based on parent property [9.6.15 (release_9.6.15 @ /snap/emacs/current/usr/share/emacs/29.3/lisp/org/)] Felix H. Dahlke
2024-05-09 11:32 ` Ihor Radchenko

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).