UP | HOME

Org API

Table of Contents

Org-Habit API functions (org-habit.el)

org-habit-build-graph habit starting current ending

Build a graph for the given habit, from starting to ending. current gives the current time between starting and ending, for the purpose of drawing the graph. It need not be the actual current time.

org-habit-get-faces habit &optional now-days scheduled-days donep

Return faces for habit relative to now-days and scheduled-days. now-days defaults to the current time's days-past-the-epoch if nil. scheduled-days defaults to the habit's actual scheduled days if nil.

Habits are assigned colors on the following basis:

Blue      Task is before the scheduled date.
Green     Task is on or after scheduled date, but before the

end of the schedule's repeat period.

Yellow    If the task has a deadline, then it is after schedule's

repeat period, but before the deadline.

Orange    The task has reached the deadline day, or if there is

no deadline, the end of the schedule's repeat period.

Red       The task has gone beyond the deadline day or the

schedule's repeat period.

org-habit-get-priority habit &optional moment

Determine the relative priority of a habit. This must take into account not just urgency, but consistency as well.

org-habit-insert-consistency-graphs &optional line

Insert consistency graph for any habitual tasks.

org-habit-parse-todo &optional pom

Parse the TODO surrounding point for its habit-related data. Returns a list with the following elements:

0: Scheduled date for the habit (may be in the past)
1: ".+"-style repeater for the schedule, in days
2: Optional deadline (nil if not present)
3: If deadline, the repeater for the deadline, otherwise nil
4: A list of all the past dates this todo was mark closed

This list represents a "habit" for the rest of this module.

org-habit-toggle-habits

Toggle display of habits in an agenda buffer.

Documentation from the http://orgmode.org/worg/ website (either in its HTML format or in its Org format) is licensed under the GNU Free Documentation License version 1.3 or later. The code examples and css stylesheets are licensed under the GNU General Public License v3 or later.