From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: [PATCH 2/3] org-capture: use org-eval Date: Fri, 17 Dec 2010 18:18:14 +0100 Message-ID: <1292606295-18457-2-git-send-email-julien@danjou.info> References: <1292606295-18457-1-git-send-email-julien@danjou.info> Return-path: Received: from [140.186.70.92] (port=58555 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTdwq-0006nu-Q4 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-00049K-84 for emacs-orgmode@gnu.org; Fri, 17 Dec 2010 12:18:28 -0500 Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:49510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTdwh-00048N-2h for emacs-orgmode@gnu.org; Fri, 17 Dec 2010 12:18:19 -0500 In-Reply-To: <1292606295-18457-1-git-send-email-julien@danjou.info> 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-capture.el (org-capture-fill-template): Use org-eval. --- lisp/org-capture.el | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index b85b011..29ecbc1 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1206,10 +1206,7 @@ The template may still contain \"%?\" for cursor positioning." (goto-char (match-beginning 0)) (let ((template-start (point))) (forward-char 1) - (let ((result - (condition-case error - (eval (read (current-buffer))) - (error (format "%%![Error: %s]" error))))) + (let ((result (org-eval (read (current-buffer))))) (delete-region template-start (point)) (insert result))))) -- 1.7.2.3