From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add file-dwim. Date: Mon, 19 Oct 2015 09:08:04 +0300 Message-ID: <834mhnie63.fsf@gnu.org> References: <87d1wcrzuu.fsf@T420.taylan> <87lhb0ot7m.fsf@T420.taylan> <87h9lnyf5y.fsf@fastmail.com> <83bnbvii1f.fsf@gnu.org> <87k2qj9z3f.fsf@fastmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445235183 25678 80.91.229.3 (19 Oct 2015 06:13:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Oct 2015 06:13:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Random832 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 19 08:12:54 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 1Zo3gh-0002Uk-N2 for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 08:12:51 +0200 Original-Received: from localhost ([::1]:36659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo3cL-0004cr-Le for ged-emacs-devel@m.gmane.org; Mon, 19 Oct 2015 02:08:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo3c9-0004ck-1g for emacs-devel@gnu.org; Mon, 19 Oct 2015 02:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo3c5-0008CI-Lu for emacs-devel@gnu.org; Mon, 19 Oct 2015 02:08:08 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:33199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo3c5-0008Bu-DW for emacs-devel@gnu.org; Mon, 19 Oct 2015 02:08:05 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NWG00800DPUF400@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 19 Oct 2015 09:08:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWG008LQEDD7L60@a-mtaout22.012.net.il>; Mon, 19 Oct 2015 09:08:02 +0300 (IDT) In-reply-to: <87k2qj9z3f.fsf@fastmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 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:192034 Archived-At: > From: Random832 > Date: Mon, 19 Oct 2015 02:00:52 -0400 > > 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. You are right, sorry. However, buffer-string from that temporary buffer will do the job.