Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
With point on an entry containing a scheduled timestamp like “<2025-01-22 Wed
+1d --1d>”, calling `(org-entry-put nil "SCHEDULED" (org-entry-get nil
"SCHEDULED"))' results in the removal of the delay cookie "--1d". This doesn’t
happen if there is no repeater or if the delay cookie is of the form "-1d".
I’m assuming this is not the intended behavior. (As long as the current VAL of
PROP is not problematic in some sense, I’d expect “(org-entry-put nil PROP
(org-entry-get nil PROP))” to leave VAL intact.)
As far as I can tell, the issue can be traced back to the way
`org--deadline-or-schedule' parses the ‘time’ argument: the variable ‘repeater’
is set to “+1d -1d” if the TIME argument to `org--deadline-or-schedule' is “+1d
-1d” but set to “+1d” if it is “+1d --1d”.
I’m guessing the wrinkle is in the regex here:
“(string-match "\\([.+-]+[0-9]+[hdwmy]\\(?:[/ ][-+]?[0-9]+[hdwmy]\\)?\\)" time)”
but I’m not sure how to modify it. (The first captured group is “+1d -1d” when
the input string is e.g. “<2025-01-22 Wed +1d -1d>” but “+1d” when it is
“<2025-01-22 Wed +1d --1d>”.)
Emacs : GNU Emacs 29.4 (build 2, aarch64-apple-darwin21.6.0, NS appkit-2113.65
Version 12.7.4 (Build 21H1123))
of 2024-08-19
Package: Org mode version 9.6.15 (release_9.6.15 @
/opt/homebrew/Cellar/emacs-plus@29/29.4/share/emacs/29.4/lisp/org/)