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.
This commit is contained in:
Dan Davison 2009-07-11 22:45:57 -04:00
parent cd4c794af6
commit 21d058869d
1 changed files with 4 additions and 4 deletions

View File

@ -531,15 +531,15 @@ parameters when merging lists."
(defun org-babel-read (cell) (defun org-babel-read (cell)
"Convert the string value of CELL to a number if appropriate. "Convert the string value of CELL to a number if appropriate.
Otherwise if cell looks like a list (meaning it starts with a Otherwise if cell looks like lisp (meaning it starts with a
'(') then read it as lisp, otherwise return it unmodified as a \"(\" or a \"'\") then read it as lisp, otherwise return it
string. unmodified as a string.
This is taken almost directly from `org-read-prop'." This is taken almost directly from `org-read-prop'."
(if (and (stringp cell) (not (equal cell ""))) (if (and (stringp cell) (not (equal cell "")))
(or (org-babel-number-p cell) (or (org-babel-number-p cell)
(if (or (equal "(" (substring cell 0 1)) (if (or (equal "(" (substring cell 0 1))
(equal "'" (substring cell 0 2))) (equal "'" (substring cell 0 1)))
(read cell) (read cell)
(progn (set-text-properties 0 (length cell) nil cell) cell))) (progn (set-text-properties 0 (length cell) nil cell) cell)))
cell)) cell))