Bladeren bron

ob-python: can now handle VERY long result lines

* lisp/ob-python.el (org-babel-python-table-or-string): can now handle
  VERY long result lines
Eric Schulte 14 jaren geleden
bovenliggende
commit
9a2ea65bc3
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 4 2
      lisp/ob-python.el

+ 4 - 2
lisp/ob-python.el

@@ -125,8 +125,10 @@ Emacs-lisp table, otherwise return the results as a string."
 	 (mapcar (lambda (el) (if (equal el 'None) 'hline el)) res)
        res))
    (org-babel-read
-   (if (or (string-match "^\\[.+\\]$" results)
-	   (string-match "^(.+)$" results))
+    (if (or (and (equal (substring results 0 1) "[")
+		 (equal (substring results -2 -1) "]"))
+	    (and (equal (substring results 0 1) "(")
+		 (equal (substring results -2 -1) ")")))
        (org-babel-read
         (concat "'"
                 (replace-regexp-in-string