forked from mirrors/org-mode
ob-exp: check for info before exporting code blocks -- fixes a latex export issue
Thanks for Nicolas Goaziou for pointing this out * lisp/ob-exp.el (org-babel-exp-src-blocks): don't attempt to export blocks when there is no info match -- this fixes a bug in the latex export of code blocks located before the first headline
This commit is contained in:
parent
bc8d3a7704
commit
a3dfb1c626
|
@ -97,13 +97,15 @@ none ----- do not display either code or results upon export"
|
|||
(goto-char (match-beginning 0))
|
||||
(let* ((info (org-babel-get-src-block-info))
|
||||
(params (nth 2 info)))
|
||||
;; expand noweb references in the original file
|
||||
(setf (nth 1 info)
|
||||
(if (and (cdr (assoc :noweb params))
|
||||
(string= "yes" (cdr (assoc :noweb params))))
|
||||
(org-babel-expand-noweb-references
|
||||
info (get-file-buffer org-current-export-file))
|
||||
(nth 1 info)))
|
||||
;; bail if we couldn't get any info from the block
|
||||
(when info
|
||||
;; expand noweb references in the original file
|
||||
(setf (nth 1 info)
|
||||
(if (and (cdr (assoc :noweb params))
|
||||
(string= "yes" (cdr (assoc :noweb params))))
|
||||
(org-babel-expand-noweb-references
|
||||
info (get-file-buffer org-current-export-file))
|
||||
(nth 1 info))))
|
||||
(org-babel-exp-do-export info 'block))))
|
||||
|
||||
(defun org-babel-exp-inline-src-blocks (start end)
|
||||
|
|
Loading…
Reference in New Issue