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#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically Date: Tue, 28 Apr 2009 08:29:47 +0200 Message-ID: <49F6A25B.3050108@gmx.at> References: Reply-To: martin rudalics , 3142@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 1240901555 26623 80.91.229.12 (28 Apr 2009 06:52:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2009 06:52:35 +0000 (UTC) Cc: 3142@emacsbugs.donarmstrong.com To: Jared Finder Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 28 08:52:26 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 1LyhB3-0004uM-EG for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Apr 2009 08:52:25 +0200 Original-Received: from localhost ([127.0.0.1]:50911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyhB2-0004Ag-S6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Apr 2009 02:52:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LyhAd-00049m-CQ for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 02:51:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LyhAY-00049F-Ix for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 02:51:58 -0400 Original-Received: from [199.232.76.173] (port=41605 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyhAY-00049C-Ee for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 02:51:54 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:6798) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LyhAX-0003Ep-Rr for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 02:51:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LyhAW-0008S9-U8 for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 02:51:53 -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 n3S6ppgZ027831; Mon, 27 Apr 2009 23:51:51 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n3S6e4qY024358; Mon, 27 Apr 2009 23:40:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 28 Apr 2009 06:40:04 +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.124090032823109 (code B ref 3142); Tue, 28 Apr 2009 06:40:04 +0000 Original-Received: (at 3142) by emacsbugs.donarmstrong.com; 28 Apr 2009 06:32:08 +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.13.8/8.13.8/Debian-3) with SMTP id n3S6W3fS023097 for <3142@emacsbugs.donarmstrong.com>; Mon, 27 Apr 2009 23:32:04 -0700 Original-Received: (qmail invoked by alias); 28 Apr 2009 06:31:57 -0000 Original-Received: from 62-47-34-116.adsl.highway.telekom.at (EHLO [62.47.34.116]) [62.47.34.116] by mail.gmx.net (mp071) with SMTP; 28 Apr 2009 08:31:57 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/oXwd5IJroFy0glPTTozNVXAq6y2xjQr+fU4H1tE 6gvsrR2QnMbKPT User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68 X-detected-kernel: 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: Tue, 28 Apr 2009 02:51:58 -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:27496 Archived-At: > I would expect that split-window-preferred-function would accept > split-window-horizontally and split-window-vertically. `split-window-preferred-function', if non-nil, must be a function called with a WINDOW as single argument. `split-window-vertically' and `split-window-horizontally' are functions that split the selected window and take a SIZE argument. Hence, when you set `split-window-preferred-function' to `split-window-vertically' as you did you will get a split-window-vertically: Window height 1 too small (after splitting) error because you call `split-window-vertically' with a window as argument, and `prefix-numeric-value' when called with a window as argument returns 1, a SIZE argument disliked by `split-window'. Sounds contrived, but I don't have a better explanation. If you really need `split-window-preferred-function' use `split-window-vertically' you have to write a wrapper like (defun my-split-window-function (window) (with-selected-window window (split-window-vertically))) > At the very > least, there should be an easy way to set this to "always split > vertically", "always split horizontally", and "intelligently split". Setting `split-width-threshold' nil for "always split vertically" and `split-height-threshold' nil for "always split horizontally" should accomplish that. Can't you use these directly? martin