From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add file-dwim. Date: Mon, 19 Oct 2015 02:00:52 -0400 Message-ID: <87k2qj9z3f.fsf@fastmail.com> References: <87d1wcrzuu.fsf@T420.taylan> <87lhb0ot7m.fsf@T420.taylan> <87h9lnyf5y.fsf@fastmail.com> <83bnbvii1f.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445235196 25933 80.91.229.3 (19 Oct 2015 06:13:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 06:13:16 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 08:12:56 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zo3gj-0002Uk-OZ for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 08:12:53 +0200 Original-Received: from localhost ([::1]:36636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo3Vk-0003Q5-Du for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 02:01:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo3Vg-0003Pz-Sm for emacs-devel@gnu.org; Mon, 19 Oct 2015 02:01:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo3Vd-0006tr-L0 for emacs-devel@gnu.org; Mon, 19 Oct 2015 02:01:28 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo3Vd-0006te-Eh for emacs-devel@gnu.org; Mon, 19 Oct 2015 02:01:25 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zo3Vb-0002Ox-Gd for emacs-devel@gnu.org; Mon, 19 Oct 2015 08:01:23 +0200 Original-Received: from c-68-39-146-59.hsd1.in.comcast.net ([68.39.146.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Oct 2015 08:01:23 +0200 Original-Received: from random832 by c-68-39-146-59.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Oct 2015 08:01:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:bOX6Y8lDRIyboUMCg09MTytFwGA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192036 Archived-At: Eli Zaretskii writes: >> Can call-process return the stdout of the process in a string, as >> shell-command-to-string does? > > Yes, of course. See its documentation: the output could go into a > buffer, a string, a file, or the null device. I looked at the documentation. As far as I can tell, you can specify where the output goes with the following types of argument: - A buffer - A string *which names a buffer* - t, which selects the current buffer. - A list which names a file - nil, which discards the output - 0, which discards the output and backgrounds the process - A list that does any of the above with stdout and something else with stderr Nowhere is a way to get the output *as a string* mentioned. There may or may not be a perfectly safe and efficient way to use a temporary buffer or file to get a string, but those aren't being accomplished by the call-process function itself.