org-babel-current-exec-src-block-head -> org-babel-current-src-block-location

* lisp/ob-core.el (org-babel-current-src-block-location): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
(org-babel-execute-src-block): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
* lisp/ob-exp.el (org-babel-exp-results): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
* lisp/ob-lob.el (org-babel-lob-execute): Rename
  org-babel-current-exec-src-block-head to
  org-babel-current-src-block-location.
This commit is contained in:
Eric Schulte 2013-06-08 13:19:38 -06:00
parent bbc435595e
commit c3711b14d6
3 changed files with 10 additions and 6 deletions

View file

@ -536,8 +536,12 @@ can not be resolved.")
;;; functions
(defvar call-process-region)
(defvar org-babel-current-exec-src-block-head nil
"Marker to the currently processed src block.")
(defvar org-babel-current-src-block-location nil
"Marker pointing to the src block currently being executed.
This may also point to a call line or an inline code block. If
multiple blocks are being executed (e.g., in chained execution
through use of the :var header argument) this marker points to
the outer-most code block.")
;;;###autoload
(defun org-babel-execute-src-block (&optional arg info params)
@ -565,8 +569,8 @@ block."
(let* ((params (if params
(org-babel-process-params merged-params)
(nth 2 info)))
(org-babel-current-exec-src-block-head
(or org-babel-current-exec-src-block-head (nth 6 info)))
(org-babel-current-src-block-location
(or org-babel-current-src-block-location (nth 6 info)))
(cachep (and (not arg) (cdr (assoc :cache params))
(string= "yes" (cdr (assoc :cache params)))))
(new-hash (when cachep (org-babel-sha1-hash info)))

View file

@ -388,7 +388,7 @@ inhibit insertion of results into the buffer."
info (org-babel-exp-get-export-buffer))
(nth 1 info)))
(info (copy-sequence info))
(org-babel-current-exec-src-block-head (point-marker)))
(org-babel-current-src-block-location (point-marker)))
;; skip code blocks which we can't evaluate
(when (fboundp (intern (concat "org-babel-execute:" lang)))
(org-babel-eval-wipe-error-buffer)

View file

@ -133,7 +133,7 @@ if so then run the appropriate source block from the Library."
(string= "yes" (cdr (assoc :cache pre-params)))))
(new-hash (when cache-p (org-babel-sha1-hash pre-info)))
(old-hash (when cache-p (org-babel-current-result-hash)))
(org-babel-current-exec-src-block-head (point-marker)))
(org-babel-current-src-block-location (point-marker)))
(if (and cache-p (equal new-hash old-hash))
(save-excursion (goto-char (org-babel-where-is-src-block-result))
(forward-line 1)