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: Fri, 04 Apr 2008 14:57:50 +0200 Message-ID: <87r6dlydyp.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> <87hcejc318.fsf@jurta.org> <87ve2zo1y5.fsf@member.fsf.org> <87bq4qfyuu.fsf@jurta.org> <87ve2yx7fz.fsf@member.fsf.org> <47F61CDD.6030700@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207313889 16700 80.91.229.12 (4 Apr 2008 12:58:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2008 12:58:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 04 14:58:41 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 1JhlVA-0007Nh-N9 for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 14:58:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhlUY-0001bf-6z for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 08:58:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhlUU-0001bL-7N for emacs-devel@gnu.org; Fri, 04 Apr 2008 08:57:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhlUR-0001b9-Oy for emacs-devel@gnu.org; Fri, 04 Apr 2008 08:57:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhlUR-0001b4-Kj for emacs-devel@gnu.org; Fri, 04 Apr 2008 08:57:55 -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 1JhlUQ-0005jD-TW for emacs-devel@gnu.org; Fri, 04 Apr 2008 08:57:55 -0400 Original-Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 5E51DE5040 for ; Fri, 4 Apr 2008 08:57:53 -0400 (EDT) Original-Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 04 Apr 2008 08:57:53 -0400 X-Sasl-enc: L0SFkYhwVG9m+btYqaLkMnoo8Zpjx7IYVTTuzhkZml7D 1207313872 Original-Received: from localhost (dslb-092-072-009-019.pools.arcor-ip.net [92.72.9.19]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F7444DC7 for ; Fri, 4 Apr 2008 08:57:52 -0400 (EDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <47F61CDD.6030700@gmx.at> (martin rudalics's message of "Fri, 04 Apr 2008 14:19:41 +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:94332 Archived-At: martin rudalics writes: >>>+----------------+--------------------------------+ >>>| | | >>>| 80 columns | 160 columns | >>>| | | >>>| | | >>>| | | >>>| | | >>>+----------------+--------------------------------+ >>> >>>When the right window is wide enough to be split horizontally, and >>>point is in the left window, what is the best to do here? >>> >>>1. display a buffer in the right window without splitting it; >>>2. split the wide right window horizontally and display a buffer >>> in a new window; >>>3. split the left window vertically (this option is preferable >>> for some buffers, e.g. for calendar) >> >> >> By default I'd say the splitting functions only check if the current >> window is wide/high enough. So I the case above if horizontal splitting >> is preferred and split-width-threshold is more than 40, the horizontal >> splitting function would not be applicable and return nil. The vertical >> splitting function is the next and checks if the left window is higher >> than split-height-threshold (the default should be changed to something >> like 40). If it is, then option 3 would be done. If not, then it would >> return nil, too. In that case display-buffer would reuse the LRU window >> which is the right one. >> >> I think that's a sensible default. Users are free to add other >> functions. For example the splitting functions could be extended to >> search through all windows of the current frame to find one that's large >> enough for a horizontal/vertical split. > > Sounds reasonable. Currently, `display-buffer' searches for the > largest window and tries to split it regardless of which window is > selected. It usually doesn't because the default value of > `split-height-threshold' prevents splitting. Ah, ok. Then using the largest window for splitting should stay the default, with sensible default values for split-{width,height}-threshold, e.g. 80 and 40. Bye, Tassilo