From b6912331715c7da08927b3636b6721af5f5e0c41 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Tue, 1 Mar 2011 10:31:00 -0700 Subject: [PATCH] ob: allow passing elisp vectors through to code blocks * lisp/ob.el (org-babel-read): Pass elisp vectors through to code blocks. --- lisp/ob.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index ea1c9686b..b0b5fb6d7 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -1913,16 +1913,15 @@ block but are passed literally to the \"example-block\"." (defun org-babel-read (cell &optional inhibit-lisp-eval) "Convert the string value of CELL to a number if appropriate. -Otherwise if cell looks like lisp (meaning it starts with a \"(\" -or a \"'\") then read it as lisp, otherwise return it unmodified -as a string. Optional argument NO-LISP-EVAL inhibits lisp -evaluation for situations in which is it not appropriate." +Otherwise if cell looks like lisp (meaning it starts with a +\"(\", \"'\", \"`\" or a \"[\") then read it as lisp, otherwise +return it unmodified as a string. Optional argument NO-LISP-EVAL +inhibits lisp evaluation for situations in which is it not +appropriate." (if (and (stringp cell) (not (equal cell ""))) (or (org-babel-number-p cell) (if (and (not inhibit-lisp-eval) - (or (equal "(" (substring cell 0 1)) - (equal "'" (substring cell 0 1)) - (equal "`" (substring cell 0 1)))) + (member (substring cell 0 1) '("(" "'" "`" "["))) (eval (read cell)) (progn (set-text-properties 0 (length cell) nil cell) cell))) cell)) -- 2.11.4.GIT