ob-exp.el: org-babel-exp-process-buffer reports src block w/o language
* lisp/ob-exp.el (org-babel-exp-process-buffer): Issue an error when a src block with no language is processed. Throw an error with an informative message when trying to export buffer containing `#+src_block\n'. Reported-by: XIE Yuheng <xyheme@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/95920>
This commit is contained in:
parent
69e6f4acaf
commit
53c6f68896
|
@ -257,12 +257,15 @@ may make them unreachable."
|
|||
(src-block
|
||||
(let* ((match-start (copy-marker (match-beginning 0)))
|
||||
(ind (org-get-indentation))
|
||||
(lang (or (org-element-property :language element)
|
||||
(error "No language for src block: %s"
|
||||
(or (org-element-property :name element)
|
||||
"(unnamed)"))))
|
||||
(headers
|
||||
(cons
|
||||
(org-element-property :language element)
|
||||
(let ((params (org-element-property :parameters
|
||||
element)))
|
||||
(and params (org-split-string params "[ \t]+"))))))
|
||||
(cons lang
|
||||
(let ((params
|
||||
(org-element-property :parameters element)))
|
||||
(and params (org-split-string params "[ \t]+"))))))
|
||||
;; Take care of matched block: compute replacement
|
||||
;; string. In particular, a nil REPLACEMENT means
|
||||
;; the block should be left as-is while an empty
|
||||
|
|
Loading…
Reference in New Issue