TODO and other heading keywords lost in read-str
Describe the bug
read-str currently drops information about TODO and other keywords contained in headlines. I'd like to have this information.
To Reproduce
(org/read-str "* TODO foo bar")
;; => {:headlines
;; [{:headline
;; {:level 1,
;; :title [[:text-normal "foo bar"]],
;; :planning [], <--- should this contain it?
;; :tags []}}]}
(org.parser/parse "* TODO foo bar")
;; => [:S
;; [:headline
;; [:stars "*"]
;; [:keyword "TODO"] <--- is present in actual parsed output
;; [:text [:text-normal "foo bar"]]]]
Expected behavior
The output of read-str should contain information about the todo state.
Screenshots
N/A
Additional context
N/A
Priority also is dropped
(org/read-str "* [#B] foo bar")
;; => {:headlines
;; [{:headline
;; {:level 1,
;; :title [[:text-normal "foo bar"]],
;; :planning [],
;; :tags []}}]}
COMMENT is also dropped
With PR #69, * TODO [#B] foo bar should now output
{:headlines [{:headline {:level 1,
:title [[:text-normal "foo bar"]],
:planning [],
:keyword "TODO",
:priority "B",
:commented? false
:tags []}}]}
Hey @lilactown, thanks for contributing! The planning is meant for headline timestamp information (scheduled, deadline).
Implementing TODO keyword and COMMENT is a great improvement. I'll look at your PR.