7.5.1 Defining columns
Setting up a column view first requires defining the columns. This is done by defining a column format line.
β’ Scope of column definitions | Β Β | Where defined, where valid? |
β’ Column attributes | Β Β | Appearance and content of a column. |
7.5.1.1 Scope of column definitionsβ
To specify a format that only applies to a specific tree, add a βCOLUMNS
β property to the top node of that tree, for example:
** Top node for columns view
:PROPERTIES:
:COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
:END:
A βCOLUMNS
β property within a property drawer before first headline will apply to the entire file. As an addition to property drawers, keywords can also be defined for an entire file using a line like:
#+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
If a βCOLUMNS
β property is present in an entry, it defines columns for the entry itself, and for the entire subtree below it. Since the column definition is part of the hierarchical structure of the document, you can define columns on level 1 that are general enough for all sublevels, and more specific columns further down, when you edit a deeper part of the tree.
7.5.1.2 Column attributesβ
A column definition sets the attributes of a column. The general definition looks like this:
%[WIDTH]PROPERTY[(TITLE)][{SUMMARY-TYPE}]
Except for the percent sign and the property name, all items are optional. The individual parts have the following meaning:
WIDTH
β
An integer specifying the width of the column in characters. If omitted, the width is determined automatically.
PROPERTY
β
The property that should be edited in this column. Special properties representing meta data are allowed here as well (see Special Properties).
TITLE
β
The header text for the column. If omitted, the property name is used.
SUMMARY-TYPE
β
The summary type. If specified, the column values for parent nodes are computed from the children1.
Supported summary types are:
β+ β | Sum numbers in this column. |
β+;%.1f β | Like β+ β, but format result with β%.1f β. |
β$ β | Currency, short for β+;%.2f β. |
βmin β | Smallest number in column. |
βmax β | Largest number. |
βmean β | Arithmetic mean of numbers. |
βX β | Checkbox status, β[X] β if all children are β[X] β. |
βX/ β | Checkbox status, β[n/m] β. |
βX% β | Checkbox status, β[n%] β. |
β: β | Sum times, HH:MM, plain numbers are minutes. |
β:min β | Smallest time value in column. |
β:max β | Largest time value. |
β:mean β | Arithmetic mean of time values. |
β@min β | Minimum age2 (in days/hours/mins/seconds). |
β@max β | Maximum age (in days/hours/mins/seconds). |
β@mean β | Arithmetic mean of ages (in days/hours/mins/seconds). |
βest+ β | Add low-high estimates. |
You can also define custom summary types by setting org-columns-summary-types
.
The βest+
β summary type requires further explanation. It is used for combining estimates, expressed as low-high ranges. For example, instead of estimating a particular task will take 5 days, you might estimate it as 5β6 days if youβre fairly confident you know how much work is required, or 1β10 days if you do not really know what needs to be done. Both ranges average at 5.5 days, but the first represents a more predictable delivery.
When combining a set of such estimates, simply adding the lows and highs produces an unrealistically wide result. Instead, βest+
β adds the statistical mean and variance of the subtasks, generating a final estimate from the sum. For example, suppose you had ten tasks, each of which was estimated at 0.5 to 2 days of work. Straight addition produces an estimate of 5 to 20 days, representing what to expect if everything goes either extremely well or extremely poorly. In contrast, βest+
β estimates the full job more realistically, at 10β15 days.
Here is an example for a complete columns definition, along with allowed values3.
:COLUMNS: %25ITEM %9Approved(Approved?){X} %Owner %11Status \
%10Time_Estimate{:} %CLOCKSUM %CLOCKSUM_T
:Owner_ALL: Tammy Mark Karl Lisa Don
:Status_ALL: "In progress" "Not started yet" "Finished" ""
:Approved_ALL: "[ ]" "[X]"
The first column, β%25ITEM
β, means the first 25 characters of the item itself, i.e., of the headline. You probably always should start the column definition with the βITEM
β specifier. The other specifiers create columns βOwner
β with a list of names as allowed values, for βStatus
β with four different possible values, and for a checkbox field βApproved
β. When no width is given after the β%
β character, the column is exactly as wide as it needs to be in order to fully display all values. The βApproved
β column does have a modified title (βApproved?
β, with a question mark). Summaries are created for the βTime_Estimate
β column by adding time duration expressions like HH:MM, and for the βApproved
β column, by providing an β[X]
β status if all children have been checked. The βCLOCKSUM
β and βCLOCKSUM_T
β columns are special, they lists the sums of CLOCK intervals in the subtree, either for all clocks or just for today.
- If more than one summary type applies to the same property, the parent values are computed according to the first of them.β©
- An age can be defined as a duration, using units defined in
org-duration-units
, e.g., β3d 1h
β. If any value in the column is as such, the summary is also expressed as a duration.β© - Please note that the β
COLUMNS
β definition must be on a single line; it is wrapped here only because of formatting constraints.β©