Переглянути джерело

ob-exp: fixed a bug in exportation of #+call lines

* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Corrected the
  structure of the resulting info list.
* lisp/ob-lob.el (org-babel-default-lob-header-args): Export the
  results of call lines by default.
Eric Schulte 14 роки тому
батько
коміт
6323bbded9
2 змінених файлів з 6 додано та 1 видалено
  1. 3 1
      lisp/ob-exp.el
  2. 3 0
      lisp/ob-lob.el

+ 3 - 1
lisp/ob-exp.el

@@ -178,6 +178,7 @@ org-mode text."
 	  (looking-at "[ \t]*:[ \t]")))
       (org-in-regexps-block-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src")))
 
+(defvar org-babel-default-lob-header-args)
 (defun org-babel-exp-lob-one-liners (start end)
   "Process Library of Babel calls between START and END for export.
 See `org-babel-exp-src-block' for export options. Currently the
@@ -195,6 +196,7 @@ options are taken from `org-babel-default-header-args'."
 		   (list "emacs-lisp" "results"
 			 (org-babel-merge-params
 			  org-babel-default-header-args
+			  org-babel-default-lob-header-args
 			  (org-babel-params-from-buffer)
 			  (org-babel-params-from-properties)
 			  (org-babel-parse-header-arguments
@@ -202,7 +204,7 @@ options are taken from `org-babel-default-header-args'."
 			    (concat ":var results="
 				    (mapconcat #'identity
 					       (butlast lob-info) " ")))))
-			 (car (last lob-info)))
+			 "" nil (car (last lob-info)))
 		   'lob))))
 	(setq end (+ end (- (length replacement) (length (match-string 0)))))
 	(if replacement (replace-match replacement t t))))))

+ 3 - 0
lisp/ob-lob.el

@@ -43,6 +43,9 @@ To add files to this list use the `org-babel-lob-ingest' command."
   :group 'org-babel
   :type 'list)
 
+(defvar org-babel-default-lob-header-args '((:exports . "results"))
+  "Default header arguments to use when exporting #+lob/call lines.")
+
 ;;;###autoload
 (defun org-babel-lob-ingest (&optional file)
   "Add all named source-blocks defined in FILE to