如何自定义 org-agenda 时钟表的深度?
How to customize the depth of org-agenda clocktable?
我正在使用 org-mode 来记录、记录和计时我的工作。我刚刚发现有关 clocktables 的信息,我发现它非常有用。我也希望能够从存档条目中获取时间,但是由于我存档到日期树中,它的深度为 4 级。设置一个普通的时钟table很容易,但我真的想使用org-agenda中设置的那个。
所以我想知道如何配置 org-agenda 时钟的深度table。
我试图通过将自定义变量添加到我的 .emacs 文件来将默认深度设置为 4,但这没有帮助。
(setq org-clock-clocktable-default-properties '(:maxlevel 4))
这是组织议程时钟table,最大级别为 2。
|--------------+--------------------------------------------+--------+------|
| archive.org | *File time* | *3:10* | |
| | 2019 | 3:10 | |
| | 2019-05 mai | | 3:10 |
|--------------+--------------------------------------------+--------+------|
如您所见,这些条目没有帮助,因为它只描述了月份,而不是实际的条目。因此,如果我可以将深度更改为 4,我会得到这样的结果。
#+BEGIN: clocktable :maxlevel 4 :scope ("inbox.org" "archive.org") :block 2019-05-02
#+CAPTION: Clock summary at [2019-05-04 lø. 21:07], for torsdag, mai 02, 2019.
| File | Headline | Time | | | |
|-------------+------------------------------------------+--------+------+------+------|
| | ALL *Total time* | *6:41* | | | |
|-------------+------------------------------------------+--------+------+------+------|
| archive.org | *File time* | *3:10* | | | |
| | 2019 | 3:10 | | | |
| | \emsp 2019-05 mai | | 3:10 | | |
| | \emsp\emsp 2019-05-02 torsdag | | | 1:00 | |
| | \emsp\emsp\emsp DONE Some Task | | | | 1:00 |
| | \emsp\emsp 2019-05-03 fredag | | | 0:33 | |
| | \emsp\emsp\emsp WAITING Another Task[0/2]| | | | 0:33 |
| | \emsp\emsp 2019-05-04 lørdag | | | 1:37 | |
| | \emsp\emsp\emsp DONE A third Task | | | | 1:37 |
#+END:
请注意,第一个 table 来自 org-aganda,而第二个是正常的 org-mode 时钟table。
感谢您的帮助!
改为尝试自定义 org-agenda-clockreport-parameter-plist
。它的默认值是 (:link t :maxlevel 2)
,因此它看起来像是您想要的一个合理候选者(尽管我还没有测试它是否有效)。它的文档说:
Property list with parameters for the clocktable in clockreport mode.
This is the display mode that shows a clock table in the daily/weekly
agenda, the properties for this dynamic block can be set here.
The usual clocktable parameters are allowed here, but you cannot set
the properties :name, :tstart, :tend, :block, and :scope - these will
be overwritten to make sure the content accurately reflects the
current display in the agenda.
我正在使用 org-mode 来记录、记录和计时我的工作。我刚刚发现有关 clocktables 的信息,我发现它非常有用。我也希望能够从存档条目中获取时间,但是由于我存档到日期树中,它的深度为 4 级。设置一个普通的时钟table很容易,但我真的想使用org-agenda中设置的那个。
所以我想知道如何配置 org-agenda 时钟的深度table。
我试图通过将自定义变量添加到我的 .emacs 文件来将默认深度设置为 4,但这没有帮助。
(setq org-clock-clocktable-default-properties '(:maxlevel 4))
这是组织议程时钟table,最大级别为 2。
|--------------+--------------------------------------------+--------+------|
| archive.org | *File time* | *3:10* | |
| | 2019 | 3:10 | |
| | 2019-05 mai | | 3:10 |
|--------------+--------------------------------------------+--------+------|
如您所见,这些条目没有帮助,因为它只描述了月份,而不是实际的条目。因此,如果我可以将深度更改为 4,我会得到这样的结果。
#+BEGIN: clocktable :maxlevel 4 :scope ("inbox.org" "archive.org") :block 2019-05-02
#+CAPTION: Clock summary at [2019-05-04 lø. 21:07], for torsdag, mai 02, 2019.
| File | Headline | Time | | | |
|-------------+------------------------------------------+--------+------+------+------|
| | ALL *Total time* | *6:41* | | | |
|-------------+------------------------------------------+--------+------+------+------|
| archive.org | *File time* | *3:10* | | | |
| | 2019 | 3:10 | | | |
| | \emsp 2019-05 mai | | 3:10 | | |
| | \emsp\emsp 2019-05-02 torsdag | | | 1:00 | |
| | \emsp\emsp\emsp DONE Some Task | | | | 1:00 |
| | \emsp\emsp 2019-05-03 fredag | | | 0:33 | |
| | \emsp\emsp\emsp WAITING Another Task[0/2]| | | | 0:33 |
| | \emsp\emsp 2019-05-04 lørdag | | | 1:37 | |
| | \emsp\emsp\emsp DONE A third Task | | | | 1:37 |
#+END:
请注意,第一个 table 来自 org-aganda,而第二个是正常的 org-mode 时钟table。
感谢您的帮助!
改为尝试自定义 org-agenda-clockreport-parameter-plist
。它的默认值是 (:link t :maxlevel 2)
,因此它看起来像是您想要的一个合理候选者(尽管我还没有测试它是否有效)。它的文档说:
Property list with parameters for the clocktable in clockreport mode. This is the display mode that shows a clock table in the daily/weekly agenda, the properties for this dynamic block can be set here. The usual clocktable parameters are allowed here, but you cannot set the properties :name, :tstart, :tend, :block, and :scope - these will be overwritten to make sure the content accurately reflects the current display in the agenda.