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: Suggesting `frame-split-biggest-window' Re: customize location and shape of a new window in a frame Date: Thu, 13 Sep 2018 09:38:06 -0700 Message-ID: <87in399wup.fsf@ericabrahamsen.net> References: <9755.9843.306611.23448@gargle.gargle.HOWL> <87y3c7pw4w.fsf@ericabrahamsen.net> <87h8iuik3g.fsf@moondust.localdomain> <87o9d2eaql.fsf@ericabrahamsen.net> <875zzawbd6.fsf_-_@moondust.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536856576 8628 195.159.176.226 (13 Sep 2018 16:36:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 16:36:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: "N. Jackson" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 13 18:36:12 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 1g0UbC-00026h-Ld for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 18:36:10 +0200 Original-Received: from localhost ([::1]:43435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0UdI-0004it-TK for ged-emacs-devel@m.gmane.org; Thu, 13 Sep 2018 12:38:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Ud9-0004ih-OH for emacs-devel@gnu.org; Thu, 13 Sep 2018 12:38:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0Ud6-0002Bc-Jt for emacs-devel@gnu.org; Thu, 13 Sep 2018 12:38:11 -0400 Original-Received: from mail.ericabrahamsen.net ([50.56.99.223]:52441) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g0Ud6-0002BK-EC for emacs-devel@gnu.org; Thu, 13 Sep 2018 12:38:08 -0400 Original-Received: from localhost (174-21-164-146.tukw.qwest.net [174.21.164.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id BCDD3C2FAE; Thu, 13 Sep 2018 16:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1536856687; bh=o+fiuXQygKjATO8NAbFIgM1IX/rz4qiZA5xnQnPmlZY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QfuDRs50KwmL0SfzbuqlyJOV4N4ECiGR2iB6Uxa7n6K0LO74Nmo3Aj1l2/1AxS8tQ +Zf8Fg7XK2tz+Ibh+tqBBdBUnqavGfCu3rCSosfw3iKWyE4rB7pNDtTw9e6ka7A5AU GFdypW+sLFGNXSjjrTr8J8oZ3rmEABY3HxmDbTG0= In-Reply-To: <875zzawbd6.fsf_-_@moondust.localdomain> (N. Jackson's message of "Wed, 12 Sep 2018 19:21:25 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.56.99.223 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:229740 Archived-At: "N. Jackson" writes: > Thanks Eric, > > At 13:12 -0700 on Wednesday 2018-09-12, Eric Abrahamsen wrote: >> >> On 09/12/18 15:36 PM, N. Jackson wrote: >>> At 14:22 -0700 on Tuesday 2018-09-11, Eric Abrahamsen wrote: >>>> >>>> (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)))))) >>> >>> Evaluating the second form gives: >>> >>> Debugger entered--Lisp error: (void-function article) >> >> Yup, that was a cut-and-paste problem from my larger config. Just stick >> a ` before the "(article" part. > > After quoting with a ' (not a `) and removing the comma before the > `cond', this does exactly what I was looking for. I now have the > following in my .gnus file: That code was taken from EBDB, where I wanted to make sure the pop-up worked correctly regardless of whether the user used Gnus trees or not: you could just delete the cond and one of the branches, depending on whether you use tree view or not. >;;; 2018-09-12 Arrange for Gnus to place BBDB window sensibly. > (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))))))) > > > However, it seems odd to be able to get this: > > +-------------------------------+ > | | > | Summary | > | | > +-------------------------------+ > | | > | | > | Article | > | | > | | > |-------------------------------| > | BBDB | > +-------------------------------+ > > and this: > > +-------------------------------+ > | | | > | Summary | BBDB | > | | | > +-------------------------------+ > | | > | | > | | > | Article | > | | > | | > | | > +-------------------------------+ > > simply by customizing the variable `bbdb-mua-pop-up', but in order > to get > > +-------------------------------+ > | | > | Summary | > | | > +-------------------------------+ > | | | > | | | > | | | > | Article | BBDB | > | | | > | | | > | | | > +-------------------------------+ > > the user has to do some fairly heavy-duty configuration in Gnus. I'm > impressed by the power of this feature in Gnus, but it feels like > overkill for a case like this. I haven't used BBDB for a while, but I could have sworn there was someplace where you can put a predicate callable that could return the window to split. I think it was the HORIZ-P argument to `bbdb-pop-up-window' that can be a function (it should return t when it is called with the article window as an argument), but now I don't remember how the HORIZ-P predicate gets passed in.