From ad57e15afe3bb448d396a94b7f44f42b6efbee31 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 11 Jul 2009 22:45:57 -0400 Subject: [PATCH] Bugfix in org-babel-read (relevant to all branches). I haven't managed to see why this is a 2. It breaks if cell is a string of length 1. I'm changing it to a 1 (as it is in org-collector.el), on the assumption that the 2 was erroneous. --- lisp/org-babel.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org-babel.el b/lisp/org-babel.el index dba933112..8b3572909 100644 --- a/lisp/org-babel.el +++ b/lisp/org-babel.el @@ -414,15 +414,15 @@ non-nil." (defun org-babel-read (cell) "Convert the string value of CELL to a number if appropriate. -Otherwise if cell looks like a list (meaning it starts with a -'(') then read it as lisp, otherwise return it unmodified as a -string. +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. This is taken almost directly from `org-read-prop'." (if (and (stringp cell) (not (equal cell ""))) (or (org-babel-number-p cell) (if (or (equal "(" (substring cell 0 1)) - (equal "'" (substring cell 0 2))) + (equal "'" (substring cell 0 1))) (read cell) (progn (set-text-properties 0 (length cell) nil cell) cell))) cell))