emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] bug in 8.2.5f for using tables as data in python?


From: Miguel Ruiz
Subject: Re: [O] bug in 8.2.5f for using tables as data in python?
Date: Wed, 22 Jan 2014 15:58:53 +0000 (GMT)

Sorry, Bastien

At this moment, in ob-python.el you can see:

(defun org-babel-python-var-to-python (var)
  "Convert an elisp value to a python variable.
Convert an elisp value, VAR, into a string of python source code
specifying a variable of the same value."
  (if (listp var)
      (concat "[" (mapconcat #'org-babel-python-var-to-python var ", ") "]")
    (if (equal var 'hline)
	org-babel-python-hline-to
      (format
       (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S")
       (substring-no-properties var)))))

But I understand that Daniel Gerber's proposal is (note the last line):

(defun org-babel-python-var-to-python (var)
  "Convert an elisp value to a python variable.
Convert an elisp value, VAR, into a string of python source code
specifying a variable of the same value."
  (if (listp var)
      (concat "[" (mapconcat #'org-babel-python-var-to-python var ", ") "]")
    (if (equal var 'hline)
	org-babel-python-hline-to
      (format
       (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S")
       (if (stringp var) (substring-no-properties var) var)))))

And, related to the problem of the OP, this last code works for me.

Miguel


El Miércoles 22 de enero de 2014 15:23, Bastien <address@hidden> escribió:
Hi Miguel,

Miguel Ruiz <address@hidden> writes:

> Could it be a poorly rewritten patch? Original Daniel Gerber's
> proposal works for me.


Can you tell what's wrong in the current version of ob-python.el
from git repo?  Otherwise I'm not sure to understand.

Thanks,

--
Bastien





reply via email to

[Prev in Thread] Current Thread [Next in Thread]