From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc. Date: Sun, 24 May 2009 10:01:44 -0700 Message-ID: <7BFD115BD21E4677AAB801DA5EBBFED1@us.oracle.com> Reply-To: Drew Adams , 3366@emacsbugs.donarmstrong.com 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 1243184980 5893 80.91.229.12 (24 May 2009 17:09:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 May 2009 17:09:40 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 24 19:09:33 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M8HCS-0001vi-Bl for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 May 2009 19:09:28 +0200 Original-Received: from localhost ([127.0.0.1]:60007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8HCR-00082D-D6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 May 2009 13:09:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8HCL-00081U-Lx for bug-gnu-emacs@gnu.org; Sun, 24 May 2009 13:09:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8HCH-0007zz-3l for bug-gnu-emacs@gnu.org; Sun, 24 May 2009 13:09:21 -0400 Original-Received: from [199.232.76.173] (port=40725 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8HCG-0007zw-Vp for bug-gnu-emacs@gnu.org; Sun, 24 May 2009 13:09:17 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33078) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8HCG-0004PL-9L for bug-gnu-emacs@gnu.org; Sun, 24 May 2009 13:09:16 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4OH9Bkd004316; Sun, 24 May 2009 10:09:13 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4OH56m3003491; Sun, 24 May 2009 10:05:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 24 May 2009 17:05:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3366 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12431845042444 (code B ref -1); Sun, 24 May 2009 17:05:06 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 24 May 2009 17:01:44 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4OH1eqG002435 for ; Sun, 24 May 2009 10:01:41 -0700 Original-Received: from mx10.gnu.org ([199.232.76.166]:40637) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M8H4t-0002a7-UL for emacs-pretest-bug@gnu.org; Sun, 24 May 2009 13:01:40 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M8H4q-0002fI-Cf for emacs-pretest-bug@gnu.org; Sun, 24 May 2009 13:01:39 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:41233) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8H4p-0002fC-TK for emacs-pretest-bug@gnu.org; Sun, 24 May 2009 13:01:36 -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 n4OH27In022762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 24 May 2009 17:02:08 GMT Original-Received: from abhmt002.oracle.com (abhmt002.oracle.com [141.146.116.11]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4OH2GH9014765 for ; Sun, 24 May 2009 17:02:16 GMT Original-Received: from dradamslap1 (/98.210.250.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 May 2009 10:01:29 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcnckVCp4hsqkDv5TpyYLazkuF5eug== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt002.oracle.com [141.146.116.11] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010203.4A197D6B.002B:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 24 May 2009 13:09:21 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28110 gmane.emacs.pretest.bugs:24491 Archived-At: We should document more explicitly how to obtain the window-splitting behavior for buffer display that existed prior to Emacs 23. The NEWS says only this: "*** display-buffer tries to be smarter when splitting windows. The new option split-window-preferred-function lets you specify your own function to pop up new windows. Its default value split-window-sensibly can split a window either vertically or horizontally, whichever seems more suitable in the current configuration. You can tune the behavior of split-window-sensibly by customizing split-height-threshold and the new option split-width-threshold. Both options now take the value nil to inhibit splitting in one direction. Setting split-width-threshold to nil inhibits horizontal splitting and gets you the behavior of Emacs 22 in this respect. In any case, display-buffer may now split the largest window vertically even when it is not as wide as the containing frame." Most of that just describes the new behavior, repeating what is in the manual. That's OK, but insufficient for NEWS. The last two sentences are all that is said about how to get the pre-Emacs 23 behavior, and they speak only about horizontal splitting. Nothing is said about how to get the pre-Emacs 23 behavior for _choosing which window is split_, and that change is a radical departure from previous behavior - a change just as important as the change regarding horizontal splitting. It seems (but I'm not sure this works for all cases) that what is needed, to ensure that the same window as before is split, is to bind `split-window-preferred-function' to something like this around calls to `display-buffer': (lambda (w) (eq w (get-lru-window))) Even if this function is not an exact recipe for all cases, something like it should be mentioned, to help users get back the behavior that existed before the new "smarter" behavior was introduced. Preferably, Emacs would itself provide a function that users could use here - a function that would give precisely the pre-23 behavior in all cases. We should also make it clear that if you want the pre-23 behavior then you will need to wrap not only explicit calls to `display-buffer' with a `let' binding this way, but also calls to things such as `with-output-to-temp-buffer'. In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600) of 2009-05-24 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)'