help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to run shell command with stream input, to get string output


From: Jean Louis
Subject: Re: How to run shell command with stream input, to get string output
Date: Mon, 1 Jul 2019 11:43:00 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

* Robert Pluim <rpluim@gmail.com> [2019-07-01 11:39]:
>     Jean> Thank you, I found this one, now just to figure
>     Jean> out how to find process name.
> 
> Another option would be using start-process, process-send-region,
> and process-send-eof (all described in the
> manual).

(with-temp-buffer
  (let* ((process (start-process "NEW" (current-buffer) "cat")))
    (process-send-string process "Hello")
    (process-send-eof process)
    (kill-process process)
    (buffer-string)))

Something like that, but it does not work as
output of process is not written in the buffer.

If you know how, let me know.

Jean



reply via email to

[Prev in Thread] Current Thread [Next in Thread]