Class Orgmode::Headline
In: lib/org-ruby/headline.rb
Parent: Line

Represents a headline in an orgmode file.

Methods

Constants

ValidExportStates = [:exclude, :headline_only, :all]   Valid states for partial export.
exclude:The entire subtree from this heading should be excluded.
headline_only:The headline should be exported, but not the body.
all:Everything should be exported, headline/body/children.
LineRegexp = /^\*+\s+/   This is the regex that matches a line
TagsRegexp = /\s*:[\w:@]*:\s*$/   This matches the tags on a headline
Keywords = %w[TODO DONE]   Special keywords allowed at the start of a line.
KeywordsRegexp = Regexp.new("^(#{Keywords.join('|')})\$")
CommentHeadlineRegexp = /^COMMENT\s+/   This matches a headline marked as COMMENT

Attributes

body_lines  [R]  This contains the lines that "belong" to the headline.
export_state  [RW]  The export state of this headline. See ValidExportStates.
headline_text  [R]  This is the headline text — the part of the headline minus the leading asterisks, the keywords, and the tags.
keyword  [R]  Optional keyword found at the beginning of the headline.
level  [R]  This is the "level" of the headline
property_drawer  [RW]  Include the property drawer items found for the headline
tags  [R]  These are the headline tags

Public Class methods

Determines if a line is an orgmode "headline": A headline begins with one or more asterisks.

Public Instance methods

Determines if a headline has the COMMENT keyword.

Override Line.output_text. For a heading, @headline_text is what we should output.

Overrides Line.paragraph_type.

[Validate]