This works:
(make-process :name "test"
:command (list "bash" "-c"
(concat "echo hello stdout!; "
"echo hello stderr! >&2; "
"exit 20"))
:buffer (generate-new-buffer "*stdout*")
;;:stderr (generate-new-buffer "*stderr*")
;;:noquery nil
)
but, I want this code to work:
(make-process :name "test"
:command (list "bash" "-c"
(concat "echo hello stdout!; "
"echo hello stderr! >&2; "
"echo enter your name; "
"read name; "
"echo enterted name was $name; "
"exit 0"))
:buffer (generate-new-buffer "*stdout*")
;;:stderr (generate-new-buffer "*stderr*")
;;:noquery nil
)
In other words, when the process sits and waits for user input, the end user should be prompted in the emacs echo area. (I think tramp does something like this when it encounters a password prompt)
not part of this SO question, but eventually I would like to integrated the solution in to
(defun org-babel-sh-evaluate (session body &optional params stdin cmdline)
of https://code.orgmode.org/bzg/org-mode/src/master/lisp/ob-shell.el