Function: org-babel--insert-results-keyword
org-babel--insert-results-keyword is a byte-compiled function defined
in ob-core.el.gz.
Signature
(org-babel--insert-results-keyword NAME HASH)
Documentation
Insert RESULTS keyword with NAME value at point.
If NAME is nil, results are anonymous. HASH is a string used as the results hash, or nil. Leave point before the keyword.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ob-core.el.gz
(defun org-babel--insert-results-keyword (name hash)
"Insert RESULTS keyword with NAME value at point.
If NAME is nil, results are anonymous. HASH is a string used as
the results hash, or nil. Leave point before the keyword."
(save-excursion (insert "\n")) ;open line to indent.
(org-indent-line)
(delete-char 1)
(insert (concat "#+" org-babel-results-keyword
(cond ((not hash) nil)
(org-babel-hash-show-time
(format "[%s %s]"
(format-time-string "(%F %T)")
hash))
(t (format "[%s]" hash)))
":"
(when name (concat " " name))
"\n"))
;; Make sure results are going to be followed by at least one blank
;; line so they do not get merged with the next element, e.g.,
;;
;; #+results:
;; : 1
;;
;; : fixed-width area, unrelated to the above.
(unless (looking-at "^[ \t]*$") (save-excursion (insert "\n")))
(forward-line -1)
(when hash (org-babel-hide-hash)))