András Major <andras.g.ma...@gmail.com> wrote: > Hi Eric, > > > Can you post an example? Here is a working example. > > In your example, simply write "asymptote" in place of "sh" and replace the > code by "size(100);" just to make sure it's valid asymptote (though the > error occurs even if you don't). In fact, I'm quite sure that asy never > gets executed in this case. >
Yes, even without any asymptote code, this breaks. But there seem to be multiple problems. One is fix-empty-lines, a local routine defines inside org-babel-asymptote-table-to-array: it seems to assume that the table is a list of lists, whereas in this case it's a list of strings. The following patch (which probably is wrong, in that it cures the symptom rather than the disease): diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index 89aecb7..39156d2 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -139,7 +139,7 @@ (defun org-babel-asymptote-table-to-array (table type params) (atom-to-string (cdr table)))))) ;; Remove any empty row (fix-empty-lines (table) - (delq nil (mapcar (lambda (l) (delq "" l)) table)))) + (delq nil (mapcar (lambda (l) (if (listp l) (delq "" l) l)) table)))) (orgtbl-to-generic (fix-empty-lines (atom-to-string table)) (org-combine-plists '(:hline nil :sep "," :tstart "{" :tend "}") params)))) lets things go a bit further, but there is mayhem in orgtbl-format-line, which is called by orgtbl-format-section, which is called by orgtbl-to-generic above, and I didn't go any further: I just don't know what the preconditions are on these routines. Nick