Hey everyone,

Suppose you have a task with an Org source block containing another
task, both with scheduling or deadline information, e.g.

* TODO Some bug report
SCHEDULED: <2026-05-18 Mon>

Reproduction steps […]

#+begin_src org
,* TODO Headline
SCHEDULED: <2026-05-17 Sun>
#+end_src

If you call ‘org-schedule’ or ‘org-deadline’ with a single prefix
argument ‘C-u’, it should remove the schedule or deadline,
respectively, but you’ll also find that it’s been removed from the
source block.  This is because ‘org-remove-timestamp-with-keyword’
just does a regex replacement of all matching lines in the item.

Since the keywords need to appear immediately after the task, I think
the replacement in ‘org-remove-timestamp-with-keyword’ can just be
done in reverse, and stop after a single replacement.

I’m happy to provide a patch if this approach is acceptable, or leave
it open for someone to learn.

Thanks,

-- 
Jacob S. Gordon
[email protected]
Please don’t send me HTML emails or MS Office/Apple iWork documents.
https://useplaintext.email/#etiquette
https://www.fsf.org/campaigns/opendocument

Reply via email to