NAME

Org::Element::Headline - Represent Org headline

VERSION

version 0.22

DESCRIPTION

Derived from Org::Element.

ATTRIBUTES

level => INT

Level of headline (e.g. 1, 2, 3). Corresponds to the number of bullet stars.

title => OBJ

Org::Element::Text representing the headline title

todo_priority => STR

String (optional) representing priority.

tags => ARRAY

Arrayref (optional) containing list of defined tags.

is_todo => BOOL

Whether this headline is a TODO item.

is_done => BOOL

Whether this TODO item is in a done state (state which requires no more action, e.g. DONE). Only meaningful if headline is a TODO item.

todo_state => STR

TODO state.

progress => STR

Progress.

METHODS

$el->get_tags() => ARRAY

Get tags for this headline. A headline can define tags or inherit tags from its parent headline (or from document).

$el->get_active_timestamp() => ELEMENT

Get the first active timestamp element for this headline, either in the title or in the child elements.

$el->is_leaf() => BOOL

Returns true if element doesn't contain subtrees.

$el->promote_node([$num_levels])

Promote (decrease the level) of this headline node. $level specifies number of levels, defaults to 1. Won't further promote if already at level 1. Illustration:

* h1
** h2   <-- promote 1 level
*** h3
*** h3b
** h4
* h5

becomes:

* h1
* h2
*** h3
*** h3b
** h4
* h5

$el->demote_node([$num_levels])

Does the opposite of promote_node().

$el->promote_branch([$num_levels])

Like promote_node(), but all children headlines will also be promoted. Illustration:

* h1
** h2   <-- promote 1 level
*** h3
**** grandkid
*** h3b

** h4
* h5

becomes:

* h1
* h2
** h3
*** grandkid
** h3b

** h4
* h5

$el->demote_branch([$num_levels])

Does the opposite of promote_branch().

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.