From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "grischka" Newsgroups: gmane.emacs.devel Subject: Re: split-window-preferred-function Date: Sat, 5 Apr 2008 14:36:50 +0200 Message-ID: <005d01c89719$de92d340$1f45fe91@j4f3n1> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207399122 32160 80.91.229.12 (5 Apr 2008 12:38:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2008 12:38:42 +0000 (UTC) To: , "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 05 14:39:13 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 1Ji7ft-00060F-1R for ged-emacs-devel@m.gmane.org; Sat, 05 Apr 2008 14:39:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ji7fE-0001V6-NH for ged-emacs-devel@m.gmane.org; Sat, 05 Apr 2008 08:38:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ji7fA-0001TV-Op for emacs-devel@gnu.org; Sat, 05 Apr 2008 08:38:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ji7f8-0001Qv-Pq for emacs-devel@gnu.org; Sat, 05 Apr 2008 08:38:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ji7f8-0001Qs-Ls for emacs-devel@gnu.org; Sat, 05 Apr 2008 08:38:26 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Ji7f8-0002K6-AT for emacs-devel@gnu.org; Sat, 05 Apr 2008 08:38:26 -0400 Original-Received: (qmail invoked by alias); 05 Apr 2008 12:38:22 -0000 Original-Received: from dialin-145-254-069-031.pools.arcor-ip.net (EHLO j4f3n1) [145.254.69.31] by mail.gmx.net (mp030) with SMTP; 05 Apr 2008 14:38:22 +0200 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX18BcF5kNdABSOANjKd7m3S69T04rjCexkEAyExiMS B8lUKL4m+Msy3N X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:94404 Archived-At: > >>>> I still think this is wrong: the choice should be based on > >>>> split-window-preferred-aspect-ratio. > >> > >>> I cannot imagine how that would work. Especially what would prevent > >>> splitting to create windows which are too narrow? > >> > >> The height and width thresholds would, of course. > > > Ah, ok. I've thought split-window-preferred-aspect-ratio would obsolete > > those two. So now I agree with you. > > No, of course it can't replace them. Also I originally thought > aspect-ratio wouldn't be needed, we could just use (/ height-threshold > weight-threshold), but that wouldn't work: I much prefer tall windows, > but would prefer to use a height threshold smaller than 80. I don't think that tuning the split-window concept will bring you any further. Such function is simply too low-level than that it could do what you want, that is to create new layout on-the-fly. Now you throw some options "min/max/preferred/threshold/ratio" at the user, then if yet it doesn't work at least can be customized how it doesn't. But humans are bad in calculating inter-dependencies of dozens of options, while understand dependencies of geometry and content immediately. Whereas code knows very well about flags and states, but has no idea how to calculate quality in layout. So why don't you let the user define the layout and make the code fill in the options. Where LAYOUT means what (class of) content shall be shown in what place, and OPTIONS for instance can mean what do do with space where the content is currently not available. Have a look at elscreen. Or think about html div tags, they define layout that only applies if there is content. --- grischka