From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: customize location and shape of a new window in a frame Date: Tue, 11 Sep 2018 14:22:23 -0700 Message-ID: <87y3c7pw4w.fsf@ericabrahamsen.net> References: <9755.9843.306611.23448@gargle.gargle.HOWL> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536700966 32079 195.159.176.226 (11 Sep 2018 21:22:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2018 21:22:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 11 23:22:42 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 1fzq7O-0008EX-6l for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2018 23:22:42 +0200 Original-Received: from localhost ([::1]:59572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzq9U-0006WE-Pe for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2018 17:24:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzq8U-0006Vk-A0 for emacs-devel@gnu.org; Tue, 11 Sep 2018 17:23:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzq7X-0005Pn-Ao for emacs-devel@gnu.org; Tue, 11 Sep 2018 17:22:54 -0400 Original-Received: from [195.159.176.226] (port=53675 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fzq7V-0005JO-LP for emacs-devel@gnu.org; Tue, 11 Sep 2018 17:22:50 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fzq5B-0005lK-U0 for emacs-devel@gnu.org; Tue, 11 Sep 2018 23:20:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:EmHMEYIpM4RRQc48THotbXl7Zs8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:229681 Archived-At: "Roland Winkler" writes: > Someone posted this on the BBDB mailing list > > http://lists.nongnu.org/archive/html/bbdb-user/2018-09/msg00031.html > > But the question is quite generic, and I guess it must be an issue > for other packages, too: > > BBDB wants to pop-up a window in a frame that already has multiple > windows. Different users like to do this in different ways and > split an existing window vertically or horizontally, giving a > customizable percentage of screen estate to the new window. > > Is there a general function that BBDB could use here, a function > that users can customize for their needs? Assuming the user is running BBDB with Gnus, Gnus has its own window layout system, and you need to work with that. Usually that looks like: (add-to-list 'gnus-window-to-buffer `(bbdb-gnus . "*BBDB*")) (gnus-add-configuration (article ,(cond (gnus-use-trees '(vertical 1.0 (summary 0.25 point) (tree 0.25) (horizontal 1.0 (article 1.0) (bbdb-gnus 0.4)))) (t '(vertical 1.0 (summary 0.25 point) (horizontal 1.0 (article 1.0) (bbdb-gnus 0.4)))))) What Gnus *should* be using, and what would be probably the right solution for BBDB in other (non-Gnus) circumstances, is Side Windows (see Elisp manual). Side windows give pretty good control over where the window is placed, and they're made just for situations like this. Eric