From xemacs-m  Fri Apr 11 19:08:49 1997
Received: from alphatech.com (erebus.alphatech.com [198.112.236.2])
	by xemacs.org (8.8.5/8.8.5) with SMTP id TAA13205
	for <xemacs-beta@xemacs.org>; Fri, 11 Apr 1997 19:08:46 -0500 (CDT)
Received: from venus.alphatech.com by alphatech.com (4.1/SMI-4.1)
	id AA17770; Fri, 11 Apr 97 20:03:54 EDT
Received: from pochacco.alphatech.com by venus.alphatech.com (4.1/SMI-4.1)
	id AA14315; Fri, 11 Apr 97 20:12:31 EDT
Received: by pochacco.alphatech.com (SMI-8.6/SMI-SVR4)
	id UAA16505; Fri, 11 Apr 1997 20:01:11 -0400
Date: Fri, 11 Apr 1997 20:01:11 -0400
Message-Id: <199704120001.UAA16505@pochacco.alphatech.com>
Mime-Version: 1.0
From: greg@alphatech.com (Greg Klanderman)
To: xemacs-beta@xemacs.org (XEmacs beta list)
Subject: temp-buffer-shrink-to-fit -- "won't change only window" bug
X-Mailer: VM 6.21 under 19.15 XEmacs Lucid (beta103)
Reply-To: greg@alphatech.com
Content-Type: text/plain; charset=US-ASCII



>> xemacs -q : C-x 2 C-x C-f TAB TAB

I've been looking into this a bit and have become rather frustrated,
so I figured I'd at least dump an email to this list before I leave
for the night.  I'm looking into this bug since I thought it was
similar to a bug in popper.el I recently fixed and so assumed (yeah
right) it would be easy.

First, can some people that are experiencing this try placing a
"(sit-for 0)" as the first expression inside the second "let" of the
function show-temp-buffer-in-current-frame of prim/frame.el and let me
know if it goes away?  Thanks (I don't use this functionality, as
popper.el is worlds better).

It seems that show-temp-buffer-in-current-frame is calling
display-buffer to show the buffer in a window and under certain
circumstances I can't reliably reproduce (xemacs -q (b103)) this
results in only a single window with the buffer being displayed, when
there were initially two windows.  When I put sit-for's in this
function so I can see my messages, it goes away (eg the buffer is
popped up correctly).

Further lossage exists in shrink-window-if-larger-than-buffer, which
attempts to do nothing if there is only one window.  First, the docs
for the optional arg to count-windows are wrong (look at
walk-windows), and its not the right function to call anyway.  You
don't want to ever count the minibuffer, and you want windows on the
current frame only.  Trying (length (window-list nil 'never)) doesn't
work either - window-list is actually including the minibuffer, despite
explicitly asking not to.  Something is broken here (walk-windows?)
but I don't have time to figure it out now.

If anyone has ideas, let me know.  I don't intend to probe into this
much further unless I get some new ideas on this.

Greg

