From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "N. Jackson" Newsgroups: gmane.emacs.devel Subject: Re: Suggesting `frame-split-biggest-window' Re: customize location and shape of a new window in a frame Date: Thu, 13 Sep 2018 09:07:59 -0400 Message-ID: <87r2hxv93k.fsf@moondust.localdomain> References: <9755.9843.306611.23448@gargle.gargle.HOWL> <87y3c7pw4w.fsf@ericabrahamsen.net> <87h8iuik3g.fsf@moondust.localdomain> <87o9d2eaql.fsf@ericabrahamsen.net> <875zzawbd6.fsf_-_@moondust.localdomain> <5B9A1599.2060800@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536844878 28232 195.159.176.226 (13 Sep 2018 13:21:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 13:21:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eric Abrahamsen , emacs-devel@gnu.org, Roland Winkler , Stefan Monnier To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 15:21:13 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0RYW-0007Ew-Jb for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 15:21:12 +0200 Original-Received: from localhost ([::1]:42477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Rad-0007wt-3M for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 09:23:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0RLs-0005el-Cm for emacs-devel@gnu.org; Thu, 13 Sep 2018 09:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0RLm-0006ZJ-LG for emacs-devel@gnu.org; Thu, 13 Sep 2018 09:08:08 -0400 Original-Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]:45483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0RLm-0006Wz-Ex; Thu, 13 Sep 2018 09:08:02 -0400 Original-Received: by mail-io1-xd43.google.com with SMTP id e12-v6so3020374iok.12; Thu, 13 Sep 2018 06:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=T28JyAkJrTHWlvx+LPyivthMV0RUvOBN6PWi2pu31aE=; b=KmESK/ZFtF+45QamlWNgLK87ThoqPLwOjdeP6sC/vUjTeXtdbbqKXstgreDRyLLTkC AbeP00xAG+1t/WQnBsJyWdEE32/NQ3E2Ay2D6BdS14FK2HslxaydfIOMze5xiadOkDoA KXkD59KOfC6RH6eEVO1nK13BJqpW36P/tNhLfOjG55RsXArSHx2O/NySrGpEC+IObQzT FDihUCWEm3TsVjwbNxMOkDDD1/bgUYM1qBjkYmA0kcn9YFXjk9RfjgzLIVJ/48lbtuSS yHqKgWnVqa4rTcKOEGJXhHw3VrXpeyXKsR19lQihQguwbMZJhExZ1/GfSVD5MycX66ga CzTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=T28JyAkJrTHWlvx+LPyivthMV0RUvOBN6PWi2pu31aE=; b=GYonYae0p499rQBsWFSFixTPieak2qq4kBb13t3XrbyTU/yYuCvMy+BXYdqGvOHGrL 0Q9iOkglkg5stPQ/gEe5aXg1HxsUGSBTivLlQQItLtbWeNWIjOfHPN8iHd+i4O1ckxfb /l6u2S5pHcrZbD8/3PbwfppFnt/262t25XU4u5vNqaBy+hgOb1+edBnWKHL0YdoaJxSw v67fgl/ah6CO9D7WszPGzWVyNMPEWkwSIOb7ot0M87P48o4WZE8SVQVJbNw0b1UNWXqA Vty5YaLUvb9m5XdNlNXsQBUuOEQ+Ot9+eazkkMN7OWGbAWCs3Af9W0SF4feGSsjAm+HG CnAA== X-Gm-Message-State: APzg51BuEtR125hJYisT+Mx/jNnC4vsM3AbzfklyLyxTpqelvBntk9X7 n3u3DYNAlv4eKaDC6zcBzw+ZIhy+ X-Google-Smtp-Source: ANB0VdaqsR8K6o5ERjX4cYGSpYud52a7Fm1USkxKG49ts8CLsfWuvBpu92W5ugrRBC1CWpgDLJCTzw== X-Received: by 2002:a6b:dc0e:: with SMTP id s14-v6mr5590883ioc.226.1536844081634; Thu, 13 Sep 2018 06:08:01 -0700 (PDT) Original-Received: from moondust.localdomain.nodomain.none (toroon474qw-lp130-08-70-26-73-61.dsl.bell.ca. [70.26.73.61]) by smtp.gmail.com with ESMTPSA id k194-v6sm2296511itb.30.2018.09.13.06.08.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Sep 2018 06:08:01 -0700 (PDT) In-Reply-To: <5B9A1599.2060800@gmx.at> (martin rudalics's message of "Thu, 13 Sep 2018 09:45:29 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d43 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229738 Archived-At: At 09:45 +0200 on Thursday 2018-09-13, martin rudalics wrote: > >> If there was a function (frame-split-biggest-window FRAME SIZE SIDE >> PIXELWISE) to split the "biggest" [*] window in the frame, then >> neither BBDB nor any other Elisp code would need to keep reinventing >> this wheel. >> >> (The other two functions, more for interactive use, would be >> `frame-split-biggest-window-below' and >> `frame-split-biggest-window-right'.) >> >> [*] To find the "biggest" window when splitting below, find the >> tallest window or windows and split the widest of them; when >> splitting right, find the widest window or windows and split the >> tallest of them. > > We have a number of options for that. One of them is the option > 'split-window-preferred-function' (a misnomer) which is by default set > to 'split-window-sensibly'. Consult their definitions first. The > latter's behavior is guided by the options 'split-height-threshold' > and 'split-width-threshold' (two more misnomers) . Together, these > should provide a boilerplate for writing your own function which you > can then put into 'display-buffer-alist'. What's missing with these functions is that they start from a given window. What's needed is functionality that looks at all the windows on (in?) the frame and chooses which one to split.