Browse Source

Merge branch 'master' of orgmode.org:org-mode

Carsten Dominik 4 years ago
parent
commit
fbd604d7f5
2 changed files with 15 additions and 15 deletions
  1. 0 1
      doc/org.texi
  2. 15 14
      lisp/ob-lisp.el

+ 0 - 1
doc/org.texi

@@ -847,7 +847,6 @@ The version 7.3 of this manual is available as a
 @uref{http://www.network-theory.co.uk/org/manual/, paperback book from Network
 Theory Ltd.}
 
-@page
 
 
 @node Installation

+ 15 - 14
lisp/ob-lisp.el

@@ -77,21 +77,22 @@ current directory string."
   (org-babel-reassemble-table
    ((lambda (result)
       (org-babel-result-cond (cdr (assoc :result-params params))
-	(car result)
+	result
 	(condition-case nil
-	    (read (org-babel-lisp-vector-to-list (cadr result)))
-	  (error (cadr result)))))
-    (with-temp-buffer
-      (insert (org-babel-expand-body:lisp body params))
-      (slime-eval `(swank:eval-and-grab-output
-		    ,(let ((dir (if (assoc :dir params)
-				    (cdr (assoc :dir params))
-				  default-directory)))
-		       (format
-			(if dir (format org-babel-lisp-dir-fmt dir) "(progn %s)")
-			(buffer-substring-no-properties
-			 (point-min) (point-max)))))
-		  (cdr (assoc :package params)))))
+	    (read (org-babel-lisp-vector-to-list result))
+	  (error result))))
+    (funcall (if (member "output" (cdr (assoc :result-params params)))
+		 #'car #'cadr)
+	     (with-temp-buffer
+	       (insert (org-babel-expand-body:lisp body params))
+	       (slime-eval `(swank:eval-and-grab-output
+			     ,(let ((dir (if (assoc :dir params)
+					     (cdr (assoc :dir params))
+					   default-directory)))
+				(format (format org-babel-lisp-dir-fmt dir)
+					(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))