org-babel-tangle-collect-blocks: Ignore src blocks without language

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Skip src blocks
that do not specify lang rather than erring.

Reported-by: Andrea <andrea-dev@hotmail.com>
Link: https://orgmode.org/list/AS8P193MB241369D9F0701F57E293429288D3A@AS8P193MB2413.EURP193.PROD.OUTLOOK.COM
This commit is contained in:
Ihor Radchenko 2023-10-12 17:34:54 +03:00
parent a2dd30d3a1
commit f3de4c3e04
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 0 deletions

View File

@ -475,6 +475,7 @@ code blocks by target file."
(src-lang (nth 0 info))
(src-tfile (cdr (assq :tangle (nth 2 info)))))
(unless (or (string= src-tfile "no")
(not src-lang) ;; src block without lang
(and tangle-file (not (equal tangle-file src-tfile)))
(and lang-re (not (string-match-p lang-re src-lang))))
;; Add the spec for this block to blocks under its tangled