** org-insert-heading-hook(s) (7) :PROPERTIES: :CREATED: [2023-04-29 Sat 16:04] :CUSTOM_ID: 2023-04-29_16:04:47.146113 :END: *** 1. always add CREATED property :PROPERTIES: :CREATED: [2023-04-29 Sat 16:05] :CUSTOM_ID: 2023-04-29_16:05:16.930966 :END: #+name: created on [2023-04-29 Sat 16:06:09] #+begin_src emacs-lisp (defun my/org-heading-insert-heading-inactive-timestamp () (save-excursion ;; src https://emacs.stackexchange.com/questions/72147/org-mode-adding-creation-date-property-upon-heading-creation (org-back-to-heading) (my/set-property-with-inactive-timestamp "CREATED"))) ;; src https://emacs-orgmode.gnu.narkive.com/xdMIn5QZ/o-how-can-i-calculate-the-age-of-a-headline ;; extra src https://emacs.stackexchange.com/questions/72147/org-mode-adding-creation-date-property-upon-heading-creation (add-hook 'org-insert-heading-hook 'my/org-heading-insert-heading-inactive-timestamp 'append) #+end_src