From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Program working with shell-command but not call-process Date: 4 Jul 2014 10:16:42 GMT Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1404469229 11847 80.91.229.3 (4 Jul 2014 10:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jul 2014 10:20:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 04 12:20:22 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1X30bM-0008Kl-7o for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jul 2014 12:20:20 +0200 Original-Received: from localhost ([::1]:35512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X30bL-0000Tu-Mn for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jul 2014 06:20:19 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-X-Trace: individual.net ctcW4PZYK+fFGmD+Cw7b5gMTlxjwx9fZnPNn/rT0CGOTFKM0eO Cancel-Lock: sha1:zRNiN37tTTQh9IFhHmnfwlKsbBE= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:206264 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98535 Archived-At: John Mastro wrote: > Does anyone know what situation would result in this working: > > (shell-command-to-string "git --version") > ;=> it returns "git version 2.0.1" > > But not this: > > (with-output-to-string > (call-process "git" nil standard-output nil "--version")) > ;=> it returns "" > ;=> `call-process' alone returns 53 `with-output-to-string' takes whatever is sent to `standard-output', converts it to a string and returns it. `call-process' sends its output to a buffer, or optionally to a file, but not to stdout. So you won't get any output from this construct unless `standard-output' is set to a buffer. However, that is probably not the source of the problem you hint at (the fact that magit doesn't work). That is most likely due to the fact that `call-process' alone returns 53. If git were successful, it should return 0. -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)