Subject: bug#8857: display-buffer attempt to pop-up frame in batch mode causes "Unknown terminal type" error

From: martin rudalics <[email-masked]>
Date: Wed, 15 Jun 2011 10:01:59 +0200

> In addition I still think it might be worth explicitly making
 > display-buffer a no-op in batch mode, unless someone can think of
 > something it can actually do in such cases. I think this could only be
 > by side effect. Eg, can it run hooks, and can those hooks be expected to
 > do anything when there isn't actually a display?
 >
 > If not then it seems simpler and more efficient to not even try
 > displaying buffers in batch mode (and less confusing, since it can give
 > unclear errors trying to do something that cannot work).

There's a silent convention that `display-buffer' _always_ returns a
window.  If it doesn't in batch mode, code relying on that convention
might break.  I don't know how realistic such a scenario is, though.

Meanwhile I checked in two fixes that should assure that
`display-buffer' doesn't try to pop up a frame with emacs -Q.  If they
work, you should be able to remove your earlier hack.

martin