shell-command-to-string -> doom-call-process #1887
Minor optimization to remove a layer of indirection when starting processes.
This commit is contained in:
parent
873fc5c0db
commit
44d5e097c9
5 changed files with 46 additions and 45 deletions
|
@ -21,12 +21,12 @@ Make sure your src block has a :session param.")
|
|||
(defun +org--ob-ipython-generate-local-path-from-remote (session host params)
|
||||
"Given a remote SESSION with PARAMS and corresponding HOST, copy remote config to local, start a jupyter console to generate a new one."
|
||||
(let* ((runtime-dir
|
||||
(substring (shell-command-to-string (concat "ssh " host " jupyter --runtime-dir")) 0 -1))
|
||||
(cdr
|
||||
(doom-call-process "ssh " host "jupyter" "--runtime-dir")))
|
||||
(runtime-file (concat runtime-dir "/" "kernel-" session ".json"))
|
||||
(tramp-path (concat "/ssh:" host ":" runtime-file))
|
||||
(tramp-copy (concat (or +ob-ipython-local-runtime-dir
|
||||
(substring (shell-command-to-string "jupyter --runtime-dir")
|
||||
0 -1))
|
||||
(cdr (doom-call-process "jupyter" "--runtime-dir")))
|
||||
"/remote-" host "-kernel-" session ".json"))
|
||||
(local-path
|
||||
(concat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue