mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
babel: small fix.
* lisp/ob-core.el (org-babel-execute-src-block): Simplify code slightly. The old code would error on evaluating the call line in: ,---- | #+name: foo | #+begin_src emacs-lisp :var bar="baz" | bar | #+end_src | | #+call: foo[:cache yes]("qux") | | #+RESULTS: | : qux `----
This commit is contained in:
parent
e47c7c3ed6
commit
4750e4427d
@ -639,15 +639,13 @@ block."
|
||||
(match-beginning 0))))
|
||||
(info (if info
|
||||
(copy-tree info)
|
||||
(org-babel-get-src-block-info)))
|
||||
(merged-params (org-babel-merge-params (nth 2 info) params)))
|
||||
(when (org-babel-check-evaluate
|
||||
(let ((i info)) (setf (nth 2 i) merged-params) i))
|
||||
(let* ((params (if params
|
||||
(org-babel-process-params merged-params)
|
||||
(nth 2 info)))
|
||||
(org-babel-get-src-block-info))))
|
||||
(cl-callf org-babel-merge-params (nth 2 info) params)
|
||||
(when (org-babel-check-evaluate info)
|
||||
(cl-callf org-babel-process-params (nth 2 info))
|
||||
(let* ((params (nth 2 info))
|
||||
(cachep (and (not arg) (cdr (assoc :cache params))
|
||||
(string= "yes" (cdr (assoc :cache params)))))
|
||||
(string= "yes" (cdr (assoc :cache params)))))
|
||||
(new-hash (when cachep (org-babel-sha1-hash info)))
|
||||
(old-hash (when cachep (org-babel-current-result-hash)))
|
||||
(cache-current-p (and (not arg) new-hash
|
||||
@ -661,8 +659,7 @@ block."
|
||||
(let ((result (org-babel-read-result)))
|
||||
(message (replace-regexp-in-string
|
||||
"%" "%%" (format "%S" result))) result)))
|
||||
((org-babel-confirm-evaluate
|
||||
(let ((i info)) (setf (nth 2 i) merged-params) i))
|
||||
((org-babel-confirm-evaluate info)
|
||||
(let* ((lang (nth 0 info))
|
||||
(result-params (cdr (assoc :result-params params)))
|
||||
(body (setf (nth 1 info)
|
||||
|
Loading…
Reference in New Issue
Block a user