[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sh.exe needed to bootstrap on Windows?

From: Eli Zaretskii
Subject: Re: sh.exe needed to bootstrap on Windows?
Date: Mon, 16 Jul 2007 23:46:10 +0300

> Date: Mon, 16 Jul 2007 22:28:22 +0200
> From: "Juanma Barranquero" <address@hidden>
> Cc: "Dan Nicolaescu" <address@hidden>, address@hidden
> On 7/16/07, Eli Zaretskii <address@hidden> 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]+\\)$" 
                    (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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]