Does this feature exist in Emacs orgmode core?
No
Is code AI assisted/generated?
No
Orgmode link
No response
Feature value
Allows users to write into drawers without needing to create custom drawer parsing logic. Useful for custom logs, event hooks, time tracking, etc.
Additional context
I'm hooking into EventManager.event.TodoChanged and appending data to the LOGBOOK drawer:
local note = "..."
event.headline:add_to_drawer("LOGBOOK", note)
This works great but isn't documented as part of the api so it could break.
It actually prepends to the top of the drawer which works fine for me but ideally the api would allow adding content to the top or bottom of an existing drawer. It also creates a drawer that does not yet exist which works well for me.
Checked using :h OrgApi there's no mention of OrgHeadline.add_to_drawer or even add_note. Also the link to orgmode_api.txt on this page leads to a 404:
https://nvim-orgmode.github.io/#api-docs
https://nvim-orgmode.github.io/doc/orgmode_api.txt
I'm not clear where OrgApiHeadline is officially documented or what the difference is so perhaps this is also a note about improving the api discoverability. I'm just calling EventManager.listen... within my orgmode setup, I'm not writing a plugin.
Does this feature exist in Emacs orgmode core?
No
Is code AI assisted/generated?
No
Orgmode link
No response
Feature value
Allows users to write into drawers without needing to create custom drawer parsing logic. Useful for custom logs, event hooks, time tracking, etc.
Additional context
I'm hooking into
EventManager.event.TodoChangedand appending data to theLOGBOOKdrawer:This works great but isn't documented as part of the api so it could break.
It actually prepends to the top of the drawer which works fine for me but ideally the api would allow adding content to the top or bottom of an existing drawer. It also creates a drawer that does not yet exist which works well for me.
Checked using
:h OrgApithere's no mention ofOrgHeadline.add_to_draweror evenadd_note. Also the link toorgmode_api.txton this page leads to a 404:https://nvim-orgmode.github.io/#api-docs
https://nvim-orgmode.github.io/doc/orgmode_api.txt
I'm not clear where
OrgApiHeadlineis officially documented or what the difference is so perhaps this is also a note about improving the api discoverability. I'm just callingEventManager.listen...within my orgmode setup, I'm not writing a plugin.