2026-05-08 Friday

**** Test
:PROPERTIES:
:EXPORT_FILE_NAME: 2026-05-08
:END:

The default behaviour with earlier template captured current date for EXPORT_FILE_NAME.

"* %^{Title}\n:PROPERTIES:\n:EXPORT_FILE_NAME: %(format-time-string \"%Y-%m-%d\")\n:END:\n%?"

It needs to be modified as below

"* %^{Title}\n:PROPERTIES:\n:EXPORT_FILE_NAME: %(format-time-string \"%Y-%m-%d\" (org-capture-get :default-time))\n:END:\n%?"
**** Second note for 8th day of May
:PROPERTIES:
:EXPORT_FILE_NAME: 2026-05-08
:END:

This is the second note for this day.

Basically, the above capture template overrides the last post and results in the latest post for date.. A third solution is here..

(defun my/set-daily-export-file-name ()
  (save-excursion
    (org-up-heading-safe) ; go to *** day heading
    (unless (org-entry-get nil "EXPORT_FILE_NAME")
      (org-entry-put nil "EXPORT_FILE_NAME"
                     (format-time-string "%Y-%m-%d" (org-capture-get :default-time))))))

(add-hook 'org-capture-before-finalize-hook #'my/set-daily-export-file-name)

The template should just have this

"* %^{Title}\n%?"

Third post for 8th of May

This is the third post for the day from dailies capture template.

© Prabu Anand K 2020-2026