ob: Allow babel settings to be made in multiple #+babel: lines
* lisp/ob.el (org-babel-params-from-buffer): Process all #+babel: lines in the buffer
This commit is contained in:
parent
624141cc68
commit
05ef2ae7cc
24
lisp/ob.el
24
lisp/ob.el
|
@ -856,18 +856,20 @@ may be specified in the properties of the current outline entry."
|
|||
(defun org-babel-params-from-buffer ()
|
||||
"Retrieve per-buffer parameters.
|
||||
Return an association list of any source block params which
|
||||
may be specified at the top of the current buffer."
|
||||
may be specified in the current buffer."
|
||||
(or org-babel-current-buffer-properties
|
||||
(setq org-babel-current-buffer-properties
|
||||
(save-match-data
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward
|
||||
(org-make-options-regexp (list "BABEL")) nil t)
|
||||
(org-babel-parse-header-arguments
|
||||
(org-match-string-no-properties 2)))))))))
|
||||
(save-match-data
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward
|
||||
(org-make-options-regexp (list "BABEL")) nil t)
|
||||
(setq org-babel-current-buffer-properties
|
||||
(org-babel-merge-params
|
||||
org-babel-current-buffer-properties
|
||||
(org-babel-parse-header-arguments
|
||||
(org-match-string-no-properties 2))))))))))
|
||||
|
||||
(defvar org-src-preserve-indentation)
|
||||
(defun org-babel-parse-src-block-match ()
|
||||
|
|
Loading…
Reference in New Issue