From: "Alejandro Pérez Carballo" <apc@umass.edu>
To: emacs-orgmode@gnu.org
Subject: [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/)]
Date: Wed, 22 Jan 2025 15:55:56 -0500 [thread overview]
Message-ID: <rzm4h0tt9qtvoj.fsf@umass.edu> (raw)
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/)
reply other threads:[~2025-01-22 20:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rzm4h0tt9qtvoj.fsf@umass.edu \
--to=apc@umass.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).