Subject: Re: bug#13787: 24.2; Call to package-install during byte compilation returns non-zero exit status

From: Glenn Morris <[email-masked]>
Date: Fri, 22 Feb 2013 13:58:54 -0500

Jon Dufresne wrote:

> (eval-and-compile
>   (require 'package)
>   (package-initialize)
>   (package-refresh-contents)
>   (package-install 'org))

Why eval-and-compile?

Anyway, I think the issue can be summarized as:

cat /tmp/foo.el:

(eval-and-compile
  (byte-compile-file "/tmp/bar.el"))

cat /tmp/bar.el:

(message "hi")

emacs -Q -batch -f batch-byte-compile foo.el

  Wrote /tmp/bar.elc
  >>Error occurred processing foo.el: error (("Selecting deleted buffer"))

Recursive byte-compilation trips over itself trying to use
a single " *Compiler Input*" buffer.

(package-install byte-compiles what it installs.)