On 2025-02-02 08:38, Uwe Brauer via
General discussions about Org-mode. wrote:
Vale, entendido (supongo que eres español, porque usas la palabra movil,
¿correcto?)
Yes :D
but let's keep the discussion in the mailinglist in English so
other people can participate, or benefit from it
Thanks, but I cannot find the function
my/set-property-with-inactive-timestamp
In your code,
In fact you don't need ~my/get-inactive-timestamp~ for your
pursposes, try with this one:
#+begin_src emacs-lisp
(defun my/org-add-timestamp-on-heading ()
(save-excursion
(org-back-to-heading)
(org-edit-headline (format-time-string "<%F>"))))
(add-hook 'org-insert-heading-hook 'my/org-add-timestamp-on-heading
'append)
;; to remove it
;; (remove-hook 'org-insert-heading-hook
'my/org-add-timestamp-on-heading)
#+end_src
but here you have for curiosity, there you can see compact strftime
format to construct a inactive timestamp
[1]
#+begin_src emacs-lisp
(defun my/get-inactive-timestamp ()
(format-time-string "[%F %a %R]"))
(defun my/set-property-with-inactive-timestamp (property)
(interactive)
(org-set-property property (my/get-inactive-timestamp)))
#+end_src