emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 7d30f60 088/135: Catch non-existent timestamps in planning


From: Ian Dunn
Subject: [elpa] master 7d30f60 088/135: Catch non-existent timestamps in planning action
Date: Mon, 17 Feb 2020 10:52:58 -0500 (EST)

branch: master
commit 7d30f60877802876f71e6da817e11705d1d39151
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]