Re: org-element tutorial?

2023-05-16 Thread Ihor Radchenko
bvchg...@mail.com writes:

> Does anyone know of a good tutorial on using org-element? I'm finding
> the documentation hard to grok.

We have https://orgmode.org/worg/dev/org-element-api.html

> Alternatively, given a doc like
>
> * TODO No
> ** Uninteresting
>- item 1
>- item 2
>
> * NEXT My thing
>   SCHEDULED: <2023-05-16 Tue .+1d>
>   :PROPERTIES:
>   :STYLE: habit
>   :LAST_REPEAT: [2023-05-15 Mon 12:12]
>   :END:
>   - State "DONE"   from "NEXT"   [2023-05-15 Mon 12:12] \\
> I want this
>
> how would I get at the note entered for the state change, i.e. the "I
> want this" list item, in this example  (which might be in a drawer,
> just doesn't happen to be, here)?

You may find `org-log-beginning' useful.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



org-element tutorial?

2023-05-15 Thread bvchgvbt
Hi,

Does anyone know of a good tutorial on using org-element? I'm finding
the documentation hard to grok.

Alternatively, given a doc like

* TODO No
** Uninteresting
   - item 1
   - item 2

* NEXT My thing
  SCHEDULED: <2023-05-16 Tue .+1d>
  :PROPERTIES:
  :STYLE: habit
  :LAST_REPEAT: [2023-05-15 Mon 12:12]
  :END:
  - State "DONE"   from "NEXT"   [2023-05-15 Mon 12:12] \\
I want this

how would I get at the note entered for the state change, i.e. the "I
want this" list item, in this example  (which might be in a drawer,
just doesn't happen to be, here)?