Hi, I'm working on a bugtracker sync tool for org-mode [1]. I'm using org-element to parse org files, it does everything I need.
It turns this * TODO blah <2012-06-25> :PROPERTIES: :foo: bar :END: Foo bar into this: (org-data nil (headline (:raw-value "blah <2012-06-25>" :title ("blah " (timestamp (:type active :value "<2012-06-25>"))) :level 1 :todo-keyword "TODO" :todo-type todo :timestamp "2012-06-25" :foo "bar" :category "???") (section () (property-drawer (:properties (("foo" . "bar")))) (paragraph () "Foo bar")))) I've removed irrelevant stuff for the example but you can get get the start/end point of each element from this structure. Just call org-element-parse-buffer. 1: http://orgmode.org/w/org-sync.git