mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-22 07:09:47 +00:00
babel: screen: New variable assignment and expansion scheme
* ob-screen.el (org-babel-execute:screen): Use generic expansion function (org-babel-expand-body:screen): Delete function (org-babel-prep-session:screen): Remove references to processed params
This commit is contained in:
parent
c1ad98ae0e
commit
19081f12f7
@ -45,9 +45,6 @@ In case you want to use a different screen than one selected by your $PATH")
|
||||
'((:results . "silent") (:session . "default") (:cmd . "sh") (:terminal . "xterm"))
|
||||
"Default arguments to use when running screen source blocks.")
|
||||
|
||||
(defun org-babel-expand-body:screen (body params)
|
||||
"Expand BODY according to PARAMS, return the expanded body." body)
|
||||
|
||||
(defun org-babel-execute:screen (body params)
|
||||
"Send a block of code via screen to a terminal using Babel.
|
||||
\"default\" session is used when none is specified."
|
||||
@ -58,15 +55,13 @@ In case you want to use a different screen than one selected by your $PATH")
|
||||
(socket (org-babel-screen-session-socketname session)))
|
||||
(unless socket (org-babel-prep-session:screen session params))
|
||||
(org-babel-screen-session-execute-string
|
||||
session (org-babel-expand-body:screen body params)))))
|
||||
session (org-babel-expand-body:generic body params)))))
|
||||
|
||||
(defun org-babel-prep-session:screen (session params)
|
||||
"Prepare SESSION according to the header arguments specified in PARAMS."
|
||||
(let* ((processed-params (org-babel-process-params params))
|
||||
(session (nth 0 processed-params))
|
||||
(vars (nth 1 processed-params))
|
||||
(socket (org-babel-screen-session-socketname session))
|
||||
(vars (org-babel-ref-variables params))
|
||||
(cmd (cdr (assoc :cmd params)))
|
||||
(terminal (cdr (assoc :terminal params)))
|
||||
(process-name (concat "org-babel: terminal (" session ")")))
|
||||
|
Loading…
Reference in New Issue
Block a user