From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: split-window-preferred-function Date: Thu, 03 Apr 2008 01:27:19 +0300 Organization: JURTA Message-ID: <87hcejc318.fsf@jurta.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207175325 10209 80.91.229.12 (2 Apr 2008 22:28:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Apr 2008 22:28:45 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 03 00:29:16 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 1JhBSC-0007iS-P7 for ged-emacs-devel@m.gmane.org; Thu, 03 Apr 2008 00:29:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhBRa-0003f1-CC for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2008 18:28:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhBR6-0003Yk-Lf for emacs-devel@gnu.org; Wed, 02 Apr 2008 18:28:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhBR3-0003XN-S7 for emacs-devel@gnu.org; Wed, 02 Apr 2008 18:28:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhBR3-0003X6-LT for emacs-devel@gnu.org; Wed, 02 Apr 2008 18:28:01 -0400 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JhBQz-0001Ae-SF; Wed, 02 Apr 2008 18:27:58 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JhBQv-0002AW-Os; Thu, 03 Apr 2008 01:27:54 +0300 In-Reply-To: <47F34982.2000706@gmx.at> (martin rudalics's message of "Wed, 02 Apr 2008 10:53:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: efe3bc1504fa577d936f03857ce6b673 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2554 [Apr 02 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 10 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) 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:94236 Archived-At: > I'm not yet sure how to handle the following two: > > || (NILP (XWINDOW (window)->parent)) As you can see, I already implemented this in `split-window-preferred-horizontally' as a call to `one-window-p'. > BTW, do we want a `split-width-threshold'? In my initial patch I presented the variable `split-width-threshold', but in the final installed patch I dropped this variable, because I realized that it is not necessary. The reason is simple: there is no sense to have more than two automatically horizontally split side-by-side windows. For instance, I use the smallest readable font and on a wide screen I get 200 columns. Splitting them in three parts gives less than 80-column wide windows that is not comfortable width to work in most buffers. It is true that some specialized features like speedbar might require a narrow window, but they can create such a window configuration explicitly. So really automatic splitting in more than 3 horizontally split windows is not necessary. However, what is very much necessary, and what is still missing in `split-window-preferred-horizontally' is the ability to split _vertically_ in horizontally split windows. Let's take for example `calendar'. When we have two horizontally split windows and call `M-x calendar', it displays the calendar window in the adjacent window. This is very inconvenient because the calendar window is usually not higher than 8 lines and the rest of its window below is filled by empty space: +------------+------------+ | | | | | calendar | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +------------+------------+ It would be more preferable for `calendar' to split the current window vertically and adjust its height like it already does: +------------+------------+ | | | | | | | | | | | | | | | | | | | | | | | | +------------+ | | | | | calendar | | | | | +------------+------------+ I'm not sure yet whether this behavior can be generalized in `split-window-preferred-horizontally' or `calendar' should treat it specially. -- Juri Linkov http://www.jurta.org/emacs/