From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: split-window-preferred-function Date: Thu, 20 Mar 2008 21:47:23 -0400 Message-ID: References: <47E188D5.5030502@gmx.at> <87hcf1rrdj.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206064059 28795 80.91.229.12 (21 Mar 2008 01:47:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2008 01:47:39 +0000 (UTC) Cc: martin rudalics , emacs-devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 21 02:48:08 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JcWMY-0001ym-Si for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2008 02:48:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcWLy-0003Qu-L6 for ged-emacs-devel@m.gmane.org; Thu, 20 Mar 2008 21:47:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JcWLv-0003Q1-Fq for emacs-devel@gnu.org; Thu, 20 Mar 2008 21:47:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JcWLt-0003Mv-8k for emacs-devel@gnu.org; Thu, 20 Mar 2008 21:47:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcWLt-0003Mh-3k for emacs-devel@gnu.org; Thu, 20 Mar 2008 21:47:25 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JcWLs-0007CT-Qq for emacs-devel@gnu.org; Thu, 20 Mar 2008 21:47:24 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4EAOqw4kdMCrTo/2dsb2JhbACBWqks X-IronPort-AV: E=Sophos;i="4.25,534,1199682000"; d="scan'208";a="16330208" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 20 Mar 2008 21:47:24 -0400 Original-Received: from pastel.home ([76.10.180.232]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id BEQ21024; Thu, 20 Mar 2008 21:47:24 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CE8E5821D; Thu, 20 Mar 2008 21:47:23 -0400 (EDT) In-Reply-To: <87hcf1rrdj.fsf@jurta.org> (Juri Linkov's message of "Fri, 21 Mar 2008 01:02:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93091 Archived-At: > Maybe a function in `split-window-preferred-function' should take care > of all these conditions to decide how to split within a given > window configuration? Also to decide *if* to split a window. > This means we could remove `split-window' from the default value of > `split-window-preferred-function', and then check in `display-buffer' > if `split-window-preferred-function' is non-nil, then call it without > checking any condition. Otherwise, call `split-window', i.e. exactly > as it was implemented before introducing `split-window-preferred-function'. I think we need to allow the function to return nil and in this case continue with the rest of the code. I.e. it should be possible to reproduce in Elisp what happens when split-window-preferred-function is nil. A good way to make sure that's true is to write the code in Elisp in the first place. Stefan