[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sending data to an asynchronous process
From: |
Jean Louis |
Subject: |
Re: sending data to an asynchronous process |
Date: |
Fri, 2 Apr 2021 22:10:46 +0300 |
User-agent: |
Mutt/2.0.6 (2021-03-06) |
* Jean Louis <bugs@gnu.support> [2021-04-02 21:58]:
> (defun rcd-command-output-from-input (program input &rest args)
> "Returns output from PROGRAM INPUT with optional ARGS"
> (let* ((output (with-temp-buffer
> (insert input)
> (apply #'call-process-region nil nil program t t nil args)
> (buffer-string))))
> output))
>
> (rcd-command-output-from-input "sox" (buffer-string)
> "-r" "44100"
> "-c" "2"
> "-b" "32"
> "-e" "signed-integer"
> "-t" "raw"
> "-"
> "-q"
> "-d") → ""
I can imagine that if the above command is added as some hook on
load-file or require, then we could sound-alize loading of Emacs
libraries.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
Sign an open letter in support of Richard M. Stallman
https://rms-support-letter.github.io/