ob-ref: don't forget arguments to referenced code blocks

* lisp/ob-ref.el (org-babel-ref-resolve): bringing the referent
  arguments back to their params before evaluation
This commit is contained in:
Eric Schulte 2010-10-16 13:21:47 -06:00 committed by Dan Davison
parent dc9401f95b
commit 8562273b27
1 changed files with 8 additions and 9 deletions

View File

@ -149,15 +149,14 @@ return nil."
(beginning-of-line)
(if (or (= (point) (point-min)) (= (point) (point-max)))
(error "reference not found"))))
(setq result
(case type
('results-line (org-babel-read-result))
('table (org-babel-read-table))
('file (org-babel-read-link))
('source-block (org-babel-execute-src-block
nil nil '((:results . "silent"))))
('lob (org-babel-execute-src-block
nil lob-info '((:results . "silent"))))))
(let ((params (append args '((:results . "silent")))))
(setq result
(case type
('results-line (org-babel-read-result))
('table (org-babel-read-table))
('file (org-babel-read-link))
('source-block (org-babel-execute-src-block nil nil params))
('lob (org-babel-execute-src-block nil lob-info params)))))
(if (symbolp result)
(format "%S" result)
(if (and index (listp result))