From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jared Finder 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 10:21:51 -0700 Message-ID: References: <49F6A25B.3050108@gmx.at> Reply-To: Jared Finder , 3142@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1240939948 2816 80.91.229.12 (28 Apr 2009 17:32:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2009 17:32:28 +0000 (UTC) Cc: "3142@emacsbugs.donarmstrong.com" <3142@emacsbugs.donarmstrong.com> To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 28 19:32:18 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 1LyrAD-0006H0-0u for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Apr 2009 19:32:13 +0200 Original-Received: from localhost ([127.0.0.1]:33698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyrAC-0004V5-BX for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Apr 2009 13:32:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LyrA8-0004UY-2C for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 13:32:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LyrA3-0004Rl-1W for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 13:32:07 -0400 Original-Received: from [199.232.76.173] (port=48031 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyrA2-0004Re-V4 for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 13:32:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54618) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LyrA2-0003dr-BG for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2009 13:32:02 -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 n3SHVpda027873; Tue, 28 Apr 2009 10:31:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n3SHU3iS026706; Tue, 28 Apr 2009 10:30:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Jared Finder Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 28 Apr 2009 17:30:02 +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.124093932225455 (code B ref 3142); Tue, 28 Apr 2009 17:30:02 +0000 Original-Received: (at 3142) by emacsbugs.donarmstrong.com; 28 Apr 2009 17:22:02 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from universe.crypticstudios.com (universe.crypticstudios.com [208.95.187.69]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3SHLwSn025443 for <3142@emacsbugs.donarmstrong.com>; Tue, 28 Apr 2009 10:21:59 -0700 Original-Received: from proserpine.paragon.crypticstudios.com (172.31.97.6) by universe.crypticstudios.com (208.95.187.69) with Microsoft SMTP Server (TLS) id 8.1.311.2; Tue, 28 Apr 2009 10:21:53 -0700 Original-Received: from proserpine.paragon.crypticstudios.com ([172.31.97.6]) by proserpine.paragon.crypticstudios.com ([172.31.97.6]) with mapi; Tue, 28 Apr 2009 10:21:52 -0700 Thread-Topic: bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically Thread-Index: AcnHywj3eggPrpYvQkmTtvjp9fKWQgAWkGqQ In-Reply-To: <49F6A25B.3050108@gmx.at> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 28 Apr 2009 13:32:07 -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:27514 Archived-At: That's not obvious! I like the idea of the split window thresholds, but it= needs to be a lot more obvious how to use them. What's wrong with my sugg= estion to change the customize interface to have two more options "Always s= plit vertical" and "Always split horizontal" that calls the appropriate fun= ctions? -- MJF -----Original Message----- From: martin rudalics [mailto:rudalics@gmx.at]=20 Sent: Monday, April 27, 2009 11:30 PM To: Jared Finder Cc: 3142@emacsbugs.donarmstrong.com Subject: Re: bug#3142: 23.0.92; split-window-prefered-function should be ab= le to use split-window-horizontally/split-window-vertically > 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