如何使用Emacs Org模式记录小时数?

时间:2014-12-07 16:14:20

标签: emacs org-mode

如何在组织模式中记录(和总和)小时数,每天我写一个小时?

注意我想要进行时间跟踪或启动时钟。我想每天写#小时,并添加它们。

EG:

* [2014-12-07]
* Hours: 8
* Did this
** a sub section of this
* Did that
** A subsection that

嵌套列表结构不必像我在这里描述的那样 - 但是概念是每个DAY都有HOURS手动记录,然后我可以在一组天内进行SUM。

2 个答案:

答案 0 :(得分:1)

以下是没有嵌套结构的示例:

* Project

#+COLUMNS: %60ITEM(Work done) %7Hours{total}

#+BEGIN: columnview :hlines 1
| Work done        | Hours |
|------------------+-------|
| * Project        |    23 |
| ** Did this      |     8 |
| ** did that      |     8 |
| ** Did that      |     2 |
| ** Another thing |     5 |
#+END:

** Did this
   :PROPERTIES:
   :Hours:    8
   :END:
** did that
   :PROPERTIES:
   :Hours:    8
   :END:
** Did that
   :PROPERTIES:
   :Hours:    2
   :END:
** Another thing
   :PROPERTIES:
   :Hours:    5
   :END:

答案 1 :(得分:1)

您可以将每天工作的小时数存储为属性,然后定义一个对其进行求和的列格式。在这里,我声明了一个名为HOURS_WORKED的属性,可以是1-8。您可以通过 ctrl-c ctrl-x p org-set-property )在当天设置此属性来设置工作小时数 列格式指定总计工作小时数。当您在列视图 ctrl -c ctrl-x ctrl-c org-columns 命令)中查看此内容时,您将看到所有总计。

* Month
  :PROPERTIES:
  :HOURS_WORKED_ALL:  1 2 3 4 5 6 7 8
  :COLUMNS: %25ITEM  %9HOURS_WORKED{:}
  :END:
** Week 1
*** Monday
    :PROPERTIES:
    :HOURS_WORKED: 3
    :END:
*** Tuesday
    :PROPERTIES:
    :HOURS_WORKED: 2
    :END: