diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-11-13 11:42:40 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-11-13 11:43:27 -0700 |
commit | 1877652ce0234cf333fa103b5ada08fbf5946ab1 (patch) | |
tree | 664f191b580a918fe5f33116ba150b636e863f4a | |
parent | b6448c4225bc83299da1bd08c2d2e8b77e0bcd13 (diff) | |
download | org-mode-1877652ce0234cf333fa103b5ada08fbf5946ab1.tar.gz |
allow reference to named call lines
* lisp/ob-ref.el (org-babel-ref-resolve): Look for call lines when
resolving references.
-rw-r--r-- | lisp/ob-ref.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index 251fa55..b8ee9f8 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -186,6 +186,11 @@ the variable." (or (looking-at org-babel-src-block-regexp) (looking-at org-babel-multi-line-header-regexp)))) (setq type 'source-block)) + ((and (looking-at org-babel-src-name-regexp) + (save-excursion + (forward-line 1) + (looking-at org-babel-lob-one-liner-regexp))) + (setq type 'call-line)) (t (while (not (setq type (org-babel-ref-at-ref-p))) (forward-line 1) (beginning-of-line) @@ -201,6 +206,10 @@ the variable." (source-block (org-babel-execute-src-block nil nil (if org-babel-update-intermediate nil params))) + (call-line (save-excursion + (forward-line 1) + (org-babel-lob-execute + (org-babel-lob-get-info)))) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) |