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: Patch: prefer-window-split-horizontally Date: Thu, 16 Aug 2007 02:36:57 +0300 Organization: JURTA Message-ID: <877inwjr7y.fsf@jurta.org> References: <87bqdajcr1.fsf@baldur.tsdh.de> <87vebij5p8.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187221802 23836 80.91.229.12 (15 Aug 2007 23:50:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2007 23:50:02 +0000 (UTC) Cc: Tassilo Horn , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 16 01:50:00 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 1ILSch-0007YV-OV for ged-emacs-devel@m.gmane.org; Thu, 16 Aug 2007 01:50:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILSch-00083H-C0 for ged-emacs-devel@m.gmane.org; Wed, 15 Aug 2007 19:49:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILScd-00082a-8W for emacs-devel@gnu.org; Wed, 15 Aug 2007 19:49:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILScc-000824-JF for emacs-devel@gnu.org; Wed, 15 Aug 2007 19:49:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILScc-000821-DH for emacs-devel@gnu.org; Wed, 15 Aug 2007 19:49:54 -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 1ILScZ-0004Sg-Sl; Wed, 15 Aug 2007 19:49:52 -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 1ILScT-00058v-69; Thu, 16 Aug 2007 02:49:49 +0300 In-Reply-To: (Stefan Monnier's message of "Wed\, 15 Aug 2007 15\:35\:18 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Scanner-Signature: b22dd54e5e410b0526d530b08df0ebb5 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 1389 [August 15 2007] 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: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) 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:76597 Archived-At: >> What do you think about adding another variable `split-window-function' >> with the default value `split-window-vertically' or nil with the same >> meaning, and the possible other value `split-window-horizontally'? >> This would be like setting `ediff-split-window-function' to >> `split-window-horizontally'. > > Just for the record: we're talking about something used only in > display-buffer so a name like `split-window-function' doesn't seem right. display-buffer splits windows, so it could use `split-window-function' to decide how to split. > And we already have display-buffer-function, which makes it possible to > customize the way the windows are split. Now customizing > display-buffer-function is not always easy, There was an idea to rewrite the whole `display-buffer' in Lisp, and make it more customizable. But it seems it is impossible to rewrite it completely, because the current C implementation processes its input argument `frame' which isn't given to display-buffer-function: return call2 (Vdisplay_buffer_function, buffer, not_this_window); which is called with `buffer' and `not_this_window', but not `frame'. > so maybe prefer-window-split-horizontally makes sense, or maybe we > should simply change the default behavior of display-buffer to do the > suggested "if current window is very wide, split it horizontally rather > than vertically" and not introduce any new customization (or maybe just > a "ideal columns" or "ideal aspect-ratio" based on which we decide > whether to split vertically rather than horizontally). Maybe, this is possible. For instance, "ideal columns" could be the same as `fill-column' or some other number near 80 columns. -- Juri Linkov http://www.jurta.org/emacs/