From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: display-buffer cleverness - how to tame? Date: Tue, 5 May 2009 09:58:23 -0700 Message-ID: <002301c9cda2$b4acf680$0200a8c0@us.oracle.com> References: <000c01c9cc8b$ba796c50$0200a8c0@us.oracle.com> <49FEA973.70705@gmx.at> <002a01c9ccc6$2221c840$0200a8c0@us.oracle.com> <49FF1AA0.9080601@gmx.at> <000e01c9ccdb$b0997180$c2b22382@us.oracle.com> <49FFE481.1070102@gmx.at> <004901c9cd8c$4d902e60$0200a8c0@us.oracle.com> <4A006A59.1000406@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1241542735 10024 80.91.229.12 (5 May 2009 16:58:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2009 16:58:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'martin rudalics'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 05 18:58:45 2009 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 1M1Nyf-00042C-5L for ged-emacs-devel@m.gmane.org; Tue, 05 May 2009 18:58:45 +0200 Original-Received: from localhost ([127.0.0.1]:40458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1Nye-0005nL-Ax for ged-emacs-devel@m.gmane.org; Tue, 05 May 2009 12:58:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1NyZ-0005mk-Ai for emacs-devel@gnu.org; Tue, 05 May 2009 12:58:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1NyT-0005ln-SK for emacs-devel@gnu.org; Tue, 05 May 2009 12:58:38 -0400 Original-Received: from [199.232.76.173] (port=39585 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1NyT-0005lk-N0 for emacs-devel@gnu.org; Tue, 05 May 2009 12:58:33 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:28786) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1NyT-00012m-2K for emacs-devel@gnu.org; Tue, 05 May 2009 12:58:33 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n45Gwgje001053 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 May 2009 16:58:43 GMT Original-Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n45GwhqY032069; Tue, 5 May 2009 16:58:44 GMT Original-Received: from dradamslap1 (/141.144.66.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 May 2009 09:58:24 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4A006A59.1000406@gmx.at> Thread-Index: AcnNn58gDcp/6yIEQ0iztjRsknhiTwAAFfAQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: abhmt004.oracle.com [141.146.116.13] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010204.4A007031.02E5:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 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:110682 Archived-At: > > Is there some usual interpretation/use of that window arg? > > The interpretation is "this is one of the windows Emacs 22 > tried to split". Is that the way it will be explained in the doc, by referring to Emacs 22's (undocumented, magic) behavior? I think it should be documented that `split-window-preferred-function', if non-nil, is called by `display-buffer' potentially twice, to determine the window (if any) to split. The first time, it is passed the largest window. Only if it returns nil is it called a second time, with the lru window as argument. Without this info, I don't think users will know what `split-window-preferred-function' is about, hence how to code a suitable function for it. The doc string says that if `split-window-preferred-function' returns nil both times, then `display-buffer' splits the window that respects the values of `split-height-threshold' and `split-width-threshold'. What if more than one window respects those values? Among which windows does `display-buffer' choose, and how does it choose one of them, if more than one respects those values? And what does it do if no window respects those values? This info is missing, AFAICT. It sounds as if no matter how `split-window-preferred-function' is defined, `display-buffer' will split a window. Is that correct? That's what the doc string seems to say - either `split-window-preferred-function' splits a window or `display-buffer' splits one that respects `split-height-threshold' and `split-width-threshold'. If that's not true, then (besides fixing the doc), how can `split-window-preferred-function' prevent window splitting altogether? (Thanks for the other explanations. Hopefully, this info will make it into the doc eventually.)