Function: org-babel-find-named-result

org-babel-find-named-result is a byte-compiled function defined in ob-core.el.gz.

Signature

(org-babel-find-named-result NAME)

Documentation

Find a named result.

Return the location of the result named NAME in the current buffer or nil if no such result exists.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-core.el.gz
(defun org-babel-find-named-result (name)
  "Find a named result.
Return the location of the result named NAME in the current
buffer or nil if no such result exists."
  (save-excursion
    (goto-char (point-min))
    (let ((case-fold-search t)
	  (re (format "^[ \t]*#\\+%s.*?:[ \t]*%s[ \t]*$"
		      org-babel-results-keyword
		      (regexp-quote name))))
      (catch :found
	(while (re-search-forward re nil t)
	  (let ((element (org-element-at-point)))
	    (when (or (org-element-type-p element 'keyword)
		      (< (point)
			 (org-element-post-affiliated element)))
	      (throw :found (line-beginning-position)))))))))