From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: split-window-preferred-function Date: Wed, 02 Apr 2008 14:33:49 +0200 Message-ID: <871w5oo2qa.fsf@member.fsf.org> References: <47E188D5.5030502@gmx.at> <87hcf1rrdj.fsf@jurta.org> <87r6e3k3hc.fsf@jurta.org> <87d4pfzt2j.fsf@jurta.org> <47ED4BF7.9060507@gmx.at> <871w5utnac.fsf@jurta.org> <47EE064A.1060105@gmx.at> <874papk8zl.fsf@jurta.org> <47F34982.2000706@gmx.at> <87lk3woay9.fsf@member.fsf.org> <47F358CD.2020102@gmx.at> <878wzwo8fk.fsf@member.fsf.org> <47F37859.30801@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207139663 28013 80.91.229.12 (2 Apr 2008 12:34:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Apr 2008 12:34:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 02 14:34:44 2008 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 1Jh2An-0001HL-8e for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2008 14:34:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh2AA-0003OU-RF for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2008 08:33:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jh2A6-0003Nq-4o for emacs-devel@gnu.org; Wed, 02 Apr 2008 08:33:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jh2A4-0003N1-Fj for emacs-devel@gnu.org; Wed, 02 Apr 2008 08:33:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh2A4-0003Mw-5A for emacs-devel@gnu.org; Wed, 02 Apr 2008 08:33:52 -0400 Original-Received: from out4.smtp.messagingengine.com ([66.111.4.28]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jh2A4-0005An-6z for emacs-devel@gnu.org; Wed, 02 Apr 2008 08:33:52 -0400 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 9AED0E3F31 for ; Wed, 2 Apr 2008 08:33:51 -0400 (EDT) Original-Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 02 Apr 2008 08:33:51 -0400 X-Sasl-enc: /RdtqBVshG+Btj8+/X2RgFUNfsWIWRz6+HkKZAAErLcs 1207139631 Original-Received: from localhost (dslb-084-063-001-210.pools.arcor-ip.net [84.63.1.210]) by mail.messagingengine.com (Postfix) with ESMTPA id CA01E10392 for ; Wed, 2 Apr 2008 08:33:50 -0400 (EDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <47F37859.30801@gmx.at> (martin rudalics's message of "Wed, 02 Apr 2008 14:13:13 +0200") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:94186 Archived-At: martin rudalics writes: >> Because I use split-window-preferred-horizontally the diary buffer is >> shown in a new window right of the window holding *scratch*. Now I >> eval the second `display-buffer' and the right window's buffer is >> replaced with the *Help* buffer. >> >> With `split-height-threshold' set to 20 I get the same behavior. >> Reading the `display-buffer' docstring I think instead of replacing >> the right window's buffer it should instead split the left window >> vertically, cause that's much bigger (61 lines) than the threshold. > > You can't see it because you split your windows horizontally. Try > with vertical splitting. Yes. My point is that it would be better if `display-buffer' would try to do a non-preferred split before falling back to reusing windows. We could change `split-window-preferred-function' to be an alist of split functions. Each function gets called, and if it's not able to do an appropriate split, it returns nil. If none of the functions splits the window, `display-buffer's job is to reuse an existing window. Vanilla emacs would ship with `split-window-functions' set to '(split-window-preferred-vertically split-window-preferred-horizontally) Then `split-window-preferred-vertically' has to obey `split-height-threshold' and `split-window-preferred-horizontally' has to obey `split-width-threshold'. Bye, Tassilo