Every time I think I'm starting to learn org Mode, I find I'm actually really ignorant.
I want to write a simple function that inserts a timestamp at point for a date one week after the previous timestamp. I'm sure it's very simple. But I can't figure out how to do it.
i have this:
(defun mwp/one-week-later ()
"add a new timestamp a week later than the previous one"
(interactive)
(save-excursion
(let ((curpos (point)))
(re-search-backward "<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" )
(let* ((previous-ts (org-element-context)))
(goto-char curpos)
(INSERT COPY OF PREVIOUS-TS) ;; obviously this is fake. But what to replace it with?
(org-timestamp-change 7 'dat) )))
)
What's the real solution? Thank you,
Matt