From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically Date: Tue, 05 May 2009 21:41:41 -0400 Message-ID: References: <49F6A25B.3050108@gmx.at> <874ow84cp6.fsf_-_@mail.jurta.org> <49F7FE0F.1020107@gmx.at> <49FFE487.5000106@gmx.at> Reply-To: Stefan Monnier , 3142@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1241574784 5207 80.91.229.12 (6 May 2009 01:53:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2009 01:53:04 +0000 (UTC) Cc: 3142@emacsbugs.donarmstrong.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 06 03:52:54 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 1M1WIt-0007T8-M5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 May 2009 03:52:11 +0200 Original-Received: from localhost ([127.0.0.1]:56902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1WIs-0004Mf-JT for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 May 2009 21:52:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1WIk-0004Lf-R0 for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 21:52:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1WIf-0004I4-Ne for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 21:52:01 -0400 Original-Received: from [199.232.76.173] (port=46661 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1WIf-0004Hx-HG for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 21:51:57 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38967) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1WId-0007ul-T2 for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 21:51:56 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n461prYo014929; Tue, 5 May 2009 18:51:53 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n461o4L1013753; Tue, 5 May 2009 18:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 06 May 2009 01:50:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3142 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3142-submit@emacsbugs.donarmstrong.com id=B3142.124157411112250 (code B ref 3142); Wed, 06 May 2009 01:50:03 +0000 Original-Received: (at 3142) by emacsbugs.donarmstrong.com; 6 May 2009 01:41:51 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n461flCg012244 for <3142@emacsbugs.donarmstrong.com>; Tue, 5 May 2009 18:41:48 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUFAE6HAErO+IYe/2dsb2JhbACBUM4PhAEFhU4 X-IronPort-AV: E=Sophos;i="4.40,300,1238990400"; d="scan'208";a="38048453" Original-Received: from 206-248-134-30.dsl.teksavvy.com (HELO ceviche.home) ([206.248.134.30]) by ironport2-out.teksavvy.com with ESMTP; 05 May 2009 21:41:41 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 50B91B523F; Tue, 5 May 2009 21:41:41 -0400 (EDT) In-Reply-To: <49FFE487.5000106@gmx.at> (martin rudalics's message of "Tue, 05 May 2009 09:02:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 05 May 2009 21:52:01 -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:27729 Archived-At: > Unfortunately, this will create the following problem: Suppose a user > wants to > (1) always split the selected window instead of the largest or LRU one, > (2) never split the selected window (as Drew points out in another > thread), or > (3) base her decision on whether a window shall be split on which window > was selected at the time `display-buffer' was called. Good call. > + (const :tag "sensibly" split-window-sensibly) > + (const :tag "vertically" > + (lambda (window) > + (when (window--splittable-p window) > + (with-selected-window window > + (split-window-vertically))))) > + (const :tag "horizontally" > + (lambda (window) > + (when (window--splittable-p window t) > + (with-selected-window window > + (split-window-horizontally))))) I'd rather try to better advertise the use of (setq split-width-threshold nil) and friends then bother with lambdas here or defining new functions. Stefan