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: sh.exe needed to bootstrap on Windows? Date: Mon, 16 Jul 2007 23:46:10 +0300 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1184618781 31449 80.91.229.12 (16 Jul 2007 20:46:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2007 20:46:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 22:46:20 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAXSU-0007ba-BE for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2007 22:46:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAXST-0005pa-Tl for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2007 16:46:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IAXSQ-0005pE-Mp for emacs-devel@gnu.org; Mon, 16 Jul 2007 16:46:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IAXSN-0005nY-Tv for emacs-devel@gnu.org; Mon, 16 Jul 2007 16:46:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAXSN-0005nB-N2 for emacs-devel@gnu.org; Mon, 16 Jul 2007 16:46:11 -0400 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IAXSM-0003GV-8K for emacs-devel@gnu.org; Mon, 16 Jul 2007 16:46:10 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-229-116-169.inter.net.il [84.229.116.169]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DCQ18308 (AUTH halo1); Mon, 16 Jul 2007 23:46:07 +0300 (IDT) In-reply-to: (lekktu@gmail.com) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74920 Archived-At: > Date: Mon, 16 Jul 2007 22:28:22 +0200 > From: "Juanma Barranquero" > Cc: "Dan Nicolaescu" , emacs-devel@gnu.org > > On 7/16/07, Eli Zaretskii wrote: > > But why > > does it fail to find sh.exe in your case? Do you even have sh.exe? > > Not in the path, no. > > Perhaps some tool tries to run sh? What I see is that Emacs runs shell-command-to-string from vc-bzr.el: (defun vc-bzr-version () "Return a three-numeric element list with components of the bzr version. This is of the form (X Y Z) for revision X.Y.Z. The elements are zero if running `vc-bzr-program' doesn't produce the expected output." (or vc-bzr-version (setq vc-bzr-version (let ((s (shell-command-to-string (concat (shell-quote-argument vc-bzr-program) " --version")))) (if (string-match "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$" s) (list (string-to-number (match-string 1 s)) (string-to-number (match-string 2 s)) (string-to-number (match-string 3 s))) '(0 0 0)))))) And, since in the absence of sh.exe Emacs sets SHELL to cmdproxy, this is what Emacs looks for. The problem is, bootstrap did not yet create cmdproxy at this point. The call to vc-bzr-version comes from vc-before-save which is called when Emacs is about to save loaddefs.el that it generated. vc-before-save calls vc-backend, which calls vc-call-backend, which calls vc-find-backend-function, and that winds up in vc-bzr, presumably because it tries every possible backend in sequence. Can you see whether in your case the backtrace points to the same problem (i.e. shell-command-to-string called by vc-bzr)? If so, could you please try to find out why on your machine Emacs is looking for sh.exe?