[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modifying the parse tree
From: |
bvchgvbt |
Subject: |
Re: Modifying the parse tree |
Date: |
Fri, 26 May 2023 13:27:33 +0200 |
> "Ihor Radchenko" wrote:
> >> Which implies that you added invalid headline element to the tree.
> >
> > Hmm. Does
> > headline (:title hello :todo-keyword TODO :todo-type todo)
> > look valid to you as a minimal TODO-type headline? Created via:
> >
> > (let ((todo (org-element-create 'headline)))
> > (org-element-put-property todo :title todo-title)
> > (org-element-put-property todo :todo-keyword "TODO")
> > (org-element-put-property todo :todo-type "todo"))
>
> Yes, it is invalid. You must always have :level.
Ah! Thank you! Is there some documentation that explains which properties
each element must have in order to be valid, please?
For example I'm now trying to create a deadline for the heading, and it's
also not working.
> You might try https://github.com/ndwarshuis/org-ml, though I plan some
> breaking changes affecting org-ml soon.
Thanks, I'll look into that. From first glance it looks useful. I'll
probaby continue as I am until I get something that works, and then maybe
refactor to use org-ml.