* [BUG] Delay cookies of the form "--1d" are not handled properly [9.6.15 (release_9.6.15 @ /opt/homebrew/Cellar/emacs-plus@29/29.4/share/emacs/29.4/lisp/org/)]
@ 2025-01-22 20:55 Alejandro Pérez Carballo
0 siblings, 0 replies; only message in thread
From: Alejandro Pérez Carballo @ 2025-01-22 20:55 UTC (permalink / raw)
To: emacs-orgmode
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/)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-22 20:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22 20:55 [BUG] Delay cookies of the form "--1d" are not handled properly [9.6.15 (release_9.6.15 @ /opt/homebrew/Cellar/emacs-plus@29/29.4/share/emacs/29.4/lisp/org/)] Alejandro Pérez Carballo
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).