branch: master commit 7d30f60877802876f71e6da817e11705d1d39151 Author: Ian Dunn <du...@gnu.org> Commit: Ian Dunn <du...@gnu.org>
Catch non-existent timestamps in planning action * org-edna.el (org-edna--handle-planning): Throw an error if the source timestamp doesn't exist. --- org-edna.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org-edna.el b/org-edna.el index 01f13c3..f14bcc7 100644 --- a/org-edna.el +++ b/org-edna.el @@ -1195,6 +1195,9 @@ forward) or the last day of MONTH (backward)." (pcase-let* ((`(,n ,what-string ,def) (org-edna--read-date-get-relative arg this-time current)) (ts (if def current-ts this-ts)) (what (cdr (assoc-string what-string type-map)))) + ;; Ensure that the source timestamp exists + (unless ts + (error "Tried to increment a non-existent timestamp")) (org--deadline-or-schedule nil type (org-edna--mod-timestamp ts n what)))) (t ;; For everything else, assume `org-read-date-analyze' can handle it