summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gillespie <tgbugs@gmail.com>2021-06-16 16:29:54 -0700
committerTEC <tec@tecosaur.com>2021-07-25 03:42:42 +0800
commitc9dfed48a607c7f6524f1c6480f09cf61a5d6237 (patch)
tree487c8aaebaa7f5520c767233ae4f4e3cecb2e9e3
parent604bfd9d755770e12c368c15148780ec723211df (diff)
downloadorg-mode-c9dfed48a607c7f6524f1c6480f09cf61a5d6237.tar.gz
ob-core: tangle check LOB after current buffer
* lisp/ob-core.el (org-babel-expand-noweb-references): Fix order when searching for named babel blocks so that blocks in the current buffer are always found first. This fixes a bug where stale versions of blocks that have been ingested into the library of babel were being preferentially tangled instead of newly modified versions from the current buffer.
-rw-r--r--lisp/ob-core.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 857e03e..384c06c 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2828,8 +2828,6 @@ block but are passed literally to the \"example-block\"."
(setq cache nil)
(let ((raw (org-babel-ref-resolve id)))
(if (stringp raw) raw (format "%S" raw))))
- ;; Retrieve from the Library of Babel.
- ((nth 2 (assoc-string id org-babel-library-of-babel)))
;; Return the contents of headlines literally.
((org-babel-ref-goto-headline-id id)
(org-babel-ref-headline-body))
@@ -2842,6 +2840,8 @@ block but are passed literally to the \"example-block\"."
(not (org-in-commented-heading-p))
(funcall expand-body
(org-babel-get-src-block-info t))))))
+ ;; Retrieve from the Library of Babel.
+ ((nth 2 (assoc-string id org-babel-library-of-babel)))
;; All Noweb references were cached in a previous
;; run. Extract the information from the cache.
((hash-table-p cache)