From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: display-buffer-change (was Re: bug of display-table & make-glyph-code) Date: Sat, 08 Sep 2007 11:22:46 +0200 Message-ID: <46E269E6.6090305@gmx.at> References: <200708271732.22306.zslevin@gmail.com> <46DD9F41.8090700@gmx.at> <46DE63EE.3070509@gmx.at> <87wsv4fvav.fsf@stupidchicken.com> <46DFC3AE.3020009@gmx.at> <46E0136F.6080602@gmx.at> <46E06C5B.80408@gmx.at> <46E198D8.8080507@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1189243982 19823 80.91.229.12 (8 Sep 2007 09:33:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2007 09:33:02 +0000 (UTC) Cc: =?ISO-8859-15?Q?David_K=E5gedal?= , rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 08 11:33:01 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 1ITwgW-0003Sd-HF for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 11:33:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITwgU-0001qr-0W for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 05:32:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITwe6-0008K5-Hc for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:30:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITwe5-0008Ic-Cl for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:30:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITwe4-0008IB-T7 for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:30:28 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1ITwe4-0002gu-D4 for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:30:28 -0400 Original-Received: (qmail invoked by alias); 08 Sep 2007 09:30:27 -0000 Original-Received: from N842P001.adsl.highway.telekom.at (EHLO [62.47.49.33]) [62.47.49.33] by mail.gmx.net (mp032) with SMTP; 08 Sep 2007 11:30:27 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+YJqMqbsGYIqTx5TX4YqAjQgJ876ytC355bapYwx yrwrPXgvkGe1IK User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:78250 Archived-At: Stefan Monnier schrieb: >>>I must have lost too much context: I do not understand the >>>above description. Can someone spell it out in baby-steps for my poor >>>excuse for a brain? > > >>The OP explained it as follows: > > >>>Split an emacs frame in two windows showing buffers A and B: >>> >>>+-------------+ >>>| | >>>| A | >>>| | >>>+-------------+ >>>| | >>>| B | >>>| | >>>+-------------+ >>> >>>While in the lower window, run >>> >>>(set-window-dedicated-p (selected-window) t) >>> >>>Now, in the upper window, run >>> >>>(display-buffer "C") >>> >>>In Emacs 21, this will be the result: >>> >>>+-------------+ >>>| A | >>>+-------------+ >>>| C | >>>+-------------+ >>>| | >>>| B | >>>| | >>>+-------------+ >>> >>>In Emacs 22, this will be the result: >>> >>>+-------------+ >>>| | >>>| C | >>>| | >>>+-------------+ >>>| | >>>| B | >>>| | >>>+-------------+ >>> >>>In Emacs 22 with split-heigh-threshold=10, this will be the result: >>> >>>+-------------+ >>>| | >>>| A | >>>| | >>>+-------------+ >>>| B | >>>+-------------+ >>>| C | >>>+-------------+ >>> > > >>What he apparently wants is window B always display the same buffer, stay >>below all other windows, and not change its size. > > > I guess I see the following problems: > 0 - it's not clear to me why Emacs chooses to split B rather than A. > It seems unrelated to the split-height-threshold fix, so we need to look > into this before being able to determine how best to fix it. Fget_largest_window returns the largest window and B could be that window. > 1 - since we're in buffer/window A, it would probably be preferable to place > buffer C closer rather than further, so in this case after splitting B > display-buffer should prefer using the top window for C and the bottom > one for B. With `split-window' the new window is the lower one, we would lose all associations for B if we did that. > 2 - "dedicated" is mostly meant to cause deletion of the buffer to also > cause deletion of the window. It says nothing about the window having > a fixed size or being non-splittable. Agreed. > 3 - we have window-size-fixed for that. David: Could you set that for the buffer of your window B and look whether it gives good results. > 4 - we don't have window-(un)splittable for that (there's a frame parameter > to prevent splitting windows in that frame, tho). Earlier I thought about splitting obey a buffer-local value for `split-height-threshold'.