org-habit 表示没有习惯
org-habit shows no habits
我发布了 before on using Brent Hansen's amazing org setup。这一次,我在让 org-mode 显示我的习惯方面遇到了特别的问题。
最近我不得不对我的 emacs 进行核对并从头开始,所以调试很困难。
我很确定我启用了 habit
模式,因为:
- 我在
.emacs
中启用了(见下文)
;; Enable habit tracking
(setq org-modules (quote (org-habit)))
; position the habit graph on the agenda to the right of the default
(setq org-habit-graph-column 50)
(run-at-time "06:00" 86400 '(lambda () (setq org-habit-show-habits t)))
我的习惯捕获模板似乎设置为包括所需的一切:
("h" "Habit" entry (file "~/Dropbox/org-new/refile.org")
"* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n")
我的顶级 Header 中有一组额外的属性,用于显示以下习惯:
* Habits
:PROPERTIES:
:LOGGING: DONE(!)
:ARCHIVE: %s_archive::* Habits
:END:
当我 运行 议程时,我在模式行中看到 (Org-Agenda Day Ddl Grid Habit Wrap)
尽管如此,当我 运行 议程时,我的习惯没有出现,习惯图表也没有出现。我已经尽我所能尝试解决这个问题,现在我已经无计可施了。任何帮助将不胜感激!
您需要在您的习惯中添加一个:STYLE:
属性,值为habit
:
** TODO Shave
SCHEDULED: <2009-10-17 Sat .+2d/4d>
- State "DONE" from "TODO" [2009-10-15 Thu]
- State "DONE" from "TODO" [2009-10-12 Mon]
- State "DONE" from "TODO" [2009-10-10 Sat]
- State "DONE" from "TODO" [2009-10-04 Sun]
- State "DONE" from "TODO" [2009-10-02 Fri]
- State "DONE" from "TODO" [2009-09-29 Tue]
- State "DONE" from "TODO" [2009-09-25 Fri]
- State "DONE" from "TODO" [2009-09-19 Sat]
- State "DONE" from "TODO" [2009-09-16 Wed]
- State "DONE" from "TODO" [2009-09-12 Sat]
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2009-10-19 Mon 00:36]
:END:
编辑:虽然 STYLE:habit 属性 是必要的,但在这种情况下这不是问题(如评论中所述)。但是,标题中元素的 order 很可能是问题所在。 运行 org-lint
以下示例:
* NEXT Exercise
[2017-07-16 Sun 19:36]
[[file:~/Dropbox/org-new/todo.org::*Write][Write]]
SCHEDULED: <2017-07-16 Sun .+1d/2d>
:PROPERTIES:
:STYLE: habit
:REPEAT_TO_STATE: NEXT
:END:
我明白了
3 low Link to non-existent local file "~/Dropbox/org-new/todo.org"
4 low Misplaced planning info line
5 high Incorrect location for PROPERTIES drawer
如果我将文件重组为:
* NEXT Exercise
SCHEDULED: <2017-07-16 Sun .+1d/2d>
:PROPERTIES:
:STYLE: habit
:REPEAT_TO_STATE: NEXT
:END:
[2017-07-16 Sun 19:36]
[[file:~/Dropbox/org-new/todo.org::*Write][Write]]
然后 high
优先级警告消失。我不知道这是否会养成习惯,但我敢打赌它会。
manual 状态:
When they are associated with a single entry or with a tree they need to be inserted into a special drawer (see Drawers) with the name PROPERTIES, which has to be located right below a headline, and its planning line (see Deadlines and scheduling) when applicable.
我发布了 before on using Brent Hansen's amazing org setup。这一次,我在让 org-mode 显示我的习惯方面遇到了特别的问题。
最近我不得不对我的 emacs 进行核对并从头开始,所以调试很困难。
我很确定我启用了 habit
模式,因为:
- 我在
.emacs
中启用了(见下文)
;; Enable habit tracking
(setq org-modules (quote (org-habit)))
; position the habit graph on the agenda to the right of the default
(setq org-habit-graph-column 50)
(run-at-time "06:00" 86400 '(lambda () (setq org-habit-show-habits t)))
我的习惯捕获模板似乎设置为包括所需的一切:
("h" "Habit" entry (file "~/Dropbox/org-new/refile.org") "* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n")
我的顶级 Header 中有一组额外的属性,用于显示以下习惯:
* Habits :PROPERTIES: :LOGGING: DONE(!) :ARCHIVE: %s_archive::* Habits :END:
当我 运行 议程时,我在模式行中看到
(Org-Agenda Day Ddl Grid Habit Wrap)
尽管如此,当我 运行 议程时,我的习惯没有出现,习惯图表也没有出现。我已经尽我所能尝试解决这个问题,现在我已经无计可施了。任何帮助将不胜感激!
您需要在您的习惯中添加一个:STYLE:
属性,值为habit
:
** TODO Shave
SCHEDULED: <2009-10-17 Sat .+2d/4d>
- State "DONE" from "TODO" [2009-10-15 Thu]
- State "DONE" from "TODO" [2009-10-12 Mon]
- State "DONE" from "TODO" [2009-10-10 Sat]
- State "DONE" from "TODO" [2009-10-04 Sun]
- State "DONE" from "TODO" [2009-10-02 Fri]
- State "DONE" from "TODO" [2009-09-29 Tue]
- State "DONE" from "TODO" [2009-09-25 Fri]
- State "DONE" from "TODO" [2009-09-19 Sat]
- State "DONE" from "TODO" [2009-09-16 Wed]
- State "DONE" from "TODO" [2009-09-12 Sat]
:PROPERTIES:
:STYLE: habit
:LAST_REPEAT: [2009-10-19 Mon 00:36]
:END:
编辑:虽然 STYLE:habit 属性 是必要的,但在这种情况下这不是问题(如评论中所述)。但是,标题中元素的 order 很可能是问题所在。 运行 org-lint
以下示例:
* NEXT Exercise
[2017-07-16 Sun 19:36]
[[file:~/Dropbox/org-new/todo.org::*Write][Write]]
SCHEDULED: <2017-07-16 Sun .+1d/2d>
:PROPERTIES:
:STYLE: habit
:REPEAT_TO_STATE: NEXT
:END:
我明白了
3 low Link to non-existent local file "~/Dropbox/org-new/todo.org"
4 low Misplaced planning info line
5 high Incorrect location for PROPERTIES drawer
如果我将文件重组为:
* NEXT Exercise
SCHEDULED: <2017-07-16 Sun .+1d/2d>
:PROPERTIES:
:STYLE: habit
:REPEAT_TO_STATE: NEXT
:END:
[2017-07-16 Sun 19:36]
[[file:~/Dropbox/org-new/todo.org::*Write][Write]]
然后 high
优先级警告消失。我不知道这是否会养成习惯,但我敢打赌它会。
manual 状态:
When they are associated with a single entry or with a tree they need to be inserted into a special drawer (see Drawers) with the name PROPERTIES, which has to be located right below a headline, and its planning line (see Deadlines and scheduling) when applicable.