Org::Element::Headline - Represent Org headline
This document describes version 0.561 of Org::Element::Headline (from Perl distribution Org-Parser), released on 2023-11-06.
Derived from Org::Element.
Level of headline (e.g. 1, 2, 3). Corresponds to the number of bullet stars.
Org::Element::Text representing the headline title
String (optional) representing priority.
Arrayref (optional) containing list of defined tags.
Whether this headline is a TODO item.
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.
Statistics cookie, e.g. '5/10' or '50%'. TODO: there might be more than one statistics cookie.
Get tags for this headline. A headline can define tags or inherit tags from its parent headline (or from document).
Get the first active timestamp element for this headline, either in the title or in the child elements.
Returns true if element doesn't contain subtrees.
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
Does the opposite of promote_node().
Like promote_node(), but all children headlines will also be promoted. Illustration:
* h1 ** h2 <-- promote 1 level *** h3 **** grandkid *** h3b ** h4 * h5
* h1 * h2 ** h3 *** grandkid ** h3b ** h4 * h5
Does the opposite of promote_branch().
Search for property named $name in the PROPERTIES drawer. If $search_parent is set to true (default is false), will also search in upper-level properties (useful for searching for inherited property, like foo_ALL). Return undef if property cannot be found.
Regardless of $search_parent setting, file-wide properties will be consulted if property is not found in the headline's properties drawer.
Return an entire drawer as an Org::Element::Drawer object. By default, return the PROPERTIES drawer. If you want LOGBOOK or some other drawer, ask for it by name.
Update the statistics cookies by recalculating the number of TODO and checkboxes.
Will do nothing if the headline does not have any statistics cookie.
Please visit the project's homepage at https://metacpan.org/release/Org-Parser.
Source repository is at https://github.com/perlancar/perl-Org-Parser.
perlancar <perlancar@cpan.org>
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
This software is copyright (c) 2023, 2022, 2021, 2020, 2019, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Org-Parser
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
To install Org::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Org::Parser
CPAN shell
perl -MCPAN -e shell install Org::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.