mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-03 06:52:54 +00:00
org-babel-shell-initialize: Define session API backend for all the shells
* lisp/ob-shell.el (org-babel-shell-initialize): Define org-babel-prep-session:<shell-name> and org-babel-<shell-name>-initiate-session functions. Without this, `org-babel-switch-to-session' does not work for ob-shell blocks.
This commit is contained in:
parent
7393803716
commit
5b366a731b
|
@ -85,6 +85,24 @@ is modified outside the Customize interface."
|
||||||
(shell-file-name name))
|
(shell-file-name name))
|
||||||
(org-babel-execute:shell body params))))
|
(org-babel-execute:shell body params))))
|
||||||
(put fname 'definition-name 'org-babel-shell-initialize))
|
(put fname 'definition-name 'org-babel-shell-initialize))
|
||||||
|
(let ((fname (intern (concat "org-babel-prep-session:" name))))
|
||||||
|
(defalias fname
|
||||||
|
(lambda (session params)
|
||||||
|
(:documentation
|
||||||
|
(format "Prepare %s SESSION according to the header arguments specified in PARAMS." name))
|
||||||
|
(let ((explicit-shell-file-name name)
|
||||||
|
(shell-file-name name))
|
||||||
|
(org-babel-prep-session:shell session params))))
|
||||||
|
(put fname 'definition-name 'org-babel-shell-initialize))
|
||||||
|
(let ((fname (intern (format "org-babel-%s-initiate-session" name))))
|
||||||
|
(defalias fname
|
||||||
|
(lambda (session _params)
|
||||||
|
(:documentation
|
||||||
|
(format "Initiate %s session named SESSION." name))
|
||||||
|
(let ((explicit-shell-file-name name)
|
||||||
|
(shell-file-name name))
|
||||||
|
(org-babel-sh-initiate-session session))))
|
||||||
|
(put fname 'definition-name 'org-babel-shell-initialize))
|
||||||
(defalias (intern (concat "org-babel-variable-assignments:" name))
|
(defalias (intern (concat "org-babel-variable-assignments:" name))
|
||||||
#'org-babel-variable-assignments:shell
|
#'org-babel-variable-assignments:shell
|
||||||
(format "Return list of %s statements assigning to the block's \
|
(format "Return list of %s statements assigning to the block's \
|
||||||
|
|
Loading…
Reference in a new issue