[Top][All Lists]

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

[elpa] master 99939aa 048/135: Handle all errors in Edna forms

From: Ian Dunn
Subject: [elpa] master 99939aa 048/135: Handle all errors in Edna forms
Date: Mon, 17 Feb 2020 10:52:51 -0500 (EST)

branch: master
commit 99939aae2b6b8211a876c01e958152801f4cc510
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>

    Handle all errors in Edna forms
    * org-edna.el (org-edna-run): Catch and report all errors.
      (org-edna-finder/match): Don't convert arguments.
 org-edna.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/org-edna.el b/org-edna.el
index 370b50a..89cda05 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -197,8 +197,13 @@ Currently, the following are handled:
           (member to (cons 'done org-done-keywords)))
          (condition-case err
-           (invalid-syntax-error
-            (org-edna--print-syntax-error (cdr err))))
+           (error
+            (if (eq (car err) 'invalid-syntax-error)
+                (org-edna--print-syntax-error (cdr err))
+              (message "Edna Error: %s" (error-message-string err)))
+            (setq org-block-entry-blocking (org-get-heading))
+            ;; Block
+            nil))
        ;; Return t for the blocker to let the calling function know that there
        ;; is no block here.
@@ -239,8 +244,7 @@ SCOPE and SKIP are their counterparts in `org-map-entries', 
 as strings.
 SCOPE defaults to \"agenda\", and SKIP defaults to nil."
-  (setq scope (if scope (intern scope) 'agenda))
-  (when skip (setq skip (intern skip)))
+  (setq scope (or scope 'agenda)
    ;; Find all entries in the agenda files that match the given tag.
    (lambda nil (point-marker))

reply via email to

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