11

我想从 org-mode 生成一个议程视图,其中包括上周完成的 TODO 项目。以下代码段似乎是阅读文档的首选方式。但是议程中没有显示任何项目,只有日期......

    (setq org-agenda-custom-commands 
      '(("W" "Completed and/or deferred tasks from previous week"
         ((agenda "" ((org-agenda-span 7)
              (org-agenda-start-day "-7d")
              (org-agenda-entry-types '(:timestamp :sexp))))))))

例如,内置命令在缓冲区中C-a-a生成这样的列表*Org Agenda*

Week-agenda (W27):
Monday      1 July 2013 W27
  gtd:        Scheduled:  DONE something important
Tuesday     2 July 2013
Wednesday   3 July 2013
Thursday    4 July 2013
Friday      5 July 2013
Saturday    6 July 2013
Sunday      7 July 2013

...但是C-a-W上面定义的自定义命令会产生这种情况(尽管在此期间有各种计划任务)

Week-agenda (W26):
Monday     24 June 2013 W26
Tuesday    25 June 2013
Wednesday  26 June 2013
Thursday   27 June 2013
Friday     28 June 2013
Saturday   29 June 2013
Sunday     30 June 2013

或者,是否有另一种方法可以生成前一周的 DONE 项目列表?

4

2 回答 2

12

在对输出进行一些拖网之后C-h-v,看起来这可以在议程中使用日志显示。(即C-a-a然后按下缓冲区l*Org-Agenda*

生成足够接近所需输出的内容的自定义命令如下所示...

   (setq org-agenda-custom-commands 
      ("W" "Completed and/or deferred tasks from previous week"
       ((agenda "" ((org-agenda-span 7)
            (org-agenda-start-day "-7d")
            (org-agenda-entry-types '(:timestamp))
            (org-agenda-show-log t)))))) 

可以通过标签进一步限制显示...

于 2013-07-02T16:09:47.670 回答
-1

根据定义,议程只显示要做的事情,而不是已完成(即DONE)的事情。

因此,您必须使用另一种类型的命令:

(todo "DONE"
      (...))
于 2013-07-02T10:27:48.297 回答