Subject: bug#35187: 26.1; call-process should accept a buffer as stdin. or its doc should reference call-process-region

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 09 Jul 2019 18:00:37 +0200

Ernesto Alfonso <[email-masked]> writes:

> When looking at the call-process doc, I didn't see a way to pass a
> buffer to stdin without creating a temporary file. It looks like
> the DESTINATION argument already supports either a file-name or a
> buffer, but passing a buffer to INFILE does not seem supported:
>
>     (call-process "cat" (get-buffer "*Messages*") nil)
>     *** Eval error ***  Wrong type argument: stringp, #<buffer *Messages*>
>
> Can this be supported? Could call-process-region be merged into
> the INFILE argument to call-process?

I think it's probably too late to merge these two functions...

> As a short-term fix, it would be useful if the call-process referred to
> call-process-region.

... but I've now mentioned the latter in the former's doc string on the
Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no