简体   繁体   English

组织模式自定义议程视图:显示所有当前习惯的状态

[英]Org-Mode Custom Agenda View: Show Status Of All Current Habits

I use org-habit to keep track of some of my recurring tasks in org-mode.我使用org-habit来跟踪我在 org-mode 中的一些重复性任务。

By default the habits show up in my agenda view (along with their progress graph) if they are scheduled for the current day.默认情况下,如果习惯安排在当天,这些习惯会显示在我的议程视图中(连同他们的进度图)。 Once I mark a habit task as done, it disappears from the agenda view.一旦我将习惯性任务标记为已完成,它就会从议程视图中消失。

Sometimes I want to see how I'm doing with my all my habits.有时我想看看我所有的习惯都做得如何。 What I want to see is an agenda view that shows all tasks that are habits (along with their progress graph) and only those tasks (ie tasks that aren't habits should be excluded).我想看到的是一个议程视图,它显示了所有属于习惯的任务(连同它们的进度图),并且只显示那些任务(即应该排除不是习惯的任务)。

How do I construct such an agenda view?我如何构建这样的议程视图?

I know I can use org-habit-show-habits-only-for-today to show all habits in the agenda, even if they aren't scheduled today.我知道我可以使用org-habit-show-habits-only-for-today来显示议程中的所有习惯,即使它们今天没有安排。 However, I can't figure out how to exclude those tasks that aren't habits.但是,我无法弄清楚如何排除那些不是习惯的任务。

An item is a habit if and only if the STYLE property is set to habit .当且仅当STYLE属性设置为habit项目才是habit You can search for this using the built-in agenda search ( Cc as ) and searching for STYLE="habit" .您可以使用内置议程搜索 ( Cc as ) 并搜索STYLE="habit"来搜索此内容。

To exclude non-habits from daily agenda view you can set org-agenda-skip-function variable in your custom agenda view definition ( org-agenda-custom-commands ) as:要从日常议程视图中排除非习惯,您可以在自定义议程视图定义( org-agenda-custom-commands )中将org-agenda-skip-function变量设置为:

(org-agenda-skip-function
 (lambda ()
   (unless (string-equal (org-entry-get (point) "style") "habit")
     (outline-next-heading))))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM