mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-30 00:57:48 +00:00
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.
This commit is contained in:
parent
d3100fd13f
commit
6323bbded9
|
@ -178,6 +178,7 @@ org-mode text."
|
||||||
(looking-at "[ \t]*:[ \t]")))
|
(looking-at "[ \t]*:[ \t]")))
|
||||||
(org-in-regexps-block-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src")))
|
(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)
|
(defun org-babel-exp-lob-one-liners (start end)
|
||||||
"Process Library of Babel calls between START and END for export.
|
"Process Library of Babel calls between START and END for export.
|
||||||
See `org-babel-exp-src-block' for export options. Currently the
|
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"
|
(list "emacs-lisp" "results"
|
||||||
(org-babel-merge-params
|
(org-babel-merge-params
|
||||||
org-babel-default-header-args
|
org-babel-default-header-args
|
||||||
|
org-babel-default-lob-header-args
|
||||||
(org-babel-params-from-buffer)
|
(org-babel-params-from-buffer)
|
||||||
(org-babel-params-from-properties)
|
(org-babel-params-from-properties)
|
||||||
(org-babel-parse-header-arguments
|
(org-babel-parse-header-arguments
|
||||||
|
@ -202,7 +204,7 @@ options are taken from `org-babel-default-header-args'."
|
||||||
(concat ":var results="
|
(concat ":var results="
|
||||||
(mapconcat #'identity
|
(mapconcat #'identity
|
||||||
(butlast lob-info) " ")))))
|
(butlast lob-info) " ")))))
|
||||||
(car (last lob-info)))
|
"" nil (car (last lob-info)))
|
||||||
'lob))))
|
'lob))))
|
||||||
(setq end (+ end (- (length replacement) (length (match-string 0)))))
|
(setq end (+ end (- (length replacement) (length (match-string 0)))))
|
||||||
(if replacement (replace-match replacement t t))))))
|
(if replacement (replace-match replacement t t))))))
|
||||||
|
|
|
@ -43,6 +43,9 @@ To add files to this list use the `org-babel-lob-ingest' command."
|
||||||
:group 'org-babel
|
:group 'org-babel
|
||||||
:type 'list)
|
:type 'list)
|
||||||
|
|
||||||
|
(defvar org-babel-default-lob-header-args '((:exports . "results"))
|
||||||
|
"Default header arguments to use when exporting #+lob/call lines.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-babel-lob-ingest (&optional file)
|
(defun org-babel-lob-ingest (&optional file)
|
||||||
"Add all named source-blocks defined in FILE to
|
"Add all named source-blocks defined in FILE to
|
||||||
|
|
Loading…
Reference in a new issue