The order of table columns is hard-coded into the formatter
org-clocktable-write-default
. You can set this formatter with the
argument :formatter
in the clocktable header. But
org-clocktable-write-default
is quite a monster so you rather re-use
it in your own formatter. Furthermore it directly writes out the
table text. You cannot manipulate table data in elisp form but you must use
functions for manipulations of the table text:-(.
I give you here an example of a customized formatter for a clocktable.
It is very specific to the header arguments used by you.
But it is also short and quite self-descriptive.
So it should quite easy to adapt it to any special case at hand.
(defun my-clocktable-write (&rest args)
"Custom clocktable writer.
Uses the default writer but shifts the first column right."
(apply #'org-clocktable-write-default args)
(save-excursion
(forward-char) ;; move into the first table field
(org-table-move-column-right)))
There follows an application example which roughly reproduces your clocktable.
* Org
** Fix Problems
*** Refactor tagged trees
:PROPERTIES:
:EFFORT: 4:00
:END:
:LOGBOOK:
CLOCK: [2018-06-30 Sat 00:05]--[2018-06-30 Sat 00:19] => 0:01
:END:
#+PROPERTY: Effort 1:00
**** Sample tree
:PROPERTIES:
:EFFORT: 3:00
:END:
:LOGBOOK:
CLOCK: [2018-06-30 Sat 00:00]--[2018-06-30 Sat 00:05] => 1:00
:END:
* clock table
#+BEGIN: clocktable :block today :maxlevel 15 :properties ("Effort") :compact t :formatter my-clocktable-write
#+CAPTION: Clock summary at [2018-06-30 Sat 01:18], for Saturday, June 30, 2018.
| Headline | Effort | Time |
|-----------------------------+--------+--------|
| *Total time* | | *0:19* |
|-----------------------------+--------+--------|
| Org | | 0:19 |
| \_ Fix Problems | | 0:19 |
| \_ Refactor tagged trees | 4:00 | 0:19 |
| \_ Sample tree | 3:00 | 0:05 |
#+END: