Browse Source

Add org-eval

* org-agenda.el (org-eval): New function.

Signed-off-by: Julien Danjou <julien@danjou.info>
Julien Danjou 14 years ago
parent
commit
2c1925f2a5
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lisp/org-agenda.el

+ 6 - 0
lisp/org-agenda.el

@@ -5369,6 +5369,12 @@ The modified list may contain inherited tags, and tags matched by
 	  (append new list)
 	(append list new)))))
 
+(defun org-eval (form)
+  "Eval FORM and return result."
+  (condition-case error
+      (eval form)
+    (error (format "%%![Error: %s]" error))))
+
 (defun org-compile-prefix-format (key)
   "Compile the prefix format into a Lisp form that can be evaluated.
 The resulting form is returned and stored in the variable