소스 검색

Add org-eval

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

Signed-off-by: Julien Danjou <julien@danjou.info>
Julien Danjou 14 년 전
부모
커밋
2c1925f2a5
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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