瀏覽代碼

babel: bug fix in exporter wrt: contents of lob info lists

* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-lob-one-liners):
  exportation of #+lob and #+call type lines is now correctly handling
  the addition of the indentation information to the info list
Eric Schulte 15 年之前
父節點
當前提交
1da53c668a
共有 1 個文件被更改,包括 13 次插入11 次删除
  1. 13 11
      contrib/babel/lisp/org-babel-exp.el

+ 13 - 11
contrib/babel/lisp/org-babel-exp.el

@@ -135,17 +135,19 @@ options are taken from `org-babel-default-header-args'."
       (while (and (< (point) end)
 		  (re-search-forward org-babel-lob-one-liner-regexp nil t))
 	(setq replacement
-	      (save-match-data
-		(org-babel-exp-do-export
-		 (list "emacs-lisp" "results"
-		       (org-babel-merge-params
-			org-babel-default-header-args
-			(org-babel-parse-header-arguments
-			 (org-babel-clean-text-properties
-			  (concat ":var results="
-				  (mapconcat #'identity
-					     (org-babel-lob-get-info) " "))))))
-		 'lob)))
+	      (let ((lob-info (org-babel-lob-get-info)))
+		(save-match-data
+		  (org-babel-exp-do-export
+		   (list "emacs-lisp" "results"
+			 (org-babel-merge-params
+			  org-babel-default-header-args
+			  (org-babel-parse-header-arguments
+			   (org-babel-clean-text-properties
+			    (concat ":var results="
+				    (mapconcat #'identity
+					       (butlast lob-info) " ")))))
+			 (car (last lob-info)))
+		   'lob))))
 	(setq end (+ end (- (length replacement) (length (match-string 0)))))
 	(replace-match replacement t t)))))