mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
ob-lisp: now reads/applies :colnames and :rownames header arguments
* lisp/ob-lisp.el (org-babel-execute:lisp): Now using `org-babel-reassemble-table' to apply the appropriate header arguments to results.
This commit is contained in:
parent
27fe8e0dd7
commit
ad976c66cb
@ -63,15 +63,20 @@
|
||||
(defun org-babel-execute:lisp (body params)
|
||||
"Execute a block of Common Lisp code with Babel."
|
||||
(require 'slime)
|
||||
(with-temp-buffer
|
||||
(insert (org-babel-expand-body:lisp body params))
|
||||
((lambda (result)
|
||||
(if (member "output" (cdr (assoc :result-params params)))
|
||||
(car result)
|
||||
(condition-case nil (read (cadr result)) (error (cadr result)))))
|
||||
(slime-eval `(swank:eval-and-grab-output
|
||||
,(buffer-substring-no-properties (point-min) (point-max)))
|
||||
(cdr (assoc :package params))))))
|
||||
(org-babel-reassemble-table
|
||||
(with-temp-buffer
|
||||
(insert (org-babel-expand-body:lisp body params))
|
||||
((lambda (result)
|
||||
(if (member "output" (cdr (assoc :result-params params)))
|
||||
(car result)
|
||||
(condition-case nil (read (cadr result)) (error (cadr result)))))
|
||||
(slime-eval `(swank:eval-and-grab-output
|
||||
,(buffer-substring-no-properties (point-min) (point-max)))
|
||||
(cdr (assoc :package params)))))
|
||||
(org-babel-pick-name (cdr (assoc :colname-names params))
|
||||
(cdr (assoc :colnames params)))
|
||||
(org-babel-pick-name (cdr (assoc :rowname-names params))
|
||||
(cdr (assoc :rownames params)))))
|
||||
|
||||
(provide 'ob-lisp)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user