summaryrefslogtreecommitdiff
path: root/lisp/ob-ref.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ob-ref.el')
-rw-r--r--lisp/ob-ref.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el
index a2814ea..5a3c8ba 100644
--- a/lisp/ob-ref.el
+++ b/lisp/ob-ref.el
@@ -83,7 +83,10 @@ the variable."
(let ((var (match-string 1 assignment))
(ref (match-string 2 assignment)))
(cons (intern var)
- (let ((out (org-babel-read ref)))
+ (let ((out (save-excursion
+ (when org-babel-current-src-block-location
+ (goto-char org-babel-current-src-block-location))
+ (org-babel-read ref))))
(if (equal out ref)
(if (string-match "^\".*\"$" ref)
(read ref)