I use org-expiry
to insert the CREATED
date in properties drawer by default. When I created second level headlines with my org-capture template and press C-c C-c
when my cursor is at second level headline, org-expiry
create the properties drawer at second level headline.
I want the properties drawer to be added to top level headline no matter where my cursor is when I finish the capture.
* Top
:PROPERTIES:
:CREATED: [2023-03-07 Tue 00:14]
:END:
** Second
I finish my capture with my cursor being here.
Instead I got this:
* Top
** Second
:PROPERTIES:
:CREATED: [2023-03-07 Tue 00:14]
:END:
I finish my capture with my cursor here.
I tried to add :prepare-finalize (beginning-of-buffer)
to the capture template but it doesn't work.
(setq org-capture-templates '(("f" "fleeting notes"
entry
(file+datetree org-fleeting-note-file)
"* Top \n** Second %?"
:tree-type month
:prepare-finalize (beginning-of-buffer)
))
org-expiry
to do what it does to the capture? If you are doing it manually, then just callorg-expiry-insert-created
at the top level headline.org-expiry-insert-created
toorg-capture-before-finalize-hook
(add-hook 'org-capture-before-finalize-hook 'org-expiry-insert-created)