forked from mirrors/org-mode
ob-shell.el: Rename `ob-shell-return-value-is-exit-status'
* lisp/ob-shell.el (org-babel-shell-return-value-is-exit-status): Rename from `ob-shell-return-value-is-exit-status'. (org-babel-execute:shell, org-babel-sh-evaluate): Use new name. (org-babel--variable-assignments:bash_assoc): Fix indentation.
This commit is contained in:
parent
97d0514b0b
commit
0c02928eb2
|
@ -238,7 +238,7 @@ and headings will be visually numeroted.
|
||||||
You can turn this on/off on a per-file basis with =#+startup: num= or
|
You can turn this on/off on a per-file basis with =#+startup: num= or
|
||||||
=#+startup: nonum=.
|
=#+startup: nonum=.
|
||||||
|
|
||||||
*** New option ~ob-shell-return-value-is-exit-status~
|
*** New option ~org-babel-shell-return-value-is-exit-status~
|
||||||
|
|
||||||
When set to =t=, consider the return value of a shell source code
|
When set to =t=, consider the return value of a shell source code
|
||||||
block is the exit status of its last command.
|
block is the exit status of its last command.
|
||||||
|
|
|
@ -71,7 +71,7 @@ outside the Customize interface."
|
||||||
(set-default symbol value)
|
(set-default symbol value)
|
||||||
(org-babel-shell-initialize)))
|
(org-babel-shell-initialize)))
|
||||||
|
|
||||||
(defcustom ob-shell-return-value-is-exit-status nil
|
(defcustom org-babel-shell-return-value-is-exit-status nil
|
||||||
"Should we consider the shell exit status as the return value?
|
"Should we consider the shell exit status as the return value?
|
||||||
When this is set to nil (the default), consider that the return
|
When this is set to nil (the default), consider that the return
|
||||||
value of a shell source block is the output of the commands.
|
value of a shell source block is the output of the commands.
|
||||||
|
@ -90,7 +90,7 @@ This function is called by `org-babel-execute-src-block'."
|
||||||
(when stdin (org-babel-sh-var-to-string
|
(when stdin (org-babel-sh-var-to-string
|
||||||
(org-babel-ref-resolve stdin)))))
|
(org-babel-ref-resolve stdin)))))
|
||||||
(value-is-exit-status (or (cdr (assq :value-is-exit-status params))
|
(value-is-exit-status (or (cdr (assq :value-is-exit-status params))
|
||||||
ob-shell-return-value-is-exit-status))
|
org-babel-shell-return-value-is-exit-status))
|
||||||
(cmdline (cdr (assq :cmdline params)))
|
(cmdline (cdr (assq :cmdline params)))
|
||||||
(full-body (concat
|
(full-body (concat
|
||||||
(org-babel-expand-body:generic
|
(org-babel-expand-body:generic
|
||||||
|
@ -224,7 +224,7 @@ of the statements in BODY, if RESULT-TYPE equals `value' then
|
||||||
return the value of the last statement in BODY."
|
return the value of the last statement in BODY."
|
||||||
(let* ((shebang (cdr (assq :shebang params)))
|
(let* ((shebang (cdr (assq :shebang params)))
|
||||||
(value-is-exit-status (or (cdr (assq :value-is-exit-status params))
|
(value-is-exit-status (or (cdr (assq :value-is-exit-status params))
|
||||||
ob-shell-return-value-is-exit-status))
|
org-babel-shell-return-value-is-exit-status))
|
||||||
(results
|
(results
|
||||||
(cond
|
(cond
|
||||||
((or stdin cmdline) ; external shell script w/STDIN
|
((or stdin cmdline) ; external shell script w/STDIN
|
||||||
|
|
Loading…
Reference in New Issue