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:06:23 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

* tomas@tuxteam.de <tomas@tuxteam.de> [2019-07-01 10:39]:
> Perhaps call-process-region is for you: it passes the current
> region as stdin to the invoked process. Cf [1]. If you need
> more control (or perhaps an asynchronous process which you can
> feed input spoonwise), perhaps [2] is it. But that takes some
> "bricolage" :-)
> 
> Cheers
> 
> [1] Elisp manual 38.3 Creating a Synchronous Process
> [2] Elisp manual 38.7 Sending Input to Processes
> -- tomás

Thank you, I found this one, now just to figure
out how to find process name.

 -- Function: process-send-string process string
     This function sends PROCESS the contents of STRING as standard
     input.  It returns ‘nil’.  For example, to make a Shell buffer list
     files:

          (process-send-string "shell<1>" "ls\n")
               ⇒ nil





reply via email to

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