From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: [PATCH 1/3] Add org-eval Date: Fri, 17 Dec 2010 18:18:13 +0100 Message-ID: <1292606295-18457-1-git-send-email-julien@danjou.info> Return-path: Received: from [140.186.70.92] (port=58553 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTdwq-0006nt-OU for emacs-orgmode@gnu.org; Fri, 17 Dec 2010 12:18:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTdwh-00049F-7j for emacs-orgmode@gnu.org; Fri, 17 Dec 2010 12:18:28 -0500 Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:49507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTdwh-00048I-2g for emacs-orgmode@gnu.org; Fri, 17 Dec 2010 12:18:19 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Julien Danjou * org-agenda.el (org-eval): New function. Signed-off-by: Julien Danjou --- lisp/org-agenda.el | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 19535b4..a23d7d7 100644 --- a/lisp/org-agenda.el +++ b/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 -- 1.7.2.3