diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-06-06 12:26:44 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-06-06 15:14:22 -0400 |
commit | b410f5acc57d42a323e9f828790c774b9d2138ce (patch) | |
tree | 6c8079a061628ff9c9df53911acf9b1a317dc26f | |
parent | cdb845f4f8210a5535bb7459dcdd761d2c08a0ac (diff) | |
download | piem-b410f5acc57d42a323e9f828790c774b9d2138ce.tar.gz |
Add piem-process- variant that accepts a buffer for stdin
This will be used to feed git-am the buffer returned by
piem-am-ready-mbox.
-rw-r--r-- | piem.el | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -230,6 +230,22 @@ the following information about the patch series: (list (format "%s call in %s failed" program default-directory))))))) +(defun piem-process-call-with-buffer-input + (dir buffer program &rest program-args) + (setq program-args (remq nil program-args)) + (piem--process-go + dir program program-args + (lambda () + (let ((outdir default-directory) + (outbuf (current-buffer))) + (with-current-buffer buffer + (let ((default-directory outdir)) + (unless (= 0 (apply #'call-process-region nil nil + program nil outbuf nil program-args)) + (signal 'piem-process-error + (list (format "%s call in %s failed" + program default-directory)))))))))) + ;;;; Extractors |