我将emacs org-mode用于各种目的。最常见的功能是用特殊的标签TODO & DONE标记我的任务。有没有办法添加自定义标签(例如IN_PROGRESS)并用单独的颜色突出显示它?
另外,如果这个标签与TODO和DONE在相同的缓冲区中滚动,这样我可以使用相同的热键在它们之间切换,那就更好了。
发布于 2012-10-04 14:12:04
我在我的init.el中使用了以下内容,它为所有组织文件设置额外的任务状态及其样式:
(setq org-todo-keyword-faces
'(
("NOT-TODO" . (:foreground "blue" :weight bold))
("IF-TIME" . (:foreground "yellow" :weight bold))
("NOT-REPRO" . (:foreground "purple" :weight bold))
))
(setq org-todo-keywords
'((sequence "TODO" "NOT-TODO" "NOT-REPRO" "IF-TIME" "DONE")))发布于 2012-10-03 19:33:31
您可以在文件的开头执行以下操作:
#+TODO: TODO IN-PROGRESS WAITING DONE在该行上按C-c C-c刷新设置(文件的后续加载不需要),一切都应该很顺利。
正如here所解释的那样。
发布于 2012-10-06 17:15:28
我使用下面的代码来生成看起来有点像按钮的TODO关键字,使它们在我的大纲和议程中更清晰地显示出来。如果我没记错的话,这个样式来自邮件列表。
(setq org-todo-keywords
'((sequence "TODO"
"MAYBE"
"NEXT"
"STARTED"
"WAITING"
"DELEGATED"
"|"
"DONE"
"DEFERRED"
"CANCELLED")))
(setq org-todo-keyword-faces
'(("PROJ" :background "blue" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("TODO" :background "red1" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("NEXT" :background "red1" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("STARTED" :background "orange" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("WAITING" :background "yellow" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("DEFERRED" :background "gold" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("DELEGATED" :background "gold" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("MAYBE" :background "gray" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("APPT" :background "red1" :foreground "black" :weight bold :box (:line-width 2 :style released-button))
("DONE" :background "forest green" :weight bold :box (:line-width 2 :style released-button))
("CANCELLED" :background "lime green" :foreground "black" :weight bold :box (:line-width 2 :style released-button))))这使我的议程看起来如下所示:

https://stackoverflow.com/questions/12707492
复制相似问题