From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc. Date: Mon, 25 May 2009 09:04:25 +0200 Message-ID: <4A1A42F9.7050500@gmx.at> References: <7BFD115BD21E4677AAB801DA5EBBFED1@us.oracle.com> Reply-To: martin rudalics , 3366@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243236575 19182 80.91.229.12 (25 May 2009 07:29:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 07:29:35 +0000 (UTC) To: Drew Adams , 3366@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 25 09:29:28 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 1M8Ucf-0000xV-UG for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 May 2009 09:29:26 +0200 Original-Received: from localhost ([127.0.0.1]:38941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8Ucf-0005am-D7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 May 2009 03:29:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8Ucb-0005aP-7t for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 03:29:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8UcV-0005aD-Mr for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 03:29:19 -0400 Original-Received: from [199.232.76.173] (port=43968 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8UcV-0005aA-EL for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 03:29:15 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:38881) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8UcU-0001mt-QT for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 03:29:15 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M8UcT-0002cp-SN for bug-gnu-emacs@gnu.org; Mon, 25 May 2009 03:29:14 -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 n4P7TBOi008345; Mon, 25 May 2009 00:29:12 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4P7K3Zl007017; Mon, 25 May 2009 00:20:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 25 May 2009 07:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3366 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3366-submit@emacsbugs.donarmstrong.com id=B3366.12432354575938 (code B ref 3366); Mon, 25 May 2009 07:20:03 +0000 Original-Received: (at 3366) by emacsbugs.donarmstrong.com; 25 May 2009 07:10:57 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n4P7ApdW005929 for <3366@emacsbugs.donarmstrong.com>; Mon, 25 May 2009 00:10:53 -0700 Original-Received: (qmail invoked by alias); 25 May 2009 07:10:44 -0000 Original-Received: from 62-47-62-211.adsl.highway.telekom.at (EHLO [62.47.62.211]) [62.47.62.211] by mail.gmx.net (mp006) with SMTP; 25 May 2009 09:10:44 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19/3iw8471/wt5kvynN/qo6PpXDeF0n1uOeTrOXBn lIp0eStBc9GbLD User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <7BFD115BD21E4677AAB801DA5EBBFED1@us.oracle.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6899999999999999 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Mon, 25 May 2009 03:29:19 -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:28138 Archived-At: > 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))) The function you want might be (defun split-window-22 (window) (let ((frame (window-frame window))) (or (and (setq window (get-largest-window frame t)) (window-full-width-p window) (window-splittable-p window) (split-window window)) (and (setq window (get-lru-window frame t)) (window-splittable-p window) (split-window window))))) but I wouldn't rely on it. > 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'. All people have to do is customize `split-window-preferred-function' to that function. martin