emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH 1/3] Add org-eval
@ 2010-12-17 17:18 Julien Danjou
  2010-12-17 17:18 ` [PATCH 2/3] org-capture: use org-eval Julien Danjou
  2010-12-17 17:18 ` [PATCH 3/3] org-agenda: allow %() in prefix format Julien Danjou
  0 siblings, 2 replies; 4+ messages in thread
From: Julien Danjou @ 2010-12-17 17:18 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Julien Danjou

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

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-17 18:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-17 17:18 [PATCH 1/3] Add org-eval Julien Danjou
2010-12-17 17:18 ` [PATCH 2/3] org-capture: use org-eval Julien Danjou
2010-12-17 17:18 ` [PATCH 3/3] org-agenda: allow %() in prefix format Julien Danjou
2010-12-17 17:58   ` Lawrence Mitchell

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).