Browse Source

ob-emacs-lisp: now supports :results output

* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Now supports
  ":results output".
Eric Schulte 9 years ago
parent
commit
2c8e964b70
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/ob-emacs-lisp.el

+ 4 - 1
lisp/ob-emacs-lisp.el

@@ -57,7 +57,10 @@
   "Execute a block of emacs-lisp code with Babel."
   (save-window-excursion
     (org-babel-reassemble-table
-     (eval (read (format "(progn %s)"
+     (eval (read (format (if (member "output"
+				     (cdr (assoc :result-params params)))
+			     "(with-output-to-string %s)"
+			   "(progn %s)")
 			 (org-babel-expand-body:emacs-lisp body params))))
      (org-babel-pick-name (cdr (assoc :colname-names params))
 			  (cdr (assoc :colnames params)))